From owner-svn-src-stable@FreeBSD.ORG Sun Mar 13 09:36:52 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9203C1065670; Sun, 13 Mar 2011 09:36:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EF268FC08; Sun, 13 Mar 2011 09:36:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2D9aq8n048596; Sun, 13 Mar 2011 09:36:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2D9aqKI048594; Sun, 13 Mar 2011 09:36:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103130936.p2D9aqKI048594@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 Mar 2011 09:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219594 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2011 09:36:52 -0000 Author: kib Date: Sun Mar 13 09:36:52 2011 New Revision: 219594 URL: http://svn.freebsd.org/changeset/base/219594 Log: MFC r219352: The execution of the shebang script requires putting interpreter path, possible option and script path in the place of argv[0] supplied to execve(2). It is possible and valid for the substitution to be shorter then the argv[0]. Avoid signed underflow in this case. PR: kern/155321 Modified: stable/8/sys/kern/imgact_shell.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/imgact_shell.c ============================================================================== --- stable/8/sys/kern/imgact_shell.c Sun Mar 13 08:59:46 2011 (r219593) +++ stable/8/sys/kern/imgact_shell.c Sun Mar 13 09:36:52 2011 (r219594) @@ -191,7 +191,7 @@ exec_shell_imgact(imgp) length = (imgp->args->argc == 0) ? 0 : strlen(imgp->args->begin_argv) + 1; /* bytes to delete */ - if (offset - length > imgp->args->stringspace) { + if (offset > imgp->args->stringspace + length) { if (sname != NULL) sbuf_delete(sname); return (E2BIG); From owner-svn-src-stable@FreeBSD.ORG Sun Mar 13 10:08:02 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 668AF106564A; Sun, 13 Mar 2011 10:08:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53C318FC08; Sun, 13 Mar 2011 10:08:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2DA82Dx049262; Sun, 13 Mar 2011 10:08:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2DA82xf049260; Sun, 13 Mar 2011 10:08:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103131008.p2DA82xf049260@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 Mar 2011 10:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219595 - stable/7/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2011 10:08:02 -0000 Author: kib Date: Sun Mar 13 10:08:02 2011 New Revision: 219595 URL: http://svn.freebsd.org/changeset/base/219595 Log: MFC r219352: The execution of the shebang script requires putting interpreter path, possible option and script path in the place of argv[0] supplied to execve(2). It is possible and valid for the substitution to be shorter then the argv[0]. Avoid signed underflow in this case. PR: kern/155321 Modified: stable/7/sys/kern/imgact_shell.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/imgact_shell.c ============================================================================== --- stable/7/sys/kern/imgact_shell.c Sun Mar 13 09:36:52 2011 (r219594) +++ stable/7/sys/kern/imgact_shell.c Sun Mar 13 10:08:02 2011 (r219595) @@ -179,7 +179,7 @@ exec_shell_imgact(imgp) length = (imgp->args->argc == 0) ? 0 : strlen(imgp->args->begin_argv) + 1; /* bytes to delete */ - if (offset - length > imgp->args->stringspace) + if (offset > imgp->args->stringspace + length) { return (E2BIG); bcopy(imgp->args->begin_argv + length, imgp->args->begin_argv + offset, From owner-svn-src-stable@FreeBSD.ORG Sun Mar 13 13:37:23 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95AD21065670; Sun, 13 Mar 2011 13:37:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 841A48FC15; Sun, 13 Mar 2011 13:37:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2DDbNNe056167; Sun, 13 Mar 2011 13:37:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2DDbN0e056165; Sun, 13 Mar 2011 13:37:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103131337.p2DDbN0e056165@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 Mar 2011 13:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219607 - stable/7/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2011 13:37:23 -0000 Author: kib Date: Sun Mar 13 13:37:23 2011 New Revision: 219607 URL: http://svn.freebsd.org/changeset/base/219607 Log: Fix mismerge. Pointy hat to: kib Modified: stable/7/sys/kern/imgact_shell.c Modified: stable/7/sys/kern/imgact_shell.c ============================================================================== --- stable/7/sys/kern/imgact_shell.c Sun Mar 13 13:05:50 2011 (r219606) +++ stable/7/sys/kern/imgact_shell.c Sun Mar 13 13:37:23 2011 (r219607) @@ -179,7 +179,7 @@ exec_shell_imgact(imgp) length = (imgp->args->argc == 0) ? 0 : strlen(imgp->args->begin_argv) + 1; /* bytes to delete */ - if (offset > imgp->args->stringspace + length) { + if (offset > imgp->args->stringspace + length) return (E2BIG); bcopy(imgp->args->begin_argv + length, imgp->args->begin_argv + offset, From owner-svn-src-stable@FreeBSD.ORG Mon Mar 14 09:50:14 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF3BF106566B; Mon, 14 Mar 2011 09:50:14 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B96128FC24; Mon, 14 Mar 2011 09:50:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2E9oE0a084191; Mon, 14 Mar 2011 09:50:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2E9oEm4084178; Mon, 14 Mar 2011 09:50:14 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201103140950.p2E9oEm4084178@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 14 Mar 2011 09:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219633 - in stable/8: share/man/man4 sys/conf sys/dev/cxgbe sys/dev/cxgbe/common sys/modules sys/modules/cxgbe usr.sbin/sysinstall X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2011 09:50:14 -0000 Author: np Date: Mon Mar 14 09:50:14 2011 New Revision: 219633 URL: http://svn.freebsd.org/changeset/base/219633 Log: MFC cxgbe(4) and fixes. r218792: cxgbe(4) - NIC driver for Chelsio T4 (Terminator 4) based 10Gb/1Gb adapters. r219285: Fix incorrect assertion. r219286: Resume tx immediately in response to an SGE egress update from the hardware. r219287: Upgrade the firmware on the card automatically if a better version is available. Downgrade only for a major version mismatch. r219288: A txpkts work request should have a valid FID. r219289: Store the ifnet rather than the port_info in each txq and rxq struct. r219290: Tweaks for rx: - everything related to LRO should be in #ifdef INET blocks - reorder sge_iq's fields so that the most frequently used are all together - pull all rx code into t4_intr_data directly - let go of the ingress queue lock when passing up data - refill the freelist only if it is short of at least 32 buffers r219292: Calculate how many descriptors can be reclaimed before calling reclaim_tx_descs r219293: There is no need to hold an ingress queue's lock while processing its descriptors r219299: Be sure to stay within the bounds of the mod_str array when displaying the transceiver type. r219392: cxgbe shouldn't directly know of the UMA zones where network buffers come from. r219436: Display holdoff timers and packet counts as a list of numbers. Added: stable/8/share/man/man4/cxgbe.4 - copied unchanged from r218792, head/share/man/man4/cxgbe.4 stable/8/sys/dev/cxgbe/ - copied from r218792, head/sys/dev/cxgbe/ stable/8/sys/modules/cxgbe/ - copied from r218792, head/sys/modules/cxgbe/ Modified: stable/8/share/man/man4/Makefile stable/8/share/man/man4/altq.4 stable/8/share/man/man4/vlan.4 stable/8/sys/conf/NOTES stable/8/sys/conf/files stable/8/sys/conf/kern.pre.mk stable/8/sys/dev/cxgbe/adapter.h stable/8/sys/dev/cxgbe/common/common.h stable/8/sys/dev/cxgbe/t4_main.c stable/8/sys/dev/cxgbe/t4_sge.c stable/8/sys/modules/Makefile stable/8/usr.sbin/sysinstall/devices.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Mon Mar 14 05:29:45 2011 (r219632) +++ stable/8/share/man/man4/Makefile Mon Mar 14 09:50:14 2011 (r219633) @@ -81,6 +81,7 @@ MAN= aac.4 \ crypto.4 \ cue.4 \ cxgb.4 \ + cxgbe.4 \ cy.4 \ da.4 \ dc.4 \ Modified: stable/8/share/man/man4/altq.4 ============================================================================== --- stable/8/share/man/man4/altq.4 Mon Mar 14 05:29:45 2011 (r219632) +++ stable/8/share/man/man4/altq.4 Mon Mar 14 09:50:14 2011 (r219633) @@ -127,6 +127,7 @@ They have been applied to the following .Xr bfe 4 , .Xr bge 4 , .Xr cas 4 , +.Xr cxgbe 4 , .Xr dc 4 , .Xr de 4 , .Xr ed 4 , Copied: stable/8/share/man/man4/cxgbe.4 (from r218792, head/share/man/man4/cxgbe.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/cxgbe.4 Mon Mar 14 09:50:14 2011 (r219633, copy of r218792, head/share/man/man4/cxgbe.4) @@ -0,0 +1,167 @@ +.\" Copyright (c) 2011, Chelsio 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 Chelsio Inc nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.\" $FreeBSD$ +.\" +.Dd February 14, 2011 +.Dt CXGBE 4 +.Os +.Sh NAME +.Nm cxgbe +.Nd "Chelsio T4 10Gb and 1Gb Ethernet adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device cxgbe" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_cxgbe_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for PCI Express Ethernet adapters based on +the Chelsio Terminator 4 (T4) ASIC. +The driver supprts Jumbo Frames, Transmit/Receive checksum offload, +TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN +tag insertion/extraction, VLAN checksum offload, VLAN TSO, and +Receive Side Steering (RSS). + +For further hardware information and questions related to hardware +requirements, see +.Pa http://www.chelsio.com/ . +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC: +.Pp +.Bl -bullet -compact +.It +Chelsio T420-CR +.It +Chelsio T422-CR +.It +Chelsio T440-CR +.It +Chelsio T420-BCH +.It +Chelsio T440-BCH +.It +Chelsio T440-CH +.It +Chelsio T420-SO +.It +Chelsio T420-CX +.It +Chelsio T420-BT +.It +Chelsio T404-BT +.El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.cxgbe.max_ntxq_10G_port +The maximum number of tx queues to use for a 10Gb port. +The default value is 8. +.It Va hw.cxgbe.max_nrxq_10G_port +The maximum number of rx queues to use for a 10Gb port. +The default value is 8. +.It Va hw.cxgbe.max_ntxq_1G_port +The maximum number of tx queues to use for a 1Gb port. +The default value is 2. +.It Va hw.cxgbe.max_nrxq_1G_port +The maximum number of rx queues to use for a 1Gb port. +The default value is 2. +.It Va hw.cxgbe.holdoff_timer_idx_10G +.It Va hw.cxgbe.holdoff_timer_idx_1G +The timer index value to use to delay interrupts. +The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 +by default (all values are in microseconds) and the index selects a +value from this list. +The default value is 1 for both 10Gb and 1Gb ports, which means the +timer value is 5us. +.It Va hw.cxgbe.holdoff_pktc_idx_10G +.It Va hw.cxgbe.holdoff_pktc_idx_1G +The packet-count index value to use to delay interrupts. +The packet-count list has the values 1, 8, 16, and 32 by default +and the index selects a value from this list. +The default value is 2 for both 10Gb and 1Gb ports, which means 16 +packets (or the holdoff timer going off) before an interrupt is +generated. +.It Va hw.cxgbe.qsize_txq +The size, in number of entries, of the descriptor ring used for a tx +queue. +A buf_ring of the same size is also allocated for additional +software queuing. See +.Xr ifnet 9 . +The default value is 1024. +.It Va hw.cxgbe.qsize_rxq +The size, in number of entries, of the descriptor ring used for an +rx queue. +The default value is 1024. +.Sh SUPPORT +For general information and support, +go to the Chelsio support website at: +.Pa http://www.chelsio.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq support@chelsio.com . +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr cxgb 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 9.0 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Navdeep Parhar Aq np@FreeBSD.org . Modified: stable/8/share/man/man4/vlan.4 ============================================================================== --- stable/8/share/man/man4/vlan.4 Mon Mar 14 05:29:45 2011 (r219632) +++ stable/8/share/man/man4/vlan.4 Mon Mar 14 09:50:14 2011 (r219633) @@ -128,6 +128,7 @@ in the hardware is limited to the follow .Xr bce 4 , .Xr bge 4 , .Xr cxgb 4 , +.Xr cxgbe 4 , .Xr em 4 , .Xr igb 4 , .Xr ixgb 4 , Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Mon Mar 14 05:29:45 2011 (r219632) +++ stable/8/sys/conf/NOTES Mon Mar 14 09:50:14 2011 (r219633) @@ -1877,6 +1877,8 @@ device xmphy # XaQti XMAC II # cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn # cm: Arcnet SMC COM90c26 / SMC COM90c56 # (and SMC COM90c66 in '56 compatibility mode) adapters. +# cxgbe: Support for PCI express 10Gb/1Gb adapters based on the Chelsio T4 +# (Terminator 4) ASIC. # dc: Support for PCI fast ethernet adapters based on the DEC/Intel 21143 # and various workalikes including: # the ADMtek AL981 Comet and AN985 Centaur, the ASIX Electronics @@ -2048,6 +2050,7 @@ device xl # 3Com 3c90x (``Boomerang'', # PCI Ethernet NICs. device bwi # Broadcom BCM430* BCM431* +device cxgbe # Chelsio T4 10GbE PCIe adapter device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel Pro/1000 Gigabit Ethernet device igb # Intel Pro/1000 PCIE Gigabit Ethernet Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Mon Mar 14 05:29:45 2011 (r219632) +++ stable/8/sys/conf/files Mon Mar 14 09:50:14 2011 (r219633) @@ -822,6 +822,12 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgbe/t4_main.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/t4_sge.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/common/t4_hw.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci Modified: stable/8/sys/conf/kern.pre.mk ============================================================================== --- stable/8/sys/conf/kern.pre.mk Mon Mar 14 05:29:45 2011 (r219632) +++ stable/8/sys/conf/kern.pre.mk Mon Mar 14 09:50:14 2011 (r219633) @@ -79,8 +79,8 @@ INCLUDES+= -I$S/dev/twa # ... and XFS INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs -# ... and the same for cxgb -INCLUDES+= -I$S/dev/cxgb +# ... and the same for cxgb and cxgbe +INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe .endif Modified: stable/8/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Fri Feb 18 08:00:26 2011 (r218792) +++ stable/8/sys/dev/cxgbe/adapter.h Mon Mar 14 09:50:14 2011 (r219633) @@ -70,8 +70,8 @@ static __inline uint64_t t4_bus_space_read_8(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t offset) { - KASSERT(tag == X86_BUS_SPACE_IO, - ("64-bit reads from I/O space not possible.")); + KASSERT(tag == AMD64_BUS_SPACE_MEM, + ("%s: can only handle mem space", __func__)); return (*(volatile uint64_t *)(handle + offset)); } @@ -80,8 +80,9 @@ static __inline void t4_bus_space_write_8(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, uint64_t value) { - KASSERT(tag == X86_BUS_SPACE_IO, - ("64-bit writes to I/O space not possible.")); + KASSERT(tag == AMD64_BUS_SPACE_MEM, + ("%s: can only handle mem space", __func__)); + *(volatile uint64_t *)(bsh + offset) = value; } #else @@ -114,7 +115,11 @@ enum { RX_FL_ESIZE = 64, /* 8 64bit addresses */ - FL_BUF_SIZES = 4, +#if MJUMPAGESIZE != MCLBYTES + FL_BUF_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */ +#else + FL_BUF_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ +#endif TX_EQ_QSIZE = 1024, TX_EQ_ESIZE = 64, @@ -176,6 +181,7 @@ struct port_info { struct link_config link_cfg; struct port_stats stats; + struct taskqueue *tq; struct callout tick; struct sysctl_ctx_list ctx; /* lives from ifconfig up to down */ struct sysctl_oid *oid_rxq; @@ -222,24 +228,25 @@ enum { struct sge_iq { bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; - struct mtx iq_lock; + bus_addr_t ba; /* bus address of descriptor ring */ char lockname[16]; - unsigned int flags; - struct adapter *adapter; + uint32_t flags; + uint16_t abs_id; /* absolute SGE id for the iq */ + int8_t intr_pktc_idx; /* packet count threshold index */ + int8_t pad0; + iq_intr_handler_t *handler; + __be64 *desc; /* KVA of descriptor ring */ - __be64 *desc; /* KVA of descriptor ring */ - bus_addr_t ba; /* bus address of descriptor ring */ + struct mtx iq_lock; + struct adapter *adapter; const __be64 *cdesc; /* current descriptor */ uint8_t gen; /* generation bit */ uint8_t intr_params; /* interrupt holdoff parameters */ - int8_t intr_pktc_idx; /* packet count threshold index */ uint8_t intr_next; /* holdoff for next interrupt */ uint8_t esize; /* size (bytes) of each entry in the queue */ uint16_t qsize; /* size (# of entries) of the queue */ uint16_t cidx; /* consumer index */ uint16_t cntxt_id; /* SGE context id for the iq */ - uint16_t abs_id; /* absolute SGE id for the iq */ - iq_intr_handler_t *handler; }; enum { @@ -274,6 +281,7 @@ struct sge_eq { uint16_t cidx; /* consumer idx (desc idx) */ uint16_t pidx; /* producer idx (desc idx) */ uint16_t pending; /* # of descriptors used since last doorbell */ + uint16_t iqid; /* iq that gets egr_update for the eq */ uint32_t cntxt_id; /* SGE context id for the eq */ /* DMA maps used for tx */ @@ -309,6 +317,9 @@ struct sge_fl { struct sge_txq { struct sge_eq eq; /* MUST be first */ struct mbuf *m; /* held up due to temporary resource shortage */ + struct task resume_tx; + + struct ifnet *ifp; /* the interface this txq belongs to */ /* stats for common events first */ @@ -336,9 +347,11 @@ struct sge_rxq { struct sge_iq iq; /* MUST be first */ struct sge_fl fl; + struct ifnet *ifp; /* the interface this rxq belongs to */ unsigned int flags; - struct port_info *port; /* the port this rxq belongs to */ +#ifdef INET struct lro_ctrl lro; /* LRO state */ +#endif /* stats for common events first */ @@ -544,13 +557,16 @@ static inline bool is_10G_port(const str return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) != 0); } +/* t4_main.c */ +void cxgbe_txq_start(void *, int); int t4_os_find_pci_capability(struct adapter *, int); int t4_os_pci_save_state(struct adapter *); int t4_os_pci_restore_state(struct adapter *); - void t4_os_portmod_changed(const struct adapter *, int); void t4_os_link_changed(struct adapter *, int, int); +/* t4_sge.c */ +void t4_sge_modload(void); void t4_sge_init(struct adapter *); int t4_create_dma_tag(struct adapter *); int t4_destroy_dma_tag(struct adapter *); Modified: stable/8/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Fri Feb 18 08:00:26 2011 (r218792) +++ stable/8/sys/dev/cxgbe/common/common.h Mon Mar 14 09:50:14 2011 (r219633) @@ -53,8 +53,8 @@ enum { }; #define FW_VERSION_MAJOR 1 -#define FW_VERSION_MINOR 2 -#define FW_VERSION_MICRO 65 +#define FW_VERSION_MINOR 3 +#define FW_VERSION_MICRO 0 struct port_stats { u64 tx_octets; /* total # of octets in good frames */ Modified: stable/8/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Feb 18 08:00:26 2011 (r218792) +++ stable/8/sys/dev/cxgbe/t4_main.c Mon Mar 14 09:50:14 2011 (r219633) @@ -36,11 +36,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include #include @@ -269,12 +273,14 @@ static void t4_get_regs(struct adapter * static void cxgbe_tick(void *); static int t4_sysctls(struct adapter *); static int cxgbe_sysctls(struct port_info *); +static int sysctl_int_array(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_txq(SYSCTL_HANDLER_ARGS); static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS); - +static inline void txq_start(struct ifnet *, struct sge_txq *); +static int t4_mod_event(module_t, int, void *); struct t4_pciids { uint16_t device; @@ -692,6 +698,15 @@ cxgbe_attach(device_t dev) ifp->if_softc = pi; callout_init(&pi->tick, CALLOUT_MPSAFE); + pi->tq = taskqueue_create("cxgbe_taskq", M_NOWAIT, + taskqueue_thread_enqueue, &pi->tq); + if (pi->tq == NULL) { + device_printf(dev, "failed to allocate port task queue\n"); + if_free(pi->ifp); + return (ENOMEM); + } + taskqueue_start_threads(&pi->tq, 1, PI_NET, "%s taskq", + device_get_nameunit(dev)); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; @@ -746,6 +761,8 @@ cxgbe_detach(device_t dev) if (rc != 0) device_printf(dev, "port uninit failed: %d.\n", rc); + taskqueue_free(pi->tq); + ifmedia_removeall(&pi->media); ether_ifdetach(pi->ifp); if_free(pi->ifp); @@ -951,13 +968,7 @@ cxgbe_start(struct ifnet *ifp) for_each_txq(pi, i, txq) { if (TXQ_TRYLOCK(txq)) { - struct buf_ring *br = txq->eq.br; - struct mbuf *m; - - m = txq->m ? txq->m : drbr_dequeue(ifp, br); - if (m) - t4_eth_tx(ifp, txq, m); - + txq_start(ifp, txq); TXQ_UNLOCK(txq); } } @@ -1247,28 +1258,69 @@ prep_firmware(struct adapter *sc) /* Check firmware version and install a different one if necessary */ rc = t4_check_fw_version(sc); if (rc != 0 || force_firmware_install) { + uint32_t v = 0; fw = firmware_get(T4_FWNAME); - if (fw == NULL) { - device_printf(sc->dev, - "Could not find firmware image %s\n", T4_FWNAME); - return (ENOENT); + if (fw != NULL) { + const struct fw_hdr *hdr = (const void *)fw->data; + + v = ntohl(hdr->fw_ver); + + /* + * The firmware module will not be used if it isn't the + * same major version as what the driver was compiled + * with. This check trumps force_firmware_install. + */ + if (G_FW_HDR_FW_VER_MAJOR(v) != FW_VERSION_MAJOR) { + device_printf(sc->dev, + "Found firmware image but version %d " + "can not be used with this driver (%d)\n", + G_FW_HDR_FW_VER_MAJOR(v), FW_VERSION_MAJOR); + + firmware_put(fw, FIRMWARE_UNLOAD); + fw = NULL; + } } - device_printf(sc->dev, - "installing firmware %d.%d.%d on card.\n", - FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_MICRO); - rc = -t4_load_fw(sc, fw->data, fw->datasize); - if (rc != 0) { + if (fw == NULL && (rc < 0 || force_firmware_install)) { + device_printf(sc->dev, "No usable firmware. " + "card has %d.%d.%d, driver compiled with %d.%d.%d, " + "force_firmware_install%s set", + G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers), + FW_VERSION_MAJOR, FW_VERSION_MINOR, + FW_VERSION_MICRO, + force_firmware_install ? "" : " not"); + return (EAGAIN); + } + + /* + * Always upgrade, even for minor/micro/build mismatches. + * Downgrade only for a major version mismatch or if + * force_firmware_install was specified. + */ + if (fw != NULL && (rc < 0 || force_firmware_install || + v > sc->params.fw_vers)) { device_printf(sc->dev, - "failed to install firmware: %d\n", rc); - return (rc); - } else { - t4_get_fw_version(sc, &sc->params.fw_vers); - t4_get_tp_version(sc, &sc->params.tp_vers); + "installing firmware %d.%d.%d.%d on card.\n", + G_FW_HDR_FW_VER_MAJOR(v), G_FW_HDR_FW_VER_MINOR(v), + G_FW_HDR_FW_VER_MICRO(v), G_FW_HDR_FW_VER_BUILD(v)); + + rc = -t4_load_fw(sc, fw->data, fw->datasize); + if (rc != 0) { + device_printf(sc->dev, + "failed to install firmware: %d\n", rc); + firmware_put(fw, FIRMWARE_UNLOAD); + return (rc); + } else { + /* refresh */ + (void) t4_check_fw_version(sc); + } } - firmware_put(fw, FIRMWARE_UNLOAD); + if (fw != NULL) + firmware_put(fw, FIRMWARE_UNLOAD); } /* Contact firmware, request master */ @@ -2244,15 +2296,13 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "core_clock", CTLFLAG_RD, &sc->params.vpd.cclk, 0, "core clock frequency (in KHz)"); - /* XXX: this doesn't seem to show up */ - SYSCTL_ADD_OPAQUE(ctx, children, OID_AUTO, "holdoff_tmr", - CTLFLAG_RD, &intr_timer, sizeof(intr_timer), "IU", - "interrupt holdoff timer values (us)"); - - /* XXX: this doesn't seem to show up */ - SYSCTL_ADD_OPAQUE(ctx, children, OID_AUTO, "holdoff_pktc", - CTLFLAG_RD, &intr_pktcount, sizeof(intr_pktcount), "IU", - "interrupt holdoff packet counter values"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_timers", + CTLTYPE_STRING | CTLFLAG_RD, &intr_timer, sizeof(intr_timer), + sysctl_int_array, "A", "interrupt holdoff timer values (us)"); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_pkt_counts", + CTLTYPE_STRING | CTLFLAG_RD, &intr_pktcount, sizeof(intr_pktcount), + sysctl_int_array, "A", "interrupt holdoff packet counter values"); return (0); } @@ -2304,7 +2354,7 @@ cxgbe_sysctls(struct port_info *pi) #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ - CTLTYPE_U64 | CTLFLAG_RD, pi->adapter, reg, \ + CTLTYPE_QUAD | CTLFLAG_RD, pi->adapter, reg, \ sysctl_handle_t4_reg64, "QU", desc) SYSCTL_ADD_T4_REG64(pi, "tx_octets", "# of octets in good frames", @@ -2428,7 +2478,7 @@ cxgbe_sysctls(struct port_info *pi) #undef SYSCTL_ADD_T4_REG64 #define SYSCTL_ADD_T4_PORTSTAT(name, desc) \ - SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, #name, CTLFLAG_RD, \ + SYSCTL_ADD_QUAD(ctx, children, OID_AUTO, #name, CTLFLAG_RD, \ &pi->stats.name, desc) /* We get these from port_stats and they may be stale by upto 1s */ @@ -2455,6 +2505,22 @@ cxgbe_sysctls(struct port_info *pi) } static int +sysctl_int_array(SYSCTL_HANDLER_ARGS) +{ + int rc, *i; + struct sbuf sb; + + sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); + for (i = arg1; arg2; arg2 -= sizeof(int), i++) + sbuf_printf(&sb, "%d ", *i); + sbuf_trim(&sb); + sbuf_finish(&sb); + rc = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + sbuf_delete(&sb); + return (rc); +} + +static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS) { struct port_info *pi = arg1; @@ -2578,7 +2644,31 @@ sysctl_handle_t4_reg64(SYSCTL_HANDLER_AR val = t4_read_reg64(sc, reg); - return (sysctl_handle_64(oidp, &val, 0, req)); + return (sysctl_handle_quad(oidp, &val, 0, req)); +} + +static inline void +txq_start(struct ifnet *ifp, struct sge_txq *txq) +{ + struct buf_ring *br; + struct mbuf *m; + + TXQ_LOCK_ASSERT_OWNED(txq); + + br = txq->eq.br; + m = txq->m ? txq->m : drbr_dequeue(ifp, br); + if (m) + t4_eth_tx(ifp, txq, m); +} + +void +cxgbe_txq_start(void *arg, int count) +{ + struct sge_txq *txq = arg; + + TXQ_LOCK(txq); + txq_start(txq->ifp, txq); + TXQ_UNLOCK(txq); } int @@ -2646,6 +2736,7 @@ t4_os_pci_restore_state(struct adapter * pci_cfg_restore(dev, dinfo); return (0); } + void t4_os_portmod_changed(const struct adapter *sc, int idx) { @@ -2656,10 +2747,13 @@ t4_os_portmod_changed(const struct adapt if (pi->mod_type == FW_PORT_MOD_TYPE_NONE) if_printf(pi->ifp, "transceiver unplugged.\n"); - else + else if (pi->mod_type > 0 && pi->mod_type < ARRAY_SIZE(mod_str)) { if_printf(pi->ifp, "%s transceiver inserted.\n", mod_str[pi->mod_type]); - + } else { + if_printf(pi->ifp, "transceiver (type %d) inserted.\n", + pi->mod_type); + } } void @@ -2737,10 +2831,20 @@ t4_ioctl(struct cdev *dev, unsigned long return (rc); } +static int +t4_mod_event(module_t mod, int cmd, void *arg) +{ + + if (cmd == MOD_LOAD) + t4_sge_modload(); + + return (0); +} + static devclass_t t4_devclass; static devclass_t cxgbe_devclass; -DRIVER_MODULE(t4nex, pci, t4_driver, t4_devclass, 0, 0); +DRIVER_MODULE(t4nex, pci, t4_driver, t4_devclass, t4_mod_event, 0); MODULE_VERSION(t4nex, 1); DRIVER_MODULE(cxgbe, t4nex, cxgbe_driver, cxgbe_devclass, 0, 0); Modified: stable/8/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Feb 18 08:00:26 2011 (r218792) +++ stable/8/sys/dev/cxgbe/t4_sge.c Mon Mar 14 09:50:14 2011 (r219633) @@ -34,6 +34,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include #include @@ -55,13 +58,9 @@ struct fl_buf_info { uma_zone_t zone; }; -/* t4_sge_init will fill up the zone */ -static struct fl_buf_info fl_buf_info[FL_BUF_SIZES] = { - { MCLBYTES, EXT_CLUSTER, NULL}, - { MJUMPAGESIZE, EXT_JUMBOP, NULL}, - { MJUM9BYTES, EXT_JUMBO9, NULL}, - { MJUM16BYTES, EXT_JUMBO16, NULL} -}; +/* Filled up by t4_sge_modload */ +static struct fl_buf_info fl_buf_info[FL_BUF_SIZES]; + #define FL_BUF_SIZE(x) (fl_buf_info[x].size) #define FL_BUF_TYPE(x) (fl_buf_info[x].type) #define FL_BUF_ZONE(x) (fl_buf_info[x].zone) @@ -118,7 +117,6 @@ static int alloc_fl_sdesc(struct sge_fl static void free_fl_sdesc(struct sge_fl *); static int alloc_eq_maps(struct sge_eq *); static void free_eq_maps(struct sge_eq *); -static struct mbuf *get_fl_sdesc_data(struct sge_fl *, int, int); static void set_fl_tag_idx(struct sge_fl *, int); static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int); @@ -133,9 +131,35 @@ static inline void write_ulp_cpl_sgl(str static int write_sgl_to_txd(struct sge_eq *, struct sgl *, caddr_t *); static inline void copy_to_txd(struct sge_eq *, caddr_t, caddr_t *, int); static inline void ring_tx_db(struct adapter *, struct sge_eq *); +static inline int reclaimable(struct sge_eq *); static int reclaim_tx_descs(struct sge_eq *, int, int); static void write_eqflush_wr(struct sge_eq *); static __be64 get_flit(bus_dma_segment_t *, int, int); +static int handle_sge_egr_update(struct adapter *, + const struct cpl_sge_egr_update *); + +/* + * Called on MOD_LOAD and fills up fl_buf_info[]. + */ +void +t4_sge_modload(void) +{ + int i; + int bufsize[FL_BUF_SIZES] = { + MCLBYTES, +#if MJUMPAGESIZE != MCLBYTES + MJUMPAGESIZE, +#endif + MJUM9BYTES, + MJUM16BYTES + }; + + for (i = 0; i < FL_BUF_SIZES; i++) { + FL_BUF_SIZE(i) = bufsize[i]; + FL_BUF_TYPE(i) = m_gettype(bufsize[i]); + FL_BUF_ZONE(i) = m_getzone(bufsize[i]); + } +} /** * t4_sge_init - initialize SGE @@ -151,11 +175,6 @@ t4_sge_init(struct adapter *sc) struct sge *s = &sc->sge; int i; - FL_BUF_ZONE(0) = zone_clust; - FL_BUF_ZONE(1) = zone_jumbop; - FL_BUF_ZONE(2) = zone_jumbo9; - FL_BUF_ZONE(3) = zone_jumbo16; - t4_set_reg_field(sc, A_SGE_CONTROL, V_PKTSHIFT(M_PKTSHIFT) | V_INGPADBOUNDARY(M_INGPADBOUNDARY) | F_EGRSTATUSPAGESIZE, @@ -409,7 +428,6 @@ t4_intr_fwd(void *arg) int ndesc_pending = 0, ndesc_total = 0; int qid; - IQ_LOCK(iq); while (is_new_response(iq, &ctrl)) { rmb(); @@ -436,7 +454,6 @@ t4_intr_fwd(void *arg) iq_next(iq); } - IQ_UNLOCK(iq); if (ndesc_total > 0) { t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), @@ -469,7 +486,6 @@ t4_intr_evt(void *arg) KASSERT(iq == &sc->sge.fwq, ("%s: unexpected ingress queue", __func__)); - IQ_LOCK(iq); while (is_new_response(iq, &ctrl)) { rmb(); @@ -492,21 +508,9 @@ t4_intr_evt(void *arg) break; } - case CPL_SGE_EGR_UPDATE: { - const struct cpl_sge_egr_update *cpl; - unsigned int qid; - struct sge *s = &sc->sge; - struct sge_txq *txq; - - cpl = (const void *)(rss + 1); - qid = G_EGR_QID(ntohl(cpl->opcode_qid)); - txq = (void *)s->eqmap[qid - s->eq_start]; - txq->egr_update++; - - /* XXX: wake up stalled tx */ - + case CPL_SGE_EGR_UPDATE: + handle_sge_egr_update(sc, (const void *)(rss + 1)); break; - } default: device_printf(sc->dev, @@ -524,7 +528,6 @@ t4_intr_evt(void *arg) } iq_next(iq); } - IQ_UNLOCK(iq); if (ndesc_total > 0) { t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), @@ -538,63 +541,73 @@ t4_intr_data(void *arg) { struct sge_rxq *rxq = arg; struct sge_iq *iq = arg; + struct adapter *sc = iq->adapter; struct rsp_ctrl *ctrl; + struct ifnet *ifp = rxq->ifp; struct sge_fl *fl = &rxq->fl; - struct port_info *pi = rxq->port; - struct ifnet *ifp = pi->ifp; - struct adapter *sc = pi->adapter; + struct fl_sdesc *sd = &fl->sdesc[fl->cidx], *sd_next; const struct rss_header *rss; const struct cpl_rx_pkt *cpl; - int ndescs = 0, rsp_type; uint32_t len; + int ndescs = 0, i; struct mbuf *m0, *m; #ifdef INET struct lro_ctrl *lro = &rxq->lro; struct lro_entry *l; #endif - IQ_LOCK(iq); + prefetch(sd->m); + prefetch(sd->cl); + iq->intr_next = iq->intr_params; while (is_new_response(iq, &ctrl)) { rmb(); rss = (const void *)iq->cdesc; - cpl = (const void *)(rss + 1); + i = G_RSPD_TYPE(ctrl->u.type_gen); - rsp_type = G_RSPD_TYPE(ctrl->u.type_gen); + if (__predict_false(i == X_RSPD_TYPE_CPL)) { - if (__predict_false(rsp_type == X_RSPD_TYPE_CPL)) { - const struct cpl_sge_egr_update *p = (const void *)cpl; - unsigned int qid = G_EGR_QID(ntohl(p->opcode_qid)); + /* Can't be anything except an egress update */ + KASSERT(rss->opcode == CPL_SGE_EGR_UPDATE, + ("%s: unexpected CPL %x", __func__, rss->opcode)); - KASSERT(cpl->opcode == CPL_SGE_EGR_UPDATE, - ("unexpected opcode on data ingress queue: %x", - cpl->opcode)); - - /* XXX: noone's waiting to be woken up... */ - wakeup(sc->sge.eqmap[qid - sc->sge.eq_start]); + handle_sge_egr_update(sc, (const void *)(rss + 1)); + goto nextdesc; + } + KASSERT(i == X_RSPD_TYPE_FLBUF && rss->opcode == CPL_RX_PKT, + ("%s: unexpected CPL %x rsp %d", __func__, rss->opcode, i)); - ndescs++; - iq_next(iq); + sd_next = sd + 1; + if (__predict_false(fl->cidx + 1 == fl->cap)) + sd_next = fl->sdesc; + prefetch(sd_next->m); + prefetch(sd_next->cl); - continue; - } + cpl = (const void *)(rss + 1); - KASSERT(G_RSPD_TYPE(ctrl->u.type_gen) == X_RSPD_TYPE_FLBUF, - ("unexpected event on data ingress queue: %x", - G_RSPD_TYPE(ctrl->u.type_gen))); + m0 = sd->m; + sd->m = NULL; /* consumed */ len = be32toh(ctrl->pldbuflen_qid); + if (__predict_false((len & F_RSPD_NEWBUF) == 0)) + panic("%s: cannot handle packed frames", __func__); + len = G_RSPD_LEN(len); - KASSERT(len & F_RSPD_NEWBUF, - ("%s: T4 misconfigured to pack buffers.", __func__)); + bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, + BUS_DMASYNC_POSTREAD); - len = G_RSPD_LEN(len); - m0 = get_fl_sdesc_data(fl, len, M_PKTHDR); - if (m0 == NULL) { - iq->intr_next = V_QINTR_TIMER_IDX(SGE_NTIMERS - 1); - break; + m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR); + if (len < MINCLSIZE) { + /* copy data to mbuf, buffer will be recycled */ + bcopy(sd->cl, mtod(m0, caddr_t), len); + m0->m_len = len; + } else { + bus_dmamap_unload(fl->tag[sd->tag_idx], sd->map); + m_cljset(m0, sd->cl, FL_BUF_TYPE(sd->tag_idx)); + sd->cl = NULL; /* consumed */ + m0->m_len = min(len, FL_BUF_SIZE(sd->tag_idx)); } len -= FL_PKTSHIFT; @@ -623,16 +636,49 @@ t4_intr_data(void *arg) rxq->vlan_extraction++; } + i = 1; /* # of fl sdesc used */ + sd = sd_next; + if (__predict_false(++fl->cidx == fl->cap)) + fl->cidx = 0; + len -= m0->m_len; m = m0; while (len) { - m->m_next = get_fl_sdesc_data(fl, len, 0); - if (m->m_next == NULL) - CXGBE_UNIMPLEMENTED("mbuf recovery"); + i++; + sd_next = sd + 1; + if (__predict_false(fl->cidx + 1 == fl->cap)) + sd_next = fl->sdesc; + prefetch(sd_next->m); + prefetch(sd_next->cl); + + m->m_next = sd->m; + sd->m = NULL; /* consumed */ m = m->m_next; + + bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, + BUS_DMASYNC_POSTREAD); + + m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0); + if (len <= MLEN) { + bcopy(sd->cl, mtod(m, caddr_t), len); + m->m_len = len; + } else { + bus_dmamap_unload(fl->tag[sd->tag_idx], + sd->map); + m_cljset(m, sd->cl, FL_BUF_TYPE(sd->tag_idx)); + sd->cl = NULL; /* consumed */ + m->m_len = min(len, FL_BUF_SIZE(sd->tag_idx)); + } + + i++; + sd = sd_next; + if (__predict_false(++fl->cidx == fl->cap)) + fl->cidx = 0; + len -= m->m_len; } + #ifdef INET if (cpl->l2info & htobe32(F_RXF_LRO) && rxq->flags & RXQ_LRO_ENABLED && @@ -640,17 +686,17 @@ t4_intr_data(void *arg) /* queued for LRO */ } else #endif - (*ifp->if_input)(ifp, m0); + ifp->if_input(ifp, m0); FL_LOCK(fl); - if (fl->needed >= 32) { + fl->needed += i; + if (fl->needed >= 32) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Mar 14 11:20:27 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C38C1065687; Mon, 14 Mar 2011 11:20:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEEFA8FC12; Mon, 14 Mar 2011 11:20:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2EBKQ5W091986; Mon, 14 Mar 2011 11:20:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2EBKQeQ091983; Mon, 14 Mar 2011 11:20:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103141120.p2EBKQeQ091983@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 14 Mar 2011 11:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219637 - stable/8/sys/ufs/ufs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2011 11:20:27 -0000 Author: kib Date: Mon Mar 14 11:20:26 2011 New Revision: 219637 URL: http://svn.freebsd.org/changeset/base/219637 Log: MFC r219388: Simplify uses of the web of pointers. Modified: stable/8/sys/ufs/ufs/ufs_dirhash.c stable/8/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_dirhash.c Mon Mar 14 11:07:12 2011 (r219636) +++ stable/8/sys/ufs/ufs/ufs_dirhash.c Mon Mar 14 11:20:26 2011 (r219637) @@ -428,7 +428,7 @@ ufsdirhash_build(struct inode *ip) } for (i = 0; i < dirblocks; i++) dh->dh_blkfree[i] = DIRBLKSIZ / DIRALIGN; - bmask = VFSTOUFS(vp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; + bmask = vp->v_mount->mnt_stat.f_iosize - 1; pos = 0; while (pos < ip->i_size) { /* If necessary, get the next directory block. */ @@ -589,7 +589,7 @@ ufsdirhash_lookup(struct inode *ip, char DIRHASHLIST_UNLOCK(); vp = ip->i_vnode; - bmask = VFSTOUFS(vp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; + bmask = vp->v_mount->mnt_stat.f_iosize - 1; blkoff = -1; bp = NULL; restart: Modified: stable/8/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_quota.c Mon Mar 14 11:07:12 2011 (r219636) +++ stable/8/sys/ufs/ufs/ufs_quota.c Mon Mar 14 11:20:26 2011 (r219637) @@ -220,8 +220,7 @@ chkdq(struct inode *ip, ufs2_daddr_t cha /* Reset timer when crossing soft limit */ if (dq->dq_curblocks + change >= dq->dq_bsoftlimit && dq->dq_curblocks < dq->dq_bsoftlimit) - dq->dq_btime = time_second + - VFSTOUFS(ITOV(ip)->v_mount)->um_btime[i]; + dq->dq_btime = time_second + ip->i_ump->um_btime[i]; dq->dq_curblocks += change; dq->dq_flags |= DQ_MOD; DQI_UNLOCK(dq); @@ -266,8 +265,7 @@ chkdqchg(struct inode *ip, ufs2_daddr_t */ if (ncurblocks >= dq->dq_bsoftlimit && dq->dq_bsoftlimit) { if (dq->dq_curblocks < dq->dq_bsoftlimit) { - dq->dq_btime = time_second + - VFSTOUFS(ITOV(ip)->v_mount)->um_btime[type]; + dq->dq_btime = time_second + ip->i_ump->um_btime[type]; if (ip->i_uid == cred->cr_uid) *warn = 1; return (0); @@ -366,8 +364,7 @@ chkiq(struct inode *ip, int change, stru /* Reset timer when crossing soft limit */ if (dq->dq_curinodes + change >= dq->dq_isoftlimit && dq->dq_curinodes < dq->dq_isoftlimit) - dq->dq_itime = time_second + - VFSTOUFS(ITOV(ip)->v_mount)->um_itime[i]; + dq->dq_itime = time_second + ip->i_ump->um_itime[i]; dq->dq_curinodes += change; dq->dq_flags |= DQ_MOD; DQI_UNLOCK(dq); @@ -411,8 +408,7 @@ chkiqchg(struct inode *ip, int change, s */ if (ncurinodes >= dq->dq_isoftlimit && dq->dq_isoftlimit) { if (dq->dq_curinodes < dq->dq_isoftlimit) { - dq->dq_itime = time_second + - VFSTOUFS(ITOV(ip)->v_mount)->um_itime[type]; + dq->dq_itime = time_second + ip->i_ump->um_itime[type]; if (ip->i_uid == cred->cr_uid) *warn = 1; return (0); @@ -443,7 +439,7 @@ chkiqchg(struct inode *ip, int change, s static void chkdquot(struct inode *ip) { - struct ufsmount *ump = VFSTOUFS(ITOV(ip)->v_mount); + struct ufsmount *ump = ip->i_ump; struct vnode *vp = ITOV(ip); int i; From owner-svn-src-stable@FreeBSD.ORG Mon Mar 14 17:08:30 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83387106567B; Mon, 14 Mar 2011 17:08:30 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5178FC13; Mon, 14 Mar 2011 17:08:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2EH8UP2000789; Mon, 14 Mar 2011 17:08:30 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2EH8Ut5000784; Mon, 14 Mar 2011 17:08:30 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201103141708.p2EH8Ut5000784@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 14 Mar 2011 17:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219642 - in stable/8: share/man/man9 sys/kern sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2011 17:08:30 -0000 Author: jh Date: Mon Mar 14 17:08:30 2011 New Revision: 219642 URL: http://svn.freebsd.org/changeset/base/219642 Log: MFC r209710: Extend the kernel unit number allocator for allocating specific unit numbers. This change adds a new function alloc_unr_specific() which returns the requested unit number if it is free. If the number is already allocated or out of the range, -1 is returned. Update alloc_unr(9) manual page accordingly and add a MLINK for alloc_unr_specific(9). Modified: stable/8/share/man/man9/Makefile stable/8/share/man/man9/alloc_unr.9 stable/8/sys/kern/subr_unit.c stable/8/sys/sys/systm.h Directory Properties: stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Mon Mar 14 13:47:17 2011 (r219641) +++ stable/8/share/man/man9/Makefile Mon Mar 14 17:08:30 2011 (r219642) @@ -374,6 +374,7 @@ MAN= accept_filter.9 \ zone.9 MLINKS= alloc_unr.9 alloc_unrl.9 \ + alloc_unr.9 alloc_unr_specific.9 \ alloc_unr.9 delete_unrhdr.9 \ alloc_unr.9 free_unr.9 \ alloc_unr.9 new_unrhdr.9 Modified: stable/8/share/man/man9/alloc_unr.9 ============================================================================== --- stable/8/share/man/man9/alloc_unr.9 Mon Mar 14 13:47:17 2011 (r219641) +++ stable/8/share/man/man9/alloc_unr.9 Mon Mar 14 17:08:30 2011 (r219642) @@ -24,13 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2010 +.Dd July 5, 2010 .Dt ALLOC_UNR 9 .Os .Sh NAME .Nm new_unrhdr , .Nm delete_unrhdr , .Nm alloc_unr , +.Nm alloc_unr_specific , .Nm free_unr .Nd "kernel unit number allocator" .Sh SYNOPSIS @@ -43,6 +44,8 @@ .Fn alloc_unr "struct unrhdr *uh" .Ft int .Fn alloc_unrl "struct unrhdr *uh" +.Ft int +.Fn alloc_unr_specific "struct unrhdr *uh" "u_int item" .Ft void .Fn free_unr "struct unrhdr *uh" "u_int item" .Sh DESCRIPTION @@ -81,6 +84,13 @@ is returned. Same as .Fn alloc_unr except that mutex is assumed to be already locked and thus is not used. +.It Fn alloc_unr_specific uh item +Allocate a specific unit number. +This function allocates memory and thus may sleep. +The allocated unit number is returned on success. +If the specified number is already allocated or out of the range, +.Li \-1 +is returned. .It Fn free_unr uh item Free a previously allocated unit number. This function may require allocating memory, and thus it can sleep. Modified: stable/8/sys/kern/subr_unit.c ============================================================================== --- stable/8/sys/kern/subr_unit.c Mon Mar 14 13:47:17 2011 (r219641) +++ stable/8/sys/kern/subr_unit.c Mon Mar 14 17:08:30 2011 (r219642) @@ -628,6 +628,132 @@ alloc_unr(struct unrhdr *uh) return (i); } +static int +alloc_unr_specificl(struct unrhdr *uh, u_int item, void **p1, void **p2) +{ + struct unr *up, *upn; + struct unrb *ub; + u_int i, last, tl; + + mtx_assert(uh->mtx, MA_OWNED); + + if (item < uh->low + uh->first || item > uh->high) + return (-1); + + up = TAILQ_FIRST(&uh->head); + /* Ideal split. */ + if (up == NULL && item - uh->low == uh->first) { + uh->first++; + uh->last--; + uh->busy++; + check_unrhdr(uh, __LINE__); + return (item); + } + + i = item - uh->low - uh->first; + + if (up == NULL) { + up = new_unr(uh, p1, p2); + up->ptr = NULL; + up->len = i; + TAILQ_INSERT_TAIL(&uh->head, up, list); + up = new_unr(uh, p1, p2); + up->ptr = uh; + up->len = 1; + TAILQ_INSERT_TAIL(&uh->head, up, list); + uh->last = uh->high - uh->low - i; + uh->busy++; + check_unrhdr(uh, __LINE__); + return (item); + } else { + /* Find the item which contains the unit we want to allocate. */ + TAILQ_FOREACH(up, &uh->head, list) { + if (up->len > i) + break; + i -= up->len; + } + } + + if (up == NULL) { + if (i > 0) { + up = new_unr(uh, p1, p2); + up->ptr = NULL; + up->len = i; + TAILQ_INSERT_TAIL(&uh->head, up, list); + } + up = new_unr(uh, p1, p2); + up->ptr = uh; + up->len = 1; + TAILQ_INSERT_TAIL(&uh->head, up, list); + goto done; + } + + if (is_bitmap(uh, up)) { + ub = up->ptr; + if (bit_test(ub->map, i) == 0) { + bit_set(ub->map, i); + ub->busy++; + goto done; + } else + return (-1); + } else if (up->ptr == uh) + return (-1); + + KASSERT(up->ptr == NULL, + ("alloc_unr_specificl: up->ptr != NULL (up=%p)", up)); + + /* Split off the tail end, if any. */ + tl = up->len - (1 + i); + if (tl > 0) { + upn = new_unr(uh, p1, p2); + upn->ptr = NULL; + upn->len = tl; + TAILQ_INSERT_AFTER(&uh->head, up, upn, list); + } + + /* Split off head end, if any */ + if (i > 0) { + upn = new_unr(uh, p1, p2); + upn->len = i; + upn->ptr = NULL; + TAILQ_INSERT_BEFORE(up, upn, list); + } + up->len = 1; + up->ptr = uh; + +done: + last = uh->high - uh->low - (item - uh->low); + if (uh->last > last) + uh->last = last; + uh->busy++; + collapse_unr(uh, up); + check_unrhdr(uh, __LINE__); + return (item); +} + +int +alloc_unr_specific(struct unrhdr *uh, u_int item) +{ + void *p1, *p2; + int i; + + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "alloc_unr_specific"); + + p1 = Malloc(sizeof(struct unr)); + p2 = Malloc(sizeof(struct unr)); + + mtx_lock(uh->mtx); + i = alloc_unr_specificl(uh, item, &p1, &p2); + mtx_unlock(uh->mtx); + + if (p1 != NULL) + Free(p1); + if (p2 != NULL) + Free(p2); + + return (i); +} + /* * Free a unr. * @@ -810,6 +936,42 @@ print_unrhdr(struct unrhdr *uh) } } +static void +test_alloc_unr(struct unrhdr *uh, u_int i, char a[]) +{ + int j; + + if (a[i]) { + printf("F %u\n", i); + free_unr(uh, i); + a[i] = 0; + } else { + no_alloc = 1; + j = alloc_unr(uh); + if (j != -1) { + a[j] = 1; + printf("A %d\n", j); + } + no_alloc = 0; + } +} + +static void +test_alloc_unr_specific(struct unrhdr *uh, u_int i, char a[]) +{ + int j; + + j = alloc_unr_specific(uh, i); + if (j == -1) { + printf("F %u\n", i); + a[i] = 0; + free_unr(uh, i); + } else { + a[i] = 1; + printf("A %d\n", j); + } +} + /* Number of unrs to test */ #define NN 10000 @@ -825,6 +987,7 @@ main(int argc __unused, const char **arg print_unrhdr(uh); memset(a, 0, sizeof a); + srandomdev(); fprintf(stderr, "sizeof(struct unr) %zu\n", sizeof(struct unr)); fprintf(stderr, "sizeof(struct unrb) %zu\n", sizeof(struct unrb)); @@ -838,19 +1001,11 @@ main(int argc __unused, const char **arg if (a[i] && (j & 1)) continue; #endif - if (a[i]) { - printf("F %u\n", i); - free_unr(uh, i); - a[i] = 0; - } else { - no_alloc = 1; - i = alloc_unr(uh); - if (i != -1) { - a[i] = 1; - printf("A %u\n", i); - } - no_alloc = 0; - } + if ((random() & 1) != 0) + test_alloc_unr(uh, i, a); + else + test_alloc_unr_specific(uh, i, a); + if (1) /* XXX: change this for detailed debug printout */ print_unrhdr(uh); check_unrhdr(uh, __LINE__); Modified: stable/8/sys/sys/systm.h ============================================================================== --- stable/8/sys/sys/systm.h Mon Mar 14 13:47:17 2011 (r219641) +++ stable/8/sys/sys/systm.h Mon Mar 14 17:08:30 2011 (r219642) @@ -360,6 +360,7 @@ void delete_unrhdr(struct unrhdr *uh); void clean_unrhdr(struct unrhdr *uh); void clean_unrhdrl(struct unrhdr *uh); int alloc_unr(struct unrhdr *uh); +int alloc_unr_specific(struct unrhdr *uh, u_int item); int alloc_unrl(struct unrhdr *uh); void free_unr(struct unrhdr *uh, u_int item); From owner-svn-src-stable@FreeBSD.ORG Mon Mar 14 22:51:51 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAC12106567C; Mon, 14 Mar 2011 22:51:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8F898FC21; Mon, 14 Mar 2011 22:51:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2EMpp4T013911; Mon, 14 Mar 2011 22:51:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2EMppwN013908; Mon, 14 Mar 2011 22:51:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201103142251.p2EMppwN013908@svn.freebsd.org> From: Dimitry Andric Date: Mon, 14 Mar 2011 22:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219648 - in stable/8/gnu/usr.bin: binutils/ld cc/cc_tools X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2011 22:51:52 -0000 Author: dim Date: Mon Mar 14 22:51:51 2011 New Revision: 219648 URL: http://svn.freebsd.org/changeset/base/219648 Log: Partially MFC r209867 and r215439, to provide rudimentary support for linking i386 (32 bit) executables on amd64, using gcc's -m32 option. r209867 introduces the needed multilib options to gcc's multilib.h, but was originally intended just for powerpc64. r215439 teaches the linker to search in /usr/lib32 for elf_i386_fbsd output, and amends r209867 to apply to amd64 too. NOTE: this MFC does NOT provide full support for compiling and linking all existing 32 bit programs on amd64, since /usr/include/machine still contains amd64-specific headers. Though simple "Hello World" type programs work, anything relying on machine-specific types might fail in various interesting ways. You have been warned. :) MFC r209867: Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes a variety of bugs in binutils related to handling of 64-bit PPC ELF, provides a GCC configuration for 64-bit PowerPC on FreeBSD, and associated build systems tweaks. Obtained from: projects/ppc64 MFC r215439: Let gcc and ld know where to find 32 bit libraries on amd64. Reviewed by: arch@ Approved by: kib (mentor) Modified: stable/8/gnu/usr.bin/binutils/ld/Makefile.amd64 stable/8/gnu/usr.bin/cc/cc_tools/Makefile Directory Properties: stable/8/gnu/usr.bin/binutils/ld/ (props changed) stable/8/gnu/usr.bin/cc/cc_tools/ (props changed) Modified: stable/8/gnu/usr.bin/binutils/ld/Makefile.amd64 ============================================================================== --- stable/8/gnu/usr.bin/binutils/ld/Makefile.amd64 Mon Mar 14 22:42:41 2011 (r219647) +++ stable/8/gnu/usr.bin/binutils/ld/Makefile.amd64 Mon Mar 14 22:51:51 2011 (r219648) @@ -12,7 +12,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} X86_EMULATION= elf_i386_fbsd -_i386_path= \"${TOOLS_PREFIX}/usr/lib/i386\" +_i386_path= \"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${X86_EMULATION}.${ext} Modified: stable/8/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- stable/8/gnu/usr.bin/cc/cc_tools/Makefile Mon Mar 14 22:42:41 2011 (r219647) +++ stable/8/gnu/usr.bin/cc/cc_tools/Makefile Mon Mar 14 22:51:51 2011 (r219648) @@ -303,12 +303,22 @@ GENSRCS+= gcov-iov.h # Multilib config file multilib.h: +.if ${TARGET_ARCH} == "amd64" + echo 'static const char *const multilib_raw[] = { \ + ". !m64 !m32;", \ + "64:../lib m64 !m32;", \ + "32:../lib32 !m64 m32;", NULL };' > ${.TARGET} + echo 'static const char *const multilib_matches_raw[] = { \ + "m64 m64;", "m32 m32;", NULL };' >> ${.TARGET} + echo 'static const char *multilib_options = "m64/m32";' >> ${.TARGET} +.else echo 'static const char *const multilib_raw[] = { \ ". ;", NULL };' > ${.TARGET} echo 'static const char *const multilib_matches_raw[] = { \ NULL };' >> ${.TARGET} - echo 'static const char *multilib_extra = "";' >> ${.TARGET} echo 'static const char *multilib_options = "";' >> ${.TARGET} +.endif + echo 'static const char *multilib_extra = "";' >> ${.TARGET} echo 'static const char *const multilib_exclusions_raw[] = { \ NULL };' >> ${.TARGET} From owner-svn-src-stable@FreeBSD.ORG Tue Mar 15 07:15:04 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCD86106566B; Tue, 15 Mar 2011 07:15:04 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 986138FC16; Tue, 15 Mar 2011 07:15:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2F7F4rQ025032; Tue, 15 Mar 2011 07:15:04 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2F7F4Ot025028; Tue, 15 Mar 2011 07:15:04 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201103150715.p2F7F4Ot025028@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 15 Mar 2011 07:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219660 - in stable/8: share/man/man4 sys/netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2011 07:15:05 -0000 Author: ae Date: Tue Mar 15 07:15:04 2011 New Revision: 219660 URL: http://svn.freebsd.org/changeset/base/219660 Log: MFC r219127: Add XMIT_FAILOVER transmit algorithm to ng_one2many node. Packets are delivered out the first active "many" hook. PR: kern/137775 Submitted by: Maxim Ignatenko Modified: stable/8/share/man/man4/ng_one2many.4 stable/8/sys/netgraph/ng_one2many.c stable/8/sys/netgraph/ng_one2many.h Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man4/ng_one2many.4 ============================================================================== --- stable/8/share/man/man4/ng_one2many.4 Tue Mar 15 06:53:33 2011 (r219659) +++ stable/8/share/man/man4/ng_one2many.4 Tue Mar 15 07:15:04 2011 (r219660) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 19, 2006 +.Dd March 1, 2011 .Dt NG_ONE2MANY 4 .Os .Sh NAME @@ -96,6 +96,10 @@ hooks. Each packet goes out each .Dv many hook. +.It Dv NG_ONE2MANY_XMIT_FAILOVER +Packets are delivered out the first active +.Dv many +hook. .El .Pp In the future other algorithms may be added as well. Modified: stable/8/sys/netgraph/ng_one2many.c ============================================================================== --- stable/8/sys/netgraph/ng_one2many.c Tue Mar 15 06:53:33 2011 (r219659) +++ stable/8/sys/netgraph/ng_one2many.c Tue Mar 15 07:15:04 2011 (r219660) @@ -278,6 +278,7 @@ ng_one2many_rcvmsg(node_p node, item_p i switch (conf->xmitAlg) { case NG_ONE2MANY_XMIT_ROUNDROBIN: case NG_ONE2MANY_XMIT_ALL: + case NG_ONE2MANY_XMIT_FAILOVER: break; default: error = EINVAL; @@ -473,6 +474,9 @@ ng_one2many_rcvdata(hook_p hook, item_p NG_SEND_DATA_ONLY(error, mdst->hook, m2); } break; + case NG_ONE2MANY_XMIT_FAILOVER: + dst = &priv->many[priv->activeMany[0]]; + break; #ifdef INVARIANTS default: panic("%s: invalid xmitAlg", __func__); @@ -583,6 +587,7 @@ ng_one2many_update_many(priv_p priv) priv->nextMany %= priv->numActiveMany; break; case NG_ONE2MANY_XMIT_ALL: + case NG_ONE2MANY_XMIT_FAILOVER: break; #ifdef INVARIANTS default: Modified: stable/8/sys/netgraph/ng_one2many.h ============================================================================== --- stable/8/sys/netgraph/ng_one2many.h Tue Mar 15 06:53:33 2011 (r219659) +++ stable/8/sys/netgraph/ng_one2many.h Tue Mar 15 07:15:04 2011 (r219660) @@ -61,6 +61,7 @@ /* Algorithms for outgoing packet distribution (XXX only one so far) */ #define NG_ONE2MANY_XMIT_ROUNDROBIN 1 /* round-robin delivery */ #define NG_ONE2MANY_XMIT_ALL 2 /* send packets to all many hooks */ +#define NG_ONE2MANY_XMIT_FAILOVER 3 /* send packets to first active "many" */ /* Algorithms for detecting link failure (XXX only one so far) */ #define NG_ONE2MANY_FAIL_MANUAL 1 /* use enabledLinks[] array */ From owner-svn-src-stable@FreeBSD.ORG Tue Mar 15 07:15:47 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630011065677; Tue, 15 Mar 2011 07:15:47 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4853F8FC08; Tue, 15 Mar 2011 07:15:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2F7FkxD025083; Tue, 15 Mar 2011 07:15:46 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2F7FkX7025079; Tue, 15 Mar 2011 07:15:46 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201103150715.p2F7FkX7025079@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 15 Mar 2011 07:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219661 - in stable/7: share/man/man4 sys/netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2011 07:15:47 -0000 Author: ae Date: Tue Mar 15 07:15:46 2011 New Revision: 219661 URL: http://svn.freebsd.org/changeset/base/219661 Log: MFC r219127: Add XMIT_FAILOVER transmit algorithm to ng_one2many node. Packets are delivered out the first active "many" hook. PR: kern/137775 Submitted by: Maxim Ignatenko Modified: stable/7/share/man/man4/ng_one2many.4 stable/7/sys/netgraph/ng_one2many.c stable/7/sys/netgraph/ng_one2many.h Directory Properties: stable/7/share/man/man4/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/share/man/man4/ng_one2many.4 ============================================================================== --- stable/7/share/man/man4/ng_one2many.4 Tue Mar 15 07:15:04 2011 (r219660) +++ stable/7/share/man/man4/ng_one2many.4 Tue Mar 15 07:15:46 2011 (r219661) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 19, 2006 +.Dd March 1, 2011 .Dt NG_ONE2MANY 4 .Os .Sh NAME @@ -96,6 +96,10 @@ hooks. Each packet goes out each .Dv many hook. +.It Dv NG_ONE2MANY_XMIT_FAILOVER +Packets are delivered out the first active +.Dv many +hook. .El .Pp In the future other algorithms may be added as well. Modified: stable/7/sys/netgraph/ng_one2many.c ============================================================================== --- stable/7/sys/netgraph/ng_one2many.c Tue Mar 15 07:15:04 2011 (r219660) +++ stable/7/sys/netgraph/ng_one2many.c Tue Mar 15 07:15:46 2011 (r219661) @@ -278,6 +278,7 @@ ng_one2many_rcvmsg(node_p node, item_p i switch (conf->xmitAlg) { case NG_ONE2MANY_XMIT_ROUNDROBIN: case NG_ONE2MANY_XMIT_ALL: + case NG_ONE2MANY_XMIT_FAILOVER: break; default: error = EINVAL; @@ -473,6 +474,9 @@ ng_one2many_rcvdata(hook_p hook, item_p NG_SEND_DATA_ONLY(error, mdst->hook, m2); } break; + case NG_ONE2MANY_XMIT_FAILOVER: + dst = &priv->many[priv->activeMany[0]]; + break; #ifdef INVARIANTS default: panic("%s: invalid xmitAlg", __func__); @@ -583,6 +587,7 @@ ng_one2many_update_many(priv_p priv) priv->nextMany %= priv->numActiveMany; break; case NG_ONE2MANY_XMIT_ALL: + case NG_ONE2MANY_XMIT_FAILOVER: break; #ifdef INVARIANTS default: Modified: stable/7/sys/netgraph/ng_one2many.h ============================================================================== --- stable/7/sys/netgraph/ng_one2many.h Tue Mar 15 07:15:04 2011 (r219660) +++ stable/7/sys/netgraph/ng_one2many.h Tue Mar 15 07:15:46 2011 (r219661) @@ -61,6 +61,7 @@ /* Algorithms for outgoing packet distribution (XXX only one so far) */ #define NG_ONE2MANY_XMIT_ROUNDROBIN 1 /* round-robin delivery */ #define NG_ONE2MANY_XMIT_ALL 2 /* send packets to all many hooks */ +#define NG_ONE2MANY_XMIT_FAILOVER 3 /* send packets to first active "many" */ /* Algorithms for detecting link failure (XXX only one so far) */ #define NG_ONE2MANY_FAIL_MANUAL 1 /* use enabledLinks[] array */ From owner-svn-src-stable@FreeBSD.ORG Tue Mar 15 08:21:00 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86C031065673; Tue, 15 Mar 2011 08:21:00 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72EA58FC17; Tue, 15 Mar 2011 08:21:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2F8L0Mc026390; Tue, 15 Mar 2011 08:21:00 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2F8Kxex026359; Tue, 15 Mar 2011 08:20:59 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201103150820.p2F8Kxex026359@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 15 Mar 2011 08:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219662 - in stable/8/sys: amd64/amd64 arm/at91 arm/mv arm/sa11x0 arm/xscale/i80321 arm/xscale/i8134x arm/xscale/ixp425 arm/xscale/pxa boot/common boot/forth i386/i386 i386/xen ia64/ia6... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2011 08:21:00 -0000 Author: pluknet Date: Tue Mar 15 08:20:59 2011 New Revision: 219662 URL: http://svn.freebsd.org/changeset/base/219662 Log: MFC kern.msgbufsize: r217688-217689,r217709,r218666-218667,r218913. Note, that arm/{s3c2xx0,econa} exist only in head, thus not merged. r217688: Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. r217689: Add kern.msgbufsize default setting to /boot/defaults/loader.conf. r217709,218666-218667,218913 by marcel, cognet: Fix up for various arm subtargets: call init_param1() before we use msgbufsize, now that the size of the message buffer is a tunable. Reviewed by: marcel Approved by: avg (mentor) Modified: stable/8/sys/amd64/amd64/machdep.c stable/8/sys/arm/at91/at91_machdep.c stable/8/sys/arm/mv/mv_machdep.c stable/8/sys/arm/sa11x0/assabet_machdep.c stable/8/sys/arm/xscale/i80321/ep80219_machdep.c stable/8/sys/arm/xscale/i80321/iq31244_machdep.c stable/8/sys/arm/xscale/i8134x/crb_machdep.c stable/8/sys/arm/xscale/ixp425/avila_machdep.c stable/8/sys/arm/xscale/pxa/pxa_machdep.c stable/8/sys/boot/common/loader.8 stable/8/sys/boot/forth/loader.conf stable/8/sys/i386/i386/machdep.c stable/8/sys/i386/i386/pmap.c stable/8/sys/i386/xen/pmap.c stable/8/sys/ia64/ia64/machdep.c stable/8/sys/kern/subr_param.c stable/8/sys/mips/mips/machdep.c stable/8/sys/mips/mips/pmap.c stable/8/sys/pc98/pc98/machdep.c stable/8/sys/powerpc/aim/machdep.c stable/8/sys/powerpc/aim/mmu_oea.c stable/8/sys/powerpc/aim/mmu_oea64.c stable/8/sys/powerpc/booke/machdep.c stable/8/sys/powerpc/booke/pmap.c stable/8/sys/sparc64/sparc64/machdep.c stable/8/sys/sparc64/sparc64/pmap.c stable/8/sys/sun4v/sun4v/machdep.c stable/8/sys/sun4v/sun4v/pmap.c stable/8/sys/sys/msgbuf.h stable/8/sys/vm/vm_page.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/amd64/amd64/machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" #include "opt_kstack_pages.h" #include "opt_maxmem.h" -#include "opt_msgbuf.h" #include "opt_perfmon.h" #include "opt_sched.h" #include "opt_kdtrace.h" @@ -1511,7 +1510,7 @@ do_next: * calculation, etc.). */ while (phys_avail[pa_indx - 1] + PAGE_SIZE + - round_page(MSGBUF_SIZE) >= phys_avail[pa_indx]) { + round_page(msgbufsize) >= phys_avail[pa_indx]) { physmem -= atop(phys_avail[pa_indx] - phys_avail[pa_indx - 1]); phys_avail[pa_indx--] = 0; phys_avail[pa_indx--] = 0; @@ -1520,7 +1519,7 @@ do_next: Maxmem = atop(phys_avail[pa_indx]); /* Trim off space for the message buffer. */ - phys_avail[pa_indx] -= round_page(MSGBUF_SIZE); + phys_avail[pa_indx] -= round_page(msgbufsize); /* Map the message buffer. */ msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]); @@ -1721,7 +1720,7 @@ hammer_time(u_int64_t modulep, u_int64_t /* now running on new page tables, configured,and u/iom is accessible */ - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); fpuinit(); /* transfer to user mode */ Modified: stable/8/sys/arm/at91/at91_machdep.c ============================================================================== --- stable/8/sys/arm/at91/at91_machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/arm/at91/at91_machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -43,8 +43,6 @@ * Created : 17/09/94 */ -#include "opt_msgbuf.h" - #include __FBSDID("$FreeBSD$"); @@ -230,6 +228,9 @@ initarm(void *arg, void *arg2) pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK; /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ @@ -274,7 +275,7 @@ initarm(void *arg, void *arg2) valloc_pages(abtstack, ABT_STACK_SIZE); valloc_pages(undstack, UND_STACK_SIZE); valloc_pages(kernelstack, KSTACK_PAGES); - valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE); + valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); /* * Now we start construction of the L1 page table @@ -319,7 +320,7 @@ initarm(void *arg, void *arg2) pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa, L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); pmap_map_chunk(l1pagetable, msgbufpv.pv_va, msgbufpv.pv_pa, - MSGBUF_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + msgbufsize, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); for (loop = 0; loop < NUM_KERNEL_PTS; ++loop) { pmap_map_chunk(l1pagetable, kernel_pt_table[loop].pv_va, @@ -396,7 +397,7 @@ initarm(void *arg, void *arg2) KERNVIRTADDR + 3 * memsize, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); mutex_init(); i = 0; @@ -408,8 +409,6 @@ initarm(void *arg, void *arg2) phys_avail[i++] = PHYSADDR + memsize; phys_avail[i++] = 0; phys_avail[i++] = 0; - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: stable/8/sys/arm/mv/mv_machdep.c ============================================================================== --- stable/8/sys/arm/mv/mv_machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/arm/mv/mv_machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -35,7 +35,6 @@ * from: FreeBSD: //depot/projects/arm/src/sys/arm/at91/kb920x_machdep.c, rev 45 */ -#include "opt_msgbuf.h" #include "opt_ddb.h" #include @@ -491,7 +490,10 @@ initarm(void *mdp, void *unused __unused valloc_pages(abtstack, ABT_STACK_SIZE); valloc_pages(undstack, UND_STACK_SIZE); valloc_pages(kernelstack, KSTACK_PAGES); - valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE); + + init_param1(); + + valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); /* * Now we start construction of the L1 page table @@ -620,7 +622,7 @@ initarm(void *mdp, void *unused __unused pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt); msgbufp = (void *)msgbufpv.pv_va; - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); mutex_init(); /* @@ -631,7 +633,6 @@ initarm(void *mdp, void *unused __unused physmap_init((mdp != NULL) ? 0 : 1); /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: stable/8/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- stable/8/sys/arm/sa11x0/assabet_machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/arm/sa11x0/assabet_machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -227,6 +227,9 @@ initarm(void *arg, void *arg2) pcpu_init(pc, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + physical_start = (vm_offset_t) KERNBASE; physical_end = lastaddr; physical_freestart = (((vm_offset_t)physical_end) + PAGE_MASK) & ~PAGE_MASK; @@ -409,8 +412,6 @@ initarm(void *arg, void *arg2) mutex_init(); pmap_bootstrap(freemempos, 0xd0000000, &kernel_l1pt); - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: stable/8/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- stable/8/sys/arm/xscale/i80321/ep80219_machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/arm/xscale/i80321/ep80219_machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -45,8 +45,6 @@ * Created : 17/09/94 */ -#include "opt_msgbuf.h" - #include __FBSDID("$FreeBSD$"); @@ -212,6 +210,9 @@ initarm(void *arg, void *arg2) (var) = freemempos; \ memset((char *)(var), 0, ((np) * PAGE_SIZE)); + /* Do basic tuning, hz etc */ + init_param1(); + while (((freemempos - L1_TABLE_SIZE) & (L1_TABLE_SIZE - 1)) != 0) freemempos -= PAGE_SIZE; valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE); @@ -247,7 +248,7 @@ initarm(void *arg, void *arg2) valloc_pages(undstack, UND_STACK_SIZE); valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); - valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE); + valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); #ifdef ARM_USE_SMALL_ALLOC freemempos -= PAGE_SIZE; freemem_pt = trunc_page(freemem_pt); @@ -397,7 +398,7 @@ initarm(void *arg, void *arg2) pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); mutex_init(); i = 0; @@ -413,8 +414,6 @@ initarm(void *arg, void *arg2) phys_avail[i++] = 0; phys_avail[i] = 0; - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: stable/8/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- stable/8/sys/arm/xscale/i80321/iq31244_machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/arm/xscale/i80321/iq31244_machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -45,8 +45,6 @@ * Created : 17/09/94 */ -#include "opt_msgbuf.h" - #include __FBSDID("$FreeBSD$"); @@ -202,6 +200,9 @@ initarm(void *arg, void *arg2) pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + freemempos = 0xa0200000; /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ @@ -247,7 +248,7 @@ initarm(void *arg, void *arg2) valloc_pages(undstack, UND_STACK_SIZE); valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); - valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE); + valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); #ifdef ARM_USE_SMALL_ALLOC freemempos -= PAGE_SIZE; freemem_pt = trunc_page(freemem_pt); @@ -403,7 +404,7 @@ initarm(void *arg, void *arg2) pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); mutex_init(); i = 0; @@ -419,8 +420,6 @@ initarm(void *arg, void *arg2) phys_avail[i++] = 0; phys_avail[i] = 0; - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: stable/8/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- stable/8/sys/arm/xscale/i8134x/crb_machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/arm/xscale/i8134x/crb_machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -45,8 +45,6 @@ * Created : 17/09/94 */ -#include "opt_msgbuf.h" - #include __FBSDID("$FreeBSD$"); @@ -242,7 +240,7 @@ initarm(void *arg, void *arg2) valloc_pages(abtstack, ABT_STACK_SIZE); valloc_pages(undstack, UND_STACK_SIZE); valloc_pages(kernelstack, KSTACK_PAGES); - valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE); + valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); #ifdef ARM_USE_SMALL_ALLOC freemempos -= PAGE_SIZE; freemem_pt = trunc_page(freemem_pt); @@ -375,7 +373,7 @@ initarm(void *arg, void *arg2) pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); mutex_init(); i = 0; Modified: stable/8/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- stable/8/sys/arm/xscale/ixp425/avila_machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/arm/xscale/ixp425/avila_machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -45,8 +45,6 @@ * Created : 17/09/94 */ -#include "opt_msgbuf.h" - #include __FBSDID("$FreeBSD$"); @@ -247,6 +245,9 @@ initarm(void *arg, void *arg2) pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + /* * We allocate memory downwards from where we were loaded * by RedBoot; first the L1 page table, then NUM_KERNEL_PTS @@ -314,7 +315,7 @@ initarm(void *arg, void *arg2) valloc_pages(undstack, UND_STACK_SIZE); valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); - valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE); + valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); #ifdef ARM_USE_SMALL_ALLOC freemempos -= PAGE_SIZE; freemem_pt = trunc_page(freemem_pt); @@ -460,7 +461,7 @@ initarm(void *arg, void *arg2) pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); mutex_init(); i = 0; @@ -476,8 +477,6 @@ initarm(void *arg, void *arg2) phys_avail[i++] = 0; phys_avail[i] = 0; - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); Modified: stable/8/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- stable/8/sys/arm/xscale/pxa/pxa_machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/arm/xscale/pxa/pxa_machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -45,7 +45,6 @@ * Created : 17/09/94 */ -#include "opt_msgbuf.h" #include "opt_ddb.h" #include @@ -183,6 +182,9 @@ initarm(void *arg, void *arg2) pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + freemempos = 0xa0200000; /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ @@ -229,7 +231,7 @@ initarm(void *arg, void *arg2) valloc_pages(undstack, UND_STACK_SIZE); valloc_pages(kernelstack, KSTACK_PAGES); alloc_pages(minidataclean.pv_pa, 1); - valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE); + valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); #ifdef ARM_USE_SMALL_ALLOC freemempos -= PAGE_SIZE; freemem_pt = trunc_page(freemem_pt); @@ -393,7 +395,7 @@ initarm(void *arg, void *arg2) dump_avail[i] = 0; pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); mutex_init(); i = 0; @@ -425,8 +427,6 @@ initarm(void *arg, void *arg2) phys_avail[0] = round_page(virtual_avail - KERNBASE + phys_avail[0]); #endif - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: stable/8/sys/boot/common/loader.8 ============================================================================== --- stable/8/sys/boot/common/loader.8 Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/boot/common/loader.8 Tue Mar 15 08:20:59 2011 (r219662) @@ -615,6 +615,14 @@ Note that the NBUF parameter will override this limit. Modifies .Dv VM_BCACHE_SIZE_MAX . +.It Va kern.msgbufsize +Sets the size of the kernel message buffer. +The default limit of 64KB is usually sufficient unless +large amounts of trace data need to be collected +between opportunities to examine the buffer or +dump it to a file. +Overrides kernel option +.Dv MSGBUF_SIZE . .It Va machdep.disable_mtrrs Disable the use of i686 MTRRs (x86 only). .It Va net.inet.tcp.tcbhashsize Modified: stable/8/sys/boot/forth/loader.conf ============================================================================== --- stable/8/sys/boot/forth/loader.conf Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/boot/forth/loader.conf Tue Mar 15 08:20:59 2011 (r219662) @@ -99,6 +99,7 @@ module_path="/boot/modules" # Set the mo #kern.maxswzone="" # Set the max swmeta KVA storage #kern.maxtsiz="" # Set the max text size #kern.maxusers="32" # Set size of various static tables +#kern.msgbufsize="65536" # Set size of kernel message buffer #kern.nbuf="" # Set the number of buffer headers #kern.ncallout="" # Set the maximum # of timer events #kern.ngroups="1023" # Set the maximum # of supplemental groups Modified: stable/8/sys/i386/i386/machdep.c ============================================================================== --- stable/8/sys/i386/i386/machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/i386/i386/machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" #include "opt_kstack_pages.h" #include "opt_maxmem.h" -#include "opt_msgbuf.h" #include "opt_npx.h" #include "opt_perfmon.h" #include "opt_xbox.h" @@ -2116,7 +2115,7 @@ getmemsize(int first) physmem = Maxmem; basemem = 0; physmap[0] = init_first << PAGE_SHIFT; - physmap[1] = ptoa(Maxmem) - round_page(MSGBUF_SIZE); + physmap[1] = ptoa(Maxmem) - round_page(msgbufsize); physmap_idx = 0; #else #ifdef XBOX @@ -2467,7 +2466,7 @@ do_next: * calculation, etc.). */ while (phys_avail[pa_indx - 1] + PAGE_SIZE + - round_page(MSGBUF_SIZE) >= phys_avail[pa_indx]) { + round_page(msgbufsize) >= phys_avail[pa_indx]) { physmem -= atop(phys_avail[pa_indx] - phys_avail[pa_indx - 1]); phys_avail[pa_indx--] = 0; phys_avail[pa_indx--] = 0; @@ -2476,10 +2475,10 @@ do_next: Maxmem = atop(phys_avail[pa_indx]); /* Trim off space for the message buffer. */ - phys_avail[pa_indx] -= round_page(MSGBUF_SIZE); + phys_avail[pa_indx] -= round_page(msgbufsize); /* Map the message buffer. */ - for (off = 0; off < round_page(MSGBUF_SIZE); off += PAGE_SIZE) + for (off = 0; off < round_page(msgbufsize); off += PAGE_SIZE) pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] + off); @@ -2690,7 +2689,7 @@ init386(first) /* now running on new page tables, configured,and u/iom is accessible */ - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); /* transfer to user mode */ _ucodesel = GSEL(GUCODE_SEL, SEL_UPL); @@ -2951,7 +2950,7 @@ init386(first) /* now running on new page tables, configured,and u/iom is accessible */ - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); /* make a call gate to reenter kernel with */ gdp = &ldt[LSYS5CALLS_SEL].gd; Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/i386/i386/pmap.c Tue Mar 15 08:20:59 2011 (r219662) @@ -105,7 +105,6 @@ __FBSDID("$FreeBSD$"); #include "opt_cpu.h" #include "opt_pmap.h" -#include "opt_msgbuf.h" #include "opt_smp.h" #include "opt_xbox.h" @@ -452,7 +451,7 @@ pmap_bootstrap(vm_paddr_t firstaddr) /* * msgbufp is used to map the system message buffer. */ - SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE))) + SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(msgbufsize))) /* * KPTmap is used by pmap_kextract(). Modified: stable/8/sys/i386/xen/pmap.c ============================================================================== --- stable/8/sys/i386/xen/pmap.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/i386/xen/pmap.c Tue Mar 15 08:20:59 2011 (r219662) @@ -107,7 +107,6 @@ __FBSDID("$FreeBSD$"); #include "opt_cpu.h" #include "opt_pmap.h" -#include "opt_msgbuf.h" #include "opt_smp.h" #include "opt_xbox.h" @@ -470,7 +469,7 @@ pmap_bootstrap(vm_paddr_t firstaddr) /* * msgbufp is used to map the system message buffer. */ - SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE))) + SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(msgbufsize))) /* * ptemap is used for pmap_pte_quick Modified: stable/8/sys/ia64/ia64/machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/ia64/ia64/machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ddb.h" #include "opt_kstack_pages.h" -#include "opt_msgbuf.h" #include "opt_sched.h" #include @@ -888,8 +887,8 @@ ia64_init(void) /* * Initialize error message buffer (at end of core). */ - msgbufp = (struct msgbuf *)pmap_steal_memory(MSGBUF_SIZE); - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufp = (struct msgbuf *)pmap_steal_memory(msgbufsize); + msgbufinit(msgbufp, msgbufsize); proc_linkup0(&proc0, &thread0); /* Modified: stable/8/sys/kern/subr_param.c ============================================================================== --- stable/8/sys/kern/subr_param.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/kern/subr_param.c Tue Mar 15 08:20:59 2011 (r219662) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "opt_param.h" +#include "opt_msgbuf.h" #include "opt_maxusers.h" #include @@ -45,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -83,6 +85,7 @@ int maxproc; /* maximum # of processes int maxprocperuid; /* max # of procs per user */ int maxfiles; /* sys. wide open files limit */ int maxfilesperproc; /* per-proc open files limit */ +int msgbufsize; /* size of kernel message buffer */ int ncallout; /* maximum # of timer events */ int nbuf; int ngroups_max; /* max # groups per process */ @@ -106,6 +109,8 @@ SYSCTL_INT(_kern, OID_AUTO, nbuf, CTLFLA "Number of buffers in the buffer cache"); SYSCTL_INT(_kern, OID_AUTO, nswbuf, CTLFLAG_RDTUN, &nswbuf, 0, "Number of swap buffers"); +SYSCTL_INT(_kern, OID_AUTO, msgbufsize, CTLFLAG_RDTUN, &msgbufsize, 0, + "Size of the kernel message buffer"); SYSCTL_LONG(_kern, OID_AUTO, maxswzone, CTLFLAG_RDTUN, &maxswzone, 0, "Maximum memory for swap metadata"); SYSCTL_LONG(_kern, OID_AUTO, maxbcache, CTLFLAG_RDTUN, &maxbcache, 0, @@ -218,6 +223,8 @@ init_param1(void) maxbcache = VM_BCACHE_SIZE_MAX; #endif TUNABLE_LONG_FETCH("kern.maxbcache", &maxbcache); + msgbufsize = MSGBUF_SIZE; + TUNABLE_INT_FETCH("kern.msgbufsize", &msgbufsize); maxtsiz = MAXTSIZ; TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz); Modified: stable/8/sys/mips/mips/machdep.c ============================================================================== --- stable/8/sys/mips/mips/machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/mips/mips/machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include "opt_cputype.h" #include "opt_ddb.h" #include "opt_md.h" -#include "opt_msgbuf.h" #include #include Modified: stable/8/sys/mips/mips/pmap.c ============================================================================== --- stable/8/sys/mips/mips/pmap.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/mips/mips/pmap.c Tue Mar 15 08:20:59 2011 (r219662) @@ -68,7 +68,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_msgbuf.h" #include "opt_ddb.h" #include @@ -553,8 +552,8 @@ again: /* * Steal the message buffer from the beginning of memory. */ - msgbufp = (struct msgbuf *)pmap_steal_memory(MSGBUF_SIZE); - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufp = (struct msgbuf *)pmap_steal_memory(msgbufsize); + msgbufinit(msgbufp, msgbufsize); /* * Steal thread0 kstack. Modified: stable/8/sys/pc98/pc98/machdep.c ============================================================================== --- stable/8/sys/pc98/pc98/machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/pc98/pc98/machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" #include "opt_kstack_pages.h" #include "opt_maxmem.h" -#include "opt_msgbuf.h" #include "opt_npx.h" #include "opt_perfmon.h" @@ -2055,7 +2054,7 @@ do_next: * calculation, etc.). */ while (phys_avail[pa_indx - 1] + PAGE_SIZE + - round_page(MSGBUF_SIZE) >= phys_avail[pa_indx]) { + round_page(msgbufsize) >= phys_avail[pa_indx]) { physmem -= atop(phys_avail[pa_indx] - phys_avail[pa_indx - 1]); phys_avail[pa_indx--] = 0; phys_avail[pa_indx--] = 0; @@ -2064,10 +2063,10 @@ do_next: Maxmem = atop(phys_avail[pa_indx]); /* Trim off space for the message buffer. */ - phys_avail[pa_indx] -= round_page(MSGBUF_SIZE); + phys_avail[pa_indx] -= round_page(msgbufsize); /* Map the message buffer. */ - for (off = 0; off < round_page(MSGBUF_SIZE); off += PAGE_SIZE) + for (off = 0; off < round_page(msgbufsize); off += PAGE_SIZE) pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] + off); } @@ -2282,7 +2281,7 @@ init386(first) /* now running on new page tables, configured,and u/iom is accessible */ - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); /* make a call gate to reenter kernel with */ gdp = &ldt[LSYS5CALLS_SEL].gd; Modified: stable/8/sys/powerpc/aim/machdep.c ============================================================================== --- stable/8/sys/powerpc/aim/machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/powerpc/aim/machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ddb.h" #include "opt_kstack_pages.h" -#include "opt_msgbuf.h" #include #include @@ -516,7 +515,7 @@ powerpc_init(u_int startkernel, u_int en pc->pc_curpcb = thread0.td_pcb; /* Initialise the message buffer. */ - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); #ifdef KDB if (boothowto & RB_KDB) Modified: stable/8/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/powerpc/aim/mmu_oea.c Tue Mar 15 08:20:59 2011 (r219662) @@ -961,10 +961,10 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k /* * Allocate virtual address space for the message buffer. */ - pa = msgbuf_phys = moea_bootstrap_alloc(MSGBUF_SIZE, PAGE_SIZE); + pa = msgbuf_phys = moea_bootstrap_alloc(msgbufsize, PAGE_SIZE); msgbufp = (struct msgbuf *)virtual_avail; va = virtual_avail; - virtual_avail += round_page(MSGBUF_SIZE); + virtual_avail += round_page(msgbufsize); while (va < virtual_avail) { moea_kenter(mmup, va, pa); pa += PAGE_SIZE; Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Tue Mar 15 08:20:59 2011 (r219662) @@ -1018,10 +1018,10 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o /* * Allocate virtual address space for the message buffer. */ - pa = msgbuf_phys = moea64_bootstrap_alloc(MSGBUF_SIZE, PAGE_SIZE); + pa = msgbuf_phys = moea64_bootstrap_alloc(msgbufsize, PAGE_SIZE); msgbufp = (struct msgbuf *)virtual_avail; va = virtual_avail; - virtual_avail += round_page(MSGBUF_SIZE); + virtual_avail += round_page(msgbufsize); while (va < virtual_avail) { moea64_kenter(mmup, va, pa); pa += PAGE_SIZE; Modified: stable/8/sys/powerpc/booke/machdep.c ============================================================================== --- stable/8/sys/powerpc/booke/machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/powerpc/booke/machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ddb.h" #include "opt_kstack_pages.h" -#include "opt_msgbuf.h" #include #include @@ -450,7 +449,7 @@ e500_init(u_int32_t startkernel, u_int32 pc->pc_curpcb = thread0.td_pcb; /* Initialise the message buffer. */ - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); /* Enable Machine Check interrupt. */ mtmsr(mfmsr() | PSL_ME); Modified: stable/8/sys/powerpc/booke/pmap.c ============================================================================== --- stable/8/sys/powerpc/booke/pmap.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/powerpc/booke/pmap.c Tue Mar 15 08:20:59 2011 (r219662) @@ -984,7 +984,7 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset /* Allocate space for the message buffer. */ msgbufp = (struct msgbuf *)data_end; - data_end += MSGBUF_SIZE; + data_end += msgbufsize; debugf(" msgbufp at 0x%08x end = 0x%08x\n", (uint32_t)msgbufp, data_end); Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/sparc64/sparc64/machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ddb.h" #include "opt_kstack_pages.h" -#include "opt_msgbuf.h" #include #include @@ -581,7 +580,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * buffer (after setting the trap table). */ dpcpu_init(dpcpu0, 0); - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); /* * Initialize mutexes. Modified: stable/8/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/sparc64/sparc64/pmap.c Tue Mar 15 08:20:59 2011 (r219662) @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); */ #include "opt_kstack_pages.h" -#include "opt_msgbuf.h" #include "opt_pmap.h" #include @@ -399,7 +398,7 @@ pmap_bootstrap(u_int cpu_impl) /* * Allocate and map the message buffer. */ - pa = pmap_bootstrap_alloc(MSGBUF_SIZE, colors); + pa = pmap_bootstrap_alloc(msgbufsize, colors); msgbufp = (struct msgbuf *)TLB_PHYS_TO_DIRECT(pa); /* Modified: stable/8/sys/sun4v/sun4v/machdep.c ============================================================================== --- stable/8/sys/sun4v/sun4v/machdep.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/sun4v/sun4v/machdep.c Tue Mar 15 08:20:59 2011 (r219662) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ddb.h" #include "opt_kstack_pages.h" -#include "opt_msgbuf.h" #include #include @@ -503,7 +502,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l */ BVPRINTF("initialize msgbuf\n"); dpcpu_init(dpcpu0, 0); - msgbufinit(msgbufp, MSGBUF_SIZE); + msgbufinit(msgbufp, msgbufsize); BVPRINTF("initialize mutexes\n"); mutex_init(); Modified: stable/8/sys/sun4v/sun4v/pmap.c ============================================================================== --- stable/8/sys/sun4v/sun4v/pmap.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/sun4v/sun4v/pmap.c Tue Mar 15 08:20:59 2011 (r219662) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_kstack_pages.h" -#include "opt_msgbuf.h" #include "opt_pmap.h" #include "opt_trap_trace.h" @@ -779,7 +778,7 @@ skipshuffle: /* * Allocate and map the message buffer. */ - msgbuf_phys = pmap_bootstrap_alloc(MSGBUF_SIZE); + msgbuf_phys = pmap_bootstrap_alloc(msgbufsize); msgbufp = (struct msgbuf *)TLB_PHYS_TO_DIRECT(msgbuf_phys); /* Modified: stable/8/sys/sys/msgbuf.h ============================================================================== --- stable/8/sys/sys/msgbuf.h Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/sys/msgbuf.h Tue Mar 15 08:20:59 2011 (r219662) @@ -52,6 +52,7 @@ struct msgbuf { #define MSGBUF_SEQSUB(mbp, seq1, seq2) (MSGBUF_SEQNORM((mbp), (seq1) - (seq2))) #ifdef _KERNEL +extern int msgbufsize; extern int msgbuftrigger; extern struct msgbuf *msgbufp; Modified: stable/8/sys/vm/vm_page.c ============================================================================== --- stable/8/sys/vm/vm_page.c Tue Mar 15 07:15:46 2011 (r219661) +++ stable/8/sys/vm/vm_page.c Tue Mar 15 08:20:59 2011 (r219662) @@ -100,7 +100,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_msgbuf.h" #include "opt_vm.h" #include @@ -322,7 +321,7 @@ vm_page_startup(vm_offset_t vaddr) * through the direct map, they are not automatically included. */ pa = DMAP_TO_PHYS((vm_offset_t)msgbufp->msg_ptr); - last_pa = pa + round_page(MSGBUF_SIZE); + last_pa = pa + round_page(msgbufsize); while (pa < last_pa) { dump_add_page(pa); pa += PAGE_SIZE; From owner-svn-src-stable@FreeBSD.ORG Tue Mar 15 10:17:18 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F6AD106566B; Tue, 15 Mar 2011 10:17:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FBDA8FC14; Tue, 15 Mar 2011 10:17:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2FAHIeI039823; Tue, 15 Mar 2011 10:17:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2FAHIpQ039821; Tue, 15 Mar 2011 10:17:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103151017.p2FAHIpQ039821@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 15 Mar 2011 10:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219664 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2011 10:17:18 -0000 Author: kib Date: Tue Mar 15 10:17:18 2011 New Revision: 219664 URL: http://svn.freebsd.org/changeset/base/219664 Log: MFC r219396: Do not assert buffer lock in VFS_STRATEGY() when kernel already paniced. Sponsored by: The FreeBSD Foundation Modified: stable/8/sys/kern/vfs_subr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Tue Mar 15 10:13:35 2011 (r219663) +++ stable/8/sys/kern/vfs_subr.c Tue Mar 15 10:17:18 2011 (r219664) @@ -3863,7 +3863,7 @@ vop_strategy_pre(void *ap) if ((bp->b_flags & B_CLUSTER) != 0) return; - if (!BUF_ISLOCKED(bp)) { + if (panicstr == NULL && !BUF_ISLOCKED(bp)) { if (vfs_badlock_print) printf( "VOP_STRATEGY: bp is not locked but should be\n"); From owner-svn-src-stable@FreeBSD.ORG Tue Mar 15 13:19:27 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA461065672; Tue, 15 Mar 2011 13:19:27 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E142A8FC13; Tue, 15 Mar 2011 13:19:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2FDJQrF044062; Tue, 15 Mar 2011 13:19:26 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2FDJQos044060; Tue, 15 Mar 2011 13:19:26 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201103151319.p2FDJQos044060@svn.freebsd.org> From: Alexander Leidinger Date: Tue, 15 Mar 2011 13:19:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219666 - stable/8/sys/compat/linux X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2011 13:19:27 -0000 Author: netchild Date: Tue Mar 15 13:19:26 2011 New Revision: 219666 URL: http://svn.freebsd.org/changeset/base/219666 Log: MFC r218497: Linux' shm_open() fails because it wants to find some funky shmfs to construct the full pathname. It starts to search at the default mountpoint which is /dev/shm. If this fails it runs through fstab and searches for shmfs and tmpfs. Whatever it finds will be statfs()'ed to be checked for Linux' fs magic for shmfs (0x01021994). Ideally our tmpfs should deliver this fs magic to Linux processes, but as our tmpfs is considered to be an experimental feature we can not assume that there is always a tmpfs available. To make shared memory work in the Linuxulator, force the fs type of /dev/shm (which can be a symlink) to match what Linux expects. The user is responsible (info has to be added to the linux base ports and the docs) to setup a suitable link for /dev/shm. Noticed by: Andre Albsmeier Submitted by: Andre Albsmeier Modified: stable/8/sys/compat/linux/linux_stats.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/compat/linux/linux_stats.c ============================================================================== --- stable/8/sys/compat/linux/linux_stats.c Tue Mar 15 12:24:40 2011 (r219665) +++ stable/8/sys/compat/linux/linux_stats.c Tue Mar 15 13:19:26 2011 (r219666) @@ -60,6 +60,8 @@ __FBSDID("$FreeBSD$"); #include +#define LINUX_SHMFS_MAGIC 0x01021994 + static void translate_vnhook_major_minor(struct vnode *vp, struct stat *sb) { @@ -390,7 +392,7 @@ linux_statfs(struct thread *td, struct l struct l_statfs linux_statfs; struct statfs bsd_statfs; char *path; - int error; + int error, dev_shm; LCONVPATHEXIST(td, args->path, &path); @@ -398,11 +400,17 @@ linux_statfs(struct thread *td, struct l if (ldebug(statfs)) printf(ARGS(statfs, "%s, *"), path); #endif + dev_shm = 0; error = kern_statfs(td, path, UIO_SYSSPACE, &bsd_statfs); + if (strncmp(path, "/dev/shm", sizeof("/dev/shm") - 1) == 0) + dev_shm = (path[8] == '\0' + || (path[8] == '/' && path[9] == '\0')); LFREEPATH(path); if (error) return (error); bsd_to_linux_statfs(&bsd_statfs, &linux_statfs); + if (dev_shm) + linux_statfs.f_type = LINUX_SHMFS_MAGIC; return copyout(&linux_statfs, args->buf, sizeof(linux_statfs)); } From owner-svn-src-stable@FreeBSD.ORG Tue Mar 15 20:24:21 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C0E9106564A; Tue, 15 Mar 2011 20:24:21 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8668FC13; Tue, 15 Mar 2011 20:24:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2FKOLCD058400; Tue, 15 Mar 2011 20:24:21 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2FKOLmK058398; Tue, 15 Mar 2011 20:24:21 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201103152024.p2FKOLmK058398@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 15 Mar 2011 20:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219677 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2011 20:24:21 -0000 Author: jilles Date: Tue Mar 15 20:24:21 2011 New Revision: 219677 URL: http://svn.freebsd.org/changeset/base/219677 Log: MFC r218019: Do not trip a KASSERT if /dev/null cannot be opened for a setuid program. The fdcheckstd() function makes sure fds 0, 1 and 2 are open by opening /dev/null. If this fails (e.g. missing devfs or wrong permissions), fdcheckstd() will return failure and the process will exit as if it received SIGABRT. The KASSERT is only to check that kern_open() returns the expected fd, given that it succeeded. Tripping the KASSERT is most likely if fd 0 is open but fd 1 or 2 are not. Modified: stable/8/sys/kern/kern_descrip.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_descrip.c ============================================================================== --- stable/8/sys/kern/kern_descrip.c Tue Mar 15 19:47:20 2011 (r219676) +++ stable/8/sys/kern/kern_descrip.c Tue Mar 15 20:24:21 2011 (r219677) @@ -2024,10 +2024,10 @@ fdcheckstd(struct thread *td) error = kern_open(td, "/dev/null", UIO_SYSSPACE, O_RDWR, 0); devnull = td->td_retval[0]; - KASSERT(devnull == i, ("oof, we didn't get our fd")); td->td_retval[0] = save; if (error) break; + KASSERT(devnull == i, ("oof, we didn't get our fd")); } else { error = do_dup(td, DUP_FIXED, devnull, i, &retval); if (error != 0) From owner-svn-src-stable@FreeBSD.ORG Tue Mar 15 21:34:11 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 681A3106566C; Tue, 15 Mar 2011 21:34:11 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 561D18FC17; Tue, 15 Mar 2011 21:34:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2FLYBWq059999; Tue, 15 Mar 2011 21:34:11 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2FLYB66059995; Tue, 15 Mar 2011 21:34:11 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201103152134.p2FLYB66059995@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 15 Mar 2011 21:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219678 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2011 21:34:11 -0000 Author: ken Date: Tue Mar 15 21:34:10 2011 New Revision: 219678 URL: http://svn.freebsd.org/changeset/base/219678 Log: MFC: 212624, 212669, 213535 Merge the mps(4) man page. r212624 | ken | 2010-09-14 15:40:29 -0600 (Tue, 14 Sep 2010) | 7 lines MFp4 (//depot/projects/mps/...) Add a man page for the mps(4) driver, and reference it in the mpt(4) driver man page. Sponsored by: Spectra Logic Corporation r212669 | ken | 2010-09-15 10:05:51 -0600 (Wed, 15 Sep 2010) | 6 lines MFp4 (//depot/projects/mps/...) Fix a typo. Submitted by: pluknet at gmail dot com r213535 | ken | 2010-10-07 15:56:10 -0600 (Thu, 07 Oct 2010) | 36 lines Turn on serialization of task management commands going down to the controller, but make it optional. After a problem report from Andrew Boyer, it looks like the LSI chip may have issues (the watchdog timer fired) if too many aborts are sent down to the chip at the same time. We know that task management commands are serialized, and although the manual doesn't say it, it may be a good idea to just send one at a time. But, since I'm not certain that this is necessary, add a tunable and sysctl variable (hw.mps.%d.allow_multiple_tm_cmds) to control the driver's behavior. mps.c: Add support for the sysctl and tunable, and add a comment about the possible return values to mps_map_command(). mps_sas.c: Run all task management commands through two new routines, mpssas_issue_tm_request() and mpssas_complete_tm_request(). This allows us to optionally serialize task management commands. Also, change things so that the response to a task management command always comes back through the callback. (Before it could come via the callback or the return value.) mpsvar.h: Add softc variables for the list of active task management commands, the number of active commands, and whether we should allow multiple active task management commands. Add an active command flag. mps.4: Describe the new sysctl/loader tunable variable. Sponsored by: Spectra Logic Corporation Reminded by: Hubert Tournier Added: stable/8/share/man/man4/mps.4 - copied, changed from r212624, head/share/man/man4/mps.4 Modified: stable/8/share/man/man4/Makefile stable/8/share/man/man4/mpt.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Tue Mar 15 20:24:21 2011 (r219677) +++ stable/8/share/man/man4/Makefile Tue Mar 15 21:34:10 2011 (r219678) @@ -218,6 +218,7 @@ MAN= aac.4 \ mmcsd.4 \ mn.4 \ mouse.4 \ + mps.4 \ mpt.4 \ msk.4 \ mtio.4 \ Copied and modified: stable/8/share/man/man4/mps.4 (from r212624, head/share/man/man4/mps.4) ============================================================================== --- head/share/man/man4/mps.4 Tue Sep 14 21:40:29 2010 (r212624, copy source) +++ stable/8/share/man/man4/mps.4 Tue Mar 15 21:34:10 2011 (r219678) @@ -31,7 +31,7 @@ .\" .\" Author: Ken Merry .\" -.\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#1 $ +.\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#4 $ .\" $FreeBSD$ .\" .Dd September 13, 2010 @@ -51,7 +51,7 @@ place the following lines in your kernel Or, to load the driver as a module at boot, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent -mpt_load="YES" +mps_load="YES" .Ed .Sh DESCRIPTION The @@ -97,6 +97,20 @@ driver instances, set the following tuna .Bd -literal -offset indent hw.mps.disable_msix=1 .Ed +.Pp +To allow the driver to send multiple task management commands (like abort, +LUN reset, etc.), set the following variable: +.Bd -literal -offset indent +hw.mps.X.allow_multiple_tm_cmds=1 +.Ed +.Pp +via +.Xr loader.conf 5 +or +.Xr sysctl 8 , +where X is the adapter number. +By default the driver only sends one task management command at a time, to +avoid causing a potential controller lock-up. .Sh DEBUGGING To enable debugging prints from the .Nm Modified: stable/8/share/man/man4/mpt.4 ============================================================================== --- stable/8/share/man/man4/mpt.4 Tue Mar 15 20:24:21 2011 (r219677) +++ stable/8/share/man/man4/mpt.4 Tue Mar 15 21:34:10 2011 (r219678) @@ -152,6 +152,7 @@ can take on - no separate compilation is .Xr cd 4 , .Xr ch 4 , .Xr da 4 , +.Xr mps 4 , .Xr pci 4 , .Xr sa 4 , .Xr scsi 4 , From owner-svn-src-stable@FreeBSD.ORG Wed Mar 16 03:34:12 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD90A106564A; Wed, 16 Mar 2011 03:34:12 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3618FC14; Wed, 16 Mar 2011 03:34:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2G3YCcZ068157; Wed, 16 Mar 2011 03:34:12 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2G3YCYE068152; Wed, 16 Mar 2011 03:34:12 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201103160334.p2G3YCYE068152@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 16 Mar 2011 03:34:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219688 - stable/8/share/zoneinfo X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2011 03:34:12 -0000 Author: edwin Date: Wed Mar 16 03:34:12 2011 New Revision: 219688 URL: http://svn.freebsd.org/changeset/base/219688 Log: MFC of 219687, tzdata2011d: - Pacific/Apia will have DST on 2 April instead of 3 April in 2011. - Turkye will go to DST on 28 April instead of 27 April in 2011. - Cuba will go to DST on 20 April in 2011. Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: stable/8/share/zoneinfo/australasia stable/8/share/zoneinfo/etcetera stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/northamerica Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/australasia ============================================================================== --- stable/8/share/zoneinfo/australasia Wed Mar 16 03:28:42 2011 (r219687) +++ stable/8/share/zoneinfo/australasia Wed Mar 16 03:34:12 2011 (r219688) @@ -1,5 +1,5 @@ #
-# @(#)australasia	8.22
+# @(#)australasia	8.23
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -509,11 +509,31 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
+# From Raymond Hughes (2011-03-07)
+# I believe this will be posted shortly on the website
+# 
+# www.mcil.gov.ws
+# 
+#
+# PUBLIC NOTICE ON DAYLIGHT SAVING TIME
+#
+# Pursuant to the Daylight Saving Act 2009 and Cabinets decision,
+# businesses and the general public are hereby advised that daylight
+# saving time is on the first Saturday of April 2011 (02/04/11).
+#
+# The public is therefore advised that when the standard time strikes
+# the hour of four oclock (4.00am or 0400 Hours) on the 2nd April 2011,
+# then all instruments used to measure standard time are to be
+# adjusted/changed to three oclock (3:00am or 0300Hrs).
+#
+# Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
+# INDUSTRY AND LABOUR 28th February 2011
+
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
-			-11:00	1:00	WSDT	2011 Apr 3 1:00
+			-11:00	1:00	WSDT	2011 Apr 2 4:00
 			-11:00	-	WST
 
 # Solomon Is

