From owner-svn-src-projects@FreeBSD.ORG Sun Feb 1 09:59:10 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFFF210656C9; Sun, 1 Feb 2009 09:59:10 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE1688FC12; Sun, 1 Feb 2009 09:59:10 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n119xAAV050491; Sun, 1 Feb 2009 09:59:10 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n119xA7I050489; Sun, 1 Feb 2009 09:59:10 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200902010959.n119xA7I050489@svn.freebsd.org> From: Peter Holm Date: Sun, 1 Feb 2009 09:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187981 - in projects/stress2: . misc X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2009 09:59:11 -0000 Author: pho Date: Sun Feb 1 09:59:10 2009 New Revision: 187981 URL: http://svn.freebsd.org/changeset/base/187981 Log: Added new test scenario used to test the "VOP to translate vnode to its component name" by Joe Marcus Clarke Approved by: kib Added: projects/stress2/marcus.cfg (contents, props changed) projects/stress2/misc/union.sh (contents, props changed) Added: projects/stress2/marcus.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/stress2/marcus.cfg Sun Feb 1 09:59:10 2009 (r187981) @@ -0,0 +1,25 @@ +# $FreeBSD$ + +# Stress Test Suite Configuration + +# Default values +. ./default.cfg + +# Test configuration for the vop_stdvptocnp implementation + +export LOAD=80 +export symlinkLOAD=80 +export TESTPROGS=" +testcases/lockf2/lockf2 +testcases/symlink/symlink +testcases/openat/openat +testcases/rw/rw +testcases/fts/fts +testcases/link/link +testcases/lockf/lockf +testcases/creat/creat +testcases/mkdir/mkdir +testcases/rename/rename +testcases/swap/swap +testcases/mkfifo/mkfifo +" Added: projects/stress2/misc/union.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/stress2/misc/union.sh Sun Feb 1 09:59:10 2009 (r187981) @@ -0,0 +1,70 @@ +#!/bin/sh + +# +# Copyright (c) 2009 Peter Holm +# 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$ +# + +# Simple union test scenario + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +u1=$mdstart +u2=$((u1 + 1)) +[ -d mp1 ] || mkdir mp1 + +mount | grep -q /dev/md${u2}$part && umount -f /dev/md${u2}$part +mount | grep -q /dev/md${u1}$part && umount -f /dev/md${u1}$part +mdconfig -l | grep -q md${u2} && mdconfig -d -u $u2 +mdconfig -l | grep -q md${u1} && mdconfig -d -u $u1 + +mdconfig -s 256m -u $u1 +bsdlabel -w md$u1 auto +newfs md${u1}${part} > /dev/null + +mdconfig -s 256m -u $u2 +bsdlabel -w md$u2 auto +newfs md${u2}${part} > /dev/null + +mount -o ro /dev/md${u1}$part mp1 +mount -o union /dev/md${u2}$part mp1 + +export RUNDIR=`pwd`/mp1/stressX +export runRUNTIME=10m +(cd ..; ./run.sh marcus.cfg) + +umount /dev/md${u2}$part +umount /dev/md${u1}$part + +mount | grep -q /dev/md${u2}$part && umount -f /dev/md${u2}$part +mount | grep -q /dev/md${u1}$part && umount -f /dev/md${u1}$part + +mdconfig -d -u $u2 +mdconfig -d -u $u1 + +rm -rf mp1 From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 07:49:18 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E587106566B; Mon, 2 Feb 2009 07:49:18 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D1C38FC17; Mon, 2 Feb 2009 07:49:18 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n127nIET084669; Mon, 2 Feb 2009 07:49:18 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n127nIHA084668; Mon, 2 Feb 2009 07:49:18 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902020749.n127nIHA084668@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 2 Feb 2009 07:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188002 - in projects/tcp_cc_7.x/sys: . netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 07:49:18 -0000 Author: lstewart Date: Mon Feb 2 07:49:18 2009 New Revision: 188002 URL: http://svn.freebsd.org/changeset/base/188002 Log: Merge r184915 from tcp_cc_8.x Modified: projects/tcp_cc_7.x/sys/ (props changed) projects/tcp_cc_7.x/sys/netinet/cc.c Modified: projects/tcp_cc_7.x/sys/netinet/cc.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/cc.c Mon Feb 2 06:25:57 2009 (r188001) +++ projects/tcp_cc_7.x/sys/netinet/cc.c Mon Feb 2 07:49:18 2009 (r188002) @@ -59,9 +59,6 @@ struct cc_head cc_list = STAILQ_HEAD_INI struct rwlock cc_list_lock; -MALLOC_DECLARE(M_STRING); -MALLOC_DEFINE(M_STRING, "string", "a string"); - /* create a struct to point to our newreno functions */ struct cc_algo newreno_cc_algo = { .name = "newreno", @@ -248,7 +245,6 @@ cc_register_algorithm(struct cc_algo *ad int newreno_init(struct tcpcb *tp) { - printf("initialising tcp connection with newreno congestion control\n"); return 0; } @@ -349,10 +345,10 @@ newreno_ack_received(struct tcpcb *tp, s /* * update the value of ssthresh before entering FR */ -void +void newreno_pre_fr(struct tcpcb *tp, struct tcphdr *th) { - newreno_ssthresh_update(tp); + newreno_ssthresh_update(tp); } /* @@ -360,7 +356,7 @@ newreno_pre_fr(struct tcpcb *tp, struct * th can be null, in which case cwnd will be set according to reno instead * of new reno. */ -void +void newreno_post_fr(struct tcpcb *tp, struct tcphdr *th) { /* From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 08:31:17 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C08B51065694; Mon, 2 Feb 2009 08:31:17 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A8E28FC2E; Mon, 2 Feb 2009 08:31:16 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n128VGCu085528; Mon, 2 Feb 2009 08:31:16 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n128VGGd085526; Mon, 2 Feb 2009 08:31:16 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902020831.n128VGGd085526@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 2 Feb 2009 08:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188003 - in projects/tcp_cc_7.x/share/man: man4 man9 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 08:31:18 -0000 Author: lstewart Date: Mon Feb 2 08:31:16 2009 New Revision: 188003 URL: http://svn.freebsd.org/changeset/base/188003 Log: Merge r187578 from tcp_cc_8.x Added: projects/tcp_cc_7.x/share/man/man4/cc_htcp.4 - copied unchanged from r187578, projects/tcp_cc_8.x/share/man/man4/cc_htcp.4 projects/tcp_cc_7.x/share/man/man9/cc.9 - copied unchanged from r187578, projects/tcp_cc_8.x/share/man/man9/cc.9 Modified: projects/tcp_cc_7.x/share/man/man4/ (props changed) projects/tcp_cc_7.x/share/man/man9/ (props changed) Copied: projects/tcp_cc_7.x/share/man/man4/cc_htcp.4 (from r187578, projects/tcp_cc_8.x/share/man/man4/cc_htcp.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/tcp_cc_7.x/share/man/man4/cc_htcp.4 Mon Feb 2 08:31:16 2009 (r188003, copy of r187578, projects/tcp_cc_8.x/share/man/man4/cc_htcp.4) @@ -0,0 +1,78 @@ +.\" +.\" Copyright (c) 2008 Lawrence Stewart +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions, and the following disclaimer, +.\" without modification, immediately at the beginning of the file. +.\" 2. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Nov 17, 2008 +.Dt CC_HTCP 4 +.Os +.Sh NAME +.Nm cc_htcp +.Nd HTCP Congestion Control Algorithm +.Sh DESCRIPTION +The +.N +congestion control algorithm +.Ss Runtime Configuration +The following +.Xr sysctl 8 +variables are available for tuning: +.Bl -tag -width ".Va net.inet.tcp.cc.htcp.adaptive_backoff" -offset indent +.It Va net.inet.tcp.cc.htcp.adaptive_backoff +Controls use of the adaptive backoff algorithm, which is designed to keep +network queues non-empty during periods of recovery from congestion. +Default is 0 (disabled). +.El +.Bl -tag -width ".Va net.inet.tcp.cc.htcp.rtt_scaling" -offset indent +.It Va net.inet.tcp.cc.htcp.rtt_scaling +Controls use of the RTT scaling algorithm, which is designed to make congestion +window increase invariant with respect to RTT during the connection's regular +mode of operation (congestion avoidance). +Default is 0 (disabled). +.El +.Sh SEE ALSO +.Xr cc 9 +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module was written by +.An James Healy Aq jimmy@deefa.com +and +.An Lawrence Stewart Aq lstewart@FreeBSD.org +while working at the Centre for Advanced Internet Architectures, +Swinburne University (http://caia.swin.edu.au/). +.Pp +This manual page was written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org . +.Sh ACKNOWLEDGMENTS +Development of this software was made possible in part by a grant from the +Cisco University Research Program Fund at Community Foundation Silicon Valley. + Copied: projects/tcp_cc_7.x/share/man/man9/cc.9 (from r187578, projects/tcp_cc_8.x/share/man/man9/cc.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/tcp_cc_7.x/share/man/man9/cc.9 Mon Feb 2 08:31:16 2009 (r188003, copy of r187578, projects/tcp_cc_8.x/share/man/man9/cc.9) @@ -0,0 +1,122 @@ +.\" +.\" Copyright (c) 2008 Lawrence Stewart +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions, and the following disclaimer, +.\" without modification, immediately at the beginning of the file. +.\" 2. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Nov 17, 2008 +.Dt CC 9 +.Os +.Sh NAME +.Nm cc , +.Nm cc_register_algorithm , +.Nm cc_deregister_algorithm +.Nd Modular Congestion Control +.Sh SYNOPSIS +.In netinet/cc.h +.Ft int +.Fn cc_register_algorithm "struct cc_algo *add_cc" +.Ft int +.Fn cc_deregister_algorithm "struct cc_algo *remove_cc" +.Sh DESCRIPTION +The +.Nm +framework provides an interface to dynamically add/remove transport protocol +related congestion control algorithms to/from the running kernel. +.Pp +Congestion control algorithms are identified by an ASCII name and set of +hook function implementations encapsulated in a +.Vt "struct cc_algo" , +which has the following members: +.Bd -literal -offset indent +struct cc_algo { + char name[TCP_CA_NAME_MAX]; + int (*init) (struct tcpcb *tp); + void (*deinit) (struct tcpcb *tp); + void (*cwnd_init) (struct tcpcb *tp); + void (*ack_received) (struct tcpcb *tp, struct tcphdr *th); + void (*pre_fr) (struct tcpcb *tp, struct tcphdr *th); + void (*post_fr) (struct tcpcb *tp, struct tcphdr *th); + void (*after_idle) (struct tcpcb *tp); + void (*after_timeout) (struct tcpcb *tp); +}; +.Ed +.Pp +The +.Va name +field identifies the unique name of the algorithm. +.Ss Runtime Configuration +The following +.Xr sysctl 8 +variables are available for tuning: +.Bl -tag -width ".Va net.inet.tcp.cc.available" -offset indent +.It Va net.inet.tcp.cc.available +Identifies the list of currently available congestion control algorithms by +name. +.El +.Bl -tag -width ".Va net.inet.tcp.cc.algorithm" -offset indent +.It Va net.inet.tcp.cc.algorithm +Specifies which congestion control algorithm will be used by default for new TCP +connections. Setting this variable to one of the names in the +.Va net.inet.tcp.cc.available +list will change the system default for all new connections. +.Sh FUNCTIONS +The +.Fn cc_register_algorithm +function registers the algorithm pointed to by +.Fa add_cc +with the framework. +.Sh IMPLEMENTATION NOTES +.Sh RETURN VALUES +The +.Fn cc_register_algorithm +function returns non-zero on failure. +.Sh SEE ALSO +.Xr cc_htcp 4 , +.Xr cc_cubic 4 , +.Xr tcp 4 , +.Xr sctp 4 +.Sh HISTORY +The modular Congestion Control (CC) framework first appeared in +.Fx 8.0 . +.Sh FUTURE WORK +Integrate with +.Xr sctp 4 . +.Sh AUTHORS +.An -nosplit +The +.Nm +framework was written by +.An James Healy Aq jimmy@deefa.com +and +.An Lawrence Stewart Aq lstewart@FreeBSD.org +while working at the Centre for Advanced Internet Architectures, +Swinburne University (http://caia.swin.edu.au/). +.Pp +This manual page was written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org . +.Sh ACKNOWLEDGMENTS +Development of this software was made possible in part by a grant from the +Cisco University Research Program Fund at Community Foundation Silicon Valley. + From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 18:30:15 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3AA3106566B; Mon, 2 Feb 2009 18:30:15 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1EE08FC23; Mon, 2 Feb 2009 18:30:15 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12IUFX2004117; Mon, 2 Feb 2009 18:30:15 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12IUFGd004116; Mon, 2 Feb 2009 18:30:15 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902021830.n12IUFGd004116@svn.freebsd.org> From: Sam Leffler Date: Mon, 2 Feb 2009 18:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188015 - projects/cambria/sys/dev/cfi X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 18:30:16 -0000 Author: sam Date: Mon Feb 2 18:30:15 2009 New Revision: 188015 URL: http://svn.freebsd.org/changeset/base/188015 Log: allow bus shims to force the interface width; probing can be problematic with the current design Modified: projects/cambria/sys/dev/cfi/cfi_core.c Modified: projects/cambria/sys/dev/cfi/cfi_core.c ============================================================================== --- projects/cambria/sys/dev/cfi/cfi_core.c Mon Feb 2 18:10:51 2009 (r188014) +++ projects/cambria/sys/dev/cfi/cfi_core.c Mon Feb 2 18:30:15 2009 (r188015) @@ -150,11 +150,16 @@ cfi_probe(device_t dev) sc->sc_tag = rman_get_bustag(sc->sc_res); sc->sc_handle = rman_get_bushandle(sc->sc_res); - sc->sc_width = 1; - while (sc->sc_width <= 4) { - if (cfi_read_qry(sc, CFI_QRY_IDENT) == 'Q') - break; - sc->sc_width <<= 1; + if (sc->sc_width == 0) { + sc->sc_width = 1; + while (sc->sc_width <= 4) { + if (cfi_read_qry(sc, CFI_QRY_IDENT) == 'Q') + break; + sc->sc_width <<= 1; + } + } else if (cfi_read_qry(sc, CFI_QRY_IDENT) != 'Q') { + error = ENXIO; + goto out; } if (sc->sc_width > 4) { error = ENXIO; From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 18:32:42 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 377EB106566B; Mon, 2 Feb 2009 18:32:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25DC58FC0C; Mon, 2 Feb 2009 18:32:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12IWg4O004189; Mon, 2 Feb 2009 18:32:42 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12IWgdD004188; Mon, 2 Feb 2009 18:32:42 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902021832.n12IWgdD004188@svn.freebsd.org> From: Sam Leffler Date: Mon, 2 Feb 2009 18:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188016 - projects/cambria/sys/dev/cfi X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 18:32:42 -0000 Author: sam Date: Mon Feb 2 18:32:41 2009 New Revision: 188016 URL: http://svn.freebsd.org/changeset/base/188016 Log: working bus shim: o setup CS0 properly o force interface width to 2 as we can't hack variable width reads on the expansion bus o fix bus dependency typo (boy that was painful to find) Modified: projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c Modified: projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c ============================================================================== --- projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c Mon Feb 2 18:30:15 2009 (r188015) +++ projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c Mon Feb 2 18:32:41 2009 (r188016) @@ -41,15 +41,32 @@ __FBSDID("$FreeBSD$"); #include #include +#include static int cfi_ixp4xx_probe(device_t dev) { -#if 0 +#define EXP_TIMING_PRESERVE \ + (EXP_TIMING_RSVD | EXP_TIMING_MASK) + struct ixp425_softc *sa = device_get_softc(device_get_parent(dev)); + struct cfi_softc *sc = device_get_softc(dev); + + /* setup CS0 per Intel AP-785 */ + EXP_BUS_WRITE_4(sa, EXP_TIMING_CS0_OFFSET, + (EXP_BUS_READ_4(sa, EXP_TIMING_CS0_OFFSET) & EXP_TIMING_PRESERVE) + | EXP_CS_EN + | EXP_SZ_16M + | EXP_WR_EN + | EXP_BYTE_RD16 + | IXP425_EXP_ADDR_T(1) + | IXP425_EXP_SETUP_T(1) + | IXP425_EXP_STROBE_T(4) + | IXP425_EXP_HOLD_T(1) + | IXP425_EXP_RECOVERY_T(1)); + + sc->sc_width = 2; /* NB: don't probe interface width */ return cfi_probe(dev); -#else - return ENXIO; -#endif +#undef EXP_TIMING_PRESERVE } static device_method_t cfi_ixp4xx_methods[] = { @@ -66,4 +83,4 @@ static driver_t cfi_ixp4xx_driver = { cfi_ixp4xx_methods, sizeof(struct cfi_softc), }; -DRIVER_MODULE (cfi, ixp4xx, cfi_ixp4xx_driver, cfi_devclass, 0, 0); +DRIVER_MODULE (cfi, ixp, cfi_ixp4xx_driver, cfi_devclass, 0, 0); From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 20:32:37 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF8A41065785; Mon, 2 Feb 2009 20:32:37 +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 B34438FC0C; Mon, 2 Feb 2009 20:32:37 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12KWbWG006614; Mon, 2 Feb 2009 20:32:37 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12KWbw2006613; Mon, 2 Feb 2009 20:32:37 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200902022032.n12KWbw2006613@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 2 Feb 2009 20:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188021 - projects/geom_raid5 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 20:32:38 -0000 Author: lulf Date: Mon Feb 2 20:32:37 2009 New Revision: 188021 URL: http://svn.freebsd.org/changeset/base/188021 Log: - Add project directory for geom_raid5 integration. Added: projects/geom_raid5/ From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 20:35:49 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB277106564A; Mon, 2 Feb 2009 20:35:49 +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 7FBC58FC0A; Mon, 2 Feb 2009 20:35:49 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12KZn7X006718; Mon, 2 Feb 2009 20:35:49 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12KZnnt006717; Mon, 2 Feb 2009 20:35:49 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200902022035.n12KZnnt006717@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 2 Feb 2009 20:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188022 - projects/geom_raid5/sys X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 20:35:49 -0000 Author: lulf Date: Mon Feb 2 20:35:49 2009 New Revision: 188022 URL: http://svn.freebsd.org/changeset/base/188022 Log: - Add initial sources. Added: projects/geom_raid5/sys/ (props changed) - copied from r188021, head/sys/ From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 20:36:21 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E2AE1065673; Mon, 2 Feb 2009 20:36:21 +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 228F18FC0C; Mon, 2 Feb 2009 20:36:21 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12KaLFq006767; Mon, 2 Feb 2009 20:36:21 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12KaLBF006765; Mon, 2 Feb 2009 20:36:21 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200902022036.n12KaLBF006765@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 2 Feb 2009 20:36:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188023 - projects/geom_raid5/sbin X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 20:36:21 -0000 Author: lulf Date: Mon Feb 2 20:36:20 2009 New Revision: 188023 URL: http://svn.freebsd.org/changeset/base/188023 Log: - Add initial sources. Added: projects/geom_raid5/sbin/ (props changed) - copied from r188022, head/sbin/ From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 20:42:30 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3CFE106566B; Mon, 2 Feb 2009 20:42:30 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96E178FC1A; Mon, 2 Feb 2009 20:42:30 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12KgU3H006907; Mon, 2 Feb 2009 20:42:30 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12KgUEG006905; Mon, 2 Feb 2009 20:42:30 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902022042.n12KgUEG006905@svn.freebsd.org> From: Sam Leffler Date: Mon, 2 Feb 2009 20:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188024 - projects/cambria/sys/arm/xscale/ixp425 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 20:42:31 -0000 Author: sam Date: Mon Feb 2 20:42:30 2009 New Revision: 188024 URL: http://svn.freebsd.org/changeset/base/188024 Log: map 16M of CS0 so we have access to the flash; need to do this dynamically but this works for now and the consensus is it's ok as a temporary solution Modified: projects/cambria/sys/arm/xscale/ixp425/avila_machdep.c projects/cambria/sys/arm/xscale/ixp425/ixp425reg.h Modified: projects/cambria/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/avila_machdep.c Mon Feb 2 20:36:20 2009 (r188023) +++ projects/cambria/sys/arm/xscale/ixp425/avila_machdep.c Mon Feb 2 20:42:30 2009 (r188024) @@ -154,6 +154,10 @@ static const struct pmap_devmap ixp425_d { IXP425_EXP_VBASE, IXP425_EXP_HWBASE, IXP425_EXP_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + /* CFI Flash on the Expansion Bus */ + { IXP425_EXP_BUS_CS0_VBASE, IXP425_EXP_BUS_CS0_HWBASE, + IXP425_EXP_BUS_CS0_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + /* IXP425 PCI Configuration */ { IXP425_PCI_VBASE, IXP425_PCI_HWBASE, IXP425_PCI_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, Modified: projects/cambria/sys/arm/xscale/ixp425/ixp425reg.h ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/ixp425reg.h Mon Feb 2 20:36:20 2009 (r188023) +++ projects/cambria/sys/arm/xscale/ixp425/ixp425reg.h Mon Feb 2 20:42:30 2009 (r188024) @@ -76,6 +76,10 @@ * Global cache clean area * FF00 0000 --------------------------- * + * FE00 0000 --------------------------- + * 16M CFI Flash (on ext bus) + * FD00 0000 --------------------------- + * * FC00 0000 --------------------------- * PCI Data (memory space) * F800 0000 --------------------------- IXP425_PCI_MEM_VBASE @@ -348,6 +352,10 @@ #define IXP425_EXP_SETUP_T(x) (((x) & 3) << IXP425_EXP_SETUP_SHIFT) #define IXP425_EXP_ADDR_T(x) (((x) & 3) << IXP425_EXP_ADDR_SHIFT) +/* EXP_TIMING_* bits */ +#define EXP_TIMING_MASK 0x3fff0000 +#define EXP_TIMING_RSVD 0x40000184 /* bits to preserve at boot */ + /* EXP_CSn bits */ #define EXP_BYTE_EN 0x00000001 /* bus uses only 8-bit data */ #define EXP_WR_EN 0x00000002 /* ena writes to CS region */ @@ -649,6 +657,9 @@ #define IXP425_EXP_BUS_CSx_VBASE(i) \ (IXP425_MAC_B_VBASE + (i)*IXP425_MAC_B_SIZE) +#define IXP425_EXP_BUS_CS0_HWBASE IXP425_EXP_BUS_CSx_HWBASE(0) +#define IXP425_EXP_BUS_CS0_VBASE 0xFD000000UL +#define IXP425_EXP_BUS_CS0_SIZE 0x01000000 /* NB: 16M */ #define IXP425_EXP_BUS_CS1_HWBASE IXP425_EXP_BUS_CSx_HWBASE(1) #define IXP425_EXP_BUS_CS1_VBASE IXP425_EXP_BUS_CSx_VBASE(1) #define IXP425_EXP_BUS_CS1_SIZE 0x1000 @@ -663,7 +674,6 @@ #define IXP425_EXP_BUS_CS4_SIZE 0x1000 /* NB: not mapped (yet) */ -#define IXP425_EXP_BUS_CS0_HWBASE IXP425_EXP_BUS_CSx_HWBASE(0) #define IXP425_EXP_BUS_CS5_HWBASE IXP425_EXP_BUS_CSx_HWBASE(5) #define IXP425_EXP_BUS_CS6_HWBASE IXP425_EXP_BUS_CSx_HWBASE(6) #define IXP425_EXP_BUS_CS7_HWBASE IXP425_EXP_BUS_CSx_HWBASE(7) From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 20:51:27 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 186E01065956; Mon, 2 Feb 2009 20:51:27 +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 001938FC18; Mon, 2 Feb 2009 20:51:26 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12KpQwr007116; Mon, 2 Feb 2009 20:51:26 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12KpQhM007111; Mon, 2 Feb 2009 20:51:26 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200902022051.n12KpQhM007111@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 2 Feb 2009 20:51:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188025 - in projects/geom_raid5: sbin/geom/class/raid5 sys/geom/raid5 sys/modules/geom/geom_raid5 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 20:51:30 -0000 Author: lulf Date: Mon Feb 2 20:51:26 2009 New Revision: 188025 URL: http://svn.freebsd.org/changeset/base/188025 Log: - Import the geom_raid5 PP sources with a few modifications such as adding macros for metadata offsets as well as converting kthread to kproc. Added: projects/geom_raid5/sbin/geom/class/raid5/ projects/geom_raid5/sbin/geom/class/raid5/Makefile (contents, props changed) projects/geom_raid5/sbin/geom/class/raid5/geom_raid5.c (contents, props changed) projects/geom_raid5/sbin/geom/class/raid5/graid5.8 projects/geom_raid5/sys/geom/raid5/ projects/geom_raid5/sys/geom/raid5/g_raid5.c (contents, props changed) projects/geom_raid5/sys/geom/raid5/g_raid5.h (contents, props changed) projects/geom_raid5/sys/modules/geom/geom_raid5/ projects/geom_raid5/sys/modules/geom/geom_raid5/Makefile (contents, props changed) Added: projects/geom_raid5/sbin/geom/class/raid5/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/geom_raid5/sbin/geom/class/raid5/Makefile Mon Feb 2 20:51:26 2009 (r188025) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../misc + +CLASS= raid5 + +.include Added: projects/geom_raid5/sbin/geom/class/raid5/geom_raid5.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/geom_raid5/sbin/geom/class/raid5/geom_raid5.c Mon Feb 2 20:51:26 2009 (r188025) @@ -0,0 +1,325 @@ +/*- + * Copyright (c) 2006 Arne Woerner + * testing + tuning-tricks: veronica@fluffles.net + * derived from gstripe/gmirror (Pawel Jakub Dawidek ) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$Id: geom_raid5.c,v 1.33.1.12 2007/11/12 20:24:45 aw Exp aw $"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "core/geom.h" +#include "misc/subr.h" + +uint32_t lib_version = G_LIB_VERSION; +uint32_t version = G_RAID5_VERSION; +static intmax_t default_stripesize = 64*1024; + +static void raid5_main(struct gctl_req *req, unsigned flags); +static void raid5_clear(struct gctl_req *req); +static void raid5_dump(struct gctl_req *req); +static void raid5_label(struct gctl_req *req); + +#ifndef G_TYPE_BOOL +#define G_TYPE_BOOL G_TYPE_NONE +#endif + +#if __FreeBSD_version >= 700000 +#define GCMD67 NULL, +#else +#define GCMD67 +#endif +struct g_command class_commands[] = { + { "clear", G_FLAG_VERBOSE, raid5_main, G_NULL_OPTS, GCMD67 + "[-v] prov ..." + }, + { "destroy", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_BOOL }, + { 'y', "noyoyo", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL + }, GCMD67 + "[-fvy] name ..." + }, + { "remove", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, GCMD67 + "[-v] name prov" + }, + { "insert", G_FLAG_VERBOSE, NULL, + { { 'h', "hardcode", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL}, GCMD67 + "[-hv] name prov" + }, + { "configure", G_FLAG_VERBOSE, NULL, + { { 'h', "hardcode", NULL, G_TYPE_BOOL }, + { 'a', "activate", NULL, G_TYPE_BOOL }, + { 'c', "cowop", NULL, G_TYPE_BOOL }, + { 'n', "nohot", NULL, G_TYPE_BOOL }, + { 'S', "safeop", NULL, G_TYPE_BOOL }, + { 'R', "rebuild", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL}, GCMD67 + "[-RSchnva] name" + }, + { "dump", 0, raid5_main, G_NULL_OPTS, GCMD67 + "prov ..." + }, + { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, raid5_main, + { { 'c', "cowop", NULL, G_TYPE_BOOL }, + { 'h', "hardcode", NULL, G_TYPE_BOOL }, + { 'n', "nohot", NULL, G_TYPE_BOOL }, + { 's', "stripesize", &default_stripesize, G_TYPE_NUMBER }, + { 'S', "safeop", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL}, GCMD67 + "[-chvn] [-s stripesize] [-S] name prov ..." + }, + { "stop", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_BOOL }, + { 'y', "noyoyo", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL + }, GCMD67 + "[-fv] name ..." + }, + G_CMD_SENTINEL +}; + +static int verbose = 0; + +static void +raid5_main(struct gctl_req *req, unsigned flags) +{ + const char *name; + + if ((flags & G_FLAG_VERBOSE) != 0) + verbose = 1; + + name = gctl_get_ascii(req, "verb"); + if (name == NULL) { + gctl_error(req, "No '%s' argument.", "verb"); + return; + } + if (strcmp(name, "label") == 0) + raid5_label(req); + else if (strcmp(name, "clear") == 0) + raid5_clear(req); + else if (strcmp(name, "dump") == 0) + raid5_dump(req); + else + gctl_error(req, "Unknown command: %s.", name); +} + +static void +raid5_label(struct gctl_req *req) +{ + struct g_raid5_metadata md; + const char *name; + int error, i, hardcode, nargs, safeop, nohot, cowop; + intmax_t stripesize; + + nargs = gctl_get_int(req, "nargs"); + if (nargs < 3) { + gctl_error(req, "Too few arguments."); + return; + } + nohot = gctl_get_int(req, "nohot"); + hardcode = gctl_get_int(req, "hardcode"); + safeop = gctl_get_int(req, "safeop"); + cowop = gctl_get_int(req, "cowop"); + stripesize = gctl_get_intmax(req, "stripesize"); + if (stripesize > 256*1024) { + gctl_error(req, "stripesize must be less than 512KB."); + return; + } + if (!powerof2(stripesize)) { + int cs; + for (cs=4096; cs < stripesize; cs<<=1); + gctl_error(req, "Invalid stripe size: %jd, recommended: %d.", + stripesize, cs); + return; + } + + + /* + * Clear last sector first to spoil all components if device exists. + */ + for (i = 1; i < nargs; i++) { + name = gctl_get_ascii(req, "arg%d", i); + error = g_metadata_clear(name, NULL); + if (error != 0) { + gctl_error(req, "Can't store metadata on %s: %s.", name, + strerror(error)); + return; + } + } + + strlcpy(md.md_magic, G_RAID5_MAGIC, sizeof(md.md_magic)); + md.md_version = G_RAID5_VERSION; + name = gctl_get_ascii(req, "arg0"); + strlcpy(md.md_name, name, sizeof(md.md_name)); + md.md_id = arc4random(); + md.md_all = nargs - 1; + md.md_stripesize = stripesize; + md.md_verified = 0; + md.md_newest = -1; + md.md_no_hot = nohot; + md.md_state = nohot ? G_RAID5_STATE_CALM : + (G_RAID5_STATE_HOT|G_RAID5_STATE_VERIFY); + if (safeop) + md.md_state |= G_RAID5_STATE_SAFEOP; + if (cowop) + md.md_state |= G_RAID5_STATE_COWOP; + + /* + * Ok, store metadata. + */ + int64_t min = -1; + int64_t waste = 0; + for (i = 1; i < nargs; i++) { + u_char sector[512]; + int64_t pmin; + + name = gctl_get_ascii(req, "arg%d", i); + md.md_no = i - 1; + if (!hardcode) + bzero(md.md_provider, sizeof(md.md_provider)); + else { + if (strncmp(name, _PATH_DEV, strlen(_PATH_DEV)) == 0) + name += strlen(_PATH_DEV); + strlcpy(md.md_provider, name, sizeof(md.md_provider)); + } + md.md_provsize = g_get_mediasize(name); + pmin = md.md_provsize - g_get_sectorsize(name); + waste += pmin % stripesize; + if (min < 0) + min = pmin; + else if (min > pmin) { + waste += (i-1) * (min - pmin); + min = pmin; + } else + waste += pmin - min; + if (md.md_provsize == 0) { + fprintf(stderr, "Can't get mediasize of %s: %s.\n", + name, strerror(errno)); + gctl_error(req, "Not fully done."); + continue; + } + raid5_metadata_encode(&md, sector); + error = g_metadata_store(name, sector, sizeof(sector)); + if (error != 0) { + fprintf(stderr, "Can't store metadata on %s: %s.\n", + name, strerror(error)); + gctl_error(req, "Not fully done."); + continue; + } + if (verbose) + printf("Metadata value stored on %s.\n", name); + } + if (waste > 0) + printf("Wasting %jd bytes (>=%jdGB).\n", waste, waste>>(3*10)); +} + +static void +raid5_clear(struct gctl_req *req) +{ + const char *name; + int error, i, nargs; + + nargs = gctl_get_int(req, "nargs"); + if (nargs < 1) { + gctl_error(req, "Too few arguments."); + return; + } + + for (i = 0; i < nargs; i++) { + name = gctl_get_ascii(req, "arg%d", i); + error = g_metadata_clear(name, G_RAID5_MAGIC); + if (error != 0) { + fprintf(stderr, "Can't clear metadata on %s: %s.\n", + name, strerror(error)); + gctl_error(req, "Not fully done."); + continue; + } + if (verbose) + printf("Metadata cleared on %s.\n", name); + } +} + +static void +raid5_metadata_dump(const struct g_raid5_metadata *md) +{ + + printf(" Magic string: %s\n", md->md_magic); + printf(" Metadata version: %u\n", (u_int)md->md_version); + printf(" Device name: %s\n", md->md_name); + printf(" Device ID: %u\n", (u_int)md->md_id); + printf(" Disk number: %u\n", (u_int)md->md_no); + printf("Total number of disks: %u\n", (u_int)md->md_all); + printf(" Provider Size: %jd\n", md->md_provsize); + printf(" Verified: %jd\n", md->md_verified); + printf(" State: %u\n", (u_int)md->md_state); + printf(" Stripe size: %u\n", (u_int)md->md_stripesize); + printf(" Newest: %u\n", (u_int)md->md_newest); + printf(" NoHot: %s\n", md->md_no_hot?"Yes":"No"); + printf(" Hardcoded provider: %s\n", md->md_provider); +} + +static void +raid5_dump(struct gctl_req *req) +{ + struct g_raid5_metadata md, tmpmd; + const char *name; + int error, i, nargs; + + nargs = gctl_get_int(req, "nargs"); + if (nargs < 1) { + gctl_error(req, "Too few arguments."); + return; + } + + for (i = 0; i < nargs; i++) { + name = gctl_get_ascii(req, "arg%d", i); + error = g_metadata_read(name, (u_char *)&tmpmd, sizeof(tmpmd), + G_RAID5_MAGIC); + if (error != 0) { + fprintf(stderr, "Can't read metadata from %s: %s.\n", + name, strerror(error)); + gctl_error(req, "Not fully done."); + continue; + } + raid5_metadata_decode((u_char *)&tmpmd, &md); + printf("Metadata on %s:\n", name); + raid5_metadata_dump(&md); + printf("\n"); + } +} Added: projects/geom_raid5/sbin/geom/class/raid5/graid5.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/geom_raid5/sbin/geom/class/raid5/graid5.8 Mon Feb 2 20:51:26 2009 (r188025) @@ -0,0 +1,309 @@ +.\" Copyright (c) 2006 Arne Woerner +.\" testing + tuning-tricks: veronica@fluffles.net +.\" testing: lev@FreeBSD.org +.\" derived from gstripe/gmirror (Pawel Jakub Dawidek ) +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $Id: graid5.8,v 1.18 2008/05/22 02:10:47 aw Exp $ +.\" +.Dd Dec 11, 2006 +.Dt GRAID5 8 +.Os +.Sh NAME +.Nm graid5 +.Nd "control utility for raid5 devices" +.Sh SYNOPSIS +.Nm +.Cm destroy +.Op Fl fvy +.Ar name ... +.Nm +.Cm label +.Op Fl hnSv +.Op Fl s Ar stripesize +.Ar name +.Ar prov prov ... +.Nm +.Cm configure +.Op Fl hnRS +.Ar name +.Nm +.Cm stop +.Op Fl fv +.Ar name ... +.Nm +.Cm insert +.Ar name prov +.Nm +.Cm remove +.Ar name prov +.Nm +.Cm clear +.Op Fl v +.Ar prov ... +.Nm +.Cm dump +.Ar prov ... +.Nm +.Cm list +.Nm +.Cm status +.Nm +.Cm load +.Nm +.Cm unload +.Sh DESCRIPTION +The +.Nm +utility is used for setting up a RAID-5 on two or more disks. +The RAID5'ed device can be configured using two different methods: +.Dq manual +or +.Dq automatic . +When using the +.Dq manual +method, no metadata are stored on the devices, so the RAID5 +device has to be configured by hand every time it is needed. +The +.Dq automatic +method uses on-disk metadata to detect devices. +Once devices are labeled, they will be automatically detected and +configured. +.Pp +The first argument to +.Nm +indicates an action to be performed: +.Bl -tag -width ".Cm destroy" +.It Cm label +Set up a RAID5 device from the given devices with the specified +.Ar name . +This is the +.Dq automatic +method, where metadata are stored in every device's last sector. +The kernel module +.Pa geom_raid5.ko +will be loaded if it is not loaded already. +.Pp +Additional options include: +.Bl -tag -width ".Fl s Ar stripesize" +.It Fl h +Hardcode providers' names in metadata. +.It Fl c +CowOp mode: Complete-Only-Write-Operation -- +dont write if not in status COMPLETE. +.It Fl S +SafeOp mode: read the whole stripe for every read and verify parity. +.It Fl n +never-hot-mode: A 2 disk graid5 device doesnt need the hot marker, +if it is used as swap space. Furthermore this flags is useful, if +a rebuild would be harmful even if a write request was pending. +.It Fl s Ar stripesize +Specify stripesize. +Recommendation: MAXPHYS (currently 128KiB) == stripesize. +The +.Ar stripesize +must be a power of 2 and +a multiple of the largest sector size of all the providers. +.El +.It Cm configure +Configure an existing graid5 device: +.Pp +Options are: +.Bl -tag -width "Fl h" +.It Fl h +Trigger: hardcoded option. +.It Fl a +Reset error flag of all disks. +.It Fl c +CowOp mode: Complete-Only-Write-Operation -- +dont write if not in status COMPLETE. +.It Fl n +Trigger: never-hot-mode option. +.It Fl S +Trigger: SafeOp-mode option. +.It Fl R +Trigger: start/stop re-sync. +.El +.It Cm stop +Turn off an existing RAID5 device by its +.Ar name . +This command does not touch on-disk metadata! +.Pp +Options are: +.Bl -tag -width "Fl y" +.It Fl f +Force destroy even if still busy. +.It Fl y +Do not do the Yo-Yo effect. +.El +.It Cm destroy +Same as +.Cm stop . +.It Cm clear +Clear metadata on the given devices. +.It Cm dump +Dump metadata stored on the given devices. +.It Cm list +See +.Xr geom 8 . +.It Cm status +See +.Xr geom 8 . +.It Cm load +See +.Xr geom 8 . +.It Cm unload +See +.Xr geom 8 . +.El +.Pp +Additional options: +.Bl -tag -width ".Fl f +.It Fl f +Force the removal of the specified striped device. +.It Fl v +Be more verbose. +.El +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 8 +variables can be used to control the behavior of the +.Nm RAID5 +GEOM class. +The default value is shown next to each variable. +.Bl -tag -width indent +.It Va kern.geom.raid5.debug : No 0 +Debug level of the +.Nm RAID5 +GEOM class. +This can be set to a number between 0 and 3 inclusive. +If set to 0 minimal debug information is printed, and if set to 3 the +maximum amount of debug information is printed. +.It Va kern.geom.raid5.mhm : No 0 (read-only) +Number of malloc hamster cache misses. +.It Va kern.geom.raid5.mhh : No 0 (read-only) +Number of malloc hamster cache hits. +.It Va kern.geom.raid5.maxmem : No 8000000 (tunable) +This variable can be set any time to any 32bit signed integer value. +It is cropped apropriately (0..128MB) and interpreted as bytes. +.It Va kern.geom.raid5.wqf : No 0 (read-only) +This value shows the number of write requests that were issued early due to +a conflicting read request. +.It Va kern.geom.raid5.wqp : No 0 (read-only) +This value shows the maximum number of pending write requests so far. +.It Va kern.geom.raid5.blked1 : No 0 (read-only) +This value shows the number of new write requests that could not be combined +because the corresponding area already has an issued but incomplete +write request. +.It Va kern.geom.raid5.blked2 : No 0 (read-only) +This value shows number of due write (2-phase) requests, that were blocked by +another such request due to parity area conflict. +.It Va kern.geom.raid5.dsk_ok : No 50 (read-only) +This value shows the healthiness of the underlying devices. +50 is perfect. 40 or lower triggers a soft-device-remove. +0 causes an error announced to the upper layer. +.It Va kern.geom.raid5.veri_nice : No 100 (tunable) +This value (milli seconds) enforces a delay after a user-land read request +for internal verify requests, which are certainly quite hindering for +user-land requests, because they read all disks and in some cases even +write a disk. +.It Va kern.geom.raid5.veri_w : No 0 (read-only) +This value shows the number of parity-failures (during rebuild) +.It Va kern.geom.raid5.veri : No 0 (read-only) +This value shows the number of parity checks (during rebuild). +.It Va kern.geom.raid5.wreq2_cnt : No 0 (read-only) +Number of 2-phase writes (1. phase: read data&parity (or "other" data in case +of three disks); 2. phase: write data&parity). +.It Va kern.geom.raid5.wreq1_cnt : No 0 (read-only) +Number of 1-phase writes (sufficiently long chunks can be written in one +phase). +.It Va kern.geom.raid5.wreq_cnt : No 0 (read-only) +Write requests started by upper layer. +.It Va kern.geom.raid5.rreq_cnt : No 0 (read-only) +Read requests started by upper layer. +.It Va kern.geom.raid5.maxwql : No 0 (tunable) +This variable gives a hint for the maximum length of the write queue. +Write requests are queued until they are long enough or old enough or +until there are too many of them. +.It Va kern.geom.raid5.wdt : No 10 (tunable) +This variable determines the maximum age of a write request before it +is issued. +.It Va kern.geom.raid5.tooc : No 3 (tunable) +This variable determines the time-out-on-create. The provider is not +created before all consumers are present or the timeout is over. +.El +.Sh EXIT STATUS +Exit status is 0 on success, and 1 if the command fails. +.Sh EXAMPLES +The following example shows how to set up a RAID5 device from four disks with a +128KB stripe size for automatic configuration, +create a file system on it, +and mount it: +.Bd -literal -offset indent +graid5 label -v -s 131072 data /dev/da0 /dev/da1 /dev/da2 /dev/da3 +newfs /dev/raid5/data +mount /dev/raid5/data /mnt +[...] +umount /mnt +graid5 stop data +graid5 unload +.Ed +.Sh COMPATIBILITY +The +.Nm +interleave is in number of bytes, +unlike +.Xr ccdconfig 8 +and +.Xr atacontrol 8 +which use the number of sectors. +A +.Xr ccdconfig 8 +.Ar ileave +of +.Ql 128 +is 64 KB (128 512B sectors). +The same stripe interleave would be specified as +.Ql 65536 +for +.Nm . +.Sh SEE ALSO +.Xr geom 4 , +.Xr loader.conf 5 , +.Xr atacontrol 8 , +.Xr ccdconfig 8 , +.Xr geom 8 , +.Xr mount 8 , +.Xr newfs 8 , +.Xr sysctl 8 , +.Xr umount 8 , +.Xr vinum 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 5.3 . +.Sh AUTHORS +.An Arne W?rner Aq arne_woerner@yahoo.com +.An testing & tuning: Aq veronica@fluffles.net Added: projects/geom_raid5/sys/geom/raid5/g_raid5.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/geom_raid5/sys/geom/raid5/g_raid5.c Mon Feb 2 20:51:26 2009 (r188025) @@ -0,0 +1,4174 @@ +/* + * Copyright (c) 2006 Arne Woerner + * testing + tuning-tricks: veronica@fluffles.net + * derived from gstripe/gmirror (Pawel Jakub Dawidek ) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$Id: g_raid5.c,v 1.271.1.274 2008/07/29 13:58:03 aw Exp aw $"); + +#ifdef KASSERT +#define MYKASSERT(a,b) KASSERT(a,b) +#else +#define MYKASSERT(a,b) do {if (!(a)) { G_RAID5_DEBUG(0,"KASSERT in line %d.",__LINE__); panic b;}} while (0) +#endif +#define ORDER(a,b) do {if (a > b) { int tmp = a; a = b; b = tmp; }} while(0) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * our sysctl-s + */ +SYSCTL_DECL(_kern_geom); +SYSCTL_NODE(_kern_geom, OID_AUTO, raid5, CTLFLAG_RW, 0, "GEOM_RAID5 stuff"); +static u_int g_raid5_cache_size_mem = 64*1024*1024; +TUNABLE_INT("kern.geom.raid5.csm", &g_raid5_cache_size_mem); +SYSCTL_INT(_kern_geom_raid5, OID_AUTO, csm, CTLFLAG_RW, &g_raid5_cache_size_mem, + 0, "cache size (( per bucket) in bytes"); +static int g_raid5_cache_size = -5; +TUNABLE_INT("kern.geom.raid5.cs", &g_raid5_cache_size); +SYSCTL_INT(_kern_geom_raid5, OID_AUTO, cs, CTLFLAG_RW, &g_raid5_cache_size,0, + "cache size (( per bucket)"); +static u_int g_raid5_debug = 0; +TUNABLE_INT("kern.geom.raid5.debug", &g_raid5_debug); +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, debug, CTLFLAG_RW, &g_raid5_debug, 0, + "Debug level"); +static u_int g_raid5_tooc = 5; +TUNABLE_INT("kern.geom.raid5.tooc", &g_raid5_tooc); +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, tooc, CTLFLAG_RW, &g_raid5_tooc, 0, + "timeout on create (in order to avoid unnecessary rebuilds on reboot)"); +static u_int g_raid5_wdt = 5; +TUNABLE_INT("kern.geom.raid5.wdt", &g_raid5_wdt); +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, wdt, CTLFLAG_RW, &g_raid5_wdt, 0, + "write request delay (in seconds)"); +static u_int g_raid5_maxwql = 25; +TUNABLE_INT("kern.geom.raid5.maxwql", &g_raid5_maxwql); +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, maxwql, CTLFLAG_RW, &g_raid5_maxwql, 0, + "max wait queue length"); +static u_int g_raid5_veri_fac = 25; +TUNABLE_INT("kern.geom.raid5.veri_fac", &g_raid5_veri_fac); +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, veri_fac, CTLFLAG_RW, &g_raid5_veri_fac, + 0, "veri brake factor in case of veri_min * X < veri_max"); +static u_int g_raid5_veri_nice = 100; +TUNABLE_INT("kern.geom.raid5.veri_nice", &g_raid5_veri_nice); +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO,veri_nice, CTLFLAG_RW,&g_raid5_veri_nice, + 0, "wait this many milli seconds after last user-read (less than 1sec)"); +static u_int g_raid5_vsc = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, veri, CTLFLAG_RD, &g_raid5_vsc, 0, + "verify stripe count"); +static u_int g_raid5_vwc = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, veri_w, CTLFLAG_RD, &g_raid5_vwc, 0, + "verify write count"); +static u_int g_raid5_rrc = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, rreq_cnt, CTLFLAG_RD, &g_raid5_rrc, 0, + "read request count"); +static u_int g_raid5_wrc = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, wreq_cnt, CTLFLAG_RD, &g_raid5_wrc, 0, + "write request count"); +static u_int g_raid5_w1rc = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, wreq1_cnt, CTLFLAG_RD, &g_raid5_w1rc, 0, + "write request count (1-phase)"); +static u_int g_raid5_w2rc = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, wreq2_cnt, CTLFLAG_RD, &g_raid5_w2rc, 0, + "write request count (2-phase)"); +static u_int g_raid5_disks_ok = 50; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, dsk_ok, CTLFLAG_RD, &g_raid5_disks_ok,0, + "repeat EIO'ed request?"); +static u_int g_raid5_blked1 = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, blked1, CTLFLAG_RD, &g_raid5_blked1,0, + "1. kind block count"); +static u_int g_raid5_blked2 = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, blked2, CTLFLAG_RD, &g_raid5_blked2,0, + "2. kind block count"); +static u_int g_raid5_wqp = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, wqp, CTLFLAG_RD, &g_raid5_wqp,0, + "max. write queue length"); +static u_int g_raid5_mhm = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, mhm, CTLFLAG_RD, &g_raid5_mhm,0, + "memory hamster miss"); +static u_int g_raid5_mhh = 0; +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, mhh, CTLFLAG_RD, &g_raid5_mhh,0, + "memory hamster hit"); + +static MALLOC_DEFINE(M_RAID5, "raid5_data", "GEOM_RAID5 Data"); + +static int g_raid5_destroy(struct g_raid5_softc *sc, + boolean_t force, boolean_t noyoyo); +static int g_raid5_destroy_geom(struct gctl_req *req, struct g_class *mp, + struct g_geom *gp); + +static g_taste_t g_raid5_taste; +static g_ctl_req_t g_raid5_config; +static g_dumpconf_t g_raid5_dumpconf; + +static eventhandler_tag g_raid5_post_sync = NULL; + +static void g_raid5_init(struct g_class *mp); +static void g_raid5_fini(struct g_class *mp); + +struct g_class g_raid5_class = { + .name = G_RAID5_CLASS_NAME, + .version = G_VERSION, + .ctlreq = g_raid5_config, + .taste = g_raid5_taste, + .destroy_geom = g_raid5_destroy_geom, + .init = g_raid5_init, + .fini = g_raid5_fini +}; + +/* GCD & LCM */ +static __inline u_int +gcd(u_int a, u_int b) +{ + while (b != 0) { + u_int c = a; + a = b; + b = c % b; + } + return a; +} +static __inline u_int +g_raid5_lcm(u_int a, u_int b) +{ return ((a * b) / gcd(a, b)); } + +/* + * memory hamster stuff + * memory hamster stores in the first sizeof(int) bytes of each chunk + * that is requested * by malloc() the size of that chunk, + * while the bio-s only see that chunk at offset &[sizeof(int)]... + */ +static __inline int +g_raid5_mh_sz_by_a(caddr_t m) +{ return ((int*)m)[-1]; } +static __inline int +g_raid5_mh_sz_by_i(struct g_raid5_softc *sc, int i) +{ return g_raid5_mh_sz_by_a(sc->mhl[i]); } +static __inline void +g_raid5_mh_sz(caddr_t m, int l) +{ ((int*)m)[-1] = l; } +static __inline void +g_raid5_free_by_a(caddr_t m) +{ free(m - sizeof(int), M_RAID5); } +static __inline void +g_raid5_free_by_i(struct g_raid5_softc *sc, int mi) +{ g_raid5_free_by_a(sc->mhl[mi]); } +static void +g_raid5_mh_all_free(struct g_raid5_softc *sc) { + for (int i=0; imhc; i++) + g_raid5_free_by_i(sc,i); + sc->mhc = 0; +} +static caddr_t +g_raid5_malloc(struct g_raid5_softc *sc, int l, int force) +{ + mtx_lock(&sc->mh_mtx); + int h = l*2; + int fi = -1; + int fl = -1; + int i; + for (i=0; imhc; i++) { + int ml = g_raid5_mh_sz_by_i(sc,i); + if (ml < l || ml > h) + continue; + if (fl > 0 && ml >= fl) + continue; + fl = ml; + fi = i; + if (ml == l) + break; + } + caddr_t m; + if (fi >= 0) { + m = sc->mhl[fi]; + sc->mhc--; + if (fi < sc->mhc) + sc->mhl[fi] = sc->mhl[sc->mhc]; + g_raid5_mhh++; + mtx_unlock(&sc->mh_mtx); + } else { + g_raid5_mhm++; + mtx_unlock(&sc->mh_mtx); + m = malloc(l+sizeof(fl), M_RAID5, M_NOWAIT); + if (m == NULL && force) { + g_raid5_mh_all_free(sc); + m = malloc(l+sizeof(fl), M_RAID5, M_WAITOK); + } + if (m != NULL) { + m += sizeof(fl); + g_raid5_mh_sz(m,l); + } + } + return m; +} +static void +g_raid5_free(struct g_raid5_softc *sc, caddr_t m) +{ + mtx_lock(&sc->mh_mtx); + MYKASSERT(((int*)m)[-1] > 0, ("this is no mem hamster chunk.")); + if (sc->mhc < sc->mhs) { + sc->mhl[sc->mhc] = m; + sc->mhc++; + } else { + int l = g_raid5_mh_sz_by_a(m); + int mi = -1; + int ml = -1; + for (int i=0; imhc; i++) { + int nl = g_raid5_mh_sz_by_i(sc,i); + if (nl >= l) + continue; + if (ml > 0 && ml <= nl) + continue; + mi = i; + ml = nl; + } + if (mi < 0) + g_raid5_free_by_a(m); + else { + g_raid5_free_by_i(sc,mi); + sc->mhl[mi] = m; + } + } + mtx_unlock(&sc->mh_mtx); +} +static void +g_raid5_mh_destroy(struct g_raid5_softc *sc) +{ + g_raid5_mh_all_free(sc); + free(sc->mhl, M_RAID5); + mtx_destroy(&sc->mh_mtx); +} + +/* + * cache entry manager + * implements a simple queue (fst; for next bio it (ab)uses bio's bio_queue) + */ +static __inline int +g_raid5_ce_em(struct g_raid5_cache_entry *ce) +{ return ce->fst == NULL; } +static __inline struct g_raid5_cache_entry * +g_raid5_ce_by_i(struct g_raid5_softc *sc, int i) +{ return sc->ce + i; } +static struct g_raid5_cache_entry * +g_raid5_ce_by_sno(struct g_raid5_softc *sc, off_t s) +{ + struct g_raid5_cache_entry *fce = NULL; + MYKASSERT(s >= 0, ("s must not be negative.")); + s++; + int i = s % sc->cs; + for (int j=sc->cs; j>0; j--) { + struct g_raid5_cache_entry *ce = g_raid5_ce_by_i(sc,i); + if (ce->sno == s) + return ce; + if (fce==NULL && ce->sno == 0) + fce = ce; + i++; + if (i == sc->cs) + i = 0; + } + if (fce == NULL) { + sc->cfc++; + return NULL; + } + MYKASSERT(fce->fst == NULL, ("ce not free.")); + MYKASSERT(fce->dc == 0, ("%p dc inconsistency %d.",fce,fce->dc)); + MYKASSERT(fce->sno == 0, ("ce not free.")); + fce->sno = s; + return fce; +} +static __inline struct g_raid5_cache_entry * +g_raid5_ce_by_off(struct g_raid5_softc *sc, off_t o) +{ return g_raid5_ce_by_sno(sc, o/sc->fsl); } +static __inline struct g_raid5_cache_entry * +g_raid5_ce_by_bio(struct g_raid5_softc *sc, struct bio *bp) +{ return g_raid5_ce_by_off(sc, bp->bio_offset); } +#define G_RAID5_C_TRAVERSE(AAA,BBB,CCC) \ + for (int i = AAA->cs-1; i >= 0; i--) \ + G_RAID5_CE_TRAVERSE((CCC=g_raid5_ce_by_i(sc,i)), BBB) +#define G_RAID5_C_TRAVSAFE(AAA,BBB,CCC) \ + for (int i = AAA->cs-1; i >= 0; i--) \ + G_RAID5_CE_TRAVSAFE((CCC=g_raid5_ce_by_i(sc,i)), BBB) +#define G_RAID5_CE_TRAVERSE(AAA, BBB) \ + for (BBB = AAA->fst; BBB != NULL; BBB = g_raid5_q_nx(BBB)) +#define G_RAID5_CE_TRAVSAFE(AAA, BBB) \ + for (BBB = AAA->fst, BBB##_nxt = g_raid5_q_nx(BBB); \ + BBB != NULL; \ + BBB = BBB##_nxt, BBB##_nxt = g_raid5_q_nx(BBB)) +static __inline void +g_raid5_dc_inc(struct g_raid5_softc *sc, struct g_raid5_cache_entry *ce) +{ + MYKASSERT(ce->dc >= 0 && sc->dc >= 0 && sc->wqp >= 0, ("cannot happen.")); + if (ce->dc == 0) + sc->dc++; + ce->dc++; + sc->wqp++; +} +static __inline void +g_raid5_dc_dec(struct g_raid5_softc *sc, struct g_raid5_cache_entry *ce) +{ + MYKASSERT(ce->dc > 0 && sc->dc > 0 && sc->wqp > 0, ("cannot happen.")); + ce->dc--; + if (ce->dc == 0) + sc->dc--; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 21:01:20 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E34C10658C6; Mon, 2 Feb 2009 21:01:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 693BD8FC08; Mon, 2 Feb 2009 21:01:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12L1Kg8007337; Mon, 2 Feb 2009 21:01:20 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12L1KaM007336; Mon, 2 Feb 2009 21:01:20 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902022101.n12L1KaM007336@svn.freebsd.org> From: Sam Leffler Date: Mon, 2 Feb 2009 21:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188026 - projects/cambria/sys/arm/include X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 21:01:23 -0000 Author: sam Date: Mon Feb 2 21:01:20 2009 New Revision: 188026 URL: http://svn.freebsd.org/changeset/base/188026 Log: force atomic_cmpset_ptr types to match atomic_cmpset_32; this matches what powerpc does Submitted by: stass Modified: projects/cambria/sys/arm/include/atomic.h Modified: projects/cambria/sys/arm/include/atomic.h ============================================================================== --- projects/cambria/sys/arm/include/atomic.h Mon Feb 2 20:51:26 2009 (r188025) +++ projects/cambria/sys/arm/include/atomic.h Mon Feb 2 21:01:20 2009 (r188026) @@ -344,7 +344,8 @@ atomic_readandclear_32(volatile u_int32_ #define atomic_clear_ptr atomic_clear_32 #define atomic_set_ptr atomic_set_32 -#define atomic_cmpset_ptr atomic_cmpset_32 +#define atomic_cmpset_ptr(dst, old, new) \ + atomic_cmpset_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) #define atomic_cmpset_rel_ptr atomic_cmpset_ptr #define atomic_cmpset_acq_ptr atomic_cmpset_ptr #define atomic_store_ptr atomic_store_32 From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 21:01:57 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9578C1065BF6; Mon, 2 Feb 2009 21:01:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 656938FC1E; Mon, 2 Feb 2009 21:01:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12L1vRF007381; Mon, 2 Feb 2009 21:01:57 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12L1vbg007380; Mon, 2 Feb 2009 21:01:57 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902022101.n12L1vbg007380@svn.freebsd.org> From: Sam Leffler Date: Mon, 2 Feb 2009 21:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188027 - projects/cambria/sys/arm/conf X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 21:02:02 -0000 Author: sam Date: Mon Feb 2 21:01:57 2009 New Revision: 188027 URL: http://svn.freebsd.org/changeset/base/188027 Log: add cfi address Modified: projects/cambria/sys/arm/conf/AVILA.hints Modified: projects/cambria/sys/arm/conf/AVILA.hints ============================================================================== --- projects/cambria/sys/arm/conf/AVILA.hints Mon Feb 2 21:01:20 2009 (r188026) +++ projects/cambria/sys/arm/conf/AVILA.hints Mon Feb 2 21:01:57 2009 (r188027) @@ -31,6 +31,7 @@ hint.npe.1.phy=1 # FLASH hint.cfi.0.at="ixp0" +hint.cfi.0.addr=0x50000000 # NPE crypto acceleration hint.ixpcrypto.0.at="ixp0" From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 21:02:24 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F3FA1065C67; Mon, 2 Feb 2009 21:02:24 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED5AF8FC16; Mon, 2 Feb 2009 21:02:23 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12L2N5B007429; Mon, 2 Feb 2009 21:02:23 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12L2NlX007428; Mon, 2 Feb 2009 21:02:23 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902022102.n12L2NlX007428@svn.freebsd.org> From: Sam Leffler Date: Mon, 2 Feb 2009 21:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188028 - projects/cambria/sys/conf X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 21:02:28 -0000 Author: sam Date: Mon Feb 2 21:02:23 2009 New Revision: 188028 URL: http://svn.freebsd.org/changeset/base/188028 Log: add ixp425 cfi bus shim Modified: projects/cambria/sys/conf/files.arm Modified: projects/cambria/sys/conf/files.arm ============================================================================== --- projects/cambria/sys/conf/files.arm Mon Feb 2 21:01:57 2009 (r188027) +++ projects/cambria/sys/conf/files.arm Mon Feb 2 21:02:23 2009 (r188028) @@ -47,6 +47,7 @@ arm/arm/vm_machdep.c standard arm/fpe-arm/armfpe_glue.S optional armfpe arm/fpe-arm/armfpe_init.c optional armfpe arm/fpe-arm/armfpe.S optional armfpe +dev/cfi/cfi_bus_ixp4xx.c optional cfi geom/geom_bsd.c optional geom_bsd geom/geom_bsd_enc.c optional geom_bsd geom/geom_mbr.c optional geom_mbr From owner-svn-src-projects@FreeBSD.ORG Mon Feb 2 22:18:49 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34C81106566B; Mon, 2 Feb 2009 22:18:49 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 230ED8FC12; Mon, 2 Feb 2009 22:18:49 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12MInlb009179; Mon, 2 Feb 2009 22:18:49 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12MIn7Q009178; Mon, 2 Feb 2009 22:18:49 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902022218.n12MIn7Q009178@svn.freebsd.org> From: Sam Leffler Date: Mon, 2 Feb 2009 22:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188035 - projects/cambria/sys/arm/xscale/ixp425 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 22:18:49 -0000 Author: sam Date: Mon Feb 2 22:18:48 2009 New Revision: 188035 URL: http://svn.freebsd.org/changeset/base/188035 Log: add CS0 mapping for flash Modified: projects/cambria/sys/arm/xscale/ixp425/ixp425.c Modified: projects/cambria/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/ixp425.c Mon Feb 2 22:13:32 2009 (r188034) +++ projects/cambria/sys/arm/xscale/ixp425/ixp425.c Mon Feb 2 22:18:48 2009 (r188035) @@ -329,6 +329,8 @@ static const struct { { IXP425_IO_HWBASE, IXP425_IO_SIZE, IXP425_IO_VBASE }, { IXP425_PCI_HWBASE, IXP425_PCI_SIZE, IXP425_PCI_VBASE }, { IXP425_PCI_MEM_HWBASE,IXP425_PCI_MEM_SIZE, IXP425_PCI_MEM_VBASE }, + { IXP425_EXP_BUS_CS0_HWBASE, IXP425_EXP_BUS_CS0_SIZE, + IXP425_EXP_BUS_CS0_VBASE }, /* NB: needed only for uart_cpu_getdev */ { IXP425_UART0_HWBASE, IXP425_REG_SIZE, IXP425_UART0_VBASE }, { IXP425_UART1_HWBASE, IXP425_REG_SIZE, IXP425_UART1_VBASE }, From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 02:51:57 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D464106566C; Tue, 3 Feb 2009 02:51:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AA4A8FC0C; Tue, 3 Feb 2009 02:51:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n132pvva014920; Tue, 3 Feb 2009 02:51:57 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n132pvIZ014919; Tue, 3 Feb 2009 02:51:57 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902030251.n132pvIZ014919@svn.freebsd.org> From: Sam Leffler Date: Tue, 3 Feb 2009 02:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188041 - projects/cambria/sys/dev/cfi X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 02:51:57 -0000 Author: sam Date: Tue Feb 3 02:51:57 2009 New Revision: 188041 URL: http://svn.freebsd.org/changeset/base/188041 Log: o don't set the CS0 timing register, the boot code should do this for us as it maps the flash for it's own purpose o leave a debug printf under bootverbose for debugging Modified: projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c Modified: projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c ============================================================================== --- projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c Tue Feb 3 01:17:34 2009 (r188040) +++ projects/cambria/sys/dev/cfi/cfi_bus_ixp4xx.c Tue Feb 3 02:51:57 2009 (r188041) @@ -46,27 +46,20 @@ __FBSDID("$FreeBSD$"); static int cfi_ixp4xx_probe(device_t dev) { -#define EXP_TIMING_PRESERVE \ - (EXP_TIMING_RSVD | EXP_TIMING_MASK) - struct ixp425_softc *sa = device_get_softc(device_get_parent(dev)); struct cfi_softc *sc = device_get_softc(dev); - - /* setup CS0 per Intel AP-785 */ - EXP_BUS_WRITE_4(sa, EXP_TIMING_CS0_OFFSET, - (EXP_BUS_READ_4(sa, EXP_TIMING_CS0_OFFSET) & EXP_TIMING_PRESERVE) - | EXP_CS_EN - | EXP_SZ_16M - | EXP_WR_EN - | EXP_BYTE_RD16 - | IXP425_EXP_ADDR_T(1) - | IXP425_EXP_SETUP_T(1) - | IXP425_EXP_STROBE_T(4) - | IXP425_EXP_HOLD_T(1) - | IXP425_EXP_RECOVERY_T(1)); - + /* + * NB: we assume the boot loader sets up EXP_TIMING_CS0_OFFSET + * according to the flash on the board. If it does not then it + * can be done here. + */ + if (bootverbose) { + struct ixp425_softc *sa = + device_get_softc(device_get_parent(dev)); + device_printf(dev, "EXP_TIMING_CS0_OFFSET 0x%x\n", + EXP_BUS_READ_4(sa, EXP_TIMING_CS0_OFFSET)); + } sc->sc_width = 2; /* NB: don't probe interface width */ return cfi_probe(dev); -#undef EXP_TIMING_PRESERVE } static device_method_t cfi_ixp4xx_methods[] = { From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 03:46:26 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AF74106566B; Tue, 3 Feb 2009 03:46:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 670588FC0C; Tue, 3 Feb 2009 03:46:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n133kQuD016231; Tue, 3 Feb 2009 03:46:26 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n133kQkR016226; Tue, 3 Feb 2009 03:46:26 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902030346.n133kQkR016226@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 3 Feb 2009 03:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188043 - in projects/tcp_cc_7.x: share/man/man4 sys sys/conf sys/modules sys/modules/cc_cubic sys/netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 03:46:26 -0000 Author: lstewart Date: Tue Feb 3 03:46:26 2009 New Revision: 188043 URL: http://svn.freebsd.org/changeset/base/188043 Log: Merge r187908 from tcp_cc_8.x Added: projects/tcp_cc_7.x/share/man/man4/cc_cubic.4 - copied unchanged from r187908, projects/tcp_cc_8.x/share/man/man4/cc_cubic.4 projects/tcp_cc_7.x/sys/modules/cc_cubic/ - copied from r187908, projects/tcp_cc_8.x/sys/modules/cc_cubic/ projects/tcp_cc_7.x/sys/netinet/cc_cubic.c - copied unchanged from r188041, projects/tcp_cc_8.x/sys/netinet/cc_cubic.c projects/tcp_cc_7.x/sys/netinet/cc_cubic.h - copied unchanged from r187908, projects/tcp_cc_8.x/sys/netinet/cc_cubic.h Modified: projects/tcp_cc_7.x/share/man/man4/ (props changed) projects/tcp_cc_7.x/sys/ (props changed) projects/tcp_cc_7.x/sys/conf/files projects/tcp_cc_7.x/sys/modules/Makefile Copied: projects/tcp_cc_7.x/share/man/man4/cc_cubic.4 (from r187908, projects/tcp_cc_8.x/share/man/man4/cc_cubic.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/tcp_cc_7.x/share/man/man4/cc_cubic.4 Tue Feb 3 03:46:26 2009 (r188043, copy of r187908, projects/tcp_cc_8.x/share/man/man4/cc_cubic.4) @@ -0,0 +1,60 @@ +.\" +.\" Copyright (c) 2009 Lawrence Stewart +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions, and the following disclaimer, +.\" without modification, immediately at the beginning of the file. +.\" 2. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 22, 2009 +.Dt CC_CUBIC 4 +.Os +.Sh NAME +.Nm cc_cubic +.Nd CUBIC Congestion Control Algorithm +.Sh DESCRIPTION +The +.N +congestion control algorithm +.Ss Runtime Configuration +There are currently no tunable variables. +.Sh SEE ALSO +.Xr cc 9 +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module was written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org +while studying at the Centre for Advanced Internet Architectures, +Swinburne University (http://caia.swin.edu.au/). +.Pp +This manual page was written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org . +.Sh ACKNOWLEDGMENTS +Development of this software was made possible in part by a grant from the +Cisco University Research Program Fund at Community Foundation Silicon Valley. Modified: projects/tcp_cc_7.x/sys/conf/files ============================================================================== --- projects/tcp_cc_7.x/sys/conf/files Tue Feb 3 03:43:00 2009 (r188042) +++ projects/tcp_cc_7.x/sys/conf/files Tue Feb 3 03:46:26 2009 (r188043) @@ -1795,6 +1795,7 @@ netinet/ip_options.c optional inet netinet/ip_output.c optional inet netinet/raw_ip.c optional inet netinet/cc.c optional inet +netinet/cc_cubic.c optional inet netinet/cc_htcp.c optional inet netinet/sctp_asconf.c optional inet sctp netinet/sctp_auth.c optional inet sctp Modified: projects/tcp_cc_7.x/sys/modules/Makefile ============================================================================== --- projects/tcp_cc_7.x/sys/modules/Makefile Tue Feb 3 03:43:00 2009 (r188042) +++ projects/tcp_cc_7.x/sys/modules/Makefile Tue Feb 3 03:46:26 2009 (r188043) @@ -47,6 +47,7 @@ SUBDIR= ${_3dfx} \ ${_canbus} \ ${_cardbus} \ ${_cbb} \ + cc_cubic \ cc_htcp \ cd9660 \ cd9660_iconv \ Copied: projects/tcp_cc_7.x/sys/netinet/cc_cubic.c (from r188041, projects/tcp_cc_8.x/sys/netinet/cc_cubic.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/tcp_cc_7.x/sys/netinet/cc_cubic.c Tue Feb 3 03:46:26 2009 (r188043, copy of r188041, projects/tcp_cc_8.x/sys/netinet/cc_cubic.c) @@ -0,0 +1,410 @@ +/*- + * Copyright (c) 2008-2009 Lawrence Stewart + * All rights reserved. + * + * This software was developed while studying at the Centre for Advanced + * Internet Architectures, Swinburne University (http://caia.swin.edu.au), + * made possible in part by a grant from the Cisco University Research Program + * Fund at Community Foundation Silicon Valley. + * + * 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. + * + */ + +/* + * An implementation of the CUBIC congestion algorithm for FreeBSD, + * based on the Internet Draft "draft-rhee-tcpm-cubic-02.txt" by + * Rhee, Xu and Ha. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +/* function prototypes */ +int cubic_init(struct tcpcb *tp); +void cubic_deinit(struct tcpcb *tp); +void cubic_pre_fr(struct tcpcb *tp, struct tcphdr *th); +void cubic_post_fr(struct tcpcb *tp, struct tcphdr *th); +void cubic_ack_received(struct tcpcb *tp, struct tcphdr *th); +void cubic_after_timeout(struct tcpcb *tp); +void cubic_after_idle(struct tcpcb *tp); +void cubic_ssthresh_update(struct tcpcb *tp); +void cubic_cwnd_init(struct tcpcb *tp); +void cubic_record_rtt(struct tcpcb *tp); + +struct cubic { + /* cwnd at the most recent congestion event */ + u_long max_cwnd; + /* cwnd at the previous congestion event */ + u_long prev_max_cwnd; + /* time of last congestion event in ticks */ + u_long t_last_cong; + /* minimum observed rtt in ticks */ + u_long min_rtt_ticks; + /* number of congestion events */ + u_long num_cong_events; +}; + +MALLOC_DECLARE(M_CUBIC); +MALLOC_DEFINE(M_CUBIC, "cubic data", + "Per connection data required for the CUBIC congestion algorithm"); + +/* function pointers for various hooks into the TCP stack */ +struct cc_algo cubic_cc_algo = { + .name = "cubic", + .init = cubic_init, + .deinit = cubic_deinit, + .cwnd_init = cubic_cwnd_init, + .ack_received = cubic_ack_received, + .pre_fr = cubic_pre_fr, + .post_fr = cubic_post_fr, + .after_idle = newreno_after_idle, + .after_timeout = cubic_after_timeout +}; + +void +cubic_cwnd_init(struct tcpcb *tp) +{ + struct cubic *cubic_data = CC_DATA(tp); + + newreno_cwnd_init(tp); + + /* + * Ensure we have a sane initial value for max_cwnd recorded. + * Without this here bad things happen when entries from + * the TCP hostcache get used. + */ + cubic_data->max_cwnd = tp->snd_cwnd; +} + +/* + * Initialise CUBIC on the specified TCP control block. Creates a + * new struct for CUBIC specific data and sticks a pointer to it + * in the control block + */ +int +cubic_init(struct tcpcb *tp) +{ + struct cubic *cubic_data; + + cubic_data = malloc(sizeof(struct cubic), M_CUBIC, M_NOWAIT); + + if (cubic_data == NULL) + return 1; + + /* init some key cubic values with sensible defaults */ + cubic_data->t_last_cong = ticks; + cubic_data->min_rtt_ticks = TCPTV_SRTTBASE; + cubic_data->max_cwnd = 0; + cubic_data->prev_max_cwnd = 0; + cubic_data->num_cong_events = 0; + + CC_DATA(tp) = cubic_data; + + return 0; +} + +/* + * Free the struct used to store CUBIC specific data for the specified + * TCP control block. + */ +void +cubic_deinit(struct tcpcb *tp) +{ + if (CC_DATA(tp)) + free(CC_DATA(tp), M_CUBIC); +} + +/* + * Perform any necesary tasks before we enter fast recovery + */ +void +cubic_pre_fr(struct tcpcb *tp, struct tcphdr *th) +{ + struct cubic *cubic_data = CC_DATA(tp); + + cubic_data->num_cong_events++; + + cubic_ssthresh_update(tp); + + /* + * record the current cwnd at the point of congestion so it can be used + * as the basis for resetting cwnd after exiting fr + */ + cubic_data->max_cwnd = tp->snd_cwnd; + + printf("congestion event started (max_cwnd: %ld)\n", cubic_data->max_cwnd); +} + +/* + * Decrease cwnd in the event of packet loss. + */ +void +cubic_post_fr(struct tcpcb *tp, struct tcphdr *th) +{ + struct cubic *cubic_data = CC_DATA(tp); + + /* + * grab the current time and record it so we know when the most recent + * congestion event was + */ + cubic_data->t_last_cong = ticks; + + /* fast convergence heuristic */ + if (cubic_data->max_cwnd < cubic_data->prev_max_cwnd) { + printf("fast convergence heuristic kicked in! (max_cwnd: %d\t prev_max_cwnd: %d\n", (int)cubic_data->max_cwnd, (int)cubic_data->prev_max_cwnd); + cubic_data->prev_max_cwnd = cubic_data->max_cwnd; + cubic_data->max_cwnd = (cubic_data->max_cwnd * CUBIC_FC_FACTOR) + >> CUBIC_SHIFT; + } + else + cubic_data->prev_max_cwnd = cubic_data->max_cwnd; + + /* + * if inflight data is less than ssthresh, set cwnd conservatively + * to avoid a burst of data, as suggested in the NewReno RFC. + * Otherwise, use the CUBIC method. + */ + if (th && SEQ_GT(th->th_ack + tp->snd_ssthresh, tp->snd_max)) + tp->snd_cwnd = tp->snd_max - th->th_ack + tp->t_maxseg; + else { + /* update cwnd based on beta and adjusted max_cwnd */ + tp->snd_cwnd = max(1,((CUBIC_BETA * cubic_data->max_cwnd) + >> CUBIC_SHIFT)); + printf("cubic_post_fr - cwnd: %ld\tmax_cwnd: %ld\n", tp->snd_cwnd, cubic_data->max_cwnd); + } + + printf("congestion event over\n"); +} + +void +cubic_record_rtt(struct tcpcb *tp) +{ + struct cubic *cubic_data = CC_DATA(tp); + int t_srtt_ticks = tp->t_srtt / TCP_RTT_SCALE; + + /* XXX: Should there be some hysteresis for minrtt? */ + + /* + * record the current SRTT as our minrtt if it's the smallest we've + * seen or minrtt is currently equal to its initialised value. + * Ignore srtt until a min number of samples have been taken + */ + if ((t_srtt_ticks < cubic_data->min_rtt_ticks || + cubic_data->min_rtt_ticks == TCPTV_SRTTBASE) && + (tp->t_rttupdated >= CUBIC_MIN_RTT_SAMPLES)) + cubic_data->min_rtt_ticks = max(1, t_srtt_ticks); +} + +/* + * Increase cwnd on the arrival of an ACK. + */ +void +cubic_ack_received(struct tcpcb *tp, struct tcphdr *th) +{ + struct cubic *cubic_data = CC_DATA(tp); + u_long w_newreno, w_cubic_next, ticks_since_cong; + static u_long last_print_ticks = 0; + int print = 0; + + cubic_record_rtt(tp); + + if ((tp->snd_cwnd < tp->snd_ssthresh) || + (tp->snd_ssthresh == TCP_MAXWIN << TCP_MAX_WINSHIFT) || + (cubic_data->min_rtt_ticks == TCPTV_SRTTBASE)) + newreno_ack_received(tp, th); + else { + /* num ticks since last congestion */ + ticks_since_cong = ticks - cubic_data->t_last_cong; + + if ((ticks - last_print_ticks) >= (cubic_data->min_rtt_ticks / 2)) { + + print = 1; + last_print_ticks = ticks; + } + + if (print) + printf("rtt_ticks: %ld\tticks_since_cong: %ld\n", cubic_data->min_rtt_ticks, ticks_since_cong); + + w_newreno = reno_cwnd( ticks_since_cong, + cubic_data->min_rtt_ticks, + cubic_data->max_cwnd, + tp->t_maxseg + ); + + if (print) + printf("reno_cwnd(%ld,%ld,%ld,%d): %ld\n", ticks_since_cong, cubic_data->min_rtt_ticks, cubic_data->max_cwnd, tp->t_maxseg, w_newreno); + + //w_cubic = cubic_cwnd(ticks_since_cong, cubic_data->max_cwnd, tp->t_maxseg); + //printf("cubic_cwnd(%ld,%ld,%d): %ld (w_cubic)\n", ticks_since_cong, cubic_data->max_cwnd, tp->t_maxseg, w_cubic); + + w_cubic_next = cubic_cwnd( ticks_since_cong + + cubic_data->min_rtt_ticks, + cubic_data->max_cwnd, + tp->t_maxseg + ); + + if (print) + printf("cubic_cwnd(%ld,%ld,%d): %ld (w_cubic_next)\n", ticks_since_cong + cubic_data->min_rtt_ticks, cubic_data->max_cwnd, tp->t_maxseg, w_cubic_next); + + if (print) + printf("pre\tmax_cwnd: %ld\tsnd_cwnd: %ld\tw_newreno: %ld\tw_cubic_next: %ld\n", cubic_data->max_cwnd, tp->snd_cwnd, w_newreno, w_cubic_next); + + + if (w_cubic_next < w_newreno) { + /* we are in TCP-friendly region, follow reno cwnd growth */ + tp->snd_cwnd = w_newreno; + + } else if (tp->snd_cwnd < w_cubic_next) { + /* else we are in the concave or convex growth regions */ + if (print) + printf("incr: %lu\n", (w_cubic_next * tp->t_maxseg) / tp->snd_cwnd); + //tp->snd_cwnd += max(1, (w_cubic_next - w_cubic) / tp->snd_cwnd); + //printf("incr: %d\n", max(1, (w_cubic_next - tp->snd_cwnd) / tp->t_maxseg)); + /* XXX: Test under what conditions the following will truncate */ + tp->snd_cwnd += (u_long)(((uint64_t)(w_cubic_next * tp->t_maxseg)) / tp->snd_cwnd); + } + + /* + * if we're not in slow start and we're probing for a new cwnd limit + * at the start of a connection (happens when hostcache has a relevant entry), + * keep updating our current estimate of the max_cwnd + */ + if (cubic_data->num_cong_events == 0 && + cubic_data->max_cwnd < tp->snd_cwnd) + cubic_data->max_cwnd = tp->snd_cwnd; + + if (print) + printf("post\tmax_cwnd: %ld\tsnd_cwnd: %ld\n\n", cubic_data->max_cwnd, tp->snd_cwnd); + } +} + +/* + * Reset the cwnd after a retransmission timeout + */ +void +cubic_after_timeout(struct tcpcb *tp) +{ + struct cubic *cubic_data = CC_DATA(tp); + + cubic_ssthresh_update(tp); + + /* + * grab the current time and record it so we know when the most recent + * congestion event was. Only record it when the timeout has fired more + * than once, as there is a reasonable chance the first one is a false alarm + * and may not indicate congestion. + */ + if (tp->t_rxtshift >= 2) + cubic_data->t_last_cong = ticks; + + newreno_after_timeout(tp); +} + +/* + * Update the ssthresh in the event of congestion. + */ +void +cubic_ssthresh_update(struct tcpcb *tp) +{ + /* + * on the first congestion event, set ssthresh to cwnd * 0.5, on + * subsequent congestion events, set it to cwnd * beta. + */ + if (tp->snd_ssthresh == (TCP_MAXWIN << TCP_MAX_WINSHIFT)) + tp->snd_ssthresh = tp->snd_cwnd >> 1; + else + tp->snd_ssthresh = (tp->snd_cwnd * CUBIC_BETA) >> CUBIC_SHIFT; +} + +/* + * Init the HTCP module when it is first loaded into the kernel. + * Calls the kernel function for registering a new congestion control + * algorithm + */ +static int +init_module(void) +{ + cc_register_algorithm(&cubic_cc_algo); + return 0; +} + +/* + * Called when the module is unloaded from the kernel. + */ +static int +deinit_module(void) +{ + cc_deregister_algorithm(&cubic_cc_algo); + return 0; +} + +/* + * Tell the kernel which functions to use to init and de-init the module. + */ +static int +cubic_load_handler(module_t mod, int what, void *arg) +{ + switch(what) { + case MOD_LOAD: + return init_module(); + break; + + case MOD_QUIESCE: + case MOD_SHUTDOWN: + return deinit_module(); + break; + + case MOD_UNLOAD: + return 0; + break; + + default: + return EINVAL; + break; + } +} + +/* a struct that holds basic data on the module */ +static moduledata_t cubic_mod = +{ + "cubic", /* module's name */ + cubic_load_handler, /* execution entry point for the module */ + NULL +}; + +DECLARE_MODULE(cubic, cubic_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); Copied: projects/tcp_cc_7.x/sys/netinet/cc_cubic.h (from r187908, projects/tcp_cc_8.x/sys/netinet/cc_cubic.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/tcp_cc_7.x/sys/netinet/cc_cubic.h Tue Feb 3 03:46:26 2009 (r188043, copy of r187908, projects/tcp_cc_8.x/sys/netinet/cc_cubic.h) @@ -0,0 +1,200 @@ +/*- + * Copyright (c) 2008-2009 Lawrence Stewart + * All rights reserved. + * + * This software was developed while studying at the Centre for Advanced + * Internet Architectures, Swinburne University (http://caia.swin.edu.au), + * made possible in part by a grant from the Cisco University Research Program + * Fund at Community Foundation Silicon Valley. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _NETINET_CC_CUBIC_H_ +#define _NETINET_CC_CUBIC_H_ + +/* needed for rdtsc() (performance analysis) */ +#include + +/* Number of bits of precision for fixed point math calcs */ +#define CUBIC_SHIFT 8 + +#define CUBIC_SHIFT_4 32 + +/* 0.5 with a shift << 8 */ +#define RENO_BETA 128 + +/* ~0.8 with a shift << 8 */ +#define CUBIC_BETA 204 + +/* ~0.2 with a shift << 8 */ +#define ONE_MINUS_CUBIC_BETA 51 + +/* ~0.4 with a shift << 8 */ +#define CUBIC_C_FACTOR 102 + +/* CUBIC fast convergence factor ~0.9 with a shift << 8 */ +#define CUBIC_FC_FACTOR 230 + +/* Don't trust s_rtt until this many rtt samples have been taken */ +#define CUBIC_MIN_RTT_SAMPLES 8 + +/* Userspace only bits */ +#ifndef _KERNEL + +extern int hz; + +inline float +theoretical_cubic_k(double wmax_pkts) +{ + double C = 0.4; + return pow((wmax_pkts*0.2)/C, (1.0/3.0)) * pow(2, CUBIC_SHIFT); +} + +inline u_long +theoretical_cubic_cwnd(u_long ticks_since_cong, u_long wmax, u_int smss) +{ + double C = 0.4; + double wmax_pkts = wmax/(double)smss; + return smss * (wmax_pkts + + (C * pow(ticks_since_cong/(double)hz - + theoretical_cubic_k(wmax_pkts) / pow(2, CUBIC_SHIFT), 3.0))); +} + +inline u_long +theoretical_reno_cwnd( u_long ticks_since_cong, u_long rtt_ticks, u_long wmax, + u_int smss) +{ + return (wmax * 0.5) + ((ticks_since_cong/(float)rtt_ticks) * smss); +} + +#endif /* _KERNEL*/ + +/* + * calc K (adapted from Apple Computer Technical Report #KT-32) + */ +static __inline +long cubic_k(u_long wmax_pkts) +{ + register uint16_t p = 0; + register long s = 0, K = 0; + + /* (wmax * beta)/C with CUBIC_SHIFT worth of precision */ + s = ((wmax_pkts * ONE_MINUS_CUBIC_BETA) << CUBIC_SHIFT) / + CUBIC_C_FACTOR; + + //printf("s: %d\n", s); + + /* + * rebase s such that it is between 1 and 1/8 with + * a shift of CUBIC_SHIFT + */ + while (s >= 256) { + s >>= 3; /* divide by 8 */ + p++; + } + + /* s is now between 1/8 and 1 (shifted by CUBIC_SHIFT) */ + + //printf("rebased s: %d\n", s); + + /* + * Some magic constants taken from the Apple TR with appropriate shifts + * 275 == 1.072302 << CUBIC_SHIFT (8) + * 98 == 0.3812513 << CUBIC_SHIFT (8) + * 120 == 0.46946116 << CUBIC_SHIFT (8) + */ + K = (((s * 275) >> CUBIC_SHIFT) + 98) - + (((s * s * 120) >> CUBIC_SHIFT) >> CUBIC_SHIFT); + + /* + * multiply by 2^p to undo the "divide by 8" transform from the + * previous while loop + */ + return (K <<= p); +} + +/* + * Acknowledgments: Kip Macy + */ +static __inline +u_long cubic_cwnd(u_long ticks_since_cong, u_long wmax, u_int smss) +{ + long K; + int64_t cwnd; + //int64_t start, end; + + //start = rdtsc(); + + K = cubic_k(wmax / smss); + + //printf("K: %d\n", K); + + /* + * we now have K in fixed point form with + * CUBIC_SHIFT worth of precision + */ + + /* t - K, with CUBIC_SHIFT worth of precision */ + cwnd = ((int64_t)(ticks_since_cong << CUBIC_SHIFT) - (K * hz)) / hz; + + //printf("t-k: %lld\n", cwnd); + + /* (t - K)^3, with CUBIC_SHIFT^3 worth of precision */ + cwnd *= (cwnd * cwnd); + + //printf("(t-k)^3: %lld\n", cwnd); + + /* + * C(t - K)^3 + wmax + * The down shift by CUBIC_SHIFT_4 is because cwnd has 4 lots of + * CUBIC_SHIFT included in the value. 3 from the cubing of cwnd above, + * and an extra from multiplying through by CUBIC_C_FACTOR + */ + cwnd = ((cwnd * CUBIC_C_FACTOR * smss) >> CUBIC_SHIFT_4) + wmax; + + //printf("final cwnd: %lld\n", cwnd); + + //end = rdtsc(); + + //printf("%lld TSC ticks\n", end - start); + + return ((u_long)cwnd); +} + +static __inline +u_long reno_cwnd(u_long ticks_since_cong, u_long rtt_ticks, u_long wmax, + u_int smss) +{ + /* + * Simplified form of equation 4 from I-D + * For reno, beta = 0.5, therefore W_tcp(t) = wmax*0.5 + t/RTT + * Equation 4 deals with cwnd/wmax in pkts, so because our cwnd is + * in bytes, we have to multiply by smss + */ + return (((wmax * RENO_BETA) + (((ticks_since_cong * smss) + << CUBIC_SHIFT) / rtt_ticks)) >> CUBIC_SHIFT); +} + +#endif /* _NETINET_CC_CUBIC_H_ */ From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 04:35:32 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96B1B106566C; Tue, 3 Feb 2009 04:35:32 +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 6DA798FC1D; Tue, 3 Feb 2009 04:35:32 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n134ZWwX017204; Tue, 3 Feb 2009 04:35:32 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n134ZWE4017203; Tue, 3 Feb 2009 04:35:32 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902030435.n134ZWE4017203@svn.freebsd.org> From: Kip Macy Date: Tue, 3 Feb 2009 04:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188045 - projects/releng_7_xen/sys/i386/xen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 04:35:33 -0000 Author: kmacy Date: Tue Feb 3 04:35:31 2009 New Revision: 188045 URL: http://svn.freebsd.org/changeset/base/188045 Log: IFC 188042 - page faults and other traps need to have interrupts disabled on entry Modified: projects/releng_7_xen/sys/i386/xen/xen_machdep.c Modified: projects/releng_7_xen/sys/i386/xen/xen_machdep.c ============================================================================== --- projects/releng_7_xen/sys/i386/xen/xen_machdep.c Tue Feb 3 04:28:45 2009 (r188044) +++ projects/releng_7_xen/sys/i386/xen/xen_machdep.c Tue Feb 3 04:35:31 2009 (r188045) @@ -1098,13 +1098,13 @@ initvalues(start_info_t *startinfo) trap_info_t trap_table[] = { { 0, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(div)}, - { 1, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(dbg)}, - { 3, 3, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(bpt)}, + { 1, 0|4, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(dbg)}, + { 3, 3|4, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(bpt)}, { 4, 3, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(ofl)}, /* This is UPL on Linux and KPL on BSD */ { 5, 3, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(bnd)}, { 6, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(ill)}, - { 7, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(dna)}, + { 7, 0|4, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(dna)}, /* * { 8, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(XXX)}, * no handler for double fault @@ -1114,7 +1114,7 @@ trap_info_t trap_table[] = { {11, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(missing)}, {12, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(stk)}, {13, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(prot)}, - {14, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(page)}, + {14, 0|4, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(page)}, {15, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(rsvd)}, {16, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(fpu)}, {17, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(align)}, From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 04:36:24 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BC4E106566B; Tue, 3 Feb 2009 04:36:24 +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 21CDC8FC13; Tue, 3 Feb 2009 04:36:24 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n134aOe7017260; Tue, 3 Feb 2009 04:36:24 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n134aO1F017259; Tue, 3 Feb 2009 04:36:24 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902030436.n134aO1F017259@svn.freebsd.org> From: Kip Macy Date: Tue, 3 Feb 2009 04:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188046 - projects/release_6_3_xen/sys/i386/xen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 04:36:24 -0000 Author: kmacy Date: Tue Feb 3 04:36:23 2009 New Revision: 188046 URL: http://svn.freebsd.org/changeset/base/188046 Log: IFC 188042 - page faults and other traps need to have interrupts disabled on entry Modified: projects/release_6_3_xen/sys/i386/xen/xen_machdep.c Modified: projects/release_6_3_xen/sys/i386/xen/xen_machdep.c ============================================================================== --- projects/release_6_3_xen/sys/i386/xen/xen_machdep.c Tue Feb 3 04:35:31 2009 (r188045) +++ projects/release_6_3_xen/sys/i386/xen/xen_machdep.c Tue Feb 3 04:36:23 2009 (r188046) @@ -1107,13 +1107,13 @@ initvalues(start_info_t *startinfo) trap_info_t trap_table[] = { { 0, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(div)}, - { 1, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(dbg)}, - { 3, 3, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(bpt)}, + { 1, 0|4, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(dbg)}, + { 3, 3|4, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(bpt)}, { 4, 3, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(ofl)}, /* This is UPL on Linux and KPL on BSD */ { 5, 3, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(bnd)}, { 6, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(ill)}, - { 7, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(dna)}, + { 7, 0|4, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(dna)}, /* * { 8, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(XXX)}, * no handler for double fault @@ -1123,7 +1123,7 @@ trap_info_t trap_table[] = { {11, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(missing)}, {12, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(stk)}, {13, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(prot)}, - {14, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(page)}, + {14, 0|4, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(page)}, {15, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(rsvd)}, {16, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(fpu)}, {17, 0, GSEL(GCODE_SEL, SEL_KPL), (unsigned long) &IDTVEC(align)}, From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 04:37:46 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19EBF106567C; Tue, 3 Feb 2009 04:37:46 +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 095808FC16; Tue, 3 Feb 2009 04:37:46 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n134bj8V017321; Tue, 3 Feb 2009 04:37:45 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n134bjMr017320; Tue, 3 Feb 2009 04:37:45 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902030437.n134bjMr017320@svn.freebsd.org> From: Kip Macy Date: Tue, 3 Feb 2009 04:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188047 - projects/releng_7_xen/sys/dev/xen/netfront X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 04:37:46 -0000 Author: kmacy Date: Tue Feb 3 04:37:45 2009 New Revision: 188047 URL: http://svn.freebsd.org/changeset/base/188047 Log: IFC 188036 break out of loop if we run out of mbufs Modified: projects/releng_7_xen/sys/dev/xen/netfront/netfront.c Modified: projects/releng_7_xen/sys/dev/xen/netfront/netfront.c ============================================================================== --- projects/releng_7_xen/sys/dev/xen/netfront/netfront.c Tue Feb 3 04:36:23 2009 (r188046) +++ projects/releng_7_xen/sys/dev/xen/netfront/netfront.c Tue Feb 3 04:37:45 2009 (r188047) @@ -1235,11 +1235,12 @@ xennet_get_responses(struct netfront_inf gnttab_release_grant_reference(&np->gref_rx_head, ref); next: - if (m != NULL) { - m->m_len = rx->status; - m->m_data += rx->offset; - m0->m_pkthdr.len += rx->status; - } + if (m == NULL) + break; + + m->m_len = rx->status; + m->m_data += rx->offset; + m0->m_pkthdr.len += rx->status; if (!(rx->flags & NETRXF_more_data)) break; From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 06:08:58 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D90C7106564A; Tue, 3 Feb 2009 06:08:58 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC0B28FC1A; Tue, 3 Feb 2009 06:08:58 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1368wio019038; Tue, 3 Feb 2009 06:08:58 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1368wpv019030; Tue, 3 Feb 2009 06:08:58 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902030608.n1368wpv019030@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 3 Feb 2009 06:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188049 - projects/tcp_cc_8.x/sys/netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 06:08:59 -0000 Author: lstewart Date: Tue Feb 3 06:08:58 2009 New Revision: 188049 URL: http://svn.freebsd.org/changeset/base/188049 Log: More header related cleanup. Modified: projects/tcp_cc_8.x/sys/netinet/cc.c projects/tcp_cc_8.x/sys/netinet/cc.h projects/tcp_cc_8.x/sys/netinet/cc_cubic.c projects/tcp_cc_8.x/sys/netinet/cc_htcp.c projects/tcp_cc_8.x/sys/netinet/tcp_output.c projects/tcp_cc_8.x/sys/netinet/tcp_subr.c projects/tcp_cc_8.x/sys/netinet/tcp_timer.c projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c Modified: projects/tcp_cc_8.x/sys/netinet/cc.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc.c Tue Feb 3 05:50:36 2009 (r188048) +++ projects/tcp_cc_8.x/sys/netinet/cc.c Tue Feb 3 06:08:58 2009 (r188049) @@ -35,15 +35,17 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include -#include -#include #include -#include +#include +#include +#include #include #include #include +#include #include #include Modified: projects/tcp_cc_8.x/sys/netinet/cc.h ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc.h Tue Feb 3 05:50:36 2009 (r188048) +++ projects/tcp_cc_8.x/sys/netinet/cc.h Tue Feb 3 06:08:58 2009 (r188049) @@ -34,14 +34,9 @@ #ifndef _NETINET_CC_H_ #define _NETINET_CC_H_ -#include -#include - +/* Needed for TCP_CA_NAME_MAX define which lives in tcp.h for compat reasons */ #include -/* Forward declaration of required structs. */ -struct tcpcb; - /* * Global CC vars */ Modified: projects/tcp_cc_8.x/sys/netinet/cc_cubic.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Tue Feb 3 05:50:36 2009 (r188048) +++ projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Tue Feb 3 06:08:58 2009 (r188049) @@ -44,12 +44,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include +#include #include #include #include Modified: projects/tcp_cc_8.x/sys/netinet/cc_htcp.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc_htcp.c Tue Feb 3 05:50:36 2009 (r188048) +++ projects/tcp_cc_8.x/sys/netinet/cc_htcp.c Tue Feb 3 06:08:58 2009 (r188049) @@ -44,11 +44,13 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include +#include #include #include +#include +#include #include #include Modified: projects/tcp_cc_8.x/sys/netinet/tcp_output.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_output.c Tue Feb 3 05:50:36 2009 (r188048) +++ projects/tcp_cc_8.x/sys/netinet/tcp_output.c Tue Feb 3 06:08:58 2009 (r188049) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -65,14 +66,12 @@ __FBSDID("$FreeBSD$"); #include #include #endif -#include #define TCPOUTFLAGS #include #include #include #include #include -#include #ifdef TCPDEBUG #include #endif Modified: projects/tcp_cc_8.x/sys/netinet/tcp_subr.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_subr.c Tue Feb 3 05:50:36 2009 (r188048) +++ projects/tcp_cc_8.x/sys/netinet/tcp_subr.c Tue Feb 3 06:08:58 2009 (r188049) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -82,14 +83,12 @@ __FBSDID("$FreeBSD$"); #include #endif #include -#include #include #include #include #include #include #include -#include #ifdef INET6 #include #endif Modified: projects/tcp_cc_8.x/sys/netinet/tcp_timer.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_timer.c Tue Feb 3 05:50:36 2009 (r188048) +++ projects/tcp_cc_8.x/sys/netinet/tcp_timer.c Tue Feb 3 06:08:58 2009 (r188049) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -57,12 +58,10 @@ __FBSDID("$FreeBSD$"); #include #endif #include -#include #include #include #include #include -#include #ifdef TCPDEBUG #include #endif Modified: projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c Tue Feb 3 05:50:36 2009 (r188048) +++ projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c Tue Feb 3 06:08:58 2009 (r188049) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #ifdef INET6 @@ -77,13 +78,11 @@ __FBSDID("$FreeBSD$"); #include #include #endif -#include #include #include #include #include #include -#include #ifdef TCPDEBUG #include #endif From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 06:14:47 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3DCE106564A; Tue, 3 Feb 2009 06:14:47 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B27818FC13; Tue, 3 Feb 2009 06:14:47 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n136Elpg019296; Tue, 3 Feb 2009 06:14:47 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n136ElmN019295; Tue, 3 Feb 2009 06:14:47 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902030614.n136ElmN019295@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 3 Feb 2009 06:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188051 - projects/tcp_cc_8.x/sys/netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 06:14:48 -0000 Author: lstewart Date: Tue Feb 3 06:14:47 2009 New Revision: 188051 URL: http://svn.freebsd.org/changeset/base/188051 Log: Oops, forgot to remove this one. Modified: projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Modified: projects/tcp_cc_8.x/sys/netinet/cc_cubic.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Tue Feb 3 06:12:13 2009 (r188050) +++ projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Tue Feb 3 06:14:47 2009 (r188051) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 06:52:30 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10334106566C; Tue, 3 Feb 2009 06:52:30 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F26EA8FC08; Tue, 3 Feb 2009 06:52:29 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n136qT0g020007; Tue, 3 Feb 2009 06:52:29 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n136qTZU020006; Tue, 3 Feb 2009 06:52:29 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902030652.n136qTZU020006@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 3 Feb 2009 06:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188052 - projects/tcp_cc_8.x/sys/netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 06:52:30 -0000 Author: lstewart Date: Tue Feb 3 06:52:29 2009 New Revision: 188052 URL: http://svn.freebsd.org/changeset/base/188052 Log: Another style nit. Modified: projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Modified: projects/tcp_cc_8.x/sys/netinet/cc_cubic.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Tue Feb 3 06:14:47 2009 (r188051) +++ projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Tue Feb 3 06:52:29 2009 (r188052) @@ -41,13 +41,13 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include #include #include #include +#include #include #include From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 07:04:10 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF0A0106564A; Tue, 3 Feb 2009 07:04:10 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C24238FC0A; Tue, 3 Feb 2009 07:04:10 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1374ATu020291; Tue, 3 Feb 2009 07:04:10 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1374Ach020283; Tue, 3 Feb 2009 07:04:10 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902030704.n1374Ach020283@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 3 Feb 2009 07:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188053 - in projects/tcp_cc_7.x/sys: . netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 07:04:11 -0000 Author: lstewart Date: Tue Feb 3 07:04:10 2009 New Revision: 188053 URL: http://svn.freebsd.org/changeset/base/188053 Log: Merge r188049,188051,188052 from tcp_cc_8.x (with minor tweaks). Modified: projects/tcp_cc_7.x/sys/ (props changed) projects/tcp_cc_7.x/sys/netinet/cc.c projects/tcp_cc_7.x/sys/netinet/cc.h projects/tcp_cc_7.x/sys/netinet/cc_cubic.c projects/tcp_cc_7.x/sys/netinet/cc_htcp.c projects/tcp_cc_7.x/sys/netinet/tcp_output.c projects/tcp_cc_7.x/sys/netinet/tcp_subr.c projects/tcp_cc_7.x/sys/netinet/tcp_timer.c projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c Modified: projects/tcp_cc_7.x/sys/netinet/cc.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/cc.c Tue Feb 3 06:52:29 2009 (r188052) +++ projects/tcp_cc_7.x/sys/netinet/cc.c Tue Feb 3 07:04:10 2009 (r188053) @@ -35,24 +35,22 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include -#include +#include #include +#include +#include #include #include #include -#include -#include -#include +#include #include #include -#include #include -#include -#include - +#include /* list of available cc algorithms on the current system */ struct cc_head cc_list = STAILQ_HEAD_INITIALIZER(cc_list); Modified: projects/tcp_cc_7.x/sys/netinet/cc.h ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/cc.h Tue Feb 3 06:52:29 2009 (r188052) +++ projects/tcp_cc_7.x/sys/netinet/cc.h Tue Feb 3 07:04:10 2009 (r188053) @@ -34,8 +34,8 @@ #ifndef _NETINET_CC_H_ #define _NETINET_CC_H_ -#include -#include +/* Needed for TCP_CA_NAME_MAX define which lives in tcp.h for compat reasons */ +#include /* * Global CC vars Modified: projects/tcp_cc_7.x/sys/netinet/cc_cubic.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/cc_cubic.c Tue Feb 3 06:52:29 2009 (r188052) +++ projects/tcp_cc_7.x/sys/netinet/cc_cubic.c Tue Feb 3 07:04:10 2009 (r188053) @@ -41,11 +41,13 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include +#include #include #include +#include +#include #include #include Modified: projects/tcp_cc_7.x/sys/netinet/cc_htcp.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/cc_htcp.c Tue Feb 3 06:52:29 2009 (r188052) +++ projects/tcp_cc_7.x/sys/netinet/cc_htcp.c Tue Feb 3 07:04:10 2009 (r188053) @@ -44,14 +44,18 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include -#include +#include +#include #include +#include +#include + +#include #include #include -#include +#include /* useful defines */ #define MODNAME "HTCP congestion control" Modified: projects/tcp_cc_7.x/sys/netinet/tcp_output.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/tcp_output.c Tue Feb 3 06:52:29 2009 (r188052) +++ projects/tcp_cc_7.x/sys/netinet/tcp_output.c Tue Feb 3 07:04:10 2009 (r188053) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -63,14 +64,12 @@ __FBSDID("$FreeBSD$"); #include #include #endif -#include #define TCPOUTFLAGS #include #include #include #include #include -#include #ifdef TCPDEBUG #include #endif Modified: projects/tcp_cc_7.x/sys/netinet/tcp_subr.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/tcp_subr.c Tue Feb 3 06:52:29 2009 (r188052) +++ projects/tcp_cc_7.x/sys/netinet/tcp_subr.c Tue Feb 3 07:04:10 2009 (r188053) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -81,14 +82,12 @@ __FBSDID("$FreeBSD$"); #include #endif #include -#include #include #include #include #include #include #include -#include #ifdef INET6 #include #endif Modified: projects/tcp_cc_7.x/sys/netinet/tcp_timer.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/tcp_timer.c Tue Feb 3 06:52:29 2009 (r188052) +++ projects/tcp_cc_7.x/sys/netinet/tcp_timer.c Tue Feb 3 07:04:10 2009 (r188053) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -55,12 +56,10 @@ __FBSDID("$FreeBSD$"); #include #endif #include -#include #include #include #include #include -#include #ifdef TCPDEBUG #include #endif Modified: projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c Tue Feb 3 06:52:29 2009 (r188052) +++ projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c Tue Feb 3 07:04:10 2009 (r188053) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #ifdef INET6 @@ -76,13 +77,11 @@ __FBSDID("$FreeBSD$"); #include #include #endif -#include #include #include #include #include #include -#include #ifdef TCPDEBUG #include #endif From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 08:25:26 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D5B106566C; Tue, 3 Feb 2009 08:25:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 713E58FC12; Tue, 3 Feb 2009 08:25:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n138PQMs022268; Tue, 3 Feb 2009 08:25:26 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n138PPwo022257; Tue, 3 Feb 2009 08:25:25 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902030825.n138PPwo022257@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 3 Feb 2009 08:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188064 - in projects/tcp_cc_7.x: . bin bin/chio bin/cp bin/dd bin/ln bin/sh bin/test contrib contrib/bind9 contrib/bind9/bin/check contrib/bind9/bin/dig contrib/bind9/bin/dnssec contri... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 08:25:26 -0000 Author: lstewart Date: Tue Feb 3 08:25:24 2009 New Revision: 188064 URL: http://svn.freebsd.org/changeset/base/188064 Log: Merge r184067:188054 from stable/7 Added: projects/tcp_cc_7.x/contrib/bind9/aclocal.m4 - copied unchanged from r188054, stable/7/contrib/bind9/aclocal.m4 projects/tcp_cc_7.x/contrib/bind9/bin/nsupdate/nsupdate.1 - copied unchanged from r188054, stable/7/contrib/bind9/bin/nsupdate/nsupdate.1 projects/tcp_cc_7.x/contrib/bind9/config.h.in - copied unchanged from r188054, stable/7/contrib/bind9/config.h.in projects/tcp_cc_7.x/contrib/bind9/doc/misc/sort-options.pl - copied unchanged from r188054, stable/7/contrib/bind9/doc/misc/sort-options.pl projects/tcp_cc_7.x/contrib/bind9/doc/rfc/rfc4648.txt - copied unchanged from r188054, stable/7/contrib/bind9/doc/rfc/rfc4648.txt projects/tcp_cc_7.x/contrib/bind9/doc/rfc/rfc4701.txt - copied unchanged from r188054, stable/7/contrib/bind9/doc/rfc/rfc4701.txt projects/tcp_cc_7.x/contrib/bind9/doc/rfc/rfc5155.txt - copied unchanged from r188054, stable/7/contrib/bind9/doc/rfc/rfc5155.txt projects/tcp_cc_7.x/contrib/bind9/lib/bind/aclocal.m4 - copied unchanged from r188054, stable/7/contrib/bind9/lib/bind/aclocal.m4 projects/tcp_cc_7.x/contrib/bind9/lib/bind/config.h.in - copied unchanged from r188054, stable/7/contrib/bind9/lib/bind/config.h.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/include/isc/platform.h.in - copied unchanged from r188054, stable/7/contrib/bind9/lib/bind/include/isc/platform.h.in projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/portset.h - copied unchanged from r188054, stable/7/contrib/bind9/lib/isc/include/isc/portset.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/portset.c - copied unchanged from r188054, stable/7/contrib/bind9/lib/isc/portset.c projects/tcp_cc_7.x/contrib/traceroute/as.c - copied unchanged from r188054, stable/7/contrib/traceroute/as.c projects/tcp_cc_7.x/contrib/traceroute/as.h - copied unchanged from r188054, stable/7/contrib/traceroute/as.h projects/tcp_cc_7.x/lib/libarchive/test/test_acl_freebsd.c - copied unchanged from r188054, stable/7/lib/libarchive/test/test_acl_freebsd.c projects/tcp_cc_7.x/lib/libc/include/isc/platform.h - copied unchanged from r188054, stable/7/lib/libc/include/isc/platform.h projects/tcp_cc_7.x/lib/libc/string/ffsll.c - copied unchanged from r188054, stable/7/lib/libc/string/ffsll.c projects/tcp_cc_7.x/lib/libc/string/flsll.c - copied unchanged from r188054, stable/7/lib/libc/string/flsll.c projects/tcp_cc_7.x/lib/libc/string/strndup.c - copied unchanged from r188054, stable/7/lib/libc/string/strndup.c projects/tcp_cc_7.x/lib/libutil/kinfo_getfile.c - copied unchanged from r188054, stable/7/lib/libutil/kinfo_getfile.c projects/tcp_cc_7.x/lib/libutil/kinfo_getvmmap.c - copied unchanged from r188054, stable/7/lib/libutil/kinfo_getvmmap.c projects/tcp_cc_7.x/share/man/man4/ae.4 - copied unchanged from r188054, stable/7/share/man/man4/ae.4 projects/tcp_cc_7.x/share/man/man4/ale.4 - copied unchanged from r188054, stable/7/share/man/man4/ale.4 projects/tcp_cc_7.x/share/man/man4/cpuctl.4 - copied unchanged from r188054, stable/7/share/man/man4/cpuctl.4 projects/tcp_cc_7.x/share/man/man4/igb.4 - copied unchanged from r188054, stable/7/share/man/man4/igb.4 projects/tcp_cc_7.x/share/man/man4/sdhci.4 - copied unchanged from r188054, stable/7/share/man/man4/sdhci.4 projects/tcp_cc_7.x/share/man/man5/nullfs.5 - copied unchanged from r188054, stable/7/share/man/man5/nullfs.5 projects/tcp_cc_7.x/sys/dev/ae/ - copied from r188054, stable/7/sys/dev/ae/ projects/tcp_cc_7.x/sys/dev/ale/ - copied from r188054, stable/7/sys/dev/ale/ projects/tcp_cc_7.x/sys/dev/ath/ath_hal/ (props changed) - copied from r188054, stable/7/sys/dev/ath/ath_hal/ projects/tcp_cc_7.x/sys/dev/cpuctl/ - copied from r188054, stable/7/sys/dev/cpuctl/ projects/tcp_cc_7.x/sys/dev/drm/drm_internal.h - copied unchanged from r188054, stable/7/sys/dev/drm/drm_internal.h projects/tcp_cc_7.x/sys/dev/drm/i915_suspend.c - copied unchanged from r188054, stable/7/sys/dev/drm/i915_suspend.c projects/tcp_cc_7.x/sys/dev/drm/radeon_microcode.h - copied unchanged from r188054, stable/7/sys/dev/drm/radeon_microcode.h projects/tcp_cc_7.x/sys/dev/sdhci/ - copied from r188054, stable/7/sys/dev/sdhci/ projects/tcp_cc_7.x/sys/modules/ae/ - copied from r188054, stable/7/sys/modules/ae/ projects/tcp_cc_7.x/sys/modules/ale/ - copied from r188054, stable/7/sys/modules/ale/ projects/tcp_cc_7.x/sys/modules/cpuctl/ - copied from r188054, stable/7/sys/modules/cpuctl/ projects/tcp_cc_7.x/sys/modules/sdhci/ - copied from r188054, stable/7/sys/modules/sdhci/ projects/tcp_cc_7.x/sys/sys/cpuctl.h - copied unchanged from r188054, stable/7/sys/sys/cpuctl.h projects/tcp_cc_7.x/tools/build/options/WITHOUT_ACCT - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_ACCT projects/tcp_cc_7.x/tools/build/options/WITHOUT_AMD - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_AMD projects/tcp_cc_7.x/tools/build/options/WITHOUT_APM - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_APM projects/tcp_cc_7.x/tools/build/options/WITHOUT_AT - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_AT projects/tcp_cc_7.x/tools/build/options/WITHOUT_CTM - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_CTM projects/tcp_cc_7.x/tools/build/options/WITHOUT_FREEBSD_UPDATE - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_FREEBSD_UPDATE projects/tcp_cc_7.x/tools/build/options/WITHOUT_IPFW - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_IPFW projects/tcp_cc_7.x/tools/build/options/WITHOUT_JAIL - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_JAIL projects/tcp_cc_7.x/tools/build/options/WITHOUT_LEGACY_CONSOLE - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_LEGACY_CONSOLE projects/tcp_cc_7.x/tools/build/options/WITHOUT_LOCATE - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_LOCATE projects/tcp_cc_7.x/tools/build/options/WITHOUT_MAIL - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_MAIL projects/tcp_cc_7.x/tools/build/options/WITHOUT_MAKE - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_MAKE projects/tcp_cc_7.x/tools/build/options/WITHOUT_NDIS - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_NDIS projects/tcp_cc_7.x/tools/build/options/WITHOUT_NETGRAPH - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_NETGRAPH projects/tcp_cc_7.x/tools/build/options/WITHOUT_NTP - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_NTP projects/tcp_cc_7.x/tools/build/options/WITHOUT_PKGTOOLS - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_PKGTOOLS projects/tcp_cc_7.x/tools/build/options/WITHOUT_PMC - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_PMC projects/tcp_cc_7.x/tools/build/options/WITHOUT_PORTSNAP - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_PORTSNAP projects/tcp_cc_7.x/tools/build/options/WITHOUT_PPP - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_PPP projects/tcp_cc_7.x/tools/build/options/WITHOUT_QUOTAS - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_QUOTAS projects/tcp_cc_7.x/tools/build/options/WITHOUT_ROUTED - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_ROUTED projects/tcp_cc_7.x/tools/build/options/WITHOUT_SLIP - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_SLIP projects/tcp_cc_7.x/tools/build/options/WITHOUT_SYSINSTALL - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_SYSINSTALL projects/tcp_cc_7.x/tools/build/options/WITHOUT_TELNET - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_TELNET projects/tcp_cc_7.x/tools/build/options/WITHOUT_TEXTPROC - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_TEXTPROC projects/tcp_cc_7.x/tools/build/options/WITHOUT_WIRELESS - copied unchanged from r188054, stable/7/tools/build/options/WITHOUT_WIRELESS projects/tcp_cc_7.x/tools/regression/usr.bin/tr/ (props changed) - copied from r188054, stable/7/tools/regression/usr.bin/tr/ projects/tcp_cc_7.x/tools/tools/nanobsd/Files/root/save_cfg - copied unchanged from r188054, stable/7/tools/tools/nanobsd/Files/root/save_cfg projects/tcp_cc_7.x/usr.bin/tar/test/test_strip_components.c - copied unchanged from r188054, stable/7/usr.bin/tar/test/test_strip_components.c projects/tcp_cc_7.x/usr.bin/tar/test/test_symlink_dir.c - copied unchanged from r188054, stable/7/usr.bin/tar/test/test_symlink_dir.c projects/tcp_cc_7.x/usr.sbin/cpucontrol/ (props changed) - copied from r188054, stable/7/usr.sbin/cpucontrol/ Deleted: projects/tcp_cc_7.x/contrib/bind9/bin/nsupdate/nsupdate.8 projects/tcp_cc_7.x/sys/dev/sound/pci/au88x0.c projects/tcp_cc_7.x/sys/dev/sound/pci/au88x0.h projects/tcp_cc_7.x/sys/modules/sound/driver/au88x0/ Modified: projects/tcp_cc_7.x/ (props changed) projects/tcp_cc_7.x/COPYRIGHT (contents, props changed) projects/tcp_cc_7.x/Makefile.inc1 (contents, props changed) projects/tcp_cc_7.x/ObsoleteFiles.inc projects/tcp_cc_7.x/UPDATING (contents, props changed) projects/tcp_cc_7.x/bin/ (props changed) projects/tcp_cc_7.x/bin/chio/ (props changed) projects/tcp_cc_7.x/bin/chio/chio.c projects/tcp_cc_7.x/bin/cp/ (props changed) projects/tcp_cc_7.x/bin/dd/ (props changed) projects/tcp_cc_7.x/bin/dd/dd.1 projects/tcp_cc_7.x/bin/ln/ (props changed) projects/tcp_cc_7.x/bin/ln/ln.1 projects/tcp_cc_7.x/bin/ln/ln.c projects/tcp_cc_7.x/bin/sh/ (props changed) projects/tcp_cc_7.x/bin/test/test.1 projects/tcp_cc_7.x/contrib/ (props changed) projects/tcp_cc_7.x/contrib/bind9/ (props changed) projects/tcp_cc_7.x/contrib/bind9/CHANGES projects/tcp_cc_7.x/contrib/bind9/COPYRIGHT projects/tcp_cc_7.x/contrib/bind9/FAQ projects/tcp_cc_7.x/contrib/bind9/FAQ.xml projects/tcp_cc_7.x/contrib/bind9/README projects/tcp_cc_7.x/contrib/bind9/bin/check/check-tool.c projects/tcp_cc_7.x/contrib/bind9/bin/check/named-checkconf.c projects/tcp_cc_7.x/contrib/bind9/bin/check/named-checkzone.c projects/tcp_cc_7.x/contrib/bind9/bin/dig/dig.1 projects/tcp_cc_7.x/contrib/bind9/bin/dig/dig.c projects/tcp_cc_7.x/contrib/bind9/bin/dig/dig.docbook projects/tcp_cc_7.x/contrib/bind9/bin/dig/dig.html projects/tcp_cc_7.x/contrib/bind9/bin/dig/dighost.c projects/tcp_cc_7.x/contrib/bind9/bin/dig/host.1 projects/tcp_cc_7.x/contrib/bind9/bin/dig/host.docbook projects/tcp_cc_7.x/contrib/bind9/bin/dig/host.html projects/tcp_cc_7.x/contrib/bind9/bin/dnssec/dnssec-keygen.8 projects/tcp_cc_7.x/contrib/bind9/bin/dnssec/dnssec-keygen.docbook projects/tcp_cc_7.x/contrib/bind9/bin/dnssec/dnssec-keygen.html projects/tcp_cc_7.x/contrib/bind9/bin/dnssec/dnssec-signzone.8 projects/tcp_cc_7.x/contrib/bind9/bin/dnssec/dnssec-signzone.c projects/tcp_cc_7.x/contrib/bind9/bin/dnssec/dnssec-signzone.docbook projects/tcp_cc_7.x/contrib/bind9/bin/dnssec/dnssec-signzone.html projects/tcp_cc_7.x/contrib/bind9/bin/named/client.c projects/tcp_cc_7.x/contrib/bind9/bin/named/config.c projects/tcp_cc_7.x/contrib/bind9/bin/named/controlconf.c projects/tcp_cc_7.x/contrib/bind9/bin/named/include/named/globals.h projects/tcp_cc_7.x/contrib/bind9/bin/named/interfacemgr.c projects/tcp_cc_7.x/contrib/bind9/bin/named/lwaddr.c projects/tcp_cc_7.x/contrib/bind9/bin/named/lwdgnba.c projects/tcp_cc_7.x/contrib/bind9/bin/named/lwdnoop.c projects/tcp_cc_7.x/contrib/bind9/bin/named/lwresd.8 projects/tcp_cc_7.x/contrib/bind9/bin/named/lwresd.c projects/tcp_cc_7.x/contrib/bind9/bin/named/lwresd.docbook projects/tcp_cc_7.x/contrib/bind9/bin/named/lwresd.html projects/tcp_cc_7.x/contrib/bind9/bin/named/main.c projects/tcp_cc_7.x/contrib/bind9/bin/named/named.8 projects/tcp_cc_7.x/contrib/bind9/bin/named/named.conf.5 projects/tcp_cc_7.x/contrib/bind9/bin/named/named.conf.docbook projects/tcp_cc_7.x/contrib/bind9/bin/named/named.conf.html projects/tcp_cc_7.x/contrib/bind9/bin/named/named.docbook projects/tcp_cc_7.x/contrib/bind9/bin/named/named.html projects/tcp_cc_7.x/contrib/bind9/bin/named/query.c projects/tcp_cc_7.x/contrib/bind9/bin/named/server.c projects/tcp_cc_7.x/contrib/bind9/bin/named/unix/include/named/os.h projects/tcp_cc_7.x/contrib/bind9/bin/named/unix/os.c projects/tcp_cc_7.x/contrib/bind9/bin/named/update.c projects/tcp_cc_7.x/contrib/bind9/bin/nsupdate/Makefile.in projects/tcp_cc_7.x/contrib/bind9/bin/nsupdate/nsupdate.c projects/tcp_cc_7.x/contrib/bind9/bin/nsupdate/nsupdate.docbook projects/tcp_cc_7.x/contrib/bind9/bin/nsupdate/nsupdate.html projects/tcp_cc_7.x/contrib/bind9/bin/rndc/rndc-confgen.c projects/tcp_cc_7.x/contrib/bind9/bin/rndc/rndc.8 projects/tcp_cc_7.x/contrib/bind9/bin/rndc/rndc.c projects/tcp_cc_7.x/contrib/bind9/bin/rndc/rndc.docbook projects/tcp_cc_7.x/contrib/bind9/bin/rndc/rndc.html projects/tcp_cc_7.x/contrib/bind9/configure.in projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM-book.xml projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch01.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch02.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch03.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch04.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch05.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch06.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch07.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch08.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch09.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.ch10.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/Bv9ARM.pdf projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.dig.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.dnssec-keygen.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.dnssec-signzone.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.host.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.named-checkconf.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.named-checkzone.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.named.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.rndc-confgen.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.rndc.conf.html projects/tcp_cc_7.x/contrib/bind9/doc/arm/man.rndc.html projects/tcp_cc_7.x/contrib/bind9/doc/misc/Makefile.in projects/tcp_cc_7.x/contrib/bind9/doc/misc/format-options.pl projects/tcp_cc_7.x/contrib/bind9/doc/misc/migration projects/tcp_cc_7.x/contrib/bind9/doc/misc/options projects/tcp_cc_7.x/contrib/bind9/doc/rfc/index projects/tcp_cc_7.x/contrib/bind9/lib/bind/api projects/tcp_cc_7.x/contrib/bind9/lib/bind/bsd/Makefile.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/bsd/strerror.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/bsd/strtoul.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/configure.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/dst/Makefile.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/dst/dst_api.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/dst/hmac_link.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/dst/support.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/include/Makefile.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/include/arpa/nameser.h projects/tcp_cc_7.x/contrib/bind9/lib/bind/include/isc/assertions.h projects/tcp_cc_7.x/contrib/bind9/lib/bind/include/isc/eventlib.h projects/tcp_cc_7.x/contrib/bind9/lib/bind/include/isc/misc.h projects/tcp_cc_7.x/contrib/bind9/lib/bind/include/netdb.h projects/tcp_cc_7.x/contrib/bind9/lib/bind/include/resolv.h projects/tcp_cc_7.x/contrib/bind9/lib/bind/inet/Makefile.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/inet/inet_net_pton.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/inet/inet_network.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/irs/Makefile.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/irs/dns_ho.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/irs/getnetgrent.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/irs/getnetgrent_r.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/irs/irp.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/isc/Makefile.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/isc/assertions.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/isc/bitncmp.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/isc/ctl_clnt.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/isc/ctl_srvr.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/isc/logging.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/nameser/Makefile.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/port_after.h.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/port_before.h.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/resolv/Makefile.in projects/tcp_cc_7.x/contrib/bind9/lib/bind/resolv/res_debug.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/resolv/res_mkquery.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/resolv/res_query.c projects/tcp_cc_7.x/contrib/bind9/lib/bind/resolv/res_send.c projects/tcp_cc_7.x/contrib/bind9/lib/bind9/api projects/tcp_cc_7.x/contrib/bind9/lib/bind9/check.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/acache.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/adb.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/api projects/tcp_cc_7.x/contrib/bind9/lib/dns/cache.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/dispatch.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/dst_parse.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/dst_parse.h projects/tcp_cc_7.x/contrib/bind9/lib/dns/include/dns/dispatch.h projects/tcp_cc_7.x/contrib/bind9/lib/dns/journal.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/master.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/masterdump.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/message.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/openssldsa_link.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/opensslrsa_link.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/rbt.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/rbtdb.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/rdata/generic/nsec_47.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/rdata/generic/nsec_47.h projects/tcp_cc_7.x/contrib/bind9/lib/dns/rdata/generic/txt_16.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/rdata/in_1/apl_42.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/request.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/resolver.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/rootns.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/sdb.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/tkey.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/tsig.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/validator.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/view.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/xfrin.c projects/tcp_cc_7.x/contrib/bind9/lib/dns/zone.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/Makefile.in projects/tcp_cc_7.x/contrib/bind9/lib/isc/api projects/tcp_cc_7.x/contrib/bind9/lib/isc/assertions.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/assertions.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/lex.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/mem.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/msgs.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/platform.h.in projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/resource.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/socket.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/timer.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/include/isc/types.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/mem.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/print.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/pthreads/mutex.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/timer.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/unix/app.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/unix/include/isc/net.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/unix/net.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/unix/resource.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/unix/socket.c projects/tcp_cc_7.x/contrib/bind9/lib/isc/unix/socket_p.h projects/tcp_cc_7.x/contrib/bind9/lib/isc/unix/time.c projects/tcp_cc_7.x/contrib/bind9/lib/isccfg/api projects/tcp_cc_7.x/contrib/bind9/lib/isccfg/namedconf.c projects/tcp_cc_7.x/contrib/bind9/lib/lwres/api projects/tcp_cc_7.x/contrib/bind9/make/rules.in projects/tcp_cc_7.x/contrib/bind9/version projects/tcp_cc_7.x/contrib/gcc/ (props changed) projects/tcp_cc_7.x/contrib/gdb/ (props changed) projects/tcp_cc_7.x/contrib/gdtoa/ (props changed) projects/tcp_cc_7.x/contrib/lukemftpd/src/extern.h projects/tcp_cc_7.x/contrib/lukemftpd/src/ftpcmd.y projects/tcp_cc_7.x/contrib/lukemftpd/src/ftpd.c projects/tcp_cc_7.x/contrib/ntp/ (props changed) projects/tcp_cc_7.x/contrib/ntp/ntpd/ntp_crypto.c projects/tcp_cc_7.x/contrib/sendmail/ (props changed) projects/tcp_cc_7.x/contrib/smbfs/ (props changed) projects/tcp_cc_7.x/contrib/smbfs/lib/smb/nb_name.c projects/tcp_cc_7.x/contrib/tcsh/ (props changed) projects/tcp_cc_7.x/contrib/telnet/ (props changed) projects/tcp_cc_7.x/contrib/telnet/arpa/telnet.h projects/tcp_cc_7.x/contrib/top/ (props changed) projects/tcp_cc_7.x/contrib/traceroute/ (props changed) projects/tcp_cc_7.x/contrib/traceroute/traceroute.8 projects/tcp_cc_7.x/contrib/traceroute/traceroute.c projects/tcp_cc_7.x/crypto/openssh/ (props changed) projects/tcp_cc_7.x/crypto/openssh/loginrec.c projects/tcp_cc_7.x/crypto/openssh/sshd.c projects/tcp_cc_7.x/crypto/openssl/apps/speed.c projects/tcp_cc_7.x/crypto/openssl/apps/spkac.c projects/tcp_cc_7.x/crypto/openssl/apps/verify.c projects/tcp_cc_7.x/crypto/openssl/apps/x509.c projects/tcp_cc_7.x/crypto/openssl/ssl/s2_clnt.c projects/tcp_cc_7.x/crypto/openssl/ssl/s2_srvr.c projects/tcp_cc_7.x/crypto/openssl/ssl/s3_clnt.c projects/tcp_cc_7.x/crypto/openssl/ssl/s3_srvr.c projects/tcp_cc_7.x/crypto/openssl/ssl/ssltest.c projects/tcp_cc_7.x/etc/ (props changed) projects/tcp_cc_7.x/etc/Makefile projects/tcp_cc_7.x/etc/defaults/rc.conf projects/tcp_cc_7.x/etc/periodic/daily/Makefile projects/tcp_cc_7.x/etc/periodic/monthly/Makefile projects/tcp_cc_7.x/etc/periodic/security/550.ipfwlimit projects/tcp_cc_7.x/etc/periodic/security/Makefile projects/tcp_cc_7.x/etc/periodic/weekly/ (props changed) projects/tcp_cc_7.x/etc/periodic/weekly/Makefile projects/tcp_cc_7.x/etc/rc.d/jail projects/tcp_cc_7.x/games/fortune/ (props changed) projects/tcp_cc_7.x/games/fortune/fortune/ (props changed) projects/tcp_cc_7.x/gnu/ (props changed) projects/tcp_cc_7.x/gnu/usr.bin/Makefile projects/tcp_cc_7.x/gnu/usr.bin/cc/ (props changed) projects/tcp_cc_7.x/gnu/usr.bin/cc/libiberty/config.h projects/tcp_cc_7.x/gnu/usr.bin/cvs/ (props changed) projects/tcp_cc_7.x/gnu/usr.bin/cvs/contrib/Makefile projects/tcp_cc_7.x/gnu/usr.bin/gdb/kgdb/ (props changed) projects/tcp_cc_7.x/gnu/usr.bin/gdb/kgdb/kld.c projects/tcp_cc_7.x/gnu/usr.bin/groff/tmac/mdoc.local (contents, props changed) projects/tcp_cc_7.x/gnu/usr.bin/sort/ (props changed) projects/tcp_cc_7.x/gnu/usr.bin/sort/config.h projects/tcp_cc_7.x/include/ (props changed) projects/tcp_cc_7.x/include/arpa/nameser.h projects/tcp_cc_7.x/include/arpa/telnet.h projects/tcp_cc_7.x/include/resolv.h projects/tcp_cc_7.x/include/string.h projects/tcp_cc_7.x/include/strings.h projects/tcp_cc_7.x/include/time.h projects/tcp_cc_7.x/include/unistd.h projects/tcp_cc_7.x/kerberos5/ (props changed) projects/tcp_cc_7.x/kerberos5/include/config.h projects/tcp_cc_7.x/lib/ (props changed) projects/tcp_cc_7.x/lib/Makefile projects/tcp_cc_7.x/lib/bind/ (props changed) projects/tcp_cc_7.x/lib/bind/bind/config.h projects/tcp_cc_7.x/lib/bind/bind/port_after.h projects/tcp_cc_7.x/lib/bind/bind/port_before.h projects/tcp_cc_7.x/lib/bind/config.h projects/tcp_cc_7.x/lib/bind/dns/code.h projects/tcp_cc_7.x/lib/bind/dns/dns/enumclass.h projects/tcp_cc_7.x/lib/bind/dns/dns/enumtype.h projects/tcp_cc_7.x/lib/bind/dns/dns/rdatastruct.h projects/tcp_cc_7.x/lib/bind/isc/Makefile projects/tcp_cc_7.x/lib/bind/isc/isc/platform.h projects/tcp_cc_7.x/lib/csu/ (props changed) projects/tcp_cc_7.x/lib/libarchive/ (props changed) projects/tcp_cc_7.x/lib/libarchive/archive_entry.c projects/tcp_cc_7.x/lib/libarchive/archive_entry.h projects/tcp_cc_7.x/lib/libarchive/archive_entry_private.h projects/tcp_cc_7.x/lib/libarchive/archive_read_support_format_iso9660.c projects/tcp_cc_7.x/lib/libarchive/archive_read_support_format_zip.c projects/tcp_cc_7.x/lib/libarchive/archive_string.c projects/tcp_cc_7.x/lib/libarchive/archive_string.h projects/tcp_cc_7.x/lib/libarchive/archive_write_disk.c projects/tcp_cc_7.x/lib/libarchive/test/Makefile projects/tcp_cc_7.x/lib/libarchive/test/test_entry.c projects/tcp_cc_7.x/lib/libarchive/test/test_read_format_zip.c projects/tcp_cc_7.x/lib/libarchive/test/test_read_format_zip.zip.uu projects/tcp_cc_7.x/lib/libarchive/test/test_write_disk.c projects/tcp_cc_7.x/lib/libarchive/test/test_write_disk_hardlink.c projects/tcp_cc_7.x/lib/libbluetooth/ (props changed) projects/tcp_cc_7.x/lib/libc/ (props changed) projects/tcp_cc_7.x/lib/libc/amd64/SYS.h projects/tcp_cc_7.x/lib/libc/amd64/gen/_setjmp.S projects/tcp_cc_7.x/lib/libc/amd64/gen/fabs.S projects/tcp_cc_7.x/lib/libc/amd64/gen/modf.S projects/tcp_cc_7.x/lib/libc/amd64/gen/rfork_thread.S projects/tcp_cc_7.x/lib/libc/amd64/gen/setjmp.S projects/tcp_cc_7.x/lib/libc/amd64/gen/sigsetjmp.S projects/tcp_cc_7.x/lib/libc/amd64/stdlib/div.S projects/tcp_cc_7.x/lib/libc/amd64/stdlib/ldiv.S projects/tcp_cc_7.x/lib/libc/amd64/stdlib/lldiv.S projects/tcp_cc_7.x/lib/libc/amd64/string/bcmp.S projects/tcp_cc_7.x/lib/libc/amd64/string/bcopy.S projects/tcp_cc_7.x/lib/libc/amd64/string/bzero.S projects/tcp_cc_7.x/lib/libc/amd64/string/memcmp.S projects/tcp_cc_7.x/lib/libc/amd64/string/memset.S projects/tcp_cc_7.x/lib/libc/amd64/string/strcat.S projects/tcp_cc_7.x/lib/libc/amd64/string/strcmp.S projects/tcp_cc_7.x/lib/libc/amd64/string/strcpy.S projects/tcp_cc_7.x/lib/libc/amd64/sys/brk.S projects/tcp_cc_7.x/lib/libc/amd64/sys/exect.S projects/tcp_cc_7.x/lib/libc/amd64/sys/getcontext.S projects/tcp_cc_7.x/lib/libc/amd64/sys/pipe.S projects/tcp_cc_7.x/lib/libc/amd64/sys/ptrace.S projects/tcp_cc_7.x/lib/libc/amd64/sys/reboot.S projects/tcp_cc_7.x/lib/libc/amd64/sys/sbrk.S projects/tcp_cc_7.x/lib/libc/amd64/sys/setlogin.S projects/tcp_cc_7.x/lib/libc/amd64/sys/vfork.S projects/tcp_cc_7.x/lib/libc/gen/times.3 projects/tcp_cc_7.x/lib/libc/i386/SYS.h projects/tcp_cc_7.x/lib/libc/i386/gen/_ctx_start.S projects/tcp_cc_7.x/lib/libc/i386/gen/_setjmp.S projects/tcp_cc_7.x/lib/libc/i386/gen/fabs.S projects/tcp_cc_7.x/lib/libc/i386/gen/modf.S projects/tcp_cc_7.x/lib/libc/i386/gen/rfork_thread.S projects/tcp_cc_7.x/lib/libc/i386/gen/setjmp.S projects/tcp_cc_7.x/lib/libc/i386/gen/sigsetjmp.S projects/tcp_cc_7.x/lib/libc/i386/stdlib/abs.S projects/tcp_cc_7.x/lib/libc/i386/stdlib/div.S projects/tcp_cc_7.x/lib/libc/i386/stdlib/labs.S projects/tcp_cc_7.x/lib/libc/i386/stdlib/ldiv.S projects/tcp_cc_7.x/lib/libc/i386/string/bcmp.S projects/tcp_cc_7.x/lib/libc/i386/string/bcopy.S projects/tcp_cc_7.x/lib/libc/i386/string/bzero.S projects/tcp_cc_7.x/lib/libc/i386/string/ffs.S projects/tcp_cc_7.x/lib/libc/i386/string/index.S projects/tcp_cc_7.x/lib/libc/i386/string/memchr.S projects/tcp_cc_7.x/lib/libc/i386/string/memcmp.S projects/tcp_cc_7.x/lib/libc/i386/string/memset.S projects/tcp_cc_7.x/lib/libc/i386/string/rindex.S projects/tcp_cc_7.x/lib/libc/i386/string/strcat.S projects/tcp_cc_7.x/lib/libc/i386/string/strchr.S projects/tcp_cc_7.x/lib/libc/i386/string/strcmp.S projects/tcp_cc_7.x/lib/libc/i386/string/strcpy.S projects/tcp_cc_7.x/lib/libc/i386/string/strlen.S projects/tcp_cc_7.x/lib/libc/i386/string/strncmp.S projects/tcp_cc_7.x/lib/libc/i386/string/strrchr.S projects/tcp_cc_7.x/lib/libc/i386/string/swab.S projects/tcp_cc_7.x/lib/libc/i386/string/wcschr.S projects/tcp_cc_7.x/lib/libc/i386/string/wcscmp.S projects/tcp_cc_7.x/lib/libc/i386/string/wcslen.S projects/tcp_cc_7.x/lib/libc/i386/string/wmemchr.S projects/tcp_cc_7.x/lib/libc/i386/sys/Ovfork.S projects/tcp_cc_7.x/lib/libc/i386/sys/brk.S projects/tcp_cc_7.x/lib/libc/i386/sys/exect.S projects/tcp_cc_7.x/lib/libc/i386/sys/getcontext.S projects/tcp_cc_7.x/lib/libc/i386/sys/pipe.S projects/tcp_cc_7.x/lib/libc/i386/sys/ptrace.S projects/tcp_cc_7.x/lib/libc/i386/sys/reboot.S projects/tcp_cc_7.x/lib/libc/i386/sys/sbrk.S projects/tcp_cc_7.x/lib/libc/i386/sys/setlogin.S projects/tcp_cc_7.x/lib/libc/i386/sys/syscall.S projects/tcp_cc_7.x/lib/libc/include/isc/eventlib.h (contents, props changed) projects/tcp_cc_7.x/lib/libc/inet/inet_net_pton.c projects/tcp_cc_7.x/lib/libc/net/getaddrinfo.3 projects/tcp_cc_7.x/lib/libc/regex/re_format.7 projects/tcp_cc_7.x/lib/libc/resolv/res_debug.c projects/tcp_cc_7.x/lib/libc/resolv/res_mkquery.c projects/tcp_cc_7.x/lib/libc/resolv/res_query.c projects/tcp_cc_7.x/lib/libc/resolv/res_send.c projects/tcp_cc_7.x/lib/libc/stdio/fread.c projects/tcp_cc_7.x/lib/libc/stdio/wsetup.c projects/tcp_cc_7.x/lib/libc/stdlib/grantpt.3 projects/tcp_cc_7.x/lib/libc/stdlib/grantpt.c projects/tcp_cc_7.x/lib/libc/stdlib/malloc.3 projects/tcp_cc_7.x/lib/libc/stdlib/malloc.c projects/tcp_cc_7.x/lib/libc/string/Makefile.inc projects/tcp_cc_7.x/lib/libc/string/Symbol.map projects/tcp_cc_7.x/lib/libc/string/ffs.3 projects/tcp_cc_7.x/lib/libc/string/strdup.3 projects/tcp_cc_7.x/lib/libc/sys/modstat.2 projects/tcp_cc_7.x/lib/libc/sys/timer_create.2 projects/tcp_cc_7.x/lib/libc_r/ (props changed) projects/tcp_cc_7.x/lib/libcam/ (props changed) projects/tcp_cc_7.x/lib/libcam/camlib.c projects/tcp_cc_7.x/lib/libdisk/ (props changed) projects/tcp_cc_7.x/lib/libfetch/ (props changed) projects/tcp_cc_7.x/lib/libfetch/fetch.3 projects/tcp_cc_7.x/lib/libfetch/fetch.c projects/tcp_cc_7.x/lib/libfetch/fetch.h projects/tcp_cc_7.x/lib/libfetch/http.c projects/tcp_cc_7.x/lib/libftpio/ (props changed) projects/tcp_cc_7.x/lib/libgeom/ (props changed) projects/tcp_cc_7.x/lib/libgssapi/ (props changed) projects/tcp_cc_7.x/lib/libkse/ (props changed) projects/tcp_cc_7.x/lib/libkvm/ (props changed) projects/tcp_cc_7.x/lib/libmagic/ (props changed) projects/tcp_cc_7.x/lib/libmagic/config.h projects/tcp_cc_7.x/lib/libstand/ (props changed) projects/tcp_cc_7.x/lib/libstand/bootp.c projects/tcp_cc_7.x/lib/libstand/printf.c projects/tcp_cc_7.x/lib/libthr/ (props changed) projects/tcp_cc_7.x/lib/libthr/thread/thr_rtld.c projects/tcp_cc_7.x/lib/libutil/ (props changed) projects/tcp_cc_7.x/lib/libutil/Makefile projects/tcp_cc_7.x/lib/libutil/gr_util.c projects/tcp_cc_7.x/lib/libutil/libutil.h projects/tcp_cc_7.x/lib/libutil/pty.c projects/tcp_cc_7.x/lib/msun/ (props changed) projects/tcp_cc_7.x/lib/msun/src/math.h projects/tcp_cc_7.x/libexec/ (props changed) projects/tcp_cc_7.x/libexec/Makefile projects/tcp_cc_7.x/libexec/ftpd/extern.h projects/tcp_cc_7.x/libexec/ftpd/ftpcmd.y projects/tcp_cc_7.x/libexec/ftpd/ftpd.c projects/tcp_cc_7.x/libexec/rpc.rstatd/ (props changed) projects/tcp_cc_7.x/libexec/rtld-elf/ (props changed) projects/tcp_cc_7.x/libexec/rtld-elf/rtld.c projects/tcp_cc_7.x/libexec/rtld-elf/rtld_lock.c projects/tcp_cc_7.x/release/ (props changed) projects/tcp_cc_7.x/release/Makefile projects/tcp_cc_7.x/release/doc/README projects/tcp_cc_7.x/release/doc/en_US.ISO8859-1/errata/article.sgml projects/tcp_cc_7.x/release/doc/en_US.ISO8859-1/hardware/article.sgml projects/tcp_cc_7.x/release/doc/en_US.ISO8859-1/relnotes/article.sgml projects/tcp_cc_7.x/release/doc/share/mk/doc.relnotes.mk projects/tcp_cc_7.x/release/doc/share/sgml/release.dsl projects/tcp_cc_7.x/release/doc/share/sgml/release.ent projects/tcp_cc_7.x/release/doc/zh_CN.GB2312/hardware/article.sgml projects/tcp_cc_7.x/release/doc/zh_CN.GB2312/relnotes/article.sgml projects/tcp_cc_7.x/release/scripts/package-split.py projects/tcp_cc_7.x/release/scripts/src-install.sh (props changed) projects/tcp_cc_7.x/rescue/ (props changed) projects/tcp_cc_7.x/sbin/ (props changed) projects/tcp_cc_7.x/sbin/Makefile projects/tcp_cc_7.x/sbin/atacontrol/ (props changed) projects/tcp_cc_7.x/sbin/atacontrol/atacontrol.c projects/tcp_cc_7.x/sbin/ddb/ (props changed) projects/tcp_cc_7.x/sbin/devfs/ (props changed) projects/tcp_cc_7.x/sbin/dhclient/ (props changed) projects/tcp_cc_7.x/sbin/dhclient/dhclient.c projects/tcp_cc_7.x/sbin/dhclient/dhcp.h projects/tcp_cc_7.x/sbin/dhclient/tables.c projects/tcp_cc_7.x/sbin/fdisk/ (props changed) projects/tcp_cc_7.x/sbin/fsck_ffs/ (props changed) projects/tcp_cc_7.x/sbin/fsck_ffs/fsck.h projects/tcp_cc_7.x/sbin/fsck_ffs/fsck_ffs.8 projects/tcp_cc_7.x/sbin/fsck_ffs/fsutil.c projects/tcp_cc_7.x/sbin/fsck_ffs/inode.c projects/tcp_cc_7.x/sbin/fsck_ffs/main.c projects/tcp_cc_7.x/sbin/fsck_ffs/pass5.c projects/tcp_cc_7.x/sbin/geom/ (props changed) projects/tcp_cc_7.x/sbin/geom/class/part/ (props changed) projects/tcp_cc_7.x/sbin/geom/class/part/Makefile projects/tcp_cc_7.x/sbin/geom/class/part/geom_part.c projects/tcp_cc_7.x/sbin/geom/class/part/gpart.8 projects/tcp_cc_7.x/sbin/geom/misc/ (props changed) projects/tcp_cc_7.x/sbin/ifconfig/ (props changed) projects/tcp_cc_7.x/sbin/ifconfig/ifconfig.8 projects/tcp_cc_7.x/sbin/init/ (props changed) projects/tcp_cc_7.x/sbin/ipfw/ (props changed) projects/tcp_cc_7.x/sbin/ipfw/ipfw.8 projects/tcp_cc_7.x/sbin/ipfw/ipfw2.c projects/tcp_cc_7.x/sbin/md5/ (props changed) projects/tcp_cc_7.x/sbin/mdconfig/ (props changed) projects/tcp_cc_7.x/sbin/mdconfig/mdconfig.8 projects/tcp_cc_7.x/sbin/mksnap_ffs/ (props changed) projects/tcp_cc_7.x/sbin/mount/ (props changed) projects/tcp_cc_7.x/sbin/natd/ (props changed) projects/tcp_cc_7.x/sbin/ping/ping.8 projects/tcp_cc_7.x/sbin/ping6/ (props changed) projects/tcp_cc_7.x/sbin/sconfig/ (props changed) projects/tcp_cc_7.x/secure/lib/libssh/ (props changed) projects/tcp_cc_7.x/secure/libexec/sftp-server/ (props changed) projects/tcp_cc_7.x/secure/usr.bin/ssh/ (props changed) projects/tcp_cc_7.x/secure/usr.sbin/sshd/ (props changed) projects/tcp_cc_7.x/share/ (props changed) projects/tcp_cc_7.x/share/Makefile projects/tcp_cc_7.x/share/colldef/ (props changed) projects/tcp_cc_7.x/share/doc/bind9/ (props changed) projects/tcp_cc_7.x/share/doc/bind9/Makefile projects/tcp_cc_7.x/share/examples/ (props changed) projects/tcp_cc_7.x/share/man/man3/ (props changed) projects/tcp_cc_7.x/share/man/man4/ (props changed) projects/tcp_cc_7.x/share/man/man4/Makefile projects/tcp_cc_7.x/share/man/man4/age.4 projects/tcp_cc_7.x/share/man/man4/altq.4 projects/tcp_cc_7.x/share/man/man4/ata.4 projects/tcp_cc_7.x/share/man/man4/bce.4 projects/tcp_cc_7.x/share/man/man4/bge.4 projects/tcp_cc_7.x/share/man/man4/cxgb.4 projects/tcp_cc_7.x/share/man/man4/em.4 projects/tcp_cc_7.x/share/man/man4/gem.4 projects/tcp_cc_7.x/share/man/man4/hme.4 projects/tcp_cc_7.x/share/man/man4/miibus.4 projects/tcp_cc_7.x/share/man/man4/mmc.4 projects/tcp_cc_7.x/share/man/man4/mmcsd.4 projects/tcp_cc_7.x/share/man/man4/ng_bpf.4 projects/tcp_cc_7.x/share/man/man4/ng_netflow.4 projects/tcp_cc_7.x/share/man/man4/snd_hda.4 projects/tcp_cc_7.x/share/man/man4/snd_ich.4 projects/tcp_cc_7.x/share/man/man4/textdump.4 projects/tcp_cc_7.x/share/man/man4/umodem.4 projects/tcp_cc_7.x/share/man/man4/vlan.4 projects/tcp_cc_7.x/share/man/man4/zyd.4 projects/tcp_cc_7.x/share/man/man5/ (props changed) projects/tcp_cc_7.x/share/man/man5/Makefile projects/tcp_cc_7.x/share/man/man5/fstab.5 projects/tcp_cc_7.x/share/man/man5/rc.conf.5 projects/tcp_cc_7.x/share/man/man7/ (props changed) projects/tcp_cc_7.x/share/man/man7/ports.7 projects/tcp_cc_7.x/share/man/man9/ (props changed) projects/tcp_cc_7.x/share/man/man9/bus_dma.9 projects/tcp_cc_7.x/share/man/man9/ktr.9 projects/tcp_cc_7.x/share/man/man9/redzone.9 projects/tcp_cc_7.x/share/man/man9/rwlock.9 projects/tcp_cc_7.x/share/misc/bsd-family-tree projects/tcp_cc_7.x/share/mk/ (props changed) projects/tcp_cc_7.x/share/mk/bsd.own.mk projects/tcp_cc_7.x/share/sendmail/ (props changed) projects/tcp_cc_7.x/share/syscons/ (props changed) projects/tcp_cc_7.x/share/syscons/keymaps/ (props changed) projects/tcp_cc_7.x/share/timedef/ (props changed) projects/tcp_cc_7.x/share/zoneinfo/ (props changed) projects/tcp_cc_7.x/share/zoneinfo/asia projects/tcp_cc_7.x/share/zoneinfo/backward projects/tcp_cc_7.x/share/zoneinfo/europe projects/tcp_cc_7.x/share/zoneinfo/northamerica projects/tcp_cc_7.x/share/zoneinfo/southamerica projects/tcp_cc_7.x/share/zoneinfo/zone.tab projects/tcp_cc_7.x/sys/ (props changed) projects/tcp_cc_7.x/sys/amd64/Makefile projects/tcp_cc_7.x/sys/amd64/amd64/db_trace.c projects/tcp_cc_7.x/sys/amd64/amd64/elf_machdep.c projects/tcp_cc_7.x/sys/amd64/amd64/identcpu.c projects/tcp_cc_7.x/sys/amd64/amd64/initcpu.c projects/tcp_cc_7.x/sys/amd64/amd64/local_apic.c projects/tcp_cc_7.x/sys/amd64/amd64/mem.c projects/tcp_cc_7.x/sys/amd64/amd64/minidump_machdep.c projects/tcp_cc_7.x/sys/amd64/amd64/mp_machdep.c projects/tcp_cc_7.x/sys/amd64/amd64/pmap.c projects/tcp_cc_7.x/sys/amd64/amd64/prof_machdep.c projects/tcp_cc_7.x/sys/amd64/amd64/support.S projects/tcp_cc_7.x/sys/amd64/amd64/trap.c projects/tcp_cc_7.x/sys/amd64/amd64/tsc.c projects/tcp_cc_7.x/sys/amd64/conf/GENERIC projects/tcp_cc_7.x/sys/amd64/conf/NOTES projects/tcp_cc_7.x/sys/amd64/include/clock.h projects/tcp_cc_7.x/sys/amd64/include/cpufunc.h projects/tcp_cc_7.x/sys/amd64/include/md_var.h projects/tcp_cc_7.x/sys/amd64/include/pmap.h projects/tcp_cc_7.x/sys/amd64/include/specialreg.h projects/tcp_cc_7.x/sys/amd64/include/stack.h projects/tcp_cc_7.x/sys/amd64/include/vmparam.h projects/tcp_cc_7.x/sys/amd64/linux32/linux32_proto.h projects/tcp_cc_7.x/sys/amd64/linux32/linux32_syscall.h projects/tcp_cc_7.x/sys/amd64/linux32/linux32_sysent.c projects/tcp_cc_7.x/sys/amd64/linux32/linux32_sysvec.c projects/tcp_cc_7.x/sys/amd64/linux32/syscalls.master projects/tcp_cc_7.x/sys/arm/arm/busdma_machdep.c projects/tcp_cc_7.x/sys/arm/arm/elf_machdep.c projects/tcp_cc_7.x/sys/arm/at91/at91.c projects/tcp_cc_7.x/sys/arm/at91/at91_mci.c projects/tcp_cc_7.x/sys/arm/at91/if_ate.c projects/tcp_cc_7.x/sys/arm/conf/AVILA projects/tcp_cc_7.x/sys/arm/conf/BWCT projects/tcp_cc_7.x/sys/arm/conf/CRB projects/tcp_cc_7.x/sys/arm/conf/EP80219 projects/tcp_cc_7.x/sys/arm/conf/HL200 projects/tcp_cc_7.x/sys/arm/conf/IQ31244 projects/tcp_cc_7.x/sys/arm/conf/KB920X projects/tcp_cc_7.x/sys/arm/conf/SIMICS projects/tcp_cc_7.x/sys/arm/conf/SKYEYE projects/tcp_cc_7.x/sys/boot/common/interp.c projects/tcp_cc_7.x/sys/boot/common/loader.8 projects/tcp_cc_7.x/sys/boot/forth/loader.4th projects/tcp_cc_7.x/sys/boot/forth/loader.conf projects/tcp_cc_7.x/sys/boot/forth/loader.conf.5 projects/tcp_cc_7.x/sys/boot/forth/pnp.4th projects/tcp_cc_7.x/sys/boot/forth/support.4th projects/tcp_cc_7.x/sys/boot/i386/boot0/boot0.S projects/tcp_cc_7.x/sys/compat/freebsd32/freebsd32_misc.c projects/tcp_cc_7.x/sys/compat/freebsd32/freebsd32_proto.h projects/tcp_cc_7.x/sys/compat/freebsd32/freebsd32_signal.h projects/tcp_cc_7.x/sys/compat/freebsd32/freebsd32_syscall.h projects/tcp_cc_7.x/sys/compat/freebsd32/freebsd32_syscalls.c projects/tcp_cc_7.x/sys/compat/freebsd32/freebsd32_sysent.c projects/tcp_cc_7.x/sys/compat/freebsd32/freebsd32_util.h projects/tcp_cc_7.x/sys/compat/freebsd32/syscalls.master projects/tcp_cc_7.x/sys/compat/ia32/ia32_sysvec.c projects/tcp_cc_7.x/sys/compat/linprocfs/linprocfs.c projects/tcp_cc_7.x/sys/compat/linux/linux_emul.c projects/tcp_cc_7.x/sys/compat/linux/linux_misc.c projects/tcp_cc_7.x/sys/compat/svr4/svr4_sysvec.c projects/tcp_cc_7.x/sys/conf/Makefile.arm projects/tcp_cc_7.x/sys/conf/NOTES projects/tcp_cc_7.x/sys/conf/files projects/tcp_cc_7.x/sys/conf/files.amd64 projects/tcp_cc_7.x/sys/conf/files.i386 projects/tcp_cc_7.x/sys/conf/kern.pre.mk projects/tcp_cc_7.x/sys/conf/newvers.sh projects/tcp_cc_7.x/sys/conf/options projects/tcp_cc_7.x/sys/contrib/altq/altq/altq_subr.c projects/tcp_cc_7.x/sys/contrib/pf/ (props changed) projects/tcp_cc_7.x/sys/contrib/pf/net/pf.c projects/tcp_cc_7.x/sys/crypto/rc4/rc4.c projects/tcp_cc_7.x/sys/dev/aac/aac_pci.c projects/tcp_cc_7.x/sys/dev/acpi_support/acpi_asus.c projects/tcp_cc_7.x/sys/dev/acpica/acpi_battery.c projects/tcp_cc_7.x/sys/dev/acpica/acpi_hpet.c projects/tcp_cc_7.x/sys/dev/acpica/acpi_smbat.c projects/tcp_cc_7.x/sys/dev/age/if_age.c projects/tcp_cc_7.x/sys/dev/age/if_agevar.h projects/tcp_cc_7.x/sys/dev/ata/ata-chipset.c projects/tcp_cc_7.x/sys/dev/ata/ata-pci.h projects/tcp_cc_7.x/sys/dev/bce/if_bce.c projects/tcp_cc_7.x/sys/dev/bce/if_bcefw.h projects/tcp_cc_7.x/sys/dev/bce/if_bcereg.h projects/tcp_cc_7.x/sys/dev/bge/if_bge.c projects/tcp_cc_7.x/sys/dev/bge/if_bgereg.h projects/tcp_cc_7.x/sys/dev/bm/if_bm.c projects/tcp_cc_7.x/sys/dev/cxgb/ (props changed) projects/tcp_cc_7.x/sys/dev/cxgb/common/cxgb_ael1002.c projects/tcp_cc_7.x/sys/dev/cxgb/common/cxgb_common.h projects/tcp_cc_7.x/sys/dev/cxgb/common/cxgb_ctl_defs.h projects/tcp_cc_7.x/sys/dev/cxgb/common/cxgb_t3_hw.c projects/tcp_cc_7.x/sys/dev/cxgb/common/cxgb_xgmac.c projects/tcp_cc_7.x/sys/dev/cxgb/cxgb_main.c projects/tcp_cc_7.x/sys/dev/cxgb/cxgb_sge.c projects/tcp_cc_7.x/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c projects/tcp_cc_7.x/sys/dev/cxgb/ulp/tom/cxgb_tom.c projects/tcp_cc_7.x/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c projects/tcp_cc_7.x/sys/dev/dc/if_dc.c projects/tcp_cc_7.x/sys/dev/dc/if_dcreg.h projects/tcp_cc_7.x/sys/dev/dcons/dcons_crom.c projects/tcp_cc_7.x/sys/dev/dcons/dcons_os.c projects/tcp_cc_7.x/sys/dev/drm/ati_pcigart.c projects/tcp_cc_7.x/sys/dev/drm/drm-subprocess.pl projects/tcp_cc_7.x/sys/dev/drm/drm.h projects/tcp_cc_7.x/sys/dev/drm/drmP.h projects/tcp_cc_7.x/sys/dev/drm/drm_agpsupport.c projects/tcp_cc_7.x/sys/dev/drm/drm_atomic.h projects/tcp_cc_7.x/sys/dev/drm/drm_auth.c projects/tcp_cc_7.x/sys/dev/drm/drm_bufs.c projects/tcp_cc_7.x/sys/dev/drm/drm_context.c projects/tcp_cc_7.x/sys/dev/drm/drm_dma.c projects/tcp_cc_7.x/sys/dev/drm/drm_drawable.c projects/tcp_cc_7.x/sys/dev/drm/drm_drv.c projects/tcp_cc_7.x/sys/dev/drm/drm_fops.c projects/tcp_cc_7.x/sys/dev/drm/drm_ioctl.c projects/tcp_cc_7.x/sys/dev/drm/drm_irq.c projects/tcp_cc_7.x/sys/dev/drm/drm_linux_list.h projects/tcp_cc_7.x/sys/dev/drm/drm_lock.c projects/tcp_cc_7.x/sys/dev/drm/drm_memory.c projects/tcp_cc_7.x/sys/dev/drm/drm_pci.c projects/tcp_cc_7.x/sys/dev/drm/drm_pciids.h projects/tcp_cc_7.x/sys/dev/drm/drm_sarea.h projects/tcp_cc_7.x/sys/dev/drm/drm_scatter.c projects/tcp_cc_7.x/sys/dev/drm/drm_sysctl.c projects/tcp_cc_7.x/sys/dev/drm/drm_vm.c projects/tcp_cc_7.x/sys/dev/drm/i915_dma.c projects/tcp_cc_7.x/sys/dev/drm/i915_drm.h projects/tcp_cc_7.x/sys/dev/drm/i915_drv.c projects/tcp_cc_7.x/sys/dev/drm/i915_drv.h projects/tcp_cc_7.x/sys/dev/drm/i915_irq.c projects/tcp_cc_7.x/sys/dev/drm/i915_mem.c projects/tcp_cc_7.x/sys/dev/drm/mach64_dma.c projects/tcp_cc_7.x/sys/dev/drm/mach64_drm.h projects/tcp_cc_7.x/sys/dev/drm/mach64_drv.c projects/tcp_cc_7.x/sys/dev/drm/mach64_drv.h projects/tcp_cc_7.x/sys/dev/drm/mach64_irq.c projects/tcp_cc_7.x/sys/dev/drm/mach64_state.c projects/tcp_cc_7.x/sys/dev/drm/mga_dma.c projects/tcp_cc_7.x/sys/dev/drm/mga_drm.h projects/tcp_cc_7.x/sys/dev/drm/mga_drv.c projects/tcp_cc_7.x/sys/dev/drm/mga_drv.h projects/tcp_cc_7.x/sys/dev/drm/mga_irq.c projects/tcp_cc_7.x/sys/dev/drm/mga_state.c projects/tcp_cc_7.x/sys/dev/drm/mga_warp.c projects/tcp_cc_7.x/sys/dev/drm/r128_cce.c projects/tcp_cc_7.x/sys/dev/drm/r128_drm.h projects/tcp_cc_7.x/sys/dev/drm/r128_drv.c projects/tcp_cc_7.x/sys/dev/drm/r128_drv.h projects/tcp_cc_7.x/sys/dev/drm/r128_irq.c projects/tcp_cc_7.x/sys/dev/drm/r128_state.c projects/tcp_cc_7.x/sys/dev/drm/r300_cmdbuf.c projects/tcp_cc_7.x/sys/dev/drm/r300_reg.h projects/tcp_cc_7.x/sys/dev/drm/radeon_cp.c projects/tcp_cc_7.x/sys/dev/drm/radeon_drm.h projects/tcp_cc_7.x/sys/dev/drm/radeon_drv.c projects/tcp_cc_7.x/sys/dev/drm/radeon_drv.h projects/tcp_cc_7.x/sys/dev/drm/radeon_irq.c projects/tcp_cc_7.x/sys/dev/drm/radeon_mem.c projects/tcp_cc_7.x/sys/dev/drm/radeon_state.c projects/tcp_cc_7.x/sys/dev/drm/savage_bci.c projects/tcp_cc_7.x/sys/dev/drm/savage_drm.h projects/tcp_cc_7.x/sys/dev/drm/savage_drv.c projects/tcp_cc_7.x/sys/dev/drm/savage_drv.h projects/tcp_cc_7.x/sys/dev/drm/savage_state.c projects/tcp_cc_7.x/sys/dev/drm/sis_drv.c projects/tcp_cc_7.x/sys/dev/drm/sis_drv.h projects/tcp_cc_7.x/sys/dev/drm/sis_mm.c projects/tcp_cc_7.x/sys/dev/drm/tdfx_drv.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_80003es2lan.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_82540.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_82541.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_82542.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_82543.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_82571.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_82575.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_82575.h projects/tcp_cc_7.x/sys/dev/e1000/e1000_api.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_api.h projects/tcp_cc_7.x/sys/dev/e1000/e1000_defines.h projects/tcp_cc_7.x/sys/dev/e1000/e1000_hw.h projects/tcp_cc_7.x/sys/dev/e1000/e1000_ich8lan.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_ich8lan.h projects/tcp_cc_7.x/sys/dev/e1000/e1000_mac.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_mac.h projects/tcp_cc_7.x/sys/dev/e1000/e1000_manage.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_nvm.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_osdep.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_osdep.h projects/tcp_cc_7.x/sys/dev/e1000/e1000_phy.c projects/tcp_cc_7.x/sys/dev/e1000/e1000_phy.h projects/tcp_cc_7.x/sys/dev/e1000/e1000_regs.h projects/tcp_cc_7.x/sys/dev/e1000/if_em.c projects/tcp_cc_7.x/sys/dev/e1000/if_em.h projects/tcp_cc_7.x/sys/dev/e1000/if_igb.c projects/tcp_cc_7.x/sys/dev/e1000/if_igb.h projects/tcp_cc_7.x/sys/dev/esp/esp_sbus.c projects/tcp_cc_7.x/sys/dev/esp/ncr53c9x.c projects/tcp_cc_7.x/sys/dev/esp/ncr53c9xreg.h projects/tcp_cc_7.x/sys/dev/esp/ncr53c9xvar.h projects/tcp_cc_7.x/sys/dev/et/if_et.c projects/tcp_cc_7.x/sys/dev/fb/s3_pci.c projects/tcp_cc_7.x/sys/dev/fdc/fdc.c projects/tcp_cc_7.x/sys/dev/hptiop/hptiop.h projects/tcp_cc_7.x/sys/dev/if_ndis/if_ndis.c projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe.c projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe.h projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe_82598.c projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe_api.c projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe_api.h projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe_common.c projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe_common.h projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe_osdep.h projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe_phy.c projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe_phy.h projects/tcp_cc_7.x/sys/dev/ixgbe/ixgbe_type.h projects/tcp_cc_7.x/sys/dev/jme/if_jme.c projects/tcp_cc_7.x/sys/dev/jme/if_jmereg.h projects/tcp_cc_7.x/sys/dev/jme/if_jmevar.h projects/tcp_cc_7.x/sys/dev/le/if_le_cbus.c projects/tcp_cc_7.x/sys/dev/le/if_le_isa.c projects/tcp_cc_7.x/sys/dev/le/if_le_lebuffer.c projects/tcp_cc_7.x/sys/dev/le/if_le_ledma.c projects/tcp_cc_7.x/sys/dev/le/if_le_pci.c projects/tcp_cc_7.x/sys/dev/le/lebuffer_sbus.c projects/tcp_cc_7.x/sys/dev/led/led.c projects/tcp_cc_7.x/sys/dev/lmc/if_lmc.c projects/tcp_cc_7.x/sys/dev/mfi/mfi.c projects/tcp_cc_7.x/sys/dev/mfi/mfi_disk.c projects/tcp_cc_7.x/sys/dev/mfi/mfi_ioctl.h projects/tcp_cc_7.x/sys/dev/mfi/mfi_pci.c projects/tcp_cc_7.x/sys/dev/mfi/mfireg.h projects/tcp_cc_7.x/sys/dev/mfi/mfivar.h projects/tcp_cc_7.x/sys/dev/mii/atphy.c projects/tcp_cc_7.x/sys/dev/mii/ciphy.c projects/tcp_cc_7.x/sys/dev/mii/e1000phy.c projects/tcp_cc_7.x/sys/dev/mii/miidevs projects/tcp_cc_7.x/sys/dev/mmc/bridge.h projects/tcp_cc_7.x/sys/dev/mmc/mmc.c projects/tcp_cc_7.x/sys/dev/mmc/mmcbrvar.h projects/tcp_cc_7.x/sys/dev/mmc/mmcreg.h projects/tcp_cc_7.x/sys/dev/mmc/mmcsd.c projects/tcp_cc_7.x/sys/dev/mmc/mmcvar.h projects/tcp_cc_7.x/sys/dev/mxge/eth_z8e.h projects/tcp_cc_7.x/sys/dev/mxge/ethp_z8e.h projects/tcp_cc_7.x/sys/dev/mxge/rss_eth_z8e.h projects/tcp_cc_7.x/sys/dev/mxge/rss_ethp_z8e.h projects/tcp_cc_7.x/sys/dev/pccbb/pccbb_pci.c projects/tcp_cc_7.x/sys/dev/pci/pci.c projects/tcp_cc_7.x/sys/dev/pci/pcireg.h projects/tcp_cc_7.x/sys/dev/puc/pucdata.c projects/tcp_cc_7.x/sys/dev/random/randomdev.c projects/tcp_cc_7.x/sys/dev/random/randomdev_soft.c projects/tcp_cc_7.x/sys/dev/re/if_re.c projects/tcp_cc_7.x/sys/dev/sound/pci/cmi.c projects/tcp_cc_7.x/sys/dev/sound/pci/hda/hda_reg.h projects/tcp_cc_7.x/sys/dev/sound/pci/hda/hdac.c projects/tcp_cc_7.x/sys/dev/sound/pci/hda/hdac_private.h projects/tcp_cc_7.x/sys/dev/sym/sym_hipd.c projects/tcp_cc_7.x/sys/dev/usb/umass.c projects/tcp_cc_7.x/sys/dev/usb/usb_quirks.c projects/tcp_cc_7.x/sys/dev/usb/usbdevs projects/tcp_cc_7.x/sys/dev/vge/if_vge.c projects/tcp_cc_7.x/sys/dev/vr/if_vr.c projects/tcp_cc_7.x/sys/fs/cd9660/cd9660_node.c projects/tcp_cc_7.x/sys/fs/cd9660/cd9660_rrip.c projects/tcp_cc_7.x/sys/fs/devfs/devfs_vnops.c projects/tcp_cc_7.x/sys/fs/fdescfs/fdesc_vnops.c projects/tcp_cc_7.x/sys/fs/hpfs/hpfs_vnops.c projects/tcp_cc_7.x/sys/fs/msdosfs/msdosfs_vnops.c projects/tcp_cc_7.x/sys/fs/ntfs/ntfs_vnops.c projects/tcp_cc_7.x/sys/fs/nullfs/null_vnops.c projects/tcp_cc_7.x/sys/fs/portalfs/portal_vnops.c projects/tcp_cc_7.x/sys/fs/procfs/procfs_map.c projects/tcp_cc_7.x/sys/fs/pseudofs/pseudofs_vncache.c projects/tcp_cc_7.x/sys/fs/pseudofs/pseudofs_vnops.c projects/tcp_cc_7.x/sys/fs/smbfs/smbfs_node.c projects/tcp_cc_7.x/sys/fs/tmpfs/tmpfs_vnops.c projects/tcp_cc_7.x/sys/fs/udf/udf_vnops.c projects/tcp_cc_7.x/sys/fs/unionfs/union.h projects/tcp_cc_7.x/sys/fs/unionfs/union_subr.c projects/tcp_cc_7.x/sys/fs/unionfs/union_vfsops.c projects/tcp_cc_7.x/sys/fs/unionfs/union_vnops.c projects/tcp_cc_7.x/sys/geom/concat/g_concat.c projects/tcp_cc_7.x/sys/geom/geom_ccd.c projects/tcp_cc_7.x/sys/geom/geom_ctl.c projects/tcp_cc_7.x/sys/geom/geom_disk.c projects/tcp_cc_7.x/sys/geom/geom_kern.c projects/tcp_cc_7.x/sys/geom/geom_slice.c projects/tcp_cc_7.x/sys/geom/geom_subr.c projects/tcp_cc_7.x/sys/geom/part/g_part.c projects/tcp_cc_7.x/sys/geom/part/g_part_bsd.c projects/tcp_cc_7.x/sys/geom/part/g_part_gpt.c projects/tcp_cc_7.x/sys/geom/stripe/g_stripe.c projects/tcp_cc_7.x/sys/geom/vinum/geom_vinum_plex.c projects/tcp_cc_7.x/sys/gnu/fs/ext2fs/ext2_bitops.h projects/tcp_cc_7.x/sys/gnu/fs/ext2fs/ext2_inode.c projects/tcp_cc_7.x/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c projects/tcp_cc_7.x/sys/i386/conf/GENERIC projects/tcp_cc_7.x/sys/i386/conf/NOTES projects/tcp_cc_7.x/sys/i386/cpufreq/est.c projects/tcp_cc_7.x/sys/i386/cpufreq/powernow.c projects/tcp_cc_7.x/sys/i386/i386/elf_machdep.c projects/tcp_cc_7.x/sys/i386/i386/identcpu.c projects/tcp_cc_7.x/sys/i386/i386/initcpu.c projects/tcp_cc_7.x/sys/i386/i386/local_apic.c projects/tcp_cc_7.x/sys/i386/i386/mp_machdep.c projects/tcp_cc_7.x/sys/i386/i386/pmap.c projects/tcp_cc_7.x/sys/i386/i386/support.s projects/tcp_cc_7.x/sys/i386/i386/tsc.c projects/tcp_cc_7.x/sys/i386/ibcs2/ibcs2_sysvec.c projects/tcp_cc_7.x/sys/i386/include/clock.h projects/tcp_cc_7.x/sys/i386/include/cpufunc.h projects/tcp_cc_7.x/sys/i386/include/md_var.h projects/tcp_cc_7.x/sys/i386/include/pmap.h projects/tcp_cc_7.x/sys/i386/include/specialreg.h projects/tcp_cc_7.x/sys/i386/isa/prof_machdep.c projects/tcp_cc_7.x/sys/i386/linux/linux_proto.h projects/tcp_cc_7.x/sys/i386/linux/linux_syscall.h projects/tcp_cc_7.x/sys/i386/linux/linux_sysent.c projects/tcp_cc_7.x/sys/i386/linux/linux_sysvec.c projects/tcp_cc_7.x/sys/i386/linux/syscalls.master projects/tcp_cc_7.x/sys/ia64/ia64/elf_machdep.c projects/tcp_cc_7.x/sys/ia64/include/atomic.h projects/tcp_cc_7.x/sys/kern/Make.tags.inc projects/tcp_cc_7.x/sys/kern/imgact_aout.c projects/tcp_cc_7.x/sys/kern/imgact_elf.c projects/tcp_cc_7.x/sys/kern/init_main.c projects/tcp_cc_7.x/sys/kern/kern_cpu.c projects/tcp_cc_7.x/sys/kern/kern_descrip.c projects/tcp_cc_7.x/sys/kern/kern_exec.c projects/tcp_cc_7.x/sys/kern/kern_linker.c projects/tcp_cc_7.x/sys/kern/kern_lockf.c projects/tcp_cc_7.x/sys/kern/kern_malloc.c projects/tcp_cc_7.x/sys/kern/kern_module.c projects/tcp_cc_7.x/sys/kern/kern_proc.c projects/tcp_cc_7.x/sys/kern/kern_prot.c projects/tcp_cc_7.x/sys/kern/kern_sysctl.c projects/tcp_cc_7.x/sys/kern/kern_time.c projects/tcp_cc_7.x/sys/kern/kern_timeout.c projects/tcp_cc_7.x/sys/kern/link_elf_obj.c projects/tcp_cc_7.x/sys/kern/subr_param.c projects/tcp_cc_7.x/sys/kern/subr_prf.c projects/tcp_cc_7.x/sys/kern/subr_smp.c projects/tcp_cc_7.x/sys/kern/subr_stack.c projects/tcp_cc_7.x/sys/kern/uipc_cow.c projects/tcp_cc_7.x/sys/kern/uipc_domain.c projects/tcp_cc_7.x/sys/kern/uipc_mbuf.c projects/tcp_cc_7.x/sys/kern/uipc_mqueue.c projects/tcp_cc_7.x/sys/kern/uipc_socket.c projects/tcp_cc_7.x/sys/kern/vfs_aio.c projects/tcp_cc_7.x/sys/kern/vfs_cache.c projects/tcp_cc_7.x/sys/kern/vfs_extattr.c projects/tcp_cc_7.x/sys/kern/vfs_lookup.c projects/tcp_cc_7.x/sys/kern/vfs_mount.c projects/tcp_cc_7.x/sys/kern/vfs_subr.c projects/tcp_cc_7.x/sys/kern/vfs_syscalls.c projects/tcp_cc_7.x/sys/kern/vfs_vnops.c projects/tcp_cc_7.x/sys/libkern/qdivrem.c projects/tcp_cc_7.x/sys/modules/Makefile projects/tcp_cc_7.x/sys/modules/aio/Makefile projects/tcp_cc_7.x/sys/modules/drm/i915/Makefile projects/tcp_cc_7.x/sys/net/bpfdesc.h projects/tcp_cc_7.x/sys/net/if.c projects/tcp_cc_7.x/sys/net/if.h projects/tcp_cc_7.x/sys/net/if_atmsubr.c projects/tcp_cc_7.x/sys/net/if_fwsubr.c projects/tcp_cc_7.x/sys/net/if_iso88025subr.c projects/tcp_cc_7.x/sys/net/if_vlan.c projects/tcp_cc_7.x/sys/net/route.c projects/tcp_cc_7.x/sys/net/route.h projects/tcp_cc_7.x/sys/net80211/ieee80211_freebsd.h projects/tcp_cc_7.x/sys/net80211/ieee80211_power.c projects/tcp_cc_7.x/sys/netgraph/netflow/netflow.c projects/tcp_cc_7.x/sys/netgraph/netflow/ng_netflow.c projects/tcp_cc_7.x/sys/netgraph/netflow/ng_netflow.h projects/tcp_cc_7.x/sys/netgraph/ng_base.c projects/tcp_cc_7.x/sys/netgraph/ng_deflate.c projects/tcp_cc_7.x/sys/netgraph/ng_iface.c projects/tcp_cc_7.x/sys/netgraph/ng_iface.h projects/tcp_cc_7.x/sys/netgraph/ng_l2tp.c projects/tcp_cc_7.x/sys/netgraph/ng_mppc.c projects/tcp_cc_7.x/sys/netgraph/ng_ppp.c projects/tcp_cc_7.x/sys/netgraph/ng_pred1.c projects/tcp_cc_7.x/sys/netgraph/ng_socket.c projects/tcp_cc_7.x/sys/netgraph/ng_vjc.c projects/tcp_cc_7.x/sys/netinet/if_ether.c projects/tcp_cc_7.x/sys/netinet/in_pcb.c projects/tcp_cc_7.x/sys/netinet/in_pcb.h projects/tcp_cc_7.x/sys/netinet/in_rmx.c projects/tcp_cc_7.x/sys/netinet/in_var.h projects/tcp_cc_7.x/sys/netinet/ip_divert.c projects/tcp_cc_7.x/sys/netinet/ip_dummynet.c projects/tcp_cc_7.x/sys/netinet/ip_fw2.c projects/tcp_cc_7.x/sys/netinet/ip_output.c projects/tcp_cc_7.x/sys/netinet/raw_ip.c projects/tcp_cc_7.x/sys/netinet/tcp_debug.c projects/tcp_cc_7.x/sys/netinet/tcp_input.c projects/tcp_cc_7.x/sys/netinet/tcp_sack.c projects/tcp_cc_7.x/sys/netinet/tcp_subr.c projects/tcp_cc_7.x/sys/netinet/tcp_syncache.c projects/tcp_cc_7.x/sys/netinet/tcp_var.h projects/tcp_cc_7.x/sys/netinet/udp_usrreq.c projects/tcp_cc_7.x/sys/netinet6/in6_pcb.c projects/tcp_cc_7.x/sys/netinet6/ip6_output.c projects/tcp_cc_7.x/sys/netinet6/mld6.c projects/tcp_cc_7.x/sys/netinet6/udp6_usrreq.c projects/tcp_cc_7.x/sys/nfsclient/nfs_vnops.c projects/tcp_cc_7.x/sys/nfsserver/nfs_serv.c projects/tcp_cc_7.x/sys/pc98/conf/GENERIC projects/tcp_cc_7.x/sys/pc98/pc98/pc98_machdep.c projects/tcp_cc_7.x/sys/pc98/pc98/pc98_machdep.h projects/tcp_cc_7.x/sys/pci/agp.c projects/tcp_cc_7.x/sys/pci/agp_amd64.c projects/tcp_cc_7.x/sys/pci/agp_i810.c projects/tcp_cc_7.x/sys/pci/agpreg.h projects/tcp_cc_7.x/sys/pci/if_rl.c projects/tcp_cc_7.x/sys/pci/if_rlreg.h projects/tcp_cc_7.x/sys/powerpc/include/dbdma.h projects/tcp_cc_7.x/sys/powerpc/powermac/dbdma.c projects/tcp_cc_7.x/sys/powerpc/powermac/dbdmavar.h projects/tcp_cc_7.x/sys/powerpc/powerpc/elf_machdep.c projects/tcp_cc_7.x/sys/security/audit/audit_syscalls.c projects/tcp_cc_7.x/sys/security/mac/mac_framework.h projects/tcp_cc_7.x/sys/security/mac/mac_inet.c projects/tcp_cc_7.x/sys/security/mac/mac_policy.h projects/tcp_cc_7.x/sys/security/mac_biba/mac_biba.c projects/tcp_cc_7.x/sys/security/mac_bsdextended/mac_bsdextended.c projects/tcp_cc_7.x/sys/security/mac_lomac/mac_lomac.c projects/tcp_cc_7.x/sys/security/mac_mls/mac_mls.c projects/tcp_cc_7.x/sys/security/mac_partition/mac_partition.c projects/tcp_cc_7.x/sys/security/mac_portacl/mac_portacl.c projects/tcp_cc_7.x/sys/security/mac_seeotheruids/mac_seeotheruids.c projects/tcp_cc_7.x/sys/security/mac_stub/mac_stub.c projects/tcp_cc_7.x/sys/security/mac_test/mac_test.c projects/tcp_cc_7.x/sys/sparc64/sbus/dma_sbus.c projects/tcp_cc_7.x/sys/sparc64/sbus/lsi64854.c projects/tcp_cc_7.x/sys/sparc64/sbus/lsi64854var.h projects/tcp_cc_7.x/sys/sparc64/sparc64/db_trace.c projects/tcp_cc_7.x/sys/sparc64/sparc64/elf_machdep.c projects/tcp_cc_7.x/sys/sparc64/sparc64/stack_machdep.c projects/tcp_cc_7.x/sys/sun4v/sun4v/db_trace.c projects/tcp_cc_7.x/sys/sun4v/sun4v/stack_machdep.c projects/tcp_cc_7.x/sys/sys/aio.h projects/tcp_cc_7.x/sys/sys/copyright.h projects/tcp_cc_7.x/sys/sys/module.h projects/tcp_cc_7.x/sys/sys/param.h projects/tcp_cc_7.x/sys/sys/priv.h projects/tcp_cc_7.x/sys/sys/sbuf.h projects/tcp_cc_7.x/sys/sys/syscallsubr.h projects/tcp_cc_7.x/sys/sys/sysctl.h projects/tcp_cc_7.x/sys/sys/systm.h projects/tcp_cc_7.x/sys/sys/time.h projects/tcp_cc_7.x/sys/sys/user.h projects/tcp_cc_7.x/sys/sys/vnode.h projects/tcp_cc_7.x/sys/ufs/ffs/ffs_snapshot.c projects/tcp_cc_7.x/sys/ufs/ffs/ffs_softdep.c projects/tcp_cc_7.x/sys/ufs/ffs/ffs_vfsops.c projects/tcp_cc_7.x/sys/ufs/ffs/ffs_vnops.c projects/tcp_cc_7.x/sys/ufs/ufs/dirhash.h projects/tcp_cc_7.x/sys/ufs/ufs/inode.h projects/tcp_cc_7.x/sys/ufs/ufs/ufs_dirhash.c projects/tcp_cc_7.x/sys/ufs/ufs/ufs_extattr.c projects/tcp_cc_7.x/sys/ufs/ufs/ufs_lookup.c projects/tcp_cc_7.x/sys/ufs/ufs/ufs_quota.c projects/tcp_cc_7.x/sys/ufs/ufs/ufs_vfsops.c projects/tcp_cc_7.x/sys/ufs/ufs/ufs_vnops.c projects/tcp_cc_7.x/sys/vm/redzone.c projects/tcp_cc_7.x/sys/vm/uma_core.c projects/tcp_cc_7.x/sys/vm/vm_kern.c projects/tcp_cc_7.x/sys/vm/vm_map.c projects/tcp_cc_7.x/sys/vm/vm_page.c projects/tcp_cc_7.x/sys/vm/vm_page.h projects/tcp_cc_7.x/sys/vm/vm_pageout.c projects/tcp_cc_7.x/tools/build/ (props changed) projects/tcp_cc_7.x/tools/build/mk/OptionalObsoleteFiles.inc projects/tcp_cc_7.x/tools/regression/atm/ (props changed) projects/tcp_cc_7.x/tools/regression/file/flock/ (props changed) projects/tcp_cc_7.x/tools/regression/usr.bin/ (props changed) projects/tcp_cc_7.x/tools/sched/ (props changed) projects/tcp_cc_7.x/tools/sched/schedgraph.py projects/tcp_cc_7.x/tools/tools/crypto/ (props changed) projects/tcp_cc_7.x/tools/tools/editing/ (props changed) projects/tcp_cc_7.x/tools/tools/nanobsd/ (props changed) projects/tcp_cc_7.x/tools/tools/nanobsd/FlashDevice.sub projects/tcp_cc_7.x/tools/tools/nanobsd/nanobsd.sh projects/tcp_cc_7.x/usr.bin/ (props changed) projects/tcp_cc_7.x/usr.bin/Makefile projects/tcp_cc_7.x/usr.bin/calendar/ (props changed) projects/tcp_cc_7.x/usr.bin/cksum/ (props changed) projects/tcp_cc_7.x/usr.bin/comm/ (props changed) projects/tcp_cc_7.x/usr.bin/cpuset/ (props changed) projects/tcp_cc_7.x/usr.bin/du/ (props changed) projects/tcp_cc_7.x/usr.bin/du/du.1 projects/tcp_cc_7.x/usr.bin/du/du.c projects/tcp_cc_7.x/usr.bin/fetch/ (props changed) projects/tcp_cc_7.x/usr.bin/fetch/fetch.1 projects/tcp_cc_7.x/usr.bin/fetch/fetch.c projects/tcp_cc_7.x/usr.bin/file/ (props changed) projects/tcp_cc_7.x/usr.bin/file/config.h projects/tcp_cc_7.x/usr.bin/gzip/ (props changed) projects/tcp_cc_7.x/usr.bin/ipcrm/ (props changed) projects/tcp_cc_7.x/usr.bin/ipcs/ (props changed) projects/tcp_cc_7.x/usr.bin/ipcs/ipcs.c projects/tcp_cc_7.x/usr.bin/kdump/ (props changed) projects/tcp_cc_7.x/usr.bin/ktrace/ (props changed) projects/tcp_cc_7.x/usr.bin/ldd/ (props changed) projects/tcp_cc_7.x/usr.bin/lockf/ (props changed) projects/tcp_cc_7.x/usr.bin/logger/ (props changed) projects/tcp_cc_7.x/usr.bin/make/ (props changed) projects/tcp_cc_7.x/usr.bin/netstat/ (props changed) projects/tcp_cc_7.x/usr.bin/netstat/Makefile projects/tcp_cc_7.x/usr.bin/netstat/inet6.c projects/tcp_cc_7.x/usr.bin/netstat/main.c projects/tcp_cc_7.x/usr.bin/netstat/netstat.h projects/tcp_cc_7.x/usr.bin/nsupdate/ (props changed) projects/tcp_cc_7.x/usr.bin/nsupdate/Makefile projects/tcp_cc_7.x/usr.bin/procstat/ (props changed) projects/tcp_cc_7.x/usr.bin/procstat/Makefile projects/tcp_cc_7.x/usr.bin/procstat/procstat_files.c projects/tcp_cc_7.x/usr.bin/procstat/procstat_vm.c projects/tcp_cc_7.x/usr.bin/sed/ (props changed) projects/tcp_cc_7.x/usr.bin/sed/compile.c projects/tcp_cc_7.x/usr.bin/shar/ (props changed) projects/tcp_cc_7.x/usr.bin/su/ (props changed) projects/tcp_cc_7.x/usr.bin/tar/ (props changed) projects/tcp_cc_7.x/usr.bin/tar/test/Makefile projects/tcp_cc_7.x/usr.bin/tar/util.c projects/tcp_cc_7.x/usr.bin/tar/write.c projects/tcp_cc_7.x/usr.bin/top/ (props changed) projects/tcp_cc_7.x/usr.bin/truncate/ (props changed) projects/tcp_cc_7.x/usr.bin/truss/ (props changed) projects/tcp_cc_7.x/usr.bin/units/ (props changed) projects/tcp_cc_7.x/usr.bin/vmstat/ (props changed) projects/tcp_cc_7.x/usr.bin/vmstat/vmstat.c projects/tcp_cc_7.x/usr.bin/wc/ (props changed) projects/tcp_cc_7.x/usr.bin/wc/wc.1 projects/tcp_cc_7.x/usr.bin/wc/wc.c projects/tcp_cc_7.x/usr.bin/whereis/ (props changed) projects/tcp_cc_7.x/usr.bin/window/ (props changed) projects/tcp_cc_7.x/usr.bin/xargs/ (props changed) projects/tcp_cc_7.x/usr.bin/xargs/xargs.1 projects/tcp_cc_7.x/usr.sbin/ (props changed) projects/tcp_cc_7.x/usr.sbin/Makefile projects/tcp_cc_7.x/usr.sbin/adduser/ (props changed) projects/tcp_cc_7.x/usr.sbin/boot0cfg/boot0cfg.8 projects/tcp_cc_7.x/usr.sbin/boot0cfg/boot0cfg.c projects/tcp_cc_7.x/usr.sbin/bsnmpd/modules/snmp_pf/ (props changed) projects/tcp_cc_7.x/usr.sbin/cdcontrol/ (props changed) projects/tcp_cc_7.x/usr.sbin/config/ (props changed) projects/tcp_cc_7.x/usr.sbin/config/config.5 projects/tcp_cc_7.x/usr.sbin/config/config.h projects/tcp_cc_7.x/usr.sbin/config/config.y projects/tcp_cc_7.x/usr.sbin/config/configvers.h projects/tcp_cc_7.x/usr.sbin/config/lang.l projects/tcp_cc_7.x/usr.sbin/config/mkmakefile.c projects/tcp_cc_7.x/usr.sbin/cron/ (props changed) projects/tcp_cc_7.x/usr.sbin/cron/cron/ (props changed) projects/tcp_cc_7.x/usr.sbin/extattr/ (props changed) projects/tcp_cc_7.x/usr.sbin/fifolog/fifolog_create/fifolog.1 projects/tcp_cc_7.x/usr.sbin/freebsd-update/ (props changed) projects/tcp_cc_7.x/usr.sbin/fwcontrol/ (props changed) projects/tcp_cc_7.x/usr.sbin/fwcontrol/fwcontrol.8 projects/tcp_cc_7.x/usr.sbin/fwcontrol/fwcontrol.c projects/tcp_cc_7.x/usr.sbin/fwcontrol/fwmpegts.c projects/tcp_cc_7.x/usr.sbin/iostat/ (props changed) projects/tcp_cc_7.x/usr.sbin/iostat/iostat.c projects/tcp_cc_7.x/usr.sbin/kldxref/Makefile projects/tcp_cc_7.x/usr.sbin/kldxref/ef_i386.c projects/tcp_cc_7.x/usr.sbin/kldxref/ef_obj.c projects/tcp_cc_7.x/usr.sbin/kldxref/fileformat projects/tcp_cc_7.x/usr.sbin/kldxref/kldxref.c projects/tcp_cc_7.x/usr.sbin/mergemaster/ (props changed) projects/tcp_cc_7.x/usr.sbin/mergemaster/mergemaster.8 projects/tcp_cc_7.x/usr.sbin/mergemaster/mergemaster.sh projects/tcp_cc_7.x/usr.sbin/mld6query/mld6query.8 projects/tcp_cc_7.x/usr.sbin/mountd/ (props changed) projects/tcp_cc_7.x/usr.sbin/mtree/ (props changed) projects/tcp_cc_7.x/usr.sbin/mtree/mtree.c projects/tcp_cc_7.x/usr.sbin/ndiscvt/ (props changed) projects/tcp_cc_7.x/usr.sbin/newsyslog/newsyslog.conf.5 (props changed) projects/tcp_cc_7.x/usr.sbin/nscd/ (props changed) projects/tcp_cc_7.x/usr.sbin/nscd/agent.c projects/tcp_cc_7.x/usr.sbin/nscd/agents/group.c projects/tcp_cc_7.x/usr.sbin/nscd/agents/passwd.c projects/tcp_cc_7.x/usr.sbin/nscd/agents/services.c projects/tcp_cc_7.x/usr.sbin/nscd/cachelib.c projects/tcp_cc_7.x/usr.sbin/nscd/cacheplcs.c projects/tcp_cc_7.x/usr.sbin/nscd/config.c projects/tcp_cc_7.x/usr.sbin/nscd/hashtable.h projects/tcp_cc_7.x/usr.sbin/nscd/mp_rs_query.c projects/tcp_cc_7.x/usr.sbin/nscd/mp_ws_query.c projects/tcp_cc_7.x/usr.sbin/nscd/nscd.c projects/tcp_cc_7.x/usr.sbin/nscd/nscd.conf.5 projects/tcp_cc_7.x/usr.sbin/nscd/nscdcli.c projects/tcp_cc_7.x/usr.sbin/nscd/query.c projects/tcp_cc_7.x/usr.sbin/ntp/ (props changed) projects/tcp_cc_7.x/usr.sbin/ntp/doc/ntp-keygen.8 projects/tcp_cc_7.x/usr.sbin/pciconf/ (props changed) projects/tcp_cc_7.x/usr.sbin/pciconf/pciconf.c projects/tcp_cc_7.x/usr.sbin/pkg_install/ (props changed) projects/tcp_cc_7.x/usr.sbin/pkg_install/Makefile.inc projects/tcp_cc_7.x/usr.sbin/pkg_install/add/main.c projects/tcp_cc_7.x/usr.sbin/pkg_install/add/pkg_add.1 projects/tcp_cc_7.x/usr.sbin/pkg_install/create/main.c projects/tcp_cc_7.x/usr.sbin/pkg_install/lib/lib.h projects/tcp_cc_7.x/usr.sbin/pkg_install/lib/pen.c projects/tcp_cc_7.x/usr.sbin/pmcstat/ (props changed) projects/tcp_cc_7.x/usr.sbin/portsnap/ (props changed) projects/tcp_cc_7.x/usr.sbin/portsnap/portsnap/portsnap.8 projects/tcp_cc_7.x/usr.sbin/powerd/ (props changed) projects/tcp_cc_7.x/usr.sbin/powerd/powerd.8 projects/tcp_cc_7.x/usr.sbin/powerd/powerd.c projects/tcp_cc_7.x/usr.sbin/pw/ (props changed) projects/tcp_cc_7.x/usr.sbin/rpc.lockd/ (props changed) projects/tcp_cc_7.x/usr.sbin/rpc.statd/ (props changed) projects/tcp_cc_7.x/usr.sbin/rpc.yppasswdd/ (props changed) projects/tcp_cc_7.x/usr.sbin/rpc.yppasswdd/yppasswdd_main.c projects/tcp_cc_7.x/usr.sbin/rrenumd/rrenumd.8 projects/tcp_cc_7.x/usr.sbin/rtadvd/rtadvd.8 projects/tcp_cc_7.x/usr.sbin/rtsold/rtsold.8 projects/tcp_cc_7.x/usr.sbin/setfib/ (props changed) projects/tcp_cc_7.x/usr.sbin/sysinstall/ (props changed) projects/tcp_cc_7.x/usr.sbin/sysinstall/config.c projects/tcp_cc_7.x/usr.sbin/sysinstall/devices.c projects/tcp_cc_7.x/usr.sbin/sysinstall/dist.c projects/tcp_cc_7.x/usr.sbin/sysinstall/globals.c projects/tcp_cc_7.x/usr.sbin/sysinstall/index.c projects/tcp_cc_7.x/usr.sbin/sysinstall/keymap.c projects/tcp_cc_7.x/usr.sbin/sysinstall/package.c projects/tcp_cc_7.x/usr.sbin/sysinstall/sysinstall.h projects/tcp_cc_7.x/usr.sbin/syslogd/ (props changed) projects/tcp_cc_7.x/usr.sbin/traceroute/ (props changed) projects/tcp_cc_7.x/usr.sbin/traceroute/Makefile projects/tcp_cc_7.x/usr.sbin/traceroute6/traceroute6.8 projects/tcp_cc_7.x/usr.sbin/tzsetup/ (props changed) projects/tcp_cc_7.x/usr.sbin/wpa/wpa_supplicant/ (props changed) Modified: projects/tcp_cc_7.x/COPYRIGHT ============================================================================== --- projects/tcp_cc_7.x/COPYRIGHT Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/COPYRIGHT Tue Feb 3 08:25:24 2009 (r188064) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2009 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 Modified: projects/tcp_cc_7.x/Makefile.inc1 ============================================================================== --- projects/tcp_cc_7.x/Makefile.inc1 Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/Makefile.inc1 Tue Feb 3 08:25:24 2009 (r188064) @@ -487,6 +487,9 @@ distribute32 install32: .if ${MK_CRYPT} != "no" cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif +.if ${MK_KERBEROS} != "no" + cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} +.endif cd ${.CURDIR}/libexec/rtld-elf; \ PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//} Modified: projects/tcp_cc_7.x/ObsoleteFiles.inc ============================================================================== --- projects/tcp_cc_7.x/ObsoleteFiles.inc Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/ObsoleteFiles.inc Tue Feb 3 08:25:24 2009 (r188064) @@ -3531,7 +3531,6 @@ OLD_FILES+=usr/games/worm OLD_FILES+=usr/games/worms OLD_FILES+=usr/games/wump OLD_FILES+=sbin/mount_reiserfs -OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/c++/3.4/ext/demangle.h OLD_FILES+=usr/include/cam/cam_extend.h OLD_FILES+=usr/include/dev/wi/wi_hostap.h @@ -3941,10 +3940,8 @@ OLD_FILES+=usr/share/doc/ntp/release.htm OLD_FILES+=usr/share/doc/ntp/tickadj.htm OLD_FILES+=usr/share/doc/papers/nqnfs.ascii.gz OLD_FILES+=usr/share/doc/papers/px.ascii.gz -OLD_FILES+=usr/share/man/man1/hesinfo.1.gz OLD_FILES+=usr/share/man/man3/mbrune.3.gz OLD_FILES+=usr/share/man/man3/rune.3.gz -OLD_FILES+=usr/share/man/man3/hesiod.3.gz OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz @@ -3959,7 +3956,6 @@ OLD_FILES+=usr/share/man/man3/setruneloc OLD_FILES+=usr/share/man/man3/setinvalidrune.3.gz OLD_FILES+=usr/share/man/man3/mbrune.3.gz OLD_FILES+=usr/share/man/man3/rune.3.gz -OLD_FILES+=usr/share/man/man3/hesiod.3.gz OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz @@ -3975,7 +3971,6 @@ OLD_FILES+=usr/share/man/man3/setinvalid OLD_FILES+=usr/share/man/man3/fungetrune.3.gz OLD_FILES+=usr/share/man/man3/fputrune.3.gz OLD_FILES+=usr/share/man/man3/fgetrune.3.gz -OLD_FILES+=usr/share/man/man5/hesiod.conf.5.gz OLD_FILES+=usr/share/man/man5/usbd.conf.5.gz .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz Modified: projects/tcp_cc_7.x/UPDATING ============================================================================== --- projects/tcp_cc_7.x/UPDATING Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/UPDATING Tue Feb 3 08:25:24 2009 (r188064) @@ -8,6 +8,32 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090119: + NTFS has been removed from GENERIC kernel on amd64 to match + GENERIC on i386. Should not cause any issues since mount_ntfs(8) + will load ntfs.ko module automatically when NTFS support is + actually needed, unless ntfs.ko is not installed or security + level prohibits loading kernel modules. If either is the case, + "options NTFS" has to be added into kernel config. + +20090110: + powerd(8) was updated to get better SMP support. + Meanings of the -i and -r command line options were changed. + +20090107: + snd_hda(4) driver was updated to version 20081226_0122. + + Due to added HDMI audio and logical audio devices support, updated + driver often provides several PCM devices. In some cases it can make + system default audio device no longer correspond to the users's + habbitual audio connectors. In such cases wanted device can be + specified in audio application setup or defined globally via + hw.snd.default_unit sysctl according to sound(4) and snd_hda(4) + man pages. + +20090106: + FreeBSD 7.1-RELEASE + 20080903: ntpd has been upgraded to 4.2.4p5. Modified: projects/tcp_cc_7.x/bin/chio/chio.c ============================================================================== --- projects/tcp_cc_7.x/bin/chio/chio.c Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/bin/chio/chio.c Tue Feb 3 08:25:24 2009 (r188064) @@ -69,7 +69,7 @@ static const char *bits_to_string(ces_st static void find_element(char *, uint16_t *, uint16_t *); static struct changer_element_status *get_element_status - (unsigned int, unsigned int); + (unsigned int, unsigned int, int); static int do_move(const char *, int, char **); static int do_exchange(const char *, int, char **); @@ -969,7 +969,8 @@ do_return(const char *cname, int argc, c ++argv; --argc; /* Get the status */ - ces = get_element_status((unsigned int)type, (unsigned int)element); + ces = get_element_status((unsigned int)type, (unsigned int)element, + CHET_VT == type); if (NULL == ces) errx(1, "%s: null element status pointer", cname); @@ -1004,7 +1005,7 @@ usage: * should free() it when done. */ static struct changer_element_status * -get_element_status(unsigned int type, unsigned int element) +get_element_status(unsigned int type, unsigned int element, int use_voltags) { struct changer_element_status_request cesr; struct changer_element_status *ces; @@ -1020,7 +1021,8 @@ get_element_status(unsigned int type, un cesr.cesr_element_type = (uint16_t)type; cesr.cesr_element_base = (uint16_t)element; cesr.cesr_element_count = 1; /* Only this one element */ - cesr.cesr_flags |= CESR_VOLTAGS; /* Grab voltags as well */ + if (use_voltags) + cesr.cesr_flags |= CESR_VOLTAGS; /* Grab voltags as well */ cesr.cesr_element_status = ces; if (ioctl(changer_fd, CHIOGSTATUS, (char *)&cesr) == -1) { Modified: projects/tcp_cc_7.x/bin/dd/dd.1 ============================================================================== --- projects/tcp_cc_7.x/bin/dd/dd.1 Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/bin/dd/dd.1 Tue Feb 3 08:25:24 2009 (r188064) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd August 15, 2004 +.Dd January 23, 2009 .Dt DD 1 .Os .Sh NAME @@ -392,6 +392,11 @@ Remove parity bit from a file: Check for (even) parity errors on a file: .Pp .Dl "dd if=file conv=pareven | cmp -x - file" +.Pp +To create an image of a Mode-1 CD-ROM, which is a commonly used format +for data CD-ROM disks, use a block size of 2048 bytes: +.Pp +.Dl "dd if=/dev/acd0 of=filename.iso bs=2048" .Sh SEE ALSO .Xr cp 1 , .Xr mt 1 , Modified: projects/tcp_cc_7.x/bin/ln/ln.1 ============================================================================== --- projects/tcp_cc_7.x/bin/ln/ln.1 Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/bin/ln/ln.1 Tue Feb 3 08:25:24 2009 (r188064) @@ -32,20 +32,24 @@ .\" @(#)ln.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd February 14, 2006 +.Dd June 6, 2008 .Dt LN 1 .Os .Sh NAME .Nm ln , .Nm link -.Nd make links +.Nd link files .Sh SYNOPSIS .Nm -.Op Fl Ffhinsv +.Op Fl s Op Fl F +.Op Fl f | iw +.Op Fl hnv .Ar source_file .Op Ar target_file .Nm -.Op Fl Ffhinsv +.Op Fl s Op Fl F +.Op Fl f | iw +.Op Fl hnv .Ar source_file ... .Ar target_dir .Nm link @@ -53,8 +57,13 @@ .Sh DESCRIPTION The .Nm -utility creates a new directory entry (linked file) which has the -same modes as the original file. +utility creates a new directory entry (linked file) for the file name +specified by +.Ar target_file . +The +.Ar target_file +will be created with the same file modes as the +.Ar source_file . It is useful for maintaining multiple copies of a file in many places at once without using up storage for the .Dq copies ; @@ -75,6 +84,8 @@ then unlink it so that the link may occu .Fl f option overrides any previous .Fl i +and +.Fl w options.) .It Fl F If the target file already exists and is a directory, then remove it @@ -130,6 +141,8 @@ Create a symbolic link. Cause .Nm to be verbose, showing files as they are processed. +.It Fl w +Warn if the source of a symbolic link does not currently exist. .El .Pp By default, @@ -140,7 +153,7 @@ links. A hard link to a file is indistinguishable from the original directory entry; any changes to a file are effectively independent of the name used to reference the file. -Hard links may not normally refer to directories and may not span file systems. +Directories may not be hardlinked, and hard links may not span file systems. .Pp A symbolic link contains the name of the file to which it is linked. @@ -190,9 +203,10 @@ operation using the two passed arguments The .Fl h , .Fl i , -.Fl n -and +.Fl n , .Fl v +and +.Fl w options are non-standard and their use in scripts is not recommended. They are provided solely for compatibility with other .Nm Modified: projects/tcp_cc_7.x/bin/ln/ln.c ============================================================================== --- projects/tcp_cc_7.x/bin/ln/ln.c Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/bin/ln/ln.c Tue Feb 3 08:25:24 2009 (r188064) @@ -58,6 +58,8 @@ int hflag; /* Check new name for syml int iflag; /* Interactive mode. */ int sflag; /* Symbolic, not hard, link. */ int vflag; /* Verbose output. */ +int wflag; /* Warn if symlink target does not + * exist, and -f is not enabled. */ /* System link call. */ int (*linkf)(const char *, const char *); char linkch; @@ -92,7 +94,7 @@ main(int argc, char *argv[]) exit(linkit(argv[0], argv[1], 0)); } - while ((ch = getopt(argc, argv, "Ffhinsv")) != -1) + while ((ch = getopt(argc, argv, "Ffhinsvw")) != -1) switch (ch) { case 'F': Fflag = 1; @@ -100,6 +102,7 @@ main(int argc, char *argv[]) case 'f': fflag = 1; iflag = 0; + wflag = 0; break; case 'h': case 'n': @@ -115,6 +118,9 @@ main(int argc, char *argv[]) case 'v': vflag = 1; break; + case 'w': + wflag = 1; + break; case '?': default: usage(); @@ -127,8 +133,10 @@ main(int argc, char *argv[]) linkch = sflag ? '-' : '='; if (sflag == 0) Fflag = 0; - if (Fflag == 1 && iflag == 0) + if (Fflag == 1 && iflag == 0) { fflag = 1; + wflag = 0; /* Implied when fflag != 0 */ + } switch(argc) { case 0: @@ -167,6 +175,7 @@ linkit(const char *target, const char *s const char *p; int ch, exists, first; char path[PATH_MAX]; + char wbuf[PATH_MAX]; if (!sflag) { /* If target doesn't exist, quit now. */ @@ -204,6 +213,32 @@ linkit(const char *target, const char *s exists = !lstat(source, &sb); /* + * If the link source doesn't exist, and a symbolic link was + * requested, and -w was specified, give a warning. + */ + if (sflag && wflag) { + if (*source == '/') { + /* Absolute link source. */ + if (stat(source, &sb) != 0) + warn("warning: %s inaccessible", source); + } else { + /* + * Relative symlink source. Try to construct the + * absolute path of the source, by appending `source' + * to the parent directory of the target. + */ + p = strrchr(target, '/'); + if (p != NULL) + p++; + else + p = target; + (void)snprintf(wbuf, sizeof(wbuf), "%.*s%s", + (int)(p - target), target, source); + if (stat(wbuf, &sb) != 0) + warn("warning: %s", source); + } + } + /* * If the file exists, then unlink it forcibly if -f was specified * and interactively if -i was specified. */ @@ -254,8 +289,8 @@ void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n", - "usage: ln [-Ffhinsv] source_file [target_file]", - " ln [-Ffhinsv] source_file ... target_dir", + "usage: ln [-s [-F]] [-f | -i] [-hnv] source_file [target_file]", + " ln [-s [-F]] [-f | -i] [-hnv] source_file ... target_dir", " link source_file target_file"); exit(1); } Modified: projects/tcp_cc_7.x/bin/test/test.1 ============================================================================== --- projects/tcp_cc_7.x/bin/test/test.1 Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/bin/test/test.1 Tue Feb 3 08:25:24 2009 (r188064) @@ -310,7 +310,7 @@ are evaluated consistently according to standards document. All other cases are subject to the ambiguity in the command semantics. -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility exits with one of the following values: Modified: projects/tcp_cc_7.x/contrib/bind9/CHANGES ============================================================================== --- projects/tcp_cc_7.x/contrib/bind9/CHANGES Tue Feb 3 07:54:42 2009 (r188063) +++ projects/tcp_cc_7.x/contrib/bind9/CHANGES Tue Feb 3 08:25:24 2009 (r188064) @@ -1,9 +1,461 @@ - --- 9.4.2-P1 released --- + --- 9.4.3-P1 released --- -2375. [security] Fully randomize UDP query ports to improve +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] + + --- 9.4.3 released --- + +2490. [port] aix: work around a kernel bug where IPV6_RECVPKTINFO + is cleared when IPV6_V6ONLY is set. [RT #18785] + +2489. [port] solaris: Workaround Solaris's kernel bug about + /dev/poll: + http://bugs.opensolaris.org/view_bug.do?bug_id=6724237 + Define ISC_SOCKET_USE_POLLWATCH at build time to enable + this workaround. [RT #18870] + + --- 9.4.3rc1 released --- + +2473. [port] linux: raise the limit on open files to the possible + maximum value before spawning threads; 'files' + specified in named.conf doesn't seem to work with + threads as expected. [RT #18784] + +2472. [port] linux: check the number of available cpu's before + calling chroot as it depends on "/proc". [RT #16923] + +2471. [bug] named-checkzone was not reporting missing manditory + glue when sibling checks were disabled. [RT #18768] + +2469. [port] solaris: Work around Solaris's select() limitations. + [RT #18769] + +2468. [bug] Resolver could try unreachable servers multiple times. + [RT #18739] + +2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] + +2466. [doc] ARM: explain max-cache-ttl 0 SERVFAIL issue. + [RT #18302] + +2465. [bug] Adb's handling of lame addresses was different + for IPv4 and IPv6. [RT #18738] + +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket + API and glibc hides parts of the IPv6 Advanced Socket + API as a result. This is stupid as it breaks how the + two halves (Basic and Advanced) of the IPv6 Socket API were designed to be used but we have to live with it. + Define _GNU_SOURCE to pull in the IPv6 Advanced Socket + API. [RT #18388] + +2462. [doc] Document -m (enable memory usage debugging) + option for dig. [RT #18757] + +2461. [port] sunos: Change #2363 was not complete. [RT #17513] + +2458. [doc] ARM: update and correction for max-cache-size. + [RT #18294] + +2455. [bug] Stop metadata being transfered via axfr/ixfr. + [RT #18639] + +2453. [bug] Remove NULL pointer dereference in dns_journal_print(). + [RT #18316] + +2449. [bug] libbind: Out of bounds reference in dns_ho.c:addrsort. + [RT #18044] + +2445. [doc] ARM out-of-date on empty reverse zones (list includes + RFC1918 address, but these are not yet compiled in). + [RT #18578] + +2444. [port] Linux, FreeBSD, AIX: Turn off path mtu discovery + (clear DF) for UDP responses and requests. + + --- 9.4.3b3 released --- + +2443. [bug] win32: UDP connect() would not generate an event, + and so connected UDP sockets would never clean up. + Fix this by doing an immediate WSAConnect() rather + than an io completion port type for UDP. + +2438. [bug] Timeouts could be logged incorrectly under win32. + [RT #18617] + +2437. [bug] Sockets could be closed too early, leading to + inconsistent states in the socket module. [RT #18298] + +2436. [security] win32: UDP client handler can be shutdown. [RT #18576] + +2433. [tuning] Set initial timeout to 800ms. + +2432. [bug] More Windows socket handling improvements. Stop + using I/O events and use IO Completion Ports + throughout. Rewrite the receive path logic to make + it easier to support multiple simultaneous + requestrs in the future. Add stricter consistency + checking as a compile-time option (define + ISC_SOCKET_CONSISTENCY_CHECKS; defaults to off). + +2430. [bug] win32: isc_interval_set() could round down to + zero if the input was less than NS_INTERVAL + nanoseconds. Round up instead. [RT #18549] + +2429. [doc] nsupdate should be in section 1 of the man pages. + [RT #18283] + +2426. [bug] libbind: inet_net_pton() can sometimes return the + wrong value if excessively large netmasks are + supplied. [RT #18512] + +2425. [bug] named didn't detect unavailable query source addresses + at load time. [RT #18536] + +2424. [port] configure now probes for a working epoll + implementation. Allow the use of kqueue, + epoll and /dev/poll to be selected at compile + time. [RT #18277] + +2422. [bug] Handle the special return value of a empty node as + if it was a NXRRSET in the validator. [RT #18447] + +2421. [func] Add new command line option '-S' for named to specify + the max number of sockets. [RT #18493] + Use caution: this option may not work for some + operating systems without rebuilding named. + +2420. [bug] Windows socket handling cleanup. Let the io + completion event send out cancelled read/write + done events, which keeps us from writing to memeory + we no longer have ownership of. Add debugging + socket_log() function. Rework TCP socket handling + to not leak sockets. + +2417. [bug] Connecting UDP sockets for outgoing queries could + unexpectedly fail with an 'address already in use' + error. [RT #18411] + +2416. [func] Log file descriptors that cause exceeding the + internal maximum. [RT #18460] + +2414. [bug] A masterdump context held the database lock too long, + causing various troubles such as dead lock and + recursive lock acquisition. [RT #18311, #18456] + +2413. [bug] Fixed an unreachable code path in socket.c. [RT #18442] + +2412. [bug] win32: address a resourse leak. [RT #18374] + +2411. [bug] Allow using a larger number of sockets than FD_SETSIZE + for select(). To enable this, set ISC_SOCKET_MAXSOCKETS + at compilation time. [RT #18433] + +2410. [bug] Correctly delete m_versionInfo. [RT #18432] + +2408. [bug] A duplicate TCP dispatch event could be sent, which + could then trigger an assertion failure in + resquery_response(). [RT #18275] + +2407. [port] hpux: test for sys/dyntune.h. [RT #18421] + +2404. [port] hpux: files unlimited support. + +2403. [bug] TSIG context leak. [RT #18341] + +2402. [port] Support Solaris 2.11 and over. [RT #18362] + +2401. [bug] Expect to get E[MN]FILE errno internal_accept() + (from accept() or fcntl() system calls). [RT #18358] + +2399. [bug] Abort timeout queries to reduce the number of open + UDP sockets. [RT #18367] + +2398. [bug] Improve file descriptor management. New, + temporary, named.conf option reserved-sockets, + default 512. [RT #18344] + +2396. [bug] Don't set SO_REUSEADDR for randomized ports. + [RT #18336] + +2395. [port] Avoid warning and no effect from "files unlimited" + on Linux when running as root. [RT #18335] + +2394. [bug] Default configuration options set the limit for + open files to 'unlimited' as described in the + documentation. [RT #18331] + +2392. [bug] remove 'grep -q' from acl test script, some platforms + don't support it. [RT #18253] + +2391 [port] hpux: cover additional recvmsg() error codes. + [RT #18301] + +2390 [bug] dispatch.c could make a false warning on 'odd socket'. + [RT #18301]. + +2389 [bug] Move the "working directory writable" check to after + the ns_os_changeuser() call. [RT #18326] + +2386. [func] Add warning about too small 'open files' limit. + [RT #18269] + + --- 9.4.3b2 released --- + +2385. [bug] A condition variable in socket.c could leak in + rare error handling [RT #17968]. + +2384. [security] Additional support for query port randomization (change + #2375) including performance improvement and port range + specification. [RT #17949, #18098] + +2383. [bug] named could double queries when they resulted in + SERVFAIL due to overkilling EDNS0 failure detection. + [RT #18182] + +2382. [doc] Add descriptions of IPSECKEY, SPF and SSHFP to ARM. + +2381. [port] dlz/mysql: support multiple install layouts for + mysql. /include/{,mysql/}mysql.h and + /lib/{,mysql/}. [RT #18152] + +2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET + proofs which, in turn, caused validation failures + for insecure zones immediately below a secure zone + the server was authoritative for. [RT #18112] + +2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant + TLDs and supported RRs with TTLs [RT #17972] + +2377. [bug] Address race condition in dnssec-signzone. [RT #18142] + +2376. [bug] Change #2144 was not complete. + +2375. [security] Fully randomize UDP query ports to improve forgery resilience. [RT #17949] +2372. [bug] fixed incorrect TAG_HMACSHA256_BITS value [RT #18047] + +2369. [bug] libbind: Array bounds overrun on read in bitncmp(). + [RT #18054] + +2364. [bug] named could trigger a assertion when serving a + malformed signed zone. [RT #17828] + +2363. [port] sunos: pre-set "lt_cv_sys_max_cmd_len=4096;". + [RT #17513] + +2361. [bug] "recursion" statistics counter could be counted + multiple times for a single query. [RT #17990] + + --- 9.4.3b1 released --- + +2358. [doc] Update host's default query description. [RT #17934] + +2356. [bug] Built in mutex profiler was not scalable enough. + [RT #17436] + +2353. [func] libbind: nsid support. [RT #17091] + +2350. [port] win32: IPv6 support. [RT #17797] + +2347. [bug] Delete now traverses the RB tree in the canonical + order. [RT #17451] + +2345. [bug] named-checkconf failed to detect when forwarders + were set at both the options/view level and in + a root zone. [RT #17671] + +2344. [bug] Improve "logging{ file ...; };" documentation. + [RT #17888] + +2343. [bug] (Seemingly) duplicate IPv6 entries could be + created in ADB. [RT #17837] + +2341. [bug] libbind: add missing -I../include for off source + tree builds. [RT #17606] + +2340. [port] openbsd: interface configuration. [RT #17700] + +2339. [port] tru64: support for libbind. [RT #17589] + +2338. [bug] check_ds() could be called with a non DS rdataset. + [RT #17598] + +2337. [bug] BUILD_LDFLAGS was not being correctly set. [RT #17614] + +2335. [port] sunos: libbind and *printf() support for long long. + [RT #17513] + +2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one + bug in fromstruct_txt(). [RT #17609] + +2333. [bug] Fix off by one error in isc_time_nowplusinterval(). + [RT #17608] + +2332. [contrib] query-loc-0.4.0. [RT #17602] + +2331. [bug] Failure to regenerate any signatures was not being + reported nor being past back to the UPDATE client. + [RT #17570] + +2330. [bug] Remove potential race condition when handling + over memory events. [RT #17572] + + WARNING: API CHANGE: over memory callback + function now needs to call isc_mem_waterack(). + See for details. + +2329. [bug] Clearer help text for dig's '-x' and '-i' options. + +2328. [maint] Add AAAA addresses for A.ROOT-SERVERS.NET, + F.ROOT-SERVERS.NET, H.ROOT-SERVERS.NET, + J.ROOT-SERVERS.NET, K.ROOT-SERVERS.NET and + M.ROOT-SERVERS.NET. + +2326. [bug] It was possible to trigger a INSIST in the acache + processing. + +2325. [port] Linux: use capset() function if available. [RT #17557] + +2323. [port] tru64: namespace clash. [RT #17547] + +2322. [port] MacOS: work around the limitation of setrlimit() + for RLIMIT_NOFILE. [RT #17526] + +2319. [bug] Silence Coverity warnings in + lib/dns/rdata/in_1/apl_42.c. [RT #17469] + +2318. [port] sunos fixes for libbind. [RT #17514] + +2314. [bug] Uninitialized memory use on error path in + bin/named/lwdnoop.c. [RT #17476] + +2313. [cleanup] Silence Coverity warnings. Handle private stacks. + [RT #17447] [RT #17478] + +2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. + [RT #17458] + +2311. [func] Update ACL regression test. [RT #17462] + +2310. [bug] dig, host, nslookup: flush stdout before emitting + debug/fatal messages. [RT #17501] + +2308. [cleanup] Silence Coverity warning in bin/named/controlconf.c. + [RT #17495] + +2307. [bug] Remove infinite loop from lib/dns/sdb.c. [RT #17496] + +2306. [bug] Remove potential race from lib/dns/resolver.c. + [RT #17470] + +2305. [security] inet_network() buffer overflow. CVE-2008-0122. + +2304. [bug] Check returns from all dns_rdata_tostruct() calls. + [RT #17460] + +2303. [bug] Remove unnecessary code from bin/named/lwdgnba.c. + [RT #17471] + +2302. [bug] Fix memset() calls in lib/tests/t_api.c. [RT #17472] + +2301. [bug] Remove resource leak and fix error messages in + bin/tests/system/lwresd/lwtest.c. [RT #17474] + +2300. [bug] Fixed failure to close open file in + bin/tests/names/t_names.c. [RT #17473] + +2299. [bug] Remove unnecessary NULL check in + bin/nsupdate/nsupdate.c. [RT #17475] + +2298. [bug] isc_mutex_lock() failure not caught in + bin/tests/timers/t_timers.c. [RT #17468] + +2297. [bug] isc_entropy_createfilesource() failure not caught in + bin/tests/dst/t_dst.c. [RT #17467] + +2296. [port] Allow docbook stylesheet location to be specified to + configure. [RT #17457] + +2295. [bug] Silence static overrun error in bin/named/lwaddr.c. + [RT #17459] + +2293. [func] Add ACL regression test. [RT #17375] + +2292. [bug] Log if the working directory is not writable. + [RT #17312] + +2291. [bug] PR_SET_DUMPABLE may be set too late. Also report + failure to set PR_SET_DUMPABLE. [RT #17312] + +2290. [bug] Let AD in the query signal that the client wants AD + set in the response. [RT #17301] + +2288. [port] win32: mark service as running when we have finished + loading. [RT #17441] + +2287. [bug] Use 'volatile' if the compiler supports it. [RT #17413] + +2284. [bug] Memory leak in UPDATE prerequisite processing. + [RT #17377] + +2283. [bug] TSIG keys were not attaching to the memory + context. TSIG keys should use the rings + memory context rather than the clients memory + context. [RT #17377] + +2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, + to protect applications from receiving spurious + SIGPIPE signals when using the resolver. + +2278. [bug] win32: handle the case where Windows returns no + search list or DNS suffix. [RT #17354] + +2277. [bug] Empty zone names were not correctly being caught at + in the post parse checks. [RT #17357] + +2273. [bug] Adjust log level to WARNING when saving inconsistent + stub/slave master and journal files. [RT# 17279] + +2272. [bug] Handle illegal dnssec-lookaside trust-anchor names. + [RT #17262] + +2270. [bug] dns_db_closeversion() version->writer could be reset + before it is tested. [RT #17290] + +2269. [contrib] dbus memory leaks and missing va_end calls. [RT #17232] + +2268. [bug] 0.IN-ADDR.ARPA was missing from the empty zones + list. + +2266. [bug] client.c:get_clientmctx() returned the same mctx + once the pool of mctx's was filled. [RT #17218] + +2265. [bug] Test that the memory context's basic_table is non NULL + before freeing. [RT #17265] + +2264. [bug] Server prefix length was being ignored. [RT #17308] + +2263. [bug] "named-checkconf -z" failed to set default value + for "check-integrity". [RT #17306] + +2262. [bug] Error status from all but the last view could be + lost. [RT #17292] + +2260. [bug] Reported wrong clients-per-query when increasing the + value. [RT #17236] + +2247. [doc] Sort doc/misc/options. [RT #17067] + +2246. [bug] Make the startup of test servers (ans.pl) more + robust. [RT #17147] + --- 9.4.2 released --- + --- 9.4.2rc2 released --- 2259. [bug] Reverse incorrect LIBINTERFACE bump of libisc @@ -19,7 +471,7 @@ 2256. [bug] win32: Correctly register the installation location of bindevt.dll. [RT #17159] -2255. [bug] L.ROOT-SERVERS.NET is now 199.7.83.42. +2255. [maint] L.ROOT-SERVERS.NET is now 199.7.83.42. 2254. [bug] timer.c:dispatch() failed to lock timer->lock when reading timer->idle allowing it to see @@ -32,16 +484,16 @@ reality. Note there is behaviour change for BIND 9.5. [RT #17113] -2249. [bug] Only set Authentic Data bit if client requested - DNSSEC, per RFC 3655 [RT #17175] +2249. [bug] Only set Authentic Data bit if client requested + DNSSEC, per RFC 3655 [RT #17175] -2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] +2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] 2245. [bug] Validating lack of DS records at trust anchors wasn't working. [RT #17151] 2238. [bug] It was possible to trigger a REQUIRE when a - validation was cancelled. [RT #17106] + validation was canceled. [RT #17106] 2237. [bug] libbind: res_init() was not thread aware. [RT #17123] @@ -50,8 +502,8 @@ 2235. [bug] was not being installed. [RT #17135] -2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] - +2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] + 2232. [bug] dns_adb_findaddrinfo() could fail and return ISC_R_SUCCESS. [RT #17137] @@ -66,7 +518,7 @@ 2227. [cleanup] Tidied up the FAQ. [RT #17121] 2225. [bug] More support for systems with no IPv4 addresses. - [RT #17111] + [RT #17111] 2224. [bug] Defer journal compaction if a xfrin is in progress. [RT #17119] @@ -80,15 +532,15 @@ 2220. [bug] win32: Address a race condition in final shutdown of the Windows socket code. [RT #17028] - -2219. [bug] Apply zone consistancy checks to additions, not + +2219. [bug] Apply zone consistency checks to additions, not removals, when updating. [RT #17049] 2218. [bug] Remove unnecessary REQUIRE from dns_validator_create(). [RT #16976] 2216. [cleanup] Fix a number of errors reported by Coverity. - [RT #17094] + [RT #17094] 2215. [bug] Bad REQUIRE check isc_hmacsha1_verify(). [RT #17094] @@ -131,13 +583,13 @@ localhost;) is used. [RT #16987] - + 2205. [bug] libbind: change #2119 broke thread support. [RT #16982] 2203. [security] Query id generation was cryptographically weak. [RT # 16915] -2202. [security] The default acls for allow-query-cache and +2202. [security] The default acls for allow-query-cache and allow-recursion were not being applied. [RT #16960] 2200. [bug] The search for cached NSEC records was stopping to @@ -172,7 +624,7 @@ 2187. [bug] query_addds(), query_addwildcardproof() and query_addnxrrsetnsec() should take a version - arguement. [RT #16368] + argument. [RT #16368] 2186. [port] cygwin: libbind: check for struct sockaddr_storage independently of IPv6. [RT #16482] @@ -199,7 +651,7 @@ debug level 10+. [RT #16798] 2176. [contrib] dbus update to handle race condition during - initialisation (Bugzilla 235809). [RT #16842] + initialization (Bugzilla 235809). [RT #16842] 2175. [bug] win32: windows broadcast condition variable support was broken. [RT #16592] @@ -230,7 +682,7 @@ a server address as a name to be looked up, causing unexpected output. [RT #16743] -2164. [bug] The code to determine how named-checkzone / +2164. [bug] The code to determine how named-checkzone / named-compilezone was called failed under windows. [RT #16764] @@ -244,7 +696,7 @@ 2159. [bug] Array bounds overrun in acache processing. [RT #16710] -2158. [bug] ns_client_isself() failed to initialise key +2158. [bug] ns_client_isself() failed to initialize key leading to a REQUIRE failure. [RT #16688] 2156. [bug] Fix node reference leaks in lookup.c:lookup_find(), @@ -319,7 +771,7 @@ 2136. [bug] nslookup/host looped if there was no search list and the host didn't exist. [RT #16657] -2135. [bug] Uninitialised rdataset in sdlz.c. [RT# 16656] +2135. [bug] Uninitialized rdataset in sdlz.c. [RT# 16656] 2133. [port] powerpc: Support both IBM and MacOS Power PC assembler syntaxes. [RT #16647] @@ -335,7 +787,7 @@ 2127. [port] Improved OpenSSL 0.9.8 support. [RT #16563] -2126. [security] Serialise validation of type ANY responses. [RT #16555] +2126. [security] Serialize validation of type ANY responses. [RT #16555] 2125. [bug] dns_zone_getzeronosoattl() REQUIRE failure if DLZ was defined. [RT #16574] @@ -375,7 +827,7 @@ 2111. [bug] Fix a number of errors reported by Coverity. [RT #16507] -2110. [bug] "minimal-response yes;" interacted badly with BIND 8 +2110. [bug] "minimal-responses yes;" interacted badly with BIND 8 priming queries. [RT #16491] 2109. [port] libbind: silence aix 5.3 compiler warnings. [RT #16502] @@ -387,7 +839,7 @@ 2103. [port] Add /usr/sfw to list of locations for OpenSSL under Solaris. -2102. [port] Silence solaris 10 warnings. +2102. [port] Silence Solaris 10 warnings. --- 9.4.0b4 released --- @@ -397,7 +849,7 @@ 2100. [port] win32: copy libeay32.dll to Build\Debug. Copy Debug\named-checkzone to Debug\named-compilezone. -2099. [port] win32: more manifiest issues. +2099. [port] win32: more manifest issues. 2098. [bug] Race in rbtdb.c:no_references(), which occasionally triggered an INSIST failure about the node lock @@ -413,14 +865,14 @@ 2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and net_cidr_ntop_ipv6(). [RT #16388] - + 2094. [contrib] Update named-bootconf. [RT# 16404] 2093. [bug] named-checkzone -s was broken. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 18:52:54 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DF621065679; Tue, 3 Feb 2009 18:52:54 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB978FC20; Tue, 3 Feb 2009 18:52:53 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13Iqrrm038442; Tue, 3 Feb 2009 18:52:53 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13IqrpW038440; Tue, 3 Feb 2009 18:52:53 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902031852.n13IqrpW038440@svn.freebsd.org> From: Sam Leffler Date: Tue, 3 Feb 2009 18:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188083 - in projects/cambria/sys: arm/xscale/ixp425 conf X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 18:52:55 -0000 Author: sam Date: Tue Feb 3 18:52:53 2009 New Revision: 188083 URL: http://svn.freebsd.org/changeset/base/188083 Log: move cfi bus shim so it won't get pulled in for non-xscale boards Modified: projects/cambria/sys/arm/xscale/ixp425/files.ixp425 projects/cambria/sys/conf/files.arm Modified: projects/cambria/sys/arm/xscale/ixp425/files.ixp425 ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/files.ixp425 Tue Feb 3 18:08:32 2009 (r188082) +++ projects/cambria/sys/arm/xscale/ixp425/files.ixp425 Tue Feb 3 18:52:53 2009 (r188083) @@ -15,6 +15,7 @@ arm/xscale/ixp425/uart_cpu_ixp425.c opti arm/xscale/ixp425/uart_bus_ixp425.c optional uart arm/xscale/ixp425/ixp425_a4x_space.c optional uart arm/xscale/ixp425/ixp425_a4x_io.S optional uart +dev/cfi/cfi_bus_ixp4xx.c optional cfi dev/uart/uart_dev_ns8250.c optional uart # # NPE-based Ethernet support (requires qmgr also). Modified: projects/cambria/sys/conf/files.arm ============================================================================== --- projects/cambria/sys/conf/files.arm Tue Feb 3 18:08:32 2009 (r188082) +++ projects/cambria/sys/conf/files.arm Tue Feb 3 18:52:53 2009 (r188083) @@ -47,7 +47,6 @@ arm/arm/vm_machdep.c standard arm/fpe-arm/armfpe_glue.S optional armfpe arm/fpe-arm/armfpe_init.c optional armfpe arm/fpe-arm/armfpe.S optional armfpe -dev/cfi/cfi_bus_ixp4xx.c optional cfi geom/geom_bsd.c optional geom_bsd geom/geom_bsd_enc.c optional geom_bsd geom/geom_mbr.c optional geom_mbr From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 19:25:24 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 184CF1065670; Tue, 3 Feb 2009 19:25:24 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04C1E8FC0C; Tue, 3 Feb 2009 19:25:24 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13JPNWU039404; Tue, 3 Feb 2009 19:25:23 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13JPN2N039403; Tue, 3 Feb 2009 19:25:23 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902031925.n13JPN2N039403@svn.freebsd.org> From: Sam Leffler Date: Tue, 3 Feb 2009 19:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188090 - in projects/vap7/sys: . arm/include contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 19:25:24 -0000 Author: sam Date: Tue Feb 3 19:25:23 2009 New Revision: 188090 URL: http://svn.freebsd.org/changeset/base/188090 Log: merge r188085: force atomic_cmpset_ptr types to match atomic_cmpset_32 Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/arm/include/atomic.h projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) Modified: projects/vap7/sys/arm/include/atomic.h ============================================================================== --- projects/vap7/sys/arm/include/atomic.h Tue Feb 3 19:21:15 2009 (r188089) +++ projects/vap7/sys/arm/include/atomic.h Tue Feb 3 19:25:23 2009 (r188090) @@ -365,7 +365,8 @@ atomic_readandclear_32(volatile u_int32_ #define atomic_clear_ptr atomic_clear_32 #define atomic_set_ptr atomic_set_32 -#define atomic_cmpset_ptr atomic_cmpset_32 +#define atomic_cmpset_ptr(dst, old, new) \ + atomic_cmpset_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) #define atomic_cmpset_rel_ptr atomic_cmpset_ptr #define atomic_cmpset_acq_ptr atomic_cmpset_ptr #define atomic_store_ptr atomic_store_32 From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 19:27:06 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B4221065673; Tue, 3 Feb 2009 19:27:06 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C6918FC12; Tue, 3 Feb 2009 19:27:06 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13JR6tH039490; Tue, 3 Feb 2009 19:27:06 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13JR6jP039488; Tue, 3 Feb 2009 19:27:06 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902031927.n13JR6jP039488@svn.freebsd.org> From: Sam Leffler Date: Tue, 3 Feb 2009 19:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188091 - in projects/vap7/sys: . conf contrib/pf dev dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar5416 ... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 19:27:07 -0000 Author: sam Date: Tue Feb 3 19:27:06 2009 New Revision: 188091 URL: http://svn.freebsd.org/changeset/base/188091 Log: merge r184251: add cfi driver Added: projects/vap7/sys/dev/cfi/ - copied from r184251, head/sys/dev/cfi/ Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/conf/files projects/vap7/sys/conf/files.powerpc projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) Modified: projects/vap7/sys/conf/files ============================================================================== --- projects/vap7/sys/conf/files Tue Feb 3 19:25:23 2009 (r188090) +++ projects/vap7/sys/conf/files Tue Feb 3 19:27:06 2009 (r188091) @@ -666,6 +666,8 @@ dev/buslogic/bt_pci.c optional bt pci dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus +dev/cfi/cfi_core.c optional cfi +dev/cfi/cfi_dev.c optional cfi dev/ciss/ciss.c optional ciss dev/cm/smc90cx6.c optional cm dev/cmx/cmx.c optional cmx Modified: projects/vap7/sys/conf/files.powerpc ============================================================================== --- projects/vap7/sys/conf/files.powerpc Tue Feb 3 19:25:23 2009 (r188090) +++ projects/vap7/sys/conf/files.powerpc Tue Feb 3 19:27:06 2009 (r188091) @@ -16,6 +16,7 @@ font.h optional # dev/bm/if_bm.c optional bm powermac +dev/cfi/cfi_bus_lbc.c optional cfi dev/fb/fb.c optional sc dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/kbd/kbd.c optional sc From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 19:47:33 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84CC01065672; Tue, 3 Feb 2009 19:47:33 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57CFD8FC1B; Tue, 3 Feb 2009 19:47:33 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13JlVTe039972; Tue, 3 Feb 2009 19:47:31 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13JlVZg039971; Tue, 3 Feb 2009 19:47:31 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902031947.n13JlVZg039971@svn.freebsd.org> From: Sam Leffler Date: Tue, 3 Feb 2009 19:47:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188092 - projects/vap7/sys/sys X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 19:47:33 -0000 Author: sam Date: Tue Feb 3 19:47:31 2009 New Revision: 188092 URL: http://svn.freebsd.org/changeset/base/188092 Log: manually add; it didn't get included in the merge of r184251 Added: projects/vap7/sys/sys/cfictl.h (contents, props changed) Added: projects/vap7/sys/sys/cfictl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/sys/sys/cfictl.h Tue Feb 3 19:47:31 2009 (r188092) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2007, Juniper Networks, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_CFICTL_H_ +#define _SYS_CFICTL_H_ + +/* + * Allow reading of the CFI query structure. + */ + +struct cfiocqry { + unsigned long offset; + unsigned long count; + u_char *buffer; +}; + +#define CFIOCQRY _IOWR('q', 0, struct cfiocqry) + +#endif /* _SYS_CFICTL_H_ */ From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 19:49:27 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 153501065672; Tue, 3 Feb 2009 19:49:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA94D8FC23; Tue, 3 Feb 2009 19:49:26 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13JnQ43040099; Tue, 3 Feb 2009 19:49:26 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13JnQaG040098; Tue, 3 Feb 2009 19:49:26 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902031949.n13JnQaG040098@svn.freebsd.org> From: Sam Leffler Date: Tue, 3 Feb 2009 19:49:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188094 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 19:49:29 -0000 Author: sam Date: Tue Feb 3 19:49:26 2009 New Revision: 188094 URL: http://svn.freebsd.org/changeset/base/188094 Log: merge r188086: reorg ioctl code to simplify adding new requests Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cfi/cfi_dev.c projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) Modified: projects/vap7/sys/dev/cfi/cfi_dev.c ============================================================================== --- projects/vap7/sys/dev/cfi/cfi_dev.c Tue Feb 3 19:49:21 2009 (r188093) +++ projects/vap7/sys/dev/cfi/cfi_dev.c Tue Feb 3 19:49:26 2009 (r188094) @@ -252,26 +252,31 @@ cfi_devioctl(struct cdev *dev, u_long cm int error; u_char val; - if (cmd != CFIOCQRY) - return (ENOIOCTL); - sc = dev->si_drv1; + error = 0; - error = (sc->sc_writing) ? cfi_block_finish(sc) : 0; - if (error) - return (error); - - rq = (struct cfiocqry *)data; - - if (rq->offset >= sc->sc_size / sc->sc_width) - return (ESPIPE); - if (rq->offset + rq->count > sc->sc_size / sc->sc_width) - return (ENOSPC); - - while (!error && rq->count--) { - val = cfi_read_qry(sc, rq->offset++); - error = copyout(&val, rq->buffer++, 1); + switch(cmd) { + case CFIOCQRY: + if (sc->sc_writing) { + error = cfi_block_finish(sc); + if (error) + break; + } + + rq = (struct cfiocqry *)data; + if (rq->offset >= sc->sc_size / sc->sc_width) + return (ESPIPE); + if (rq->offset + rq->count > sc->sc_size / sc->sc_width) + return (ENOSPC); + + while (!error && rq->count--) { + val = cfi_read_qry(sc, rq->offset++); + error = copyout(&val, rq->buffer++, 1); + } + break; + default: + error = ENOIOCTL; + break; } - return (error); } From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 19:50:12 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0366410656C4; Tue, 3 Feb 2009 19:50:11 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA7048FC18; Tue, 3 Feb 2009 19:50:11 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13JoB0c040168; Tue, 3 Feb 2009 19:50:11 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13JoBnQ040166; Tue, 3 Feb 2009 19:50:11 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902031950.n13JoBnQ040166@svn.freebsd.org> From: Sam Leffler Date: Tue, 3 Feb 2009 19:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188095 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 19:50:16 -0000 Author: sam Date: Tue Feb 3 19:50:11 2009 New Revision: 188095 URL: http://svn.freebsd.org/changeset/base/188095 Log: merge r188087: honor any interface width, add xscale bus shim Added: projects/vap7/sys/dev/cfi/cfi_bus_ixp4xx.c - copied unchanged from r188087, head/sys/dev/cfi/cfi_bus_ixp4xx.c Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cfi/cfi_core.c projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) Copied: projects/vap7/sys/dev/cfi/cfi_bus_ixp4xx.c (from r188087, head/sys/dev/cfi/cfi_bus_ixp4xx.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/sys/dev/cfi/cfi_bus_ixp4xx.c Tue Feb 3 19:50:11 2009 (r188095, copy of r188087, head/sys/dev/cfi/cfi_bus_ixp4xx.c) @@ -0,0 +1,79 @@ +/*- + * Copyright (c) 2009 Sam Leffler, Errno Consulting + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +static int +cfi_ixp4xx_probe(device_t dev) +{ + struct cfi_softc *sc = device_get_softc(dev); + /* + * NB: we assume the boot loader sets up EXP_TIMING_CS0_OFFSET + * according to the flash on the board. If it does not then it + * can be done here. + */ + if (bootverbose) { + struct ixp425_softc *sa = + device_get_softc(device_get_parent(dev)); + device_printf(dev, "EXP_TIMING_CS0_OFFSET 0x%x\n", + EXP_BUS_READ_4(sa, EXP_TIMING_CS0_OFFSET)); + } + sc->sc_width = 2; /* NB: don't probe interface width */ + return cfi_probe(dev); +} + +static device_method_t cfi_ixp4xx_methods[] = { + /* device interface */ + DEVMETHOD(device_probe, cfi_ixp4xx_probe), + DEVMETHOD(device_attach, cfi_attach), + DEVMETHOD(device_detach, cfi_detach), + + {0, 0} +}; + +static driver_t cfi_ixp4xx_driver = { + cfi_driver_name, + cfi_ixp4xx_methods, + sizeof(struct cfi_softc), +}; +DRIVER_MODULE (cfi, ixp, cfi_ixp4xx_driver, cfi_devclass, 0, 0); Modified: projects/vap7/sys/dev/cfi/cfi_core.c ============================================================================== --- projects/vap7/sys/dev/cfi/cfi_core.c Tue Feb 3 19:49:26 2009 (r188094) +++ projects/vap7/sys/dev/cfi/cfi_core.c Tue Feb 3 19:50:11 2009 (r188095) @@ -150,11 +150,16 @@ cfi_probe(device_t dev) sc->sc_tag = rman_get_bustag(sc->sc_res); sc->sc_handle = rman_get_bushandle(sc->sc_res); - sc->sc_width = 1; - while (sc->sc_width <= 4) { - if (cfi_read_qry(sc, CFI_QRY_IDENT) == 'Q') - break; - sc->sc_width <<= 1; + if (sc->sc_width == 0) { + sc->sc_width = 1; + while (sc->sc_width <= 4) { + if (cfi_read_qry(sc, CFI_QRY_IDENT) == 'Q') + break; + sc->sc_width <<= 1; + } + } else if (cfi_read_qry(sc, CFI_QRY_IDENT) != 'Q') { + error = ENXIO; + goto out; } if (sc->sc_width > 4) { error = ENXIO; From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 20:01:52 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65EF71065673; Tue, 3 Feb 2009 20:01:52 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5057C8FC19; Tue, 3 Feb 2009 20:01:52 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13K1qEG040510; Tue, 3 Feb 2009 20:01:52 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13K1pBh040503; Tue, 3 Feb 2009 20:01:51 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902032001.n13K1pBh040503@svn.freebsd.org> From: Sam Leffler Date: Tue, 3 Feb 2009 20:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188097 - in projects/vap7/sys: . arm/conf arm/xscale/ixp425 contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 20:01:53 -0000 Author: sam Date: Tue Feb 3 20:01:51 2009 New Revision: 188097 URL: http://svn.freebsd.org/changeset/base/188097 Log: merge r188088+r188089: add support for the StrataFlash on 2348 boards Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/arm/conf/AVILA projects/vap7/sys/arm/conf/AVILA.hints projects/vap7/sys/arm/xscale/ixp425/avila_machdep.c projects/vap7/sys/arm/xscale/ixp425/files.ixp425 projects/vap7/sys/arm/xscale/ixp425/ixp425.c projects/vap7/sys/arm/xscale/ixp425/ixp425reg.h projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cfi/cfi_bus_ixp4xx.c projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) Modified: projects/vap7/sys/arm/conf/AVILA ============================================================================== --- projects/vap7/sys/arm/conf/AVILA Tue Feb 3 19:58:28 2009 (r188096) +++ projects/vap7/sys/arm/conf/AVILA Tue Feb 3 20:01:51 2009 (r188097) @@ -88,13 +88,15 @@ device mem # Memory and kernel memory device pci device uart +device ixpwdog # watchdog timer +device cfi # flash support + # I2C Bus device iicbus device iicbb device iic device ixpiic -device ixpwdog # watchdog timer device ds1672 # DS1672 on I2C bus device ad7418 # AD7418 on I2C bus Modified: projects/vap7/sys/arm/conf/AVILA.hints ============================================================================== --- projects/vap7/sys/arm/conf/AVILA.hints Tue Feb 3 19:58:28 2009 (r188096) +++ projects/vap7/sys/arm/conf/AVILA.hints Tue Feb 3 20:01:51 2009 (r188097) @@ -28,6 +28,10 @@ hint.npe.1.mac="B" hint.npe.1.mii="A" hint.npe.1.phy=1 +# FLASH +hint.cfi.0.at="ixp0" +hint.cfi.0.addr=0x50000000 + # CF IDE controller hint.ata_avila.0.at="ixp0" Modified: projects/vap7/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- projects/vap7/sys/arm/xscale/ixp425/avila_machdep.c Tue Feb 3 19:58:28 2009 (r188096) +++ projects/vap7/sys/arm/xscale/ixp425/avila_machdep.c Tue Feb 3 20:01:51 2009 (r188097) @@ -159,6 +159,10 @@ static const struct pmap_devmap ixp425_d PTE_NOCACHE, }, + /* CFI Flash on the Expansion Bus */ + { IXP425_EXP_BUS_CS0_VBASE, IXP425_EXP_BUS_CS0_HWBASE, + IXP425_EXP_BUS_CS0_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + /* IXP425 PCI Configuration */ { IXP425_PCI_VBASE, Modified: projects/vap7/sys/arm/xscale/ixp425/files.ixp425 ============================================================================== --- projects/vap7/sys/arm/xscale/ixp425/files.ixp425 Tue Feb 3 19:58:28 2009 (r188096) +++ projects/vap7/sys/arm/xscale/ixp425/files.ixp425 Tue Feb 3 20:01:51 2009 (r188097) @@ -15,6 +15,7 @@ arm/xscale/ixp425/uart_cpu_ixp425.c opti arm/xscale/ixp425/uart_bus_ixp425.c optional uart arm/xscale/ixp425/ixp425_a4x_space.c optional uart arm/xscale/ixp425/ixp425_a4x_io.S optional uart +dev/cfi/cfi_bus_ixp4xx.c optional cfi dev/uart/uart_dev_ns8250.c optional uart # # NPE-based Ethernet support (requires qmgr also). Modified: projects/vap7/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- projects/vap7/sys/arm/xscale/ixp425/ixp425.c Tue Feb 3 19:58:28 2009 (r188096) +++ projects/vap7/sys/arm/xscale/ixp425/ixp425.c Tue Feb 3 20:01:51 2009 (r188097) @@ -73,6 +73,8 @@ static struct { { IXP425_EXP_HWBASE, IXP425_EXP_SIZE, IXP425_EXP_VBASE }, { IXP425_PCI_HWBASE, IXP425_PCI_SIZE, IXP425_PCI_VBASE }, { IXP425_PCI_MEM_HWBASE,IXP425_PCI_MEM_SIZE, IXP425_PCI_MEM_VBASE }, + { IXP425_EXP_BUS_CS0_HWBASE, IXP425_EXP_BUS_CS0_SIZE, + IXP425_EXP_BUS_CS0_VBASE }, #if 0 { IXP425_PCI_IO_HWBASE, IXP425_PCI_IO_SIZE, IXP425_PCI_IO_VBASE }, #endif Modified: projects/vap7/sys/arm/xscale/ixp425/ixp425reg.h ============================================================================== --- projects/vap7/sys/arm/xscale/ixp425/ixp425reg.h Tue Feb 3 19:58:28 2009 (r188096) +++ projects/vap7/sys/arm/xscale/ixp425/ixp425reg.h Tue Feb 3 20:01:51 2009 (r188097) @@ -73,6 +73,10 @@ /* * FFFF FFFF --------------------------- * + * FE00 0000 --------------------------- + * 16M CFI Flash (on ext bus) + * FD00 0000 --------------------------- + * * FC00 0000 --------------------------- * PCI Data (memory space) * F800 0000 --------------------------- @@ -569,6 +573,9 @@ #define IXP425_EXP_BUS_CSx_VBASE(i) \ (IXP425_MAC_B_VBASE + (i)*IXP425_MAC_B_SIZE) +#define IXP425_EXP_BUS_CS0_HWBASE IXP425_EXP_BUS_CSx_HWBASE(0) +#define IXP425_EXP_BUS_CS0_VBASE 0xFD000000UL +#define IXP425_EXP_BUS_CS0_SIZE 0x01000000 /* NB: 16M */ #define IXP425_EXP_BUS_CS1_HWBASE IXP425_EXP_BUS_CSx_HWBASE(1) #define IXP425_EXP_BUS_CS1_VBASE IXP425_EXP_BUS_CSx_VBASE(1) #define IXP425_EXP_BUS_CS1_SIZE 0x1000 @@ -583,7 +590,6 @@ #define IXP425_EXP_BUS_CS4_SIZE 0x1000 /* NB: not mapped (yet) */ -#define IXP425_EXP_BUS_CS0_HWBASE IXP425_EXP_BUS_CSx_HWBASE(0) #define IXP425_EXP_BUS_CS5_HWBASE IXP425_EXP_BUS_CSx_HWBASE(5) #define IXP425_EXP_BUS_CS6_HWBASE IXP425_EXP_BUS_CSx_HWBASE(6) #define IXP425_EXP_BUS_CS7_HWBASE IXP425_EXP_BUS_CSx_HWBASE(7) Modified: projects/vap7/sys/dev/cfi/cfi_bus_ixp4xx.c ============================================================================== --- projects/vap7/sys/dev/cfi/cfi_bus_ixp4xx.c Tue Feb 3 19:58:28 2009 (r188096) +++ projects/vap7/sys/dev/cfi/cfi_bus_ixp4xx.c Tue Feb 3 20:01:51 2009 (r188097) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2009 Roelof Jonkman, Carlson Wireless Inc. * Copyright (c) 2009 Sam Leffler, Errno Consulting * All rights reserved. * From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 20:37:38 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E775A106564A; Tue, 3 Feb 2009 20:37:38 +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 D43808FC0A; Tue, 3 Feb 2009 20:37:38 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13Kbcq9041336; Tue, 3 Feb 2009 20:37:38 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13Kbclo041335; Tue, 3 Feb 2009 20:37:38 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200902032037.n13Kbclo041335@svn.freebsd.org> From: Ulf Lilleengen Date: Tue, 3 Feb 2009 20:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188101 - projects/geom_raid5/sys/geom/raid5 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 20:37:39 -0000 Author: lulf Date: Tue Feb 3 20:37:38 2009 New Revision: 188101 URL: http://svn.freebsd.org/changeset/base/188101 Log: - Try and make the use of , consistent, as it varies with spacing and not spacing. Putting a space makes it much more readable. - Various other small readability cleanups as well as a few comments on things that should be looked at in more detail later. Modified: projects/geom_raid5/sys/geom/raid5/g_raid5.c Modified: projects/geom_raid5/sys/geom/raid5/g_raid5.c ============================================================================== --- projects/geom_raid5/sys/geom/raid5/g_raid5.c Tue Feb 3 20:33:28 2009 (r188100) +++ projects/geom_raid5/sys/geom/raid5/g_raid5.c Tue Feb 3 20:37:38 2009 (r188101) @@ -27,14 +27,14 @@ */ #include -__FBSDID("$Id: g_raid5.c,v 1.271.1.274 2008/07/29 13:58:03 aw Exp aw $"); +__FBSDID("$Id: g_raid5.c, v 1.271.1.274 2008/07/29 13:58:03 aw Exp aw $"); #ifdef KASSERT -#define MYKASSERT(a,b) KASSERT(a,b) +#define MYKASSERT(a, b) KASSERT(a, b) #else -#define MYKASSERT(a,b) do {if (!(a)) { G_RAID5_DEBUG(0,"KASSERT in line %d.",__LINE__); panic b;}} while (0) +#define MYKASSERT(a, b) do {if (!(a)) { G_RAID5_DEBUG(0, "KASSERT in line %d.", __LINE__); panic b;}} while (0) #endif -#define ORDER(a,b) do {if (a > b) { int tmp = a; a = b; b = tmp; }} while(0) +#define ORDER(a, b) do {if (a > b) { int tmp = a; a = b; b = tmp; }} while(0) #include #include @@ -63,7 +63,7 @@ SYSCTL_INT(_kern_geom_raid5, OID_AUTO, c 0, "cache size (( per bucket) in bytes"); static int g_raid5_cache_size = -5; TUNABLE_INT("kern.geom.raid5.cs", &g_raid5_cache_size); -SYSCTL_INT(_kern_geom_raid5, OID_AUTO, cs, CTLFLAG_RW, &g_raid5_cache_size,0, +SYSCTL_INT(_kern_geom_raid5, OID_AUTO, cs, CTLFLAG_RW, &g_raid5_cache_size, 0, "cache size (( per bucket)"); static u_int g_raid5_debug = 0; TUNABLE_INT("kern.geom.raid5.debug", &g_raid5_debug); @@ -87,7 +87,7 @@ SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, 0, "veri brake factor in case of veri_min * X < veri_max"); static u_int g_raid5_veri_nice = 100; TUNABLE_INT("kern.geom.raid5.veri_nice", &g_raid5_veri_nice); -SYSCTL_UINT(_kern_geom_raid5, OID_AUTO,veri_nice, CTLFLAG_RW,&g_raid5_veri_nice, +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, veri_nice, CTLFLAG_RW, &g_raid5_veri_nice, 0, "wait this many milli seconds after last user-read (less than 1sec)"); static u_int g_raid5_vsc = 0; SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, veri, CTLFLAG_RD, &g_raid5_vsc, 0, @@ -108,22 +108,22 @@ static u_int g_raid5_w2rc = 0; SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, wreq2_cnt, CTLFLAG_RD, &g_raid5_w2rc, 0, "write request count (2-phase)"); static u_int g_raid5_disks_ok = 50; -SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, dsk_ok, CTLFLAG_RD, &g_raid5_disks_ok,0, +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, dsk_ok, CTLFLAG_RD, &g_raid5_disks_ok, 0, "repeat EIO'ed request?"); static u_int g_raid5_blked1 = 0; -SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, blked1, CTLFLAG_RD, &g_raid5_blked1,0, +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, blked1, CTLFLAG_RD, &g_raid5_blked1, 0, "1. kind block count"); static u_int g_raid5_blked2 = 0; -SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, blked2, CTLFLAG_RD, &g_raid5_blked2,0, +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, blked2, CTLFLAG_RD, &g_raid5_blked2, 0, "2. kind block count"); static u_int g_raid5_wqp = 0; -SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, wqp, CTLFLAG_RD, &g_raid5_wqp,0, +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, wqp, CTLFLAG_RD, &g_raid5_wqp, 0, "max. write queue length"); static u_int g_raid5_mhm = 0; -SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, mhm, CTLFLAG_RD, &g_raid5_mhm,0, +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, mhm, CTLFLAG_RD, &g_raid5_mhm, 0, "memory hamster miss"); static u_int g_raid5_mhh = 0; -SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, mhh, CTLFLAG_RD, &g_raid5_mhh,0, +SYSCTL_UINT(_kern_geom_raid5, OID_AUTO, mhh, CTLFLAG_RD, &g_raid5_mhh, 0, "memory hamster hit"); static MALLOC_DEFINE(M_RAID5, "raid5_data", "GEOM_RAID5 Data"); @@ -161,11 +161,14 @@ gcd(u_int a, u_int b) a = b; b = c % b; } - return a; + return (a); } + static __inline u_int g_raid5_lcm(u_int a, u_int b) -{ return ((a * b) / gcd(a, b)); } +{ + return ((a * b) / gcd(a, b)); +} /* * memory hamster stuff @@ -175,35 +178,57 @@ g_raid5_lcm(u_int a, u_int b) */ static __inline int g_raid5_mh_sz_by_a(caddr_t m) -{ return ((int*)m)[-1]; } +{ + + return ((int *)m)[-1]; +} + static __inline int g_raid5_mh_sz_by_i(struct g_raid5_softc *sc, int i) -{ return g_raid5_mh_sz_by_a(sc->mhl[i]); } +{ + + return (g_raid5_mh_sz_by_a(sc->mhl[i])); +} + static __inline void g_raid5_mh_sz(caddr_t m, int l) -{ ((int*)m)[-1] = l; } +{ + + ((int *)m)[-1] = l; +} + static __inline void -g_raid5_free_by_a(caddr_t m) -{ free(m - sizeof(int), M_RAID5); } +g_raid5_free_by_a(caddr_t m, lol) +{ + + free(m - sizeof(int), M_RAID5); +} + static __inline void g_raid5_free_by_i(struct g_raid5_softc *sc, int mi) -{ g_raid5_free_by_a(sc->mhl[mi]); } +{ + + g_raid5_free_by_a(sc->mhl[mi]); +} + static void -g_raid5_mh_all_free(struct g_raid5_softc *sc) { - for (int i=0; imhc; i++) - g_raid5_free_by_i(sc,i); +g_raid5_mh_all_free(struct g_raid5_softc *sc) +{ + for (int i = 0; i < sc->mhc; i++) + g_raid5_free_by_i(sc, i); sc->mhc = 0; } + static caddr_t g_raid5_malloc(struct g_raid5_softc *sc, int l, int force) { - mtx_lock(&sc->mh_mtx); int h = l*2; int fi = -1; int fl = -1; - int i; - for (i=0; imhc; i++) { - int ml = g_raid5_mh_sz_by_i(sc,i); + + mtx_lock(&sc->mh_mtx); + for (int i = 0; i < sc->mhc; i++) { + int ml = g_raid5_mh_sz_by_i(sc, i); if (ml < l || ml > h) continue; if (fl > 0 && ml >= fl) @@ -224,23 +249,24 @@ g_raid5_malloc(struct g_raid5_softc *sc, } else { g_raid5_mhm++; mtx_unlock(&sc->mh_mtx); - m = malloc(l+sizeof(fl), M_RAID5, M_NOWAIT); + m = malloc(l + sizeof(fl), M_RAID5, M_NOWAIT); if (m == NULL && force) { g_raid5_mh_all_free(sc); - m = malloc(l+sizeof(fl), M_RAID5, M_WAITOK); + m = malloc(l + sizeof(fl), M_RAID5, M_WAITOK); } if (m != NULL) { m += sizeof(fl); - g_raid5_mh_sz(m,l); + g_raid5_mh_sz(m, l); } } - return m; + return (m); } + static void g_raid5_free(struct g_raid5_softc *sc, caddr_t m) { mtx_lock(&sc->mh_mtx); - MYKASSERT(((int*)m)[-1] > 0, ("this is no mem hamster chunk.")); + MYKASSERT(((int *)m)[-1] > 0, ("this is no mem hamster chunk.")); if (sc->mhc < sc->mhs) { sc->mhl[sc->mhc] = m; sc->mhc++; @@ -248,8 +274,8 @@ g_raid5_free(struct g_raid5_softc *sc, c int l = g_raid5_mh_sz_by_a(m); int mi = -1; int ml = -1; - for (int i=0; imhc; i++) { - int nl = g_raid5_mh_sz_by_i(sc,i); + for (int i = 0; i < sc->mhc; i++) { + int nl = g_raid5_mh_sz_by_i(sc, i); if (nl >= l) continue; if (ml > 0 && ml <= nl) @@ -260,12 +286,13 @@ g_raid5_free(struct g_raid5_softc *sc, c if (mi < 0) g_raid5_free_by_a(m); else { - g_raid5_free_by_i(sc,mi); + g_raid5_free_by_i(sc, mi); sc->mhl[mi] = m; } } mtx_unlock(&sc->mh_mtx); } + static void g_raid5_mh_destroy(struct g_raid5_softc *sc) { @@ -280,10 +307,16 @@ g_raid5_mh_destroy(struct g_raid5_softc */ static __inline int g_raid5_ce_em(struct g_raid5_cache_entry *ce) -{ return ce->fst == NULL; } +{ + return (ce->fst == NULL); +} + static __inline struct g_raid5_cache_entry * g_raid5_ce_by_i(struct g_raid5_softc *sc, int i) -{ return sc->ce + i; } +{ + return (sc->ce + i); +} + static struct g_raid5_cache_entry * g_raid5_ce_by_sno(struct g_raid5_softc *sc, off_t s) { @@ -292,7 +325,7 @@ g_raid5_ce_by_sno(struct g_raid5_softc * s++; int i = s % sc->cs; for (int j=sc->cs; j>0; j--) { - struct g_raid5_cache_entry *ce = g_raid5_ce_by_i(sc,i); + struct g_raid5_cache_entry *ce = g_raid5_ce_by_i(sc, i); if (ce->sno == s) return ce; if (fce==NULL && ce->sno == 0) @@ -306,41 +339,57 @@ g_raid5_ce_by_sno(struct g_raid5_softc * return NULL; } MYKASSERT(fce->fst == NULL, ("ce not free.")); - MYKASSERT(fce->dc == 0, ("%p dc inconsistency %d.",fce,fce->dc)); + MYKASSERT(fce->dc == 0, ("%p dc inconsistency %d.", fce, fce->dc)); MYKASSERT(fce->sno == 0, ("ce not free.")); fce->sno = s; - return fce; + return (fce); } + static __inline struct g_raid5_cache_entry * g_raid5_ce_by_off(struct g_raid5_softc *sc, off_t o) -{ return g_raid5_ce_by_sno(sc, o/sc->fsl); } +{ + + return (g_raid5_ce_by_sno(sc, o/sc->fsl)); +} + static __inline struct g_raid5_cache_entry * g_raid5_ce_by_bio(struct g_raid5_softc *sc, struct bio *bp) -{ return g_raid5_ce_by_off(sc, bp->bio_offset); } -#define G_RAID5_C_TRAVERSE(AAA,BBB,CCC) \ - for (int i = AAA->cs-1; i >= 0; i--) \ - G_RAID5_CE_TRAVERSE((CCC=g_raid5_ce_by_i(sc,i)), BBB) -#define G_RAID5_C_TRAVSAFE(AAA,BBB,CCC) \ - for (int i = AAA->cs-1; i >= 0; i--) \ - G_RAID5_CE_TRAVSAFE((CCC=g_raid5_ce_by_i(sc,i)), BBB) -#define G_RAID5_CE_TRAVERSE(AAA, BBB) \ +{ + + return (g_raid5_ce_by_off(sc, bp->bio_offset)); +} + +#define G_RAID5_C_TRAVERSE(AAA, BBB, CCC) \ + for (int i = AAA->cs-1; i >= 0; i--) \ + G_RAID5_CE_TRAVERSE((CCC=g_raid5_ce_by_i(sc, i)), BBB) + +#define G_RAID5_C_TRAVSAFE(AAA, BBB, CCC) \ + for (int i = AAA->cs-1; i >= 0; i--) \ + G_RAID5_CE_TRAVSAFE((CCC=g_raid5_ce_by_i(sc, i)), BBB) + +#define G_RAID5_CE_TRAVERSE(AAA, BBB) \ for (BBB = AAA->fst; BBB != NULL; BBB = g_raid5_q_nx(BBB)) -#define G_RAID5_CE_TRAVSAFE(AAA, BBB) \ - for (BBB = AAA->fst, BBB##_nxt = g_raid5_q_nx(BBB); \ - BBB != NULL; \ + +#define G_RAID5_CE_TRAVSAFE(AAA, BBB) \ + for (BBB = AAA->fst, BBB##_nxt = g_raid5_q_nx(BBB); \ + BBB != NULL; \ BBB = BBB##_nxt, BBB##_nxt = g_raid5_q_nx(BBB)) + static __inline void g_raid5_dc_inc(struct g_raid5_softc *sc, struct g_raid5_cache_entry *ce) { + MYKASSERT(ce->dc >= 0 && sc->dc >= 0 && sc->wqp >= 0, ("cannot happen.")); if (ce->dc == 0) sc->dc++; ce->dc++; sc->wqp++; } + static __inline void g_raid5_dc_dec(struct g_raid5_softc *sc, struct g_raid5_cache_entry *ce) { + MYKASSERT(ce->dc > 0 && sc->dc > 0 && sc->wqp > 0, ("cannot happen.")); ce->dc--; if (ce->dc == 0) @@ -350,19 +399,31 @@ g_raid5_dc_dec(struct g_raid5_softc *sc, static __inline struct bio * g_raid5_q_nx(struct bio *bp) -{ return bp==NULL ? NULL : bp->bio_queue.tqe_next; } +{ + + return (bp == NULL ? NULL : bp->bio_queue.tqe_next); +} + static __inline struct bio ** g_raid5_q_pv(struct bio *bp) -{ return bp->bio_queue.tqe_prev; } +{ + + return (bp->bio_queue.tqe_prev); +} + static __inline void -g_raid5_q_rm(struct g_raid5_softc *sc, - struct g_raid5_cache_entry *ce, struct bio *bp, int reserved) +g_raid5_q_rm(struct g_raid5_softc *sc, struct g_raid5_cache_entry *ce, + struct bio *bp, int reserved) { struct bio *nxt = g_raid5_q_nx(bp); - bp->bio_queue.tqe_next = NULL; struct bio **prv = g_raid5_q_pv(bp); + + /* FIXME: This should be done in another way. */ + bp->bio_queue.tqe_next = NULL; bp->bio_queue.tqe_prev = NULL; + if (nxt != NULL) + /* FIXME: This should be done in another way. */ nxt->bio_queue.tqe_prev = prv; if (prv != NULL) (*prv) = nxt; @@ -370,32 +431,36 @@ g_raid5_q_rm(struct g_raid5_softc *sc, ce->fst = nxt; if (nxt == NULL) { if (ce->sd != NULL) { - g_raid5_free(sc,ce->sd); + g_raid5_free(sc, ce->sd); ce->sd = NULL; } if (ce->sp != NULL) { - g_raid5_free(sc,ce->sp); + g_raid5_free(sc, ce->sp); ce->sp = NULL; } - MYKASSERT(ce->dc == 0, ("dc(%d) must be zero.",ce->dc)); - MYKASSERT(sc->cc > 0, ("cc(%d) must be positive.",sc->cc)); + MYKASSERT(ce->dc == 0, ("dc(%d) must be zero.", ce->dc)); + MYKASSERT(sc->cc > 0, ("cc(%d) must be positive.", sc->cc)); sc->cc--; if (!reserved) ce->sno = 0; } } } + static __inline void -g_raid5_q_de(struct g_raid5_softc *sc, - struct g_raid5_cache_entry *ce, struct bio *bp, int reserved) +g_raid5_q_de(struct g_raid5_softc *sc, struct g_raid5_cache_entry *ce, + struct bio *bp, int reserved) { - g_raid5_q_rm(sc,ce,bp,reserved); + + g_raid5_q_rm(sc, ce, bp, reserved); g_destroy_bio(bp); } + static __inline void -g_raid5_q_in(struct g_raid5_softc *sc, - struct g_raid5_cache_entry *ce, struct bio *bp, int force) +g_raid5_q_in(struct g_raid5_softc *sc, struct g_raid5_cache_entry *ce, + struct bio *bp, int force) { + /* FIXME */ bp->bio_queue.tqe_prev = NULL; bp->bio_queue.tqe_next = ce->fst; if (g_raid5_ce_em(ce)) @@ -404,7 +469,7 @@ g_raid5_q_in(struct g_raid5_softc *sc, ce->fst->bio_queue.tqe_prev = &bp->bio_queue.tqe_next; ce->fst = bp; if (ce->sd == NULL) - ce->sd = g_raid5_malloc(sc,sc->fsl,force); + ce->sd = g_raid5_malloc(sc, sc->fsl, force); if (ce->sd != NULL) bp->bio_data = ce->sd + bp->bio_offset % sc->fsl; } @@ -414,24 +479,30 @@ g_raid5_bintime_cmp(struct bintime *a, s { if (a->sec == b->sec) { if (a->frac == b->frac) - return 0; + return (0); else if (a->frac > b->frac) - return 1; + return (1); } else if (a->sec > b->sec) - return 1; - return -1; + return (1); + return (-1); } static __inline int64_t g_raid5_bintime2micro(struct bintime *a) -{ return (a->sec*1000000) + (((a->frac>>32)*1000000)>>32); } +{ + + return ((a->sec * 1000000) + (((a->frac >> 32) * 1000000) >> 32)); +} /* * tells if the disk is inserted and not pre-removed */ static __inline u_int g_raid5_disk_good(struct g_raid5_softc *sc, int i) -{ return sc->sc_disks[i] != NULL && sc->preremoved[i] == 0; } +{ + + return (sc->sc_disks[i] != NULL && sc->preremoved[i] == 0); +} /* * gives the number of "good" disks... @@ -442,12 +513,12 @@ g_raid5_nvalid(struct g_raid5_softc *sc) /* ARNE: just tsting */ /* this for loop should be not necessary, although it might happen, that some strange locking situation (race condition?) causes trouble*/ int no = 0; for (int i = 0; i < sc->sc_ndisks; i++) - if (g_raid5_disk_good(sc,i)) + if (g_raid5_disk_good(sc, i)) no++; MYKASSERT(no == sc->vdc, ("valid disk count deviates.")); /* ARNE: just for testing ^^^^ */ - return sc->vdc; + return (sc->vdc); } /* @@ -455,7 +526,10 @@ g_raid5_nvalid(struct g_raid5_softc *sc) */ static __inline u_int g_raid5_allgood(struct g_raid5_softc *sc) -{ return g_raid5_nvalid(sc) == sc->sc_ndisks; } +{ + + return (g_raid5_nvalid(sc) == sc->sc_ndisks); +} /* * tells if a certain offset is in a COMPLETE area of the device... @@ -465,13 +539,14 @@ g_raid5_allgood(struct g_raid5_softc *sc static __inline u_int g_raid5_data_good(struct g_raid5_softc *sc, int i, off_t end) { + if (!g_raid5_disk_good(sc, i)) - return 0; + return (0); if (!g_raid5_allgood(sc)) - return 1; + return (1); if (sc->newest == i && sc->verified >= 0 && end > sc->verified) - return 0; - return 1; + return (0); + return (1); } /* @@ -481,15 +556,16 @@ g_raid5_data_good(struct g_raid5_softc * static __inline u_int g_raid5_parity_good(struct g_raid5_softc *sc, int pno, off_t end) { + if (!g_raid5_disk_good(sc, pno)) - return 0; + return (0); if (!g_raid5_allgood(sc)) - return 1; + return (1); if (sc->newest != -1 && sc->newest != pno) - return 1; + return (1); if (sc->verified >= 0 && end > sc->verified) - return 0; - return 1; + return (0); + return (1); } /* @@ -500,14 +576,15 @@ static __inline int g_raid5_find_disk(struct g_raid5_softc * sc, struct g_consumer * cp) { struct g_consumer **cpp = cp->private; + if (cpp == NULL) - return -1; + return (-1); struct g_consumer *rcp = *cpp; if (rcp == NULL) - return -1; + return (-1); int dn = cpp - sc->sc_disks; MYKASSERT(dn >= 0 && dn < sc->sc_ndisks, ("dn out of range.")); - return dn; + return (dn); } /* @@ -515,7 +592,7 @@ g_raid5_find_disk(struct g_raid5_softc * */ static int g_raid5_write_metadata(struct g_consumer **cpp, struct g_raid5_metadata *md, - struct bio *ur) + struct bio *ur) { off_t offset; int length; @@ -527,14 +604,15 @@ g_raid5_write_metadata(struct g_consumer length = cp->provider->sectorsize; MYKASSERT(length >= sizeof(*md), ("sector size too low (%d %d).", - length,(int)sizeof(*md))); + length, (int)sizeof(*md))); offset = cp->provider->mediasize - length; sector = malloc(length, M_RAID5, M_WAITOK | M_ZERO); raid5_metadata_encode(md, sector); + /* FIXME: This should be possible to avoid. */ if (ur != NULL) { - bzero(ur,sizeof(*ur)); + bzero(ur, sizeof(*ur)); ur->bio_cmd = BIO_WRITE; ur->bio_done = NULL; ur->bio_offset = offset; @@ -546,8 +624,7 @@ g_raid5_write_metadata(struct g_consumer error = g_write_data(cp, offset, sector, length); free(sector, M_RAID5); } - - return error; + return (error); } /* @@ -565,21 +642,21 @@ g_raid5_read_metadata(struct g_consumer pp = cp->provider; if (pp->error != 0) - return pp->error; + return (pp->error); if (pp->sectorsize == 0) - return ENXIO; + return (ENXIO); MYKASSERT(pp->sectorsize >= sizeof(*md), ("sector size too low (%d %d).", - pp->sectorsize,(int)sizeof(*md))); + pp->sectorsize, (int)sizeof(*md))); - error = g_access(cp, 1,0,0); + error = g_access(cp, 1, 0, 0); if (error) - return error; + return (error); g_topology_unlock(); buf = g_read_data(cp, pp->mediasize - pp->sectorsize, pp->sectorsize, &error); g_topology_lock(); if ((*cpp) != NULL) - g_access(cp, -1,0,0); + g_access(cp, -1, 0, 0); if (buf == NULL) return (error); @@ -587,7 +664,7 @@ g_raid5_read_metadata(struct g_consumer raid5_metadata_decode(buf, md); g_free(buf); - return 0; + return (0); } /* @@ -595,29 +672,29 @@ g_raid5_read_metadata(struct g_consumer */ static int g_raid5_update_metadata(struct g_raid5_softc *sc, struct g_consumer ** cpp, - int state, int di_no, struct bio *ur) + int state, int di_no, struct bio *ur) { struct g_raid5_metadata md; struct g_consumer *cp = *cpp; if (cp == NULL || sc == NULL || sc->sc_provider == NULL) - return EINVAL; + return (EINVAL); g_topology_assert_not(); - bzero(&md,sizeof(md)); + bzero(&md, sizeof(md)); if (state >= 0) { if (sc->no_hot && (state & G_RAID5_STATE_HOT)) state &= ~G_RAID5_STATE_HOT; - strlcpy(md.md_magic,G_RAID5_MAGIC,sizeof(md.md_magic)); + strlcpy(md.md_magic, G_RAID5_MAGIC, sizeof(md.md_magic)); md.md_version = G_RAID5_VERSION; - strlcpy(md.md_name,sc->sc_name,sizeof(md.md_name)); + strlcpy(md.md_name, sc->sc_name, sizeof(md.md_name)); if (sc->hardcoded) - strlcpy(md.md_provider,cp->provider->name,sizeof(md.md_provider)); + strlcpy(md.md_provider, cp->provider->name, sizeof(md.md_provider)); else - bzero(md.md_provider,sizeof(md.md_provider)); + bzero(md.md_provider, sizeof(md.md_provider)); md.md_id = sc->sc_id; md.md_no = di_no; md.md_all = sc->sc_ndisks; @@ -643,7 +720,7 @@ g_raid5_update_metadata(struct g_raid5_s G_RAID5_DEBUG(1, "%s: %s: update meta data: state%d", sc->sc_name, cp->provider->name, md.md_state); - return g_raid5_write_metadata(cpp, &md, ur); + return (g_raid5_write_metadata(cpp, &md, ur)); } /* @@ -795,7 +872,7 @@ g_raid5_remove_disk(struct g_raid5_softc if (sc->sc_type == G_RAID5_TYPE_AUTOMATIC) { g_topology_unlock(); - g_raid5_update_metadata(sc,&cp,clear_md?-1:G_RAID5_STATE_CALM,dn,NULL); + g_raid5_update_metadata(sc, &cp, clear_md?-1:G_RAID5_STATE_CALM, dn, NULL); g_topology_lock(); if (clear_md) sc->state |= G_RAID5_STATE_VERIFY; @@ -835,7 +912,7 @@ g_raid5_orphan(struct g_consumer *cp) static __inline void g_raid5_free_bio(struct g_raid5_softc *sc, struct bio *bp) { - g_raid5_free(sc,bp->bio_data); + g_raid5_free(sc, bp->bio_data); g_destroy_bio(bp); } @@ -871,7 +948,7 @@ g_raid5_combine_inner(struct g_raid5_sof combo->bio_data = ce->sd + noff % sc->fsl; if (!combo->bio_caller1 && bp->bio_caller1) /* inherit block */ combo->bio_caller1 = bp->bio_caller1; - g_raid5_q_de(sc,ce,bp,1); + g_raid5_q_de(sc, ce, bp, 1); } /* @@ -904,29 +981,29 @@ g_raid5_is_cached(struct g_raid5_softc * static __inline int g_raid5_is_current(struct g_raid5_softc *sc, struct bio *bp) { - return g_raid5_is_cached(sc,bp) || + return g_raid5_is_cached(sc, bp) || g_raid5_is_pending(bp) || - g_raid5_is_issued(sc,bp); + g_raid5_is_issued(sc, bp); } static __inline int g_raid5_is_started(struct g_raid5_softc *sc, struct bio *bp) -{ return g_raid5_is_issued(sc,bp) || g_raid5_is_requested(sc,bp); } +{ return g_raid5_is_issued(sc, bp) || g_raid5_is_requested(sc, bp); } static __inline int g_raid5_is_done(struct g_raid5_softc *sc, struct bio *bp) -{ return g_raid5_is_started(sc,bp) && bp->bio_driver1 == bp; } +{ return g_raid5_is_started(sc, bp) && bp->bio_driver1 == bp; } static __inline int g_raid5_is_bad(struct g_raid5_softc *sc, struct bio *bp) -{ return g_raid5_is_started(sc,bp) && bp->bio_caller2 == bp; } +{ return g_raid5_is_started(sc, bp) && bp->bio_caller2 == bp; } /* cache state codes for ..._dumpconf() */ static __inline char g_raid5_cache_code(struct g_raid5_softc *sc, struct bio *bp) { - if (g_raid5_is_requested(sc,bp)) + if (g_raid5_is_requested(sc, bp)) return 'r'; - if (g_raid5_is_issued(sc,bp)) + if (g_raid5_is_issued(sc, bp)) return 'a'; - if (g_raid5_is_cached(sc,bp)) + if (g_raid5_is_cached(sc, bp)) return 'c'; return 'p'; } @@ -970,7 +1047,7 @@ g_raid5_stripe_conflict(struct g_raid5_s int blow = bbp->bio_offset & (sc->stripesize - 1); off_t besno = bbp->bio_offset + bbp->bio_length - 1; int bhih = besno & (sc->stripesize - 1); - ORDER(blow,bhih); + ORDER(blow, bhih); besno = (besno >> sc->stripebits) / (sc->sc_ndisks - 1); struct bio *bp; @@ -979,7 +1056,7 @@ g_raid5_stripe_conflict(struct g_raid5_s continue; if (bp->bio_length == 0) continue; - if (!g_raid5_is_issued(sc,bp)) + if (!g_raid5_is_issued(sc, bp)) continue; off_t bsno = (bp->bio_offset >> sc->stripebits) / (sc->sc_ndisks - 1); @@ -987,7 +1064,7 @@ g_raid5_stripe_conflict(struct g_raid5_s off_t esno = bp->bio_offset + bp->bio_length - 1; int hih = esno & (sc->stripesize - 1); - ORDER(low,hih); + ORDER(low, hih); esno = (esno >> sc->stripebits) / (sc->sc_ndisks - 1); if (besno >= bsno && esno >= bbsno && bhih >= low && hih >= blow) @@ -1012,7 +1089,7 @@ g_raid5_overlapf_by_bio(struct bio *bp, { off_t end = bp->bio_offset + bp->bio_length; off_t bend = bbp->bio_offset + bbp->bio_length; - return g_raid5_overlapf(bp->bio_offset,end, bbp->bio_offset,bend); + return g_raid5_overlapf(bp->bio_offset, end, bbp->bio_offset, bend); } /* @@ -1028,8 +1105,8 @@ g_raid5_flank(off_t a1, off_t a2, off_t static __inline int g_raid5_overlap(off_t a1, off_t a2, off_t b1, off_t b2, int *overlapf) { - (*overlapf) = g_raid5_overlapf(a1,a2, b1,b2); - return (*overlapf) || g_raid5_flank(a1,a2, b1,b2); + (*overlapf) = g_raid5_overlapf(a1, a2, b1, b2); + return (*overlapf) || g_raid5_flank(a1, a2, b1, b2); } /* @@ -1047,11 +1124,11 @@ g_raid5_still_blocked(struct g_raid5_sof G_RAID5_CE_TRAVERSE(ce, bp) { if (bp == bbp) continue; - if (g_raid5_is_cached(sc,bp)) + if (g_raid5_is_cached(sc, bp)) continue; - if (g_raid5_overlapf_by_bio(bp,bbp)) { - MYKASSERT(g_raid5_is_started(sc,bp), - ("combo error found with %p/%d(%p,%p):%jd+%jd %p/%d(%p,%p):%jd+%jd", bp,bp->bio_cmd==BIO_READ,bp->bio_parent,sc,bp->bio_offset,bp->bio_length, bbp,bbp->bio_cmd==BIO_READ,bbp->bio_parent,sc,bbp->bio_offset,bbp->bio_length)); + if (g_raid5_overlapf_by_bio(bp, bbp)) { + MYKASSERT(g_raid5_is_started(sc, bp), + ("combo error found with %p/%d(%p, %p):%jd+%jd %p/%d(%p, %p):%jd+%jd", bp, bp->bio_cmd==BIO_READ, bp->bio_parent, sc, bp->bio_offset, bp->bio_length, bbp, bbp->bio_cmd==BIO_READ, bbp->bio_parent, sc, bbp->bio_offset, bbp->bio_length)); return 1; } } @@ -1160,7 +1237,7 @@ g_raid5_cache_trans(struct g_raid5_softc MYKASSERT(*obp != pbp, ("bad structure.")); MYKASSERT((*obp)->bio_cmd == BIO_READ, ("need BIO_READ here.")); MYKASSERT(pbp->bio_caller1 != NULL, ("wrong memory area.")); - MYKASSERT(!g_raid5_extra_mem(*obp,pbp->bio_caller1), ("bad mem")); + MYKASSERT(!g_raid5_extra_mem(*obp, pbp->bio_caller1), ("bad mem")); bcopy(pbp->bio_data, pbp->bio_caller1, pbp->bio_completed); pbp->bio_caller1 = NULL; (*obp)->bio_completed += pbp->bio_completed; @@ -1213,7 +1290,7 @@ g_raid5_ready(struct g_raid5_softc *sc, g_raid5_preremove_reset(sc); sc->preremoved[dn] = 1; sc->vdc--; - G_RAID5_DEBUG(0,"%s: %s(%d): pre-remove disk due to errors.", + G_RAID5_DEBUG(0, "%s: %s(%d): pre-remove disk due to errors.", sc->sc_name, cp->provider->name, dn); } if (g_raid5_disks_ok > 0) @@ -1221,23 +1298,23 @@ g_raid5_ready(struct g_raid5_softc *sc, else g_error_provider(sc->sc_provider, obp->bio_error); } - G_RAID5_DEBUG(0,"%s: %p: cmd%c off%jd len%jd err:%d/%d c%d", + G_RAID5_DEBUG(0, "%s: %p: cmd%c off%jd len%jd err:%d/%d c%d", sc->sc_name, obp, obp->bio_cmd==BIO_READ?'R':'W', obp->bio_offset, obp->bio_length, - bp->bio_error,obp->bio_error,g_raid5_disks_ok); + bp->bio_error, obp->bio_error, g_raid5_disks_ok); } int saved = 0; - int extra = g_raid5_extra_mem(obp,bp->bio_data); + int extra = g_raid5_extra_mem(obp, bp->bio_data); if (bp->bio_cmd == BIO_READ) { if (obp == pbp) { /* best case read */ MYKASSERT(pbp->bio_cmd == BIO_READ, ("need BIO_READ here.")); - MYKASSERT(g_raid5_is_requested(sc,pbp), ("bad structure")); + MYKASSERT(g_raid5_is_requested(sc, pbp), ("bad structure")); MYKASSERT(!extra, ("wrong mem area.")); pbp->bio_completed += bp->bio_completed; if (pbp->bio_inbed == pbp->bio_children) - g_raid5_cache_trans(sc, pbp,&obp); + g_raid5_cache_trans(sc, pbp, &obp); } else if (obp->bio_cmd == BIO_READ && pbp->bio_children == sc->sc_ndisks) { /* verify read */ @@ -1248,20 +1325,20 @@ g_raid5_ready(struct g_raid5_softc *sc, bp->bio_length = pbp->bio_length / 2; MYKASSERT(pbp->bio_data+bp->bio_length == bp->bio_data, ("datptr %p+%jd %p", - pbp->bio_data,bp->bio_length,bp->bio_data)); + pbp->bio_data, bp->bio_length, bp->bio_data)); } MYKASSERT(bp->bio_length*2 == pbp->bio_length, ("lengths")); if (pbp->bio_data+bp->bio_length != bp->bio_data) { /* not the stripe in question */ - g_raid5_xor(pbp->bio_data,bp->bio_data,bp->bio_length); + g_raid5_xor(pbp->bio_data, bp->bio_data, bp->bio_length); if (extra) saved = 1; } if (pbp->bio_inbed == pbp->bio_children) { g_raid5_vsc++; if (pbp->bio_driver1 != NULL) { - MYKASSERT(!g_raid5_extra_mem(obp,pbp->bio_driver1),("bad addr")); - bcopy(pbp->bio_data,pbp->bio_driver1,bp->bio_length); + MYKASSERT(!g_raid5_extra_mem(obp, pbp->bio_driver1), ("bad addr")); + bcopy(pbp->bio_data, pbp->bio_driver1, bp->bio_length); pbp->bio_driver1 = NULL; } if (obp->bio_error == 0 && obp->bio_driver2 == &sc->worker) { @@ -1283,42 +1360,42 @@ g_raid5_ready(struct g_raid5_softc *sc, pbp->bio_offset = -pbp->bio_offset-1; obp->bio_completed += bp->bio_length; obp->bio_inbed++; - MYKASSERT(g_raid5_extra_mem(obp,pbp->bio_data), ("bad addr")); - g_raid5_free_bio(sc,pbp); + MYKASSERT(g_raid5_extra_mem(obp, pbp->bio_data), ("bad addr")); + g_raid5_free_bio(sc, pbp); } else { /* parity mismatch - no correction */ if (!obp->bio_error) obp->bio_error = EIO; obp->bio_inbed++; - MYKASSERT(g_raid5_extra_mem(obp,pbp->bio_data), ("bad addr")); + MYKASSERT(g_raid5_extra_mem(obp, pbp->bio_data), ("bad addr")); int pos; for (pos=0; posbio_length; pos++) if (((char*)pbp->bio_data)[pos] != ((char*)pbp->bio_data)[pos+bp->bio_length]) break; - G_RAID5_DEBUG(0,"%s: %p: parity mismatch: %jd+%jd@%d.", - sc->sc_name,obp,bp->bio_offset,bp->bio_length,pos); - g_raid5_free_bio(sc,pbp); + G_RAID5_DEBUG(0, "%s: %p: parity mismatch: %jd+%jd@%d.", + sc->sc_name, obp, bp->bio_offset, bp->bio_length, pos); + g_raid5_free_bio(sc, pbp); } } } else if (obp->bio_cmd == BIO_WRITE && pbp->bio_children == sc->sc_ndisks-2 && - g_raid5_extra_mem(obp,pbp->bio_data)) { + g_raid5_extra_mem(obp, pbp->bio_data)) { /* preparative read for degraded case write */ MYKASSERT(extra, ("wrong memory area.")); MYKASSERT(bp->bio_offset == -pbp->bio_offset-1, ("offsets must correspond")); MYKASSERT(bp->bio_length == pbp->bio_length, ("length must correspond")); - g_raid5_xor(pbp->bio_data,bp->bio_data,bp->bio_length); + g_raid5_xor(pbp->bio_data, bp->bio_data, bp->bio_length); saved = 1; if (pbp->bio_inbed == pbp->bio_children) { pbp->bio_offset = -pbp->bio_offset-1; - MYKASSERT(g_raid5_extra_mem(obp,pbp->bio_data), ("bad addr")); + MYKASSERT(g_raid5_extra_mem(obp, pbp->bio_data), ("bad addr")); if (pbp->bio_error) { obp->bio_inbed++; - g_raid5_free_bio(sc,pbp); + g_raid5_free_bio(sc, pbp); } else - g_raid5_io_req(sc,pbp); + g_raid5_io_req(sc, pbp); } } else if ( obp->bio_cmd == BIO_WRITE && (pbp->bio_children == 2 || @@ -1331,10 +1408,10 @@ g_raid5_ready(struct g_raid5_softc *sc, ("length must correspond. %jd / %jd", bp->bio_length, pbp->bio_length)); MYKASSERT(extra, ("wrong memory area %p/%jd+%jd -- %p/%jd+%jd.", - obp->bio_data,obp->bio_offset,obp->bio_length, - bp->bio_data,obp->bio_offset,bp->bio_length)); + obp->bio_data, obp->bio_offset, obp->bio_length, + bp->bio_data, obp->bio_offset, bp->bio_length)); struct bio *pab = pbp->bio_caller2; - g_raid5_xor(pab->bio_data,bp->bio_data,bp->bio_length); + g_raid5_xor(pab->bio_data, bp->bio_data, bp->bio_length); saved = 1; if (pbp->bio_inbed == pbp->bio_children) { pbp->bio_offset = -pbp->bio_offset-1; @@ -1345,11 +1422,11 @@ g_raid5_ready(struct g_raid5_softc *sc, ("offsets must correspond")); MYKASSERT(pbp->bio_driver2 != pab->bio_driver2, ("disks must be different")); - MYKASSERT(g_raid5_extra_mem(obp,pab->bio_data), ("bad addr")); - MYKASSERT(!g_raid5_extra_mem(obp,pbp->bio_data), ("bad addr")); + MYKASSERT(g_raid5_extra_mem(obp, pab->bio_data), ("bad addr")); + MYKASSERT(!g_raid5_extra_mem(obp, pbp->bio_data), ("bad addr")); if (pbp->bio_error) { obp->bio_inbed += 2; - g_raid5_free_bio(sc,pab); + g_raid5_free_bio(sc, pab); g_destroy_bio(pbp); } else { g_raid5_io_req(sc, pab); @@ -1359,12 +1436,12 @@ g_raid5_ready(struct g_raid5_softc *sc, } else { /* read degraded stripe */ MYKASSERT(obp->bio_cmd == BIO_READ, ("need BIO_READ here.")); - MYKASSERT(g_raid5_is_requested(sc,obp), ("bad structure")); + MYKASSERT(g_raid5_is_requested(sc, obp), ("bad structure")); MYKASSERT(pbp->bio_children == sc->sc_ndisks-1, ("must have %d children here.", sc->sc_ndisks-1)); MYKASSERT(extra, ("wrong memory area.")); - MYKASSERT(bp->bio_length==pbp->bio_length,("length must correspond.")); - g_raid5_xor(pbp->bio_data,bp->bio_data,bp->bio_length); + MYKASSERT(bp->bio_length==pbp->bio_length, ("length must correspond.")); + g_raid5_xor(pbp->bio_data, bp->bio_data, bp->bio_length); saved = 1; if (pbp->bio_inbed == pbp->bio_children) { obp->bio_completed += bp->bio_completed; @@ -1372,7 +1449,7 @@ g_raid5_ready(struct g_raid5_softc *sc, g_destroy_bio(pbp); if (obp->bio_inbed == obp->bio_children) { pbp = obp; - g_raid5_cache_trans(sc, pbp,&obp); + g_raid5_cache_trans(sc, pbp, &obp); } } } @@ -1386,7 +1463,7 @@ g_raid5_ready(struct g_raid5_softc *sc, } if (saved) - g_raid5_free_bio(sc,bp); + g_raid5_free_bio(sc, bp); else g_destroy_bio(bp); @@ -1405,15 +1482,15 @@ g_raid5_ready(struct g_raid5_softc *sc, obp->bio_inbed = 0; } else if (obp->bio_error == 0 && g_raid5_disks_ok < 30) g_raid5_disks_ok = 50; - if (g_raid5_is_issued(sc,obp) && obp->bio_cmd == BIO_WRITE) { + if (g_raid5_is_issued(sc, obp) && obp->bio_cmd == BIO_WRITE) { if (obp->bio_error == ENOMEM) g_raid5_set_bad(obp); /* retry! */ else { if (obp->bio_error) { g_raid5_set_bad(obp); /* abort! */ - G_RAID5_DEBUG(0,"%s: %p: lost data: off%jd len%jd error%d.", - sc->sc_name,obp, - obp->bio_offset,obp->bio_length,obp->bio_error); + G_RAID5_DEBUG(0, "%s: %p: lost data: off%jd len%jd error%d.", + sc->sc_name, obp, + obp->bio_offset, obp->bio_length, obp->bio_error); g_error_provider(sc->sc_provider, obp->bio_error); /* cancels all pending write requests */ } else /* done cleanly */ @@ -1423,8 +1500,8 @@ g_raid5_ready(struct g_raid5_softc *sc, } else { MYKASSERT(obp->bio_cmd == BIO_READ, ("incompetent for non-BIO_READ %jd/%jd %d %p/%p.", - obp->bio_length,obp->bio_offset, - sc->sc_ndisks,obp->bio_parent,sc)); + obp->bio_length, obp->bio_offset, + sc->sc_ndisks, obp->bio_parent, sc)); if (obp != pbp) g_io_deliver(obp, obp->bio_error); } @@ -1444,7 +1521,7 @@ g_raid5_done(struct bio *bp) struct g_raid5_softc *sc = bp->bio_from->geom->softc; MYKASSERT(sc != NULL, ("SC must not be zero here.")); G_RAID5_LOGREQ(bp, "[done err:%d dat:%02x adr:%p]", *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 22:38:06 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12B7F1065670; Tue, 3 Feb 2009 22:38:06 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F31738FC19; Tue, 3 Feb 2009 22:38:05 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n13Mc5UV044257; Tue, 3 Feb 2009 22:38:05 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n13Mc5ef044256; Tue, 3 Feb 2009 22:38:05 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902032238.n13Mc5ef044256@svn.freebsd.org> From: Sam Leffler Date: Tue, 3 Feb 2009 22:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188107 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 22:38:06 -0000 Author: sam Date: Tue Feb 3 22:38:05 2009 New Revision: 188107 URL: http://svn.freebsd.org/changeset/base/188107 Log: merge r188106: fix media setting in vap_attach Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) projects/vap7/sys/net80211/ieee80211.c Modified: projects/vap7/sys/net80211/ieee80211.c ============================================================================== --- projects/vap7/sys/net80211/ieee80211.c Tue Feb 3 22:32:26 2009 (r188106) +++ projects/vap7/sys/net80211/ieee80211.c Tue Feb 3 22:38:05 2009 (r188107) @@ -472,7 +472,8 @@ ieee80211_vap_attach(struct ieee80211vap vap->iv_opmode == IEEE80211_M_STA, media_change, media_stat); ieee80211_media_status(ifp, &imr); /* NB: strip explicit mode; we're actually in autoselect */ - ifmedia_set(&vap->iv_media, imr.ifm_active &~ IFM_MMASK); + ifmedia_set(&vap->iv_media, + imr.ifm_active &~ (IFM_MMASK | IFM_IEEE80211_TURBO)); if (maxrate) ifp->if_baudrate = IF_Mbps(maxrate); @@ -857,16 +858,16 @@ addmedia(struct ifmedia *media, int caps ifmedia_add(media, \ IFM_MAKEWORD(IFM_IEEE80211, (_s), (_o), 0), 0, NULL) static const u_int mopts[IEEE80211_MODE_MAX] = { - IFM_AUTO, - IFM_IEEE80211_11A, - IFM_IEEE80211_11B, - IFM_IEEE80211_11G, - IFM_IEEE80211_FH, - IFM_IEEE80211_11A | IFM_IEEE80211_TURBO, - IFM_IEEE80211_11G | IFM_IEEE80211_TURBO, - IFM_IEEE80211_11A | IFM_IEEE80211_TURBO, - IFM_IEEE80211_11NA, - IFM_IEEE80211_11NG, + [IEEE80211_MODE_AUTO] = IFM_AUTO, + [IEEE80211_MODE_11A] = IFM_IEEE80211_11A, + [IEEE80211_MODE_11B] = IFM_IEEE80211_11B, + [IEEE80211_MODE_11G] = IFM_IEEE80211_11G, + [IEEE80211_MODE_FH] = IFM_IEEE80211_FH, + [IEEE80211_MODE_TURBO_A] = IFM_IEEE80211_11A|IFM_IEEE80211_TURBO, + [IEEE80211_MODE_TURBO_G] = IFM_IEEE80211_11G|IFM_IEEE80211_TURBO, + [IEEE80211_MODE_STURBO_A] = IFM_IEEE80211_11A|IFM_IEEE80211_TURBO, + [IEEE80211_MODE_11NA] = IFM_IEEE80211_11NA, + [IEEE80211_MODE_11NG] = IFM_IEEE80211_11NG, }; u_int mopt; @@ -996,7 +997,8 @@ ieee80211_media_init(struct ieee80211com ieee80211com_media_change, ieee80211com_media_status); /* NB: strip explicit mode; we're actually in autoselect */ ifmedia_set(&ic->ic_media, - media_status(ic->ic_opmode, ic->ic_curchan) &~ IFM_MMASK); + media_status(ic->ic_opmode, ic->ic_curchan) &~ + (IFM_MMASK | IFM_IEEE80211_TURBO)); if (maxrate) ifp->if_baudrate = IF_Mbps(maxrate); From owner-svn-src-projects@FreeBSD.ORG Wed Feb 4 00:21:37 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19ECD106566C; Wed, 4 Feb 2009 00:21:37 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06BFD8FC18; Wed, 4 Feb 2009 00:21:37 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n140LbBZ046642; Wed, 4 Feb 2009 00:21:37 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n140Lan1046639; Wed, 4 Feb 2009 00:21:36 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <200902040021.n140Lan1046639@svn.freebsd.org> From: Kirk McKusick Date: Wed, 4 Feb 2009 00:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188108 - projects/quota64/usr.sbin/edquota X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 00:21:37 -0000 Author: mckusick Date: Wed Feb 4 00:21:36 2009 New Revision: 188108 URL: http://svn.freebsd.org/changeset/base/188108 Log: Finish conversion of edquota to work with 64-bit quotas. Add -h option to request "humanized" values such as 1M, 1G, 1T, etc. Discussed with: Dag-Erling Smorgrav Sponsored by: Rsync.net Modified: projects/quota64/usr.sbin/edquota/Makefile projects/quota64/usr.sbin/edquota/edquota.8 projects/quota64/usr.sbin/edquota/edquota.c Modified: projects/quota64/usr.sbin/edquota/Makefile ============================================================================== --- projects/quota64/usr.sbin/edquota/Makefile Tue Feb 3 22:38:05 2009 (r188107) +++ projects/quota64/usr.sbin/edquota/Makefile Wed Feb 4 00:21:36 2009 (r188108) @@ -4,6 +4,7 @@ PROG= edquota MAN= edquota.8 +CSTD= c99 WARNS?= 4 DPADD= ${LIBUTIL} Modified: projects/quota64/usr.sbin/edquota/edquota.8 ============================================================================== --- projects/quota64/usr.sbin/edquota/edquota.8 Tue Feb 3 22:38:05 2009 (r188107) +++ projects/quota64/usr.sbin/edquota/edquota.8 Wed Feb 4 00:21:36 2009 (r188108) @@ -42,6 +42,7 @@ .Op Fl u .Op Fl f Ar fspath .Op Fl p Ar proto-username +.Op Fl h .Ar username ... .Nm .Op Fl u @@ -55,6 +56,7 @@ .Fl g .Op Fl f Ar fspath .Op Fl p Ar proto-groupname +.Op Fl h .Ar groupname ... .Nm .Fl g @@ -97,6 +99,14 @@ unless the environment variable specifies otherwise. .Pp The quotas may then be modified, new quotas added, etc. +Block quotas can be specified in bytes (B), kilobytes (K), +megabytes (M), terabytes (T), pedabytes (P), or exabytes (E). +If no units are specified, kilobytes are assumed. +If the +.Fl h +flag is specified, the editor will always display the +block usage and limits in a more human readable format +rather than displaying them in the historic kilobyte format. Setting a quota to zero indicates that no quota should be imposed. Setting a hard limit to one indicates that no allocations should be permitted. @@ -159,6 +169,9 @@ and .Ar ihlim values is omitted, it is assumed to be zero, therefore indicating that no particular quota should be imposed. +Block quotas can be specified in bytes (B), kilobytes (K), +megabytes (M), terabytes (T), pedabytes (P), or exabytes (E). +If no units are specified, kilobytes are assumed. .Pp If invoked with the .Fl f Modified: projects/quota64/usr.sbin/edquota/edquota.c ============================================================================== --- projects/quota64/usr.sbin/edquota/edquota.c Tue Feb 3 22:38:05 2009 (r188107) +++ projects/quota64/usr.sbin/edquota/edquota.c Wed Feb 4 00:21:36 2009 (r188108) @@ -72,10 +72,22 @@ __FBSDID("$FreeBSD$"); #include "pathnames.h" +/* Let's be paranoid about block size */ +#if 10 > DEV_BSHIFT +#define dbtokb(db) \ + ((off_t)(db) >> (10-DEV_BSHIFT)) +#elif 10 < DEV_BSHIFT +#define dbtokb(db) \ + ((off_t)(db) << (DEV_BSHIFT-10)) +#else +#define dbtokb(db) (db) +#endif + const char *qfname = QUOTAFILENAME; const char *qfextension[] = INITQFNAMES; const char *quotagroup = QUOTAGROUP; char tmpfil[] = _PATH_TMP; +int hflag; struct quotause { struct quotause *next; @@ -87,9 +99,11 @@ struct quotause { #define FOUND 0x01 int alldigits(const char *s); -int cvtatos(time_t, char *, time_t *); -char *cvtstoa(time_t); +int cvtatos(u_int64_t, char *, u_int64_t *); +char *cvtstoa(u_int64_t); +u_int64_t cvtval(u_int64_t, char); int editit(char *); +char *fmthumanval(int64_t); void freeprivs(struct quotause *); int getentry(const char *, int); struct quotause *getprivs(long, int, char *); @@ -106,11 +120,10 @@ main(int argc, char *argv[]) { struct quotause *qup, *protoprivs, *curprivs; long id, protoid; - uintmax_t lim; int i, quotatype, range, tmpfd; uid_t startuid, enduid; - u_int64_t *limp; - char *protoname, *cp, *oldoptarg, *end; + u_int64_t lim; + char *protoname, *cp, *endpt, *oldoptarg; int eflag = 0, tflag = 0, pflag = 0, ch; char *fspath = NULL; char buf[MAXLOGNAME]; @@ -123,7 +136,7 @@ main(int argc, char *argv[]) protoprivs = NULL; curprivs = NULL; protoname = NULL; - while ((ch = getopt(argc, argv, "ugtf:p:e:")) != -1) { + while ((ch = getopt(argc, argv, "ughtf:p:e:")) != -1) { switch(ch) { case 'f': fspath = optarg; @@ -135,6 +148,9 @@ main(int argc, char *argv[]) case 'g': quotatype = GRPQUOTA; break; + case 'h': + hflag++; + break; case 'u': quotatype = USRQUOTA; break; @@ -142,45 +158,44 @@ main(int argc, char *argv[]) tflag++; break; case 'e': - if ((qup = malloc(sizeof(*qup))) == NULL) + if ((qup = malloc(sizeof(*qup) + BUFSIZ)) == NULL) errx(2, "out of memory"); - bzero(qup, sizeof(*qup)); + bzero(qup, sizeof(*qup) + BUFSIZ); i = 0; oldoptarg = optarg; for (cp = optarg; (cp = strsep(&optarg, ":")) != NULL; i++) { if (cp != oldoptarg) *(cp - 1) = ':'; - limp = NULL; switch (i) { case 0: strlcpy(qup->fsname, cp, sizeof(qup->fsname)); break; case 1: - limp = &qup->dqblk.dqb_bsoftlimit; - break; + lim = strtoll(cp, &endpt, 10); + qup->dqblk.dqb_bsoftlimit = + cvtval(lim, *endpt); + continue; case 2: - limp = &qup->dqblk.dqb_bhardlimit; - break; + lim = strtoll(cp, &endpt, 10); + qup->dqblk.dqb_bhardlimit = + cvtval(lim, *endpt); + continue; case 3: - limp = &qup->dqblk.dqb_isoftlimit; - break; + qup->dqblk.dqb_isoftlimit = + strtoll(cp, NULL, 10); + continue; case 4: - limp = &qup->dqblk.dqb_ihardlimit; - break; + qup->dqblk.dqb_ihardlimit = + strtoll(cp, NULL, 10); + continue; default: warnx("incorrect quota specification: " "%s", oldoptarg); usage(); break; /* XXX: report an error */ } - if (limp != NULL) { - lim = strtoumax(cp, &end, 10); - if (end == cp || *end != '\0' || lim > UINT64_MAX) - errx(1, "invalid limit: %s", cp); - *limp = (u_int64_t)lim; - } } qup->dqblk.dqb_bsoftlimit = btodb((off_t)qup->dqblk.dqb_bsoftlimit * 1024); @@ -285,10 +300,10 @@ static void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", - "usage: edquota [-u] [-f fspath] [-p username] username ...", + "usage: edquota [-u] [-f fspath] [-p username] [-h] username ...", " edquota [-u] -e fspath[:bslim[:bhlim[:islim[:ihlim]]]] [-e ...]", " username ...", - " edquota -g [-f fspath] [-p groupname] groupname ...", + " edquota -g [-f fspath] [-p groupname] [-h] groupname ...", " edquota -g -e fspath[:bslim[:bhlim[:islim[:ihlim]]]] [-e ...]", " groupname ...", " edquota [-u] -t [-f fspath]", @@ -314,14 +329,17 @@ getentry(const char *name, int quotatype if ((pw = getpwnam(name))) return (pw->pw_uid); warnx("%s: no such user", name); + sleep(3); break; case GRPQUOTA: if ((gr = getgrnam(name))) return (gr->gr_gid); warnx("%s: no such group", name); + sleep(3); break; default: warnx("%d: unknown quota type", quotatype); + sleep(3); break; } sleep(1); @@ -499,21 +517,36 @@ writeprivs(struct quotause *quplist, int err(1, "%s", tmpfil); fprintf(fd, "Quotas for %s %s:\n", qfextension[quotatype], name); for (qup = quplist; qup; qup = qup->next) { - fprintf(fd, "%s: %s %lu, limits (soft = %lu, hard = %lu)\n", - qup->fsname, "kbytes in use:", - (unsigned long)(dbtob(qup->dqblk.dqb_curblocks) / 1024), - (unsigned long)(dbtob(qup->dqblk.dqb_bsoftlimit) / 1024), - (unsigned long)(dbtob(qup->dqblk.dqb_bhardlimit) / 1024)); - fprintf(fd, "%s %lu, limits (soft = %lu, hard = %lu)\n", + fprintf(fd, "%s: in use: %s, ", qup->fsname, + fmthumanval(qup->dqblk.dqb_curblocks)); + fprintf(fd, "limits (soft = %s, ", + fmthumanval(qup->dqblk.dqb_bsoftlimit)); + fprintf(fd, "hard = %s)\n", + fmthumanval(qup->dqblk.dqb_bhardlimit)); + fprintf(fd, "%s %llu, limits (soft = %llu, hard = %llu)\n", "\tinodes in use:", - (unsigned long)qup->dqblk.dqb_curinodes, - (unsigned long)qup->dqblk.dqb_isoftlimit, - (unsigned long)qup->dqblk.dqb_ihardlimit); + qup->dqblk.dqb_curinodes, + qup->dqblk.dqb_isoftlimit, + qup->dqblk.dqb_ihardlimit); } fclose(fd); return (1); } +char * +fmthumanval(int64_t blocks) +{ + static char buf[7], numbuf[20]; + + if (hflag) { + humanize_number(buf, sizeof(buf) - (blocks < 0 ? 0 : 1), + dbtob(blocks), "", HN_AUTOSCALE, HN_NOSPACE); + return (buf); + } + snprintf(numbuf, 20, "%lluK", dbtokb(blocks)); + return(numbuf); +} + /* * Merge changes to an ASCII file into a quotause list. */ @@ -522,8 +555,9 @@ readprivs(struct quotause *quplist, char { struct quotause *qup; FILE *fd; - unsigned long bhardlimit, bsoftlimit, curblocks; - unsigned long ihardlimit, isoftlimit, curinodes; + u_int64_t ihardlimit, isoftlimit, curinodes; + u_int64_t bhardlimit, bsoftlimit, curblocks; + char bhardunits, bsoftunits, curblockunits; int cnt; char *cp; struct dqblk dqblk; @@ -549,21 +583,40 @@ readprivs(struct quotause *quplist, char return (0); } cnt = sscanf(cp, - " kbytes in use: %lu, limits (soft = %lu, hard = %lu)", - &curblocks, &bsoftlimit, &bhardlimit); - if (cnt != 3) { + " in use: %llu%c, limits (soft = %llu%c, hard = %llu%c)", + &curblocks, &curblockunits, &bsoftlimit, &bsoftunits, + &bhardlimit, &bhardunits); + /* + * The next three check for old-style input formats. + */ + if (cnt != 6) + cnt = sscanf(cp, + " in use: %llu%c, limits (soft = %llu%c hard = %llu%c", + &curblocks, &curblockunits, &bsoftlimit, + &bsoftunits, &bhardlimit, &bhardunits); + if (cnt != 6) + cnt = sscanf(cp, + " in use: %llu%c, limits (soft = %llu%c hard = %llu%c)", + &curblocks, &curblockunits, &bsoftlimit, + &bsoftunits, &bhardlimit, &bhardunits); + if (cnt != 6) + cnt = sscanf(cp, + " in use: %llu%c, limits (soft = %llu%c, hard = %llu%c", + &curblocks, &curblockunits, &bsoftlimit, + &bsoftunits, &bhardlimit, &bhardunits); + if (cnt != 6) { warnx("%s:%s: bad format", fsp, cp); return (0); } - dqblk.dqb_curblocks = btodb((off_t)curblocks * 1024); - dqblk.dqb_bsoftlimit = btodb((off_t)bsoftlimit * 1024); - dqblk.dqb_bhardlimit = btodb((off_t)bhardlimit * 1024); + dqblk.dqb_curblocks = cvtval(curblocks, curblockunits); + dqblk.dqb_bsoftlimit = cvtval(bsoftlimit, bsoftunits); + dqblk.dqb_bhardlimit = cvtval(bhardlimit, bhardunits); if ((cp = strtok(line2, "\n")) == NULL) { warnx("%s: %s: bad format", fsp, line2); return (0); } cnt = sscanf(cp, - "\tinodes in use: %lu, limits (soft = %lu, hard = %lu)", + "\tinodes in use: %llu, limits (soft = %llu, hard = %llu)", &curinodes, &isoftlimit, &ihardlimit); if (cnt != 3) { warnx("%s: %s: bad format", fsp, line2); @@ -598,8 +651,8 @@ readprivs(struct quotause *quplist, char qup->dqblk.dqb_isoftlimit = dqblk.dqb_isoftlimit; qup->dqblk.dqb_ihardlimit = dqblk.dqb_ihardlimit; qup->flags |= FOUND; - if (dqblk.dqb_curblocks == qup->dqblk.dqb_curblocks && - dqblk.dqb_curinodes == qup->dqblk.dqb_curinodes) + /* No easy way to check change in curblocks */ + if (dqblk.dqb_curinodes == qup->dqblk.dqb_curinodes) break; warnx("%s: cannot change current allocation", fsp); break; @@ -658,8 +711,7 @@ readtimes(struct quotause *quplist, char FILE *fd; int cnt; char *cp; - time_t itime, btime, iseconds, bseconds; - long l_itime, l_btime; + u_int64_t itime, btime, iseconds, bseconds; char *fsp, bunits[10], iunits[10], line1[BUFSIZ]; fd = fopen(inname, "r"); @@ -682,14 +734,12 @@ readtimes(struct quotause *quplist, char return (0); } cnt = sscanf(cp, - " block grace period: %ld %s file grace period: %ld %s", - &l_btime, bunits, &l_itime, iunits); + " block grace period: %llu %s file grace period: %llu %s", + &btime, bunits, &itime, iunits); if (cnt != 4) { warnx("%s:%s: bad format", fsp, cp); return (0); } - btime = l_btime; - itime = l_itime; if (cvtatos(btime, bunits, &bseconds) == 0) return (0); if (cvtatos(itime, iunits, &iseconds) == 0) @@ -723,21 +773,21 @@ readtimes(struct quotause *quplist, char * Convert seconds to ASCII times. */ char * -cvtstoa(time_t secs) +cvtstoa(u_int64_t secs) { static char buf[20]; if (secs % (24 * 60 * 60) == 0) { secs /= 24 * 60 * 60; - sprintf(buf, "%ld day%s", (long)secs, secs == 1 ? "" : "s"); + sprintf(buf, "%llu day%s", secs, secs == 1 ? "" : "s"); } else if (secs % (60 * 60) == 0) { secs /= 60 * 60; - sprintf(buf, "%ld hour%s", (long)secs, secs == 1 ? "" : "s"); + sprintf(buf, "%llu hour%s", secs, secs == 1 ? "" : "s"); } else if (secs % 60 == 0) { secs /= 60; - sprintf(buf, "%ld minute%s", (long)secs, secs == 1 ? "" : "s"); + sprintf(buf, "%llu minute%s", secs, secs == 1 ? "" : "s"); } else - sprintf(buf, "%ld second%s", (long)secs, secs == 1 ? "" : "s"); + sprintf(buf, "%llu second%s", secs, secs == 1 ? "" : "s"); return (buf); } @@ -745,7 +795,7 @@ cvtstoa(time_t secs) * Convert ASCII input times to seconds. */ int -cvtatos(time_t period, char *units, time_t *seconds) +cvtatos(u_int64_t period, char *units, u_int64_t *seconds) { if (bcmp(units, "second", 6) == 0) @@ -757,7 +807,7 @@ cvtatos(time_t period, char *units, time else if (bcmp(units, "day", 3) == 0) *seconds = period * 24 * 60 * 60; else { - printf("%s: bad units, specify %s\n", units, + warnx("%s: bad units, specify %s\n", units, "days, hours, minutes, or seconds"); return (0); } @@ -765,6 +815,53 @@ cvtatos(time_t period, char *units, time } /* + * Convert a limit to number of disk blocks. + */ +u_int64_t +cvtval(u_int64_t limit, char units) +{ + + switch(units) { + case 'B': + case 'b': + limit = btodb(limit); + break; + case '\0': /* historic behavior */ + case ',': /* historic behavior */ + case ')': /* historic behavior */ + case 'K': + case 'k': + limit *= btodb(1024); + break; + case 'M': + case 'm': + limit *= btodb(1048576); + break; + case 'G': + case 'g': + limit *= btodb(1073741824); + break; + case 'T': + case 't': + limit *= btodb(1099511627776); + break; + case 'P': + case 'p': + limit *= btodb(1125899906842624); + break; + case 'E': + case 'e': + limit *= btodb(1152921504606846976); + break; + default: + warnx("%llu%c: unknown units, specify K, M, G, T, P, or E\n", + limit, units); + break; + } + return (limit); +} + +/* * Free a list of quotause structures. */ void @@ -833,6 +930,7 @@ hasquota(struct fstab *fs, int type, cha } if (statfs(fs->fs_file, &sfb) != 0) { warn("cannot statfs mount point %s", fs->fs_file); + sleep(3); return (0); } if (strcmp(fs->fs_file, sfb.f_mntonname)) { From owner-svn-src-projects@FreeBSD.ORG Wed Feb 4 00:45:26 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17B6C106564A; Wed, 4 Feb 2009 00:45:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEBE28FC16; Wed, 4 Feb 2009 00:45:25 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n140jPQq047106; Wed, 4 Feb 2009 00:45:25 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n140jP5w047098; Wed, 4 Feb 2009 00:45:25 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902040045.n140jP5w047098@svn.freebsd.org> From: Lawrence Stewart Date: Wed, 4 Feb 2009 00:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188109 - projects/tcp_cc_8.x/sys/netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 00:45:26 -0000 Author: lstewart Date: Wed Feb 4 00:45:25 2009 New Revision: 188109 URL: http://svn.freebsd.org/changeset/base/188109 Log: Explicitly compare against NULL. Modified: projects/tcp_cc_8.x/sys/netinet/cc.c projects/tcp_cc_8.x/sys/netinet/cc_cubic.c projects/tcp_cc_8.x/sys/netinet/cc_htcp.c projects/tcp_cc_8.x/sys/netinet/tcp_input.c projects/tcp_cc_8.x/sys/netinet/tcp_output.c projects/tcp_cc_8.x/sys/netinet/tcp_subr.c projects/tcp_cc_8.x/sys/netinet/tcp_timer.c projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c Modified: projects/tcp_cc_8.x/sys/netinet/cc.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc.c Wed Feb 4 00:21:36 2009 (r188108) +++ projects/tcp_cc_8.x/sys/netinet/cc.c Wed Feb 4 00:45:25 2009 (r188109) @@ -84,7 +84,7 @@ cc_default_algorithm(SYSCTL_HANDLER_ARGS { struct cc_algo *funcs; - if (!req->newptr) + if (req->newptr == NULL) goto skip; CC_LIST_RLOCK(); @@ -215,9 +215,9 @@ cc_deregister_algorithm(struct cc_algo * * using the deregistered algo's functions... * Not sure how to do that yet! */ - if(CC_ALGO(tp)->init) + if(CC_ALGO(tp)->init != NULL) CC_ALGO(tp)->init(tp); - if (tmpfuncs->deinit) + if (tmpfuncs->deinit != NULL) tmpfuncs->deinit(tp); } } Modified: projects/tcp_cc_8.x/sys/netinet/cc_cubic.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Wed Feb 4 00:21:36 2009 (r188108) +++ projects/tcp_cc_8.x/sys/netinet/cc_cubic.c Wed Feb 4 00:45:25 2009 (r188109) @@ -147,7 +147,7 @@ cubic_init(struct tcpcb *tp) void cubic_deinit(struct tcpcb *tp) { - if (CC_DATA(tp)) + if (CC_DATA(tp) != NULL) free(CC_DATA(tp), M_CUBIC); } Modified: projects/tcp_cc_8.x/sys/netinet/cc_htcp.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc_htcp.c Wed Feb 4 00:21:36 2009 (r188108) +++ projects/tcp_cc_8.x/sys/netinet/cc_htcp.c Wed Feb 4 00:45:25 2009 (r188109) @@ -214,7 +214,7 @@ htcp_deinit(struct tcpcb *tp) printf("deinitialising tcp connection with htcp congestion control\n"); #endif - if (CC_DATA(tp)) + if (CC_DATA(tp) != NULL) FREE(CC_DATA(tp), M_HTCP); } @@ -491,7 +491,7 @@ htcp_ssthresh_update(struct tcpcb *tp) static int htcp_rtt_scaling_handler(SYSCTL_HANDLER_ARGS) { - if(!req->newptr) + if(req->newptr == NULL) goto skip; /* if the value passed in isn't 0 or 1, return an error */ @@ -505,7 +505,7 @@ skip: static int htcp_adaptive_backoff_handler(SYSCTL_HANDLER_ARGS) { - if(!req->newptr) + if(req->newptr == NULL) goto skip; /* if the value passed in isn't 0 or 1, return an error */ @@ -520,7 +520,7 @@ skip: static int htcp_debug_ticks_handler(SYSCTL_HANDLER_ARGS) { - if(!req->newptr) + if(req->newptr == NULL) goto skip; /* if the value passed in is less than 1 */ Modified: projects/tcp_cc_8.x/sys/netinet/tcp_input.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_input.c Wed Feb 4 00:21:36 2009 (r188108) +++ projects/tcp_cc_8.x/sys/netinet/tcp_input.c Wed Feb 4 00:45:25 2009 (r188109) @@ -2106,7 +2106,7 @@ tcp_do_segment(struct mbuf *m, struct tc * defined a hook for tasks to run * before entering FR, call it */ - if (CC_ALGO(tp)->pre_fr) + if (CC_ALGO(tp)->pre_fr != NULL) CC_ALGO(tp)->pre_fr(tp, th); ENTER_FASTRECOVERY(tp); @@ -2182,7 +2182,7 @@ tcp_do_segment(struct mbuf *m, struct tc else tcp_newreno_partial_ack(tp, th); } else { - if (CC_ALGO(tp)->post_fr) + if (CC_ALGO(tp)->post_fr != NULL) CC_ALGO(tp)->post_fr(tp, th); } } @@ -2288,7 +2288,7 @@ process_ACK: * congestion control algorithm in use for this connection. */ if (!IN_FASTRECOVERY(tp)) { - if (CC_ALGO(tp)->ack_received) + if (CC_ALGO(tp)->ack_received != NULL) CC_ALGO(tp)->ack_received(tp, th); } SOCKBUF_LOCK(&so->so_snd); @@ -3270,7 +3270,7 @@ tcp_mss(struct tcpcb *tp, int offer) tp->snd_bandwidth = metrics.rmx_bandwidth; /* set the initial cwnd value */ - if (CC_ALGO(tp)->cwnd_init) + if (CC_ALGO(tp)->cwnd_init != NULL) CC_ALGO(tp)->cwnd_init(tp); /* Check the interface for TSO capabilities. */ Modified: projects/tcp_cc_8.x/sys/netinet/tcp_output.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_output.c Wed Feb 4 00:21:36 2009 (r188108) +++ projects/tcp_cc_8.x/sys/netinet/tcp_output.c Wed Feb 4 00:45:25 2009 (r188109) @@ -172,7 +172,7 @@ tcp_output(struct tcpcb *tp) idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); if (idle && (ticks - tp->t_rcvtime) >= tp->t_rxtcur) { /* reset cwnd after a period of idleness */ - if (CC_ALGO(tp)->after_idle) + if (CC_ALGO(tp)->after_idle != NULL) CC_ALGO(tp)->after_idle(tp); } tp->t_flags &= ~TF_LASTIDLE; Modified: projects/tcp_cc_8.x/sys/netinet/tcp_subr.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_subr.c Wed Feb 4 00:21:36 2009 (r188108) +++ projects/tcp_cc_8.x/sys/netinet/tcp_subr.c Wed Feb 4 00:45:25 2009 (r188109) @@ -874,7 +874,7 @@ tcp_discardcb(struct tcpcb *tp) tcp_free_sackholes(tp); /* Allow the cc algorithm in use for this cb to clean up after itself */ - if (CC_ALGO(tp)->deinit) + if (CC_ALGO(tp)->deinit != NULL) CC_ALGO(tp)->deinit(tp); CC_ALGO(tp) = NULL; Modified: projects/tcp_cc_8.x/sys/netinet/tcp_timer.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_timer.c Wed Feb 4 00:21:36 2009 (r188108) +++ projects/tcp_cc_8.x/sys/netinet/tcp_timer.c Wed Feb 4 00:45:25 2009 (r188109) @@ -555,7 +555,7 @@ tcp_timer_rexmt(void * xtp) */ tp->t_rtttime = 0; - if (CC_ALGO(tp)->after_timeout) + if (CC_ALGO(tp)->after_timeout != NULL) CC_ALGO(tp)->after_timeout(tp); tp->t_dupacks = 0; Modified: projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c Wed Feb 4 00:21:36 2009 (r188108) +++ projects/tcp_cc_8.x/sys/netinet/tcp_usrreq.c Wed Feb 4 00:45:25 2009 (r188109) @@ -1397,7 +1397,7 @@ tcp_ctloutput(struct socket *so, struct * so it's safe to do these things * without ordering concerns */ - if (CC_ALGO(tp)->deinit) + if (CC_ALGO(tp)->deinit != NULL) CC_ALGO(tp)->deinit(tp); CC_ALGO(tp) = cc_algo; /* From owner-svn-src-projects@FreeBSD.ORG Wed Feb 4 01:11:38 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3836106566C; Wed, 4 Feb 2009 01:11:38 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFACC8FC0C; Wed, 4 Feb 2009 01:11:38 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n141BcZQ047737; Wed, 4 Feb 2009 01:11:38 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n141BcOW047729; Wed, 4 Feb 2009 01:11:38 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902040111.n141BcOW047729@svn.freebsd.org> From: Lawrence Stewart Date: Wed, 4 Feb 2009 01:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188111 - in projects/tcp_cc_7.x/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 01:11:39 -0000 Author: lstewart Date: Wed Feb 4 01:11:37 2009 New Revision: 188111 URL: http://svn.freebsd.org/changeset/base/188111 Log: Merge r188109 from tcp_cc_8.x Modified: projects/tcp_cc_7.x/sys/ (props changed) projects/tcp_cc_7.x/sys/contrib/pf/ (props changed) projects/tcp_cc_7.x/sys/dev/ath/ath_hal/ (props changed) projects/tcp_cc_7.x/sys/dev/cxgb/ (props changed) projects/tcp_cc_7.x/sys/netinet/cc.c projects/tcp_cc_7.x/sys/netinet/cc_cubic.c projects/tcp_cc_7.x/sys/netinet/cc_htcp.c projects/tcp_cc_7.x/sys/netinet/tcp_input.c projects/tcp_cc_7.x/sys/netinet/tcp_output.c projects/tcp_cc_7.x/sys/netinet/tcp_subr.c projects/tcp_cc_7.x/sys/netinet/tcp_timer.c projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c Modified: projects/tcp_cc_7.x/sys/netinet/cc.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/cc.c Wed Feb 4 01:02:56 2009 (r188110) +++ projects/tcp_cc_7.x/sys/netinet/cc.c Wed Feb 4 01:11:37 2009 (r188111) @@ -82,7 +82,7 @@ cc_default_algorithm(SYSCTL_HANDLER_ARGS { struct cc_algo *funcs; - if (!req->newptr) + if (req->newptr == NULL) goto skip; CC_LIST_RLOCK(); @@ -213,9 +213,9 @@ cc_deregister_algorithm(struct cc_algo * * using the deregistered algo's functions... * Not sure how to do that yet! */ - if(CC_ALGO(tp)->init) + if(CC_ALGO(tp)->init != NULL) CC_ALGO(tp)->init(tp); - if (tmpfuncs->deinit) + if (tmpfuncs->deinit != NULL) tmpfuncs->deinit(tp); } } Modified: projects/tcp_cc_7.x/sys/netinet/cc_cubic.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/cc_cubic.c Wed Feb 4 01:02:56 2009 (r188110) +++ projects/tcp_cc_7.x/sys/netinet/cc_cubic.c Wed Feb 4 01:11:37 2009 (r188111) @@ -147,7 +147,7 @@ cubic_init(struct tcpcb *tp) void cubic_deinit(struct tcpcb *tp) { - if (CC_DATA(tp)) + if (CC_DATA(tp) != NULL) free(CC_DATA(tp), M_CUBIC); } Modified: projects/tcp_cc_7.x/sys/netinet/cc_htcp.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/cc_htcp.c Wed Feb 4 01:02:56 2009 (r188110) +++ projects/tcp_cc_7.x/sys/netinet/cc_htcp.c Wed Feb 4 01:11:37 2009 (r188111) @@ -214,7 +214,7 @@ htcp_deinit(struct tcpcb *tp) printf("deinitialising tcp connection with htcp congestion control\n"); #endif - if (CC_DATA(tp)) + if (CC_DATA(tp) != NULL) FREE(CC_DATA(tp), M_HTCP); } @@ -491,7 +491,7 @@ htcp_ssthresh_update(struct tcpcb *tp) static int htcp_rtt_scaling_handler(SYSCTL_HANDLER_ARGS) { - if(!req->newptr) + if(req->newptr == NULL) goto skip; /* if the value passed in isn't 0 or 1, return an error */ @@ -505,7 +505,7 @@ skip: static int htcp_adaptive_backoff_handler(SYSCTL_HANDLER_ARGS) { - if(!req->newptr) + if(req->newptr == NULL) goto skip; /* if the value passed in isn't 0 or 1, return an error */ @@ -520,7 +520,7 @@ skip: static int htcp_debug_ticks_handler(SYSCTL_HANDLER_ARGS) { - if(!req->newptr) + if(req->newptr == NULL) goto skip; /* if the value passed in is less than 1 */ Modified: projects/tcp_cc_7.x/sys/netinet/tcp_input.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/tcp_input.c Wed Feb 4 01:02:56 2009 (r188110) +++ projects/tcp_cc_7.x/sys/netinet/tcp_input.c Wed Feb 4 01:11:37 2009 (r188111) @@ -1818,7 +1818,7 @@ tcp_do_segment(struct mbuf *m, struct tc * defined a hook for tasks to run * before entering FR, call it */ - if (CC_ALGO(tp)->pre_fr) + if (CC_ALGO(tp)->pre_fr != NULL) CC_ALGO(tp)->pre_fr(tp, th); ENTER_FASTRECOVERY(tp); @@ -1893,7 +1893,7 @@ tcp_do_segment(struct mbuf *m, struct tc else tcp_newreno_partial_ack(tp, th); } else { - if (CC_ALGO(tp)->post_fr) + if (CC_ALGO(tp)->post_fr != NULL) CC_ALGO(tp)->post_fr(tp, th); } } @@ -1998,7 +1998,7 @@ process_ACK: * congestion control algorithm in use for this connection. */ if (!IN_FASTRECOVERY(tp)) { - if (CC_ALGO(tp)->ack_received) + if (CC_ALGO(tp)->ack_received != NULL) CC_ALGO(tp)->ack_received(tp, th); } SOCKBUF_LOCK(&so->so_snd); @@ -2889,7 +2889,7 @@ tcp_mss(struct tcpcb *tp, int offer) tp->snd_bandwidth = metrics.rmx_bandwidth; /* set the initial cwnd value */ - if (CC_ALGO(tp)->cwnd_init) + if (CC_ALGO(tp)->cwnd_init != NULL) CC_ALGO(tp)->cwnd_init(tp); else tp->snd_cwnd = mss; Modified: projects/tcp_cc_7.x/sys/netinet/tcp_output.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/tcp_output.c Wed Feb 4 01:02:56 2009 (r188110) +++ projects/tcp_cc_7.x/sys/netinet/tcp_output.c Wed Feb 4 01:11:37 2009 (r188111) @@ -159,7 +159,7 @@ tcp_output(struct tcpcb *tp) idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); if (idle && (ticks - tp->t_rcvtime) >= tp->t_rxtcur) { /* reset cwnd after a period of idleness */ - if (CC_ALGO(tp)->after_idle) + if (CC_ALGO(tp)->after_idle != NULL) CC_ALGO(tp)->after_idle(tp); } tp->t_flags &= ~TF_LASTIDLE; Modified: projects/tcp_cc_7.x/sys/netinet/tcp_subr.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/tcp_subr.c Wed Feb 4 01:02:56 2009 (r188110) +++ projects/tcp_cc_7.x/sys/netinet/tcp_subr.c Wed Feb 4 01:11:37 2009 (r188111) @@ -777,7 +777,7 @@ tcp_discardcb(struct tcpcb *tp) tcp_free_sackholes(tp); /* Allow the cc algorithm in use for this cb to clean up after itself */ - if (CC_ALGO(tp)->deinit) + if (CC_ALGO(tp)->deinit != NULL) CC_ALGO(tp)->deinit(tp); CC_ALGO(tp) = NULL; Modified: projects/tcp_cc_7.x/sys/netinet/tcp_timer.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/tcp_timer.c Wed Feb 4 01:02:56 2009 (r188110) +++ projects/tcp_cc_7.x/sys/netinet/tcp_timer.c Wed Feb 4 01:11:37 2009 (r188111) @@ -519,7 +519,7 @@ tcp_timer_rexmt(void * xtp) */ tp->t_rtttime = 0; - if (CC_ALGO(tp)->after_timeout) + if (CC_ALGO(tp)->after_timeout != NULL) CC_ALGO(tp)->after_timeout(tp); tp->t_dupacks = 0; Modified: projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c ============================================================================== --- projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c Wed Feb 4 01:02:56 2009 (r188110) +++ projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c Wed Feb 4 01:11:37 2009 (r188111) @@ -1400,7 +1400,7 @@ tcp_ctloutput(struct socket *so, struct * so it's safe to do these things * without ordering concerns */ - if (CC_ALGO(tp)->deinit) + if (CC_ALGO(tp)->deinit != NULL) CC_ALGO(tp)->deinit(tp); CC_ALGO(tp) = cc_algo; /* From owner-svn-src-projects@FreeBSD.ORG Wed Feb 4 19:30:03 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60240106564A; Wed, 4 Feb 2009 19:30:03 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 346A08FC0C; Wed, 4 Feb 2009 19:30:03 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n14JU31Q088937; Wed, 4 Feb 2009 19:30:03 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n14JU3Ac088936; Wed, 4 Feb 2009 19:30:03 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <200902041930.n14JU3Ac088936@svn.freebsd.org> From: Jeff Roberson Date: Wed, 4 Feb 2009 19:30:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188120 - projects/jeff_mbuf X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 19:30:03 -0000 Author: jeff Date: Wed Feb 4 19:30:02 2009 New Revision: 188120 URL: http://svn.freebsd.org/changeset/base/188120 Log: - Create a branch to track my mbuf revisions. Added: projects/jeff_mbuf/ (props changed) - copied from r188119, head/ From owner-svn-src-projects@FreeBSD.ORG Wed Feb 4 19:43:09 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40029106564A; Wed, 4 Feb 2009 19:43:09 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1DF8FC14; Wed, 4 Feb 2009 19:43:09 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n14Jh8Ow089219; Wed, 4 Feb 2009 19:43:08 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n14Jh88p089212; Wed, 4 Feb 2009 19:43:08 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <200902041943.n14Jh88p089212@svn.freebsd.org> From: Jeff Roberson Date: Wed, 4 Feb 2009 19:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188121 - in projects/jeff_mbuf/sys: dev/cxgb dev/ti dev/vx dev/xen/netback kern net netgraph netinet nfsclient nfsserver sys vm X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 19:43:09 -0000 Author: jeff Date: Wed Feb 4 19:43:08 2009 New Revision: 188121 URL: http://svn.freebsd.org/changeset/base/188121 Log: Initial import of ongoing mbuf work - Introduce a m_size field to simplify a great number of macros and consumer code. Paves the way for more flexible mbuf sizes once the field is honored in all code. - Streamline mbuf allocation/free code. Move things into functions that should not be inlined and functions to inlines when the calling footprint exceeds the function text size. - Reference count mbufs rather than clusters. All mbufs have a ref so uma refcnt zones and the super expensive uma_find_refcnt() is not necessary. Don't duplicate m_ext areas, call m_refm() to reference a specific data area of a target mbuf. - Retire UMA refcnt zones. These were too inefficient to be useful. Modified: projects/jeff_mbuf/sys/dev/cxgb/cxgb_sge.c projects/jeff_mbuf/sys/dev/ti/if_ti.c projects/jeff_mbuf/sys/dev/vx/if_vx.c projects/jeff_mbuf/sys/dev/xen/netback/netback.c projects/jeff_mbuf/sys/kern/kern_mbuf.c projects/jeff_mbuf/sys/kern/uipc_mbuf.c projects/jeff_mbuf/sys/kern/uipc_mbuf2.c projects/jeff_mbuf/sys/kern/uipc_sockbuf.c projects/jeff_mbuf/sys/net/if_gre.c projects/jeff_mbuf/sys/net/if_ppp.c projects/jeff_mbuf/sys/net/ppp_tty.c projects/jeff_mbuf/sys/netgraph/ng_tty.c projects/jeff_mbuf/sys/netinet/ip_options.c projects/jeff_mbuf/sys/netinet/sctp_os_bsd.h projects/jeff_mbuf/sys/nfsclient/nfsm_subs.h projects/jeff_mbuf/sys/nfsserver/nfsm_subs.h projects/jeff_mbuf/sys/sys/mbuf.h projects/jeff_mbuf/sys/sys/sockbuf.h projects/jeff_mbuf/sys/vm/uma.h projects/jeff_mbuf/sys/vm/uma_core.c projects/jeff_mbuf/sys/vm/uma_dbg.c projects/jeff_mbuf/sys/vm/uma_int.h Modified: projects/jeff_mbuf/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- projects/jeff_mbuf/sys/dev/cxgb/cxgb_sge.c Wed Feb 4 19:30:02 2009 (r188120) +++ projects/jeff_mbuf/sys/dev/cxgb/cxgb_sge.c Wed Feb 4 19:43:08 2009 (r188121) @@ -515,7 +515,7 @@ refill_fl(adapter_t *sc, struct sge_fl * struct refill_fl_cb_arg cb_arg; caddr_t cl; int err, count = 0; - int header_size = sizeof(struct m_hdr) + sizeof(struct pkthdr) + sizeof(struct m_ext_) + sizeof(uint32_t); + int header_size = sizeof(struct mbuf) + sizeof(uint32_t); cb_arg.error = 0; while (n--) { @@ -2360,7 +2360,7 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i q->rspq.size = p->rspq_size; - header_size = sizeof(struct m_hdr) + sizeof(struct pkthdr) + sizeof(struct m_ext_) + sizeof(uint32_t); + header_size = sizeof(struct mbuf) + sizeof(uint32_t); q->txq[TXQ_ETH].stop_thres = nports * flits_to_desc(sgl_len(TX_MAX_SEGS + 1) + 3); @@ -2535,8 +2535,7 @@ init_cluster_mbuf(caddr_t cl, int flags, struct mbuf *m; int header_size; - header_size = sizeof(struct m_hdr) + sizeof(struct pkthdr) + - sizeof(struct m_ext_) + sizeof(uint32_t); + header_size = sizeof(struct mbuf) + sizeof(uint32_t); bzero(cl, header_size); m = (struct mbuf *)cl; Modified: projects/jeff_mbuf/sys/dev/ti/if_ti.c ============================================================================== --- projects/jeff_mbuf/sys/dev/ti/if_ti.c Wed Feb 4 19:30:02 2009 (r188120) +++ projects/jeff_mbuf/sys/dev/ti/if_ti.c Wed Feb 4 19:43:08 2009 (r188121) @@ -1308,12 +1308,11 @@ ti_newbuf_mini(sc, i, m) if (m_new == NULL) { return (ENOBUFS); } - m_new->m_len = m_new->m_pkthdr.len = MHLEN; } else { m_new = m; - m_new->m_data = m_new->m_pktdat; - m_new->m_len = m_new->m_pkthdr.len = MHLEN; + m_new->m_data = M_START(m); } + m_new->m_len = m_new->m_pkthdr.len = m_new->m_size; m_adj(m_new, ETHER_ALIGN); r = &sc->ti_rdata->ti_rx_mini_ring[i]; Modified: projects/jeff_mbuf/sys/dev/vx/if_vx.c ============================================================================== --- projects/jeff_mbuf/sys/dev/vx/if_vx.c Wed Feb 4 19:30:02 2009 (r188120) +++ projects/jeff_mbuf/sys/dev/vx/if_vx.c Wed Feb 4 19:43:08 2009 (r188121) @@ -825,8 +825,11 @@ vx_get(struct vx_softc *sc, u_int totlen /* Convert one of our saved mbuf's. */ sc->vx_next_mb = (sc->vx_next_mb + 1) % MAX_MBS; m->m_data = m->m_pktdat; - m->m_flags = M_PKTHDR; - bzero(&m->m_pkthdr, sizeof(m->m_pkthdr)); + m->m_flags |= M_PKTHDR; + if (m_pkthdr_init(m, M_NOWAIT)) { + m_free(m); + return NULL; + } } m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = totlen; Modified: projects/jeff_mbuf/sys/dev/xen/netback/netback.c ============================================================================== --- projects/jeff_mbuf/sys/dev/xen/netback/netback.c Wed Feb 4 19:30:02 2009 (r188120) +++ projects/jeff_mbuf/sys/dev/xen/netback/netback.c Wed Feb 4 19:43:08 2009 (r188121) @@ -873,8 +873,7 @@ netif_rx(netif_t *netif) pkts_dequeued++; /* Check if we need to copy the data */ - if (((m->m_flags & (M_RDONLY|M_EXT)) != M_EXT) || - (*m->m_ext.ref_cnt > 1) || m->m_next != NULL) { + if (M_WRITABLE(m) == 0 || m->m_next != NULL) { struct mbuf *n; DDPRINTF("copying mbuf (fl=%x ext=%x rc=%d n=%x)\n", Modified: projects/jeff_mbuf/sys/kern/kern_mbuf.c ============================================================================== --- projects/jeff_mbuf/sys/kern/kern_mbuf.c Wed Feb 4 19:30:02 2009 (r188120) +++ projects/jeff_mbuf/sys/kern/kern_mbuf.c Wed Feb 4 19:43:08 2009 (r188121) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -210,27 +211,24 @@ SYSCTL_STRUCT(_kern_ipc, OID_AUTO, mbsta /* * Zones from which we allocate. */ -uma_zone_t zone_mbuf; uma_zone_t zone_clust; -uma_zone_t zone_pack; uma_zone_t zone_jumbop; uma_zone_t zone_jumbo9; uma_zone_t zone_jumbo16; -uma_zone_t zone_ext_refcnt; +uma_zone_t zone_mbuf; +uma_zone_t zone_pack; /* * Local prototypes. */ -static int mb_ctor_mbuf(void *, int, void *, int); -static int mb_ctor_clust(void *, int, void *, int); -static int mb_ctor_pack(void *, int, void *, int); -static void mb_dtor_mbuf(void *, int, void *); -static void mb_dtor_clust(void *, int, void *); -static void mb_dtor_pack(void *, int, void *); -static int mb_zinit_pack(void *, int, int); -static void mb_zfini_pack(void *, int); - +#ifdef INVARIANTS +static int mb_ctor_pack(void *mem, int size, void *arg, int how); +#endif +static void mb_dtor_pack(void *mem, int size, void *arg); static void mb_reclaim(void *); +static int mb_zinit_pack(void *mem, int size, int how); +static void mb_zfini_pack(void *mem, int size); + static void mbuf_init(void *); static void *mbuf_jumbo_alloc(uma_zone_t, int, u_int8_t *, int); static void mbuf_jumbo_free(void *, int, u_int8_t); @@ -252,73 +250,66 @@ mbuf_init(void *dummy) * Configure UMA zones for Mbufs, Clusters, and Packets. */ zone_mbuf = uma_zcreate(MBUF_MEM_NAME, MSIZE, - mb_ctor_mbuf, mb_dtor_mbuf, #ifdef INVARIANTS - trash_init, trash_fini, + trash_ctor, trash_dtor, trash_init, trash_fini, #else - NULL, NULL, + NULL, NULL, NULL, NULL, #endif MSIZE - 1, UMA_ZONE_MAXBUCKET); zone_clust = uma_zcreate(MBUF_CLUSTER_MEM_NAME, MCLBYTES, - mb_ctor_clust, mb_dtor_clust, #ifdef INVARIANTS - trash_init, trash_fini, + trash_ctor, trash_dtor, trash_init, trash_fini, #else - NULL, NULL, + NULL, NULL, NULL, NULL, #endif - UMA_ALIGN_PTR, UMA_ZONE_REFCNT); + UMA_ALIGN_PTR, UMA_ZONE_MAXBUCKET); if (nmbclusters > 0) uma_zone_set_max(zone_clust, nmbclusters); - zone_pack = uma_zsecond_create(MBUF_PACKET_MEM_NAME, mb_ctor_pack, + zone_pack = uma_zsecond_create(MBUF_PACKET_MEM_NAME, +#ifdef INVARIANTS + mb_ctor_pack, +#else + NULL, +#endif mb_dtor_pack, mb_zinit_pack, mb_zfini_pack, zone_mbuf); /* Make jumbo frame zone too. Page size, 9k and 16k. */ zone_jumbop = uma_zcreate(MBUF_JUMBOP_MEM_NAME, MJUMPAGESIZE, - mb_ctor_clust, mb_dtor_clust, #ifdef INVARIANTS - trash_init, trash_fini, + trash_ctor, trash_dtor, trash_init, trash_fini, #else - NULL, NULL, + NULL, NULL, NULL, NULL, #endif - UMA_ALIGN_PTR, UMA_ZONE_REFCNT); + UMA_ALIGN_PTR, 0); if (nmbjumbop > 0) uma_zone_set_max(zone_jumbop, nmbjumbop); zone_jumbo9 = uma_zcreate(MBUF_JUMBO9_MEM_NAME, MJUM9BYTES, - mb_ctor_clust, mb_dtor_clust, #ifdef INVARIANTS - trash_init, trash_fini, + trash_ctor, trash_dtor, trash_init, trash_fini, #else - NULL, NULL, + NULL, NULL, NULL, NULL, #endif - UMA_ALIGN_PTR, UMA_ZONE_REFCNT); + UMA_ALIGN_PTR, 0); if (nmbjumbo9 > 0) uma_zone_set_max(zone_jumbo9, nmbjumbo9); uma_zone_set_allocf(zone_jumbo9, mbuf_jumbo_alloc); uma_zone_set_freef(zone_jumbo9, mbuf_jumbo_free); zone_jumbo16 = uma_zcreate(MBUF_JUMBO16_MEM_NAME, MJUM16BYTES, - mb_ctor_clust, mb_dtor_clust, #ifdef INVARIANTS - trash_init, trash_fini, + trash_ctor, trash_dtor, trash_init, trash_fini, #else - NULL, NULL, + NULL, NULL, NULL, NULL, #endif - UMA_ALIGN_PTR, UMA_ZONE_REFCNT); + UMA_ALIGN_PTR, 0); if (nmbjumbo16 > 0) uma_zone_set_max(zone_jumbo16, nmbjumbo16); uma_zone_set_allocf(zone_jumbo16, mbuf_jumbo_alloc); uma_zone_set_freef(zone_jumbo16, mbuf_jumbo_free); - zone_ext_refcnt = uma_zcreate(MBUF_EXTREFCNT_MEM_NAME, sizeof(u_int), - NULL, NULL, - NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_ZINIT); - - /* uma_prealloc() goes here... */ - /* * Hook event handler for low-memory situation, used to * drain protocols and push data back to the caches (UMA @@ -373,86 +364,18 @@ mbuf_jumbo_free(void *mem, int size, u_i contigfree(mem, size, M_JUMBOFRAME); } -/* - * Constructor for Mbuf master zone. - * - * The 'arg' pointer points to a mb_args structure which - * contains call-specific information required to support the - * mbuf allocation API. See mbuf.h. - */ +#ifdef INVARIANTS static int -mb_ctor_mbuf(void *mem, int size, void *arg, int how) +mb_ctor_pack(void *mem, int size, void *arg, int how) { struct mbuf *m; - struct mb_args *args; -#ifdef MAC - int error; -#endif - int flags; - short type; -#ifdef INVARIANTS - trash_ctor(mem, size, arg, how); -#endif m = (struct mbuf *)mem; - args = (struct mb_args *)arg; - flags = args->flags; - type = args->type; - - /* - * The mbuf is initialized later. The caller has the - * responsibility to set up any MAC labels too. - */ - if (type == MT_NOINIT) - return (0); + trash_ctor(m->m_ext.ext_buf, MCLBYTES, arg, how); - m->m_next = NULL; - m->m_nextpkt = NULL; - m->m_len = 0; - m->m_flags = flags; - m->m_type = type; - if (flags & M_PKTHDR) { - m->m_data = m->m_pktdat; - m->m_pkthdr.rcvif = NULL; - m->m_pkthdr.header = NULL; - m->m_pkthdr.len = 0; - m->m_pkthdr.csum_flags = 0; - m->m_pkthdr.csum_data = 0; - m->m_pkthdr.tso_segsz = 0; - m->m_pkthdr.ether_vtag = 0; - m->m_pkthdr.flowid = 0; - SLIST_INIT(&m->m_pkthdr.tags); -#ifdef MAC - /* If the label init fails, fail the alloc */ - error = mac_mbuf_init(m, how); - if (error) - return (error); -#endif - } else - m->m_data = m->m_dat; return (0); } - -/* - * The Mbuf master zone destructor. - */ -static void -mb_dtor_mbuf(void *mem, int size, void *arg) -{ - struct mbuf *m; - unsigned long flags; - - m = (struct mbuf *)mem; - flags = (unsigned long)arg; - - if ((flags & MB_NOTAGS) == 0 && (m->m_flags & M_PKTHDR) != 0) - m_tag_delete_chain(m, NULL); - KASSERT((m->m_flags & M_EXT) == 0, ("%s: M_EXT set", __func__)); - KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__)); -#ifdef INVARIANTS - trash_dtor(mem, size, arg); #endif -} /* * The Mbuf Packet zone destructor. @@ -463,21 +386,21 @@ mb_dtor_pack(void *mem, int size, void * struct mbuf *m; m = (struct mbuf *)mem; - if ((m->m_flags & M_PKTHDR) != 0) - m_tag_delete_chain(m, NULL); - /* Make sure we've got a clean cluster back. */ KASSERT((m->m_flags & M_EXT) == M_EXT, ("%s: M_EXT not set", __func__)); KASSERT(m->m_ext.ext_buf != NULL, ("%s: ext_buf == NULL", __func__)); - KASSERT(m->m_ext.ext_free == NULL, ("%s: ext_free != NULL", __func__)); + KASSERT(m->m_ext.ext_free == m_ext_free_nop, + ("%s: ext_free != m_ext_free_nop", __func__)); KASSERT(m->m_ext.ext_arg1 == NULL, ("%s: ext_arg1 != NULL", __func__)); KASSERT(m->m_ext.ext_arg2 == NULL, ("%s: ext_arg2 != NULL", __func__)); - KASSERT(m->m_ext.ext_size == MCLBYTES, ("%s: ext_size != MCLBYTES", __func__)); - KASSERT(m->m_ext.ext_type == EXT_PACKET, ("%s: ext_type != EXT_PACKET", __func__)); - KASSERT(*m->m_ext.ref_cnt == 1, ("%s: ref_cnt != 1", __func__)); -#ifdef INVARIANTS + KASSERT(m->m_ext.ext_size == MCLBYTES, ("%s: ext_size != MCLBYTES", + __func__)); + KASSERT(m->m_ext.ext_type == EXT_PACKET, ("%s: ext_type != EXT_PACKET", + __func__)); +#ifdef INVARIANTS trash_dtor(m->m_ext.ext_buf, MCLBYTES, arg); #endif + /* * If there are processes blocked on zone_clust, waiting for pages * to be freed up, * cause them to be woken up by draining the @@ -491,85 +414,6 @@ mb_dtor_pack(void *mem, int size, void * } /* - * The Cluster and Jumbo[PAGESIZE|9|16] zone constructor. - * - * Here the 'arg' pointer points to the Mbuf which we - * are configuring cluster storage for. If 'arg' is - * empty we allocate just the cluster without setting - * the mbuf to it. See mbuf.h. - */ -static int -mb_ctor_clust(void *mem, int size, void *arg, int how) -{ - struct mbuf *m; - u_int *refcnt; - int type; - uma_zone_t zone; - -#ifdef INVARIANTS - trash_ctor(mem, size, arg, how); -#endif - switch (size) { - case MCLBYTES: - type = EXT_CLUSTER; - zone = zone_clust; - break; -#if MJUMPAGESIZE != MCLBYTES - case MJUMPAGESIZE: - type = EXT_JUMBOP; - zone = zone_jumbop; - break; -#endif - case MJUM9BYTES: - type = EXT_JUMBO9; - zone = zone_jumbo9; - break; - case MJUM16BYTES: - type = EXT_JUMBO16; - zone = zone_jumbo16; - break; - default: - panic("unknown cluster size"); - break; - } - - m = (struct mbuf *)arg; - refcnt = uma_find_refcnt(zone, mem); - *refcnt = 1; - if (m != NULL) { - m->m_ext.ext_buf = (caddr_t)mem; - m->m_data = m->m_ext.ext_buf; - m->m_flags |= M_EXT; - m->m_ext.ext_free = NULL; - m->m_ext.ext_arg1 = NULL; - m->m_ext.ext_arg2 = NULL; - m->m_ext.ext_size = size; - m->m_ext.ext_type = type; - m->m_ext.ref_cnt = refcnt; - } - - return (0); -} - -/* - * The Mbuf Cluster zone destructor. - */ -static void -mb_dtor_clust(void *mem, int size, void *arg) -{ -#ifdef INVARIANTS - uma_zone_t zone; - - zone = m_getzone(size); - KASSERT(*(uma_find_refcnt(zone, mem)) <= 1, - ("%s: refcnt incorrect %u", __func__, - *(uma_find_refcnt(zone, mem))) ); - - trash_dtor(mem, size, arg); -#endif -} - -/* * The Packet secondary zone's init routine, executed on the * object's transition from mbuf keg slab to zone cache. */ @@ -579,13 +423,16 @@ mb_zinit_pack(void *mem, int size, int h struct mbuf *m; m = (struct mbuf *)mem; /* m is virgin. */ - if (uma_zalloc_arg(zone_clust, m, how) == NULL || - m->m_ext.ext_buf == NULL) + /* + * Allocate and attach the cluster to the ext. + */ + if ((mem = uma_zalloc(zone_clust, how)) == NULL) return (ENOMEM); - m->m_ext.ext_type = EXT_PACKET; /* Override. */ + m_extadd(m, mem, MCLBYTES, m_ext_free_nop, NULL, NULL, 0, EXT_PACKET); #ifdef INVARIANTS - trash_init(m->m_ext.ext_buf, MCLBYTES, how); + return trash_init(m->m_ext.ext_buf, MCLBYTES, how); #endif + return (0); } @@ -608,57 +455,34 @@ mb_zfini_pack(void *mem, int size) #endif } -/* - * The "packet" keg constructor. - */ -static int -mb_ctor_pack(void *mem, int size, void *arg, int how) +int +m_pkthdr_init(struct mbuf *m, int how) { - struct mbuf *m; - struct mb_args *args; #ifdef MAC int error; #endif - int flags; - short type; - - m = (struct mbuf *)mem; - args = (struct mb_args *)arg; - flags = args->flags; - type = args->type; -#ifdef INVARIANTS - trash_ctor(m->m_ext.ext_buf, MCLBYTES, arg, how); -#endif - m->m_next = NULL; - m->m_nextpkt = NULL; - m->m_data = m->m_ext.ext_buf; - m->m_len = 0; - m->m_flags = (flags | M_EXT); - m->m_type = type; - - if (flags & M_PKTHDR) { - m->m_pkthdr.rcvif = NULL; - m->m_pkthdr.len = 0; - m->m_pkthdr.header = NULL; - m->m_pkthdr.csum_flags = 0; - m->m_pkthdr.csum_data = 0; - m->m_pkthdr.tso_segsz = 0; - m->m_pkthdr.ether_vtag = 0; - m->m_pkthdr.flowid = 0; - SLIST_INIT(&m->m_pkthdr.tags); + m->m_data = m->m_pktdat; + SLIST_INIT(&m->m_pkthdr.tags); + m->m_pkthdr.rcvif = NULL; + m->m_pkthdr.header = NULL; + m->m_pkthdr.len = 0; + m->m_pkthdr.flowid = 0; + m->m_pkthdr.csum_flags = 0; + m->m_pkthdr.csum_data = 0; + m->m_pkthdr.tso_segsz = 0; + m->m_pkthdr.ether_vtag = 0; #ifdef MAC - /* If the label init fails, fail the alloc */ - error = mac_mbuf_init(m, how); - if (error) - return (error); + /* If the label init fails, fail the alloc */ + error = mac_mbuf_init(m, how); + if (error) + return (error); #endif - } - /* m_ext is already initialized. */ return (0); } + /* * This is the protocol drain routine. * @@ -680,3 +504,45 @@ mb_reclaim(void *junk) if (pr->pr_drain != NULL) (*pr->pr_drain)(); } + +struct mbuf * +_m_getjcl(int how, short type, int flags, int size, uma_zone_t zone, + int exttype) +{ + struct mbuf *m; + void *mem; + + if (size == MCLBYTES) + return m_getcl(how, type, flags); + /* + * Allocate the memory and header seperate for these sizes. + */ + mem = uma_zalloc(zone, how); + if (mem == NULL) + return (NULL); + m = m_alloc(zone_mbuf, 0, how, type, flags); + if (m == NULL) { + uma_zfree(zone, mem); + return (NULL); + } + m_extadd(m, mem, size, m_ext_free_zone, zone, mem, flags, exttype); + + return (m); +} + +void * +_m_cljget(struct mbuf *m, int how, int size, uma_zone_t zone, int exttype) +{ + void *mem; + + if (m && m->m_flags & M_EXT) + printf("%s: %p mbuf already has cluster\n", __func__, m); + if (m != NULL) + m->m_ext.ext_buf = NULL; + mem = uma_zalloc(zone, how); + if (mem == NULL) + return (NULL); + if (m) + m_extadd(m, mem, size, m_ext_free_zone, zone, mem, 0, exttype); + return (mem); +} Modified: projects/jeff_mbuf/sys/kern/uipc_mbuf.c ============================================================================== --- projects/jeff_mbuf/sys/kern/uipc_mbuf.c Wed Feb 4 19:30:02 2009 (r188120) +++ projects/jeff_mbuf/sys/kern/uipc_mbuf.c Wed Feb 4 19:43:08 2009 (r188121) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -87,6 +88,8 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, m_defrag &m_defragrandomfailures, 0, ""); #endif +static void m_refm(struct mbuf *mb, struct mbuf *m); + /* * Allocate a given length worth of mbufs and/or clusters (whatever fits * best) and return a pointer to the top of the allocated chain. If an @@ -128,8 +131,7 @@ m_getm2(struct mbuf *m, int len, int how } /* Book keeping. */ - len -= (mb->m_flags & M_EXT) ? mb->m_ext.ext_size : - ((mb->m_flags & M_PKTHDR) ? MHLEN : MLEN); + len -= mb->m_size; if (mtail != NULL) mtail->m_next = mb; else @@ -164,147 +166,63 @@ m_freem(struct mbuf *mb) mb = m_free(mb); } -/*- - * Configure a provided mbuf to refer to the provided external storage - * buffer and setup a reference count for said buffer. If the setting - * up of the reference count fails, the M_EXT bit will not be set. If - * successfull, the M_EXT bit is set in the mbuf's flags. - * - * Arguments: - * mb The existing mbuf to which to attach the provided buffer. - * buf The address of the provided external storage buffer. - * size The size of the provided buffer. - * freef A pointer to a routine that is responsible for freeing the - * provided external storage buffer. - * args A pointer to an argument structure (of any type) to be passed - * to the provided freef routine (may be NULL). - * flags Any other flags to be passed to the provided mbuf. - * type The type that the external storage buffer should be - * labeled with. - * - * Returns: - * Nothing. +/* + * Reference the existing storage area of an mbuf. The reference is readonly + * and the referenced data can not be freed until the referencing mbuf is + * freed. */ -void -m_extadd(struct mbuf *mb, caddr_t buf, u_int size, - void (*freef)(void *, void *), void *arg1, void *arg2, int flags, int type) +static void +m_refm(struct mbuf *mb, struct mbuf *m) { - KASSERT(type != EXT_CLUSTER, ("%s: EXT_CLUSTER not allowed", __func__)); - if (type != EXT_EXTREF) - mb->m_ext.ref_cnt = (u_int *)uma_zalloc(zone_ext_refcnt, M_NOWAIT); - if (mb->m_ext.ref_cnt != NULL) { - *(mb->m_ext.ref_cnt) = 1; - mb->m_flags |= (M_EXT | flags); - mb->m_ext.ext_buf = buf; - mb->m_data = mb->m_ext.ext_buf; - mb->m_ext.ext_size = size; - mb->m_ext.ext_free = freef; - mb->m_ext.ext_arg1 = arg1; - mb->m_ext.ext_arg2 = arg2; - mb->m_ext.ext_type = type; - } + if (m->m_ref > 1) + atomic_add_int(&m->m_ref, 1); + else + m->m_ref++; + mb->m_flags |= M_EXT | M_RDONLY; + mb->m_data = m->m_data; + mb->m_size = m->m_len; /* Only existing data is visible. */ + mb->m_ext.ext_buf = m->m_data; + mb->m_ext.ext_size = m->m_len; + mb->m_ext.ext_free = m_ext_free_mbuf; + mb->m_ext.ext_arg1 = m; + mb->m_ext.ext_arg2 = NULL; + mb->m_ext.ext_type = EXT_MBUF; + + CTR3(KTR_NET, "m_refm: %p ref %d buf %p", + mb, mb->m_ref, mb->m_ext.ext_buf); } /* - * Non-directly-exported function to clean up after mbufs with M_EXT - * storage attached to them if the reference count hits 1. + * Free the ext area of a mbuf assuming a uma zone and argument are + * presented. */ void -mb_free_ext(struct mbuf *m) +m_ext_free_zone(void *arg1, void *arg2) { - int skipmbuf; - - KASSERT((m->m_flags & M_EXT) == M_EXT, ("%s: M_EXT not set", __func__)); - KASSERT(m->m_ext.ref_cnt != NULL, ("%s: ref_cnt not set", __func__)); + uma_zfree(arg1, arg2); +} + +/* + * Free the ext area of a mbuf assuming it has been acquired with m_refm(). + */ +void +m_ext_free_mbuf(void *arg1, void *arg2) +{ /* - * check if the header is embedded in the cluster - */ - skipmbuf = (m->m_flags & M_NOFREE); - - /* Free attached storage if this mbuf is the only reference to it. */ - if (*(m->m_ext.ref_cnt) == 1 || - atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 1) { - switch (m->m_ext.ext_type) { - case EXT_PACKET: /* The packet zone is special. */ - if (*(m->m_ext.ref_cnt) == 0) - *(m->m_ext.ref_cnt) = 1; - uma_zfree(zone_pack, m); - return; /* Job done. */ - case EXT_CLUSTER: - uma_zfree(zone_clust, m->m_ext.ext_buf); - break; - case EXT_JUMBOP: - uma_zfree(zone_jumbop, m->m_ext.ext_buf); - break; - case EXT_JUMBO9: - uma_zfree(zone_jumbo9, m->m_ext.ext_buf); - break; - case EXT_JUMBO16: - uma_zfree(zone_jumbo16, m->m_ext.ext_buf); - break; - case EXT_SFBUF: - case EXT_NET_DRV: - case EXT_MOD_TYPE: - case EXT_DISPOSABLE: - *(m->m_ext.ref_cnt) = 0; - uma_zfree(zone_ext_refcnt, __DEVOLATILE(u_int *, - m->m_ext.ref_cnt)); - /* FALLTHROUGH */ - case EXT_EXTREF: - KASSERT(m->m_ext.ext_free != NULL, - ("%s: ext_free not set", __func__)); - (*(m->m_ext.ext_free))(m->m_ext.ext_arg1, - m->m_ext.ext_arg2); - break; - default: - KASSERT(m->m_ext.ext_type == 0, - ("%s: unknown ext_type", __func__)); - } - } - if (skipmbuf) - return; - - /* - * Free this mbuf back to the mbuf zone with all m_ext - * information purged. + * Release one more reference to this mbuf. If it is the last it + * will be freed. */ - m->m_ext.ext_buf = NULL; - m->m_ext.ext_free = NULL; - m->m_ext.ext_arg1 = NULL; - m->m_ext.ext_arg2 = NULL; - m->m_ext.ref_cnt = NULL; - m->m_ext.ext_size = 0; - m->m_ext.ext_type = 0; - m->m_flags &= ~M_EXT; - uma_zfree(zone_mbuf, m); + m_free(arg1); } -/* - * Attach the the cluster from *m to *n, set up m_ext in *n - * and bump the refcount of the cluster. - */ -static void -mb_dupcl(struct mbuf *n, struct mbuf *m) +void +m_ext_free_nop(void *arg1, void *arg2) { - KASSERT((m->m_flags & M_EXT) == M_EXT, ("%s: M_EXT not set", __func__)); - KASSERT(m->m_ext.ref_cnt != NULL, ("%s: ref_cnt not set", __func__)); - KASSERT((n->m_flags & M_EXT) == 0, ("%s: M_EXT set", __func__)); - if (*(m->m_ext.ref_cnt) == 1) - *(m->m_ext.ref_cnt) += 1; - else - atomic_add_int(m->m_ext.ref_cnt, 1); - n->m_ext.ext_buf = m->m_ext.ext_buf; - n->m_ext.ext_free = m->m_ext.ext_free; - n->m_ext.ext_arg1 = m->m_ext.ext_arg1; - n->m_ext.ext_arg2 = m->m_ext.ext_arg2; - n->m_ext.ext_size = m->m_ext.ext_size; - n->m_ext.ref_cnt = m->m_ext.ref_cnt; - n->m_ext.ext_type = m->m_ext.ext_type; - n->m_flags |= M_EXT; + /* Nothing to do. */ } /* @@ -357,11 +275,8 @@ m_sanity(struct mbuf *m0, int sanitize) * unrelated kernel memory before or after us is trashed. * No way to recover from that. */ - a = ((m->m_flags & M_EXT) ? m->m_ext.ext_buf : - ((m->m_flags & M_PKTHDR) ? (caddr_t)(&m->m_pktdat) : - (caddr_t)(&m->m_dat)) ); - b = (caddr_t)(a + (m->m_flags & M_EXT ? m->m_ext.ext_size : - ((m->m_flags & M_PKTHDR) ? MHLEN : MLEN))); + a = M_START(m); + b = (caddr_t)(a + m->m_size); if ((caddr_t)m->m_data < a) M_SANITY_ACTION("m_data outside mbuf data range left"); if ((caddr_t)m->m_data > b) @@ -532,6 +447,7 @@ m_copym(struct mbuf *m, int off0, int le struct mbuf *top; int copyhdr = 0; + CTR3(KTR_NET, "m_copym(%p, %d, %d)", m, off0, len); KASSERT(off >= 0, ("m_copym, negative off %d", off)); KASSERT(len >= 0, ("m_copym, negative len %d", len)); MBUF_CHECKSLEEP(wait); @@ -568,13 +484,16 @@ m_copym(struct mbuf *m, int off0, int le n->m_pkthdr.len = len; copyhdr = 0; } + /* + * If the copied data will fit in the space of standard + * mbuf prefer to copy rather than reference. + */ n->m_len = min(len, m->m_len - off); - if (m->m_flags & M_EXT) { - n->m_data = m->m_data + off; - mb_dupcl(n, m); + if (n->m_len > n->m_size) { + m_refm(n, m); + n->m_data += off; } else - bcopy(mtod(m, caddr_t)+off, mtod(n, caddr_t), - (u_int)n->m_len); + bcopy(mtod(m, caddr_t)+off, mtod(n, caddr_t), n->m_len); if (len != M_COPYALL) len -= n->m_len; off = 0; @@ -752,7 +671,9 @@ struct mbuf * m_copypacket(struct mbuf *m, int how) { struct mbuf *top, *n, *o; + int leading; + CTR1(KTR_NET, "m_copypacket(%p)", m); MBUF_CHECKSLEEP(how); MGET(n, how, m->m_type); top = n; @@ -762,13 +683,10 @@ m_copypacket(struct mbuf *m, int how) if (!m_dup_pkthdr(n, m, how)) goto nospace; n->m_len = m->m_len; - if (m->m_flags & M_EXT) { - n->m_data = m->m_data; - mb_dupcl(n, m); - } else { - n->m_data = n->m_pktdat + (m->m_data - m->m_pktdat ); - bcopy(mtod(m, char *), mtod(n, char *), n->m_len); - } + if (n->m_len > n->m_size) + m_refm(n, m); + else + bcopy(mtod(m, caddr_t), mtod(n, caddr_t), m->m_len); m = m->m_next; while (m) { @@ -780,13 +698,13 @@ m_copypacket(struct mbuf *m, int how) n = n->m_next; n->m_len = m->m_len; - if (m->m_flags & M_EXT) { - n->m_data = m->m_data; - mb_dupcl(n, m); + leading = M_LEADINGSPACE(m); + if (n->m_len + leading > n->m_size) { + m_refm(n, m); } else { - bcopy(mtod(m, char *), mtod(n, char *), n->m_len); + n->m_data = M_START(n) + leading; + bcopy(mtod(m, caddr_t), mtod(n, caddr_t), n->m_len); } - m = m->m_next; } return top; @@ -805,6 +723,7 @@ m_copydata(const struct mbuf *m, int off { u_int count; + CTR3(KTR_NET, "m_copydata(%p, %d, %d)", m, off, len); KASSERT(off >= 0, ("m_copydata, negative off %d", off)); KASSERT(len >= 0, ("m_copydata, negative len %d", len)); while (off > 0) { @@ -834,8 +753,9 @@ struct mbuf * m_dup(struct mbuf *m, int how) { struct mbuf **p, *top = NULL; - int remain, moff, nsize; + int remain, moff; + CTR1(KTR_NET, "m_dup(%p)", m); MBUF_CHECKSLEEP(how); /* Sanity check */ if (m == NULL) @@ -850,13 +770,10 @@ m_dup(struct mbuf *m, int how) struct mbuf *n; /* Get the next new mbuf */ - if (remain >= MINCLSIZE) { + if (remain >= MINCLSIZE) n = m_getcl(how, m->m_type, 0); - nsize = MCLBYTES; - } else { + else n = m_get(how, m->m_type); - nsize = MLEN; - } if (n == NULL) goto nospace; @@ -865,8 +782,6 @@ m_dup(struct mbuf *m, int how) m_free(n); goto nospace; } - if ((n->m_flags & M_EXT) == 0) - nsize = MHLEN; } n->m_len = 0; @@ -875,8 +790,8 @@ m_dup(struct mbuf *m, int how) p = &n->m_next; /* Copy data from original mbuf(s) into new mbuf */ - while (n->m_len < nsize && m != NULL) { - int chunk = min(nsize - n->m_len, m->m_len - moff); + while (n->m_len < n->m_size && m != NULL) { + int chunk = min(n->m_size - n->m_len, m->m_len - moff); bcopy(m->m_data + moff, n->m_data + n->m_len, chunk); moff += chunk; @@ -908,11 +823,13 @@ nospace: void m_cat(struct mbuf *m, struct mbuf *n) { + CTR2(KTR_NET, "m_cat(%p, %p)", m, n); + while (m->m_next) m = m->m_next; while (n) { if (m->m_flags & M_EXT || - m->m_data + m->m_len + n->m_len >= &m->m_dat[MLEN]) { + m->m_len + n->m_len > m->m_size) { /* just join the two chains */ m->m_next = n; return; @@ -932,6 +849,7 @@ m_adj(struct mbuf *mp, int req_len) struct mbuf *m; int count; + CTR2(KTR_NET, "m_adj(%p, %d)", mp, req_len); if ((m = mp) == NULL) return; if (len >= 0) { @@ -1014,13 +932,13 @@ m_pullup(struct mbuf *n, int len) int count; int space; + CTR2(KTR_NET, "m_pullup(%p, %d)", n, len); /* * If first mbuf has no cluster, and has room for len bytes * without shifting current data, pullup into it, * otherwise allocate a new mbuf to prepend to the chain. */ - if ((n->m_flags & M_EXT) == 0 && - n->m_data + len < &n->m_dat[MLEN] && n->m_next) { + if ((n->m_flags & M_EXT) == 0 && len < n->m_size && n->m_next) { if (n->m_len >= len) return (n); m = n; @@ -1036,7 +954,8 @@ m_pullup(struct mbuf *n, int len) if (n->m_flags & M_PKTHDR) M_MOVE_PKTHDR(m, n); } - space = &m->m_dat[MLEN] - (m->m_data + m->m_len); + /* XXX M_TRAILINGSPACE without M_WRITABLE */ + space = (M_START(m) + m->m_size) - (m->m_data + (m)->m_len); do { count = min(min(max(len, max_protohdr), space), n->m_len); bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len, @@ -1075,6 +994,7 @@ m_copyup(struct mbuf *n, int len, int ds struct mbuf *m; int count, space; + CTR2(KTR_NET, "m_copyup(%p, %d)", n, len); if (len > (MHLEN - dstoff)) goto bad; MGET(m, M_DONTWAIT, n->m_type); @@ -1084,7 +1004,8 @@ m_copyup(struct mbuf *n, int len, int ds if (n->m_flags & M_PKTHDR) M_MOVE_PKTHDR(m, n); m->m_data += dstoff; - space = &m->m_dat[MLEN] - (m->m_data + m->m_len); + /* XXX M_TRAILINGSPACE without M_WRITABLE */ + space = (M_START(m) + m->m_size) - (m->m_data + (m)->m_len); do { count = min(min(max(len, max_protohdr), space), n->m_len); memcpy(mtod(m, caddr_t) + m->m_len, mtod(n, caddr_t), @@ -1126,6 +1047,7 @@ m_split(struct mbuf *m0, int len0, int w struct mbuf *m, *n; u_int len = len0, remain; + CTR2(KTR_NET, "m_split(%p, %d)", m0, len0); MBUF_CHECKSLEEP(wait); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 01:59:29 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F1E6106566B; Thu, 5 Feb 2009 01:59:29 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D98E8FC1F; Thu, 5 Feb 2009 01:59:29 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n151xSw2003613; Thu, 5 Feb 2009 01:59:28 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n151xSD6003612; Thu, 5 Feb 2009 01:59:28 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902050159.n151xSD6003612@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 5 Feb 2009 01:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188133 - projects/tcp_cc_8.x/sys/conf X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 01:59:29 -0000 Author: lstewart Date: Thu Feb 5 01:59:28 2009 New Revision: 188133 URL: http://svn.freebsd.org/changeset/base/188133 Log: Don't compile non-core CC modules into the kernel by default. Modified: projects/tcp_cc_8.x/sys/conf/files Modified: projects/tcp_cc_8.x/sys/conf/files ============================================================================== --- projects/tcp_cc_8.x/sys/conf/files Wed Feb 4 22:44:09 2009 (r188132) +++ projects/tcp_cc_8.x/sys/conf/files Thu Feb 5 01:59:28 2009 (r188133) @@ -2355,8 +2355,6 @@ netinet/ip_options.c optional inet netinet/ip_output.c optional inet netinet/raw_ip.c optional inet netinet/cc.c optional inet -netinet/cc_cubic.c optional inet -netinet/cc_htcp.c optional inet netinet/sctp_asconf.c optional inet sctp netinet/sctp_auth.c optional inet sctp netinet/sctp_bsd_addr.c optional inet sctp From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 02:06:28 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1421C106566B; Thu, 5 Feb 2009 02:06:28 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 024AB8FC24; Thu, 5 Feb 2009 02:06:28 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1526Rp8004420; Thu, 5 Feb 2009 02:06:27 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1526Rqj004419; Thu, 5 Feb 2009 02:06:27 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200902050206.n1526Rqj004419@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 5 Feb 2009 02:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188135 - in projects/tcp_cc_7.x/sys: . conf contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 02:06:28 -0000 Author: lstewart Date: Thu Feb 5 02:06:27 2009 New Revision: 188135 URL: http://svn.freebsd.org/changeset/base/188135 Log: Merge r188133 from tcp_cc_8.x Modified: projects/tcp_cc_7.x/sys/ (props changed) projects/tcp_cc_7.x/sys/conf/files projects/tcp_cc_7.x/sys/contrib/pf/ (props changed) projects/tcp_cc_7.x/sys/dev/ath/ath_hal/ (props changed) projects/tcp_cc_7.x/sys/dev/cxgb/ (props changed) Modified: projects/tcp_cc_7.x/sys/conf/files ============================================================================== --- projects/tcp_cc_7.x/sys/conf/files Thu Feb 5 02:01:18 2009 (r188134) +++ projects/tcp_cc_7.x/sys/conf/files Thu Feb 5 02:06:27 2009 (r188135) @@ -1798,8 +1798,6 @@ netinet/ip_options.c optional inet netinet/ip_output.c optional inet netinet/raw_ip.c optional inet netinet/cc.c optional inet -netinet/cc_cubic.c optional inet -netinet/cc_htcp.c optional inet netinet/sctp_asconf.c optional inet sctp netinet/sctp_auth.c optional inet sctp netinet/sctp_bsd_addr.c optional inet sctp From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 02:08:12 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5ACD0106564A; Thu, 5 Feb 2009 02:08:12 +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 499948FC16; Thu, 5 Feb 2009 02:08:12 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1528CtT004632; Thu, 5 Feb 2009 02:08:12 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1528CTN004631; Thu, 5 Feb 2009 02:08:12 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902050208.n1528CTN004631@svn.freebsd.org> From: Kip Macy Date: Thu, 5 Feb 2009 02:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188136 - projects/releng_7_xen/sys/i386/xen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 02:08:12 -0000 Author: kmacy Date: Thu Feb 5 02:08:12 2009 New Revision: 188136 URL: http://svn.freebsd.org/changeset/base/188136 Log: adjust the way that idle happens so as to avoid missing timer interrupts on block Modified: projects/releng_7_xen/sys/i386/xen/clock.c Modified: projects/releng_7_xen/sys/i386/xen/clock.c ============================================================================== --- projects/releng_7_xen/sys/i386/xen/clock.c Thu Feb 5 02:06:27 2009 (r188135) +++ projects/releng_7_xen/sys/i386/xen/clock.c Thu Feb 5 02:08:12 2009 (r188136) @@ -246,24 +246,29 @@ static void __get_time_values_from_xen(v shared_info_t *s = HYPERVISOR_shared_info; struct vcpu_time_info *src; struct shadow_time_info *dst; + uint32_t pre_version, post_version; src = &s->vcpu_info[smp_processor_id()].time; dst = &per_cpu(shadow_time, smp_processor_id()); + spinlock_enter(); do { - dst->version = src->version; + pre_version = dst->version = src->version; rmb(); dst->tsc_timestamp = src->tsc_timestamp; dst->system_timestamp = src->system_time; dst->tsc_to_nsec_mul = src->tsc_to_system_mul; dst->tsc_shift = src->tsc_shift; rmb(); + post_version = src->version; } - while ((src->version & 1) | (dst->version ^ src->version)); + while ((pre_version & 1) | (pre_version ^ post_version)); dst->tsc_to_usec_mul = dst->tsc_to_nsec_mul / 1000; + spinlock_exit(); } + static inline int time_values_up_to_date(int cpu) { struct vcpu_time_info *src; @@ -311,15 +316,15 @@ clkintr(void *arg) } /* Process elapsed ticks since last call. */ - if (delta >= NS_PER_TICK) { - processed_system_time += (delta / NS_PER_TICK) * NS_PER_TICK; - per_cpu(processed_system_time, cpu) += (delta_cpu / NS_PER_TICK) * NS_PER_TICK; + while (delta >= NS_PER_TICK) { + delta -= NS_PER_TICK; + processed_system_time += NS_PER_TICK; + per_cpu(processed_system_time, cpu) += NS_PER_TICK; + if (PCPU_GET(cpuid) == 0) + hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + else + hardclock_cpu(TRAPF_USERMODE(frame)); } - if (PCPU_GET(cpuid) == 0) - hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); - else - hardclock_cpu(TRAPF_USERMODE(frame)); - /* * Take synchronised time from Xen once a minute if we're not * synchronised ourselves, and we haven't chosen to keep an independent @@ -334,61 +339,25 @@ clkintr(void *arg) /* XXX TODO */ return (FILTER_HANDLED); } - -int clkintr2(void *arg); - -int -clkintr2(void *arg) -{ - int64_t delta_cpu, delta; - struct trapframe *frame = (struct trapframe *)arg; - int cpu = smp_processor_id(); - struct shadow_time_info *shadow = &per_cpu(shadow_time, cpu); - - do { - __get_time_values_from_xen(); - - delta = delta_cpu = - shadow->system_timestamp + get_nsec_offset(shadow); - delta -= processed_system_time; - delta_cpu -= per_cpu(processed_system_time, cpu); - - } while (!time_values_up_to_date(cpu)); - - if (unlikely(delta < (int64_t)0) || unlikely(delta_cpu < (int64_t)0)) { - printf("Timer ISR: Time went backwards: %lld\n", delta); - return (FILTER_HANDLED); - } - - /* Process elapsed ticks since last call. */ - if (delta >= NS_PER_TICK) { - processed_system_time += (delta / NS_PER_TICK) * NS_PER_TICK; - per_cpu(processed_system_time, cpu) += (delta_cpu / NS_PER_TICK) * NS_PER_TICK; - } - hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); - - /* - * Take synchronised time from Xen once a minute if we're not - * synchronised ourselves, and we haven't chosen to keep an independent - * time base. - */ - - if (shadow_tv_version != HYPERVISOR_shared_info->wc_version) { - update_wallclock(); - tc_setclock(&shadow_tv); - } - - /* XXX TODO */ - return (FILTER_HANDLED); -} - static uint32_t getit(void) { struct shadow_time_info *shadow; + uint64_t time; + uint32_t local_time_version; + shadow = &per_cpu(shadow_time, smp_processor_id()); - __get_time_values_from_xen(); - return shadow->system_timestamp + get_nsec_offset(shadow); + + do { + local_time_version = shadow->version; + barrier(); + time = shadow->system_timestamp + get_nsec_offset(shadow); + if (!time_values_up_to_date(cpu)) + __get_time_values_from_xen(/*cpu */); + barrier(); + } while (local_time_version != shadow->version); + + return (time); } @@ -552,7 +521,6 @@ startrtclock() timer_freq = xen_timecounter.tc_frequency = 1000000000LL; tc_init(&xen_timecounter); - rdtscll(alarm); } @@ -903,11 +871,42 @@ xen_get_offset(void) return edx; } #endif + +/* Convert jiffies to system time. */ +static uint64_t +ticks_to_system_time(unsigned long newticks) +{ +#if 0 + unsigned long seq; +#endif + long delta; + uint64_t st; + + + delta = newticks - ticks; + if (delta < 1) { + /* Triggers in some wrap-around cases, but that's okay: + * we just end up with a shorter timeout. */ + st = processed_system_time + NS_PER_TICK; + } else if (((unsigned long)delta >> (BITS_PER_LONG-3)) != 0) { + /* Very long timeout means there is no pending timer. + * We indicate this to Xen by passing zero timeout. */ + st = 0; + } else { + st = processed_system_time + delta * (uint64_t)NS_PER_TICK; + } + + return (st); +} + void idle_block(void) { + uint64_t timeout; - __get_time_values_from_xen(); - PANIC_IF(HYPERVISOR_set_timer_op(processed_system_time + NS_PER_TICK) != 0); - HYPERVISOR_sched_op(SCHEDOP_block, 0); + timeout = ticks_to_system_time(ticks + 1) + NS_PER_TICK/2; + + __get_time_values_from_xen(); + PANIC_IF(HYPERVISOR_set_timer_op(timeout) != 0); + HYPERVISOR_sched_op(SCHEDOP_block, 0); } From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 02:16:06 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 355C0106566B; Thu, 5 Feb 2009 02:16:06 +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 240628FC0A; Thu, 5 Feb 2009 02:16:06 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n152G6DJ005435; Thu, 5 Feb 2009 02:16:06 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n152G6fN005434; Thu, 5 Feb 2009 02:16:06 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902050216.n152G6fN005434@svn.freebsd.org> From: Kip Macy Date: Thu, 5 Feb 2009 02:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188137 - projects/release_6_3_xen/sys/i386/xen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 02:16:06 -0000 Author: kmacy Date: Thu Feb 5 02:16:05 2009 New Revision: 188137 URL: http://svn.freebsd.org/changeset/base/188137 Log: change the way that blocking is handled to avoid missing timer interrupts Modified: projects/release_6_3_xen/sys/i386/xen/clock.c Modified: projects/release_6_3_xen/sys/i386/xen/clock.c ============================================================================== --- projects/release_6_3_xen/sys/i386/xen/clock.c Thu Feb 5 02:08:12 2009 (r188136) +++ projects/release_6_3_xen/sys/i386/xen/clock.c Thu Feb 5 02:16:05 2009 (r188137) @@ -253,24 +253,29 @@ static void __get_time_values_from_xen(v shared_info_t *s = HYPERVISOR_shared_info; struct vcpu_time_info *src; struct shadow_time_info *dst; + uint32_t pre_version, post_version; src = &s->vcpu_info[smp_processor_id()].time; dst = &per_cpu(shadow_time, smp_processor_id()); + spinlock_enter(); do { - dst->version = src->version; + pre_version = dst->version = src->version; rmb(); dst->tsc_timestamp = src->tsc_timestamp; dst->system_timestamp = src->system_time; dst->tsc_to_nsec_mul = src->tsc_to_system_mul; dst->tsc_shift = src->tsc_shift; rmb(); + post_version = src->version; } - while ((src->version & 1) | (dst->version ^ src->version)); + while ((pre_version & 1) | (pre_version ^ post_version)); dst->tsc_to_usec_mul = dst->tsc_to_nsec_mul / 1000; + spinlock_exit(); } + static inline int time_values_up_to_date(int cpu) { struct vcpu_time_info *src; @@ -318,12 +323,15 @@ clkintr(void *arg) } /* Process elapsed ticks since last call. */ - if (delta >= NS_PER_TICK) { - processed_system_time += (delta / NS_PER_TICK) * NS_PER_TICK; - per_cpu(processed_system_time, cpu) += (delta_cpu / NS_PER_TICK) * NS_PER_TICK; + while (delta >= NS_PER_TICK) { + delta -= NS_PER_TICK; + processed_system_time += NS_PER_TICK; + per_cpu(processed_system_time, cpu) += NS_PER_TICK; + if (PCPU_GET(cpuid) == 0) + hardclock(frame); + else + hardclock_process(frame); } - hardclock(frame); - /* * Take synchronised time from Xen once a minute if we're not * synchronised ourselves, and we haven't chosen to keep an independent @@ -335,16 +343,26 @@ clkintr(void *arg) tc_setclock(&shadow_tv); } - /* XXX TODO */ } - static uint32_t getit(void) { struct shadow_time_info *shadow; + uint64_t time; + uint32_t local_time_version; + shadow = &per_cpu(shadow_time, smp_processor_id()); - __get_time_values_from_xen(); - return shadow->system_timestamp + get_nsec_offset(shadow); + + do { + local_time_version = shadow->version; + barrier(); + time = shadow->system_timestamp + get_nsec_offset(shadow); + if (!time_values_up_to_date(cpu)) + __get_time_values_from_xen(/*cpu */); + barrier(); + } while (local_time_version != shadow->version); + + return (time); } @@ -504,7 +522,6 @@ startrtclock() timer_freq = xen_timecounter.tc_frequency = 1000000000LL; tc_init(&xen_timecounter); - rdtscll(alarm); } @@ -953,11 +970,42 @@ xen_get_offset(void) return edx; } #endif + +/* Convert jiffies to system time. */ +static uint64_t +ticks_to_system_time(unsigned long newticks) +{ +#if 0 + unsigned long seq; +#endif + long delta; + uint64_t st; + + + delta = newticks - ticks; + if (delta < 1) { + /* Triggers in some wrap-around cases, but that's okay: + * we just end up with a shorter timeout. */ + st = processed_system_time + NS_PER_TICK; + } else if (((unsigned long)delta >> (BITS_PER_LONG-3)) != 0) { + /* Very long timeout means there is no pending timer. + * We indicate this to Xen by passing zero timeout. */ + st = 0; + } else { + st = processed_system_time + delta * (uint64_t)NS_PER_TICK; + } + + return (st); +} + void idle_block(void) { + uint64_t timeout; - __get_time_values_from_xen(); - PANIC_IF(HYPERVISOR_set_timer_op(processed_system_time + NS_PER_TICK) != 0); - HYPERVISOR_sched_op(SCHEDOP_block, 0); + timeout = ticks_to_system_time(ticks + 1) + NS_PER_TICK/2; + + __get_time_values_from_xen(); + PANIC_IF(HYPERVISOR_set_timer_op(timeout) != 0); + HYPERVISOR_sched_op(SCHEDOP_block, 0); } From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 04:01:56 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89209106566B; Thu, 5 Feb 2009 04:01:56 +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 7896E8FC0C; Thu, 5 Feb 2009 04:01:56 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1541u1X008307; Thu, 5 Feb 2009 04:01:56 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1541u4M008306; Thu, 5 Feb 2009 04:01:56 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902050401.n1541u4M008306@svn.freebsd.org> From: Kip Macy Date: Thu, 5 Feb 2009 04:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188139 - projects/releng_7_xen/sys/i386/xen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 04:01:56 -0000 Author: kmacy Date: Thu Feb 5 04:01:56 2009 New Revision: 188139 URL: http://svn.freebsd.org/changeset/base/188139 Log: IFC 188138 Modified: projects/releng_7_xen/sys/i386/xen/clock.c Modified: projects/releng_7_xen/sys/i386/xen/clock.c ============================================================================== --- projects/releng_7_xen/sys/i386/xen/clock.c Thu Feb 5 04:00:55 2009 (r188138) +++ projects/releng_7_xen/sys/i386/xen/clock.c Thu Feb 5 04:01:56 2009 (r188139) @@ -352,7 +352,7 @@ getit(void) local_time_version = shadow->version; barrier(); time = shadow->system_timestamp + get_nsec_offset(shadow); - if (!time_values_up_to_date(cpu)) + if (!time_values_up_to_date(smp_processor_id())) __get_time_values_from_xen(/*cpu */); barrier(); } while (local_time_version != shadow->version); From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 04:02:15 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA6B4106566B; Thu, 5 Feb 2009 04:02:15 +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 B9ECF8FC08; Thu, 5 Feb 2009 04:02:15 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1542Fk2008377; Thu, 5 Feb 2009 04:02:15 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1542FoI008376; Thu, 5 Feb 2009 04:02:15 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902050402.n1542FoI008376@svn.freebsd.org> From: Kip Macy Date: Thu, 5 Feb 2009 04:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188140 - projects/release_6_3_xen/sys/i386/xen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 04:02:16 -0000 Author: kmacy Date: Thu Feb 5 04:02:15 2009 New Revision: 188140 URL: http://svn.freebsd.org/changeset/base/188140 Log: IFC 188138 Modified: projects/release_6_3_xen/sys/i386/xen/clock.c Modified: projects/release_6_3_xen/sys/i386/xen/clock.c ============================================================================== --- projects/release_6_3_xen/sys/i386/xen/clock.c Thu Feb 5 04:01:56 2009 (r188139) +++ projects/release_6_3_xen/sys/i386/xen/clock.c Thu Feb 5 04:02:15 2009 (r188140) @@ -357,7 +357,7 @@ getit(void) local_time_version = shadow->version; barrier(); time = shadow->system_timestamp + get_nsec_offset(shadow); - if (!time_values_up_to_date(cpu)) + if (!time_values_up_to_date(smp_processor_id())) __get_time_values_from_xen(/*cpu */); barrier(); } while (local_time_version != shadow->version); From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 14:06:44 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73CFE1065679; Thu, 5 Feb 2009 14:06:44 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F8B58FC1C; Thu, 5 Feb 2009 14:06:44 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15E6i9l028778; Thu, 5 Feb 2009 14:06:44 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15E6ivu028774; Thu, 5 Feb 2009 14:06:44 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <200902051406.n15E6ivu028774@svn.freebsd.org> From: Kirk McKusick Date: Thu, 5 Feb 2009 14:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188145 - projects/quota64/usr.sbin/edquota X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 14:06:45 -0000 Author: mckusick Date: Thu Feb 5 14:06:43 2009 New Revision: 188145 URL: http://svn.freebsd.org/changeset/base/188145 Log: Updates to edquota based on feedback from Dag-Erling Smorgrav. Modified: projects/quota64/usr.sbin/edquota/Makefile projects/quota64/usr.sbin/edquota/edquota.8 projects/quota64/usr.sbin/edquota/edquota.c Modified: projects/quota64/usr.sbin/edquota/Makefile ============================================================================== --- projects/quota64/usr.sbin/edquota/Makefile Thu Feb 5 14:06:09 2009 (r188144) +++ projects/quota64/usr.sbin/edquota/Makefile Thu Feb 5 14:06:43 2009 (r188145) @@ -4,7 +4,7 @@ PROG= edquota MAN= edquota.8 -CSTD= c99 +CSTD= gnu99 WARNS?= 4 DPADD= ${LIBUTIL} Modified: projects/quota64/usr.sbin/edquota/edquota.8 ============================================================================== --- projects/quota64/usr.sbin/edquota/edquota.8 Thu Feb 5 14:06:09 2009 (r188144) +++ projects/quota64/usr.sbin/edquota/edquota.8 Thu Feb 5 14:06:43 2009 (r188145) @@ -39,10 +39,9 @@ .Nd edit user quotas .Sh SYNOPSIS .Nm -.Op Fl u +.Op Fl uh .Op Fl f Ar fspath .Op Fl p Ar proto-username -.Op Fl h .Ar username ... .Nm .Op Fl u @@ -54,9 +53,9 @@ .Ar username ... .Nm .Fl g +.Op Fl h .Op Fl f Ar fspath .Op Fl p Ar proto-groupname -.Op Fl h .Ar groupname ... .Nm .Fl g @@ -100,8 +99,11 @@ specifies otherwise. .Pp The quotas may then be modified, new quotas added, etc. Block quotas can be specified in bytes (B), kilobytes (K), -megabytes (M), terabytes (T), pedabytes (P), or exabytes (E). +megabytes (M), terabytes (T), petabytes (P), or exabytes (E). If no units are specified, kilobytes are assumed. +Inode quotas can be specified in kiloinodes (K), +megainodes (M), terainodes (T), petainodes (P), or exainodes (E). +If no units are specified, the number of inodes specified are used. If the .Fl h flag is specified, the editor will always display the @@ -170,8 +172,11 @@ and values is omitted, it is assumed to be zero, therefore indicating that no particular quota should be imposed. Block quotas can be specified in bytes (B), kilobytes (K), -megabytes (M), terabytes (T), pedabytes (P), or exabytes (E). +megabytes (M), terabytes (T), petabytes (P), or exabytes (E). If no units are specified, kilobytes are assumed. +Inode quotas can be specified in kiloinodes (K), +megainodes (M), terainodes (T), petainodes (P), or exainodes (E). +If no units are specified, the number of inodes specified are used. .Pp If invoked with the .Fl f Modified: projects/quota64/usr.sbin/edquota/edquota.c ============================================================================== --- projects/quota64/usr.sbin/edquota/edquota.c Thu Feb 5 14:06:09 2009 (r188144) +++ projects/quota64/usr.sbin/edquota/edquota.c Thu Feb 5 14:06:43 2009 (r188145) @@ -158,13 +158,11 @@ main(int argc, char *argv[]) tflag++; break; case 'e': - if ((qup = malloc(sizeof(*qup) + BUFSIZ)) == NULL) + if ((qup = calloc(1, sizeof(*qup) + BUFSIZ)) == NULL) errx(2, "out of memory"); - bzero(qup, sizeof(*qup) + BUFSIZ); - i = 0; oldoptarg = optarg; - for (cp = optarg; (cp = strsep(&optarg, ":")) != NULL; - i++) { + for (i = 0, cp = optarg; + (cp = strsep(&optarg, ":")) != NULL; i++) { if (cp != oldoptarg) *(cp - 1) = ':'; switch (i) { @@ -183,12 +181,14 @@ main(int argc, char *argv[]) cvtval(lim, *endpt); continue; case 3: + lim = strtoll(cp, &endpt, 10); qup->dqblk.dqb_isoftlimit = - strtoll(cp, NULL, 10); + cvtval(lim, *endpt); continue; case 4: + lim = strtoll(cp, &endpt, 10); qup->dqblk.dqb_ihardlimit = - strtoll(cp, NULL, 10); + cvtval(lim, *endpt); continue; default: warnx("incorrect quota specification: " @@ -300,10 +300,10 @@ static void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", - "usage: edquota [-u] [-f fspath] [-p username] [-h] username ...", + "usage: edquota [-uh] [-f fspath] [-p username] username ...", " edquota [-u] -e fspath[:bslim[:bhlim[:islim[:ihlim]]]] [-e ...]", " username ...", - " edquota -g [-f fspath] [-p groupname] [-h] groupname ...", + " edquota -g [-h] [-f fspath] [-p groupname] groupname ...", " edquota -g -e fspath[:bslim[:bhlim[:islim[:ihlim]]]] [-e ...]", " groupname ...", " edquota [-u] -t [-f fspath]", @@ -536,14 +536,14 @@ writeprivs(struct quotause *quplist, int char * fmthumanval(int64_t blocks) { - static char buf[7], numbuf[20]; + static char numbuf[20]; if (hflag) { - humanize_number(buf, sizeof(buf) - (blocks < 0 ? 0 : 1), + humanize_number(numbuf, sizeof(numbuf) - (blocks < 0 ? 0 : 1), dbtob(blocks), "", HN_AUTOSCALE, HN_NOSPACE); - return (buf); + return (numbuf); } - snprintf(numbuf, 20, "%lluK", dbtokb(blocks)); + snprintf(numbuf, sizeof(numbuf), "%lluk", dbtokb(blocks)); return(numbuf); } @@ -555,9 +555,8 @@ readprivs(struct quotause *quplist, char { struct quotause *qup; FILE *fd; - u_int64_t ihardlimit, isoftlimit, curinodes; - u_int64_t bhardlimit, bsoftlimit, curblocks; - char bhardunits, bsoftunits, curblockunits; + u_int64_t hardlimit, softlimit, curitems; + char hardunits, softunits, curitemunits; int cnt; char *cp; struct dqblk dqblk; @@ -584,47 +583,66 @@ readprivs(struct quotause *quplist, char } cnt = sscanf(cp, " in use: %llu%c, limits (soft = %llu%c, hard = %llu%c)", - &curblocks, &curblockunits, &bsoftlimit, &bsoftunits, - &bhardlimit, &bhardunits); + &curitems, &curitemunits, &softlimit, &softunits, + &hardlimit, &hardunits); /* * The next three check for old-style input formats. */ if (cnt != 6) cnt = sscanf(cp, " in use: %llu%c, limits (soft = %llu%c hard = %llu%c", - &curblocks, &curblockunits, &bsoftlimit, - &bsoftunits, &bhardlimit, &bhardunits); + &curitems, &curitemunits, &softlimit, + &softunits, &hardlimit, &hardunits); if (cnt != 6) cnt = sscanf(cp, " in use: %llu%c, limits (soft = %llu%c hard = %llu%c)", - &curblocks, &curblockunits, &bsoftlimit, - &bsoftunits, &bhardlimit, &bhardunits); + &curitems, &curitemunits, &softlimit, + &softunits, &hardlimit, &hardunits); if (cnt != 6) cnt = sscanf(cp, " in use: %llu%c, limits (soft = %llu%c, hard = %llu%c", - &curblocks, &curblockunits, &bsoftlimit, - &bsoftunits, &bhardlimit, &bhardunits); + &curitems, &curitemunits, &softlimit, + &softunits, &hardlimit, &hardunits); if (cnt != 6) { warnx("%s:%s: bad format", fsp, cp); return (0); } - dqblk.dqb_curblocks = cvtval(curblocks, curblockunits); - dqblk.dqb_bsoftlimit = cvtval(bsoftlimit, bsoftunits); - dqblk.dqb_bhardlimit = cvtval(bhardlimit, bhardunits); + dqblk.dqb_curblocks = cvtval(curitems, curitemunits); + dqblk.dqb_bsoftlimit = cvtval(softlimit, softunits); + dqblk.dqb_bhardlimit = cvtval(hardlimit, hardunits); if ((cp = strtok(line2, "\n")) == NULL) { warnx("%s: %s: bad format", fsp, line2); return (0); } cnt = sscanf(cp, - "\tinodes in use: %llu, limits (soft = %llu, hard = %llu)", - &curinodes, &isoftlimit, &ihardlimit); + " in use: %llu%c, limits (soft = %llu%c, hard = %llu%c)", + &curitems, &curitemunits, &softlimit, + &softunits, &hardlimit, &hardunits); + /* + * The next three check for old-style input formats. + */ + if (cnt != 6) + cnt = sscanf(cp, + " in use: %llu%c, limits (soft = %llu%c hard = %llu%c", + &curitems, &curitemunits, &softlimit, + &softunits, &hardlimit, &hardunits); + if (cnt != 6) + cnt = sscanf(cp, + " in use: %llu%c, limits (soft = %llu%c hard = %llu%c)", + &curitems, &curitemunits, &softlimit, + &softunits, &hardlimit, &hardunits); + if (cnt != 6) + cnt = sscanf(cp, + " in use: %llu%c, limits (soft = %llu%c, hard = %llu%c", + &curitems, &curitemunits, &softlimit, + &softunits, &hardlimit, &hardunits); if (cnt != 3) { warnx("%s: %s: bad format", fsp, line2); return (0); } - dqblk.dqb_curinodes = curinodes; - dqblk.dqb_isoftlimit = isoftlimit; - dqblk.dqb_ihardlimit = ihardlimit; + dqblk.dqb_curinodes = cvtval(curitems, curitemunits); + dqblk.dqb_isoftlimit = cvtval(softlimit, softunits); + dqblk.dqb_ihardlimit = cvtval(hardlimit, hardunits); for (qup = quplist; qup; qup = qup->next) { if (strcmp(fsp, qup->fsname)) continue; @@ -651,8 +669,8 @@ readprivs(struct quotause *quplist, char qup->dqblk.dqb_isoftlimit = dqblk.dqb_isoftlimit; qup->dqblk.dqb_ihardlimit = dqblk.dqb_ihardlimit; qup->flags |= FOUND; - /* No easy way to check change in curblocks */ - if (dqblk.dqb_curinodes == qup->dqblk.dqb_curinodes) + if (dqblk.dqb_curblocks == qup->dqblk.dqb_curblocks && + dqblk.dqb_curinodes == qup->dqblk.dqb_curinodes) break; warnx("%s: cannot change current allocation", fsp); break; @@ -853,8 +871,11 @@ cvtval(u_int64_t limit, char units) case 'e': limit *= btodb(1152921504606846976); break; + case ' ': + errx(2, "No space permitted between value and units\n"); + break; default: - warnx("%llu%c: unknown units, specify K, M, G, T, P, or E\n", + errx(2, "%llu%c: unknown units, specify K, M, G, T, P, or E\n", limit, units); break; } From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 18:21:53 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 396C9106566B; Thu, 5 Feb 2009 18:21:53 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25C158FC14; Thu, 5 Feb 2009 18:21:53 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15ILrbm034005; Thu, 5 Feb 2009 18:21:53 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15ILqnt033999; Thu, 5 Feb 2009 18:21:52 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902051821.n15ILqnt033999@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 18:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188158 - in projects/cambria/sys: . arm/arm conf contrib/pf dev/cfi dev/usb dev/usb2/ethernet dev/usb2/wlan mips/mips sys X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 18:21:53 -0000 Author: sam Date: Thu Feb 5 18:21:52 2009 New Revision: 188158 URL: http://svn.freebsd.org/changeset/base/188158 Log: merge r188156: strataflash PR support Modified: projects/cambria/sys/ (props changed) projects/cambria/sys/arm/arm/cpufunc_asm_sheeva.S (props changed) projects/cambria/sys/conf/options projects/cambria/sys/contrib/pf/ (props changed) projects/cambria/sys/dev/cfi/cfi_core.c projects/cambria/sys/dev/cfi/cfi_dev.c projects/cambria/sys/dev/cfi/cfi_reg.h projects/cambria/sys/dev/cfi/cfi_var.h projects/cambria/sys/dev/usb/ehci_ixp4xx.c (props changed) projects/cambria/sys/dev/usb2/ethernet/if_auereg.h (props changed) projects/cambria/sys/dev/usb2/ethernet/if_axereg.h (props changed) projects/cambria/sys/dev/usb2/ethernet/if_cdcereg.h (props changed) projects/cambria/sys/dev/usb2/ethernet/if_cuereg.h (props changed) projects/cambria/sys/dev/usb2/ethernet/if_kuefw.h (props changed) projects/cambria/sys/dev/usb2/ethernet/if_kuereg.h (props changed) projects/cambria/sys/dev/usb2/ethernet/if_ruereg.h (props changed) projects/cambria/sys/dev/usb2/ethernet/if_udavreg.h (props changed) projects/cambria/sys/dev/usb2/wlan/if_rumfw.h (props changed) projects/cambria/sys/dev/usb2/wlan/if_rumreg.h (props changed) projects/cambria/sys/dev/usb2/wlan/if_rumvar.h (props changed) projects/cambria/sys/dev/usb2/wlan/if_uralreg.h (props changed) projects/cambria/sys/dev/usb2/wlan/if_uralvar.h (props changed) projects/cambria/sys/dev/usb2/wlan/if_zydfw.h (props changed) projects/cambria/sys/dev/usb2/wlan/if_zydreg.h (props changed) projects/cambria/sys/mips/mips/elf64_machdep.c (props changed) projects/cambria/sys/sys/cfictl.h Modified: projects/cambria/sys/conf/options ============================================================================== --- projects/cambria/sys/conf/options Thu Feb 5 18:15:20 2009 (r188157) +++ projects/cambria/sys/conf/options Thu Feb 5 18:21:52 2009 (r188158) @@ -804,3 +804,7 @@ TDMA_TXRATE_11A_DEFAULT opt_tdma.h # Virtualize the network stack VIMAGE opt_global.h VIMAGE_GLOBALS opt_global.h + +# Common Flash Interface (CFI) options +CFI_SUPPORT_STRATAFLASH opt_cfi.h +CFI_ARMEDANDDANGEROUS opt_cfi.h Modified: projects/cambria/sys/dev/cfi/cfi_core.c ============================================================================== --- projects/cambria/sys/dev/cfi/cfi_core.c Thu Feb 5 18:15:20 2009 (r188157) +++ projects/cambria/sys/dev/cfi/cfi_core.c Thu Feb 5 18:21:52 2009 (r188158) @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_cfi.h" + #include #include #include @@ -70,7 +72,6 @@ cfi_read(struct cfi_softc *sc, u_int ofs val = ~0; break; } - return (val); } @@ -300,10 +301,10 @@ cfi_detach(device_t dev) } static int -cfi_wait_ready(struct cfi_softc *sc, u_int timeout) +cfi_wait_ready(struct cfi_softc *sc, u_int ofs, u_int timeout) { int done, error; - uint32_t st0, st; + uint32_t st0 = 0, st = 0; done = 0; error = 0; @@ -315,21 +316,27 @@ cfi_wait_ready(struct cfi_softc *sc, u_i switch (sc->sc_cmdset) { case CFI_VEND_INTEL_ECS: case CFI_VEND_INTEL_SCS: - st = cfi_read(sc, sc->sc_wrofs); - done = (st & 0x80); + st = cfi_read(sc, ofs); + done = (st & CFI_INTEL_STATUS_WSMS); if (done) { - if (st & 0x02) + /* NB: bit 0 is reserved */ + st &= ~(CFI_INTEL_XSTATUS_RSVD | + CFI_INTEL_STATUS_WSMS | + CFI_INTEL_STATUS_RSVD); + if (st & CFI_INTEL_STATUS_DPS) error = EPERM; - else if (st & 0x10) + else if (st & CFI_INTEL_STATUS_PSLBS) error = EIO; - else if (st & 0x20) + else if (st & CFI_INTEL_STATUS_ECLBS) error = ENXIO; + else if (st) + error = EACCES; } break; case CFI_VEND_AMD_SCS: case CFI_VEND_AMD_ECS: - st0 = cfi_read(sc, sc->sc_wrofs); - st = cfi_read(sc, sc->sc_wrofs); + st0 = cfi_read(sc, ofs); + st = cfi_read(sc, ofs); done = ((st & 0x40) == (st0 & 0x40)) ? 1 : 0; break; } @@ -337,7 +344,7 @@ cfi_wait_ready(struct cfi_softc *sc, u_i if (!done && !error) error = ETIMEDOUT; if (error) - printf("\nerror=%d\n", error); + printf("\nerror=%d (st 0x%x st0 0x%x)\n", error, st, st0); return (error); } @@ -369,7 +376,7 @@ cfi_write_block(struct cfi_softc *sc) /* Better safe than sorry... */ return (ENODEV); } - error = cfi_wait_ready(sc, sc->sc_erase_timeout); + error = cfi_wait_ready(sc, sc->sc_wrofs, sc->sc_erase_timeout); if (error) goto out; @@ -411,7 +418,7 @@ cfi_write_block(struct cfi_softc *sc) intr_restore(intr); - error = cfi_wait_ready(sc, sc->sc_write_timeout); + error = cfi_wait_ready(sc, sc->sc_wrofs, sc->sc_write_timeout); if (error) goto out; } @@ -422,3 +429,145 @@ cfi_write_block(struct cfi_softc *sc) cfi_write(sc, 0, CFI_BCS_READ_ARRAY); return (error); } + +#ifdef CFI_SUPPORT_STRATAFLASH +/* + * Intel StrataFlash Protection Register Support. + * + * The memory includes a 128-bit Protection Register that can be + * used for security. There are two 64-bit segments; one is programmed + * at the factory with a unique 64-bit number which is immutable. + * The other segment is left blank for User (OEM) programming. + * Once the User/OEM segment is programmed it can be locked + * to prevent future programming by writing bit 0 of the Protection + * Lock Register (PLR). The PLR can written only once. + */ + +static uint16_t +cfi_get16(struct cfi_softc *sc, int off) +{ + uint16_t v = bus_space_read_2(sc->sc_tag, sc->sc_handle, off<<1); + return v; +} + +static void +cfi_put16(struct cfi_softc *sc, int off, uint16_t v) +{ + bus_space_write_2(sc->sc_tag, sc->sc_handle, off<<1, v); +} + +/* + * Read the factory-defined 64-bit segment of the PR. + */ +int +cfi_intel_get_factory_pr(struct cfi_softc *sc, uint64_t *id) +{ + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + + cfi_write(sc, 0, CFI_INTEL_READ_ID); + *id = ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(0)))<<48 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(1)))<<32 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(2)))<<16 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(3))); + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); + return 0; +} + +/* + * Read the User/OEM 64-bit segment of the PR. + */ +int +cfi_intel_get_oem_pr(struct cfi_softc *sc, uint64_t *id) +{ + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + + cfi_write(sc, 0, CFI_INTEL_READ_ID); + *id = ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(4)))<<48 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(5)))<<32 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(6)))<<16 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(7))); + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); + return 0; +} + +/* + * Write the User/OEM 64-bit segment of the PR. + */ +int +cfi_intel_set_oem_pr(struct cfi_softc *sc, uint64_t id) +{ + register_t intr; + int i, error; + + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + + for (i = 7; i >= 4; i--, id >>= 16) { + intr = intr_disable(); + cfi_write(sc, 0, CFI_INTEL_PP_SETUP); + cfi_put16(sc, CFI_INTEL_PR(i), id&0xffff); + intr_restore(intr); + error = cfi_wait_ready(sc, CFI_BCS_READ_STATUS, + sc->sc_write_timeout); + if (error) + break; + } + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); + return error; +} + +/* + * Read the contents of the Protection Lock Register. + */ +int +cfi_intel_get_plr(struct cfi_softc *sc, uint32_t *plr) +{ + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + + cfi_write(sc, 0, CFI_INTEL_READ_ID); + *plr = cfi_get16(sc, CFI_INTEL_PLR); + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); + return 0; +} + +/* + * Write the Protection Lock Register to lock down the + * user-settable segment of the Protection Register. + * NOTE: this operation is not reversible. + */ +int +cfi_intel_set_plr(struct cfi_softc *sc) +{ +#ifdef CFI_ARMEDANDDANGEROUS + register_t intr; +#endif + int error; + + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + +#ifdef CFI_ARMEDANDDANGEROUS + /* worthy of console msg */ + device_printf(sc->sc_dev, "set PLR\n"); + intr = intr_disable(); + cfi_write(sc, 0, CFI_INTEL_PP_SETUP); + cfi_put16(sc, CFI_INTEL_PLR, 0xFFFD); + intr_restore(intr); + error = cfi_wait_ready(sc, CFI_BCS_READ_STATUS, sc->sc_write_timeout); + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); +#else + device_printf(sc->sc_dev, "%s: PLR not set, " + "CFI_ARMEDANDDANGEROUS not configured\n", __func__); + error = ENXIO; +#endif + return error; +} +#endif /* CFI_SUPPORT_STRATAFLASH */ Modified: projects/cambria/sys/dev/cfi/cfi_dev.c ============================================================================== --- projects/cambria/sys/dev/cfi/cfi_dev.c Thu Feb 5 18:15:20 2009 (r188157) +++ projects/cambria/sys/dev/cfi/cfi_dev.c Thu Feb 5 18:21:52 2009 (r188158) @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_cfi.h" + #include #include #include @@ -255,14 +257,13 @@ cfi_devioctl(struct cdev *dev, u_long cm sc = dev->si_drv1; error = 0; - switch(cmd) { + switch (cmd) { case CFIOCQRY: if (sc->sc_writing) { error = cfi_block_finish(sc); if (error) break; } - rq = (struct cfiocqry *)data; if (rq->offset >= sc->sc_size / sc->sc_width) return (ESPIPE); @@ -274,6 +275,23 @@ cfi_devioctl(struct cdev *dev, u_long cm error = copyout(&val, rq->buffer++, 1); } break; +#ifdef CFI_SUPPORT_STRATAFLASH + case CFIOCGFACTORYPR: + error = cfi_intel_get_factory_pr(sc, (uint64_t *)data); + break; + case CFIOCGOEMPR: + error = cfi_intel_get_oem_pr(sc, (uint64_t *)data); + break; + case CFIOCSOEMPR: + error = cfi_intel_set_oem_pr(sc, *(uint64_t *)data); + break; + case CFIOCGPLR: + error = cfi_intel_get_plr(sc, (uint32_t *)data); + break; + case CFIOCSPLR: + error = cfi_intel_set_plr(sc); + break; +#endif /* CFI_SUPPORT_STRATAFLASH */ default: error = ENOIOCTL; break; Modified: projects/cambria/sys/dev/cfi/cfi_reg.h ============================================================================== --- projects/cambria/sys/dev/cfi/cfi_reg.h Thu Feb 5 18:15:20 2009 (r188157) +++ projects/cambria/sys/dev/cfi/cfi_reg.h Thu Feb 5 18:21:52 2009 (r188158) @@ -104,6 +104,28 @@ struct cfi_qry { #define CFI_BCS_CONFIRM 0xd0 #define CFI_BCS_READ_ARRAY 0xff +/* Intel commands. */ +#define CFI_INTEL_READ_ID 0x90 /* Read Identifier */ +#define CFI_INTEL_PP_SETUP 0xc0 /* Protection Program Setup */ + +/* NB: these are addresses for 16-bit accesses */ +#define CFI_INTEL_PLR 0x80 /* Protection Lock Register */ +#define CFI_INTEL_PR(n) (0x81+(n)) /* Protection Register */ + +/* Status register definitions */ +#define CFI_INTEL_STATUS_WSMS 0x0080 /* Write Machine Status */ +#define CFI_INTEL_STATUS_ESS 0x0040 /* Erase Suspend Status */ +#define CFI_INTEL_STATUS_ECLBS 0x0020 /* Erase and Clear Lock-Bit Status */ +#define CFI_INTEL_STATUS_PSLBS 0x0010 /* Program and Set Lock-Bit Status */ +#define CFI_INTEL_STATUS_VPENS 0x0008 /* Programming Voltage Status */ +#define CFI_INTEL_STATUS_PSS 0x0004 /* Program Suspend Status */ +#define CFI_INTEL_STATUS_DPS 0x0002 /* Device Protect Status */ +#define CFI_INTEL_STATUS_RSVD 0x0001 /* reserved */ + +/* eXtended Status register definitions */ +#define CFI_INTEL_XSTATUS_WBS 0x8000 /* Write Buffer Status */ +#define CFI_INTEL_XSTATUS_RSVD 0x7f00 /* reserved */ + /* AMD commands. */ #define CFI_AMD_BLOCK_ERASE 0x30 #define CFI_AMD_UNLOCK_ACK 0x55 Modified: projects/cambria/sys/dev/cfi/cfi_var.h ============================================================================== --- projects/cambria/sys/dev/cfi/cfi_var.h Thu Feb 5 18:15:20 2009 (r188157) +++ projects/cambria/sys/dev/cfi/cfi_var.h Thu Feb 5 18:21:52 2009 (r188158) @@ -74,4 +74,11 @@ uint32_t cfi_read(struct cfi_softc *, u_ uint8_t cfi_read_qry(struct cfi_softc *, u_int); int cfi_write_block(struct cfi_softc *); +#ifdef CFI_SUPPORT_STRATAFLASH +int cfi_intel_get_factory_pr(struct cfi_softc *sc, uint64_t *); +int cfi_intel_get_oem_pr(struct cfi_softc *sc, uint64_t *); +int cfi_intel_set_oem_pr(struct cfi_softc *sc, uint64_t); +int cfi_intel_get_plr(struct cfi_softc *sc, uint32_t *); +int cfi_intel_set_plr(struct cfi_softc *sc); +#endif /* CFI_SUPPORT_STRATAFLASH */ #endif /* _DEV_CFI_VAR_H_ */ Modified: projects/cambria/sys/sys/cfictl.h ============================================================================== --- projects/cambria/sys/sys/cfictl.h Thu Feb 5 18:15:20 2009 (r188157) +++ projects/cambria/sys/sys/cfictl.h Thu Feb 5 18:21:52 2009 (r188158) @@ -44,4 +44,10 @@ struct cfiocqry { #define CFIOCQRY _IOWR('q', 0, struct cfiocqry) +/* Intel StrataFlash Protection Register support */ +#define CFIOCGFACTORYPR _IOR('q', 1, uint64_t) /* get factory protection reg */ +#define CFIOCGOEMPR _IOR('q', 2, uint64_t) /* get oem protection reg */ +#define CFIOCSOEMPR _IOW('q', 3, uint64_t) /* set oem protection reg */ +#define CFIOCGPLR _IOR('q', 4, uint32_t) /* get protection lock reg */ +#define CFIOCSPLR _IO('q', 5) /* set protection log reg */ #endif /* _SYS_CFICTL_H_ */ From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 18:23:28 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED10E106566C; Thu, 5 Feb 2009 18:23:28 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB45E8FC19; Thu, 5 Feb 2009 18:23:28 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15INSdQ034108; Thu, 5 Feb 2009 18:23:28 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15INSEU034107; Thu, 5 Feb 2009 18:23:28 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902051823.n15INSEU034107@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 18:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188159 - in projects/cambria/tools/tools: . cfi nanobsd/gateworks nanobsd/gateworks/Files nanobsd/gateworks/Files/root nanobsd/gateworks/cfg nanobsd/gateworks/cfg/ssh X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 18:23:29 -0000 Author: sam Date: Thu Feb 5 18:23:28 2009 New Revision: 188159 URL: http://svn.freebsd.org/changeset/base/188159 Log: merge r188157: cfi tool Added: projects/cambria/tools/tools/cfi/ - copied from r188157, head/tools/tools/cfi/ Modified: projects/cambria/tools/tools/ (props changed) projects/cambria/tools/tools/README projects/cambria/tools/tools/nanobsd/gateworks/ (props changed) projects/cambria/tools/tools/nanobsd/gateworks/Files/ (props changed) projects/cambria/tools/tools/nanobsd/gateworks/Files/root/ (props changed) projects/cambria/tools/tools/nanobsd/gateworks/cfg/ (props changed) projects/cambria/tools/tools/nanobsd/gateworks/cfg/ssh/ (props changed) Modified: projects/cambria/tools/tools/README ============================================================================== --- projects/cambria/tools/tools/README Thu Feb 5 18:21:52 2009 (r188158) +++ projects/cambria/tools/tools/README Thu Feb 5 18:23:28 2009 (r188159) @@ -12,6 +12,7 @@ ansify Convert K&R-style function defin ath Tools specific to the Atheros 802.11 support backout_commit A tool for reading in a commit message and generating a script that will backout the commit. +cfi Common Flash Interface (CFI) tool commitsdb A tool for reconstructing commit history using md5 checksums of the commit logs. crypto Test and exercise tools related to the crypto framework From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 18:39:29 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B918106564A; Thu, 5 Feb 2009 18:39:29 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 310188FC0C; Thu, 5 Feb 2009 18:39:29 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15IdTLg034537; Thu, 5 Feb 2009 18:39:29 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15IdTVC034536; Thu, 5 Feb 2009 18:39:29 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902051839.n15IdTVC034536@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 18:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188161 - projects/cambria/sys/dev/uart X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 18:39:29 -0000 Author: sam Date: Thu Feb 5 18:39:28 2009 New Revision: 188161 URL: http://svn.freebsd.org/changeset/base/188161 Log: o add ier_mask hint so xscale hack can be made less of a hack o print hint overrides with bootverbose Modified: projects/cambria/sys/dev/uart/uart_dev_ns8250.c Modified: projects/cambria/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_dev_ns8250.c Thu Feb 5 18:38:39 2009 (r188160) +++ projects/cambria/sys/dev/uart/uart_dev_ns8250.c Thu Feb 5 18:39:28 2009 (r188161) @@ -396,8 +396,8 @@ ns8250_bus_attach(struct uart_softc *sc) ns8250->mcr = uart_getreg(bas, REG_MCR); ns8250->fcr = FCR_ENABLE; - if (!resource_int_value("uart", device_get_unit(sc->sc_dev), "flags", - &ivar)) { + if (resource_int_value("uart", device_get_unit(sc->sc_dev), "flags", + &ivar) == 0) { if (UART_FLAGS_FCR_RX_LOW(ivar)) ns8250->fcr |= FCR_RX_LOW; else if (UART_FLAGS_FCR_RX_MEDL(ivar)) @@ -406,20 +406,30 @@ ns8250_bus_attach(struct uart_softc *sc) ns8250->fcr |= FCR_RX_HIGH; else ns8250->fcr |= FCR_RX_MEDH; + if (bootverbose) + device_printf(sc->sc_dev, "fcr 0x%x\n", ns8250->fcr); } else ns8250->fcr |= FCR_RX_MEDH; /* Get IER mask */ - ivar = 0xf0; - resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_mask", - &ivar); - ns8250->ier_mask = (uint8_t)(ivar & 0xff); + if (resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_mask", + &ivar) == 0) { + ns8250->ier_mask = (uint8_t)(ivar & 0xff); + if (bootverbose) + device_printf(sc->sc_dev, "ier_mask 0x%x\n", + ns8250->ier_mask); + } else + ns8250->ier_mask = 0xf0; /* Get IER RX interrupt bits */ - ivar = IER_EMSC | IER_ERLS | IER_ERXRDY; - resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_rxbits", - &ivar); - ns8250->ier_rxbits = (uint8_t)(ivar & 0xff); + if (resource_int_value("uart", device_get_unit(sc->sc_dev), + "ier_rxbits", &ivar) == 0) { + ns8250->ier_rxbits = (uint8_t)(ivar & 0xff); + if (bootverbose) + device_printf(sc->sc_dev, "ier_rxbits 0x%x\n", + ns8250->ier_rxbits); + } else + ns8250->ier_rxbits = IER_EMSC | IER_ERLS | IER_ERXRDY; uart_setreg(bas, REG_FCR, ns8250->fcr); uart_barrier(bas); From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 18:45:08 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD5481065680; Thu, 5 Feb 2009 18:45:08 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C4FC8FC2A; Thu, 5 Feb 2009 18:45:08 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15Ij8P5034819; Thu, 5 Feb 2009 18:45:08 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15Ij88h034816; Thu, 5 Feb 2009 18:45:08 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902051845.n15Ij88h034816@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 18:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188165 - in projects/cambria/sys/arm: conf xscale/ixp425 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 18:45:10 -0000 Author: sam Date: Thu Feb 5 18:45:08 2009 New Revision: 188165 URL: http://svn.freebsd.org/changeset/base/188165 Log: use uart hint to set UART Unit Enable (0x40) and receiver timeout int enable (0x10) instead of hardcoding it in the bus shim Modified: projects/cambria/sys/arm/conf/AVILA.hints projects/cambria/sys/arm/conf/CAMBRIA.hints projects/cambria/sys/arm/xscale/ixp425/uart_bus_ixp425.c Modified: projects/cambria/sys/arm/conf/AVILA.hints ============================================================================== --- projects/cambria/sys/arm/conf/AVILA.hints Thu Feb 5 18:43:13 2009 (r188164) +++ projects/cambria/sys/arm/conf/AVILA.hints Thu Feb 5 18:45:08 2009 (r188165) @@ -9,10 +9,12 @@ hint.uart.0.at="ixp0" hint.uart.0.addr=0xc8000000 hint.uart.0.irq=15 hint.uart.0.flags=0x10 +hint.uart.0.ier_rxbits=0x5d # NB: need UUE+RTOIE # USART0 is unit 1 hint.uart.1.at="ixp0" hint.uart.1.addr=0xc8001000 hint.uart.1.irq=13 +hint.uart.0.ier_rxbits=0x5d # NB: need UUE+RTOIE # NPE Hardware Queue Manager hint.ixpqmgr.0.at="ixp0" Modified: projects/cambria/sys/arm/conf/CAMBRIA.hints ============================================================================== --- projects/cambria/sys/arm/conf/CAMBRIA.hints Thu Feb 5 18:43:13 2009 (r188164) +++ projects/cambria/sys/arm/conf/CAMBRIA.hints Thu Feb 5 18:45:08 2009 (r188165) @@ -9,8 +9,9 @@ hint.uart.0.at="ixp0" hint.uart.0.addr=0xc8000000 hint.uart.0.irq=15 hint.uart.0.flags=0x10 +hint.uart.0.ier_rxbits=0x5d # NB: need UUE+RTOIE -# NB: no UART1 on ixp436 +# NB: no UART1 on ixp435 # NPE Hardware Queue Manager hint.ixpqmgr.0.at="ixp0" Modified: projects/cambria/sys/arm/xscale/ixp425/uart_bus_ixp425.c ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/uart_bus_ixp425.c Thu Feb 5 18:43:13 2009 (r188164) +++ projects/cambria/sys/arm/xscale/ixp425/uart_bus_ixp425.c Thu Feb 5 18:45:08 2009 (r188165) @@ -68,29 +68,13 @@ static int uart_ixp425_probe(device_t dev) { struct uart_softc *sc; + u_int rclk; sc = device_get_softc(dev); sc->sc_class = &uart_ns8250_class; - sc->sc_rrid = 0; - sc->sc_rtype = SYS_RES_MEMORY; - sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid, - 0, ~0, uart_getrange(sc->sc_class), RF_ACTIVE); - if (sc->sc_rres == NULL) { - return (ENXIO); - } - sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); - sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); - /* - * XXX set UART Unit Enable (0x40) AND - * receiver timeout int enable (0x10). - * The first turns on the UART. The second is necessary to get - * interrupts when the FIFO has data but is not full. Note that - * uart_ns8250 carefully avoids touching these bits so we can - * just set them here and proceed. But this is fragile... - */ - bus_space_write_4(sc->sc_bas.bst, sc->sc_bas.bsh, IXP425_UART_IER, - IXP425_UART_IER_UUE | IXP425_UART_IER_RTOIE); - bus_release_resource(dev, sc->sc_rtype, sc->sc_rrid, sc->sc_rres); - - return uart_bus_probe(dev, 0, IXP425_UART_FREQ, 0, 0); + if (resource_int_value("uart", device_get_unit(dev), "rclk", &rclk)) + rclk = IXP425_UART_FREQ; + if (bootverbose) + device_printf(dev, "rclk %u\n", rclk); + return uart_bus_probe(dev, 0, rclk, 0, 0); } From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 18:46:02 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00530106566C; Thu, 5 Feb 2009 18:46:01 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3C078FC18; Thu, 5 Feb 2009 18:46:01 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15Ik1Rr034872; Thu, 5 Feb 2009 18:46:01 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15Ik1GE034868; Thu, 5 Feb 2009 18:46:01 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902051846.n15Ik1GE034868@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 18:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188166 - in projects/cambria/sys/arm: conf xscale/ixp425 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 18:46:02 -0000 Author: sam Date: Thu Feb 5 18:46:01 2009 New Revision: 188166 URL: http://svn.freebsd.org/changeset/base/188166 Log: checkpoint support for optional GPS chip and RS485 port; not working Modified: projects/cambria/sys/arm/conf/CAMBRIA.hints projects/cambria/sys/arm/xscale/ixp425/avila_machdep.c projects/cambria/sys/arm/xscale/ixp425/ixp425.c projects/cambria/sys/arm/xscale/ixp425/ixp425reg.h Modified: projects/cambria/sys/arm/conf/CAMBRIA.hints ============================================================================== --- projects/cambria/sys/arm/conf/CAMBRIA.hints Thu Feb 5 18:45:08 2009 (r188165) +++ projects/cambria/sys/arm/conf/CAMBRIA.hints Thu Feb 5 18:46:01 2009 (r188166) @@ -13,6 +13,19 @@ hint.uart.0.ier_rxbits=0x5d # NB: need U # NB: no UART1 on ixp435 +# optional GPS serial port +#hint.uart.1.at="ixp0" +hint.uart.1.addr=0x53fc0000 +hint.uart.1.irq=20 +hint.uart.1.flags=0x10 +hint.uart.1.rclk=1843200 +# optional RS485 serial port +#hint.uart.2.at="ixp0" +#hint.uart.2.addr=0x53f80000 +#hint.uart.2.irq=21 +#hint.uart.2.flags=0x10 +#hint.uart.2.rclk=1843200 + # NPE Hardware Queue Manager hint.ixpqmgr.0.at="ixp0" Modified: projects/cambria/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/avila_machdep.c Thu Feb 5 18:45:08 2009 (r188165) +++ projects/cambria/sys/arm/xscale/ixp425/avila_machdep.c Thu Feb 5 18:46:01 2009 (r188166) @@ -244,6 +244,13 @@ static const struct pmap_devmap ixp435_d { IXP435_USB2_VBASE, IXP435_USB2_HWBASE, IXP435_USB2_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + /* GPS Memory Space */ + { CAMBRIA_GPS_VBASE, CAMBRIA_GPS_HWBASE, CAMBRIA_GPS_SIZE, + VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + /* RS485 Memory Space */ + { CAMBRIA_RS485_VBASE, CAMBRIA_RS485_HWBASE, CAMBRIA_RS485_SIZE, + VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, + { 0 } }; Modified: projects/cambria/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/ixp425.c Thu Feb 5 18:45:08 2009 (r188165) +++ projects/cambria/sys/arm/xscale/ixp425/ixp425.c Thu Feb 5 18:46:01 2009 (r188166) @@ -205,6 +205,7 @@ ixp425_attach(device_t dev) { struct ixp425_softc *sc; +bootverbose = 1; /*XXX*/ device_printf(dev, "%b\n", ixp4xx_read_feature_bits(), EXP_FCTRL_BITS); sc = device_get_softc(dev); @@ -337,6 +338,9 @@ static const struct { /* NB: need for ixp435 ehci controllers */ { IXP435_USB1_HWBASE, IXP435_USB1_SIZE, IXP435_USB1_VBASE }, { IXP435_USB2_HWBASE, IXP435_USB2_SIZE, IXP435_USB2_VBASE }, + /* NB: need for optional GPS on Cambria boards */ + { CAMBRIA_GPS_HWBASE, IXP425_REG_SIZE, CAMBRIA_GPS_VBASE }, + { CAMBRIA_RS485_HWBASE, IXP425_REG_SIZE, CAMBRIA_RS485_VBASE }, }; int @@ -393,7 +397,8 @@ ixp425_alloc_resource(device_t dev, devi flags, child); if (rv != NULL) { rman_set_rid(rv, *rid); - if (strcmp(device_get_name(child), "uart") == 0) + if (strcmp(device_get_name(child), "uart") == 0 +&& device_get_unit(child) == 0) /* XXX */ rman_set_bustag(rv, &ixp425_a4x_bs_tag); else rman_set_bustag(rv, sc->sc_iot); Modified: projects/cambria/sys/arm/xscale/ixp425/ixp425reg.h ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/ixp425reg.h Thu Feb 5 18:45:08 2009 (r188165) +++ projects/cambria/sys/arm/xscale/ixp425/ixp425reg.h Thu Feb 5 18:46:01 2009 (r188166) @@ -88,9 +88,11 @@ * SDRAM/DDR Memory Controller * F020 0000 --------------------------- IXP425_MCU_VBASE * + * F001 9000 RS485 (Cambria) + * F001 8000 GPS (Cambria) * F001 7000 EHCI USB 2 (IXP435) * F001 6000 EHCI USB 1 (IXP435) - * F020 6000 --------------------------- + * F001 6000 --------------------------- * Queue manager * F001 2000 --------------------------- IXP425_QMGR_VBASE * PCI Configuration and Status @@ -682,22 +684,24 @@ * IXP435/Gateworks Cambria */ #define CAMBRIA_GPS_HWBASE 0x53FC0000UL /* optional GPS Serial Port */ -#define CAMBRIA_GPS_SIZE 0x40000 +#define CAMBRIA_GPS_VBASE 0xF0018000UL +#define CAMBRIA_GPS_SIZE IXP425_REG_SIZE #define CAMBRIA_RS485_HWBASE 0x53F80000UL /* optional RS485 Serial Port */ -#define CAMBRIA_RS485_SIZE 0x40000 +#define CAMBRIA_RS485_VBASE 0xF0019000UL +#define CAMBRIA_RS485_SIZE IXP425_REG_SIZE #define CAMBRIA_OCTAL_LED_HWBASE 0x53F40000UL /* Octal Status LED Latch */ -#define CAMBRIA_OCTAL_LED_SIZE 0x1000 -#define CAMBRIA_CFSEL1_HWBASE 0x53E40000UL /* Compact Flash Socket Sel 0 */ +#define CAMBRIA_OCTAL_LED_SIZE IXP425_REG_SIZE +#define CAMBRIA_CFSEL1_HWBASE 0x53E40000UL /* Compact Flash Socket Sel 1 */ #define CAMBRIA_CFSEL1_SIZE 0x40000 -#define CAMBRIA_CFSEL0_HWBASE 0x53E00000UL /* Compact Flash Socket Sel 1 */ +#define CAMBRIA_CFSEL0_HWBASE 0x53E00000UL /* Compact Flash Socket Sel 0 */ #define CAMBRIA_CFSEL0_SIZE 0x40000 #define IXP435_USB1_HWBASE 0xcd000000UL /* USB host controller 1 */ #define IXP435_USB1_VBASE (IXP425_QMGR_VBASE + IXP425_QMGR_SIZE) -#define IXP435_USB1_SIZE 0x1000 /* NB: only uses 0x300 */ +#define IXP435_USB1_SIZE IXP425_REG_SIZE /* NB: only uses 0x300 */ #define IXP435_USB2_HWBASE 0xce000000UL /* USB host controller 2 */ #define IXP435_USB2_VBASE (IXP435_USB1_VBASE + IXP435_USB1_SIZE) -#define IXP435_USB2_SIZE 0x1000 /* NB: only uses 0x300 */ +#define IXP435_USB2_SIZE IXP425_REG_SIZE /* NB: only uses 0x300 */ #endif /* _IXP425REG_H_ */ From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 20:31:39 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5A921065670; Thu, 5 Feb 2009 20:31:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1CD68FC19; Thu, 5 Feb 2009 20:31:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15KVdPh037621; Thu, 5 Feb 2009 20:31:39 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15KVdEI037615; Thu, 5 Feb 2009 20:31:39 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052031.n15KVdEI037615@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 20:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188183 - in projects/vap7/sys: . conf contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 20:31:40 -0000 Author: sam Date: Thu Feb 5 20:31:39 2009 New Revision: 188183 URL: http://svn.freebsd.org/changeset/base/188183 Log: merge r188156: strataflash protection register ioctls Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/conf/options projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cfi/cfi_core.c projects/vap7/sys/dev/cfi/cfi_dev.c projects/vap7/sys/dev/cfi/cfi_reg.h projects/vap7/sys/dev/cfi/cfi_var.h projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) projects/vap7/sys/sys/cfictl.h Modified: projects/vap7/sys/conf/options ============================================================================== --- projects/vap7/sys/conf/options Thu Feb 5 20:26:53 2009 (r188182) +++ projects/vap7/sys/conf/options Thu Feb 5 20:31:39 2009 (r188183) @@ -789,3 +789,7 @@ TDMA_SLOTCNT_DEFAULT opt_tdma.h TDMA_BINTVAL_DEFAULT opt_tdma.h TDMA_TXRATE_11B_DEFAULT opt_tdma.h TDMA_TXRATE_11G_DEFAULT opt_tdma.h + +# Common Flash Interface (CFI) options +CFI_SUPPORT_STRATAFLASH opt_cfi.h +CFI_ARMEDANDDANGEROUS opt_cfi.h Modified: projects/vap7/sys/dev/cfi/cfi_core.c ============================================================================== --- projects/vap7/sys/dev/cfi/cfi_core.c Thu Feb 5 20:26:53 2009 (r188182) +++ projects/vap7/sys/dev/cfi/cfi_core.c Thu Feb 5 20:31:39 2009 (r188183) @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_cfi.h" + #include #include #include @@ -70,7 +72,6 @@ cfi_read(struct cfi_softc *sc, u_int ofs val = ~0; break; } - return (val); } @@ -300,10 +301,10 @@ cfi_detach(device_t dev) } static int -cfi_wait_ready(struct cfi_softc *sc, u_int timeout) +cfi_wait_ready(struct cfi_softc *sc, u_int ofs, u_int timeout) { int done, error; - uint32_t st0, st; + uint32_t st0 = 0, st = 0; done = 0; error = 0; @@ -315,21 +316,27 @@ cfi_wait_ready(struct cfi_softc *sc, u_i switch (sc->sc_cmdset) { case CFI_VEND_INTEL_ECS: case CFI_VEND_INTEL_SCS: - st = cfi_read(sc, sc->sc_wrofs); - done = (st & 0x80); + st = cfi_read(sc, ofs); + done = (st & CFI_INTEL_STATUS_WSMS); if (done) { - if (st & 0x02) + /* NB: bit 0 is reserved */ + st &= ~(CFI_INTEL_XSTATUS_RSVD | + CFI_INTEL_STATUS_WSMS | + CFI_INTEL_STATUS_RSVD); + if (st & CFI_INTEL_STATUS_DPS) error = EPERM; - else if (st & 0x10) + else if (st & CFI_INTEL_STATUS_PSLBS) error = EIO; - else if (st & 0x20) + else if (st & CFI_INTEL_STATUS_ECLBS) error = ENXIO; + else if (st) + error = EACCES; } break; case CFI_VEND_AMD_SCS: case CFI_VEND_AMD_ECS: - st0 = cfi_read(sc, sc->sc_wrofs); - st = cfi_read(sc, sc->sc_wrofs); + st0 = cfi_read(sc, ofs); + st = cfi_read(sc, ofs); done = ((st & 0x40) == (st0 & 0x40)) ? 1 : 0; break; } @@ -337,7 +344,7 @@ cfi_wait_ready(struct cfi_softc *sc, u_i if (!done && !error) error = ETIMEDOUT; if (error) - printf("\nerror=%d\n", error); + printf("\nerror=%d (st 0x%x st0 0x%x)\n", error, st, st0); return (error); } @@ -369,7 +376,7 @@ cfi_write_block(struct cfi_softc *sc) /* Better safe than sorry... */ return (ENODEV); } - error = cfi_wait_ready(sc, sc->sc_erase_timeout); + error = cfi_wait_ready(sc, sc->sc_wrofs, sc->sc_erase_timeout); if (error) goto out; @@ -411,7 +418,7 @@ cfi_write_block(struct cfi_softc *sc) intr_restore(intr); - error = cfi_wait_ready(sc, sc->sc_write_timeout); + error = cfi_wait_ready(sc, sc->sc_wrofs, sc->sc_write_timeout); if (error) goto out; } @@ -422,3 +429,145 @@ cfi_write_block(struct cfi_softc *sc) cfi_write(sc, 0, CFI_BCS_READ_ARRAY); return (error); } + +#ifdef CFI_SUPPORT_STRATAFLASH +/* + * Intel StrataFlash Protection Register Support. + * + * The memory includes a 128-bit Protection Register that can be + * used for security. There are two 64-bit segments; one is programmed + * at the factory with a unique 64-bit number which is immutable. + * The other segment is left blank for User (OEM) programming. + * Once the User/OEM segment is programmed it can be locked + * to prevent future programming by writing bit 0 of the Protection + * Lock Register (PLR). The PLR can written only once. + */ + +static uint16_t +cfi_get16(struct cfi_softc *sc, int off) +{ + uint16_t v = bus_space_read_2(sc->sc_tag, sc->sc_handle, off<<1); + return v; +} + +static void +cfi_put16(struct cfi_softc *sc, int off, uint16_t v) +{ + bus_space_write_2(sc->sc_tag, sc->sc_handle, off<<1, v); +} + +/* + * Read the factory-defined 64-bit segment of the PR. + */ +int +cfi_intel_get_factory_pr(struct cfi_softc *sc, uint64_t *id) +{ + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + + cfi_write(sc, 0, CFI_INTEL_READ_ID); + *id = ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(0)))<<48 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(1)))<<32 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(2)))<<16 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(3))); + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); + return 0; +} + +/* + * Read the User/OEM 64-bit segment of the PR. + */ +int +cfi_intel_get_oem_pr(struct cfi_softc *sc, uint64_t *id) +{ + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + + cfi_write(sc, 0, CFI_INTEL_READ_ID); + *id = ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(4)))<<48 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(5)))<<32 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(6)))<<16 | + ((uint64_t)cfi_get16(sc, CFI_INTEL_PR(7))); + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); + return 0; +} + +/* + * Write the User/OEM 64-bit segment of the PR. + */ +int +cfi_intel_set_oem_pr(struct cfi_softc *sc, uint64_t id) +{ + register_t intr; + int i, error; + + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + + for (i = 7; i >= 4; i--, id >>= 16) { + intr = intr_disable(); + cfi_write(sc, 0, CFI_INTEL_PP_SETUP); + cfi_put16(sc, CFI_INTEL_PR(i), id&0xffff); + intr_restore(intr); + error = cfi_wait_ready(sc, CFI_BCS_READ_STATUS, + sc->sc_write_timeout); + if (error) + break; + } + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); + return error; +} + +/* + * Read the contents of the Protection Lock Register. + */ +int +cfi_intel_get_plr(struct cfi_softc *sc, uint32_t *plr) +{ + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + + cfi_write(sc, 0, CFI_INTEL_READ_ID); + *plr = cfi_get16(sc, CFI_INTEL_PLR); + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); + return 0; +} + +/* + * Write the Protection Lock Register to lock down the + * user-settable segment of the Protection Register. + * NOTE: this operation is not reversible. + */ +int +cfi_intel_set_plr(struct cfi_softc *sc) +{ +#ifdef CFI_ARMEDANDDANGEROUS + register_t intr; +#endif + int error; + + if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) + return EOPNOTSUPP; + KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); + +#ifdef CFI_ARMEDANDDANGEROUS + /* worthy of console msg */ + device_printf(sc->sc_dev, "set PLR\n"); + intr = intr_disable(); + cfi_write(sc, 0, CFI_INTEL_PP_SETUP); + cfi_put16(sc, CFI_INTEL_PLR, 0xFFFD); + intr_restore(intr); + error = cfi_wait_ready(sc, CFI_BCS_READ_STATUS, sc->sc_write_timeout); + cfi_write(sc, 0, CFI_BCS_READ_ARRAY); +#else + device_printf(sc->sc_dev, "%s: PLR not set, " + "CFI_ARMEDANDDANGEROUS not configured\n", __func__); + error = ENXIO; +#endif + return error; +} +#endif /* CFI_SUPPORT_STRATAFLASH */ Modified: projects/vap7/sys/dev/cfi/cfi_dev.c ============================================================================== --- projects/vap7/sys/dev/cfi/cfi_dev.c Thu Feb 5 20:26:53 2009 (r188182) +++ projects/vap7/sys/dev/cfi/cfi_dev.c Thu Feb 5 20:31:39 2009 (r188183) @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_cfi.h" + #include #include #include @@ -255,14 +257,13 @@ cfi_devioctl(struct cdev *dev, u_long cm sc = dev->si_drv1; error = 0; - switch(cmd) { + switch (cmd) { case CFIOCQRY: if (sc->sc_writing) { error = cfi_block_finish(sc); if (error) break; } - rq = (struct cfiocqry *)data; if (rq->offset >= sc->sc_size / sc->sc_width) return (ESPIPE); @@ -274,6 +275,23 @@ cfi_devioctl(struct cdev *dev, u_long cm error = copyout(&val, rq->buffer++, 1); } break; +#ifdef CFI_SUPPORT_STRATAFLASH + case CFIOCGFACTORYPR: + error = cfi_intel_get_factory_pr(sc, (uint64_t *)data); + break; + case CFIOCGOEMPR: + error = cfi_intel_get_oem_pr(sc, (uint64_t *)data); + break; + case CFIOCSOEMPR: + error = cfi_intel_set_oem_pr(sc, *(uint64_t *)data); + break; + case CFIOCGPLR: + error = cfi_intel_get_plr(sc, (uint32_t *)data); + break; + case CFIOCSPLR: + error = cfi_intel_set_plr(sc); + break; +#endif /* CFI_SUPPORT_STRATAFLASH */ default: error = ENOIOCTL; break; Modified: projects/vap7/sys/dev/cfi/cfi_reg.h ============================================================================== --- projects/vap7/sys/dev/cfi/cfi_reg.h Thu Feb 5 20:26:53 2009 (r188182) +++ projects/vap7/sys/dev/cfi/cfi_reg.h Thu Feb 5 20:31:39 2009 (r188183) @@ -104,6 +104,28 @@ struct cfi_qry { #define CFI_BCS_CONFIRM 0xd0 #define CFI_BCS_READ_ARRAY 0xff +/* Intel commands. */ +#define CFI_INTEL_READ_ID 0x90 /* Read Identifier */ +#define CFI_INTEL_PP_SETUP 0xc0 /* Protection Program Setup */ + +/* NB: these are addresses for 16-bit accesses */ +#define CFI_INTEL_PLR 0x80 /* Protection Lock Register */ +#define CFI_INTEL_PR(n) (0x81+(n)) /* Protection Register */ + +/* Status register definitions */ +#define CFI_INTEL_STATUS_WSMS 0x0080 /* Write Machine Status */ +#define CFI_INTEL_STATUS_ESS 0x0040 /* Erase Suspend Status */ +#define CFI_INTEL_STATUS_ECLBS 0x0020 /* Erase and Clear Lock-Bit Status */ +#define CFI_INTEL_STATUS_PSLBS 0x0010 /* Program and Set Lock-Bit Status */ +#define CFI_INTEL_STATUS_VPENS 0x0008 /* Programming Voltage Status */ +#define CFI_INTEL_STATUS_PSS 0x0004 /* Program Suspend Status */ +#define CFI_INTEL_STATUS_DPS 0x0002 /* Device Protect Status */ +#define CFI_INTEL_STATUS_RSVD 0x0001 /* reserved */ + +/* eXtended Status register definitions */ +#define CFI_INTEL_XSTATUS_WBS 0x8000 /* Write Buffer Status */ +#define CFI_INTEL_XSTATUS_RSVD 0x7f00 /* reserved */ + /* AMD commands. */ #define CFI_AMD_BLOCK_ERASE 0x30 #define CFI_AMD_UNLOCK_ACK 0x55 Modified: projects/vap7/sys/dev/cfi/cfi_var.h ============================================================================== --- projects/vap7/sys/dev/cfi/cfi_var.h Thu Feb 5 20:26:53 2009 (r188182) +++ projects/vap7/sys/dev/cfi/cfi_var.h Thu Feb 5 20:31:39 2009 (r188183) @@ -74,4 +74,11 @@ uint32_t cfi_read(struct cfi_softc *, u_ uint8_t cfi_read_qry(struct cfi_softc *, u_int); int cfi_write_block(struct cfi_softc *); +#ifdef CFI_SUPPORT_STRATAFLASH +int cfi_intel_get_factory_pr(struct cfi_softc *sc, uint64_t *); +int cfi_intel_get_oem_pr(struct cfi_softc *sc, uint64_t *); +int cfi_intel_set_oem_pr(struct cfi_softc *sc, uint64_t); +int cfi_intel_get_plr(struct cfi_softc *sc, uint32_t *); +int cfi_intel_set_plr(struct cfi_softc *sc); +#endif /* CFI_SUPPORT_STRATAFLASH */ #endif /* _DEV_CFI_VAR_H_ */ Modified: projects/vap7/sys/sys/cfictl.h ============================================================================== --- projects/vap7/sys/sys/cfictl.h Thu Feb 5 20:26:53 2009 (r188182) +++ projects/vap7/sys/sys/cfictl.h Thu Feb 5 20:31:39 2009 (r188183) @@ -44,4 +44,10 @@ struct cfiocqry { #define CFIOCQRY _IOWR('q', 0, struct cfiocqry) +/* Intel StrataFlash Protection Register support */ +#define CFIOCGFACTORYPR _IOR('q', 1, uint64_t) /* get factory protection reg */ +#define CFIOCGOEMPR _IOR('q', 2, uint64_t) /* get oem protection reg */ +#define CFIOCSOEMPR _IOW('q', 3, uint64_t) /* set oem protection reg */ +#define CFIOCGPLR _IOR('q', 4, uint32_t) /* get protection lock reg */ +#define CFIOCSPLR _IO('q', 5) /* set protection log reg */ #endif /* _SYS_CFICTL_H_ */ From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 20:32:59 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E930E106566B; Thu, 5 Feb 2009 20:32:59 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE7E48FC12; Thu, 5 Feb 2009 20:32:59 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15KWxP3037704; Thu, 5 Feb 2009 20:32:59 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15KWxGu037702; Thu, 5 Feb 2009 20:32:59 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052032.n15KWxGu037702@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 20:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188184 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 20:33:00 -0000 Author: sam Date: Thu Feb 5 20:32:59 2009 New Revision: 188184 URL: http://svn.freebsd.org/changeset/base/188184 Log: merge r188170,r188182: ddb improvements Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) projects/vap7/sys/net80211/ieee80211_crypto.h projects/vap7/sys/net80211/ieee80211_ddb.c Modified: projects/vap7/sys/net80211/ieee80211_crypto.h ============================================================================== --- projects/vap7/sys/net80211/ieee80211_crypto.h Thu Feb 5 20:31:39 2009 (r188183) +++ projects/vap7/sys/net80211/ieee80211_crypto.h Thu Feb 5 20:32:59 2009 (r188184) @@ -104,6 +104,10 @@ struct ieee80211_key { (IEEE80211_KEY_SWENCRYPT | IEEE80211_KEY_SWDECRYPT) #define IEEE80211_KEY_SWMIC (IEEE80211_KEY_SWENMIC | IEEE80211_KEY_SWDEMIC) +#define IEEE80211_KEY_BITS \ + "\20\1XMIT\2RECV\3GROUP\4SWENCRYPT\5SWDECRYPT\6SWENMIC\7SWDEMIC" \ + "\10DEVKEY\11CIPHER0\12CIPHER1" + #define IEEE80211_KEYIX_NONE ((ieee80211_keyix) -1) /* Modified: projects/vap7/sys/net80211/ieee80211_ddb.c ============================================================================== --- projects/vap7/sys/net80211/ieee80211_ddb.c Thu Feb 5 20:31:39 2009 (r188183) +++ projects/vap7/sys/net80211/ieee80211_ddb.c Thu Feb 5 20:32:59 2009 (r188184) @@ -59,6 +59,8 @@ static void _db_show_vap(const struct ie static void _db_show_com(const struct ieee80211com *, int showvaps, int showsta, int showprocs); +static void _db_show_node_table(const char *tag, + const struct ieee80211_node_table *); static void _db_show_channel(const char *tag, const struct ieee80211_channel *); static void _db_show_ssid(const char *tag, int ix, int len, const uint8_t *); static void _db_show_appie(const char *tag, const struct ieee80211_appie *); @@ -78,6 +80,15 @@ DB_SHOW_COMMAND(sta, db_show_sta) _db_show_sta((const struct ieee80211_node *) addr); } +DB_SHOW_COMMAND(statab, db_show_statab) +{ + if (!have_addr) { + db_printf("usage: show statab \n"); + return; + } + _db_show_node_table("", (const struct ieee80211_node_table *) addr); +} + DB_SHOW_COMMAND(vap, db_show_vap) { int i, showprocs = 0; @@ -213,6 +224,7 @@ _db_show_sta(const struct ieee80211_node ni->ni_rxfragstamp); db_printf("\trxfrag[0] %p rxfrag[1] %p rxfrag[2] %p\n", ni->ni_rxfrag[0], ni->ni_rxfrag[1], ni->ni_rxfrag[2]); + _db_show_key("\tucastkey", 0, &ni->ni_ucastkey); db_printf("\trstamp %u avgrssi 0x%x (rssi %d) noise %d\n", ni->ni_rstamp, ni->ni_avgrssi, IEEE80211_RSSI_GET(ni->ni_avgrssi), ni->ni_noise); @@ -502,9 +514,12 @@ _db_show_com(const struct ieee80211com * db_printf("\n"); db_printf("\tmax_keyix %d", ic->ic_max_keyix); - db_printf(" sta %p", &ic->ic_sta); db_printf(" wme %p", &ic->ic_wme); + if (!showsta) + db_printf(" sta %p", &ic->ic_sta); db_printf("\n"); + if (showsta) + _db_show_node_table("\t", &ic->ic_sta); db_printf("\tprotmode %d", ic->ic_protmode); db_printf(" nonerpsta %u", ic->ic_nonerpsta); @@ -569,6 +584,26 @@ _db_show_com(const struct ieee80211com * } static void +_db_show_node_table(const char *tag, const struct ieee80211_node_table *nt) +{ + int i; + + db_printf("%s%s@%p:\n", tag, nt->nt_name, nt); + db_printf("%s nodelock %p", tag, &nt->nt_nodelock); + db_printf(" inact_init %d", nt->nt_inact_init); + db_printf(" scanlock %p", &nt->nt_scanlock); + db_printf(" scangen %u\n", nt->nt_scangen); + db_printf("%s keyixmax %d keyixmap %p\n", + tag, nt->nt_keyixmax, nt->nt_keyixmap); + for (i = 0; i < nt->nt_keyixmax; i++) { + const struct ieee80211_node *ni = nt->nt_keyixmap[i]; + if (ni != NULL) + db_printf("%s [%3u] %p %s\n", tag, i, ni, + ether_sprintf(ni->ni_macaddr)); + } +} + +static void _db_show_channel(const char *tag, const struct ieee80211_channel *c) { db_printf("%s ", tag); @@ -577,7 +612,7 @@ _db_show_channel(const char *tag, const else if (c == IEEE80211_CHAN_ANYC) db_printf(""); else - db_printf("[%u (%u) flags=%b maxreg %u maxpow %u minpow %u state 0x%x extieee %u]", + db_printf("[%u (%u) flags=%b maxreg %d maxpow %d minpow %d state 0x%x extieee %u]", c->ic_freq, c->ic_ieee, c->ic_flags, IEEE80211_CHAN_BITS, c->ic_maxregpower, c->ic_maxpower, c->ic_minpower, @@ -632,8 +667,6 @@ _db_show_key(const char *tag, int ix, co const struct ieee80211_cipher *cip = wk->wk_cipher; int keylen = wk->wk_keylen; - if ((wk->wk_flags & IEEE80211_KEY_DEVKEY) == 0) - return; db_printf(tag, ix); switch (cip->ic_cipher) { case IEEE80211_CIPHER_WEP: @@ -664,6 +697,8 @@ _db_show_key(const char *tag, int ix, co cip->ic_cipher, wk->wk_keyix, 8*keylen); break; } + if (wk->wk_rxkeyix != wk->wk_keyix) + db_printf(" rxkeyix %u", wk->wk_rxkeyix); if (memcmp(wk->wk_key, zerodata, keylen) != 0) { int i; @@ -677,22 +712,9 @@ _db_show_key(const char *tag, int ix, co if (cip->ic_cipher != IEEE80211_CIPHER_WEP && wk->wk_keytsc != 0) db_printf(" tsc %ju", (uintmax_t)wk->wk_keytsc); - if (wk->wk_flags != 0) { - const char *sep = " "; - - if (wk->wk_flags & IEEE80211_KEY_XMIT) - db_printf("%stx", sep), sep = "+"; - if (wk->wk_flags & IEEE80211_KEY_RECV) - db_printf("%srx", sep), sep = "+"; - if (wk->wk_flags & IEEE80211_KEY_DEFAULT) - db_printf("%sdef", sep), sep = "+"; - if (wk->wk_flags & IEEE80211_KEY_SWCRYPT) - db_printf("%sswcrypt", sep), sep = "+"; - if (wk->wk_flags & IEEE80211_KEY_SWMIC) - db_printf("%sswmic", sep), sep = "+"; - } - db_printf("\n"); + db_printf(" flags=%b", wk->wk_flags, IEEE80211_KEY_BITS); } + db_printf("\n"); } static void From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 20:34:20 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A55E106566B; Thu, 5 Feb 2009 20:34:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC5708FC1D; Thu, 5 Feb 2009 20:34:19 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15KYJlX037801; Thu, 5 Feb 2009 20:34:19 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15KYJgu037797; Thu, 5 Feb 2009 20:34:19 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052034.n15KYJgu037797@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 20:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188185 - in projects/vap7/tools/tools: . ath ath/athdebug ath/athrd cfi crypto editing nanobsd net80211 net80211/wlanstats X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 20:34:20 -0000 Author: sam Date: Thu Feb 5 20:34:19 2009 New Revision: 188185 URL: http://svn.freebsd.org/changeset/base/188185 Log: merge r188157: cfi test tool Added: projects/vap7/tools/tools/cfi/ - copied from r188157, head/tools/tools/cfi/ Modified: projects/vap7/tools/tools/ (props changed) projects/vap7/tools/tools/README projects/vap7/tools/tools/ath/ (props changed) projects/vap7/tools/tools/ath/athdebug/athdebug.c projects/vap7/tools/tools/ath/athrd/athrd.c projects/vap7/tools/tools/crypto/ (props changed) projects/vap7/tools/tools/editing/ (props changed) projects/vap7/tools/tools/nanobsd/ (props changed) projects/vap7/tools/tools/net80211/ (props changed) projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Modified: projects/vap7/tools/tools/README ============================================================================== --- projects/vap7/tools/tools/README Thu Feb 5 20:32:59 2009 (r188184) +++ projects/vap7/tools/tools/README Thu Feb 5 20:34:19 2009 (r188185) @@ -12,6 +12,7 @@ ansify Convert K&R-style function defin ath Tools specific to the Atheros 802.11 support backout_commit A tool for reading in a commit message and generating a script that will backout the commit. +cfi Common Flash Interface (CFI) tool commitsdb A tool for reconstructing commit history using md5 checksums of the commit logs. crypto Test and exercise tools related to the crypto framework Modified: projects/vap7/tools/tools/ath/athdebug/athdebug.c ============================================================================== --- projects/vap7/tools/tools/ath/athdebug/athdebug.c Thu Feb 5 20:32:59 2009 (r188184) +++ projects/vap7/tools/tools/ath/athdebug/athdebug.c Thu Feb 5 20:34:19 2009 (r188185) @@ -43,38 +43,12 @@ #include #include +#include "ah_debug.h" + #define N(a) (sizeof(a)/sizeof(a[0])) const char *progname; -enum { - ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ - ATH_DEBUG_XMIT_DESC = 0x00000002, /* xmit descriptors */ - ATH_DEBUG_RECV = 0x00000004, /* basic recv operation */ - ATH_DEBUG_RECV_DESC = 0x00000008, /* recv descriptors */ - ATH_DEBUG_RATE = 0x00000010, /* rate control */ - ATH_DEBUG_RESET = 0x00000020, /* reset processing */ - ATH_DEBUG_MODE = 0x00000040, /* mode init/setup */ - ATH_DEBUG_BEACON = 0x00000080, /* beacon handling */ - ATH_DEBUG_WATCHDOG = 0x00000100, /* watchdog timeout */ - ATH_DEBUG_INTR = 0x00001000, /* ISR */ - ATH_DEBUG_TX_PROC = 0x00002000, /* tx ISR proc */ - ATH_DEBUG_RX_PROC = 0x00004000, /* rx ISR proc */ - ATH_DEBUG_BEACON_PROC = 0x00008000, /* beacon ISR proc */ - ATH_DEBUG_CALIBRATE = 0x00010000, /* periodic calibration */ - ATH_DEBUG_KEYCACHE = 0x00020000, /* key cache management */ - ATH_DEBUG_STATE = 0x00040000, /* 802.11 state transitions */ - ATH_DEBUG_NODE = 0x00080000, /* node management */ - ATH_DEBUG_LED = 0x00100000, /* led management */ - ATH_DEBUG_FF = 0x00200000, /* fast frames */ - ATH_DEBUG_DFS = 0x00400000, /* DFS processing */ - ATH_DEBUG_TDMA = 0x00800000, /* TDMA processing */ - ATH_DEBUG_TDMA_TIMER = 0x01000000, /* TDMA timer processing */ - ATH_DEBUG_REGDOMAIN = 0x02000000, /* regulatory processing */ - ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */ - ATH_DEBUG_ANY = 0xffffffff -}; - static struct { const char *name; u_int bit; @@ -87,7 +61,6 @@ static struct { { "reset", ATH_DEBUG_RESET }, { "mode", ATH_DEBUG_MODE }, { "beacon", ATH_DEBUG_BEACON }, - { "watchdog", ATH_DEBUG_WATCHDOG }, { "intr", ATH_DEBUG_INTR }, { "xmit_proc", ATH_DEBUG_TX_PROC }, { "recv_proc", ATH_DEBUG_RX_PROC }, @@ -96,13 +69,19 @@ static struct { { "keycache", ATH_DEBUG_KEYCACHE }, { "state", ATH_DEBUG_STATE }, { "node", ATH_DEBUG_NODE }, - { "led", ATH_DEBUG_LED }, { "ff", ATH_DEBUG_FF }, - { "dfs", ATH_DEBUG_DFS }, { "tdma", ATH_DEBUG_TDMA }, { "tdma_timer", ATH_DEBUG_TDMA_TIMER }, { "regdomain", ATH_DEBUG_REGDOMAIN }, { "fatal", ATH_DEBUG_FATAL }, + { "ani", HAL_DEBUG_ANI }, + { "txqueue", HAL_DEBUG_TXQUEUE }, + { "nfcal", HAL_DEBUG_NFCAL }, + { "phyio", HAL_DEBUG_PHYIO }, + { "power", HAL_DEBUG_POWER }, + { "rfparam", HAL_DEBUG_RFPARAM }, + { "regio", HAL_DEBUG_REGIO }, + { "attach", HAL_DEBUG_ATTACH }, }; static u_int Modified: projects/vap7/tools/tools/ath/athrd/athrd.c ============================================================================== --- projects/vap7/tools/tools/ath/athrd/athrd.c Thu Feb 5 20:32:59 2009 (r188184) +++ projects/vap7/tools/tools/ath/athrd/athrd.c Thu Feb 5 20:34:19 2009 (r188185) @@ -1058,7 +1058,7 @@ main(int argc, char *argv[]) showchannels = AH_TRUE; break; case 'd': - ath_hal_debug = HAL_DEBUG_ANY; + ath_hal_debug = ATH_DEBUG_ANY; break; case 'e': extendedChanMode = AH_FALSE; @@ -1591,7 +1591,7 @@ setRateTable(struct ath_hal *ah, const s ahp->ah_ofdmTxPower = rpow[0]; #endif - HALDEBUG(ah, HAL_DEBUG_ANY, + HALDEBUG(ah, ATH_DEBUG_ANY, "%s: MaxRD: %d TurboMax: %d MaxCTL: %d " "TPC_Reduction %d\n", __func__, twiceMaxRDPower, turbo2WMaxPower5, Modified: projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c ============================================================================== --- projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Thu Feb 5 20:32:59 2009 (r188184) +++ projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Thu Feb 5 20:34:19 2009 (r188185) @@ -390,9 +390,12 @@ wlan_getopmode(struct wlanstatfoo *wf0) strlcpy(ifmr.ifm_name, wf->ifr.ifr_name, sizeof(ifmr.ifm_name)); if (ioctl(wf->s, SIOCGIFMEDIA, &ifmr) < 0) err(1, "%s (SIOCGIFMEDIA)", wf->ifr.ifr_name); - if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) - wf->opmode = IEEE80211_M_IBSS; /* XXX ahdemo */ - else if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) + if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) { + if (ifmr.ifm_current & IFM_FLAG0) + wf->opmode = IEEE80211_M_AHDEMO; + else + wf->opmode = IEEE80211_M_IBSS; + } else if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) wf->opmode = IEEE80211_M_HOSTAP; else if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) wf->opmode = IEEE80211_M_MONITOR; @@ -422,6 +425,15 @@ getlladdr(struct wlanstatfoo_p *wf) freeifaddrs(ifp); } +static int +getbssid(struct wlanstatfoo_p *wf) +{ + wf->ireq.i_type = IEEE80211_IOC_BSSID; + wf->ireq.i_data = wf->mac; + wf->ireq.i_len = IEEE80211_ADDR_LEN; + return ioctl(wf->s, SIOCG80211, &wf->ireq); +} + static void wlan_setstamac(struct wlanstatfoo *wf0, const uint8_t *mac) { @@ -436,11 +448,9 @@ wlan_setstamac(struct wlanstatfoo *wf0, getlladdr(wf); break; case IEEE80211_M_STA: - wf->ireq.i_type = IEEE80211_IOC_BSSID; - wf->ireq.i_data = wf->mac; - wf->ireq.i_len = IEEE80211_ADDR_LEN; - if (ioctl(wf->s, SIOCG80211, &wf->ireq) <0) - err(1, "%s (IEEE80211_IOC_BSSID)", wf->ireq.i_name); + if (getbssid(wf) < 0) + err(1, "%s (IEEE80211_IOC_BSSID)", + wf->ireq.i_name); break; } } else @@ -457,15 +467,18 @@ wlan_collect(struct wlanstatfoo_p *wf, wf->ireq.i_type = IEEE80211_IOC_STA_INFO; wf->ireq.i_data = (caddr_t) &wf->u_info; wf->ireq.i_len = sizeof(wf->u_info); - if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) - warn("%s (IEEE80211_IOC_STA_INFO)", wf->ireq.i_name); + if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) { + warn("%s:%s (IEEE80211_IOC_STA_INFO)", wf->ireq.i_name, + ether_ntoa((const struct ether_addr*) wf->mac)); + } IEEE80211_ADDR_COPY(nstats->is_u.macaddr, wf->mac); wf->ireq.i_type = IEEE80211_IOC_STA_STATS; wf->ireq.i_data = (caddr_t) nstats; wf->ireq.i_len = sizeof(*nstats); if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) - warn("%s (IEEE80211_IOC_STA_STATS)", wf->ireq.i_name); + warn("%s:%s (IEEE80211_IOC_STA_STATS)", wf->ireq.i_name, + ether_ntoa((const struct ether_addr*) wf->mac)); wf->ifr.ifr_data = (caddr_t) stats; if (ioctl(wf->s, SIOCG80211STATS, &wf->ifr) < 0) From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 20:37:07 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B818E106564A; Thu, 5 Feb 2009 20:37:07 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5EF08FC14; Thu, 5 Feb 2009 20:37:07 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15Kb7Jp037921; Thu, 5 Feb 2009 20:37:07 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15Kb7m3037917; Thu, 5 Feb 2009 20:37:07 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052037.n15Kb7m3037917@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 20:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188186 - in projects/vap7/tools/tools: ath ath/athdebug ath/athrd net80211 net80211/wlanstats X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 20:37:08 -0000 Author: sam Date: Thu Feb 5 20:37:07 2009 New Revision: 188186 URL: http://svn.freebsd.org/changeset/base/188186 Log: revert unintended parts of r188185 Modified: projects/vap7/tools/tools/ath/ (props changed) projects/vap7/tools/tools/ath/athdebug/athdebug.c projects/vap7/tools/tools/ath/athrd/athrd.c projects/vap7/tools/tools/net80211/ (props changed) projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Modified: projects/vap7/tools/tools/ath/athdebug/athdebug.c ============================================================================== --- projects/vap7/tools/tools/ath/athdebug/athdebug.c Thu Feb 5 20:34:19 2009 (r188185) +++ projects/vap7/tools/tools/ath/athdebug/athdebug.c Thu Feb 5 20:37:07 2009 (r188186) @@ -43,12 +43,38 @@ #include #include -#include "ah_debug.h" - #define N(a) (sizeof(a)/sizeof(a[0])) const char *progname; +enum { + ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ + ATH_DEBUG_XMIT_DESC = 0x00000002, /* xmit descriptors */ + ATH_DEBUG_RECV = 0x00000004, /* basic recv operation */ + ATH_DEBUG_RECV_DESC = 0x00000008, /* recv descriptors */ + ATH_DEBUG_RATE = 0x00000010, /* rate control */ + ATH_DEBUG_RESET = 0x00000020, /* reset processing */ + ATH_DEBUG_MODE = 0x00000040, /* mode init/setup */ + ATH_DEBUG_BEACON = 0x00000080, /* beacon handling */ + ATH_DEBUG_WATCHDOG = 0x00000100, /* watchdog timeout */ + ATH_DEBUG_INTR = 0x00001000, /* ISR */ + ATH_DEBUG_TX_PROC = 0x00002000, /* tx ISR proc */ + ATH_DEBUG_RX_PROC = 0x00004000, /* rx ISR proc */ + ATH_DEBUG_BEACON_PROC = 0x00008000, /* beacon ISR proc */ + ATH_DEBUG_CALIBRATE = 0x00010000, /* periodic calibration */ + ATH_DEBUG_KEYCACHE = 0x00020000, /* key cache management */ + ATH_DEBUG_STATE = 0x00040000, /* 802.11 state transitions */ + ATH_DEBUG_NODE = 0x00080000, /* node management */ + ATH_DEBUG_LED = 0x00100000, /* led management */ + ATH_DEBUG_FF = 0x00200000, /* fast frames */ + ATH_DEBUG_DFS = 0x00400000, /* DFS processing */ + ATH_DEBUG_TDMA = 0x00800000, /* TDMA processing */ + ATH_DEBUG_TDMA_TIMER = 0x01000000, /* TDMA timer processing */ + ATH_DEBUG_REGDOMAIN = 0x02000000, /* regulatory processing */ + ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */ + ATH_DEBUG_ANY = 0xffffffff +}; + static struct { const char *name; u_int bit; @@ -61,6 +87,7 @@ static struct { { "reset", ATH_DEBUG_RESET }, { "mode", ATH_DEBUG_MODE }, { "beacon", ATH_DEBUG_BEACON }, + { "watchdog", ATH_DEBUG_WATCHDOG }, { "intr", ATH_DEBUG_INTR }, { "xmit_proc", ATH_DEBUG_TX_PROC }, { "recv_proc", ATH_DEBUG_RX_PROC }, @@ -69,19 +96,13 @@ static struct { { "keycache", ATH_DEBUG_KEYCACHE }, { "state", ATH_DEBUG_STATE }, { "node", ATH_DEBUG_NODE }, + { "led", ATH_DEBUG_LED }, { "ff", ATH_DEBUG_FF }, + { "dfs", ATH_DEBUG_DFS }, { "tdma", ATH_DEBUG_TDMA }, { "tdma_timer", ATH_DEBUG_TDMA_TIMER }, { "regdomain", ATH_DEBUG_REGDOMAIN }, { "fatal", ATH_DEBUG_FATAL }, - { "ani", HAL_DEBUG_ANI }, - { "txqueue", HAL_DEBUG_TXQUEUE }, - { "nfcal", HAL_DEBUG_NFCAL }, - { "phyio", HAL_DEBUG_PHYIO }, - { "power", HAL_DEBUG_POWER }, - { "rfparam", HAL_DEBUG_RFPARAM }, - { "regio", HAL_DEBUG_REGIO }, - { "attach", HAL_DEBUG_ATTACH }, }; static u_int Modified: projects/vap7/tools/tools/ath/athrd/athrd.c ============================================================================== --- projects/vap7/tools/tools/ath/athrd/athrd.c Thu Feb 5 20:34:19 2009 (r188185) +++ projects/vap7/tools/tools/ath/athrd/athrd.c Thu Feb 5 20:37:07 2009 (r188186) @@ -1058,7 +1058,7 @@ main(int argc, char *argv[]) showchannels = AH_TRUE; break; case 'd': - ath_hal_debug = ATH_DEBUG_ANY; + ath_hal_debug = HAL_DEBUG_ANY; break; case 'e': extendedChanMode = AH_FALSE; @@ -1591,7 +1591,7 @@ setRateTable(struct ath_hal *ah, const s ahp->ah_ofdmTxPower = rpow[0]; #endif - HALDEBUG(ah, ATH_DEBUG_ANY, + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: MaxRD: %d TurboMax: %d MaxCTL: %d " "TPC_Reduction %d\n", __func__, twiceMaxRDPower, turbo2WMaxPower5, Modified: projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c ============================================================================== --- projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Thu Feb 5 20:34:19 2009 (r188185) +++ projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Thu Feb 5 20:37:07 2009 (r188186) @@ -390,12 +390,9 @@ wlan_getopmode(struct wlanstatfoo *wf0) strlcpy(ifmr.ifm_name, wf->ifr.ifr_name, sizeof(ifmr.ifm_name)); if (ioctl(wf->s, SIOCGIFMEDIA, &ifmr) < 0) err(1, "%s (SIOCGIFMEDIA)", wf->ifr.ifr_name); - if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) { - if (ifmr.ifm_current & IFM_FLAG0) - wf->opmode = IEEE80211_M_AHDEMO; - else - wf->opmode = IEEE80211_M_IBSS; - } else if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) + if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) + wf->opmode = IEEE80211_M_IBSS; /* XXX ahdemo */ + else if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) wf->opmode = IEEE80211_M_HOSTAP; else if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) wf->opmode = IEEE80211_M_MONITOR; @@ -425,15 +422,6 @@ getlladdr(struct wlanstatfoo_p *wf) freeifaddrs(ifp); } -static int -getbssid(struct wlanstatfoo_p *wf) -{ - wf->ireq.i_type = IEEE80211_IOC_BSSID; - wf->ireq.i_data = wf->mac; - wf->ireq.i_len = IEEE80211_ADDR_LEN; - return ioctl(wf->s, SIOCG80211, &wf->ireq); -} - static void wlan_setstamac(struct wlanstatfoo *wf0, const uint8_t *mac) { @@ -448,9 +436,11 @@ wlan_setstamac(struct wlanstatfoo *wf0, getlladdr(wf); break; case IEEE80211_M_STA: - if (getbssid(wf) < 0) - err(1, "%s (IEEE80211_IOC_BSSID)", - wf->ireq.i_name); + wf->ireq.i_type = IEEE80211_IOC_BSSID; + wf->ireq.i_data = wf->mac; + wf->ireq.i_len = IEEE80211_ADDR_LEN; + if (ioctl(wf->s, SIOCG80211, &wf->ireq) <0) + err(1, "%s (IEEE80211_IOC_BSSID)", wf->ireq.i_name); break; } } else @@ -467,18 +457,15 @@ wlan_collect(struct wlanstatfoo_p *wf, wf->ireq.i_type = IEEE80211_IOC_STA_INFO; wf->ireq.i_data = (caddr_t) &wf->u_info; wf->ireq.i_len = sizeof(wf->u_info); - if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) { - warn("%s:%s (IEEE80211_IOC_STA_INFO)", wf->ireq.i_name, - ether_ntoa((const struct ether_addr*) wf->mac)); - } + if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) + warn("%s (IEEE80211_IOC_STA_INFO)", wf->ireq.i_name); IEEE80211_ADDR_COPY(nstats->is_u.macaddr, wf->mac); wf->ireq.i_type = IEEE80211_IOC_STA_STATS; wf->ireq.i_data = (caddr_t) nstats; wf->ireq.i_len = sizeof(*nstats); if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) - warn("%s:%s (IEEE80211_IOC_STA_STATS)", wf->ireq.i_name, - ether_ntoa((const struct ether_addr*) wf->mac)); + warn("%s (IEEE80211_IOC_STA_STATS)", wf->ireq.i_name); wf->ifr.ifr_data = (caddr_t) stats; if (ioctl(wf->s, SIOCG80211STATS, &wf->ifr) < 0) From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 20:40:44 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 407FC1065688; Thu, 5 Feb 2009 20:40:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E6358FC12; Thu, 5 Feb 2009 20:40:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15KeirG038098; Thu, 5 Feb 2009 20:40:44 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15KeiTn038097; Thu, 5 Feb 2009 20:40:44 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052040.n15KeiTn038097@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 20:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188188 - in projects/vap7/tools/tools/net80211: . wlanstats X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 20:40:45 -0000 Author: sam Date: Thu Feb 5 20:40:43 2009 New Revision: 188188 URL: http://svn.freebsd.org/changeset/base/188188 Log: merge r188187: minor fixups Modified: projects/vap7/tools/tools/net80211/ (props changed) projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Modified: projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c ============================================================================== --- projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Thu Feb 5 20:39:53 2009 (r188187) +++ projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Thu Feb 5 20:40:43 2009 (r188188) @@ -390,9 +390,12 @@ wlan_getopmode(struct wlanstatfoo *wf0) strlcpy(ifmr.ifm_name, wf->ifr.ifr_name, sizeof(ifmr.ifm_name)); if (ioctl(wf->s, SIOCGIFMEDIA, &ifmr) < 0) err(1, "%s (SIOCGIFMEDIA)", wf->ifr.ifr_name); - if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) - wf->opmode = IEEE80211_M_IBSS; /* XXX ahdemo */ - else if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) + if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) { + if (ifmr.ifm_current & IFM_FLAG0) + wf->opmode = IEEE80211_M_AHDEMO; + else + wf->opmode = IEEE80211_M_IBSS; + } else if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) wf->opmode = IEEE80211_M_HOSTAP; else if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) wf->opmode = IEEE80211_M_MONITOR; @@ -422,6 +425,15 @@ getlladdr(struct wlanstatfoo_p *wf) freeifaddrs(ifp); } +static int +getbssid(struct wlanstatfoo_p *wf) +{ + wf->ireq.i_type = IEEE80211_IOC_BSSID; + wf->ireq.i_data = wf->mac; + wf->ireq.i_len = IEEE80211_ADDR_LEN; + return ioctl(wf->s, SIOCG80211, &wf->ireq); +} + static void wlan_setstamac(struct wlanstatfoo *wf0, const uint8_t *mac) { @@ -436,11 +448,9 @@ wlan_setstamac(struct wlanstatfoo *wf0, getlladdr(wf); break; case IEEE80211_M_STA: - wf->ireq.i_type = IEEE80211_IOC_BSSID; - wf->ireq.i_data = wf->mac; - wf->ireq.i_len = IEEE80211_ADDR_LEN; - if (ioctl(wf->s, SIOCG80211, &wf->ireq) <0) - err(1, "%s (IEEE80211_IOC_BSSID)", wf->ireq.i_name); + if (getbssid(wf) < 0) + err(1, "%s (IEEE80211_IOC_BSSID)", + wf->ireq.i_name); break; } } else @@ -457,15 +467,18 @@ wlan_collect(struct wlanstatfoo_p *wf, wf->ireq.i_type = IEEE80211_IOC_STA_INFO; wf->ireq.i_data = (caddr_t) &wf->u_info; wf->ireq.i_len = sizeof(wf->u_info); - if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) - warn("%s (IEEE80211_IOC_STA_INFO)", wf->ireq.i_name); + if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) { + warn("%s:%s (IEEE80211_IOC_STA_INFO)", wf->ireq.i_name, + ether_ntoa((const struct ether_addr*) wf->mac)); + } IEEE80211_ADDR_COPY(nstats->is_u.macaddr, wf->mac); wf->ireq.i_type = IEEE80211_IOC_STA_STATS; wf->ireq.i_data = (caddr_t) nstats; wf->ireq.i_len = sizeof(*nstats); if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) - warn("%s (IEEE80211_IOC_STA_STATS)", wf->ireq.i_name); + warn("%s:%s (IEEE80211_IOC_STA_STATS)", wf->ireq.i_name, + ether_ntoa((const struct ether_addr*) wf->mac)); wf->ifr.ifr_data = (caddr_t) stats; if (ioctl(wf->s, SIOCG80211STATS, &wf->ifr) < 0) From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 20:43:48 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ABAA106566B; Thu, 5 Feb 2009 20:43:48 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3ABFF8FC1C; Thu, 5 Feb 2009 20:43:48 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15Khmvd038205; Thu, 5 Feb 2009 20:43:48 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15KhmNn038204; Thu, 5 Feb 2009 20:43:48 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052043.n15KhmNn038204@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 20:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188189 - projects/vap7/sys/arm/conf X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 20:43:48 -0000 Author: sam Date: Thu Feb 5 20:43:47 2009 New Revision: 188189 URL: http://svn.freebsd.org/changeset/base/188189 Log: o add PREEMPTION o KSE does not work w/ PREEMPTION, remove it Modified: projects/vap7/sys/arm/conf/AVILA Modified: projects/vap7/sys/arm/conf/AVILA ============================================================================== --- projects/vap7/sys/arm/conf/AVILA Thu Feb 5 20:40:43 2009 (r188188) +++ projects/vap7/sys/arm/conf/AVILA Thu Feb 5 20:43:47 2009 (r188189) @@ -50,7 +50,8 @@ options DDB #Enable the kernel debugg #options DIAGNOSTIC options SCHED_4BSD #4BSD scheduler -options KSE +options PREEMPTION + options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem @@ -78,7 +79,6 @@ options BOOTP_NFSV3 options BOOTP_WIRED_TO=npe0 #options BOOTP_WIRED_TO=ath0 options BOOTP_COMPAT -#options PREEMPTION #options VERBOSE_SYSINIT device nexus From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 21:45:13 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 441B0106566B; Thu, 5 Feb 2009 21:45:13 +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 336FC8FC0A; Thu, 5 Feb 2009 21:45:13 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15LjCGS040038; Thu, 5 Feb 2009 21:45:12 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15LjCnA040037; Thu, 5 Feb 2009 21:45:12 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902052145.n15LjCnA040037@svn.freebsd.org> From: Kip Macy Date: Thu, 5 Feb 2009 21:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188201 - projects/releng_7_xen/sys/i386/xen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 21:45:13 -0000 Author: kmacy Date: Thu Feb 5 21:45:12 2009 New Revision: 188201 URL: http://svn.freebsd.org/changeset/base/188201 Log: remove writeable page tables from attributes Modified: projects/releng_7_xen/sys/i386/xen/locore.s Modified: projects/releng_7_xen/sys/i386/xen/locore.s ============================================================================== --- projects/releng_7_xen/sys/i386/xen/locore.s Thu Feb 5 21:41:27 2009 (r188200) +++ projects/releng_7_xen/sys/i386/xen/locore.s Thu Feb 5 21:45:12 2009 (r188201) @@ -80,7 +80,7 @@ #if 0 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, "writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel") #endif - ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, "writable_page_tables|supervisor_mode_kernel|writable_descriptor_tables") + ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, "supervisor_mode_kernel|writable_descriptor_tables") #ifdef PAE ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz, "yes") From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 21:47:41 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 122191065672; Thu, 5 Feb 2009 21:47:41 +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 013898FC08; Thu, 5 Feb 2009 21:47:41 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15Lleb4040125; Thu, 5 Feb 2009 21:47:40 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15LleQP040123; Thu, 5 Feb 2009 21:47:40 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902052147.n15LleQP040123@svn.freebsd.org> From: Kip Macy Date: Thu, 5 Feb 2009 21:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188202 - in projects/releng_7_xen/sys: dev/xen/netfront i386/i386 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 21:47:41 -0000 Author: kmacy Date: Thu Feb 5 21:47:40 2009 New Revision: 188202 URL: http://svn.freebsd.org/changeset/base/188202 Log: - change reboot - make netfront compile without witness Modified: projects/releng_7_xen/sys/dev/xen/netfront/netfront.c projects/releng_7_xen/sys/i386/i386/vm_machdep.c Modified: projects/releng_7_xen/sys/dev/xen/netfront/netfront.c ============================================================================== --- projects/releng_7_xen/sys/dev/xen/netfront/netfront.c Thu Feb 5 21:45:12 2009 (r188201) +++ projects/releng_7_xen/sys/dev/xen/netfront/netfront.c Thu Feb 5 21:47:40 2009 (r188202) @@ -24,6 +24,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: projects/releng_7_xen/sys/i386/i386/vm_machdep.c ============================================================================== --- projects/releng_7_xen/sys/i386/i386/vm_machdep.c Thu Feb 5 21:45:12 2009 (r188201) +++ projects/releng_7_xen/sys/i386/i386/vm_machdep.c Thu Feb 5 21:47:40 2009 (r188202) @@ -629,7 +629,10 @@ cpu_reset_real() disable_intr(); #ifdef XEN - HYPERVISOR_shutdown(SHUTDOWN_poweroff); + if (smp_processor_id() == 0) + HYPERVISOR_shutdown(SHUTDOWN_reboot); + else + HYPERVISOR_shutdown(SHUTDOWN_poweroff); #endif #ifdef CPU_ELAN if (elan_mmcr != NULL) From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 21:57:42 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FECD106566C; Thu, 5 Feb 2009 21:57:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C2D48FC08; Thu, 5 Feb 2009 21:57:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15LvgWG040419; Thu, 5 Feb 2009 21:57:42 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15LvfjF040414; Thu, 5 Feb 2009 21:57:41 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052157.n15LvfjF040414@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 21:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188203 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 21:57:42 -0000 Author: sam Date: Thu Feb 5 21:57:41 2009 New Revision: 188203 URL: http://svn.freebsd.org/changeset/base/188203 Log: merge r188191-r188195,r188197: minor fixes to ath Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212.h projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/ath/if_ath.c projects/vap7/sys/dev/ath/if_athioctl.h projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) Modified: projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212.h Thu Feb 5 21:47:40 2009 (r188202) +++ projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212.h Thu Feb 5 21:57:41 2009 (r188203) @@ -122,7 +122,6 @@ typedef struct { uint32_t targetGain; uint32_t loTrig; uint32_t hiTrig; - uint32_t gainFCorrection; uint32_t active; const GAIN_OPTIMIZATION_STEP *currStep; } GAIN_VALUES; Modified: projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Thu Feb 5 21:47:40 2009 (r188202) +++ projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Thu Feb 5 21:57:41 2009 (r188203) @@ -990,11 +990,16 @@ ar5212PerCalibrationN(struct ath_hal *ah if (powerMeasI && powerMeasQ) break; /* Do we really need this??? */ - OS_REG_WRITE (ah, AR_PHY_TIMING_CTRL4, - OS_REG_READ(ah, AR_PHY_TIMING_CTRL4) | - AR_PHY_TIMING_CTRL4_DO_IQCAL); + OS_REG_SET_BIT(ah, AR_PHY_TIMING_CTRL4, + AR_PHY_TIMING_CTRL4_DO_IQCAL); } while (++i < IQ_CAL_TRIES); + HALDEBUG(ah, HAL_DEBUG_PERCAL, + "%s: IQ cal finished: %d tries\n", __func__, i); + HALDEBUG(ah, HAL_DEBUG_PERCAL, + "%s: powerMeasI %u powerMeasQ %u iqCorrMeas %d\n", + __func__, powerMeasI, powerMeasQ, iqCorrMeas); + /* * Prescale these values to remove 64-bit operation * requirement at the loss of a little precision. @@ -1021,19 +1026,7 @@ ar5212PerCalibrationN(struct ath_hal *ah } HALDEBUG(ah, HAL_DEBUG_PERCAL, - "****************** MISGATED IQ CAL! *******************\n"); - HALDEBUG(ah, HAL_DEBUG_PERCAL, - "time = %d, i = %d, \n", OS_GETUPTIME(ah), i); - HALDEBUG(ah, HAL_DEBUG_PERCAL, - "powerMeasI = 0x%08x\n", powerMeasI); - HALDEBUG(ah, HAL_DEBUG_PERCAL, - "powerMeasQ = 0x%08x\n", powerMeasQ); - HALDEBUG(ah, HAL_DEBUG_PERCAL, - "iqCorrMeas = 0x%08x\n", iqCorrMeas); - HALDEBUG(ah, HAL_DEBUG_PERCAL, - "iCoff = %d\n", iCoff); - HALDEBUG(ah, HAL_DEBUG_PERCAL, - "qCoff = %d\n", qCoff); + "%s: iCoff %d qCoff %d\n", __func__, iCoff, qCoff); /* Write values and enable correction */ OS_REG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4, @@ -1048,7 +1041,8 @@ ar5212PerCalibrationN(struct ath_hal *ah ichan->iCoff = iCoff; ichan->qCoff = qCoff; } - } else if (!IEEE80211_IS_CHAN_B(chan) && ahp->ah_bIQCalibration == IQ_CAL_DONE && + } else if (!IEEE80211_IS_CHAN_B(chan) && + ahp->ah_bIQCalibration == IQ_CAL_DONE && (ichan->privFlags & CHANNEL_IQVALID) == 0) { /* * Start IQ calibration if configured channel has changed. @@ -1089,7 +1083,16 @@ ar5212PerCalibration(struct ath_hal *ah, HAL_BOOL ar5212ResetCalValid(struct ath_hal *ah, const struct ieee80211_channel *chan) { - /* XXX */ + HAL_CHANNEL_INTERNAL *ichan; + + ichan = ath_hal_checkchannel(ah, chan); + if (ichan == AH_NULL) { + HALDEBUG(ah, HAL_DEBUG_ANY, + "%s: invalid channel %u/0x%x; no mapping\n", + __func__, chan->ic_freq, chan->ic_flags); + return AH_FALSE; + } + ichan->privFlags &= ~CHANNEL_IQVALID; return AH_TRUE; } Modified: projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c ============================================================================== --- projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c Thu Feb 5 21:47:40 2009 (r188202) +++ projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c Thu Feb 5 21:57:41 2009 (r188203) @@ -239,34 +239,36 @@ ar5212AdjustGain(struct ath_hal *ah, GAI /* * Read rf register to determine if gainF needs correction */ -static void +static uint32_t ar5212GetGainFCorrection(struct ath_hal *ah) { struct ath_hal_5212 *ahp = AH5212(ah); - GAIN_VALUES *gv = &ahp->ah_gainValues; + uint32_t correction; HALASSERT(IS_RADX112_REV2(ah)); - gv->gainFCorrection = 0; + correction = 0; if (ar5212GetRfField(ar5212GetRfBank(ah, 7), 1, 36, 0) == 1) { + const GAIN_VALUES *gv = &ahp->ah_gainValues; uint32_t mixGain = gv->currStep->paramVal[0]; uint32_t gainStep = ar5212GetRfField(ar5212GetRfBank(ah, 7), 4, 32, 0); switch (mixGain) { case 0 : - gv->gainFCorrection = 0; + correction = 0; break; case 1 : - gv->gainFCorrection = gainStep; + correction = gainStep; break; case 2 : - gv->gainFCorrection = 2 * gainStep - 5; + correction = 2 * gainStep - 5; break; case 3 : - gv->gainFCorrection = 2 * gainStep; + correction = 2 * gainStep; break; } } + return correction; } /* @@ -303,9 +305,9 @@ ar5212GetRfgain(struct ath_hal *ah) gv->currGain += PHY_PROBE_CCK_CORRECTION; } if (IS_RADX112_REV2(ah)) { - ar5212GetGainFCorrection(ah); - if (gv->currGain >= gv->gainFCorrection) - gv->currGain -= gv->gainFCorrection; + uint32_t correct = ar5212GetGainFCorrection(ah); + if (gv->currGain >= correct) + gv->currGain -= correct; else gv->currGain = 0; } Modified: projects/vap7/sys/dev/ath/if_ath.c ============================================================================== --- projects/vap7/sys/dev/ath/if_ath.c Thu Feb 5 21:47:40 2009 (r188202) +++ projects/vap7/sys/dev/ath/if_ath.c Thu Feb 5 21:57:41 2009 (r188203) @@ -4994,9 +4994,9 @@ ath_tx_start(struct ath_softc *sc, struc sc->sc_stats.ast_tx_noack++; #ifdef ATH_SUPPORT_TDMA if (sc->sc_tdma && (flags & HAL_TXDESC_NOACK) == 0) { - DPRINTF(sc, ATH_DEBUG_XMIT, "%s: ACK required w/ TDMA\n", - __func__); - /* XXX statistic */ + DPRINTF(sc, ATH_DEBUG_TDMA, + "%s: discard frame, ACK required w/ TDMA\n", __func__); + sc->sc_stats.ast_tdma_ack++; ath_freetx(m0); return EIO; } @@ -7198,6 +7198,10 @@ ath_raw_xmit(struct ieee80211_node *ni, struct ath_buf *bf; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) { + DPRINTF(sc, ATH_DEBUG_XMIT, "%s: discard frame, %s", __func__, + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ? + "!running" : "invalid"); + sc->sc_stats.ast_tx_raw_fail++; ieee80211_free_node(ni); m_freem(m); return ENETDOWN; @@ -7207,6 +7211,7 @@ ath_raw_xmit(struct ieee80211_node *ni, */ bf = ath_getbuf(sc); if (bf == NULL) { + /* NB: ath_getbuf handles stat+msg */ ieee80211_free_node(ni); m_freem(m); return ENOBUFS; Modified: projects/vap7/sys/dev/ath/if_athioctl.h ============================================================================== --- projects/vap7/sys/dev/ath/if_athioctl.h Thu Feb 5 21:47:40 2009 (r188202) +++ projects/vap7/sys/dev/ath/if_athioctl.h Thu Feb 5 21:57:41 2009 (r188203) @@ -115,7 +115,9 @@ struct ath_stats { u_int32_t ast_tdma_tsf; /* TDMA slot update set TSF */ u_int16_t ast_tdma_tsfadjp;/* TDMA slot adjust+ (usec, smoothed)*/ u_int16_t ast_tdma_tsfadjm;/* TDMA slot adjust- (usec, smoothed)*/ - u_int32_t ast_pad[17]; + u_int32_t ast_tdma_ack; /* TDMA tx failed 'cuz ACK required */ + u_int32_t ast_tx_raw_fail;/* raw tx failed 'cuz h/w down */ + u_int32_t ast_pad[15]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq) From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 22:06:41 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 709491065673; Thu, 5 Feb 2009 22:06:41 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4541D8FC22; Thu, 5 Feb 2009 22:06:41 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15M6fkG040656; Thu, 5 Feb 2009 22:06:41 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15M6fgP040655; Thu, 5 Feb 2009 22:06:41 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052206.n15M6fgP040655@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 22:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188204 - in projects/vap7/tools/tools/ath: . athstats X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 22:06:41 -0000 Author: sam Date: Thu Feb 5 22:06:41 2009 New Revision: 188204 URL: http://svn.freebsd.org/changeset/base/188204 Log: merge r188196: add new stats and missing tx_raw stat Modified: projects/vap7/tools/tools/ath/ (props changed) projects/vap7/tools/tools/ath/athstats/athstats.c Modified: projects/vap7/tools/tools/ath/athstats/athstats.c ============================================================================== --- projects/vap7/tools/tools/ath/athstats/athstats.c Thu Feb 5 21:57:41 2009 (r188203) +++ projects/vap7/tools/tools/ath/athstats/athstats.c Thu Feb 5 22:06:41 2009 (r188204) @@ -217,7 +217,9 @@ static const struct fmt athstats[] = { { 5, "tdmat", "tdmat", "TDMA slot update set TSF" }, #define S_TDMA_TSFADJ AFTER(S_TDMA_TSF) { 8, "tdmadj", "tdmadj", "TDMA slot adjust (usecs, smoothed)" }, -#define S_RATE_CALLS AFTER(S_TDMA_TSFADJ) +#define S_TDMA_ACK AFTER(S_TDMA_TSFADJ) + { 5, "tdmack", "tdmack", "TDMA tx failed 'cuz ACK required" }, +#define S_RATE_CALLS AFTER(S_TDMA_ACK) #else #define S_RATE_CALLS AFTER(S_PER_RFGAIN) #endif @@ -236,7 +238,9 @@ static const struct fmt athstats[] = { { 5, "bmissphantom", "bmissphantom", "phantom beacon misses" }, #define S_TX_RAW AFTER(S_BMISS_PHANTOM) { 5, "txraw", "txraw", "tx frames through raw api" }, -#define S_RX_TOOBIG AFTER(S_TX_RAW) +#define S_TX_RAW_FAIL AFTER(S_TX_RAW) + { 5, "txrawfail", "txrawfail", "raw tx failed 'cuz interface/hw down" }, +#define S_RX_TOOBIG AFTER(S_TX_RAW_FAIL) { 5, "rx2big", "rx2big", "rx failed 'cuz frame too large" }, #ifndef __linux__ #define S_CABQ_XMIT AFTER(S_RX_TOOBIG) @@ -557,6 +561,8 @@ ath_get_curstat(struct statfoo *sf, int case S_TX_SHORTPRE: STAT(tx_shortpre); case S_TX_ALTRATE: STAT(tx_altrate); case S_TX_PROTECT: STAT(tx_protect); + case S_TX_RAW: STAT(tx_raw); + case S_TX_RAW_FAIL: STAT(tx_raw_fail); case S_RX_NOMBUF: STAT(rx_nombuf); #ifdef S_RX_BUSDMA case S_RX_BUSDMA: STAT(rx_busdma); @@ -609,6 +615,7 @@ ath_get_curstat(struct statfoo *sf, int snprintf(b, bs, "-%d/+%d", wf->cur.ath.ast_tdma_tsfadjm, wf->cur.ath.ast_tdma_tsfadjp); return 1; + case S_TDMA_ACK: STAT(tdma_ack); #endif case S_RATE_CALLS: STAT(rate_calls); case S_RATE_RAISE: STAT(rate_raise); @@ -771,6 +778,8 @@ ath_get_totstat(struct statfoo *sf, int case S_TX_SHORTPRE: STAT(tx_shortpre); case S_TX_ALTRATE: STAT(tx_altrate); case S_TX_PROTECT: STAT(tx_protect); + case S_TX_RAW: STAT(tx_raw); + case S_TX_RAW_FAIL: STAT(tx_raw_fail); case S_RX_NOMBUF: STAT(rx_nombuf); #ifdef S_RX_BUSDMA case S_RX_BUSDMA: STAT(rx_busdma); @@ -824,6 +833,7 @@ ath_get_totstat(struct statfoo *sf, int wf->total.ath.ast_tdma_tsfadjm, wf->total.ath.ast_tdma_tsfadjp); return 1; + case S_TDMA_ACK: STAT(tdma_ack); #endif case S_RATE_CALLS: STAT(rate_calls); case S_RATE_RAISE: STAT(rate_raise); From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 22:17:57 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D753106566B; Thu, 5 Feb 2009 22:17:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CC888FC24; Thu, 5 Feb 2009 22:17:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15MHvPp041002; Thu, 5 Feb 2009 22:17:57 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15MHvxr041001; Thu, 5 Feb 2009 22:17:57 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052217.n15MHvxr041001@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 22:17:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188207 - in projects/vap7/tools/tools/ath: . athstats X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 22:17:57 -0000 Author: sam Date: Thu Feb 5 22:17:56 2009 New Revision: 188207 URL: http://svn.freebsd.org/changeset/base/188207 Log: merge r188205: unbreak -o Modified: projects/vap7/tools/tools/ath/ (props changed) projects/vap7/tools/tools/ath/athstats/main.c Modified: projects/vap7/tools/tools/ath/athstats/main.c ============================================================================== --- projects/vap7/tools/tools/ath/athstats/main.c Thu Feb 5 22:17:10 2009 (r188206) +++ projects/vap7/tools/tools/ath/athstats/main.c Thu Feb 5 22:17:56 2009 (r188207) @@ -72,8 +72,7 @@ getfmt(const char *tag) for (i = 0; i < N(tags); i++) if (strcasecmp(tags[i].tag, tag) == 0) return tags[i].fmt; - errx(-1, "unknown tag \%s\"", tag); - /*NOTREACHED*/ + return tag; #undef N } From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 22:19:14 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A48310656C8; Thu, 5 Feb 2009 22:19:14 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD448FC1A; Thu, 5 Feb 2009 22:19:14 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15MJDIm041082; Thu, 5 Feb 2009 22:19:13 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15MJD5q041081; Thu, 5 Feb 2009 22:19:13 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052219.n15MJD5q041081@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 22:19:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188208 - in projects/vap7/tools/tools/net80211: . wlanstats X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 22:19:14 -0000 Author: sam Date: Thu Feb 5 22:19:13 2009 New Revision: 188208 URL: http://svn.freebsd.org/changeset/base/188208 Log: merge r188206: make -o handling like athstats Modified: projects/vap7/tools/tools/net80211/ (props changed) projects/vap7/tools/tools/net80211/wlanstats/main.c Modified: projects/vap7/tools/tools/net80211/wlanstats/main.c ============================================================================== --- projects/vap7/tools/tools/net80211/wlanstats/main.c Thu Feb 5 22:17:56 2009 (r188207) +++ projects/vap7/tools/tools/net80211/wlanstats/main.c Thu Feb 5 22:19:13 2009 (r188208) @@ -48,10 +48,30 @@ #include "wlanstats.h" -#define S_DEFAULT \ - "input,rx_mgmt,output,rx_badkeyid,scan_active,scan_bg,bmiss,rssi,noise,rate" -#define S_AMPDU \ - "input,output,ampdu_reorder,ampdu_oor,rx_dup,ampdu_flush,ampdu_move,ampdu_drop,ampdu_bar,ampdu_baroow,ampdu_barmove,rssi,rate" +static struct { + const char *tag; + const char *fmt; +} tags[] = { + { "default", + "input,rx_mgmt,output,rx_badkeyid,scan_active,scan_bg,bmiss,rssi,noise,rate" + }, + { "ampdu", + "input,output,ampdu_reorder,ampdu_oor,rx_dup,ampdu_flush,ampdu_move," + "ampdu_drop,ampdu_bar,ampdu_baroow,ampdu_barmove,rssi,rate" + }, +}; + +static const char * +getfmt(const char *tag) +{ +#define N(a) (sizeof(a)/sizeof(a[0])) + int i; + for (i = 0; i < N(tags); i++) + if (strcasecmp(tags[i].tag, tag) == 0) + return tags[i].fmt; + return tag; +#undef N +} static int signalled; @@ -138,10 +158,14 @@ main(int argc, char *argv[]) struct wlanstatfoo *wf; struct ether_addr *ea; const uint8_t *mac = NULL; + const char *ifname; int allnodes = 0; int c, mode; - wf = wlanstats_new("wlan0", S_DEFAULT); + ifname = getenv("WLAN"); + if (ifname == NULL) + ifname = "wlan0"; + wf = wlanstats_new(ifname, getfmt("default")); while ((c = getopt(argc, argv, "ai:lm:o:")) != -1) { switch (c) { case 'a': @@ -160,10 +184,7 @@ main(int argc, char *argv[]) mac = ea->octet; break; case 'o': - if (strcasecmp(optarg, "ampdu") == 0) - wf->setfmt(wf, S_AMPDU); - else - wf->setfmt(wf, optarg); + wf->setfmt(wf, getfmt(optarg)); break; default: errx(-1, "usage: %s [-a] [-i ifname] [-l] [-o fmt] [interval]\n", argv[0]); From owner-svn-src-projects@FreeBSD.ORG Thu Feb 5 23:16:36 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F8821065747; Thu, 5 Feb 2009 23:16:36 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 396B48FC0A; Thu, 5 Feb 2009 23:16:34 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n15NGYe6042300; Thu, 5 Feb 2009 23:16:34 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n15NGYTA042299; Thu, 5 Feb 2009 23:16:34 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902052316.n15NGYTA042299@svn.freebsd.org> From: Sam Leffler Date: Thu, 5 Feb 2009 23:16:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188211 - in projects/vap7/tools/tools/net80211: . wlanstats X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 23:16:53 -0000 Author: sam Date: Thu Feb 5 23:16:33 2009 New Revision: 188211 URL: http://svn.freebsd.org/changeset/base/188211 Log: merge 188210: guess bss node address for adhoc+ahdemo modes Modified: projects/vap7/tools/tools/net80211/ (props changed) projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Modified: projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c ============================================================================== --- projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Thu Feb 5 23:15:39 2009 (r188210) +++ projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c Thu Feb 5 23:16:33 2009 (r188211) @@ -437,15 +437,24 @@ getbssid(struct wlanstatfoo_p *wf) static void wlan_setstamac(struct wlanstatfoo *wf0, const uint8_t *mac) { + static const uint8_t zeromac[IEEE80211_ADDR_LEN]; struct wlanstatfoo_p *wf = (struct wlanstatfoo_p *) wf0; if (mac == NULL) { switch (wlan_getopmode(wf0)) { case IEEE80211_M_HOSTAP: case IEEE80211_M_MONITOR: + getlladdr(wf); + break; case IEEE80211_M_IBSS: case IEEE80211_M_AHDEMO: - getlladdr(wf); + /* + * NB: this may not work in which case the + * mac must be specified on the command line + */ + if (getbssid(wf) < 0 || + IEEE80211_ADDR_EQ(wf->mac, zeromac)) + getlladdr(wf); break; case IEEE80211_M_STA: if (getbssid(wf) < 0) From owner-svn-src-projects@FreeBSD.ORG Fri Feb 6 00:50:46 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2A19106567E; Fri, 6 Feb 2009 00:50:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C7008FC0C; Fri, 6 Feb 2009 00:50:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n160okf5044227; Fri, 6 Feb 2009 00:50:46 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n160okO5044226; Fri, 6 Feb 2009 00:50:46 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902060050.n160okO5044226@svn.freebsd.org> From: Sam Leffler Date: Fri, 6 Feb 2009 00:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188215 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2009 00:50:50 -0000 Author: sam Date: Fri Feb 6 00:50:46 2009 New Revision: 188215 URL: http://svn.freebsd.org/changeset/base/188215 Log: merge r188213: add PSB channels to the calibration list Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) Modified: projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c Fri Feb 6 00:50:21 2009 (r188214) +++ projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c Fri Feb 6 00:50:46 2009 (r188215) @@ -1026,9 +1026,18 @@ static REG_DOMAIN regDomains[] = { {.regDmnEnum = DEBUG_REG_DMN, .conformanceTestLimit = FCC, .dfsMask = DFS_FCC3, - .chan11a = BM3(F1_5120_5240, F1_5260_5700, F1_5745_5825), - .chan11a_half = BM3(F2_5120_5240, F2_5260_5700, F7_5745_5825), - .chan11a_quarter = BM3(F3_5120_5240, F3_5260_5700, F8_5745_5825), + .chan11a = BM4(F1_4950_4980, + F1_5120_5240, + F1_5260_5700, + F1_5745_5825), + .chan11a_half = BM4(F1_4945_4985, + F2_5120_5240, + F2_5260_5700, + F7_5745_5825), + .chan11a_quarter = BM4(F1_4942_4987, + F3_5120_5240, + F3_5260_5700, + F8_5745_5825), .chan11a_turbo = BM8(T1_5130_5210, T1_5250_5330, T1_5370_5490, From owner-svn-src-projects@FreeBSD.ORG Sat Feb 7 01:50:44 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BB7C1065673; Sat, 7 Feb 2009 01:50:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AA9A8FC18; Sat, 7 Feb 2009 01:50:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n171oi3e077342; Sat, 7 Feb 2009 01:50:44 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n171oiHV077340; Sat, 7 Feb 2009 01:50:44 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902070150.n171oiHV077340@svn.freebsd.org> From: Sam Leffler Date: Sat, 7 Feb 2009 01:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188261 - projects/vap7/sbin/ifconfig X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2009 01:50:44 -0000 Author: sam Date: Sat Feb 7 01:50:43 2009 New Revision: 188261 URL: http://svn.freebsd.org/changeset/base/188261 Log: merge r188155: add support for max antenna gain Modified: projects/vap7/sbin/ifconfig/ (props changed) projects/vap7/sbin/ifconfig/regdomain.c projects/vap7/sbin/ifconfig/regdomain.h Modified: projects/vap7/sbin/ifconfig/regdomain.c ============================================================================== --- projects/vap7/sbin/ifconfig/regdomain.c Sat Feb 7 01:43:04 2009 (r188260) +++ projects/vap7/sbin/ifconfig/regdomain.c Sat Feb 7 01:50:43 2009 (r188261) @@ -289,6 +289,10 @@ end_element(void *data, const char *name mt->netband->maxPowerDFS = strtoul(p, NULL, 0); goto done; } + if (iseq(name, "maxantgain") && mt->netband != NULL) { + mt->netband->maxAntGain = strtoul(p, NULL, 0); + goto done; + } /* ... */ if (iseq(name, "isocc") && mt->country != NULL) { Modified: projects/vap7/sbin/ifconfig/regdomain.h ============================================================================== --- projects/vap7/sbin/ifconfig/regdomain.h Sat Feb 7 01:43:04 2009 (r188260) +++ projects/vap7/sbin/ifconfig/regdomain.h Sat Feb 7 01:50:43 2009 (r188261) @@ -49,6 +49,7 @@ struct netband { const struct freqband *band; /* channel list description */ uint8_t maxPower; /* regulatory cap on tx power (dBm) */ uint8_t maxPowerDFS; /* regulatory cap w/ DFS (dBm) */ + uint8_t maxAntGain; /* max allowed antenna gain (.5 dBm) */ uint32_t flags; /* net80211 channel flags */ LIST_ENTRY(netband) next; From owner-svn-src-projects@FreeBSD.ORG Sat Feb 7 01:51:22 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D82BE106564A; Sat, 7 Feb 2009 01:51:22 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C63B18FC19; Sat, 7 Feb 2009 01:51:22 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n171pMj3077404; Sat, 7 Feb 2009 01:51:22 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n171pMGV077401; Sat, 7 Feb 2009 01:51:22 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902070151.n171pMGV077401@svn.freebsd.org> From: Sam Leffler Date: Sat, 7 Feb 2009 01:51:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188262 - projects/vap7/sbin/ifconfig X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2009 01:51:23 -0000 Author: sam Date: Sat Feb 7 01:51:22 2009 New Revision: 188262 URL: http://svn.freebsd.org/changeset/base/188262 Log: merge r188258: regulatory fixups Modified: projects/vap7/sbin/ifconfig/ (props changed) projects/vap7/sbin/ifconfig/ifieee80211.c projects/vap7/sbin/ifconfig/regdomain.c projects/vap7/sbin/ifconfig/regdomain.h Modified: projects/vap7/sbin/ifconfig/ifieee80211.c ============================================================================== --- projects/vap7/sbin/ifconfig/ifieee80211.c Sat Feb 7 01:50:43 2009 (r188261) +++ projects/vap7/sbin/ifconfig/ifieee80211.c Sat Feb 7 01:51:22 2009 (r188262) @@ -99,10 +99,6 @@ #define IEEE80211_FIXED_RATE_NONE 0xff #endif -#define REQ_ECM 0x01000000 /* enable if ECM set */ -#define REQ_OUTDOOR 0x02000000 /* enable for outdoor operation */ -#define REQ_FLAGS 0xff000000 /* private flags, don't pass to os */ - /* XXX need these publicly defined or similar */ #ifndef IEEE80211_NODE_AUTH #define IEEE80211_NODE_AUTH 0x0001 /* authorized for data */ @@ -1802,6 +1798,57 @@ chanfind(const struct ieee80211_channel return 0; } +/* + * Check channel compatibility. + */ +static int +checkchan(const struct ieee80211req_chaninfo *avail, int freq, int flags) +{ + flags &= ~REQ_FLAGS; + /* + * Check if exact channel is in the calibration table; + * everything below is to deal with channels that we + * want to include but that are not explicitly listed. + */ + if (flags & IEEE80211_CHAN_HT40) { + /* NB: we use an HT40 channel center that matches HT20 */ + flags = (flags &~ IEEE80211_CHAN_HT40) | IEEE80211_CHAN_HT20; + } + if (chanlookup(avail->ic_chans, avail->ic_nchans, freq, flags) != NULL) + return 1; + if (flags & IEEE80211_CHAN_GSM) { + /* + * XXX GSM frequency mapping is handled in the kernel + * so we cannot find them in the calibration table; + * just accept the channel and the kernel will reject + * the channel list if it's wrong. + */ + return 1; + } + /* + * If this is a 1/2 or 1/4 width channel allow it if a full + * width channel is present for this frequency, and the device + * supports fractional channels on this band. This is a hack + * that avoids bloating the calibration table; it may be better + * by per-band attributes though (we are effectively calculating + * this attribute by scanning the channel list ourself). + */ + if ((flags & (IEEE80211_CHAN_HALF | IEEE80211_CHAN_QUARTER)) == 0) + return 0; + if (chanlookup(avail->ic_chans, avail->ic_nchans, freq, + flags &~ (IEEE80211_CHAN_HALF | IEEE80211_CHAN_QUARTER)) == NULL) + return 0; + if (flags & IEEE80211_CHAN_HALF) { + return chanfind(avail->ic_chans, avail->ic_nchans, + IEEE80211_CHAN_HALF | + (flags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ))); + } else { + return chanfind(avail->ic_chans, avail->ic_nchans, + IEEE80211_CHAN_QUARTER | + (flags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ))); + } +} + static void regdomain_addchans(struct ieee80211req_chaninfo *ci, const netband_head *bands, @@ -1812,15 +1859,12 @@ regdomain_addchans(struct ieee80211req_c const struct netband *nb; const struct freqband *b; struct ieee80211_channel *c, *prev; - int freq, channelSep, hasHalfChans, hasQuarterChans; + int freq, hi_adj, lo_adj, channelSep; + uint32_t flags; + hi_adj = (chanFlags & IEEE80211_CHAN_HT40U) ? -20 : 0; + lo_adj = (chanFlags & IEEE80211_CHAN_HT40D) ? 20 : 0; channelSep = (chanFlags & IEEE80211_CHAN_2GHZ) ? 0 : 40; - hasHalfChans = chanfind(avail->ic_chans, avail->ic_nchans, - IEEE80211_CHAN_HALF | - (chanFlags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ))); - hasQuarterChans = chanfind(avail->ic_chans, avail->ic_nchans, - IEEE80211_CHAN_QUARTER | - (chanFlags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ))); LIST_FOREACH(nb, bands, next) { b = nb->band; if (verbose) { @@ -1831,63 +1875,80 @@ regdomain_addchans(struct ieee80211req_c putchar('\n'); } prev = NULL; - for (freq = b->freqStart; freq <= b->freqEnd; freq += b->chanSep) { - uint32_t flags = nb->flags | b->flags; - - /* check if device can operate on this frequency */ + for (freq = b->freqStart + lo_adj; + freq <= b->freqEnd + hi_adj; freq += b->chanSep) { + /* + * Construct flags for the new channel. We take + * the attributes from the band descriptions except + * for HT40 which is enabled generically (i.e. +/- + * extension channel) in the band description and + * then constrained according by channel separation. + */ + flags = nb->flags | b->flags; + if (flags & IEEE80211_CHAN_HT) { + /* + * HT channels are generated specially; we're + * called to add HT20, HT40+, and HT40- chan's + * so we need to expand only band specs for + * the HT channel type being added. + */ + if ((chanFlags & IEEE80211_CHAN_HT20) && + (flags & IEEE80211_CHAN_HT20) == 0) { + if (verbose) + printf("%u: skip, not an " + "HT20 channel\n", freq); + continue; + } + if ((chanFlags & IEEE80211_CHAN_HT40) && + (flags & IEEE80211_CHAN_HT40) == 0) { + if (verbose) + printf("%u: skip, not an " + "HT40 channel\n", freq); + continue; + } + /* + * DFS and HT40 don't mix. This should be + * expressed in the regdomain database but + * just in case enforce it here. + */ + if ((chanFlags & IEEE80211_CHAN_HT40) && + (flags & IEEE80211_CHAN_DFS)) { + if (verbose) + printf("%u: skip, HT40+DFS " + "not permitted\n", freq); + continue; + } + /* NB: HT attribute comes from caller */ + flags &= ~IEEE80211_CHAN_HT; + flags |= chanFlags & IEEE80211_CHAN_HT; + } /* - * XXX GSM frequency mapping is handled in the kernel - * so we cannot find them in the calibration table; - * just construct the list and the kernel will reject - * if it's wrong. + * Check if device can operate on this frequency. */ - if (chanlookup(avail->ic_chans, avail->ic_nchans, freq, chanFlags) == NULL && - (flags & IEEE80211_CHAN_GSM) == 0) { + if (!checkchan(avail, freq, flags)) { if (verbose) { printf("%u: skip, ", freq); - printb("flags", chanFlags, + printb("flags", flags, IEEE80211_CHAN_BITS); printf(" not available\n"); } continue; } - if ((flags & IEEE80211_CHAN_HALF) && !hasHalfChans) { + if ((flags & REQ_ECM) && !reg->ecm) { if (verbose) - printf("%u: skip, device does not " - "support half-rate channel\n", - freq); + printf("%u: skip, ECM channel\n", freq); continue; } - if ((flags & IEEE80211_CHAN_QUARTER) && - !hasQuarterChans) { + if ((flags & REQ_INDOOR) && reg->location == 'O') { if (verbose) - printf("%u: skip, device does not " - "support quarter-rate channel\n", + printf("%u: skip, indoor channel\n", freq); continue; } - if ((flags & IEEE80211_CHAN_HT20) && - (chanFlags & IEEE80211_CHAN_HT20) == 0) { - if (verbose) - printf("%u: skip, device does not " - "support HT20 operation\n", freq); - continue; - } - if ((flags & IEEE80211_CHAN_HT40) && - (chanFlags & IEEE80211_CHAN_HT40) == 0) { - if (verbose) - printf("%u: skip, device does not " - "support HT40 operation\n", freq); - continue; - } - if ((flags & REQ_ECM) && !reg->ecm) { - if (verbose) - printf("%u: skip, ECM channel\n", freq); - continue; - } if ((flags & REQ_OUTDOOR) && reg->location == 'I') { if (verbose) - printf("%u: skip, outdoor channel\n", freq); + printf("%u: skip, outdoor channel\n", + freq); continue; } if ((flags & IEEE80211_CHAN_HT40) && @@ -1907,8 +1968,7 @@ regdomain_addchans(struct ieee80211req_c c = &ci->ic_chans[ci->ic_nchans++]; memset(c, 0, sizeof(*c)); c->ic_freq = freq; - c->ic_flags = chanFlags | - (flags &~ (REQ_FLAGS | IEEE80211_CHAN_HT40)); + c->ic_flags = flags; if (c->ic_flags & IEEE80211_CHAN_DFS) c->ic_maxregpower = nb->maxPowerDFS; else @@ -1973,27 +2033,31 @@ regdomain_makechannels( if (!LIST_EMPTY(&rd->bands_11a)) regdomain_addchans(ci, &rd->bands_11a, reg, IEEE80211_CHAN_A, &dc->dc_chaninfo); - if (!LIST_EMPTY(&rd->bands_11na)) { + if (!LIST_EMPTY(&rd->bands_11na) && dc->dc_htcaps != 0) { regdomain_addchans(ci, &rd->bands_11na, reg, IEEE80211_CHAN_A | IEEE80211_CHAN_HT20, &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11na, reg, - IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U, - &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11na, reg, - IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D, - &dc->dc_chaninfo); + if (dc->dc_htcaps & IEEE80211_HTCAP_CHWIDTH40) { + regdomain_addchans(ci, &rd->bands_11na, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U, + &dc->dc_chaninfo); + regdomain_addchans(ci, &rd->bands_11na, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D, + &dc->dc_chaninfo); + } } - if (!LIST_EMPTY(&rd->bands_11ng)) { + if (!LIST_EMPTY(&rd->bands_11ng) && dc->dc_htcaps != 0) { regdomain_addchans(ci, &rd->bands_11ng, reg, IEEE80211_CHAN_G | IEEE80211_CHAN_HT20, &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11ng, reg, - IEEE80211_CHAN_G | IEEE80211_CHAN_HT40U, - &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11ng, reg, - IEEE80211_CHAN_G | IEEE80211_CHAN_HT40D, - &dc->dc_chaninfo); + if (dc->dc_htcaps & IEEE80211_HTCAP_CHWIDTH40) { + regdomain_addchans(ci, &rd->bands_11ng, reg, + IEEE80211_CHAN_G | IEEE80211_CHAN_HT40U, + &dc->dc_chaninfo); + regdomain_addchans(ci, &rd->bands_11ng, reg, + IEEE80211_CHAN_G | IEEE80211_CHAN_HT40D, + &dc->dc_chaninfo); + } } qsort(ci->ic_chans, ci->ic_nchans, sizeof(ci->ic_chans[0]), regdomain_sort); Modified: projects/vap7/sbin/ifconfig/regdomain.c ============================================================================== --- projects/vap7/sbin/ifconfig/regdomain.c Sat Feb 7 01:50:43 2009 (r188261) +++ projects/vap7/sbin/ifconfig/regdomain.c Sat Feb 7 01:51:22 2009 (r188262) @@ -208,6 +208,9 @@ decode_flag(struct mystate *mt, const ch FLAG(IEEE80211_CHAN_108A), FLAG(IEEE80211_CHAN_108G), #undef FLAG + { "ECM", 3, REQ_ECM }, + { "INDOOR", 6, REQ_INDOOR }, + { "OUTDOOR", 7, REQ_OUTDOOR }, }; int i; Modified: projects/vap7/sbin/ifconfig/regdomain.h ============================================================================== --- projects/vap7/sbin/ifconfig/regdomain.h Sat Feb 7 01:50:43 2009 (r188261) +++ projects/vap7/sbin/ifconfig/regdomain.h Sat Feb 7 01:51:22 2009 (r188262) @@ -45,6 +45,13 @@ struct freqband { LIST_ENTRY(freqband) next; }; +/* private flags, don't pass to os */ +#define REQ_ECM 0x1 /* enable if ECM set */ +#define REQ_INDOOR 0x2 /* enable only for indoor operation */ +#define REQ_OUTDOOR 0x4 /* enable only for outdoor operation */ + +#define REQ_FLAGS (REQ_ECM|REQ_INDOOR|REQ_OUTDOOR) + struct netband { const struct freqband *band; /* channel list description */ uint8_t maxPower; /* regulatory cap on tx power (dBm) */ From owner-svn-src-projects@FreeBSD.ORG Sat Feb 7 01:59:35 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06F06106566B; Sat, 7 Feb 2009 01:59:35 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD6C18FC0A; Sat, 7 Feb 2009 01:59:34 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n171xYsX077889; Sat, 7 Feb 2009 01:59:34 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n171xYOe077888; Sat, 7 Feb 2009 01:59:34 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902070159.n171xYOe077888@svn.freebsd.org> From: Sam Leffler Date: Sat, 7 Feb 2009 01:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188265 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2009 01:59:35 -0000 Author: sam Date: Sat Feb 7 01:59:34 2009 New Revision: 188265 URL: http://svn.freebsd.org/changeset/base/188265 Log: merge r188263,r188264 Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) Modified: projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c Sat Feb 7 01:54:57 2009 (r188264) +++ projects/vap7/sys/dev/ath/ath_hal/ah_regdomain.c Sat Feb 7 01:59:34 2009 (r188265) @@ -74,6 +74,11 @@ typedef uint64_t chanbmask_t[BMLEN]; W0(_fg) | W0(_fh) , \ W1(_fa) | W1(_fb) | W1(_fc) | W1(_fd) | W1(_fe) | W1(_ff) | \ W1(_fg) | W1(_fh) } +#define BM9(_fa, _fb, _fc, _fd, _fe, _ff, _fg, _fh, _fi) \ + { W0(_fa) | W0(_fb) | W0(_fc) | W0(_fd) | W0(_fe) | W0(_ff) | \ + W0(_fg) | W0(_fh) | W0(_fi) , \ + W1(_fa) | W1(_fb) | W1(_fc) | W1(_fd) | W1(_fe) | W1(_ff) | \ + W1(_fg) | W1(_fh) | W1(_fi) } /* * Mask to check whether a domain is a multidomain or a single domain @@ -1701,16 +1706,16 @@ static const struct cmode modes[] = { IEEE80211_CHAN_G | IEEE80211_CHAN_QUARTER }, { HAL_MODE_11G_HALF_RATE, IEEE80211_CHAN_G | IEEE80211_CHAN_HALF }, - { HAL_MODE_11NG_HT20, IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_HT20 }, + { HAL_MODE_11NG_HT20, IEEE80211_CHAN_G | IEEE80211_CHAN_HT20 }, { HAL_MODE_11NG_HT40PLUS, - IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_HT40U }, + IEEE80211_CHAN_G | IEEE80211_CHAN_HT40U }, { HAL_MODE_11NG_HT40MINUS, - IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_HT40D }, - { HAL_MODE_11NA_HT20, IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_HT20 }, + IEEE80211_CHAN_G | IEEE80211_CHAN_HT40D }, + { HAL_MODE_11NA_HT20, IEEE80211_CHAN_A | IEEE80211_CHAN_HT20 }, { HAL_MODE_11NA_HT40PLUS, - IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_HT40U }, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U }, { HAL_MODE_11NA_HT40MINUS, - IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_HT40D }, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D }, }; static OS_INLINE uint16_t From owner-svn-src-projects@FreeBSD.ORG Sat Feb 7 05:38:20 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFCF7106566C; Sat, 7 Feb 2009 05:38:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC6B48FC0A; Sat, 7 Feb 2009 05:38:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n175cKxj082277; Sat, 7 Feb 2009 05:38:20 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n175cKbH082276; Sat, 7 Feb 2009 05:38:20 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902070538.n175cKbH082276@svn.freebsd.org> From: Sam Leffler Date: Sat, 7 Feb 2009 05:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188270 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2009 05:38:21 -0000 Author: sam Date: Sat Feb 7 05:38:20 2009 New Revision: 188270 URL: http://svn.freebsd.org/changeset/base/188270 Log: merge r188267-188268: expand CFI_ARMEDANDDANGEROUS to cover writing the user segment of the PR Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cfi/cfi_core.c projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) Modified: projects/vap7/sys/dev/cfi/cfi_core.c ============================================================================== --- projects/vap7/sys/dev/cfi/cfi_core.c Sat Feb 7 05:34:41 2009 (r188269) +++ projects/vap7/sys/dev/cfi/cfi_core.c Sat Feb 7 05:38:20 2009 (r188270) @@ -438,9 +438,9 @@ cfi_write_block(struct cfi_softc *sc) * used for security. There are two 64-bit segments; one is programmed * at the factory with a unique 64-bit number which is immutable. * The other segment is left blank for User (OEM) programming. - * Once the User/OEM segment is programmed it can be locked - * to prevent future programming by writing bit 0 of the Protection - * Lock Register (PLR). The PLR can written only once. + * The User/OEM segment is One Time Programmable (OTP). It can also + * be locked to prevent any firther writes by setting bit 0 of the + * Protection Lock Register (PLR). The PLR can written only once. */ static uint16_t @@ -450,11 +450,13 @@ cfi_get16(struct cfi_softc *sc, int off) return v; } +#ifdef CFI_ARMEDANDDANGEROUS static void cfi_put16(struct cfi_softc *sc, int off, uint16_t v) { bus_space_write_2(sc->sc_tag, sc->sc_handle, off<<1, v); } +#endif /* * Read the factory-defined 64-bit segment of the PR. @@ -496,17 +498,21 @@ cfi_intel_get_oem_pr(struct cfi_softc *s /* * Write the User/OEM 64-bit segment of the PR. + * XXX should allow writing individual words/bytes */ int cfi_intel_set_oem_pr(struct cfi_softc *sc, uint64_t id) { +#ifdef CFI_ARMEDANDDANGEROUS register_t intr; int i, error; +#endif if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) return EOPNOTSUPP; KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); +#ifdef CFI_ARMEDANDDANGEROUS for (i = 7; i >= 4; i--, id >>= 16) { intr = intr_disable(); cfi_write(sc, 0, CFI_INTEL_PP_SETUP); @@ -519,6 +525,11 @@ cfi_intel_set_oem_pr(struct cfi_softc *s } cfi_write(sc, 0, CFI_BCS_READ_ARRAY); return error; +#else + device_printf(sc->sc_dev, "%s: OEM PR not set, " + "CFI_ARMEDANDDANGEROUS not configured\n", __func__); + return ENXIO; +#endif } /* @@ -547,9 +558,8 @@ cfi_intel_set_plr(struct cfi_softc *sc) { #ifdef CFI_ARMEDANDDANGEROUS register_t intr; -#endif int error; - +#endif if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) return EOPNOTSUPP; KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width)); @@ -563,11 +573,11 @@ cfi_intel_set_plr(struct cfi_softc *sc) intr_restore(intr); error = cfi_wait_ready(sc, CFI_BCS_READ_STATUS, sc->sc_write_timeout); cfi_write(sc, 0, CFI_BCS_READ_ARRAY); + return error; #else device_printf(sc->sc_dev, "%s: PLR not set, " "CFI_ARMEDANDDANGEROUS not configured\n", __func__); - error = ENXIO; + return ENXIO; #endif - return error; } #endif /* CFI_SUPPORT_STRATAFLASH */ From owner-svn-src-projects@FreeBSD.ORG Sat Feb 7 05:39:06 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3693C1065680; Sat, 7 Feb 2009 05:39:06 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 236768FC1A; Sat, 7 Feb 2009 05:39:06 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n175d6TE082344; Sat, 7 Feb 2009 05:39:06 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n175d5N3082342; Sat, 7 Feb 2009 05:39:05 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902070539.n175d5N3082342@svn.freebsd.org> From: Sam Leffler Date: Sat, 7 Feb 2009 05:39:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188271 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2009 05:39:06 -0000 Author: sam Date: Sat Feb 7 05:39:05 2009 New Revision: 188271 URL: http://svn.freebsd.org/changeset/base/188271 Log: merge r188269: count stuck beacon events Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/ath/if_ath.c projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) Modified: projects/vap7/sys/dev/ath/if_ath.c ============================================================================== --- projects/vap7/sys/dev/ath/if_ath.c Sat Feb 7 05:38:20 2009 (r188270) +++ projects/vap7/sys/dev/ath/if_ath.c Sat Feb 7 05:39:05 2009 (r188271) @@ -3343,6 +3343,7 @@ ath_bstuck_proc(void *arg, int pending) if_printf(ifp, "stuck beacon; resetting (bmiss count %u)\n", sc->sc_bmisscount); + sc->sc_stats.ast_bstuck++; ath_reset(ifp); }