Modified: stable/8/share/zoneinfo/etcetera
==============================================================================
--- stable/8/share/zoneinfo/etcetera	Wed Mar 16 03:28:42 2011	(r219687)
+++ stable/8/share/zoneinfo/etcetera	Wed Mar 16 03:34:12 2011	(r219688)
@@ -1,5 +1,5 @@
 # 
-# @(#)etcetera	8.2
+# @(#)etcetera	8.3
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -36,8 +36,7 @@ Link	Etc/GMT				Etc/GMT0
 # (i.e. west of Greenwich) even though many people would expect it to
 # mean 4 hours ahead of UTC (i.e. east of Greenwich).
 #
-# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation
-# (which is not yet supported by the tz code) allows for
+# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
 # TZ='+4'; if you want time zone abbreviations conforming to
 # ISO 8601 you can use TZ='<-0400>+4'.  Thus the commonly-expected
 # offset is kept within the angle bracket (and is used for display)

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Wed Mar 16 03:28:42 2011	(r219687)
+++ stable/8/share/zoneinfo/europe	Wed Mar 16 03:34:12 2011	(r219688)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.27
+# @(#)europe	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2483,25 +2483,18 @@ Zone	Europe/Zurich	0:34:08 -	LMT	1848 Se
 # (on a non-government server though) describing dates between 2002 and 2006:
 # http://www.alomaliye.com/bkk_2002_3769.htm
 
-# From Sue Williams (2008-08-11):
-# I spotted this news article about a potential change in Turkey.
-#
-# 
-# http://www.hurriyet.com.tr/english/domestic/9626174.asp?scr=1
+# From Gökdeniz Karadağ (2011-03-10):
+# 
+# According to the articles linked below, Turkey will change into summer
+# time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
+# This change is due to a nationwide exam on 27th.
+# 
+# 
+# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
 # 
-
-# From Sue Williams (2008-08-20):
-# This article says that around the end of March 2011, Turkey wants to
-# adjust the clocks forward by 1/2 hour and stay that way permanently.
-# The article indicates that this is a change in timezone offset in addition
-# to stopping observance of DST.
-# This proposal has not yet been approved.
-#
-# Read more here...
-#
-# Turkey to abandon daylight saving time in 2011
-# 
-# http://www.turkishdailynews.com.tr/article.php?enewsid=112989
+# Turkish:
+# 
+# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
 # 
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -2569,6 +2562,8 @@ Zone	Europe/Istanbul	1:55:52 -	LMT	1880
 			2:00	Turkey	EE%sT	1978 Oct 15
 			3:00	Turkey	TR%sT	1985 Apr 20 # Turkey Time
 			2:00	Turkey	EE%sT	2007
+			2:00	EU	EE%sT	2011 Mar 27 1:00u
+			2:00	-	EET	2011 Mar 28 1:00u
 			2:00	EU	EE%sT
 Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 

Modified: stable/8/share/zoneinfo/northamerica
==============================================================================
--- stable/8/share/zoneinfo/northamerica	Wed Mar 16 03:28:42 2011	(r219687)
+++ stable/8/share/zoneinfo/northamerica	Wed Mar 16 03:34:12 2011	(r219688)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.41
+# @(#)northamerica	8.42
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2606,6 +2606,21 @@ Zone America/Costa_Rica	-5:36:20 -	LMT	1
 # the time was announced as "diez cinco"--the same time as here, indicating
 # that has indeed switched to DST. Assume second Sunday from 2009 forward.
 
+# From Steffen Thorsen (2011-03-08):
+# Granma announced that Cuba is going to start DST on 2011-03-20 00:00:00
+# this year. Nothing about the end date known so far (if that has
+# changed at all).
+#
+# Source:
+# 
+# http://granma.co.cu/2011/03/08/nacional/artic01.html
+# 
+#
+# Our info:
+# 
+# http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cuba	1928	only	-	Jun	10	0:00	1:00	D
 Rule	Cuba	1928	only	-	Oct	10	0:00	0	S
@@ -2639,7 +2654,9 @@ Rule	Cuba	2000	2004	-	Apr	Sun>=1	0:00s	1
 Rule	Cuba	2006	max	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
 Rule	Cuba	2008	only	-	Mar	Sun>=15	0:00s	1:00	D
-Rule	Cuba	2009	max	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2009	2010	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2011	only	-	Mar	Sun>=15	0:00s	1:00	D
+Rule	Cuba	2012	max	-	Mar	Sun>=8	0:00s	1:00	D
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Havana	-5:29:28 -	LMT	1890

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar 16 03:34:42 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 08DB21065679;
	Wed, 16 Mar 2011 03:34:42 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EC0188FC2B;
	Wed, 16 Mar 2011 03:34:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2G3Yf7N068214;
	Wed, 16 Mar 2011 03:34:41 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2G3YfKC068209;
	Wed, 16 Mar 2011 03:34:41 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201103160334.p2G3YfKC068209@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 16 Mar 2011 03:34:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219689 - stable/7/share/zoneinfo
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 16 Mar 2011 03:34:42 -0000

Author: edwin
Date: Wed Mar 16 03:34:41 2011
New Revision: 219689
URL: http://svn.freebsd.org/changeset/base/219689

Log:
  MFC of 219687, tzdata2011d:
  
  - Pacific/Apia will have DST on 2 April instead of 3 April in 2011.
  - Turkye will go to DST on 28 April instead of 27 April in 2011.
  - Cuba will go to DST on 20 April in 2011.
  
  Obtained from:  ftp://elsie.nci.nih.gov/pub/

Modified:
  stable/7/share/zoneinfo/australasia
  stable/7/share/zoneinfo/etcetera
  stable/7/share/zoneinfo/europe
  stable/7/share/zoneinfo/northamerica
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/australasia
==============================================================================
--- stable/7/share/zoneinfo/australasia	Wed Mar 16 03:34:12 2011	(r219688)
+++ stable/7/share/zoneinfo/australasia	Wed Mar 16 03:34:41 2011	(r219689)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.22
+# @(#)australasia	8.23
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -509,11 +509,31 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
+# From Raymond Hughes (2011-03-07)
+# I believe this will be posted shortly on the website
+# 
+# www.mcil.gov.ws
+# 
+#
+# PUBLIC NOTICE ON DAYLIGHT SAVING TIME
+#
+# Pursuant to the Daylight Saving Act 2009 and Cabinets decision,
+# businesses and the general public are hereby advised that daylight
+# saving time is on the first Saturday of April 2011 (02/04/11).
+#
+# The public is therefore advised that when the standard time strikes
+# the hour of four oclock (4.00am or 0400 Hours) on the 2nd April 2011,
+# then all instruments used to measure standard time are to be
+# adjusted/changed to three oclock (3:00am or 0300Hrs).
+#
+# Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
+# INDUSTRY AND LABOUR 28th February 2011
+
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
-			-11:00	1:00	WSDT	2011 Apr 3 1:00
+			-11:00	1:00	WSDT	2011 Apr 2 4:00
 			-11:00	-	WST
 
 # Solomon Is

Modified: stable/7/share/zoneinfo/etcetera
==============================================================================
--- stable/7/share/zoneinfo/etcetera	Wed Mar 16 03:34:12 2011	(r219688)
+++ stable/7/share/zoneinfo/etcetera	Wed Mar 16 03:34:41 2011	(r219689)
@@ -1,5 +1,5 @@
 # 
-# @(#)etcetera	8.2
+# @(#)etcetera	8.3
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -36,8 +36,7 @@ Link	Etc/GMT				Etc/GMT0
 # (i.e. west of Greenwich) even though many people would expect it to
 # mean 4 hours ahead of UTC (i.e. east of Greenwich).
 #
-# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation
-# (which is not yet supported by the tz code) allows for
+# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
 # TZ='+4'; if you want time zone abbreviations conforming to
 # ISO 8601 you can use TZ='<-0400>+4'.  Thus the commonly-expected
 # offset is kept within the angle bracket (and is used for display)

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Wed Mar 16 03:34:12 2011	(r219688)
+++ stable/7/share/zoneinfo/europe	Wed Mar 16 03:34:41 2011	(r219689)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.27
+# @(#)europe	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2483,25 +2483,18 @@ Zone	Europe/Zurich	0:34:08 -	LMT	1848 Se
 # (on a non-government server though) describing dates between 2002 and 2006:
 # http://www.alomaliye.com/bkk_2002_3769.htm
 
-# From Sue Williams (2008-08-11):
-# I spotted this news article about a potential change in Turkey.
-#
-# 
-# http://www.hurriyet.com.tr/english/domestic/9626174.asp?scr=1
+# From Gökdeniz Karadağ (2011-03-10):
+# 
+# According to the articles linked below, Turkey will change into summer
+# time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
+# This change is due to a nationwide exam on 27th.
+# 
+# 
+# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
 # 
-
-# From Sue Williams (2008-08-20):
-# This article says that around the end of March 2011, Turkey wants to
-# adjust the clocks forward by 1/2 hour and stay that way permanently.
-# The article indicates that this is a change in timezone offset in addition
-# to stopping observance of DST.
-# This proposal has not yet been approved.
-#
-# Read more here...
-#
-# Turkey to abandon daylight saving time in 2011
-# 
-# http://www.turkishdailynews.com.tr/article.php?enewsid=112989
+# Turkish:
+# 
+# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
 # 
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -2569,6 +2562,8 @@ Zone	Europe/Istanbul	1:55:52 -	LMT	1880
 			2:00	Turkey	EE%sT	1978 Oct 15
 			3:00	Turkey	TR%sT	1985 Apr 20 # Turkey Time
 			2:00	Turkey	EE%sT	2007
+			2:00	EU	EE%sT	2011 Mar 27 1:00u
+			2:00	-	EET	2011 Mar 28 1:00u
 			2:00	EU	EE%sT
 Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 

Modified: stable/7/share/zoneinfo/northamerica
==============================================================================
--- stable/7/share/zoneinfo/northamerica	Wed Mar 16 03:34:12 2011	(r219688)
+++ stable/7/share/zoneinfo/northamerica	Wed Mar 16 03:34:41 2011	(r219689)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.41
+# @(#)northamerica	8.42
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2606,6 +2606,21 @@ Zone America/Costa_Rica	-5:36:20 -	LMT	1
 # the time was announced as "diez cinco"--the same time as here, indicating
 # that has indeed switched to DST. Assume second Sunday from 2009 forward.
 
+# From Steffen Thorsen (2011-03-08):
+# Granma announced that Cuba is going to start DST on 2011-03-20 00:00:00
+# this year. Nothing about the end date known so far (if that has
+# changed at all).
+#
+# Source:
+# 
+# http://granma.co.cu/2011/03/08/nacional/artic01.html
+# 
+#
+# Our info:
+# 
+# http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cuba	1928	only	-	Jun	10	0:00	1:00	D
 Rule	Cuba	1928	only	-	Oct	10	0:00	0	S
@@ -2639,7 +2654,9 @@ Rule	Cuba	2000	2004	-	Apr	Sun>=1	0:00s	1
 Rule	Cuba	2006	max	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
 Rule	Cuba	2008	only	-	Mar	Sun>=15	0:00s	1:00	D
-Rule	Cuba	2009	max	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2009	2010	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2011	only	-	Mar	Sun>=15	0:00s	1:00	D
+Rule	Cuba	2012	max	-	Mar	Sun>=8	0:00s	1:00	D
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Havana	-5:29:28 -	LMT	1890

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar 16 03:35:13 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 680C41065670;
	Wed, 16 Mar 2011 03:35:13 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 56F028FC14;
	Wed, 16 Mar 2011 03:35:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2G3ZD34068279;
	Wed, 16 Mar 2011 03:35:13 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2G3ZD4L068274;
	Wed, 16 Mar 2011 03:35:13 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201103160335.p2G3ZD4L068274@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 16 Mar 2011 03:35:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219690 - stable/6/share/zoneinfo
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 16 Mar 2011 03:35:13 -0000

Author: edwin
Date: Wed Mar 16 03:35:12 2011
New Revision: 219690
URL: http://svn.freebsd.org/changeset/base/219690

Log:
  MFC of 219687, tzdata2011d:
  
  - Pacific/Apia will have DST on 2 April instead of 3 April in 2011.
  - Turkye will go to DST on 28 April instead of 27 April in 2011.
  - Cuba will go to DST on 20 April in 2011.
  
  Obtained from:  ftp://elsie.nci.nih.gov/pub/

Modified:
  stable/6/share/zoneinfo/australasia
  stable/6/share/zoneinfo/etcetera
  stable/6/share/zoneinfo/europe
  stable/6/share/zoneinfo/northamerica
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/australasia
==============================================================================
--- stable/6/share/zoneinfo/australasia	Wed Mar 16 03:34:41 2011	(r219689)
+++ stable/6/share/zoneinfo/australasia	Wed Mar 16 03:35:12 2011	(r219690)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.22
+# @(#)australasia	8.23
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -509,11 +509,31 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
+# From Raymond Hughes (2011-03-07)
+# I believe this will be posted shortly on the website
+# 
+# www.mcil.gov.ws
+# 
+#
+# PUBLIC NOTICE ON DAYLIGHT SAVING TIME
+#
+# Pursuant to the Daylight Saving Act 2009 and Cabinets decision,
+# businesses and the general public are hereby advised that daylight
+# saving time is on the first Saturday of April 2011 (02/04/11).
+#
+# The public is therefore advised that when the standard time strikes
+# the hour of four oclock (4.00am or 0400 Hours) on the 2nd April 2011,
+# then all instruments used to measure standard time are to be
+# adjusted/changed to three oclock (3:00am or 0300Hrs).
+#
+# Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
+# INDUSTRY AND LABOUR 28th February 2011
+
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
-			-11:00	1:00	WSDT	2011 Apr 3 1:00
+			-11:00	1:00	WSDT	2011 Apr 2 4:00
 			-11:00	-	WST
 
 # Solomon Is

Modified: stable/6/share/zoneinfo/etcetera
==============================================================================
--- stable/6/share/zoneinfo/etcetera	Wed Mar 16 03:34:41 2011	(r219689)
+++ stable/6/share/zoneinfo/etcetera	Wed Mar 16 03:35:12 2011	(r219690)
@@ -1,5 +1,5 @@
 # 
-# @(#)etcetera	8.2
+# @(#)etcetera	8.3
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -36,8 +36,7 @@ Link	Etc/GMT				Etc/GMT0
 # (i.e. west of Greenwich) even though many people would expect it to
 # mean 4 hours ahead of UTC (i.e. east of Greenwich).
 #
-# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation
-# (which is not yet supported by the tz code) allows for
+# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
 # TZ='+4'; if you want time zone abbreviations conforming to
 # ISO 8601 you can use TZ='<-0400>+4'.  Thus the commonly-expected
 # offset is kept within the angle bracket (and is used for display)

Modified: stable/6/share/zoneinfo/europe
==============================================================================
--- stable/6/share/zoneinfo/europe	Wed Mar 16 03:34:41 2011	(r219689)
+++ stable/6/share/zoneinfo/europe	Wed Mar 16 03:35:12 2011	(r219690)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.27
+# @(#)europe	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2483,25 +2483,18 @@ Zone	Europe/Zurich	0:34:08 -	LMT	1848 Se
 # (on a non-government server though) describing dates between 2002 and 2006:
 # http://www.alomaliye.com/bkk_2002_3769.htm
 
-# From Sue Williams (2008-08-11):
-# I spotted this news article about a potential change in Turkey.
-#
-# 
-# http://www.hurriyet.com.tr/english/domestic/9626174.asp?scr=1
+# From Gökdeniz Karadağ (2011-03-10):
+# 
+# According to the articles linked below, Turkey will change into summer
+# time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
+# This change is due to a nationwide exam on 27th.
+# 
+# 
+# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
 # 
-
-# From Sue Williams (2008-08-20):
-# This article says that around the end of March 2011, Turkey wants to
-# adjust the clocks forward by 1/2 hour and stay that way permanently.
-# The article indicates that this is a change in timezone offset in addition
-# to stopping observance of DST.
-# This proposal has not yet been approved.
-#
-# Read more here...
-#
-# Turkey to abandon daylight saving time in 2011
-# 
-# http://www.turkishdailynews.com.tr/article.php?enewsid=112989
+# Turkish:
+# 
+# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
 # 
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -2569,6 +2562,8 @@ Zone	Europe/Istanbul	1:55:52 -	LMT	1880
 			2:00	Turkey	EE%sT	1978 Oct 15
 			3:00	Turkey	TR%sT	1985 Apr 20 # Turkey Time
 			2:00	Turkey	EE%sT	2007
+			2:00	EU	EE%sT	2011 Mar 27 1:00u
+			2:00	-	EET	2011 Mar 28 1:00u
 			2:00	EU	EE%sT
 Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 

Modified: stable/6/share/zoneinfo/northamerica
==============================================================================
--- stable/6/share/zoneinfo/northamerica	Wed Mar 16 03:34:41 2011	(r219689)
+++ stable/6/share/zoneinfo/northamerica	Wed Mar 16 03:35:12 2011	(r219690)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.41
+# @(#)northamerica	8.42
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2606,6 +2606,21 @@ Zone America/Costa_Rica	-5:36:20 -	LMT	1
 # the time was announced as "diez cinco"--the same time as here, indicating
 # that has indeed switched to DST. Assume second Sunday from 2009 forward.
 
+# From Steffen Thorsen (2011-03-08):
+# Granma announced that Cuba is going to start DST on 2011-03-20 00:00:00
+# this year. Nothing about the end date known so far (if that has
+# changed at all).
+#
+# Source:
+# 
+# http://granma.co.cu/2011/03/08/nacional/artic01.html
+# 
+#
+# Our info:
+# 
+# http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cuba	1928	only	-	Jun	10	0:00	1:00	D
 Rule	Cuba	1928	only	-	Oct	10	0:00	0	S
@@ -2639,7 +2654,9 @@ Rule	Cuba	2000	2004	-	Apr	Sun>=1	0:00s	1
 Rule	Cuba	2006	max	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
 Rule	Cuba	2008	only	-	Mar	Sun>=15	0:00s	1:00	D
-Rule	Cuba	2009	max	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2009	2010	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2011	only	-	Mar	Sun>=15	0:00s	1:00	D
+Rule	Cuba	2012	max	-	Mar	Sun>=8	0:00s	1:00	D
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Havana	-5:29:28 -	LMT	1890

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar 16 14:03:48 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C3DDC106564A;
	Wed, 16 Mar 2011 14:03:48 +0000 (UTC) (envelope-from bob@immure.com)
Received: from maul.immure.com (adsl-66-136-206-1.dsl.austtx.swbell.net
	[66.136.206.1])
	by mx1.freebsd.org (Postfix) with ESMTP id 461E38FC12;
	Wed, 16 Mar 2011 14:03:48 +0000 (UTC)
Received: from rancor.immure.com (rancor.immure.com [10.1.132.9])
	by maul.immure.com (8.14.4/8.14.4) with ESMTP id p2GDpMUC002059;
	Wed, 16 Mar 2011 08:51:22 -0500 (CDT) (envelope-from bob@immure.com)
Received: (from bob@localhost)
	by rancor.immure.com (8.14.4/8.14.4/Submit) id p2GDpMfO012793;
	Wed, 16 Mar 2011 08:51:22 -0500 (CDT) (envelope-from bob)
Date: Wed, 16 Mar 2011 08:51:22 -0500
From: Bob Willcox 
To: Alexander Motin 
Message-ID: <20110316135122.GB7185@rancor.immure.com>
References: <201102052134.p15LYRmw041695@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh"
Content-Disposition: inline
In-Reply-To: <201102052134.p15LYRmw041695@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-immure-MailScanner-Information: Please contact the ISP for more information
X-immure-MailScanner-ID: p2GDpMUC002059
X-immure-MailScanner: Found to be clean
X-immure-MailScanner-From: bob@immure.com
X-Spam-Status: No
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r218347 - stable/8/sys/dev/ata/chipsets
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Bob Willcox 
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 16 Mar 2011 14:03:48 -0000


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

This change has broken SATA disk support on my Intel Atom D525 ITX system. By
reverting this change 8.2-STABLE works again on this system.

My 'uname -a' output is:

FreeBSD maul.immure.com 8.2-STABLE FreeBSD 8.2-STABLE #6: Wed Mar 16 08:15:43 CDT 2011     bob@maul.immure.com:/usr/obj/usr/src/sys/MAUL  amd64

When booting the system I get tons of these messages:

Mar 16 07:38:19 maul kernel: ad4: WARNING - SETFEATURES ENABLE RCACHE requeued due to channel reset
Mar 16 07:38:19 maul kernel: ad4: interrupt on idle channel ignored

repeated over and over, and then lots of these:

Mar 16 07:38:21 maul kernel: ad4: WARNING - READ_DMA48 requeued due to channel reset LBA=617964479
Mar 16 07:38:21 maul kernel: ata2: FAILURE - already active DMA on this device
Mar 16 07:38:21 maul kernel: ata2: setting up DMA failed

for different LBA values.

As one might expect, I then start seeing I/O errors on the disk and programs
failing

I've attached the 'pciconf -lv' output.

Bob

On Sat, Feb 05, 2011 at 09:34:27PM +0000, Alexander Motin wrote:
> Author: mav
> Date: Sat Feb  5 21:34:26 2011
> New Revision: 218347
> URL: http://svn.freebsd.org/changeset/base/218347
> 
> Log:
>   MFC r217774:
>   ICH7 SATA controller in legacy mode can provide access to SATA registers
>   via AHCI-like memory resource at BAR(5). Use it if BIOS was so kind to
>   allocate memory for that BAR. This allows hot-plug support and connection
>   speed reporting.
> 
> Modified:
>   stable/8/sys/dev/ata/chipsets/ata-intel.c
> Directory Properties:
>   stable/8/sys/   (props changed)
>   stable/8/sys/amd64/include/xen/   (props changed)
>   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
>   stable/8/sys/contrib/dev/acpica/   (props changed)
>   stable/8/sys/contrib/pf/   (props changed)
> 
> Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c
> ==============================================================================
> --- stable/8/sys/dev/ata/chipsets/ata-intel.c	Sat Feb  5 21:24:37 2011	(r218346)
> +++ stable/8/sys/dev/ata/chipsets/ata-intel.c	Sat Feb  5 21:34:26 2011	(r218347)
> @@ -60,10 +60,14 @@ static int ata_intel_new_setmode(device_
>  static int ata_intel_sch_setmode(device_t dev, int target, int mode);
>  static int ata_intel_sata_getrev(device_t dev, int target);
>  static int ata_intel_sata_status(device_t dev);
> +static int ata_intel_sata_ahci_read(device_t dev, int port,
> +    int reg, u_int32_t *result);
>  static int ata_intel_sata_cscr_read(device_t dev, int port,
>      int reg, u_int32_t *result);
>  static int ata_intel_sata_sidpr_read(device_t dev, int port,
>      int reg, u_int32_t *result);
> +static int ata_intel_sata_ahci_write(device_t dev, int port,
> +    int reg, u_int32_t result);
>  static int ata_intel_sata_cscr_write(device_t dev, int port,
>      int reg, u_int32_t result);
>  static int ata_intel_sata_sidpr_write(device_t dev, int port,
> @@ -79,6 +83,7 @@ static void ata_intel_31244_reset(device
>  #define INTEL_ICH5	2
>  #define INTEL_6CH	4
>  #define INTEL_6CH2	8
> +#define INTEL_ICH7	16
>  
>  /*
>   * Intel chipset support functions
> @@ -113,11 +118,11 @@ ata_intel_probe(device_t dev)
>       { ATA_I82801FB_R1,  0, INTEL_AHCI, 0, ATA_SA150, "ICH6" },
>       { ATA_I82801FBM,    0, INTEL_AHCI, 0, ATA_SA150, "ICH6M" },
>       { ATA_I82801GB,     0,          0, 1, ATA_UDMA5, "ICH7" },
> -     { ATA_I82801GB_S1,  0,          0, 0, ATA_SA300, "ICH7" },
> -     { ATA_I82801GB_R1,  0,          0, 0, ATA_SA300, "ICH7" },
> +     { ATA_I82801GB_S1,  0, INTEL_ICH7, 0, ATA_SA300, "ICH7" },
> +     { ATA_I82801GB_R1,  0, INTEL_AHCI, 0, ATA_SA300, "ICH7" },
>       { ATA_I82801GB_AH,  0, INTEL_AHCI, 0, ATA_SA300, "ICH7" },
> -     { ATA_I82801GBM_S1, 0,          0, 0, ATA_SA150, "ICH7M" },
> -     { ATA_I82801GBM_R1, 0,          0, 0, ATA_SA150, "ICH7M" },
> +     { ATA_I82801GBM_S1, 0, INTEL_ICH7, 0, ATA_SA150, "ICH7M" },
> +     { ATA_I82801GBM_R1, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" },
>       { ATA_I82801GBM_AH, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" },
>       { ATA_I63XXESB2,    0,          0, 1, ATA_UDMA5, "63XXESB2" },
>       { ATA_I63XXESB2_S1, 0,          0, 0, ATA_SA300, "63XXESB2" },
> @@ -250,14 +255,30 @@ ata_intel_chipinit(device_t dev)
>  	    (pci_read_config(dev, 0x90, 1) & 0xc0) &&
>  	    (ata_ahci_chipinit(dev) != ENXIO))
>  	    return 0;
> -	
> -	/* if BAR(5) is IO it should point to SATA interface registers */
> -	ctlr->r_type2 = SYS_RES_IOPORT;
> -	ctlr->r_rid2 = PCIR_BAR(5);
> -	if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
> -						   &ctlr->r_rid2, RF_ACTIVE))
> -	    || (ctlr->chip->cfg1 & INTEL_ICH5))
> -	    ctlr->getrev = ata_intel_sata_getrev;
> +
> +	/* BAR(5) may point to SATA interface registers */
> +	if ((ctlr->chip->cfg1 & INTEL_ICH7)) {
> +		ctlr->r_type2 = SYS_RES_MEMORY;
> +		ctlr->r_rid2 = PCIR_BAR(5);
> +		ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
> +		    &ctlr->r_rid2, RF_ACTIVE);
> +		if (ctlr->r_res2 != NULL) {
> +			/* Set SCRAE bit to enable registers access. */
> +			pci_write_config(dev, 0x94,
> +			    pci_read_config(dev, 0x94, 4) | (1 << 9), 4);
> +			/* Set Ports Implemented register bits. */
> +			ATA_OUTL(ctlr->r_res2, 0x0C,
> +			    ATA_INL(ctlr->r_res2, 0x0C) | 0xf);
> +		}
> +	} else {
> +		ctlr->r_type2 = SYS_RES_IOPORT;
> +		ctlr->r_rid2 = PCIR_BAR(5);
> +		ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
> +		    &ctlr->r_rid2, RF_ACTIVE);
> +	}
> +	if (ctlr->r_res2 != NULL ||
> +	    (ctlr->chip->cfg1 & INTEL_ICH5))
> +		ctlr->getrev = ata_intel_sata_getrev;
>  	ctlr->setmode = ata_sata_setmode;
>      }
>      return 0;
> @@ -336,8 +357,13 @@ ata_intel_ch_attach(device_t dev)
>  			} else if (ctlr->r_res2) {
>  				ch->flags |= ATA_PERIODIC_POLL;
>  				ch->hw.status = ata_intel_sata_status;
> -				ch->hw.pm_read = ata_intel_sata_sidpr_read;
> -				ch->hw.pm_write = ata_intel_sata_sidpr_write;
> +				if ((ctlr->chip->cfg1 & INTEL_ICH7)) {
> +					ch->hw.pm_read = ata_intel_sata_ahci_read;
> +					ch->hw.pm_write = ata_intel_sata_ahci_write;
> +				} else {
> +					ch->hw.pm_read = ata_intel_sata_sidpr_read;
> +					ch->hw.pm_write = ata_intel_sata_sidpr_write;
> +				};
>  			}
>  			if (ch->hw.pm_write != NULL) {
>  				ata_sata_scr_write(ch, 0,
> @@ -537,6 +563,38 @@ ata_intel_sata_status(device_t dev)
>  }
>  
>  static int
> +ata_intel_sata_ahci_read(device_t dev, int port, int reg, u_int32_t *result)
> +{
> +	struct ata_pci_controller *ctlr;
> +	struct ata_channel *ch;
> +	device_t parent;
> +	u_char *smap;
> +	int offset;
> +
> +	parent = device_get_parent(dev);
> +	ctlr = device_get_softc(parent);
> +	ch = device_get_softc(dev);
> +	port = (port == 1) ? 1 : 0;
> +	smap = (u_char *)&ctlr->chipset_data + ch->unit * 2;
> +	offset = 0x100 + smap[port] * 0x80;
> +	switch (reg) {
> +	case ATA_SSTATUS:
> +	    reg = 0x28;
> +	    break;
> +	case ATA_SCONTROL:
> +	    reg = 0x2c;
> +	    break;
> +	case ATA_SERROR:
> +	    reg = 0x30;
> +	    break;
> +	default:
> +	    return (EINVAL);
> +	}
> +	*result = ATA_INL(ctlr->r_res2, offset + reg);
> +	return (0);
> +}
> +
> +static int
>  ata_intel_sata_cscr_read(device_t dev, int port, int reg, u_int32_t *result)
>  {
>  	struct ata_pci_controller *ctlr;
> @@ -598,6 +656,38 @@ ata_intel_sata_sidpr_read(device_t dev, 
>  }
>  
>  static int
> +ata_intel_sata_ahci_write(device_t dev, int port, int reg, u_int32_t value)
> +{
> +	struct ata_pci_controller *ctlr;
> +	struct ata_channel *ch;
> +	device_t parent;
> +	u_char *smap;
> +	int offset;
> +
> +	parent = device_get_parent(dev);
> +	ctlr = device_get_softc(parent);
> +	ch = device_get_softc(dev);
> +	port = (port == 1) ? 1 : 0;
> +	smap = (u_char *)&ctlr->chipset_data + ch->unit * 2;
> +	offset = 0x100 + smap[port] * 0x80;
> +	switch (reg) {
> +	case ATA_SSTATUS:
> +	    reg = 0x28;
> +	    break;
> +	case ATA_SCONTROL:
> +	    reg = 0x2c;
> +	    break;
> +	case ATA_SERROR:
> +	    reg = 0x30;
> +	    break;
> +	default:
> +	    return (EINVAL);
> +	}
> +	ATA_OUTL(ctlr->r_res2, offset + reg, value);
> +	return (0);
> +}
> +
> +static int
>  ata_intel_sata_cscr_write(device_t dev, int port, int reg, u_int32_t value)
>  {
>  	struct ata_pci_controller *ctlr;
> _______________________________________________
> svn-src-all@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"

-- 
Bob Willcox              Trying to explain things to people who already know
bob@immure.com           everything is like trying to teach a bear to dance;
Austin, TX               it's useless, and it annoys the bear.

--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pciconf.out"

hostb0@pci0:0:0:0:	class=0x060000 card=0x574d8086 chip=0xa0008086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:0:2:0:	class=0x030000 card=0x574d8086 chip=0xa0018086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = display
    subclass   = VGA
none0@pci0:0:27:0:	class=0x040300 card=0xd6258086 chip=0x27d88086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'IDT High Definition Audio Driver  (BA101897)'
    class      = multimedia
    subclass   = HDA
pcib1@pci0:0:28:0:	class=0x060400 card=0x574d8086 chip=0x27d08086 rev=0x01 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:28:1:	class=0x060400 card=0x574d8086 chip=0x27d28086 rev=0x01 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:28:2:	class=0x060400 card=0x574d8086 chip=0x27d48086 rev=0x01 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:28:3:	class=0x060400 card=0x574d8086 chip=0x27d68086 rev=0x01 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI
uhci0@pci0:0:29:0:	class=0x0c0300 card=0x574d8086 chip=0x27c88086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
uhci1@pci0:0:29:1:	class=0x0c0300 card=0x574d8086 chip=0x27c98086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
uhci2@pci0:0:29:2:	class=0x0c0300 card=0x574d8086 chip=0x27ca8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
uhci3@pci0:0:29:3:	class=0x0c0300 card=0x574d8086 chip=0x27cb8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
ehci0@pci0:0:29:7:	class=0x0c0320 card=0x574d8086 chip=0x27cc8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB 2.0 Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
pcib5@pci0:0:30:0:	class=0x060401 card=0x574d8086 chip=0x24488086 rev=0xe1 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801 Family (ICH2/3/4/5/6/7/8/9-M) Hub Interface to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:	class=0x060100 card=0x574d8086 chip=0x27bc8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:0:31:2:	class=0x01018f card=0x574d8086 chip=0x27c08086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller'
    class      = mass storage
    subclass   = ATA
none1@pci0:0:31:3:	class=0x0c0500 card=0x574d8086 chip=0x27da8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Intel[R] 82801G (ICH7 Family) C- 27DA (82801G)'
    class      = serial bus
    subclass   = SMBus
re0@pci0:1:0:0:	class=0x020000 card=0xd6258086 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet
em0@pci0:5:0:0:	class=0x020000 card=0x13768086 chip=0x107c8086 rev=0x05 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Gigabit Ethernet Controller (Copper) rev 5 (82541PI)'
    class      = network
    subclass   = ethernet

--NzB8fVQJ5HfG6fxh--

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar 16 23:56:36 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E0DA7106564A;
	Wed, 16 Mar 2011 23:56:35 +0000 (UTC)
	(envelope-from mavbsd@gmail.com)
Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com
	[209.85.161.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 4229E8FC0A;
	Wed, 16 Mar 2011 23:56:34 +0000 (UTC)
Received: by fxm11 with SMTP id 11so2550011fxm.13
	for ; Wed, 16 Mar 2011 16:56:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:sender:message-id:date:from:user-agent
	:mime-version:to:cc:subject:references:in-reply-to:content-type
	:content-transfer-encoding;
	bh=nOyUqGcmKmiyr+2hGiGjyIUU3ab0/HfJxdSgGcg/ZHY=;
	b=JvHYGvV8XeEUvFpi3JgsrF+oB1f44chjKtOW/H8Ei4Z8wIxsqjyC97pe2cNIwNXwJ5
	w72C+rb4/iYwUUmET+r0sbkU8V2XznCoaZT1vB4iKpJlt6MyRb4IbV+UVFhrIRlSz8ek
	p0sw6Xm6Dxq9Gpc8hS5OJ6zeTvezRIeYySpeQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	b=jKDnVqIzF6DINvgCoBMSXFrAxk9ZcsNTltjuhYwcrYAVFi+TKkfc0gmlWdCVDqqX2M
	lmnappH+8HK5pWwhguDgnG4VoFY/xi+nNJfgwSnv8CNNTQ4xX4nVSc/UBuJgjdAqYI7/
	9Vb5e/+zjWjpYhkiELt0gfmomizcOmyASaDIM=
Received: by 10.223.27.129 with SMTP id i1mr380443fac.24.1300319389949;
	Wed, 16 Mar 2011 16:49:49 -0700 (PDT)
Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226])
	by mx.google.com with ESMTPS id l2sm81548fam.5.2011.03.16.16.49.48
	(version=SSLv3 cipher=OTHER); Wed, 16 Mar 2011 16:49:49 -0700 (PDT)
Sender: Alexander Motin 
Message-ID: <4D814C90.5090304@FreeBSD.org>
Date: Thu, 17 Mar 2011 01:49:36 +0200
From: Alexander Motin 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9
MIME-Version: 1.0
To: Bob Willcox 
References: <201102052134.p15LYRmw041695@svn.freebsd.org>
	<20110316135122.GB7185@rancor.immure.com>
	<4D814AAA.3070801@FreeBSD.org>
In-Reply-To: <4D814AAA.3070801@FreeBSD.org>
Content-Type: text/plain; charset=KOI8-R; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r218347 - stable/8/sys/dev/ata/chipsets
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 16 Mar 2011 23:56:36 -0000

On 17.03.2011 01:41, Alexander Motin wrote:
> On 16.03.2011 15:51, Bob Willcox wrote:
>> This change has broken SATA disk support on my Intel Atom D525 ITX
>> system. By
>> reverting this change 8.2-STABLE works again on this system.
>>
>> My 'uname -a' output is:
>>
>> FreeBSD maul.immure.com 8.2-STABLE FreeBSD 8.2-STABLE #6: Wed Mar 16
>> 08:15:43 CDT 2011 bob@maul.immure.com:/usr/obj/usr/src/sys/MAUL amd64
>>
>> When booting the system I get tons of these messages:
>>
>> Mar 16 07:38:19 maul kernel: ad4: WARNING - SETFEATURES ENABLE RCACHE
>> requeued due to channel reset
>> Mar 16 07:38:19 maul kernel: ad4: interrupt on idle channel ignored
>
> As I can see, it means that channel has some active request, but it is
> in IDLE state. It is strange, but I won't be surprised much if it is the
> result of some locking problem in ata(4) in non-CAM mode.
>
>> repeated over and over, and then lots of these:
>>
>> Mar 16 07:38:21 maul kernel: ad4: WARNING - READ_DMA48 requeued due to
>> channel reset LBA=617964479
>> Mar 16 07:38:21 maul kernel: ata2: FAILURE - already active DMA on
>> this device
>> Mar 16 07:38:21 maul kernel: ata2: setting up DMA failed
>>
>> for different LBA values.
>>
>> As one might expect, I then start seeing I/O errors on the disk and
>> programs
>> failing
>>
>> I've attached the 'pciconf -lv' output.
>
> Send me please full verbose log, if you can save it. I am especially
> interested in place around first errors.
>
> You may try to build kernel with `options ATA_CAM` to see if it helps.
> I've mostly tested this patch in that mode.

PS: I think commenting "ch->flags |= ATA_PERIODIC_POLL;" lines in 
ata-intel.c should effectively neutralize this change and probably hide 
the problem back. As last resort.

>> On Sat, Feb 05, 2011 at 09:34:27PM +0000, Alexander Motin wrote:
>>> Author: mav
>>> Date: Sat Feb 5 21:34:26 2011
>>> New Revision: 218347
>>> URL: http://svn.freebsd.org/changeset/base/218347
>>>
>>> Log:
>>> MFC r217774:
>>> ICH7 SATA controller in legacy mode can provide access to SATA registers
>>> via AHCI-like memory resource at BAR(5). Use it if BIOS was so kind to
>>> allocate memory for that BAR. This allows hot-plug support and
>>> connection
>>> speed reporting.

-- 
Alexander Motin

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar 17 00:11:31 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BF83A106566B;
	Thu, 17 Mar 2011 00:11:31 +0000 (UTC)
	(envelope-from mavbsd@gmail.com)
Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com
	[209.85.161.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 274B18FC18;
	Thu, 17 Mar 2011 00:11:30 +0000 (UTC)
Received: by fxm11 with SMTP id 11so2559188fxm.13
	for ; Wed, 16 Mar 2011 17:11:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:sender:message-id:date:from:user-agent
	:mime-version:to:cc:subject:references:in-reply-to:content-type
	:content-transfer-encoding;
	bh=RxxZ/xQMU/uXNAH660EalUox7NIWDc/wtiGYkYrO7J4=;
	b=wuhqt1WmWLWF0Jh2/sYlKr6BjigZC7LSLqPKAjRGksLWjyXPubmMw6n0uqW5LzecUF
	UuUN4qpzYceD6aVToJljfKx7vvsv4UTcrFQ/y4VhU4ehfoLY0590ezIsfv31fbkjCRlv
	xmJtyWLFHF9OYLpCYGESsegay9eJFhmwHPdpA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	b=r8qItLS6Fss+aD0ZVmrTcqSNZw9qRUNhqsc621FQYml6qMhCF3p6qMowcZZLqdtnk0
	E51iYtLrBt/3GPlejHIFr9U6tafeoiw38mTscIXiqbuH01Ggi/uiqZVrtLrp8utdhXVT
	03Ni0s56CG7eucNS6eFxm13wY4qWEY9tIgs8o=
Received: by 10.223.14.207 with SMTP id h15mr677933faa.50.1300318903975;
	Wed, 16 Mar 2011 16:41:43 -0700 (PDT)
Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226])
	by mx.google.com with ESMTPS id 21sm675571fav.17.2011.03.16.16.41.42
	(version=SSLv3 cipher=OTHER); Wed, 16 Mar 2011 16:41:43 -0700 (PDT)
Sender: Alexander Motin 
Message-ID: <4D814AAA.3070801@FreeBSD.org>
Date: Thu, 17 Mar 2011 01:41:30 +0200
From: Alexander Motin 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9
MIME-Version: 1.0
To: Bob Willcox 
References: <201102052134.p15LYRmw041695@svn.freebsd.org>
	<20110316135122.GB7185@rancor.immure.com>
In-Reply-To: <20110316135122.GB7185@rancor.immure.com>
Content-Type: text/plain; charset=KOI8-R; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r218347 - stable/8/sys/dev/ata/chipsets
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 17 Mar 2011 00:11:31 -0000

On 16.03.2011 15:51, Bob Willcox wrote:
> This change has broken SATA disk support on my Intel Atom D525 ITX system. By
> reverting this change 8.2-STABLE works again on this system.
>
> My 'uname -a' output is:
>
> FreeBSD maul.immure.com 8.2-STABLE FreeBSD 8.2-STABLE #6: Wed Mar 16 08:15:43 CDT 2011     bob@maul.immure.com:/usr/obj/usr/src/sys/MAUL  amd64
>
> When booting the system I get tons of these messages:
>
> Mar 16 07:38:19 maul kernel: ad4: WARNING - SETFEATURES ENABLE RCACHE requeued due to channel reset
> Mar 16 07:38:19 maul kernel: ad4: interrupt on idle channel ignored

As I can see, it means that channel has some active request, but it is 
in IDLE state. It is strange, but I won't be surprised much if it is the 
result of some locking problem in ata(4) in non-CAM mode.

> repeated over and over, and then lots of these:
>
> Mar 16 07:38:21 maul kernel: ad4: WARNING - READ_DMA48 requeued due to channel reset LBA=617964479
> Mar 16 07:38:21 maul kernel: ata2: FAILURE - already active DMA on this device
> Mar 16 07:38:21 maul kernel: ata2: setting up DMA failed
>
> for different LBA values.
>
> As one might expect, I then start seeing I/O errors on the disk and programs
> failing
>
> I've attached the 'pciconf -lv' output.

Send me please full verbose log, if you can save it. I am especially 
interested in place around first errors.

You may try to build kernel with `options ATA_CAM` to see if it helps. 
I've mostly tested this patch in that mode.

> On Sat, Feb 05, 2011 at 09:34:27PM +0000, Alexander Motin wrote:
>> Author: mav
>> Date: Sat Feb  5 21:34:26 2011
>> New Revision: 218347
>> URL: http://svn.freebsd.org/changeset/base/218347
>>
>> Log:
>>    MFC r217774:
>>    ICH7 SATA controller in legacy mode can provide access to SATA registers
>>    via AHCI-like memory resource at BAR(5). Use it if BIOS was so kind to
>>    allocate memory for that BAR. This allows hot-plug support and connection
>>    speed reporting.

-- 
Alexander Motin

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar 17 13:09:35 2011
Return-Path: 
Delivered-To: svn-src-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DEDF9106566C;
	Thu, 17 Mar 2011 13:09:34 +0000 (UTC) (envelope-from bob@immure.com)
Received: from maul.immure.com (adsl-66-136-206-1.dsl.austtx.swbell.net
	[66.136.206.1])
	by mx1.freebsd.org (Postfix) with ESMTP id 57CB08FC0A;
	Thu, 17 Mar 2011 13:09:34 +0000 (UTC)
Received: from rancor.immure.com (rancor.immure.com [10.1.132.9])
	by maul.immure.com (8.14.4/8.14.4) with ESMTP id p2HD9LuM002013;
	Thu, 17 Mar 2011 08:09:21 -0500 (CDT) (envelope-from bob@immure.com)
Received: (from bob@localhost)
	by rancor.immure.com (8.14.4/8.14.4/Submit) id p2HD9LAc017606;
	Thu, 17 Mar 2011 08:09:21 -0500 (CDT) (envelope-from bob)
Date: Thu, 17 Mar 2011 08:09:21 -0500
From: Bob Willcox 
To: Alexander Motin 
Message-ID: <20110317130921.GB14927@rancor.immure.com>
References: <201102052134.p15LYRmw041695@svn.freebsd.org>
	<20110316135122.GB7185@rancor.immure.com>
	<4D814AAA.3070801@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D814AAA.3070801@FreeBSD.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-immure-MailScanner-Information: Please contact the ISP for more information
X-immure-MailScanner-ID: p2HD9LuM002013
X-immure-MailScanner: Found to be clean
X-immure-MailScanner-From: bob@immure.com
X-Spam-Status: No
Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org
Subject: Re: svn commit: r218347 - stable/8/sys/dev/ata/chipsets
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Bob Willcox 
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 17 Mar 2011 13:09:35 -0000

On Thu, Mar 17, 2011 at 01:41:30AM +0200, Alexander Motin wrote:
> On 16.03.2011 15:51, Bob Willcox wrote:
> > This change has broken SATA disk support on my Intel Atom D525 ITX system. By
> > reverting this change 8.2-STABLE works again on this system.
> >
> > My 'uname -a' output is:
> >
> > FreeBSD maul.immure.com 8.2-STABLE FreeBSD 8.2-STABLE #6: Wed Mar 16 08:15:43 CDT 2011     bob@maul.immure.com:/usr/obj/usr/src/sys/MAUL  amd64
> >
> > When booting the system I get tons of these messages:
> >
> > Mar 16 07:38:19 maul kernel: ad4: WARNING - SETFEATURES ENABLE RCACHE requeued due to channel reset
> > Mar 16 07:38:19 maul kernel: ad4: interrupt on idle channel ignored
> 
> As I can see, it means that channel has some active request, but it is 
> in IDLE state. It is strange, but I won't be surprised much if it is the 
> result of some locking problem in ata(4) in non-CAM mode.
> 
> > repeated over and over, and then lots of these:
> >
> > Mar 16 07:38:21 maul kernel: ad4: WARNING - READ_DMA48 requeued due to channel reset LBA=617964479
> > Mar 16 07:38:21 maul kernel: ata2: FAILURE - already active DMA on this device
> > Mar 16 07:38:21 maul kernel: ata2: setting up DMA failed
> >
> > for different LBA values.
> >
> > As one might expect, I then start seeing I/O errors on the disk and programs
> > failing
> >
> > I've attached the 'pciconf -lv' output.
> 
> Send me please full verbose log, if you can save it. I am especially 
> interested in place around first errors.

Hi Alexander,

I was unable to get the full verbose log as requested. When booting with
verbose the system just continued to spew errors to the console (at a rate too
fast to read) for the 15 minutes that I let it run. Since it never got up,
nothing was written to /var/log/message or /var/run/dmesg.boot and I don't
have a serial console on this system so I don't have the log to send you.

> 
> You may try to build kernel with `options ATA_CAM` to see if it helps. 
> I've mostly tested this patch in that mode.

I plan to try the 'options ATA_CAM' tonight. I have to be careful with this
system as it is my gateway machine and if I hose it up I'll be in a painful
recovery mode.

Bob

> 
> > On Sat, Feb 05, 2011 at 09:34:27PM +0000, Alexander Motin wrote:
> >> Author: mav
> >> Date: Sat Feb  5 21:34:26 2011
> >> New Revision: 218347
> >> URL: http://svn.freebsd.org/changeset/base/218347
> >>
> >> Log:
> >>    MFC r217774:
> >>    ICH7 SATA controller in legacy mode can provide access to SATA registers
> >>    via AHCI-like memory resource at BAR(5). Use it if BIOS was so kind to
> >>    allocate memory for that BAR. This allows hot-plug support and connection
> >>    speed reporting.
> 
> -- 
> Alexander Motin

-- 
Bob Willcox              Trying to explain things to people who already know
bob@immure.com           everything is like trying to teach a bear to dance;
Austin, TX               it's useless, and it annoys the bear.

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar 17 22:35:29 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94F2F106566C;
	Thu, 17 Mar 2011 22:35:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8566A8FC1C;
	Thu, 17 Mar 2011 22:35:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2HMZTi4041153;
	Thu, 17 Mar 2011 22:35:29 GMT (envelope-from gjb@svn.freebsd.org)
Received: (from gjb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2HMZTx1041151;
	Thu, 17 Mar 2011 22:35:29 GMT (envelope-from gjb@svn.freebsd.org)
Message-Id: <201103172235.p2HMZTx1041151@svn.freebsd.org>
From: Glen Barber 
Date: Thu, 17 Mar 2011 22:35:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219724 - stable/8/usr.bin/find
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 17 Mar 2011 22:35:29 -0000

Author: gjb (doc committer)
Date: Thu Mar 17 22:35:29 2011
New Revision: 219724
URL: http://svn.freebsd.org/changeset/base/219724

Log:
  MFC 219455:
  - Move the explanation of using arguments for the PRIMARIES above
    the list of PRIMARIES.
  
  PR:		151812

Modified:
  stable/8/usr.bin/find/find.1
Directory Properties:
  stable/8/usr.bin/find/   (props changed)

Modified: stable/8/usr.bin/find/find.1
==============================================================================
--- stable/8/usr.bin/find/find.1	Thu Mar 17 22:17:56 2011	(r219723)
+++ stable/8/usr.bin/find/find.1	Thu Mar 17 22:35:29 2011	(r219724)
@@ -181,6 +181,18 @@ This option is equivalent to the depreca
 primary.
 .El
 .Sh PRIMARIES
+.Pp
+All primaries which take a numeric argument allow the number to be
+preceded by a plus sign
+.Pq Dq Li +
+or a minus sign
+.Pq Dq Li - .
+A preceding plus sign means
+.Dq more than n ,
+a preceding minus sign means
+.Dq less than n
+and neither means
+.Dq exactly n .
 .Bl -tag -width indent
 .It Ic -Bmin Ar n
 True if the difference between the time of a file's inode creation
@@ -822,18 +834,6 @@ The same thing as 
 .Ic -path ,
 for GNU find compatibility.
 .El
-.Pp
-All primaries which take a numeric argument allow the number to be
-preceded by a plus sign
-.Pq Dq Li +
-or a minus sign
-.Pq Dq Li - .
-A preceding plus sign means
-.Dq more than n ,
-a preceding minus sign means
-.Dq less than n
-and neither means
-.Dq exactly n .
 .Sh OPERATORS
 The primaries may be combined using the following operators.
 The operators are listed in order of decreasing precedence.

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar 17 22:36:21 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9BF5C106566C;
	Thu, 17 Mar 2011 22:36:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8C6728FC0C;
	Thu, 17 Mar 2011 22:36:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2HMaLr7041216;
	Thu, 17 Mar 2011 22:36:21 GMT (envelope-from gjb@svn.freebsd.org)
Received: (from gjb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2HMaL5l041214;
	Thu, 17 Mar 2011 22:36:21 GMT (envelope-from gjb@svn.freebsd.org)
Message-Id: <201103172236.p2HMaL5l041214@svn.freebsd.org>
From: Glen Barber 
Date: Thu, 17 Mar 2011 22:36:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219725 - stable/7/usr.bin/find
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 17 Mar 2011 22:36:21 -0000

Author: gjb (doc committer)
Date: Thu Mar 17 22:36:21 2011
New Revision: 219725
URL: http://svn.freebsd.org/changeset/base/219725

Log:
  MFC 219455:
  - Move the explanation of using arguments for the PRIMARIES above
    the list of PRIMARIES.
  
  PR:		151812

Modified:
  stable/7/usr.bin/find/find.1
Directory Properties:
  stable/7/usr.bin/find/   (props changed)

Modified: stable/7/usr.bin/find/find.1
==============================================================================
--- stable/7/usr.bin/find/find.1	Thu Mar 17 22:35:29 2011	(r219724)
+++ stable/7/usr.bin/find/find.1	Thu Mar 17 22:36:21 2011	(r219725)
@@ -181,6 +181,18 @@ This option is equivalent to the depreca
 primary.
 .El
 .Sh PRIMARIES
+.Pp
+All primaries which take a numeric argument allow the number to be
+preceded by a plus sign
+.Pq Dq Li +
+or a minus sign
+.Pq Dq Li - .
+A preceding plus sign means
+.Dq more than n ,
+a preceding minus sign means
+.Dq less than n
+and neither means
+.Dq exactly n .
 .Bl -tag -width indent
 .It Ic -Bmin Ar n
 True if the difference between the time of a file's inode creation
@@ -749,18 +761,6 @@ is numeric and there is no such user nam
 .Ar uname
 is treated as a user ID.
 .El
-.Pp
-All primaries which take a numeric argument allow the number to be
-preceded by a plus sign
-.Pq Dq Li +
-or a minus sign
-.Pq Dq Li - .
-A preceding plus sign means
-.Dq more than n ,
-a preceding minus sign means
-.Dq less than n
-and neither means
-.Dq exactly n .
 .Sh OPERATORS
 The primaries may be combined using the following operators.
 The operators are listed in order of decreasing precedence.

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar 17 22:47:52 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9687D1065670;
	Thu, 17 Mar 2011 22:47:52 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 872458FC17;
	Thu, 17 Mar 2011 22:47:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2HMlqna041544;
	Thu, 17 Mar 2011 22:47:52 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2HMlqam041542;
	Thu, 17 Mar 2011 22:47:52 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201103172247.p2HMlqam041542@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Thu, 17 Mar 2011 22:47:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219726 - stable/8/include
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 17 Mar 2011 22:47:52 -0000

Author: jilles
Date: Thu Mar 17 22:47:52 2011
New Revision: 219726
URL: http://svn.freebsd.org/changeset/base/219726

Log:
  MFC r219256: Fix some _POSIX minimum/maximum values in limits.h:
  * Some values changed in POSIX.1-2001; provide the former value if a program
    requests compliance to an earlier version of POSIX. [1]
  * Add missing _POSIX_CLOCKRES_MIN constant. This is a maximum value but
    otherwise works the same as the minimum values.
  
  PR:		standards/104743
  Submitted by:	bde [1] (not exact #ifdefs, but the values)

Modified:
  stable/8/include/limits.h
Directory Properties:
  stable/8/include/   (props changed)

Modified: stable/8/include/limits.h
==============================================================================
--- stable/8/include/limits.h	Thu Mar 17 22:36:21 2011	(r219725)
+++ stable/8/include/limits.h	Thu Mar 17 22:47:52 2011	(r219726)
@@ -41,18 +41,27 @@
 
 #if __POSIX_VISIBLE
 #define	_POSIX_ARG_MAX		4096
-#define	_POSIX_CHILD_MAX	25
 #define	_POSIX_LINK_MAX		8
 #define	_POSIX_MAX_CANON	255
 #define	_POSIX_MAX_INPUT	255
 #define	_POSIX_NAME_MAX		14
-#define	_POSIX_NGROUPS_MAX	8
-#define	_POSIX_OPEN_MAX		20
-#define	_POSIX_PATH_MAX		256
 #define	_POSIX_PIPE_BUF		512
 #define	_POSIX_SSIZE_MAX	32767
 #define	_POSIX_STREAM_MAX	8
+
+#if __POSIX_VISIBLE >= 200112
+#define	_POSIX_CHILD_MAX	25
+#define	_POSIX_NGROUPS_MAX	8
+#define	_POSIX_OPEN_MAX		20
+#define	_POSIX_PATH_MAX		256
 #define	_POSIX_TZNAME_MAX	6
+#else
+#define	_POSIX_CHILD_MAX	6
+#define	_POSIX_NGROUPS_MAX	0
+#define	_POSIX_OPEN_MAX		16
+#define	_POSIX_PATH_MAX		255
+#define	_POSIX_TZNAME_MAX	3
+#endif
 
 #define	BC_BASE_MAX		   99	/* max ibase/obase values in bc(1) */
 #define	BC_DIM_MAX		 2048	/* max array elements in bc(1) */
@@ -84,6 +93,8 @@
 #define	_POSIX_SEM_VALUE_MAX	32767
 #define	_POSIX_SIGQUEUE_MAX	32
 #define	_POSIX_TIMER_MAX	32
+
+#define	_POSIX_CLOCKRES_MIN	20000000
 #endif
 
 #if __POSIX_VISIBLE >= 199506

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 08:48:06 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 982701065670;
	Fri, 18 Mar 2011 08:48:06 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6CAF18FC14;
	Fri, 18 Mar 2011 08:48:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2I8m6g2054218;
	Fri, 18 Mar 2011 08:48:06 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2I8m6hc054216;
	Fri, 18 Mar 2011 08:48:06 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201103180848.p2I8m6hc054216@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Fri, 18 Mar 2011 08:48:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219728 - stable/8/sys/dev/md
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 08:48:06 -0000

Author: jh
Date: Fri Mar 18 08:48:06 2011
New Revision: 219728
URL: http://svn.freebsd.org/changeset/base/219728

Log:
  MFC r210371:
  
  Convert md(4) to use alloc_unr(9) and alloc_unr_specific(9) for unit
  number allocation. The old approach had some problems such as it allowed
  an overflow to occur in the unit number calculation.
  
  PR:		kern/122288

Modified:
  stable/8/sys/dev/md/md.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/md/md.c
==============================================================================
--- stable/8/sys/dev/md/md.c	Fri Mar 18 06:47:23 2011	(r219727)
+++ stable/8/sys/dev/md/md.c	Fri Mar 18 08:48:06 2011	(r219728)
@@ -132,6 +132,7 @@ static void g_md_dumpconf(struct sbuf *s
 static int	mdunits;
 static struct cdev *status_dev = 0;
 static struct sx md_sx;
+static struct unrhdr *md_uh;
 
 static d_ioctl_t mdctlioctl;
 
@@ -757,20 +758,20 @@ mdfind(int unit)
 static struct md_s *
 mdnew(int unit, int *errp, enum md_types type)
 {
-	struct md_s *sc, *sc2;
-	int error, max = -1;
+	struct md_s *sc;
+	int error;
 
 	*errp = 0;
-	LIST_FOREACH(sc2, &md_softc_list, list) {
-		if (unit == sc2->unit) {
-			*errp = EBUSY;
-			return (NULL);
-		}
-		if (unit == -1 && sc2->unit > max) 
-			max = sc2->unit;
-	}
 	if (unit == -1)
-		unit = max + 1;
+		unit = alloc_unr(md_uh);
+	else
+		unit = alloc_unr_specific(md_uh, unit);
+
+	if (unit == -1) {
+		*errp = EBUSY;
+		return (NULL);
+	}
+
 	sc = (struct md_s *)malloc(sizeof *sc, M_MD, M_WAITOK | M_ZERO);
 	sc->type = type;
 	bioq_init(&sc->bio_queue);
@@ -783,6 +784,7 @@ mdnew(int unit, int *errp, enum md_types
 		return (sc);
 	LIST_REMOVE(sc, list);
 	mtx_destroy(&sc->queue_mtx);
+	free_unr(md_uh, sc->unit);
 	free(sc, M_MD);
 	*errp = error;
 	return (NULL);
@@ -1022,6 +1024,7 @@ mddestroy(struct md_s *sc, struct thread
 		uma_zdestroy(sc->uma);
 
 	LIST_REMOVE(sc, list);
+	free_unr(md_uh, sc->unit);
 	free(sc, M_MD);
 	return (0);
 }
@@ -1107,8 +1110,11 @@ xmdctlioctl(struct cdev *dev, u_long cmd
 		}
 		if (mdio->md_options & MD_AUTOUNIT)
 			sc = mdnew(-1, &error, mdio->md_type);
-		else
+		else {
+			if (mdio->md_unit > INT_MAX)
+				return (EINVAL);
 			sc = mdnew(mdio->md_unit, &error, mdio->md_type);
+		}
 		if (sc == NULL)
 			return (error);
 		if (mdio->md_options & MD_AUTOUNIT)
@@ -1236,6 +1242,7 @@ g_md_init(struct g_class *mp __unused)
 	mod = NULL;
 	sx_init(&md_sx, "MD config lock");
 	g_topology_unlock();
+	md_uh = new_unrhdr(0, INT_MAX, NULL);
 #ifdef MD_ROOT_SIZE
 	sx_xlock(&md_sx);
 	md_preloaded(mfs_root.start, sizeof(mfs_root.start));
@@ -1332,4 +1339,5 @@ g_md_fini(struct g_class *mp __unused)
 	sx_destroy(&md_sx);
 	if (status_dev != NULL)
 		destroy_dev(status_dev);
+	delete_unrhdr(md_uh);
 }

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 08:52:26 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8FEFA1065670;
	Fri, 18 Mar 2011 08:52:26 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 64AF58FC0C;
	Fri, 18 Mar 2011 08:52:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2I8qQSP054354;
	Fri, 18 Mar 2011 08:52:26 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2I8qQWe054352;
	Fri, 18 Mar 2011 08:52:26 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201103180852.p2I8qQWe054352@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Fri, 18 Mar 2011 08:52:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219729 - stable/8/sys/dev/md
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 08:52:26 -0000

Author: jh
Date: Fri Mar 18 08:52:26 2011
New Revision: 219729
URL: http://svn.freebsd.org/changeset/base/219729

Log:
  MFC r210496:
  
  - Remove some extra white space.
  - Wrap g_md_dumpconf() prototype to 80 columns.

Modified:
  stable/8/sys/dev/md/md.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/md/md.c
==============================================================================
--- stable/8/sys/dev/md/md.c	Fri Mar 18 08:48:06 2011	(r219728)
+++ stable/8/sys/dev/md/md.c	Fri Mar 18 08:52:26 2011	(r219729)
@@ -126,10 +126,10 @@ static g_init_t g_md_init;
 static g_fini_t g_md_fini;
 static g_start_t g_md_start;
 static g_access_t g_md_access;
-static void g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, 
-    struct g_consumer *cp __unused, struct g_provider *pp);
+static void g_md_dumpconf(struct sbuf *sb, const char *indent,
+    struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp);
 
-static int	mdunits;
+static int mdunits;
 static struct cdev *status_dev = 0;
 static struct sx md_sx;
 static struct unrhdr *md_uh;
@@ -683,7 +683,7 @@ mdstart_swap(struct md_s *sc, struct bio
 #if 0
 if (bootverbose || bp->bio_offset / PAGE_SIZE < 17)
 printf("wire_count %d busy %d flags %x hold_count %d act_count %d queue %d valid %d dirty %d @ %d\n",
-    m->wire_count, m->busy, 
+    m->wire_count, m->busy,
     m->flags, m->hold_count, m->act_count, m->queue, m->valid, m->dirty, i);
 #endif
 	}
@@ -793,7 +793,6 @@ mdnew(int unit, int *errp, enum md_types
 static void
 mdinit(struct md_s *sc)
 {
-
 	struct g_geom *gp;
 	struct g_provider *pp;
 
@@ -941,7 +940,7 @@ mdcreate_vnode(struct md_s *sc, struct m
 	if (nd.ni_vp->v_type != VREG) {
 		error = EINVAL;
 		goto bad;
-	}	
+	}
 	error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred);
 	if (error != 0)
 		goto bad;
@@ -1196,7 +1195,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd
 static int
 mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
 {
-	int error; 
+	int error;
 
 	sx_xlock(&md_sx);
 	error = xmdctlioctl(dev, cmd, addr, flags, td);
@@ -1228,7 +1227,6 @@ md_preloaded(u_char *image, size_t lengt
 static void
 g_md_init(struct g_class *mp __unused)
 {
-
 	caddr_t mod;
 	caddr_t c;
 	u_char *ptr, *name, *type;
@@ -1274,7 +1272,7 @@ g_md_init(struct g_class *mp __unused)
 }
 
 static void
-g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, 
+g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp,
     struct g_consumer *cp __unused, struct g_provider *pp)
 {
 	struct md_s *mp;

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 17:15:10 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 797941065677;
	Fri, 18 Mar 2011 17:15:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6B5228FC22;
	Fri, 18 Mar 2011 17:15:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2IHFAeZ074878;
	Fri, 18 Mar 2011 17:15:10 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2IHFATc074875;
	Fri, 18 Mar 2011 17:15:10 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103181715.p2IHFATc074875@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 18 Mar 2011 17:15:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219744 - stable/8/sys/ufs/ufs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 17:15:10 -0000

Author: jhb
Date: Fri Mar 18 17:15:10 2011
New Revision: 219744
URL: http://svn.freebsd.org/changeset/base/219744

Log:
  MFC 219384:
  The UFS dirhash code was attempting to update shared state in the dirhash
  from multiple threads while holding a shared lock during a lookup operation.
  This could result in incorrect ENOENT failures which could then be
  permanently stored in the name cache.
  
  Specifically, the dirhash code optimizes the case that a single thread is
  walking a directory sequentially opening (or stat'ing) each file.  It uses
  state in the dirhash structure to determine if a given lookup is using the
  optimization.  If the optimization fails, it disables it and restarts the
  lookup.  The problem arises when two threads both attempt the optimization
  and fail.  The first thread will restart the loop, but the second thread
  will incorrectly think that it did not try the optimization and will only
  examine a subset of the directory entires in its hash chain.  As a result,
  it may fail to find its directory entry and incorrectly fail with ENOENT.
  
  To make this safe for use with shared locks, simplify the state stored in
  the dirhash and move some of the state (the part that determines if the
  current thread is trying the optimization) into a local variable.  One
  result is that we will now try the optimization more often.  We still
  update the value under the shared lock, but it is a single atomic store
  similar to i_diroff that is stored in UFS directory i-nodes for the
  non-dirhash lookup.

Modified:
  stable/8/sys/ufs/ufs/dirhash.h
  stable/8/sys/ufs/ufs/ufs_dirhash.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/ufs/ufs/dirhash.h
==============================================================================
--- stable/8/sys/ufs/ufs/dirhash.h	Fri Mar 18 16:13:08 2011	(r219743)
+++ stable/8/sys/ufs/ufs/dirhash.h	Fri Mar 18 17:15:10 2011	(r219744)
@@ -98,7 +98,6 @@ struct dirhash {
 	int	dh_dirblks;	/* number of DIRBLKSIZ blocks in dir */
 	int	dh_firstfree[DH_NFSTATS + 1]; /* first blk with N words free */
 
-	int	dh_seqopt;	/* sequential access optimisation enabled */
 	doff_t	dh_seqoff;	/* sequential access optimisation offset */
 
 	int	dh_score;	/* access count for this dirhash */

Modified: stable/8/sys/ufs/ufs/ufs_dirhash.c
==============================================================================
--- stable/8/sys/ufs/ufs/ufs_dirhash.c	Fri Mar 18 16:13:08 2011	(r219743)
+++ stable/8/sys/ufs/ufs/ufs_dirhash.c	Fri Mar 18 17:15:10 2011	(r219744)
@@ -403,8 +403,7 @@ ufsdirhash_build(struct inode *ip)
 		dh->dh_firstfree[i] = -1;
 	dh->dh_firstfree[DH_NFSTATS] = 0;
 	dh->dh_hused = 0;
-	dh->dh_seqopt = 0;
-	dh->dh_seqoff = 0;
+	dh->dh_seqoff = -1;
 	dh->dh_score = DH_SCOREINIT;
 	dh->dh_lastused = time_second;
 
@@ -552,7 +551,7 @@ ufsdirhash_lookup(struct inode *ip, char
 	struct direct *dp;
 	struct vnode *vp;
 	struct buf *bp;
-	doff_t blkoff, bmask, offset, prevoff;
+	doff_t blkoff, bmask, offset, prevoff, seqoff;
 	int i, slot;
 	int error;
 
@@ -592,29 +591,30 @@ ufsdirhash_lookup(struct inode *ip, char
 	bmask = vp->v_mount->mnt_stat.f_iosize - 1;
 	blkoff = -1;
 	bp = NULL;
+	seqoff = dh->dh_seqoff;
 restart:
 	slot = ufsdirhash_hash(dh, name, namelen);
 
-	if (dh->dh_seqopt) {
+	if (seqoff != -1) {
 		/*
-		 * Sequential access optimisation. dh_seqoff contains the
+		 * Sequential access optimisation. seqoff contains the
 		 * offset of the directory entry immediately following
 		 * the last entry that was looked up. Check if this offset
 		 * appears in the hash chain for the name we are looking for.
 		 */
 		for (i = slot; (offset = DH_ENTRY(dh, i)) != DIRHASH_EMPTY;
 		    i = WRAPINCR(i, dh->dh_hlen))
-			if (offset == dh->dh_seqoff)
+			if (offset == seqoff)
 				break;
-		if (offset == dh->dh_seqoff) {
+		if (offset == seqoff) {
 			/*
 			 * We found an entry with the expected offset. This
 			 * is probably the entry we want, but if not, the
-			 * code below will turn off seqopt and retry.
+			 * code below will retry.
 			 */ 
 			slot = i;
-		} else 
-			dh->dh_seqopt = 0;
+		} else
+			seqoff = -1;
 	}
 
 	for (; (offset = DH_ENTRY(dh, slot)) != DIRHASH_EMPTY;
@@ -655,9 +655,7 @@ restart:
 				*prevoffp = prevoff;
 			}
 
-			/* Check for sequential access, and update offset. */
-			if (dh->dh_seqopt == 0 && dh->dh_seqoff == offset)
-				dh->dh_seqopt = 1;
+			/* Update offset. */
 			dh->dh_seqoff = offset + DIRSIZ(0, dp);
 			*bpp = bp;
 			*offp = offset;
@@ -666,11 +664,11 @@ restart:
 		}
 
 		/*
-		 * When the name doesn't match in the seqopt case, go back
-		 * and search normally.
+		 * When the name doesn't match in the sequential
+		 * optimization case, go back and search normally.
 		 */
-		if (dh->dh_seqopt) {
-			dh->dh_seqopt = 0;
+		if (seqoff != -1) {
+			seqoff = -1;
 			goto restart;
 		}
 	}

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 17:15:47 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3EC1F106566B;
	Fri, 18 Mar 2011 17:15:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 30A018FC16;
	Fri, 18 Mar 2011 17:15:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2IHFlCV074923;
	Fri, 18 Mar 2011 17:15:47 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2IHFlaZ074920;
	Fri, 18 Mar 2011 17:15:47 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103181715.p2IHFlaZ074920@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 18 Mar 2011 17:15:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219745 - stable/7/sys/ufs/ufs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 17:15:47 -0000

Author: jhb
Date: Fri Mar 18 17:15:46 2011
New Revision: 219745
URL: http://svn.freebsd.org/changeset/base/219745

Log:
  MFC 219384:
  The UFS dirhash code was attempting to update shared state in the dirhash
  from multiple threads while holding a shared lock during a lookup operation.
  This could result in incorrect ENOENT failures which could then be
  permanently stored in the name cache.
  
  Specifically, the dirhash code optimizes the case that a single thread is
  walking a directory sequentially opening (or stat'ing) each file.  It uses
  state in the dirhash structure to determine if a given lookup is using the
  optimization.  If the optimization fails, it disables it and restarts the
  lookup.  The problem arises when two threads both attempt the optimization
  and fail.  The first thread will restart the loop, but the second thread
  will incorrectly think that it did not try the optimization and will only
  examine a subset of the directory entires in its hash chain.  As a result,
  it may fail to find its directory entry and incorrectly fail with ENOENT.
  
  To make this safe for use with shared locks, simplify the state stored in
  the dirhash and move some of the state (the part that determines if the
  current thread is trying the optimization) into a local variable.  One
  result is that we will now try the optimization more often.  We still
  update the value under the shared lock, but it is a single atomic store
  similar to i_diroff that is stored in UFS directory i-nodes for the
  non-dirhash lookup.

Modified:
  stable/7/sys/ufs/ufs/dirhash.h
  stable/7/sys/ufs/ufs/ufs_dirhash.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/ufs/ufs/dirhash.h
==============================================================================
--- stable/7/sys/ufs/ufs/dirhash.h	Fri Mar 18 17:15:10 2011	(r219744)
+++ stable/7/sys/ufs/ufs/dirhash.h	Fri Mar 18 17:15:46 2011	(r219745)
@@ -98,7 +98,6 @@ struct dirhash {
 	int	dh_dirblks;	/* number of DIRBLKSIZ blocks in dir */
 	int	dh_firstfree[DH_NFSTATS + 1]; /* first blk with N words free */
 
-	int	dh_seqopt;	/* sequential access optimisation enabled */
 	doff_t	dh_seqoff;	/* sequential access optimisation offset */
 
 	int	dh_score;	/* access count for this dirhash */

Modified: stable/7/sys/ufs/ufs/ufs_dirhash.c
==============================================================================
--- stable/7/sys/ufs/ufs/ufs_dirhash.c	Fri Mar 18 17:15:10 2011	(r219744)
+++ stable/7/sys/ufs/ufs/ufs_dirhash.c	Fri Mar 18 17:15:46 2011	(r219745)
@@ -394,8 +394,7 @@ ufsdirhash_build(struct inode *ip)
 		dh->dh_firstfree[i] = -1;
 	dh->dh_firstfree[DH_NFSTATS] = 0;
 	dh->dh_hused = 0;
-	dh->dh_seqopt = 0;
-	dh->dh_seqoff = 0;
+	dh->dh_seqoff = -1;
 	dh->dh_score = DH_SCOREINIT;
 	dh->dh_lastused = time_second;
 
@@ -543,7 +542,7 @@ ufsdirhash_lookup(struct inode *ip, char
 	struct direct *dp;
 	struct vnode *vp;
 	struct buf *bp;
-	doff_t blkoff, bmask, offset, prevoff;
+	doff_t blkoff, bmask, offset, prevoff, seqoff;
 	int i, slot;
 	int error;
 
@@ -583,29 +582,30 @@ ufsdirhash_lookup(struct inode *ip, char
 	bmask = VFSTOUFS(vp->v_mount)->um_mountp->mnt_stat.f_iosize - 1;
 	blkoff = -1;
 	bp = NULL;
+	seqoff = dh->dh_seqoff;
 restart:
 	slot = ufsdirhash_hash(dh, name, namelen);
 
-	if (dh->dh_seqopt) {
+	if (seqoff != -1) {
 		/*
-		 * Sequential access optimisation. dh_seqoff contains the
+		 * Sequential access optimisation. seqoff contains the
 		 * offset of the directory entry immediately following
 		 * the last entry that was looked up. Check if this offset
 		 * appears in the hash chain for the name we are looking for.
 		 */
 		for (i = slot; (offset = DH_ENTRY(dh, i)) != DIRHASH_EMPTY;
 		    i = WRAPINCR(i, dh->dh_hlen))
-			if (offset == dh->dh_seqoff)
+			if (offset == seqoff)
 				break;
-		if (offset == dh->dh_seqoff) {
+		if (offset == seqoff) {
 			/*
 			 * We found an entry with the expected offset. This
 			 * is probably the entry we want, but if not, the
-			 * code below will turn off seqopt and retry.
+			 * code below will retry.
 			 */ 
 			slot = i;
-		} else 
-			dh->dh_seqopt = 0;
+		} else
+			seqoff = -1;
 	}
 
 	for (; (offset = DH_ENTRY(dh, slot)) != DIRHASH_EMPTY;
@@ -646,9 +646,7 @@ restart:
 				*prevoffp = prevoff;
 			}
 
-			/* Check for sequential access, and update offset. */
-			if (dh->dh_seqopt == 0 && dh->dh_seqoff == offset)
-				dh->dh_seqopt = 1;
+			/* Update offset. */
 			dh->dh_seqoff = offset + DIRSIZ(0, dp);
 			*bpp = bp;
 			*offp = offset;
@@ -657,11 +655,11 @@ restart:
 		}
 
 		/*
-		 * When the name doesn't match in the seqopt case, go back
-		 * and search normally.
+		 * When the name doesn't match in the sequential
+		 * optimization case, go back and search normally.
 		 */
-		if (dh->dh_seqopt) {
-			dh->dh_seqopt = 0;
+		if (seqoff != -1) {
+			seqoff = -1;
 			goto restart;
 		}
 	}

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 17:18:10 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 51188106564A;
	Fri, 18 Mar 2011 17:18:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 292878FC0C;
	Fri, 18 Mar 2011 17:18:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2IHIAS1075076;
	Fri, 18 Mar 2011 17:18:10 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2IHIAER075074;
	Fri, 18 Mar 2011 17:18:10 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103181718.p2IHIAER075074@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 18 Mar 2011 17:18:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219747 - stable/8/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 17:18:10 -0000

Author: jhb
Date: Fri Mar 18 17:18:09 2011
New Revision: 219747
URL: http://svn.freebsd.org/changeset/base/219747

Log:
  MFC 219399:
  When constructing a new cpuset, apply the parent cpuset's mask to the new
  set's mask rather than the root mask.  This was causing the root mask to
  be modified incorrectly.

Modified:
  stable/8/sys/kern/kern_cpuset.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/kern_cpuset.c
==============================================================================
--- stable/8/sys/kern/kern_cpuset.c	Fri Mar 18 17:15:59 2011	(r219746)
+++ stable/8/sys/kern/kern_cpuset.c	Fri Mar 18 17:18:09 2011	(r219747)
@@ -245,7 +245,7 @@ cpuset_lookup(cpusetid_t setid, struct t
  * will have no valid cpu based on restrictions from the parent.
  */
 static int
-_cpuset_create(struct cpuset *set, struct cpuset *parent, cpuset_t *mask,
+_cpuset_create(struct cpuset *set, struct cpuset *parent, const cpuset_t *mask,
     cpusetid_t id)
 {
 
@@ -256,7 +256,7 @@ _cpuset_create(struct cpuset *set, struc
 	refcount_init(&set->cs_ref, 1);
 	set->cs_flags = 0;
 	mtx_lock_spin(&cpuset_lock);
-	CPU_AND(mask, &parent->cs_mask);
+	CPU_AND(&set->cs_mask, &parent->cs_mask);
 	set->cs_id = id;
 	set->cs_parent = cpuset_ref(parent);
 	LIST_INSERT_HEAD(&parent->cs_children, set, cs_siblings);
@@ -273,7 +273,7 @@ _cpuset_create(struct cpuset *set, struc
  * allocated.
  */
 static int
-cpuset_create(struct cpuset **setp, struct cpuset *parent, cpuset_t *mask)
+cpuset_create(struct cpuset **setp, struct cpuset *parent, const cpuset_t *mask)
 {
 	struct cpuset *set;
 	cpusetid_t id;
@@ -480,7 +480,7 @@ cpuset_which(cpuwhich_t which, id_t id, 
  * the new set is a child of 'set'.
  */
 static int
-cpuset_shadow(struct cpuset *set, struct cpuset *fset, cpuset_t *mask)
+cpuset_shadow(struct cpuset *set, struct cpuset *fset, const cpuset_t *mask)
 {
 	struct cpuset *parent;
 

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 17:18:25 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3CA06106566B;
	Fri, 18 Mar 2011 17:18:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1484B8FC12;
	Fri, 18 Mar 2011 17:18:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2IHIO2X075116;
	Fri, 18 Mar 2011 17:18:24 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2IHIOaq075114;
	Fri, 18 Mar 2011 17:18:24 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103181718.p2IHIOaq075114@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 18 Mar 2011 17:18:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219748 - stable/7/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 17:18:25 -0000

Author: jhb
Date: Fri Mar 18 17:18:24 2011
New Revision: 219748
URL: http://svn.freebsd.org/changeset/base/219748

Log:
  MFC 219399:
  When constructing a new cpuset, apply the parent cpuset's mask to the new
  set's mask rather than the root mask.  This was causing the root mask to
  be modified incorrectly.

Modified:
  stable/7/sys/kern/kern_cpuset.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/kern_cpuset.c
==============================================================================
--- stable/7/sys/kern/kern_cpuset.c	Fri Mar 18 17:18:09 2011	(r219747)
+++ stable/7/sys/kern/kern_cpuset.c	Fri Mar 18 17:18:24 2011	(r219748)
@@ -253,7 +253,7 @@ cpuset_lookup(cpusetid_t setid, struct t
  * will have no valid cpu based on restrictions from the parent.
  */
 static int
-_cpuset_create(struct cpuset *set, struct cpuset *parent, cpuset_t *mask,
+_cpuset_create(struct cpuset *set, struct cpuset *parent, const cpuset_t *mask,
     cpusetid_t id)
 {
 
@@ -264,7 +264,7 @@ _cpuset_create(struct cpuset *set, struc
 	refcount_init(&set->cs_ref, 1);
 	set->cs_flags = 0;
 	mtx_lock_spin(&cpuset_lock);
-	CPU_AND(mask, &parent->cs_mask);
+	CPU_AND(&set->cs_mask, &parent->cs_mask);
 	set->cs_id = id;
 	set->cs_parent = cpuset_ref(parent);
 	LIST_INSERT_HEAD(&parent->cs_children, set, cs_siblings);
@@ -281,7 +281,7 @@ _cpuset_create(struct cpuset *set, struc
  * allocated.
  */
 static int
-cpuset_create(struct cpuset **setp, struct cpuset *parent, cpuset_t *mask)
+cpuset_create(struct cpuset **setp, struct cpuset *parent, const cpuset_t *mask)
 {
 	struct cpuset *set;
 	cpusetid_t id;
@@ -501,7 +501,7 @@ cpuset_which(cpuwhich_t which, id_t id, 
  * the new set is a child of 'set'.
  */
 static int
-cpuset_shadow(struct cpuset *set, struct cpuset *fset, cpuset_t *mask)
+cpuset_shadow(struct cpuset *set, struct cpuset *fset, const cpuset_t *mask)
 {
 	struct cpuset *parent;
 

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 17:20:32 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 997DE1065686;
	Fri, 18 Mar 2011 17:20:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8BC758FC16;
	Fri, 18 Mar 2011 17:20:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2IHKWxk075217;
	Fri, 18 Mar 2011 17:20:32 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2IHKWH9075215;
	Fri, 18 Mar 2011 17:20:32 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103181720.p2IHKWH9075215@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 18 Mar 2011 17:20:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219749 - stable/8/sys/compat/linux
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 17:20:32 -0000

Author: jhb
Date: Fri Mar 18 17:20:32 2011
New Revision: 219749
URL: http://svn.freebsd.org/changeset/base/219749

Log:
  MFC 219460: Remove now-obsolete comment.

Modified:
  stable/8/sys/compat/linux/linux_futex.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/compat/linux/linux_futex.c
==============================================================================
--- stable/8/sys/compat/linux/linux_futex.c	Fri Mar 18 17:18:24 2011	(r219748)
+++ stable/8/sys/compat/linux/linux_futex.c	Fri Mar 18 17:20:32 2011	(r219749)
@@ -412,7 +412,7 @@ futex_atomic_op(struct thread *td, int e
 		       "cmparg = %x, uaddr = %p\n",
 		       op, cmp, oparg, cmparg, uaddr);
 #endif
-	/* XXX: linux verifies access here and returns EFAULT */
+	/* XXX: Linux verifies access here and returns EFAULT */
 
 	switch (op) {
 	case FUTEX_OP_SET:
@@ -533,11 +533,6 @@ linux_sys_futex(struct thread *td, struc
 		LINUX_CTR3(sys_futex, "WAKE uaddr %p val % d val3 %d",
 		    args->uaddr, args->val, args->val3);
 
-		/*
-		 * XXX: Linux is able to cope with different addresses
-		 * corresponding to the same mapped memory in the sleeping
-		 * and waker process(es).
-		 */
 #ifdef DEBUG
 		if (ldebug(sys_futex))
 			printf(ARGS(sys_futex, "futex_wake uaddr %p val %d val3 %d"),

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 17:20:45 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7D3751065680;
	Fri, 18 Mar 2011 17:20:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F6838FC08;
	Fri, 18 Mar 2011 17:20:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2IHKj6m075259;
	Fri, 18 Mar 2011 17:20:45 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2IHKjZQ075257;
	Fri, 18 Mar 2011 17:20:45 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103181720.p2IHKjZQ075257@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 18 Mar 2011 17:20:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219750 - stable/7/sys/compat/linux
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 17:20:45 -0000

Author: jhb
Date: Fri Mar 18 17:20:45 2011
New Revision: 219750
URL: http://svn.freebsd.org/changeset/base/219750

Log:
  MFC 219460: Remove now-obsolete comment.

Modified:
  stable/7/sys/compat/linux/linux_futex.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/compat/linux/linux_futex.c
==============================================================================
--- stable/7/sys/compat/linux/linux_futex.c	Fri Mar 18 17:20:32 2011	(r219749)
+++ stable/7/sys/compat/linux/linux_futex.c	Fri Mar 18 17:20:45 2011	(r219750)
@@ -395,7 +395,7 @@ futex_atomic_op(struct thread *td, int e
 		       "cmparg = %x, uaddr = %p\n",
 		       op, cmp, oparg, cmparg, uaddr);
 #endif
-	/* XXX: linux verifies access here and returns EFAULT */
+	/* XXX: Linux verifies access here and returns EFAULT */
 
 	switch (op) {
 	case FUTEX_OP_SET:
@@ -491,11 +491,6 @@ linux_sys_futex(struct thread *td, struc
 		LINUX_CTR2(sys_futex, "WAKE val %d uaddr %p",
 		    args->val, args->uaddr);
 
-		/*
-		 * XXX: Linux is able to cope with different addresses
-		 * corresponding to the same mapped memory in the sleeping
-		 * and waker process(es).
-		 */
 #ifdef DEBUG
 		if (ldebug(sys_futex))
 			printf(ARGS(sys_futex, "futex_wake val %d uaddr %p"),

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 17:23:24 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 20D6D1065676;
	Fri, 18 Mar 2011 17:23:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 12FC28FC13;
	Fri, 18 Mar 2011 17:23:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2IHNN9L075368;
	Fri, 18 Mar 2011 17:23:23 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2IHNNjb075366;
	Fri, 18 Mar 2011 17:23:23 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201103181723.p2IHNNjb075366@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 18 Mar 2011 17:23:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219751 - stable/8/sys/boot/i386/gptboot
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 17:23:24 -0000

Author: jhb
Date: Fri Mar 18 17:23:23 2011
New Revision: 219751
URL: http://svn.freebsd.org/changeset/base/219751

Log:
  MFC 219483: Remove all object files during 'make clean'.

Modified:
  stable/8/sys/boot/i386/gptboot/Makefile
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/boot/i386/gptboot/Makefile
==============================================================================
--- stable/8/sys/boot/i386/gptboot/Makefile	Fri Mar 18 17:20:45 2011	(r219750)
+++ stable/8/sys/boot/i386/gptboot/Makefile	Fri Mar 18 17:23:23 2011	(r219751)
@@ -60,7 +60,8 @@ gptldr.bin: gptldr.out
 gptldr.out: gptldr.o
 	${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o
 
-CLEANFILES+=	gptboot.bin gptboot.out gptboot.o sio.o ufsread.o
+CLEANFILES+=	gptboot.bin gptboot.out gptboot.o sio.o gpt.o crc32.o drv.o \
+		cons.o util.o
 
 gptboot.bin: gptboot.out
 	objcopy -S -O binary gptboot.out ${.TARGET}

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar 18 22:35:48 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 780691065675;
	Fri, 18 Mar 2011 22:35:48 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4D4C28FC1B;
	Fri, 18 Mar 2011 22:35:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2IMZmOC082142;
	Fri, 18 Mar 2011 22:35:48 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2IMZm8O082139;
	Fri, 18 Mar 2011 22:35:48 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201103182235.p2IMZm8O082139@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Fri, 18 Mar 2011 22:35:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219757 - in stable/8: include sys/sys
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 18 Mar 2011 22:35:48 -0000

Author: jilles
Date: Fri Mar 18 22:35:48 2011
New Revision: 219757
URL: http://svn.freebsd.org/changeset/base/219757

Log:
  MFC r219271: POSIX.1-2008 moved some constants from the XSI option to the
  Base.

Modified:
  stable/8/include/limits.h
  stable/8/sys/sys/limits.h
Directory Properties:
  stable/8/include/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/include/limits.h
==============================================================================
--- stable/8/include/limits.h	Fri Mar 18 22:33:19 2011	(r219756)
+++ stable/8/include/limits.h	Fri Mar 18 22:35:48 2011	(r219757)
@@ -120,18 +120,21 @@
 #define	_POSIX_RE_DUP_MAX	_POSIX2_RE_DUP_MAX
 #endif
 
+#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
+#define	NL_ARGMAX		99	/* max # of position args for printf */
+#define	NL_MSGMAX		32767
+#define	NL_SETMAX		255
+#define	NL_TEXTMAX		2048
+#endif
+
 #if __XSI_VISIBLE
 #define	_XOPEN_IOV_MAX		16
 #define	_XOPEN_NAME_MAX		255
 #define	_XOPEN_PATH_MAX		1024
 #define	PASS_MAX		128	/* _PASSWORD_LEN from  */
 
-#define	NL_ARGMAX		99	/* max # of position args for printf */
 #define	NL_LANGMAX		31	/* max LANG name length */
-#define	NL_MSGMAX		32767
 #define	NL_NMAX			1
-#define	NL_SETMAX		255
-#define	NL_TEXTMAX		2048
 #endif
 
 #define	MB_LEN_MAX		6	/* 31-bit UTF-8 */

Modified: stable/8/sys/sys/limits.h
==============================================================================
--- stable/8/sys/sys/limits.h	Fri Mar 18 22:33:19 2011	(r219756)
+++ stable/8/sys/sys/limits.h	Fri Mar 18 22:35:48 2011	(r219757)
@@ -88,7 +88,7 @@
 #define	QUAD_MIN	(__QUAD_MIN)	/* min value for a quad_t */
 #endif
 
-#if __XSI_VISIBLE
+#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
 #define	LONG_BIT	__LONG_BIT
 #define	WORD_BIT	__WORD_BIT
 #endif

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 19 00:34:12 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DB1961065675;
	Sat, 19 Mar 2011 00:34:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CB0648FC0A;
	Sat, 19 Mar 2011 00:34:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2J0YCoK084914;
	Sat, 19 Mar 2011 00:34:12 GMT (envelope-from gjb@svn.freebsd.org)
Received: (from gjb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2J0YCQ8084912;
	Sat, 19 Mar 2011 00:34:12 GMT (envelope-from gjb@svn.freebsd.org)
Message-Id: <201103190034.p2J0YCQ8084912@svn.freebsd.org>
From: Glen Barber 
Date: Sat, 19 Mar 2011 00:34:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219765 - stable/8/sbin/ifconfig
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 19 Mar 2011 00:34:13 -0000

Author: gjb (doc committer)
Date: Sat Mar 19 00:34:12 2011
New Revision: 219765
URL: http://svn.freebsd.org/changeset/base/219765

Log:
  MFC 219574,219575:
  - Add example of using 'scan' for wireless networks, similarly to
    OpenBSD's ifconfig(8)[1].
  - remove unneeded newline
  
  PR:		151952 [1]

Modified:
  stable/8/sbin/ifconfig/ifconfig.8
Directory Properties:
  stable/8/sbin/ifconfig/   (props changed)

Modified: stable/8/sbin/ifconfig/ifconfig.8
==============================================================================
--- stable/8/sbin/ifconfig/ifconfig.8	Sat Mar 19 00:31:35 2011	(r219764)
+++ stable/8/sbin/ifconfig/ifconfig.8	Sat Mar 19 00:34:12 2011	(r219765)
@@ -2508,7 +2508,6 @@ to use 100baseTX, full duplex Ethernet m
 .Dl # ifconfig xl0 media 100baseTX mediaopt full-duplex
 .Pp
 Label the em0 interface as an uplink:
-.Pp
 .Dl # ifconfig em0 description \&"Uplink to Gigabit Switch 2\&"
 .Pp
 Create the software network interface
@@ -2518,6 +2517,10 @@ Create the software network interface
 Destroy the software network interface
 .Li gif1 :
 .Dl # ifconfig gif1 destroy
+.Pp
+Scan for wireless networks using
+.Li wlan0 :
+.Dl # ifconfig wlan0 scan
 .Sh DIAGNOSTICS
 Messages indicating the specified interface does not exist, the
 requested address is unknown, or the user is not privileged and

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 19 00:35:11 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F85F106564A;
	Sat, 19 Mar 2011 00:35:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F9FE8FC0A;
	Sat, 19 Mar 2011 00:35:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2J0ZBor084974;
	Sat, 19 Mar 2011 00:35:11 GMT (envelope-from gjb@svn.freebsd.org)
Received: (from gjb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2J0ZBi8084972;
	Sat, 19 Mar 2011 00:35:11 GMT (envelope-from gjb@svn.freebsd.org)
Message-Id: <201103190035.p2J0ZBi8084972@svn.freebsd.org>
From: Glen Barber 
Date: Sat, 19 Mar 2011 00:35:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219766 - stable/7/sbin/ifconfig
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 19 Mar 2011 00:35:11 -0000

Author: gjb (doc committer)
Date: Sat Mar 19 00:35:11 2011
New Revision: 219766
URL: http://svn.freebsd.org/changeset/base/219766

Log:
  MFC 219574:
  - Add example of using 'scan' for wireless networks, similarly to
    OpenBSD's ifconfig(8).
  - wlan0 isn't available on 7.x, so substitute ath0 for wlan0 in the
    example.
  
  PR:		151952

Modified:
  stable/7/sbin/ifconfig/ifconfig.8
Directory Properties:
  stable/7/sbin/ifconfig/   (props changed)

Modified: stable/7/sbin/ifconfig/ifconfig.8
==============================================================================
--- stable/7/sbin/ifconfig/ifconfig.8	Sat Mar 19 00:34:12 2011	(r219765)
+++ stable/7/sbin/ifconfig/ifconfig.8	Sat Mar 19 00:35:11 2011	(r219766)
@@ -1946,6 +1946,10 @@ Create the software network interface
 Destroy the software network interface
 .Li gif1 :
 .Dl # ifconfig gif1 destroy
+.Pp
+Scan for wireless networks using
+.Li ath0 :
+.Dl # ifconfig ath0 scan
 .Sh DIAGNOSTICS
 Messages indicating the specified interface does not exist, the
 requested address is unknown, or the user is not privileged and

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 19 01:41:22 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0C61A106567A;
	Sat, 19 Mar 2011 01:41:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F17D28FC1A;
	Sat, 19 Mar 2011 01:41:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2J1fLkd086301;
	Sat, 19 Mar 2011 01:41:21 GMT (envelope-from gjb@svn.freebsd.org)
Received: (from gjb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2J1fLl6086299;
	Sat, 19 Mar 2011 01:41:21 GMT (envelope-from gjb@svn.freebsd.org)
Message-Id: <201103190141.p2J1fLl6086299@svn.freebsd.org>
From: Glen Barber 
Date: Sat, 19 Mar 2011 01:41:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219768 - stable/8/usr.sbin/moused
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 19 Mar 2011 01:41:22 -0000

Author: gjb (doc committer)
Date: Sat Mar 19 01:41:21 2011
New Revision: 219768
URL: http://svn.freebsd.org/changeset/base/219768

Log:
  MFC 219723:
  - Formtting fix.

Modified:
  stable/8/usr.sbin/moused/moused.8
Directory Properties:
  stable/8/usr.sbin/moused/   (props changed)

Modified: stable/8/usr.sbin/moused/moused.8
==============================================================================
--- stable/8/usr.sbin/moused/moused.8	Sat Mar 19 00:46:10 2011	(r219767)
+++ stable/8/usr.sbin/moused/moused.8	Sat Mar 19 01:41:21 2011	(r219768)
@@ -450,9 +450,9 @@ X10 MouseRemote.
 Genius Kidspad and Easypad protocol.
 .It Ar versapad
 Interlink VersaPad protocol.
-.El
 .It Ar gtco_digipad
 GTCO Digipad protocol.
+.El
 .Pp
 For the bus and InPort mouse:
 .Bl -tag -compact -width mousesystemsxxx

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 19 01:41:58 2011
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D2F401065686;
	Sat, 19 Mar 2011 01:41:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C41BC8FC1D;
	Sat, 19 Mar 2011 01:41:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2J1fwgc086353;
	Sat, 19 Mar 2011 01:41:58 GMT (envelope-from gjb@svn.freebsd.org)
Received: (from gjb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2J1fwku086351;
	Sat, 19 Mar 2011 01:41:58 GMT (envelope-from gjb@svn.freebsd.org)
Message-Id: <201103190141.p2J1fwku086351@svn.freebsd.org>
From: Glen Barber 
Date: Sat, 19 Mar 2011 01:41:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r219769 - stable/7/usr.sbin/moused
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 19 Mar 2011 01:41:58 -0000

Author: gjb (doc committer)
Date: Sat Mar 19 01:41:58 2011
New Revision: 219769
URL: http://svn.freebsd.org/changeset/base/219769

Log:
  MFC 219723:
  - Formatting fix.

Modified:
  stable/7/usr.sbin/moused/moused.8
Directory Properties:
  stable/7/usr.sbin/moused/   (props changed)

Modified: stable/7/usr.sbin/moused/moused.8
==============================================================================
--- stable/7/usr.sbin/moused/moused.8	Sat Mar 19 01:41:21 2011	(r219768)
+++ stable/7/usr.sbin/moused/moused.8	Sat Mar 19 01:41:58 2011	(r219769)
@@ -450,9 +450,9 @@ X10 MouseRemote.
 Genius Kidspad and Easypad protocol.
 .It Ar versapad
 Interlink VersaPad protocol.
-.El
 .It Ar gtco_digipad
 GTCO Digipad protocol.
+.El
 .Pp
 For the bus and InPort mouse:
 .Bl -tag -compact -width mousesystemsxxx