From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:11:03 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A16921065677; Sun, 18 Jul 2010 07:11:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 854D68FC0A; Sun, 18 Jul 2010 07:11:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7B3dV076557; Sun, 18 Jul 2010 07:11:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7B3v9076545; Sun, 18 Jul 2010 07:11:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180711.o6I7B3v9076545@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210204 - in stable/8/sys/dev/ata: . chipsets X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:11:03 -0000 Author: mav Date: Sun Jul 18 07:11:03 2010 New Revision: 210204 URL: http://svn.freebsd.org/changeset/base/210204 Log: MFC r209872: Make hw.ata.ata_dma_check_80pin tunable affect not only device side, but also controller side cable checks. Make respective sysctl writable. PR: kern/143462 Modified: stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/ata/chipsets/ata-acerlabs.c stable/8/sys/dev/ata/chipsets/ata-amd.c stable/8/sys/dev/ata/chipsets/ata-highpoint.c stable/8/sys/dev/ata/chipsets/ata-intel.c stable/8/sys/dev/ata/chipsets/ata-ite.c stable/8/sys/dev/ata/chipsets/ata-jmicron.c stable/8/sys/dev/ata/chipsets/ata-marvell.c stable/8/sys/dev/ata/chipsets/ata-promise.c stable/8/sys/dev/ata/chipsets/ata-siliconimage.c stable/8/sys/dev/ata/chipsets/ata-sis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/ata-all.c Sun Jul 18 07:11:03 2010 (r210204) @@ -105,7 +105,7 @@ SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, C "ATA disk DMA mode control"); TUNABLE_INT("hw.ata.ata_dma_check_80pin", &ata_dma_check_80pin); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma_check_80pin, - CTLFLAG_RDTUN, &ata_dma_check_80pin, 1, + CTLFLAG_RW, &ata_dma_check_80pin, 1, "Check for 80pin cable before setting ATA DMA mode"); TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma); SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RDTUN, &atapi_dma, 0, Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Sun Jul 18 07:11:03 2010 (r210204) @@ -286,7 +286,7 @@ ata_ali_setmode(device_t dev, int target mode = min(mode, ctlr->chip->max_dma); if (ctlr->chip->cfg2 & ALI_NEW && ctlr->chip->chiprev < 0xc7) { - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && pci_read_config(parent, 0x4a, 1) & (1 << ch->unit)) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; Modified: stable/8/sys/dev/ata/chipsets/ata-amd.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-amd.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-amd.c Sun Jul 18 07:11:03 2010 (r210204) @@ -119,7 +119,7 @@ ata_amd_setmode(device_t dev, int target mode = min(mode, ctlr->chip->max_dma); if (ctlr->chip->cfg1 & AMD_CABLE) { - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && !(pci_read_config(parent, 0x42, 1) & (1 << devno))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; Modified: stable/8/sys/dev/ata/chipsets/ata-highpoint.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-highpoint.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-highpoint.c Sun Jul 18 07:11:03 2010 (r210204) @@ -216,7 +216,7 @@ ata_highpoint_check_80pin(device_t dev, res = pci_read_config(parent, 0x5a, 1) & (ch->unit ? 0x1:0x2); pci_write_config(parent, reg, val, 1); - if (mode > ATA_UDMA2 && res) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && res) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Sun Jul 18 07:11:03 2010 (r210204) @@ -336,7 +336,8 @@ ata_intel_new_setmode(device_t dev, int u_int8_t utimings[] = { 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02 }; mode = min(mode, ctlr->chip->max_dma); - if (mode > ATA_UDMA2 && !(reg54 & (0x10 << devno))) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + !(reg54 & (0x10 << devno))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-ite.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ite.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-ite.c Sun Jul 18 07:11:03 2010 (r210204) @@ -139,7 +139,8 @@ ata_ite_821x_setmode(device_t dev, int t mode = min(mode, ctlr->chip->max_dma); /* check the CBLID bits for 80 conductor cable detection */ - if (mode > ATA_UDMA2 && (pci_read_config(parent, 0x40, 2) & + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + (pci_read_config(parent, 0x40, 2) & (ch->unit ? (1<<3) : (1<<2)))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; @@ -186,7 +187,8 @@ ata_ite_8213_setmode(device_t dev, int t mode = min(mode, ctlr->chip->max_dma); - if (mode > ATA_UDMA2 && !(reg54 & (0x10 << target))) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + !(reg54 & (0x10 << target))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-jmicron.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-jmicron.c Sun Jul 18 07:11:03 2010 (r210204) @@ -149,7 +149,8 @@ ata_jmicron_setmode(device_t dev, int ta mode = min(mode, ctlr->chip->max_dma); /* check for 80pin cable present */ - if (mode > ATA_UDMA2 && pci_read_config(dev, 0x40, 1) & 0x08) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + pci_read_config(dev, 0x40, 1) & 0x08) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Jul 18 07:11:03 2010 (r210204) @@ -188,7 +188,8 @@ ata_marvell_setmode(device_t dev, int ta mode = min(mode, ctlr->chip->max_dma); /* Check for 80pin cable present. */ - if (mode > ATA_UDMA2 && ATA_IDX_INB(ch, ATA_BMDEVSPEC_0) & 0x01) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + ATA_IDX_INB(ch, ATA_BMDEVSPEC_0) & 0x01) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Jul 18 07:11:03 2010 (r210204) @@ -470,7 +470,8 @@ ata_promise_setmode(device_t dev, int ta switch (ctlr->chip->cfg1) { case PR_OLD: case PR_NEW: - if (mode > ATA_UDMA2 && (pci_read_config(parent, 0x50, 2) & + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + (pci_read_config(parent, 0x50, 2) & (ch->unit ? 1 << 11 : 1 << 10))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; @@ -479,7 +480,7 @@ ata_promise_setmode(device_t dev, int ta case PR_TX: ATA_IDX_OUTB(ch, ATA_BMDEVSPEC_0, 0x0b); - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && ATA_IDX_INB(ch, ATA_BMDEVSPEC_1) & 0x04) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; @@ -487,7 +488,7 @@ ata_promise_setmode(device_t dev, int ta break; case PR_MIO: - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && (ATA_INL(ctlr->r_res2, (ctlr->chip->cfg2 & PR_SX4X ? 0x000c0260 : 0x0260) + (ch->unit << 7)) & 0x01000000)) { Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Jul 18 07:11:03 2010 (r210204) @@ -389,7 +389,8 @@ ata_sii_setmode(device_t dev, int target mode = min(mode, ctlr->chip->max_dma); if (ctlr->chip->cfg2 & SII_SETCLK) { - if (mode > ATA_UDMA2 && (pci_read_config(parent, 0x79, 1) & + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + (pci_read_config(parent, 0x79, 1) & (ch->unit ? 0x02 : 0x01))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; Modified: stable/8/sys/dev/ata/chipsets/ata-sis.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-sis.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-sis.c Sun Jul 18 07:11:03 2010 (r210204) @@ -243,13 +243,13 @@ ata_sis_setmode(device_t dev, int target mode = min(mode, ctlr->chip->max_dma); if (ctlr->chip->cfg1 == SIS_133NEW) { - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && pci_read_config(parent, ch->unit ? 0x52 : 0x50,2) & 0x8000) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } } else { - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && pci_read_config(parent, 0x48, 1)&(ch->unit ? 0x20 : 0x10)) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:13:55 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ABC2106564A; Sun, 18 Jul 2010 07:13:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88F208FC17; Sun, 18 Jul 2010 07:13:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7DtoY077246; Sun, 18 Jul 2010 07:13:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7DtS4077238; Sun, 18 Jul 2010 07:13:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180713.o6I7DtS4077238@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210205 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:13:55 -0000 Author: mav Date: Sun Jul 18 07:13:55 2010 New Revision: 210205 URL: http://svn.freebsd.org/changeset/base/210205 Log: MFC r209884: If ata_sata_phy_reset() failed and ata_generic_reset() is not called, mark channel as having no devices connected. This improves hot-unplug operation on legacy-emulating SATA controllers. Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c stable/8/sys/dev/ata/chipsets/ata-marvell.c stable/8/sys/dev/ata/chipsets/ata-nvidia.c stable/8/sys/dev/ata/chipsets/ata-promise.c stable/8/sys/dev/ata/chipsets/ata-siliconimage.c stable/8/sys/dev/ata/chipsets/ata-sis.c stable/8/sys/dev/ata/chipsets/ata-via.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Sun Jul 18 07:13:55 2010 (r210205) @@ -554,8 +554,12 @@ ata_intel_31244_tf_write(struct ata_requ static void ata_intel_31244_reset(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; } ATA_DECLARE_DRIVER(ata_intel); Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Jul 18 07:13:55 2010 (r210205) @@ -579,6 +579,8 @@ ata_marvell_edma_reset(device_t dev) /* enable channel and test for devices */ if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; /* enable EDMA machinery */ ATA_OUTL(ctlr->r_res1, 0x02028 + ATA_MV_EDMA_BASE(ch), 0x00000001); Modified: stable/8/sys/dev/ata/chipsets/ata-nvidia.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-nvidia.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-nvidia.c Sun Jul 18 07:13:55 2010 (r210205) @@ -296,8 +296,12 @@ ata_nvidia_status(device_t dev) static void ata_nvidia_reset(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; } static int Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Jul 18 07:13:55 2010 (r210205) @@ -744,6 +744,8 @@ ata_promise_mio_reset(device_t dev) if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; /* reset and enable plug/unplug intr */ ATA_OUTL(ctlr->r_res2, 0x06c, (0x00000011 << ch->unit)); Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Jul 18 07:13:55 2010 (r210205) @@ -364,8 +364,12 @@ ata_sii_status(device_t dev) static void ata_sii_reset(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; } static int Modified: stable/8/sys/dev/ata/chipsets/ata-sis.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-sis.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-sis.c Sun Jul 18 07:13:55 2010 (r210205) @@ -228,8 +228,12 @@ ata_sis_ch_attach(device_t dev) static void ata_sis_reset(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; } static int Modified: stable/8/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-via.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-via.c Sun Jul 18 07:13:55 2010 (r210205) @@ -290,9 +290,12 @@ ata_via_reset(device_t dev) if ((ctlr->chip->cfg2 & VIABAR) && (ch->unit > 1)) ata_generic_reset(dev); - else + else { if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; + } } static int From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:15:37 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F114106566B; Sun, 18 Jul 2010 07:15:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB338FC16; Sun, 18 Jul 2010 07:15:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7Fb02077670; Sun, 18 Jul 2010 07:15:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7FbIP077668; Sun, 18 Jul 2010 07:15:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180715.o6I7FbIP077668@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:15:37 +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: r210206 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:15:37 -0000 Author: mav Date: Sun Jul 18 07:15:37 2010 New Revision: 210206 URL: http://svn.freebsd.org/changeset/base/210206 Log: MFC r209977: Disable multi-sector PIO transfers if ATA_SET_MULTI command failed. Modified: stable/8/sys/dev/ata/ata-disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-disk.c ============================================================================== --- stable/8/sys/dev/ata/ata-disk.c Sun Jul 18 07:13:55 2010 (r210205) +++ stable/8/sys/dev/ata/ata-disk.c Sun Jul 18 07:15:37 2010 (r210206) @@ -405,6 +405,8 @@ ad_init(device_t dev) if (!ata_controlcmd(dev, ATA_SET_MULTI, 0, 0, secsperint)) atadev->max_iosize = secsperint * DEV_BSIZE; + else + atadev->max_iosize = DEV_BSIZE; } else atadev->max_iosize = DEV_BSIZE; From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:19:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3561A106566C; Sun, 18 Jul 2010 07:19:24 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A24E8FC0A; Sun, 18 Jul 2010 07:19: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 o6I7JNs0078581; Sun, 18 Jul 2010 07:19:23 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7JN1K078578; Sun, 18 Jul 2010 07:19:23 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007180719.o6I7JN1K078578@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 18 Jul 2010 07:19: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: r210207 - stable/8/sys/dev/iwn X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:19:24 -0000 Author: bschmidt Date: Sun Jul 18 07:19:23 2010 New Revision: 210207 URL: http://svn.freebsd.org/changeset/base/210207 Log: MFC r210107,r210108: - Remove duplicate vendor:device entry. - Fix some small whitespace nits. Modified: stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/iwn/if_iwnvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sun Jul 18 07:15:37 2010 (r210206) +++ stable/8/sys/dev/iwn/if_iwn.c Sun Jul 18 07:19:23 2010 (r210207) @@ -310,7 +310,6 @@ static const struct iwn_ident iwn_ident_ { 0x8086, 0x423D, "Intel(R) PRO/Wireless 5150" }, { 0x8086, 0x4235, "Intel(R) PRO/Wireless 5300" }, { 0x8086, 0x4236, "Intel(R) PRO/Wireless 5300" }, - { 0x8086, 0x4236, "Intel(R) PRO/Wireless 5350" }, { 0x8086, 0x423A, "Intel(R) PRO/Wireless 5350" }, { 0x8086, 0x423B, "Intel(R) PRO/Wireless 5350" }, { 0x8086, 0x0083, "Intel(R) PRO/Wireless 1000" }, @@ -1666,7 +1665,7 @@ iwn5000_read_eeprom(struct iwn_softc *sc DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: calib version=%u pa type=%u voltage=%u\n", __func__, hdr.version, hdr.pa_type, le16toh(hdr.volt)); - sc->calib_ver = hdr.version; + sc->calib_ver = hdr.version; if (sc->hw_type == IWN_HW_REV_TYPE_5150) { /* Compute temperature offset. */ @@ -5868,9 +5867,9 @@ iwn5000_nic_config(struct iwn_softc *sc) /* Use internal power amplifier only. */ IWN_WRITE(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_RADIO_2X2_IPA); } - if (sc->hw_type == IWN_HW_REV_TYPE_6050 && sc->calib_ver >= 6) { - /* Indicate that ROM calibration version is >=6. */ - IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_CALIB_VER6); + if (sc->hw_type == IWN_HW_REV_TYPE_6050 && sc->calib_ver >= 6) { + /* Indicate that ROM calibration version is >=6. */ + IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_CALIB_VER6); } return 0; } Modified: stable/8/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/8/sys/dev/iwn/if_iwnvar.h Sun Jul 18 07:15:37 2010 (r210206) +++ stable/8/sys/dev/iwn/if_iwnvar.h Sun Jul 18 07:19:23 2010 (r210207) @@ -307,7 +307,7 @@ struct iwn_softc { #define IWN_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ - MTX_NETWORK_LOCK, MTX_DEF) + MTX_NETWORK_LOCK, MTX_DEF) #define IWN_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define IWN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) #define IWN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:23:00 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5A581065674; Sun, 18 Jul 2010 07:23:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAAEC8FC13; Sun, 18 Jul 2010 07:23: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 o6I7N0RZ079423; Sun, 18 Jul 2010 07:23:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7N0Ys079421; Sun, 18 Jul 2010 07:23:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180723.o6I7N0Ys079421@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210208 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:23:01 -0000 Author: mav Date: Sun Jul 18 07:23:00 2010 New Revision: 210208 URL: http://svn.freebsd.org/changeset/base/210208 Log: MFC r209883, r209944: Make interrupt handler check that CAM bus initialization completed before touching it. It fixes possible panic during controller attach in ATA_CAM mode. While there, slightly improve attach errors handling. Modified: stable/8/sys/dev/ata/ata-all.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Sun Jul 18 07:19:23 2010 (r210207) +++ stable/8/sys/dev/ata/ata-all.c Sun Jul 18 07:23:00 2010 (r210208) @@ -195,6 +195,7 @@ ata_attach(device_t dev) } if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL, ata_interrupt, ch, &ch->ih))) { + bus_release_resource(dev, SYS_RES_IRQ, rid, ch->r_irq); device_printf(dev, "unable to setup interrupt\n"); return error; } @@ -218,8 +219,9 @@ ata_attach(device_t dev) device_get_unit(dev), &ch->state_mtx, 1, 0, devq); if (ch->sim == NULL) { device_printf(dev, "unable to allocate sim\n"); + cam_simq_free(devq); error = ENOMEM; - goto err2; + goto err1; } if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { device_printf(dev, "unable to register xpt bus\n"); @@ -239,8 +241,9 @@ err3: xpt_bus_deregister(cam_sim_path(ch->sim)); err2: cam_sim_free(ch->sim, /*free_devq*/TRUE); + ch->sim = NULL; err1: - bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); + bus_release_resource(dev, SYS_RES_IRQ, rid, ch->r_irq); mtx_unlock(&ch->state_mtx); return (error); #endif @@ -281,6 +284,7 @@ ata_detach(device_t dev) xpt_free_path(ch->path); xpt_bus_deregister(cam_sim_path(ch->sim)); cam_sim_free(ch->sim, /*free_devq*/TRUE); + ch->sim = NULL; mtx_unlock(&ch->state_mtx); #endif @@ -307,9 +311,12 @@ ata_conn_event(void *context, int dummy) union ccb *ccb; mtx_lock(&ch->state_mtx); + if (ch->sim == NULL) { + mtx_unlock(&ch->state_mtx); + return; + } ata_reinit(dev); - mtx_unlock(&ch->state_mtx); - if ((ccb = xpt_alloc_ccb()) == NULL) + if ((ccb = xpt_alloc_ccb_nowait()) == NULL) return; if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(ch->sim), @@ -318,6 +325,7 @@ ata_conn_event(void *context, int dummy) return; } xpt_rescan(ccb); + mtx_unlock(&ch->state_mtx); #else ata_reinit(dev); #endif From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:29:37 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5E40106566B; Sun, 18 Jul 2010 07:29:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D47F18FC12; Sun, 18 Jul 2010 07:29:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7Tbf6081007; Sun, 18 Jul 2010 07:29:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7TbvQ081005; Sun, 18 Jul 2010 07:29:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180729.o6I7TbvQ081005@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:29:37 +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: r210209 - stable/8/sys/cam/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:29:38 -0000 Author: mav Date: Sun Jul 18 07:29:37 2010 New Revision: 210209 URL: http://svn.freebsd.org/changeset/base/210209 Log: MFC r208819: Fix double free on error. Modified: stable/8/sys/cam/ata/ata_pmp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Sun Jul 18 07:23:00 2010 (r210208) +++ stable/8/sys/cam/ata/ata_pmp.c Sun Jul 18 07:29:37 2010 (r210209) @@ -737,10 +737,8 @@ pmpdone(struct cam_periph *periph, union if (xpt_create_path(&dpath, periph, xpt_path_path_id(periph->path), i, 0) != CAM_REQ_CMP) { - printf("pmpdone: xpt_create_path failed" - ", bus scan halted\n"); - xpt_free_ccb(done_ccb); - goto done; + printf("pmpdone: xpt_create_path failed\n"); + continue; } /* If we did hard reset to this device, inform XPT. */ if ((softc->reset & softc->found & (1 << i)) != 0) From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:31:25 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4F49106564A; Sun, 18 Jul 2010 07:31:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3C568FC12; Sun, 18 Jul 2010 07:31: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 o6I7VPaJ081452; Sun, 18 Jul 2010 07:31:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7VPtl081450; Sun, 18 Jul 2010 07:31:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180731.o6I7VPtl081450@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210210 - stable/8/sys/cam/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:31:25 -0000 Author: mav Date: Sun Jul 18 07:31:25 2010 New Revision: 210210 URL: http://svn.freebsd.org/changeset/base/210210 Log: MFC r208823: Add allocation error handling. Modified: stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun Jul 18 07:29:37 2010 (r210209) +++ stable/8/sys/cam/ata/ata_xpt.c Sun Jul 18 07:31:25 2010 (r210210) @@ -1209,6 +1209,12 @@ ata_scan_bus(struct cam_periph *periph, !(work_ccb->cpi.hba_misc & PIM_NOBUSRESET) && !timevalisset(&request_ccb->ccb_h.path->bus->last_reset)) { reset_ccb = xpt_alloc_ccb_nowait(); + if (reset_ccb == NULL) { + request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + xpt_free_ccb(work_ccb); + xpt_done(request_ccb); + return; + } xpt_setup_ccb(&reset_ccb->ccb_h, request_ccb->ccb_h.path, CAM_PRIORITY_NONE); reset_ccb->ccb_h.func_code = XPT_RESET_BUS; @@ -1228,6 +1234,7 @@ ata_scan_bus(struct cam_periph *periph, malloc(sizeof(ata_scan_bus_info), M_CAMXPT, M_NOWAIT); if (scan_info == NULL) { request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + xpt_free_ccb(work_ccb); xpt_done(request_ccb); return; } From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:34:23 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56DAA106564A; Sun, 18 Jul 2010 07:34:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2698FC17; Sun, 18 Jul 2010 07:34:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7YNSN082130; Sun, 18 Jul 2010 07:34:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7YN0H082128; Sun, 18 Jul 2010 07:34:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180734.o6I7YN0H082128@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:34: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: r210211 - stable/8/sys/cam/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:34:23 -0000 Author: mav Date: Sun Jul 18 07:34:20 2010 New Revision: 210211 URL: http://svn.freebsd.org/changeset/base/210211 Log: MFC r209744: ATA device reset starts probe sequence from the beginning. If reset caused by timeout/error of one of probe commands, process may continue infinitely. Make CAM ATA more robust to faulty devices and false positive detections, abort probe after two restarts on timeouts or ten on other errors. Modified: stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun Jul 18 07:31:25 2010 (r210210) +++ stable/8/sys/cam/ata/ata_xpt.c Sun Jul 18 07:34:20 2010 (r210211) @@ -134,6 +134,7 @@ typedef struct { uint32_t pm_prv; int restart; int spinup; + int faults; u_int caps; struct cam_periph *periph; } probe_softc; @@ -738,14 +739,28 @@ probedone(struct cam_periph *periph, uni ident_buf = &path->device->ident_data; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { -device_fail: if ((!softc->restart) && - cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { + if (softc->restart) { + if (bootverbose) { + cam_error_print(done_ccb, + CAM_ESF_ALL, CAM_EPF_ALL); + } + } else if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) return; - } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ xpt_release_devq(done_ccb->ccb_h.path, /*count*/1, /*run_queue*/TRUE); } + if (softc->restart) { + softc->faults++; + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == + CAM_CMD_TIMEOUT) + softc->faults += 4; + if (softc->faults < 10) + goto done; + else + softc->restart = 0; + } else /* Old PIO2 devices may not support mode setting. */ if (softc->action == PROBE_SETMODE && ata_max_pmode(ident_buf) <= ATA_PIO2 && @@ -761,7 +776,7 @@ device_fail: if ((!softc->restart) && * already marked unconfigured, notify the peripheral * drivers that this device is no more. */ - if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0) +device_fail: if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0) xpt_async(AC_LOST_DEVICE, path, NULL); found = 0; goto done; From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:42:54 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B31F106564A; Sun, 18 Jul 2010 07:42:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 696348FC12; Sun, 18 Jul 2010 07:42:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7gsLI084084; Sun, 18 Jul 2010 07:42:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7gsuE084082; Sun, 18 Jul 2010 07:42:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180742.o6I7gsuE084082@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210212 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:42:54 -0000 Author: mav Date: Sun Jul 18 07:42:54 2010 New Revision: 210212 URL: http://svn.freebsd.org/changeset/base/210212 Log: MFC r209664: Add ata(4) ability to limit initial ATA mode for devices via device hints. After boot this mode can be changed with atacontrol/camcontrol as usual. It works for both legacy and ATA_CAM wrapper mode. Modified: stable/8/share/man/man4/ata.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ata.4 ============================================================================== --- stable/8/share/man/man4/ata.4 Sun Jul 18 07:34:20 2010 (r210211) +++ stable/8/share/man/man4/ata.4 Sun Jul 18 07:42:54 2010 (r210212) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 2010 +.Dd July 3, 2010 .Dt ATA 4 .Os .Sh NAME @@ -103,6 +103,10 @@ can cause data loss on power failures an .It Va hint.atapci.X.msi set to 1 to allow Message Signalled Interrupts (MSI) to be used by specified PCI ATA controller, if supported. +.It Va hint.ata.X.devX.mode +limits initial ATA mode for specified device on specified channel. +.It Va hint.ata.X.mode +limits initial ATA mode for every device on specified channel. .It Va hint.ata.X.pm_level controls SATA interface Power Management for specified channel, allowing to save some power by the cost of additional command latency. From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 07:59:55 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E001106566B; Sun, 18 Jul 2010 07:59:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52BBD8FC1B; Sun, 18 Jul 2010 07:59:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7xt1r087934; Sun, 18 Jul 2010 07:59:55 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7xtZn087932; Sun, 18 Jul 2010 07:59:55 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201007180759.o6I7xtZn087932@svn.freebsd.org> From: Martin Matuska Date: Sun, 18 Jul 2010 07:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210214 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:59:55 -0000 Author: mm Date: Sun Jul 18 07:59:55 2010 New Revision: 210214 URL: http://svn.freebsd.org/changeset/base/210214 Log: MFC r209275: Import latest ARC change from OpenSolaris: - large ghost eviction causes high write latency - arc_adjust might adjust MRU unnecessarily - arc_adapt can lead to wild arc_p adjustment OpenSolaris onnv-revision: 12636:13b5d698941e Submitted by: avg Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6950219, 6953403, 6951024) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Jul 18 07:55:22 2010 (r210213) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Jul 18 07:59:55 2010 (r210214) @@ -1949,8 +1949,9 @@ arc_adjust(void) * Adjust MRU size */ - adjustment = MIN(arc_size - arc_c, - arc_anon->arcs_size + arc_mru->arcs_size + arc_meta_used - arc_p); + adjustment = MIN((int64_t)(arc_size - arc_c), + (int64_t)(arc_anon->arcs_size + arc_mru->arcs_size + arc_meta_used - + arc_p)); if (adjustment > 0 && arc_mru->arcs_lsize[ARC_BUFC_DATA] > 0) { delta = MIN(arc_mru->arcs_lsize[ARC_BUFC_DATA], adjustment); @@ -2271,10 +2272,7 @@ arc_reclaim_thread(void *dummy __unused) arc_no_grow = FALSE; } - if (needfree || - (2 * arc_c < arc_size + - arc_mru_ghost->arcs_size + arc_mfu_ghost->arcs_size)) - arc_adjust(); + arc_adjust(); if (arc_eviction_list != NULL) arc_do_user_evicts(); @@ -2325,6 +2323,7 @@ arc_adapt(int bytes, arc_state_t *state) if (state == arc_mru_ghost) { mult = ((arc_mru_ghost->arcs_size >= arc_mfu_ghost->arcs_size) ? 1 : (arc_mfu_ghost->arcs_size/arc_mru_ghost->arcs_size)); + mult = MIN(mult, 10); /* avoid wild arc_p adjustment */ arc_p = MIN(arc_c - arc_p_min, arc_p + bytes * mult); } else if (state == arc_mfu_ghost) { @@ -2332,6 +2331,7 @@ arc_adapt(int bytes, arc_state_t *state) mult = ((arc_mfu_ghost->arcs_size >= arc_mru_ghost->arcs_size) ? 1 : (arc_mru_ghost->arcs_size/arc_mfu_ghost->arcs_size)); + mult = MIN(mult, 10); delta = MIN(bytes * mult, arc_p); arc_p = MAX(arc_p_min, arc_p - delta); From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 10:56:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C263E106566C; Sun, 18 Jul 2010 10:56:20 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0DAC8FC0C; Sun, 18 Jul 2010 10:56:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IAuKVB027704; Sun, 18 Jul 2010 10:56:20 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IAuKpp027702; Sun, 18 Jul 2010 10:56:20 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007181056.o6IAuKpp027702@svn.freebsd.org> From: Benedict Reuschling Date: Sun, 18 Jul 2010 10:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210218 - stable/8/sbin/reboot X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 10:56:20 -0000 Author: bcr (doc committer) Date: Sun Jul 18 10:56:20 2010 New Revision: 210218 URL: http://svn.freebsd.org/changeset/base/210218 Log: MFC r209703: Let boot(8) refer to the uart(4) serial driver, which is the replacement for the obsolete sio(4) driver. PR: docs/144498 Submitted by: Bruce Cran (bruce at cran dot org dot uk) Approved by: marcel Modified: stable/8/sbin/reboot/boot_i386.8 Modified: stable/8/sbin/reboot/boot_i386.8 ============================================================================== --- stable/8/sbin/reboot/boot_i386.8 Sun Jul 18 10:15:33 2010 (r210217) +++ stable/8/sbin/reboot/boot_i386.8 Sun Jul 18 10:56:20 2010 (r210218) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2005 +.Dd July 4, 2010 .Dt BOOT 8 i386 .Os .Sh NAME @@ -220,14 +220,14 @@ you can use the option to force the kernel to use the serial port as its console device. The serial port driver -.Xr sio 4 +.Xr uart 4 has a flag (0x20) to override this option. If that flag is set, the serial port will always be used as the console, regardless of the .Fl h option described here. See the man page for -.Xr sio 4 +.Xr uart 4 for more details. .It Fl m mute the console to suppress all console input and output during the From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 15:18:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44CC91065673; Sun, 18 Jul 2010 15:18:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9045A8FC20; Sun, 18 Jul 2010 15:18:32 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6IFITMS035384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Jul 2010 18:18:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6IFITpr028147; Sun, 18 Jul 2010 18:18:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6IFITaL028146; Sun, 18 Jul 2010 18:18:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 18 Jul 2010 18:18:29 +0300 From: Kostik Belousov To: Benedict Reuschling Message-ID: <20100718151829.GQ2381@deviant.kiev.zoral.com.ua> References: <201007181056.o6IAuKpp027702@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lh55S0yADJsuIVGW" Content-Disposition: inline In-Reply-To: <201007181056.o6IAuKpp027702@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r210218 - stable/8/sbin/reboot X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 15:18:34 -0000 --lh55S0yADJsuIVGW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 18, 2010 at 10:56:20AM +0000, Benedict Reuschling wrote: > Author: bcr (doc committer) > Date: Sun Jul 18 10:56:20 2010 > New Revision: 210218 > URL: http://svn.freebsd.org/changeset/base/210218 >=20 > Log: > MFC r209703: > =20 > Let boot(8) refer to the uart(4) serial driver, which is the replacement > for the obsolete sio(4) driver. > =20 > PR: docs/144498 > Submitted by: Bruce Cran (bruce at cran dot org dot uk) > Approved by: marcel >=20 > Modified: > stable/8/sbin/reboot/boot_i386.8 This commit, as well as accompanying stable/7 commit and reversal, where not merges. Please see http://wiki.freebsd.org/SubversionPrimer/Merging for the proper procedure. --lh55S0yADJsuIVGW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkxDG0QACgkQC3+MBN1Mb4hLigCfbtv1eADJTBkjynsIeXXTkZJW lPMAoLgVfmKOOYXZOWRQ6P/BssCQW608 =FWv+ -----END PGP SIGNATURE----- --lh55S0yADJsuIVGW-- From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 18 18:52:01 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F333D1065676; Sun, 18 Jul 2010 18:52:00 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7E258FC20; Sun, 18 Jul 2010 18:52: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 o6IIq0q6032126; Sun, 18 Jul 2010 18:52:00 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IIq0lo032125; Sun, 18 Jul 2010 18:52:00 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007181852.o6IIq0lo032125@svn.freebsd.org> From: Benedict Reuschling Date: Sun, 18 Jul 2010 18:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210223 - stable/8/sbin/reboot X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 18:52:01 -0000 Author: bcr (doc committer) Date: Sun Jul 18 18:52:00 2010 New Revision: 210223 URL: http://svn.freebsd.org/changeset/base/210223 Log: Fix botched mergeinfo in stable/8, caused by my mismerge of r209703. With help from and approved by: kib@ Modified: Directory Properties: stable/8/sbin/reboot/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 10:55:44 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99F231065673; Mon, 19 Jul 2010 10:55:44 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88B438FC0A; Mon, 19 Jul 2010 10:55:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JAtibs044779; Mon, 19 Jul 2010 10:55:44 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JAtilN044778; Mon, 19 Jul 2010 10:55:44 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201007191055.o6JAtilN044778@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 19 Jul 2010 10:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210230 - stable/8/sys/geom/cache X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 10:55:44 -0000 Author: ru Date: Mon Jul 19 10:55:44 2010 New Revision: 210230 URL: http://svn.freebsd.org/changeset/base/210230 Log: MFC r210046: Fixed cache size decoding read from a label. PR: kern/144732 Modified: stable/8/sys/geom/cache/g_cache.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/cache/g_cache.h ============================================================================== --- stable/8/sys/geom/cache/g_cache.h Mon Jul 19 07:28:35 2010 (r210229) +++ stable/8/sys/geom/cache/g_cache.h Mon Jul 19 10:55:44 2010 (r210230) @@ -139,7 +139,7 @@ cache_metadata_decode(const u_char *data md->md_version = le32dec(data + 16); bcopy(data + 20, md->md_name, sizeof(md->md_name)); md->md_bsize = le32dec(data + 36); - md->md_size = le16dec(data + 40); + md->md_size = le32dec(data + 40); md->md_provsize = le64dec(data + 44); } From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 12:16:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1913D1065674; Mon, 19 Jul 2010 12:16:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07E998FC12; Mon, 19 Jul 2010 12:16:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JCGfbi062675; Mon, 19 Jul 2010 12:16:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCGfU9062674; Mon, 19 Jul 2010 12:16:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191216.o6JCGfU9062674@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210231 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:16:42 -0000 Author: kib Date: Mon Jul 19 12:16:41 2010 New Revision: 210231 URL: http://svn.freebsd.org/changeset/base/210231 Log: MFC r209955: When switching the thread from the processor, store %dr7 content into the pcb before disabling watchpoints. Otherwise, when the thread is restored on a processor, watchpoints are still disabled. Modified: stable/8/sys/amd64/amd64/cpu_switch.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/8/sys/amd64/amd64/cpu_switch.S Mon Jul 19 10:55:44 2010 (r210230) +++ stable/8/sys/amd64/amd64/cpu_switch.S Mon Jul 19 12:16:41 2010 (r210231) @@ -245,13 +245,13 @@ store_dr: movq %dr2,%r13 movq %dr3,%r12 movq %dr6,%r11 - andq $0x0000fc00, %rax /* disable all watchpoints */ movq %r15,PCB_DR0(%r8) movq %r14,PCB_DR1(%r8) movq %r13,PCB_DR2(%r8) movq %r12,PCB_DR3(%r8) movq %r11,PCB_DR6(%r8) movq %rax,PCB_DR7(%r8) + andq $0x0000fc00, %rax /* disable all watchpoints */ movq %rax,%dr7 jmp done_store_dr From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 12:32:25 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86D241065675; Mon, 19 Jul 2010 12:32:25 +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 75C168FC26; Mon, 19 Jul 2010 12:32: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 o6JCWPbM066220; Mon, 19 Jul 2010 12:32:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCWPTZ066219; Mon, 19 Jul 2010 12:32:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191232.o6JCWPTZ066219@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210232 - stable/8/sys/ddb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:32:25 -0000 Author: kib Date: Mon Jul 19 12:32:24 2010 New Revision: 210232 URL: http://svn.freebsd.org/changeset/base/210232 Log: MFC r209934: Use _SIG_VALID(). Modified: stable/8/sys/ddb/db_command.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/ddb/db_command.c ============================================================================== --- stable/8/sys/ddb/db_command.c Mon Jul 19 12:16:41 2010 (r210231) +++ stable/8/sys/ddb/db_command.c Mon Jul 19 12:32:24 2010 (r210232) @@ -633,7 +633,7 @@ db_kill(dummy1, dummy2, dummy3, dummy4) if (!db_expression(&pid)) DB_ERROR(("Missing process ID\n")); db_skip_to_eol(); - if (sig < 1 || sig > _SIG_MAXSIG) + if (!_SIG_VALID(sig)) DB_ERROR(("Signal number out of range\n")); /* From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 12:37:28 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A9C61065678; Mon, 19 Jul 2010 12:37:28 +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 795748FC12; Mon, 19 Jul 2010 12:37:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JCbSNn067393; Mon, 19 Jul 2010 12:37:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCbSo1067391; Mon, 19 Jul 2010 12:37:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191237.o6JCbSo1067391@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210233 - stable/8/lib/libthr/thread X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:37:28 -0000 Author: kib Date: Mon Jul 19 12:37:28 2010 New Revision: 210233 URL: http://svn.freebsd.org/changeset/base/210233 Log: MFC r209933: Use _SIG_VALID instead of expanded form of the macro. Modified: stable/8/lib/libthr/thread/thr_sig.c Directory Properties: stable/8/lib/libthr/ (props changed) Modified: stable/8/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/8/lib/libthr/thread/thr_sig.c Mon Jul 19 12:32:24 2010 (r210232) +++ stable/8/lib/libthr/thread/thr_sig.c Mon Jul 19 12:37:28 2010 (r210233) @@ -194,7 +194,7 @@ int _sigaction(int sig, const struct sigaction * act, struct sigaction * oact) { /* Check if the signal number is out of range: */ - if (sig < 1 || sig > _SIG_MAXSIG || sig == SIGCANCEL) { + if (!_SIG_VALID(sig) || sig == SIGCANCEL) { /* Return an invalid argument: */ errno = EINVAL; return (-1); From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 12:41:06 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DBB61065670; Mon, 19 Jul 2010 12:41:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CB908FC19; Mon, 19 Jul 2010 12:41: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 o6JCf6Ha068236; Mon, 19 Jul 2010 12:41:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCf6vb068234; Mon, 19 Jul 2010 12:41:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191241.o6JCf6vb068234@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:41: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: r210234 - stable/8/lib/libc/compat-43 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:41:06 -0000 Author: kib Date: Mon Jul 19 12:41:05 2010 New Revision: 210234 URL: http://svn.freebsd.org/changeset/base/210234 Log: MFC r209932: For xsi_sigpause(3), remove the supplied signal from the process mask during sigpause(2) call. It was backward. Check that the signal number is valid. Modified: stable/8/lib/libc/compat-43/sigcompat.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/compat-43/sigcompat.c ============================================================================== --- stable/8/lib/libc/compat-43/sigcompat.c Mon Jul 19 12:37:28 2010 (r210233) +++ stable/8/lib/libc/compat-43/sigcompat.c Mon Jul 19 12:41:05 2010 (r210234) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#include #include #include #include "un-namespace.h" @@ -111,9 +112,16 @@ int xsi_sigpause(int sig) { sigset_t set; + int error; - sigemptyset(&set); - sigaddset(&set, sig); + if (!_SIG_VALID(sig)) { + errno = EINVAL; + return (-1); + } + error = _sigprocmask(SIG_BLOCK, NULL, &set); + if (error != 0) + return (error); + sigdelset(&set, sig); return (_sigsuspend(&set)); } From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 12:52:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAF09106566C; Mon, 19 Jul 2010 12:52:19 +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 D9C968FC0A; Mon, 19 Jul 2010 12:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JCqJoo070781; Mon, 19 Jul 2010 12:52:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCqJt0070779; Mon, 19 Jul 2010 12:52:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191252.o6JCqJt0070779@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210235 - stable/8/sys/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:52:20 -0000 Author: kib Date: Mon Jul 19 12:52:19 2010 New Revision: 210235 URL: http://svn.freebsd.org/changeset/base/210235 Log: MFC r209197: Add assert to check that the (current) thread is in critical section. MFC r209204: Rename CRITSECT_ASSERT to CRITICAL_ASSERT Modified: stable/8/sys/sys/proc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Mon Jul 19 12:41:05 2010 (r210234) +++ stable/8/sys/sys/proc.h Mon Jul 19 12:52:19 2010 (r210235) @@ -326,6 +326,9 @@ do { \ #define THREAD_LOCKPTR_ASSERT(td, lock) #endif +#define CRITICAL_ASSERT(td) \ + KASSERT((td)->td_critnest >= 1, ("Not in critical section")); + /* * Flags kept in td_flags: * To change these you MUST have the scheduler lock. From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 15:26:43 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4642C106564A; Mon, 19 Jul 2010 15:26:43 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 315AF8FC17; Mon, 19 Jul 2010 15:26:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JFQhC6005177; Mon, 19 Jul 2010 15:26:43 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JFQhaY005143; Mon, 19 Jul 2010 15:26:43 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007191526.o6JFQhaY005143@svn.freebsd.org> From: Hiroki Sato Date: Mon, 19 Jul 2010 15:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210239 - in stable/8/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/relnotes share/sgml X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 15:26:43 -0000 Author: hrs Date: Mon Jul 19 15:26:42 2010 New Revision: 210239 URL: http://svn.freebsd.org/changeset/base/210239 Log: - Clean up old contents and bump version numbers. - Add items for security advisories. Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml stable/8/release/doc/share/sgml/release.dsl stable/8/release/doc/share/sgml/release.ent Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jul 19 15:05:35 2010 (r210238) +++ stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jul 19 15:26:42 2010 (r210239) @@ -16,7 +16,7 @@ %release; - + ]>
@@ -40,7 +40,7 @@ $FreeBSD$ - 2009 + 2010 The &os; Documentation Project @@ -119,7 +119,6 @@ For a list of all &os; CERT security advisories, see or . - @@ -144,34 +143,74 @@ - SA-09:17.freebsd-update - 03 December 2009 - Inappropriate directory permissions in freebsd-update(8) + SA-09:15.ssl + 3 Dec 2009 + SSL protocol flaw SA-09:16.rtld - 03 December 2009 - Improper environment sanitization in rtld(1) + 3 Dec 2009 + Improper environment sanitization in &man.rtld.1; - SA-09:15.ssl - 03 December 2009 - SSL protocol flaw + SA-09:17.freebsd-update + 3 Dec 2009 + Inappropriate directory permissions in &man.freebsd-update.8; + + + SA-10:01.bind + 6 Jan 2010 + BIND &man.named.8; cache poisoning with DNSSEC validation + + + SA-10:02.ntpd + 6 Jan 2010 + ntpd mode 7 denial of service + + + SA-10:03.zfs + 6 Jan 2010 + ZFS ZIL playback with insecure permissions + + + SA-10:04.jail + 27 May 2010 + Insufficient environment sanitization in &man.jail.8; + + + SA-10:05.opie + 27 May 2010 + OPIE off-by-one stack overflow + + + SA-10:06.nfsclient + 27 May 2010 + Unvalidated input in nfsclient + + + SA-10:07.mbuf + 13 July 2010 + Lost mbuf flag resulting in data corruption - Open Issues No open issues. - @@ -179,5 +218,4 @@ No news. -
Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Jul 19 15:05:35 2010 (r210238) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Jul 19 15:26:42 2010 (r210239) @@ -15,16 +15,7 @@ $FreeBSD$ - 2000 - 2001 - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - 2009 + 2010 The &os; Documentation Project @@ -106,9 +97,7 @@ What's New This section describes the most user-visible new or changed - features in &os; since &release.prev;, and changes shown in - Release Notes for the previous releases are marked as - [7.1R] and [7.2R]. + features in &os; since &release.prev;. Typical release note items document recent security advisories issued after &release.prev;, new drivers or hardware @@ -142,163 +131,65 @@ - - SA-08:05.openssh - 17 April 2008 - OpenSSH X11-forwarding privilege escalation - - - - SA-08:06.bind - 13 July 2008 - DNS cache poisoning - - - - SA-08:07.amd64 - 3 September 2008 - amd64 swapgs local privilege escalation - - - - SA-08:08.nmount - 3 September 2008 - &man.nmount.2; local arbitrary code execution - - - - SA-08:09.icmp6 - 3 September 2008 - Remote kernel panics on IPv6 connections - - - - SA-08:10.nd6 - 1 October 2008 - IPv6 Neighbor Discovery Protocol routing vulnerability - - - - SA-08:11.arc4random - 24 November 2008 - &man.arc4random.9; predictable sequence vulnerability - - - - SA-08:12.ftpd - 23 December 2008 - Cross-site request forgery in &man.ftpd.8; - - - - SA-08:13.protosw - 23 December 2008 - netgraph / bluetooth privilege escalation - - - - SA-09:01.lukemftpd - 07 January 2009 - Cross-site request forgery in - &man.lukemftpd.8; - - - - SA-09:02.openssl - 07 January 2009 - OpenSSL incorrectly checks for malformed - signatures - - - - SA-09:03.ntpd - 13 January 2009 - ntpd cryptographic signature - bypass - - - - SA-09:04.bind - 13 January 2009 - BIND DNSSEC incorrect checks for - malformed signatures + + SA-09:15.ssl + 3 Dec 2009 + SSL protocol flaw - - - SA-09:05.telnetd - 16 February 2009 - telnetd code execution - vulnerability + + SA-09:16.rtld + 3 Dec 2009 + Improper environment sanitization in &man.rtld.1; - - - SA-09:06.ktimer - 23 March 2009 - Local privilege escalation + + SA-09:17.freebsd-update + 3 Dec 2009 + Inappropriate directory permissions in &man.freebsd-update.8; - - - SA-09:07.libc - 04 April 2009 - Information leak in &man.db.3; + + SA-10:01.bind + 6 Jan 2010 + BIND &man.named.8; cache poisoning with DNSSEC validation - - - SA-09:08.openssl - 22 April 2009 - Remotely exploitable crash in - OpenSSL + + SA-10:02.ntpd + 6 Jan 2010 + ntpd mode 7 denial of service - - - SA-09:09.pipe - 10 June 2009 - Local information disclosure via direct pipe writes + + SA-10:03.zfs + 6 Jan 2010 + ZFS ZIL playback with insecure permissions - - - SA-09:10.ipv6 - 10 June 2009 - Missing permission check on SIOCSIFINFO_IN6 ioctl + + SA-10:04.jail + 27 May 2010 + Insufficient environment sanitization in &man.jail.8; - - - SA-09:11.ntpd - 10 June 2009 - ntpd stack-based buffer-overflow vulnerability + + SA-10:05.opie + 27 May 2010 + OPIE off-by-one stack overflow - - - SA-09:12.bind - 29 July 2009 - BIND &man.named.8; dynamic update message remote DoS + + SA-10:06.nfsclient + 27 May 2010 + Unvalidated input in nfsclient - - SA-09:14.devfs - 2 Oct 2009 - Devfs / VFS NULL pointer race condition + + SA-10:07.mbuf + 13 July 2010 + Lost mbuf flag resulting in data corruption @@ -308,2034 +199,68 @@ Kernel Changes - The &os; GENERIC kernel now - includes Trusted BSD MAC (Mandatory Access Control) support. - No MAC policy module is loaded by default. - - A loader - tunable hw.clflush_disable has been added - to avoid panic (trap 9) - at map_invalidate_cache_range() even if - Intel CPU is used. This tunable can be set - to -1 (default), 0 and - 1. The -1 is same as - the current behavior, which automatically - disables CLFLUSH on Intel CPUs without - CPUID_SS (this should occurr on Xen - only). You can specify 1 when this panic - happens on non-Intel CPUs (such as AMD's). Because disabling - CLFLUSH can reduce performance, you can try - with setting 0 on Intel CPUs - without SS to - use CLFLUSH feature. - - The &man.jail.8; subsystem has been updated. Changes include: - - - - A new virtualization container - named vimage has been implemented. This is - not enabled by default. To enable this, add the following - kernel options to your kernel configuration file and - rebuild the kernel: - - options VIMAGE - - Note that options SCTP in the - GENERIC kernel is not compatible with - options VIMAGE. This limitation will - be fixed in the next release. - - The vimage is a jail with a virtualized instance of - the &os; network stack. It can be created by using - &man.jail.8; command like this: - - &prompt.root; jail -c vnet name=vnet1 host.hostname=vnet1.example.net path=/ persist - - The vimage has own loopback interface and a separated - network stack including the L3 routing tables. Network - interfaces on the system can be moved by using - &man.ifconfig.8; option between the - different vimage jails and outside of them. - - Furthermore, the &man.epair.4; pseudo-interface driver - has been added to help communication between vimage jails. - It emulates a pair of back-to-back connected Ethernet - interfaces. For example, the following commands create an - interface pair of &man.epair.4;: - - &prompt.root; ifconfig epair0 create -epair0a -&prompt.root; ifconfig epair0a -epair0a: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 - ether 02:c0:64:00:07:0a -&prompt.root; ifconfig epair0b -epair0b: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 - ether 02:c0:64:00:08:0b - - The &man.epair.4; pseudo-interfaces and any physical - interfaces on the system can be moved between vimage jails - by using &man.ifconfig.8; option as - described above. Even after half of an &man.epair.4; pair - is moved, the back-to-back connection still valid and can - be used for inter-jail communication. - - Note that vimage is still considered as an - experimental feature. - - - - A jail can now have arbitrary named parameters similar - to environmental variables and the fixed jail parameters - in the previous releases have been replaced with them. - The jail name can now be used for identifying the jail in - &man.jexec.8; and &man.killall.1;. - - - - Multiple IPv4 and/or IPv6 addresses per jail are now - supported. It is even possible to have jails without - an IP address at all, which basically gives one a chrooted - environment with restricted process view and no - networking. - - - - SCTP (&man.sctp.4;) with IPv6 in jails has been - implemented. - - - - Specific CPU binding by using &man.cpuset.1; has been - implemented. Note that the current implementation allows - the superuser inside of the jail to change the CPU - bindings specified. - - - - A &man.jail.8; can start with a specific route - FIB now. - - - - The &man.ddb.8; kernel debugger now supports a - show jails subcommand. - - - - Compatibility support which permits 32-bit jail - binaries to be used on 64-bit systems to manage jails has - been added. - - - - Note that both version numbers of - jail and prison in - the &man.jail.8; have been updated for the new - features. - - - - The &man.ksyms.4;, kernel symbol table - interface driver has been added. It creates a character - device /dev/ksyms and provides - read-only access to a snapshot of the kernel symbol - table. - - The &os; Linux emulation - layer has been updated to version 2.6.16 and the default Linux - infrastructure port is - emulators/linux_base-f10 (Fedora - 10). - - The &os;/&arch.arm; now - supports mini dump. - - The &os;/&arch.powerpc; now - supports kernel core dump. - - The &os; virtual memory - subsystem now supports fully transparent use of - superpages for application memory; - application memory pages are dynamically promoted to or - demoted from superpages without any modification to - application code. This change offers the benefit of large - page sizes such as improved virtual memory efficiency and - reduced TLB (translation lookaside buffer) misses without - downsides like application changes and virtual memory - inflexibility. This can be enabled by setting a loader tunable - vm.pmap.pg_ps_enabled to - 1 and is enabled by default on - &arch.amd64;. - - The &man.ddb.8; kernel debugger now supports a - show mount subcommand. - - The &os; DTrace subsystem now supports a probe for - process execution. - - The &os; kernel virtual address - space has been increased to 6GB. This allows subsystems to use - larger virtual memory space than before. For example, the - &man.zfs.8; adaptive replacement cache (ARC) requires large - kernel memory space to cache file system data, so it benefits - from the increased address space. Note that the ceiling on - the kernel map size is now 60% of the size of physical memory - rather than an absolute quantity. - - The &man.kld.4; now supports installing 32-bit - system calls to the &os; syscall translation layer from kernel - modules. - - The &man.ktr.4; now supports a new KTR tracepoint in the - KTR_CALLOUT class to note when a callout - routine finishes executing. - - Types of variables used to track the amount of allocated - System V shared memory have been changed from - int to size_t. This - makes it possible to use more than 2 GB of memory for shared - memory segments on 64-bit architectures. Please note the new - BUGS section in &man.shmctl.2; and - /usr/src/UPDATING for limitations of this - temporary solution. - - The &man.sysctl.3; leaf nodes have a flag to tag - themselves as MPSAFE now. - - The &os; 32-bit system call translation layer now - supports installing 32-bit system calls for - VFS_AIO. - - The &man.clock.gettime.2; and the related system calls now - support a clock ID CLOCK_THREAD_CPUTIME_ID, - as defined in POSIX. - - The &man.cpuset.2; system call has been added. This is an - API for thread to CPU binding and CPU resource grouping and - assignment. - - The DTrace, a comprehensive dynamic tracing framework and - &man.dtrace.1; userland utility have been imported from - OpenSolaris. DTrace provides a powerful infrastructure to - permit administrators, developers, and service personnel to - concisely answer arbitrary questions about the behavior of the - operating system and user programs. - - The &man.ddb.4; kernel debugger now has an output capture - facility. Input and output from &man.ddb.4; can now be captured - to a memory buffer for later inspection using &man.sysctl.8; or - a textdump. The new capture command controls - this feature. - - The &man.ddb.4; debugger now supports a simple scripting - facility, which supports a set of named scripts consisting of a - set of &man.ddb.4; commands. These commands can be managed from - within &man.ddb.4; or with the use of the new &man.ddb.8; - utility. More details can be found in the &man.ddb.4; manual - page. - - The &man.ddb.4; ex command now supports - an mode which interprets and prints the - value at the requested address as a symbol. For example, - ex /S aio_swake - prints the name of the function currently registered in - via aio_swake hook. - - The &man.ddb.4; show conifhk command has - been added. This lists hooks currently waiting for completion - in run_interrupt_driven_config_hooks(). - - The &man.fcntl.2; system call now supports - F_DUP2FD command. This is equivalent to - &man.dup.2;, and compatible with the Sun Solaris and the IBM - AIX. - - The &os;'s &man.linux.4; ABI support now implements - sched_setaffinity() and - sched_getaffinity() using real CPU affinity - setting primitives. - - The &man.procstat.1; utility has been added. This is a - process inspection utility which provides some of the missing - functionality from &man.procfs.5; and new functionality for monitoring - and debugging specific processes. - - The client side functionality of &man.rpc.lockd.8; has been - implemented in the &os; kernel. This implementation provides the - correct semantics for &man.flock.2; style locks which are used - by the &man.lockf.1; command line tool and the &man.pidfile.3; - library. It also implements recovery from server restarts and - ensures that dirty cache blocks are written to the server before - obtaining locks (allowing multiple clients to use file locking - to safely share data). Also, a new kernel option - options NFSLOCKD has been added and enabled - by default. If the kernel support is enabled, &man.rpc.lockd.8; - automatically detects and uses the functionality. - - The &os; kernel now supports a new textdump format of kernel - dumps. A textdump provides higher-level information via - mechanically generated/extracted debugging output, rather than a - simple memory dump. This facility can be used to generate brief - kernel bug reports that are rich in debugging information, but - are not dependent on kernel symbol tables or precisely - synchronized source code. More information can be found in the - &man.textdump.4; manual page. - - The &man.wait4.2; system call now supports - flag to keep the process whose status - is returned in a waitable state and - which is equivalent to . - - The &os; kernel now has - initial support of binding interrupts to CPUs. - - The &man.sched.ule.4; scheduler is now the default - process scheduler in GENERIC - kernels. - - The sysctl - variables kern.features.compat_freebsd[456] - have been added. These are corresponding to the kernel options - COMPAT_FREEBSD[456]. + Boot Loader Changes - The boot0 boot - loader now preserves volume ID at offset - 0x1b8 used in other operating systems - - The &man.boot0cfg.8; utility now supports a - new option to set the volume ID. - - The &man.loader.8; now - supports U-Boot support library. - - The &man.boot.8; now supports 4-byte volume ID that - certain versions of &windows; put into the MBR and invoking - PXE by pressing the F6 key on some supported BIOSes. - - The &man.boot.8; BTX loader has been - improved. This fixes several boot issues on recent machines - reported for 7.1-RELEASE and before. - - The &man.loader.8; is now able to obtain DHCP options - from network boot via &man.kenv.2; variables. - - A bug in the &man.loader.8; has been fixed. Now the - following line works as expected: - - loader_conf_files="foo bar ${variable}" - - The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - - A new gptboot boot loader has - been added to support booting from a GPT labeled disk. A - new boot command has been added to - &man.gpt.8;, which makes a GPT disk bootable by writing the - required bits of the boot loader, creating a new boot - partition if required. + Hardware Support - The &os; now includes experimental support - for &arch.mips; platform. - - Support for RTC on Dallas Semiconductor chips - has been improved. The DS133x and DS1553 are now - supported. - - The &os;/&arch.arm; now supports - Feroceon and Sheeva embedded CPU, Marvell Orion (88F5281), - Kirkwood (88F6281), Discovery Innovation (MV-78100) - systems-on-chip CPU. - - The &os;/&arch.powerpc; now - supports SMP machines - - The &os;/&arch.powerpc; now - supports E500 (Book-E) embedded CPU and Freescale - PowerQUICCIII MPC85xx system-on-chip (including single and - dual-core). - - The &man.acpi.4; subsystem now supports the System - Resource Affinity Table (SRAT) used to describe affinity - relationships between CPUs and memory, ACPI 3.0 fields in - the MADT including X2APIC entries and UIDs for local SAPICs, and - ACPI 3.0 flags in the FADT. - - The &man.cpufreq.4; framework now - supports PowerPC G5, along with a skeleton SMU driver in order to slew - CPU voltage during frequency changes. - - The sec(4) driver has been added to provide - support for the integrated security engine found in - Freescale system-on-chip devices. - - The &os; TTY layer has been replaced with a - new one which has better support for SMP and robust resource - handling. A tty now has own mutex and it is expected to - improve scalability when compared to the old implementation - based on the Giant lock. - - The &man.uart.4; driver is now the - default driver for serial port devices in favor of the - &man.sio.4; driver. Note that the device nodes have been - renamed from - /dev/cuadN and - /dev/ttydN to - /dev/cuauN and - /dev/ttyuN. - - - Users who are upgrading will need to change their - kernel configurations and possibly also - /boot/loader.conf and - /boot/device.hints. - - - The &os; USB subsystem has been reimplemented - to support modern devices and better SMP scalability. The - new implementation includes Giant-lock-free device drivers, - a Linux compatibility layer, &man.usbconfig.8; utility, full - support for split transaction and isochronous transaction, - and more. Device node names for USB devices are now in a - the form - of /dev/usb/bus.dev.endpoint, - and /dev/usbctl is the master device - node. Note that the &man.ugen.4; driver has nodes for each device as /dev/ugenbus.dev for backward compatibility. - - &os; now supports Ultra SPARC III - (Cheetah) processor family. - - The &man.acpi.4; subsystem now supports a &man.sysctl.8; - variable debug.batt.batt_sleep_ms. On - some laptops with smart batteries, enabling battery - monitoring software causes keystrokes from &man.atkbd.4; to - be lost. This sysctl variable adds a delay in millisecond - to the status checking code as a workaround. - - The &man.acpi.asus.4; driver now supports Asus A8Sr - notebooks. - - Support for the AltiVec, a floating point - and integer SIMD instruction set has been added. - - The &man.cpuctl.4; driver, which provides a special - device /dev/cpuctl as an interface to - the system CPU has been added. The &man.cpuctl.4; - functionality includes the ability to retrieve CPUID - information, read/write machine specific registers (MSR), - and perform CPU firmware updates. - - The &man.cpufreq.4; driver now supports an - hw.est.msr_info loader tunable. When - this is set to 1, it attempts to build a - simple list containing just the high and low frequencies if - it cannot obtain a frequency list from either ACPI or the - static tables. This is disabled by default. - - CPU frequency change notifiers are now - disabled when the TSC is P-state invariant. Also, a new - loader tunable - kern.timecounter.invariant_tsc has been - added to force this behavior by setting it to - non-zero. - - The &man.atkbd.4; driver now disables the interrupt - handler which is called from the keyboard callback function - when polled mode is enabled. This fixes the problem of - duplicated/missing characters at the mountroot prompt on - multi CPU systems while &man.kbdmux.4; is enabled. - - In the &man.pci.4; subsystem INTx is now disabled when - MSI/MSIX is enabled. This change fixes interrupt storm - related issues. - - The schizo(4) driver for Schizo - Fireplane/Safari to PCI 2.1 and Tomatillo JBus to PCI 2.2 - bridges has been added. - - The &man.u3g.4; driver for USB based 3G cards and - dongles including Vodafone Mobile Connect Card 3G, Qualcomm - CDMA MSM, Huawei E220, Novatel U740, Sierra MC875U, and more - has been added. This provides support for the multiple - USB-to-serial interfaces exposed by many 3G USB/PC Card - modems, and the device is accessed through the &man.ucom.4; - driver which makes it behave like a &man.tty.4;. - - The &man.sched.ule.4; scheduler now supports - the loader tunable - machdep.hyperthreading_enabled just like - &man.sched.4bsd.4;. Note that it cannot be modified at - run-time. - - The &man.cmx.4; driver, a driver for Omnikey CardMan 4040 - PCMCIA smartcard readers, has been added. - - The &man.kbdmux.4; driver now - supports &arch.sparc64;. The &man.sunkbd.4; driver now - supports &man.atkbd.4; emulation like &man.ukbd.4;. - - The nvram(4) driver is now - MPSAFE. - - An option of the &man.puc.4; - driver, PUC_FASTINTR, is no longer - supported. - - The &man.psm.4; driver now attempts detection of Synaptics - touchpad before IntelliMouse. Some touchpads will pretend to - be IntelliMouse causing the IntelliMouse probe to work and the - Synaptics detection never to be done. - - The &man.uslcom.4; driver, a driver for Silicon - Laboratories CP2101/CP2102-based USB serial adapters, has been - imported from OpenBSD. + Multimedia Support - The &os; audio subsystem has been improved. - The changes include volume per channel, high quality - fixed-point band-limited SINC sampling rate converter, - bit-perfect mode, transparent/adaptive virtual channel, - and exclusive stream. For more details, see the - &man.snd.4; manual page. - - The &man.agp.4; driver now supports Intel G4X series - graphics chipsets. - - The Direct Rendering Manager - (DRM), a kernel module that - gives direct hardware access to DRI clients, has been - updated. Support for AMD/ATI r500, r600, r700, and IGP - based chips, XGI V3XE/V5/V8, and Intel i915 chipsets has - been improved. - - A new loader tunable hw.drm.msi has - been added to control if DRM uses MSI or not. This is set - to 1 (enabled) by default. - - The snd_au88x0(4) driver for Aureal Vortex - 1/2/Advantage PCI has been removed because it has been - broken for a long time. - - The &man.snd.hda.4; driver has been updated. These - changes include support for multiple codecs per HDA bus, - multiple functional groups per codec, multiple audio - devices per functional group, digital (SPDIF/HDMI) audio - input/output, suspend/resume, and part of multichannel - audio. - - Note that due to added HDMI audio and - logical audio devices support, the updated driver often - provides several PCM devices. This means that in some - cases the system default audio device no longer - corresponds to the users's habitual audio connectors. In - such cases the default device can be specified in audio - applications' setup or defined globally via - hw.snd.default_unit sysctl variable, as - described in the &man.sound.4; manual page. - - The &man.agp.4; driver now supports the - Intel G33 and G45. - - The dpms(4) driver has - been added to use the VESA BIOS for DPMS during suspend and - resume. - - The DRM kernel driver now - supports i915 GME devices. + Network Interface Support - The &man.bwi.4; driver has been added to - provide support for Broadcom BCM43xx IEEE 802.11b/g wireless - network interfaces. - - The &man.cas.4; driver has - been added to provide support for Sun Cassini/Cassini+ and - National Semiconductor DP83065 Saturn Gigabit Ethernet - devices. - - The &man.cxgbtool.8; now supports an - interactive mode for scripting of repeatedly performed - tasks. - - The &man.fxp.4; driver has been improved. Changes include: - - - - The multicast filter re-programming - is now more robust. - - - - The checksum offload feature can be controlled by - &man.ifconfig.8; now. - - - - Rx checksum offload support for 82559 or later - controllers has been added. - - - - TSO (TCP Segmentation Offload) support for 82550 - and 82551 controllers has been added. - - - - WoL (Wake on LAN) support for 82550, 82551, 82558, - and 82559-based controllers has been added. Note that - ICH based controllers are treated as 82559, and 82557, - earlier revisions of 82558, and 82559ER have no WoL - capability. - - - - VLAN hardware tag insertion/stripping support and - Tx/Rx checksum offload for VLAN frames support has - been added. Note that the VLAN hardware assistance is - available only on 82550 or 82551-based - controllers. - - - - The mge(4) driver has - been added to provide support for Marvell Gigabit Ethernet - controllers found on ARM-based SOCs (Orion, Kirkwood, - Discovery), as well as on system controllers for PowerPC - processors (MV64430, MV6446x). - - The &man.miibus.4; driver now supports - the Marvell 88E3016. - - The &man.msk.4; driver now supports Yukon - FE+ A0 including 88E8040, 88E8040T, 88E8048 and - 88E8070. - - The &man.mwl.4; driver has been added to - provide support for Marvell 88W8363 IEEE 802.11n wireless - network devices. - - The &man.mxge.4; driver now supports some newer - revisions and 10GBASE-LRM and 10GBASE-Twinax media - types. The firmware version has been updated to 1.4.43. - - The &man.nge.4; driver has been improved and - now works on all platforms. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 19:51:17 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E80C2106564A; Mon, 19 Jul 2010 19:51:17 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D49458FC13; Mon, 19 Jul 2010 19:51:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JJpHDS065637; Mon, 19 Jul 2010 19:51:17 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JJpHku065635; Mon, 19 Jul 2010 19:51:17 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007191951.o6JJpHku065635@svn.freebsd.org> From: Jamie Gritton Date: Mon, 19 Jul 2010 19:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210251 - stable/8/lib/libjail X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 19:51:18 -0000 Author: jamie Date: Mon Jul 19 19:51:17 2010 New Revision: 210251 URL: http://svn.freebsd.org/changeset/base/210251 Log: MFC r210133: Don't import parameter values in jail_getv, except for the search key. Remove the internal jailparam_vlist, in favor of using variants of its logic separately in jail_setv and jail_getv. Free the temporary parameter list and exported values in jail_setv and jail_getv. Noted by: Stanislav Uzunchev Modified: stable/8/lib/libjail/jail.c Directory Properties: stable/8/lib/libjail/ (props changed) Modified: stable/8/lib/libjail/jail.c ============================================================================== --- stable/8/lib/libjail/jail.c Mon Jul 19 19:40:38 2010 (r210250) +++ stable/8/lib/libjail/jail.c Mon Jul 19 19:51:17 2010 (r210251) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); static int jailparam_import_enum(const char **values, int nvalues, const char *valstr, size_t valsize, int *value); -static int jailparam_vlist(struct jailparam **jpp, va_list ap); static int jailparam_type(struct jailparam *jp); static char *noname(const char *name); static char *nononame(const char *name); @@ -74,16 +73,31 @@ static const char *jailsys_values[] = { int jail_setv(int flags, ...) { - va_list ap; + va_list ap, tap; struct jailparam *jp; - int njp; + const char *name, *value; + int njp, jid; + /* Create the parameter list and import the parameters. */ va_start(ap, flags); - njp = jailparam_vlist(&jp, ap); + va_copy(tap, ap); + for (njp = 0; va_arg(tap, char *) != NULL; njp++) + (void)va_arg(tap, char *); + va_end(tap); + jp = alloca(njp * sizeof(struct jailparam)); + for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { + value = va_arg(ap, char *); + if (jailparam_init(jp + njp, name) < 0 || + jailparam_import(jp + njp, value) < 0) { + jailparam_free(jp, njp); + va_end(ap); + return (-1); + } + } va_end(ap); - if (njp < 0) - return (njp); - return (jailparam_set(jp, njp, flags)); + jid = jailparam_set(jp, njp, flags); + jailparam_free(jp, njp); + return (jid); } /* @@ -94,48 +108,85 @@ int jail_getv(int flags, ...) { va_list ap, tap; - struct jailparam *jp; - char *valarg; - const char *value; - int njp, i, jid, namekey, zero; + struct jailparam *jp, *jp_lastjid, *jp_jid, *jp_name, *jp_key; + char *valarg, *value; + const char *name, *key_value, *lastjid_value, *jid_value, *name_value; + int njp, i, jid; + /* Create the parameter list and find the key. */ va_start(ap, flags); va_copy(tap, ap); - njp = jailparam_vlist(&jp, tap); + for (njp = 0; va_arg(tap, char *) != NULL; njp++) + (void)va_arg(tap, char *); va_end(tap); - if (njp < 0) - return (njp); - /* - * See if the name is the search key. If so, we don't want to write - * it back in case it's a read-only string. - */ - namekey = 1; - zero = 0; - for (i = 0; i < njp; i++) { - if (!strcmp(jp->jp_name, "lastjid") || - (!strcmp(jp->jp_name, "jid") && - memcmp(jp->jp_value, &zero, sizeof(zero)))) - namekey = 0; + + jp = alloca(njp * sizeof(struct jailparam)); + va_copy(tap, ap); + jp_lastjid = jp_jid = jp_name = NULL; + lastjid_value = jid_value = name_value = NULL; + for (njp = 0; (name = va_arg(tap, char *)) != NULL; njp++) { + value = va_arg(tap, char *); + if (jailparam_init(jp + njp, name) < 0) { + va_end(tap); + goto error; + } + if (!strcmp(jp[njp].jp_name, "lastjid")) { + jp_lastjid = jp + njp; + lastjid_value = value; + } else if (!strcmp(jp[njp].jp_name, "jid")) { + jp_jid = jp + njp; + jid_value = value; + } if (!strcmp(jp[njp].jp_name, "name")) { + jp_name = jp + njp; + name_value = value; + } } - jid = jailparam_get(jp, njp, flags); - if (jid < 0) { - va_end(ap); - return (-1); + va_end(tap); + /* Import the key parameter. */ + if (jp_lastjid != NULL) { + jp_key = jp_lastjid; + key_value = lastjid_value; + } else if (jp_jid != NULL && strtol(jid_value, NULL, 10) != 0) { + jp_key = jp_jid; + key_value = jid_value; + } else if (jp_name != NULL) { + jp_key = jp_name; + key_value = name_value; + } else { + strlcpy(jail_errmsg, "no jail specified", JAIL_ERRMSGLEN); + errno = ENOENT; + goto error; } + if (jailparam_import(jp_key, key_value) < 0) + goto error; + /* Get the jail and export the parameters. */ + jid = jailparam_get(jp, njp, flags); + if (jid < 0) + goto error; for (i = 0; i < njp; i++) { (void)va_arg(ap, char *); - value = jailparam_export(jp + i); - if (value == NULL) { - va_end(ap); - return (-1); - } valarg = va_arg(ap, char *); - if (!namekey || strcmp(jp[i].jp_name, "name")) + if (jp + i != jp_key) { /* It's up to the caller to ensure there's room. */ - strcpy(valarg, value); + if ((jp[i].jp_ctltype & CTLTYPE) == CTLTYPE_STRING) + strcpy(valarg, jp[i].jp_value); + else { + value = jailparam_export(jp + i); + if (value == NULL) + goto error; + strcpy(valarg, value); + free(value); + } + } } + jailparam_free(jp, njp); va_end(ap); return (jid); + + error: + jailparam_free(jp, njp); + va_end(ap); + return (-1); } /* @@ -794,41 +845,6 @@ jailparam_free(struct jailparam *jp, uns } /* - * Create and import an array of jail parameters, given a list of name and - * value strings, terminated by a null name. - */ -static int -jailparam_vlist(struct jailparam **jpp, va_list ap) -{ - va_list tap; - struct jailparam *jp; - char *name, *value; - int njp; - - va_copy(tap, ap); - for (njp = 0; va_arg(tap, char *) != NULL; njp++) - (void)va_arg(tap, char *); - va_end(tap); - jp = calloc(njp, sizeof(struct jailparam)); - if (jp == NULL) { - strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); - return (-1); - } - - for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { - value = va_arg(ap, char *); - if (jailparam_init(jp + njp, name) < 0 || - jailparam_import(jp + njp, value) < 0) { - jailparam_free(jp, njp); - free(jp); - return (-1); - } - } - *jpp = jp; - return (njp); -} - -/* * Find a parameter's type and size from its MIB. */ static int From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 19:52:03 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BB5D106566C; Mon, 19 Jul 2010 19:52:03 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1956D8FC1D; Mon, 19 Jul 2010 19:52:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JJq3BL065853; Mon, 19 Jul 2010 19:52:03 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JJq2px065851; Mon, 19 Jul 2010 19:52:03 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007191952.o6JJq2px065851@svn.freebsd.org> From: Jamie Gritton Date: Mon, 19 Jul 2010 19:52:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210252 - stable/8/lib/libjail X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 19:52:03 -0000 Author: jamie Date: Mon Jul 19 19:52:02 2010 New Revision: 210252 URL: http://svn.freebsd.org/changeset/base/210252 Log: MFC r210134: Don't copy and return a potentially unset buffer when jail_get fails. Modified: stable/8/lib/libjail/jail_getid.c Directory Properties: stable/8/lib/libjail/ (props changed) Modified: stable/8/lib/libjail/jail_getid.c ============================================================================== --- stable/8/lib/libjail/jail_getid.c Mon Jul 19 19:51:17 2010 (r210251) +++ stable/8/lib/libjail/jail_getid.c Mon Jul 19 19:52:02 2010 (r210252) @@ -94,11 +94,15 @@ jail_getname(int jid) jiov[5].iov_len = JAIL_ERRMSGLEN; jail_errmsg[0] = 0; jid = jail_get(jiov, 6, 0); - if (jid < 0 && !jail_errmsg[0]) - snprintf(jail_errmsg, JAIL_ERRMSGLEN, "jail_get: %s", - strerror(errno)); - name = strdup(namebuf); - if (name == NULL) - strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); + if (jid < 0) { + if (!jail_errmsg[0]) + snprintf(jail_errmsg, JAIL_ERRMSGLEN, "jail_get: %s", + strerror(errno)); + return NULL; + } else { + name = strdup(namebuf); + if (name == NULL) + strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); + } return name; } From owner-svn-src-stable-8@FreeBSD.ORG Mon Jul 19 19:54:37 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87E96106564A; Mon, 19 Jul 2010 19:54:37 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75CBB8FC13; Mon, 19 Jul 2010 19:54:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JJsb18066448; Mon, 19 Jul 2010 19:54:37 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JJsb9X066446; Mon, 19 Jul 2010 19:54:37 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007191954.o6JJsb9X066446@svn.freebsd.org> From: Benedict Reuschling Date: Mon, 19 Jul 2010 19:54:37 +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: r210253 - stable/8/etc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 19:54:37 -0000 Author: bcr (doc committer) Date: Mon Jul 19 19:54:37 2010 New Revision: 210253 URL: http://svn.freebsd.org/changeset/base/210253 Log: MFC r209954: Fix spelling of "weirdo" in /etc/gettytab comment. PR: docs/148500 Submitted by: Warren Block (wblock at wonkity dot com) Approved by: ed@ Modified: stable/8/etc/gettytab Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/gettytab ============================================================================== --- stable/8/etc/gettytab Mon Jul 19 19:52:02 2010 (r210252) +++ stable/8/etc/gettytab Mon Jul 19 19:54:37 2010 (r210253) @@ -165,7 +165,7 @@ P|Pc|Pc console:\ :ht:np:sp#115200: # -# Wierdo special case for fast crt's with hardcopy devices +# Weirdo special case for fast crt's with hardcopy devices # 8|T9600|CRT with hardcopy:\ :nx=T300:tc=9600-baud: From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 00:46:19 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FBED106566C; Tue, 20 Jul 2010 00:46:19 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 204948FC0C; Tue, 20 Jul 2010 00:46:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K0kJHY034903; Tue, 20 Jul 2010 00:46:19 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K0kJOo034901; Tue, 20 Jul 2010 00:46:19 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007200046.o6K0kJOo034901@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 20 Jul 2010 00:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210273 - stable/8/sys/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 00:46:19 -0000 Author: lstewart Date: Tue Jul 20 00:46:18 2010 New Revision: 210273 URL: http://svn.freebsd.org/changeset/base/210273 Log: MFC r209978,209981,209987,210184: - Rename DPCPU_SUM to DPCPU_VARSUM to better reflect the fact it operates on member variables of a DPCPU struct (r209978). - Add DPCPU_SUM which sums a DPCPU variable (r209978,209987,210184). - Macro to simplify zeroing DPCPU variables (r209981,209987). Sponsored by: FreeBSD Foundation Modified: stable/8/sys/sys/pcpu.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/pcpu.h ============================================================================== --- stable/8/sys/sys/pcpu.h Tue Jul 20 00:32:11 2010 (r210272) +++ stable/8/sys/sys/pcpu.h Tue Jul 20 00:46:18 2010 (r210273) @@ -112,7 +112,19 @@ extern uintptr_t dpcpu_off[]; /* * Utility macros. */ -#define DPCPU_SUM(n, var) __extension__ \ +#define DPCPU_SUM(n) __extension__ \ +({ \ + u_int _i; \ + __typeof(*DPCPU_PTR(n)) sum; \ + \ + sum = 0; \ + CPU_FOREACH(_i) { \ + sum += *DPCPU_ID_PTR(_i, n); \ + } \ + sum; \ +}) + +#define DPCPU_VARSUM(n, var) __extension__ \ ({ \ u_int _i; \ __typeof((DPCPU_PTR(n))->var) sum; \ @@ -124,6 +136,14 @@ extern uintptr_t dpcpu_off[]; sum; \ }) +#define DPCPU_ZERO(n) do { \ + u_int _i; \ + \ + CPU_FOREACH(_i) { \ + bzero(DPCPU_ID_PTR(_i, n), sizeof(*DPCPU_PTR(n))); \ + } \ +} while(0) + /* * XXXUPS remove as soon as we have per cpu variable * linker sets and can define rm_queue in _rm_lock.h From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 05:14:31 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3487D1065679; Tue, 20 Jul 2010 05:14:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4D48FC1D; Tue, 20 Jul 2010 05:14:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K5EVEL094751; Tue, 20 Jul 2010 05:14:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K5EVE8094749; Tue, 20 Jul 2010 05:14:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007200514.o6K5EVE8094749@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Jul 2010 05:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210280 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 05:14:31 -0000 Author: mav Date: Tue Jul 20 05:14:30 2010 New Revision: 210280 URL: http://svn.freebsd.org/changeset/base/210280 Log: MFC r210165: Improve interrupt setup errors handling. Modified: stable/8/sys/dev/ata/ata-pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-pci.c ============================================================================== --- stable/8/sys/dev/ata/ata-pci.c Tue Jul 20 05:14:27 2010 (r210279) +++ stable/8/sys/dev/ata/ata-pci.c Tue Jul 20 05:14:30 2010 (r210280) @@ -806,17 +806,23 @@ ata_setup_interrupt(device_t dev, void * if (msi && pci_msi_count(dev) > 0 && pci_alloc_msi(dev, &msi) == 0) { ctlr->r_irq_rid = 0x1; } else { + msi = 0; ctlr->r_irq_rid = ATA_IRQ_RID; } if (!(ctlr->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &ctlr->r_irq_rid, RF_SHAREABLE | RF_ACTIVE))) { device_printf(dev, "unable to map interrupt\n"); + if (msi) + pci_release_msi(dev); return ENXIO; } if ((bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS, NULL, intr_func, ctlr, &ctlr->handle))) { - /* SOS XXX release r_irq */ device_printf(dev, "unable to setup interrupt\n"); + bus_release_resource(dev, + SYS_RES_IRQ, ctlr->r_irq_rid, ctlr->r_irq); + if (msi) + pci_release_msi(dev); return ENXIO; } } From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 05:16:11 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08CDF106567C; Tue, 20 Jul 2010 05:16:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8A5D8FC14; Tue, 20 Jul 2010 05:16: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 o6K5GA6a095188; Tue, 20 Jul 2010 05:16:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K5GACw095186; Tue, 20 Jul 2010 05:16:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007200516.o6K5GACw095186@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Jul 2010 05:16: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: r210281 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 05:16:11 -0000 Author: mav Date: Tue Jul 20 05:16:10 2010 New Revision: 210281 URL: http://svn.freebsd.org/changeset/base/210281 Log: MFC r210168: Make legacy ATA emulation detection more strict. This should fix false positive legacy detection and attach failure/panic for Marvell 88SX6141 controller and potentially some others. PR: kern/145064 Modified: stable/8/sys/dev/ata/ata-pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-pci.c ============================================================================== --- stable/8/sys/dev/ata/ata-pci.c Tue Jul 20 05:14:30 2010 (r210280) +++ stable/8/sys/dev/ata/ata-pci.c Tue Jul 20 05:16:10 2010 (r210281) @@ -769,7 +769,8 @@ DRIVER_MODULE(ata, atapci, ata_pcichanne int ata_legacy(device_t dev) { - return (((pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&& + return (((pci_read_config(dev, PCIR_SUBCLASS, 1) == PCIS_STORAGE_IDE) && + (pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&& ((pci_read_config(dev, PCIR_PROGIF, 1) & (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC)) != (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC))) || From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 11:08:56 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D20B1065673; Tue, 20 Jul 2010 11:08:56 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B0B58FC08; Tue, 20 Jul 2010 11:08:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KB8uVq075535; Tue, 20 Jul 2010 11:08:56 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KB8u25075530; Tue, 20 Jul 2010 11:08:56 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007201108.o6KB8u25075530@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 20 Jul 2010 11:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210291 - in stable/8: share/man/man4 sys/amd64/conf sys/i386/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 11:08:56 -0000 Author: bschmidt Date: Tue Jul 20 11:08:56 2010 New Revision: 210291 URL: http://svn.freebsd.org/changeset/base/210291 Log: MFC r203691: - Update documentation for the iwn and iwnfw drivers: they support the 1000, 5150, 6000 and 6050 devices too, with firmware modules for the - 4965, 1000, 5000, 5150 and 6000. - Add documentation for mwl and all the wireless firmware drivers. Modified: stable/8/share/man/man4/iwn.4 stable/8/share/man/man4/iwnfw.4 stable/8/sys/amd64/conf/NOTES stable/8/sys/i386/conf/NOTES Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/iwn.4 ============================================================================== --- stable/8/share/man/man4/iwn.4 Tue Jul 20 10:58:56 2010 (r210290) +++ stable/8/share/man/man4/iwn.4 Tue Jul 20 11:08:56 2010 (r210291) @@ -25,12 +25,13 @@ .\" .\" $FreeBSD$ .\" -.Dd October 25, 2009 +.Dd February 8, 2010 .Os .Dt IWN 4 .Sh NAME .Nm iwn -.Nd "Intel Wireless WiFi Link 4965/5000 IEEE 802.11n driver" +.Nd Intel Wireless WiFi Link 4965/1000/5000/5150/5300/6000/6050 +IEEE 802.11n driver .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your @@ -46,8 +47,10 @@ You also need to select a firmware for y Choose one from: .Bd -ragged -offset indent .Cd "device iwn4965fw" +.Cd "device iwn1000fw" .Cd "device iwn5000fw" -.Cd "device iwn5100fw" +.Cd "device iwn5150fw" +.Cd "device iwn6000fw" .Ed .Pp Or you can use @@ -63,15 +66,18 @@ module at boot time, place the following .Bd -literal -offset indent if_iwn_load="YES" iwn4965fw_load="YES" +iwn1000fw_load="YES" iwn5000fw_load="YES" -iwn5100fw_load="YES" +iwn5150fw_load="YES" +iwn6000fw_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for .Tn Intel -Wireless WiFi Link 4965 and 5000 series of PCI-Express network adapters. +Wireless WiFi Link 4965, 1000, 5000 and 6000 series of +PCI-Express network adapters. .Nm supports .Cm station , Modified: stable/8/share/man/man4/iwnfw.4 ============================================================================== --- stable/8/share/man/man4/iwnfw.4 Tue Jul 20 10:58:56 2010 (r210290) +++ stable/8/share/man/man4/iwnfw.4 Tue Jul 20 11:08:56 2010 (r210291) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 25, 2009 +.Dd February 7, 2010 .Dt IWNFW 4 .Os .Sh NAME @@ -41,8 +41,10 @@ If you want to pick only the firmware im of the following: .Bd -ragged -offset indent .Cd "device iwn4965fw" +.Cd "device iwn1000fw" .Cd "device iwn5000fw" -.Cd "device iwn5100fw" +.Cd "device iwn5150fw" +.Cd "device iwn6000fw" .Ed .Pp Alternatively, to load the driver as a @@ -50,12 +52,15 @@ module at boot time, place the following .Xr loader.conf 5 : .Bd -literal -offset indent iwn4965fw_load="YES" +iwn1000fw_load="YES" iwn5000fw_load="YES" -iwn5100fw_load="YES" +iwn5150fw_load="YES" +iwn6000fw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Intel Wireless WiFi Link 4965 and 5000 series of IEEE 802.11n adapters. +Intel Wireless WiFi Link 4965, 1000, 5000 and 6000 series of +IEEE 802.11n adapters. It may be statically linked into the kernel, or loaded as a module. .Sh SEE ALSO Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Tue Jul 20 10:58:56 2010 (r210290) +++ stable/8/sys/amd64/conf/NOTES Tue Jul 20 11:08:56 2010 (r210291) @@ -273,20 +273,27 @@ options DRM_DEBUG # Include debug print # HP PC Lan+, various PC Card devices # (requires miibus) # ipw: Intel PRO/Wireless 2100 IEEE 802.11 adapter +# Requires the ipw firmware module # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters -# iwn: Intel Wireless WiFi Link 4965AGN 802.11 network adapters +# Requires the iwi firmware module +# iwn: Intel Wireless WiFi Link 4965/1000/5000/6000 802.11 network adapters +# Requires the iwn firmware module +# mwl: Marvell 88W8363 IEEE 802.11 adapter +# Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # ral: Ralink Technology IEEE 802.11 wireless adapter # wpi: Intel 3945ABG Wireless LAN controller +# Requires the wpi firmware module device ed options ED_3C503 options ED_HPP options ED_SIC +device ipw device iwi device iwn -device ipw +device mwl device nfe device nve device ral @@ -299,6 +306,45 @@ device ath_rate_sample # SampleRate tx #device ath_rate_amrr # AMRR rate control for ath driver #device ath_rate_onoe # Onoe rate control for ath driver +# IEEE 802.11 adapter firmware modules + +# Intel PRO/Wireless 2100 firmware: +# ipwfw: BSS/IBSS/monitor mode firmware +# ipwbssfw: BSS mode firmware +# ipwibssfw: IBSS mode firmware +# ipwmonitorfw: Monitor mode firmware +# Intel PRO/Wireless 2200BG/2225BG/2915ABG firmware: +# iwifw: BSS/IBSS/monitor mode firmware +# iwibssfw: BSS mode firmware +# iwiibssfw: IBSS mode firmware +# iwimonitorfw: Monitor mode firmware +# Intel Wireless WiFi Link 4965/1000/5000/6000 series firmware: +# iwnfw: Single module to support the 4965/1000/5000/5150/6000 +# iwn4965fw: Specific module for the 4965 only +# iwn1000fw: Specific module for the 1000 only +# iwn5000fw: Specific module for the 5000 only +# iwn5150fw: Specific module for the 5150 only +# iwn6000fw: Specific module for the 6000 only +# mwlfw: Marvell 88W8363 firmware +# wpifw: Intel 3945ABG Wireless LAN Controller firmware + +device iwifw +device iwibssfw +device iwiibssfw +device iwimonitorfw +device ipwfw +device ipwbssfw +device ipwibssfw +device ipwmonitorfw +device iwnfw +device iwn4965fw +device iwn1000fw +device iwn5000fw +device iwn5150fw +device iwn6000fw +device mwlfw +device wpifw + # #XXX this stores pointers in a 32bit field that is defined by the hardware #device pst Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Tue Jul 20 10:58:56 2010 (r210290) +++ stable/8/sys/i386/conf/NOTES Tue Jul 20 11:08:56 2010 (r210291) @@ -552,13 +552,18 @@ hint.mse.0.irq="5" # Intel EtherExpress # ipw: Intel PRO/Wireless 2100 IEEE 802.11 adapter # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters +# Requires the iwi firmware module # iwn: Intel Wireless WiFi Link 4965AGN 802.11 network adapters +# Requires the iwn firmware module +# mwl: Marvell 88W8363 IEEE 802.11 adapter +# Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # ral: Ralink Technology IEEE 802.11 wireless adapter # sbni: Granch SBNI12-xx ISA and PCI adapters # wl: Lucent Wavelan (ISA card only). # wpi: Intel 3945ABG Wireless LAN controller +# Requires the wpi firmware module # Order for ISA/EISA devices is important here @@ -600,14 +605,15 @@ hint.ie.2.at="isa" hint.ie.2.port="0x300" hint.ie.2.irq="5" hint.ie.2.maddr="0xd0000" +device ipw device iwi device iwn -device ipw # Hint for the i386-only ISA front-end of le(4). hint.le.0.at="isa" hint.le.0.port="0x280" hint.le.0.irq="10" hint.le.0.drq="0" +device mwl device nfe # nVidia nForce MCP on-board Ethernet Networking device nve # nVidia nForce MCP on-board Ethernet Networking device ral @@ -623,6 +629,45 @@ options WLCACHE # enables the signal-s options WLDEBUG # enables verbose debugging output device wpi +# IEEE 802.11 adapter firmware modules + +# Intel PRO/Wireless 2100 firmware: +# ipwfw: BSS/IBSS/monitor mode firmware +# ipwbssfw: BSS mode firmware +# ipwibssfw: IBSS mode firmware +# ipwmonitorfw: Monitor mode firmware +# Intel PRO/Wireless 2200BG/2225BG/2915ABG firmware: +# iwifw: BSS/IBSS/monitor mode firmware +# iwibssfw: BSS mode firmware +# iwiibssfw: IBSS mode firmware +# iwimonitorfw: Monitor mode firmware +# Intel Wireless WiFi Link 4965/1000/5000/6000 series firmware: +# iwnfw: Single module to support the 4965/1000/5000/5150/6000 +# iwn4965fw: Specific module for the 4965 only +# iwn1000fw: Specific module for the 1000 only +# iwn5000fw: Specific module for the 5000 only +# iwn5150fw: Specific module for the 5150 only +# iwn6000fw: Specific module for the 6000 only +# mwlfw: Marvell 88W8363 firmware +# wpifw: Intel 3945ABG Wireless LAN Controller firmware + +device iwifw +device iwibssfw +device iwiibssfw +device iwimonitorfw +device ipwfw +device ipwbssfw +device ipwibssfw +device ipwmonitorfw +device iwnfw +device iwn4965fw +device iwn1000fw +device iwn5000fw +device iwn5150fw +device iwn6000fw +device mwlfw +device wpifw + # # ATA raid adapters # From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 15:34:27 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87161106567C; Tue, 20 Jul 2010 15:34:27 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 757438FC16; Tue, 20 Jul 2010 15:34:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KFYRI2034800; Tue, 20 Jul 2010 15:34:27 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KFYRCg034799; Tue, 20 Jul 2010 15:34:27 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007201534.o6KFYRCg034799@svn.freebsd.org> From: Benedict Reuschling Date: Tue, 20 Jul 2010 15:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210297 - stable/8/gnu/usr.bin/dialog X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 15:34:27 -0000 Author: bcr (doc committer) Date: Tue Jul 20 15:34:27 2010 New Revision: 210297 URL: http://svn.freebsd.org/changeset/base/210297 Log: MFC r209738: Mention the radiolist option in the man page. It is being listed when dialog(1) is run without arguments and works as expected. Therefore, it should be part of the manual as well. Note: dialog(1) has not been updated for many years and is not actively maintained at the moment. PR: docs/139682 Submitted by: manolis@ Discussed with: jkim@ Modified: stable/8/gnu/usr.bin/dialog/dialog.1 Directory Properties: stable/8/gnu/usr.bin/dialog/ (props changed) Modified: stable/8/gnu/usr.bin/dialog/dialog.1 ============================================================================== --- stable/8/gnu/usr.bin/dialog/dialog.1 Tue Jul 20 14:27:09 2010 (r210296) +++ stable/8/gnu/usr.bin/dialog/dialog.1 Tue Jul 20 15:34:27 2010 (r210297) @@ -30,6 +30,7 @@ types of dialog objects are currently su .BR yes/no " box," " menu" " box," " input" " box," .BR message " box," " text" " box," " info" " box," .BR checklist " box," " program" " box," +.BR radiolist " box," .BR ftree " and " tree " boxes." .SH OPTIONS .TP @@ -172,6 +173,15 @@ On exit, a list of the .I tag strings of those entries that are turned on will be printed on .IR stderr "." +.IP "\fB\-\-radiolist \fItext height width list-height \fR[ \fItag item status \fR] \fI..." +.RB "A " radiolist " box is similar to a " checklist " but it only allows" +a single entry to be selected. One entry may initially be turned on as +specified by +.IR status "." +On exit, the +.I tag +string of the entry that is turned on will be printed on +.IR stderr "." .IP "\fB\-\-ftree \fIfile FS text height width menu-height" .B ftree box is a dialog box showing the tree described by the data from the file From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 17:57:11 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29F7C106577B; Tue, 20 Jul 2010 17:57:10 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C41288FC0A; Tue, 20 Jul 2010 17:57: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 o6KHvAiR066720; Tue, 20 Jul 2010 17:57:10 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KHvAoh066717; Tue, 20 Jul 2010 17:57:10 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201007201757.o6KHvAoh066717@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 20 Jul 2010 17:57: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: r210302 - stable/8/sys/dev/hwpmc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 17:57:11 -0000 Author: gnn Date: Tue Jul 20 17:57:10 2010 New Revision: 210302 URL: http://svn.freebsd.org/changeset/base/210302 Log: MFC r210012: Fix a panic brought about by writing an MSR without a proper mask. All of the necessary wrmsr calls are now preceded by a rdmsr and we leave the reserved bits alone. Document the bits in the relevant registers for future reference. Tested by: mdf Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c stable/8/sys/dev/hwpmc/hwpmc_core.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.c Tue Jul 20 17:57:03 2010 (r210301) +++ stable/8/sys/dev/hwpmc/hwpmc_core.c Tue Jul 20 17:57:10 2010 (r210302) @@ -147,6 +147,7 @@ core_pcpu_fini(struct pmc_mdep *md, int int core_ri, n, npmc; struct pmc_cpu *pc; struct core_cpu *cc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] insane cpu number (%d)", __LINE__, cpu)); @@ -166,11 +167,14 @@ core_pcpu_fini(struct pmc_mdep *md, int npmc = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_num; core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri; - for (n = 0; n < npmc; n++) - wrmsr(IAP_EVSEL0 + n, 0); + for (n = 0; n < npmc; n++) { + msr = rdmsr(IAP_EVSEL0 + n); + wrmsr(IAP_EVSEL0 + n, msr & ~IAP_EVSEL_MASK); + } if (core_cputype != PMC_CPU_INTEL_CORE) { - wrmsr(IAF_CTRL, 0); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); npmc += md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF].pcd_num; } @@ -374,6 +378,7 @@ iaf_start_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *iafc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal CPU value %d", __LINE__, cpu)); @@ -387,12 +392,15 @@ iaf_start_pmc(int cpu, int ri) iafc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl; - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STA,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -407,6 +415,7 @@ iaf_stop_pmc(int cpu, int ri) { uint32_t fc; struct core_cpu *iafc; + uint64_t msr = 0; PMCDBG(MDP,STO,1,"iaf-stop cpu=%d ri=%d", cpu, ri); @@ -425,12 +434,15 @@ iaf_stop_pmc(int cpu, int ri) iafc->pc_iafctrl &= ~fc; PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl &= ~(1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STO,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -445,6 +457,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value { struct core_cpu *cc; struct pmc *pm; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -460,9 +473,11 @@ iaf_write_pmc(int cpu, int ri, pmc_value if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iaf_reload_count_to_perfctr_value(v); - wrmsr(IAF_CTRL, 0); /* Turn off fixed counters */ - wrmsr(IAF_CTR0 + ri, v); - wrmsr(IAF_CTRL, cc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); + wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1)); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK)); PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " "pmc=%jx", cpu, ri, IAF_RI_TO_MSR(ri), v, @@ -1879,6 +1894,7 @@ iap_stop_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *cc; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -1894,7 +1910,8 @@ iap_stop_pmc(int cpu, int ri) PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); - wrmsr(IAP_EVSEL0 + ri, 0); /* stop hw */ + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & IAP_EVSEL_MASK); /* stop hw */ if (core_cputype == PMC_CPU_INTEL_CORE) return (0); @@ -1937,7 +1954,7 @@ iap_write_pmc(int cpu, int ri, pmc_value * a stopped state when the pcd_write() entry point is called. */ - wrmsr(IAP_PMC0 + ri, v); + wrmsr(IAP_PMC0 + ri, v & ((1ULL << core_iap_width) - 1)); return (0); } @@ -1987,6 +2004,7 @@ core_intr(int cpu, struct trapframe *tf) struct pmc *pm; struct core_cpu *cc; int error, found_interrupt, ri; + uint64_t msr = 0; PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); @@ -2018,7 +2036,8 @@ core_intr(int cpu, struct trapframe *tf) * Stop the counter, reload it but only restart it if * the PMC is not stalled. */ - wrmsr(IAP_EVSEL0 + ri, 0); + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & ~IAP_EVSEL_MASK); wrmsr(IAP_PMC0 + ri, v); if (error) Modified: stable/8/sys/dev/hwpmc/hwpmc_core.h ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.h Tue Jul 20 17:57:03 2010 (r210301) +++ stable/8/sys/dev/hwpmc/hwpmc_core.h Tue Jul 20 17:57:10 2010 (r210302) @@ -67,20 +67,59 @@ struct pmc_md_iap_op_pmcallocate { /* * Fixed-function counters. */ + #define IAF_MASK 0xF +#define IAF_COUNTER_MASK 0x0000ffffffffffff #define IAF_CTR0 0x309 #define IAF_CTR1 0x30A #define IAF_CTR2 0x30B +/* + * The IAF_CTRL MSR is laid out in the following way. + * + * Bit Position Use + * 63 - 12 Reserved (do not touch) + * 11 Ctr 2 PMI + * 10 Reserved (do not touch) + * 9-8 Ctr 2 Enable + * 7 Ctr 1 PMI + * 6 Reserved (do not touch) + * 5-4 Ctr 1 Enable + * 3 Ctr 0 PMI + * 2 Reserved (do not touch) + * 1-0 Ctr 0 Enable (3: All Levels, 2: User, 1: OS, 0: Disable) + */ + #define IAF_OFFSET 32 #define IAF_CTRL 0x38D +#define IAF_CTRL_MASK 0x0000000000000bbb /* * Programmable counters. */ #define IAP_PMC0 0x0C1 + +/* + * IAP_EVSEL(n) is laid out in the following way. + * + * Bit Position Use + * 63-31 Reserved (do not touch) + * 31-24 Counter Mask + * 23 Invert + * 22 Enable + * 21 Reserved (do not touch) + * 20 APIC Interrupt Enable + * 19 Pin Control + * 18 Edge Detect + * 17 OS + * 16 User + * 15-8 Unit Mask + * 7-0 Event Select + */ + +#define IAP_EVSEL_MASK 0x00000000ffdfffff #define IAP_EVSEL0 0x186 /* @@ -90,6 +129,21 @@ struct pmc_md_iap_op_pmcallocate { #define IA_GLOBAL_STATUS 0x38E #define IA_GLOBAL_CTRL 0x38F + +/* + * IA_GLOBAL_CTRL is layed out in the following way. + * + * Bit Position Use + * 63-35 Reserved (do not touch) + * 34 IAF Counter 2 Enable + * 33 IAF Counter 1 Enable + * 32 IAF Counter 0 Enable + * 31-0 Depends on programmable counters + */ + +/* The mask is only for the fixed porttion of the register. */ +#define IAF_GLOBAL_CTRL_MASK 0x0000000700000000 + #define IA_GLOBAL_OVF_CTRL 0x390 #define IA_GLOBAL_STATUS_FLAG_CONDCHG (1ULL << 63) From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 18:28:35 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 941471065678; Tue, 20 Jul 2010 18:28:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4978FC1B; Tue, 20 Jul 2010 18:28:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KISZQH073836; Tue, 20 Jul 2010 18:28:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KISZlt073832; Tue, 20 Jul 2010 18:28:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201828.o6KISZlt073832@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 18:28:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210303 - in stable/8/sys: dev/syscons isa X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 18:28:35 -0000 Author: jkim Date: Tue Jul 20 18:28:34 2010 New Revision: 210303 URL: http://svn.freebsd.org/changeset/base/210303 Log: MFC: r208411, r208412, r208413, r208564, r208567, r210149 - Suspend screen updates when the video controller is powered down. - Let the first device suspend and the last device resume syscons(4). - Do not attempt to switch to the same VTs between suspend and resume. - When we are not switching VTs, just mark all buffer to be updated. - Fix some style(9) nits. Modified: stable/8/sys/dev/syscons/syscons.c stable/8/sys/dev/syscons/syscons.h stable/8/sys/isa/syscons_isa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/syscons/syscons.c ============================================================================== --- stable/8/sys/dev/syscons/syscons.c Tue Jul 20 17:57:10 2010 (r210302) +++ stable/8/sys/dev/syscons/syscons.c Tue Jul 20 18:28:34 2010 (r210303) @@ -1688,7 +1688,7 @@ sccnupdate(scr_stat *scp) { /* this is a cut-down version of scrn_timer()... */ - if (scp->sc->font_loading_in_progress) + if (scp->sc->suspend_in_progress || scp->sc->font_loading_in_progress) return; if (debugger > 0 || panicstr || shutdown_in_progress) { @@ -1738,7 +1738,7 @@ scrn_timer(void *arg) return; /* don't do anything when we are performing some I/O operations */ - if (sc->font_loading_in_progress) { + if (sc->suspend_in_progress || sc->font_loading_in_progress) { if (again) timeout(scrn_timer, sc, hz / 10); return; Modified: stable/8/sys/dev/syscons/syscons.h ============================================================================== --- stable/8/sys/dev/syscons/syscons.h Tue Jul 20 17:57:10 2010 (r210302) +++ stable/8/sys/dev/syscons/syscons.h Tue Jul 20 18:28:34 2010 (r210303) @@ -230,6 +230,7 @@ typedef struct sc_softc { char switch_in_progress; char write_in_progress; char blink_in_progress; + char suspend_in_progress; struct mtx video_mtx; long scrn_time_stamp; Modified: stable/8/sys/isa/syscons_isa.c ============================================================================== --- stable/8/sys/isa/syscons_isa.c Tue Jul 20 17:57:10 2010 (r210302) +++ stable/8/sys/isa/syscons_isa.c Tue Jul 20 18:28:34 2010 (r210303) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); static devclass_t sc_devclass; -static sc_softc_t main_softc; +static sc_softc_t main_softc; #ifdef SC_NO_SUSPEND_VTYSWITCH static int sc_no_suspend_vtswitch = 1; #else @@ -76,26 +76,28 @@ static int sc_no_suspend_vtswitch = 0; #endif static int sc_cur_scr; -TUNABLE_INT("hw.syscons.sc_no_suspend_vtswitch", (int *)&sc_no_suspend_vtswitch); +TUNABLE_INT("hw.syscons.sc_no_suspend_vtswitch", &sc_no_suspend_vtswitch); SYSCTL_DECL(_hw_syscons); SYSCTL_INT(_hw_syscons, OID_AUTO, sc_no_suspend_vtswitch, CTLFLAG_RW, - &sc_no_suspend_vtswitch, 0, "Disable VT switch before suspend."); + &sc_no_suspend_vtswitch, 0, "Disable VT switch before suspend."); static void -scidentify (driver_t *driver, device_t parent) +scidentify(driver_t *driver, device_t parent) { + BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "sc", 0); } static int scprobe(device_t dev) { + /* No pnp support */ if (isa_get_vendorid(dev)) return (ENXIO); device_set_desc(dev, "System console"); - return sc_probe_unit(device_get_unit(dev), device_get_flags(dev)); + return (sc_probe_unit(device_get_unit(dev), device_get_flags(dev))); } static int @@ -117,18 +119,17 @@ scsuspend(device_t dev) if (sc->cur_scp == NULL) return (0); - sc_cur_scr = sc->cur_scp->index; - - if (sc_no_suspend_vtswitch) - return (0); - - do { - sc_switch_scr(sc, 0); - if (!sc->switch_in_progress) { - break; - } - pause("scsuspend", hz); - } while (retry--); + if (sc->suspend_in_progress == 0) { + sc_cur_scr = sc->cur_scp->index; + if (!sc_no_suspend_vtswitch && sc_cur_scr != 0) + do { + sc_switch_scr(sc, 0); + if (!sc->switch_in_progress) + break; + pause("scsuspend", hz); + } while (retry--); + } + sc->suspend_in_progress++; return (0); } @@ -138,11 +139,18 @@ scresume(device_t dev) { sc_softc_t *sc; - if (sc_no_suspend_vtswitch) + sc = &main_softc; + + if (sc->cur_scp == NULL) return (0); - sc = &main_softc; - sc_switch_scr(sc, sc_cur_scr); + sc->suspend_in_progress--; + if (sc->suspend_in_progress == 0) { + if (!sc_no_suspend_vtswitch && sc_cur_scr != 0) + sc_switch_scr(sc, sc_cur_scr); + else + mark_all(sc->cur_scp); + } return (0); } @@ -150,7 +158,8 @@ scresume(device_t dev) int sc_max_unit(void) { - return devclass_get_maxunit(sc_devclass); + + return (devclass_get_maxunit(sc_devclass)); } sc_softc_t @@ -159,53 +168,53 @@ sc_softc_t sc_softc_t *sc; if (unit < 0) - return NULL; - if (flags & SC_KERNEL_CONSOLE) { + return (NULL); + if ((flags & SC_KERNEL_CONSOLE) != 0) { /* FIXME: clear if it is wired to another unit! */ sc = &main_softc; } else { - sc = (sc_softc_t *)device_get_softc(devclass_get_device(sc_devclass, unit)); + sc = device_get_softc(devclass_get_device(sc_devclass, unit)); if (sc == NULL) - return NULL; + return (NULL); } sc->unit = unit; - if (!(sc->flags & SC_INIT_DONE)) { + if ((sc->flags & SC_INIT_DONE) == 0) { sc->keyboard = -1; sc->adapter = -1; sc->cursor_char = SC_CURSOR_CHAR; sc->mouse_char = SC_MOUSE_CHAR; } - return sc; + return (sc); } sc_softc_t *sc_find_softc(struct video_adapter *adp, struct keyboard *kbd) { sc_softc_t *sc; - int units; int i; + int units; sc = &main_softc; - if (((adp == NULL) || (adp == sc->adp)) - && ((kbd == NULL) || (kbd == sc->kbd))) - return sc; + if ((adp == NULL || adp == sc->adp) && + (kbd == NULL || kbd == sc->kbd)) + return (sc); units = devclass_get_maxunit(sc_devclass); for (i = 0; i < units; ++i) { - sc = (sc_softc_t *)device_get_softc(devclass_get_device(sc_devclass, i)); + sc = device_get_softc(devclass_get_device(sc_devclass, i)); if (sc == NULL) continue; - if (((adp == NULL) || (adp == sc->adp)) - && ((kbd == NULL) || (kbd == sc->kbd))) - return sc; + if ((adp == NULL || adp == sc->adp) && + (kbd == NULL || kbd == sc->kbd)) + return (sc); } - return NULL; + return (NULL); } int sc_get_cons_priority(int *unit, int *flags) { const char *at; - int u, f; + int f, u; #ifdef XBOX /* @@ -216,7 +225,7 @@ sc_get_cons_priority(int *unit, int *fla if (arch_i386_is_xbox) { *unit = 0; *flags = SC_KERNEL_CONSOLE; - return CN_INTERNAL; + return (CN_INTERNAL); } #endif @@ -245,24 +254,24 @@ sc_get_cons_priority(int *unit, int *fla *flags = 0; } #if 0 - return ((*flags & SC_KERNEL_CONSOLE) ? CN_INTERNAL : CN_NORMAL); + return ((*flags & SC_KERNEL_CONSOLE) != 0 ? CN_INTERNAL : CN_NORMAL); #endif - return CN_INTERNAL; + return (CN_INTERNAL); } void sc_get_bios_values(bios_values_t *values) { #if defined(__i386__) || defined(__amd64__) - u_int8_t shift; + uint8_t shift; - values->cursor_start = *(u_int8_t *)BIOS_PADDRTOVADDR(0x461); - values->cursor_end = *(u_int8_t *)BIOS_PADDRTOVADDR(0x460); - shift = *(u_int8_t *)BIOS_PADDRTOVADDR(0x417); - values->shift_state = ((shift & BIOS_CLKED) ? CLKED : 0) - | ((shift & BIOS_NLKED) ? NLKED : 0) - | ((shift & BIOS_SLKED) ? SLKED : 0) - | ((shift & BIOS_ALKED) ? ALKED : 0); + values->cursor_start = *(uint8_t *)BIOS_PADDRTOVADDR(0x461); + values->cursor_end = *(uint8_t *)BIOS_PADDRTOVADDR(0x460); + shift = *(uint8_t *)BIOS_PADDRTOVADDR(0x417); + values->shift_state = ((shift & BIOS_CLKED) != 0 ? CLKED : 0) | + ((shift & BIOS_NLKED) != 0 ? NLKED : 0) | + ((shift & BIOS_SLKED) != 0 ? SLKED : 0) | + ((shift & BIOS_ALKED) != 0 ? ALKED : 0); #else values->cursor_start = 0; values->cursor_end = 32; @@ -274,17 +283,17 @@ sc_get_bios_values(bios_values_t *values int sc_tone(int herz) { + #if defined(HAS_TIMER_SPKR) if (herz) { if (timer_spkr_acquire()) - return EBUSY; + return (EBUSY); timer_spkr_setfreq(herz); - } else { + } else timer_spkr_release(); - } #endif - return 0; + return (0); } static device_method_t sc_methods[] = { @@ -303,3 +312,70 @@ static driver_t sc_driver = { }; DRIVER_MODULE(sc, isa, sc_driver, sc_devclass, 0, 0); + +static devclass_t scpm_devclass; + +static void +scpm_identify(driver_t *driver, device_t parent) +{ + + device_add_child(parent, "scpm", 0); +} + +static int +scpm_probe(device_t dev) +{ + + device_set_desc(dev, SC_DRIVER_NAME " suspend/resume"); + device_quiet(dev); + + return (BUS_PROBE_DEFAULT); +} + +static int +scpm_attach(device_t dev) +{ + + bus_generic_probe(dev); + bus_generic_attach(dev); + + return (0); +} + +static int +scpm_suspend(device_t dev) +{ + int error; + + error = bus_generic_suspend(dev); + if (error != 0) + return (error); + + return (scsuspend(dev)); +} + +static int +scpm_resume(device_t dev) +{ + + scresume(dev); + + return (bus_generic_resume(dev)); +} + +static device_method_t scpm_methods[] = { + DEVMETHOD(device_identify, scpm_identify), + DEVMETHOD(device_probe, scpm_probe), + DEVMETHOD(device_attach, scpm_attach), + DEVMETHOD(device_suspend, scpm_suspend), + DEVMETHOD(device_resume, scpm_resume), + { 0, 0 } +}; + +static driver_t scpm_driver = { + "scpm", + scpm_methods, + 0 +}; + +DRIVER_MODULE(scpm, vgapm, scpm_driver, scpm_devclass, 0, 0); From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 18:43:16 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A67D31065676; Tue, 20 Jul 2010 18:43:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 942EA8FC18; Tue, 20 Jul 2010 18:43:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KIhGxX077125; Tue, 20 Jul 2010 18:43:16 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KIhGSK077124; Tue, 20 Jul 2010 18:43:16 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201843.o6KIhGSK077124@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 18:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210304 - stable/8/sys/dev/fb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 18:43:16 -0000 Author: jkim Date: Tue Jul 20 18:43:15 2010 New Revision: 210304 URL: http://svn.freebsd.org/changeset/base/210304 Log: MFC: r209737, r209740 Fix a possible null pointer dereference and plug a possible memory leak. Modified: stable/8/sys/dev/fb/vesa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/fb/vesa.c ============================================================================== --- stable/8/sys/dev/fb/vesa.c Tue Jul 20 18:28:34 2010 (r210303) +++ stable/8/sys/dev/fb/vesa.c Tue Jul 20 18:43:15 2010 (r210304) @@ -536,6 +536,8 @@ vesa_bios_save_restore(int code, void *p return (1); buf = x86bios_alloc(&offs, size); + if (buf == NULL) + return (1); x86bios_init_regs(®s); regs.R_AX = 0x4f04; @@ -836,7 +838,7 @@ vesa_bios_init(void) "version 1.2 or later is required.\n", ((vers & 0xf000) >> 12) * 10 + ((vers & 0x0f00) >> 8), ((vers & 0x00f0) >> 4) * 10 + (vers & 0x000f)); - return (1); + goto fail; } VESA_STRCPY(vesa_oemstr, buf->v_oemstr); From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 18:55:14 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9129F106568C; Tue, 20 Jul 2010 18:55:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6690B8FC1B; Tue, 20 Jul 2010 18:55: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 o6KItEb0079809; Tue, 20 Jul 2010 18:55:14 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KItDMY079808; Tue, 20 Jul 2010 18:55:14 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201855.o6KItDMY079808@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 18:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210305 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 18:55:14 -0000 Author: jkim Date: Tue Jul 20 18:55:13 2010 New Revision: 210305 URL: http://svn.freebsd.org/changeset/base/210305 Log: MFC: r209836, r209949 Implement optional 'precision' for numbers. Previously, it was parsed but ignored. Some third-party modules (e.g., ACPICA) prefer this format over zero padding flag '0'. Modified: stable/8/sys/kern/subr_prf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/subr_prf.c ============================================================================== --- stable/8/sys/kern/subr_prf.c Tue Jul 20 18:43:15 2010 (r210304) +++ stable/8/sys/kern/subr_prf.c Tue Jul 20 18:55:13 2010 (r210305) @@ -800,7 +800,8 @@ number: neg = 1; num = -(intmax_t)num; } - p = ksprintn(nbuf, num, base, &tmp, upper); + p = ksprintn(nbuf, num, base, &n, upper); + tmp = 0; if (sharpflag && num != 0) { if (base == 8) tmp++; @@ -810,10 +811,13 @@ number: if (neg) tmp++; - if (!ladjust && padc != '0' && width - && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (!ladjust && padc == '0') + dwidth = width - tmp; + width -= tmp + imax(dwidth, n); + dwidth -= n; + if (!ladjust) + while (width-- > 0) + PCHAR(' '); if (neg) PCHAR('-'); if (sharpflag && num != 0) { @@ -824,16 +828,15 @@ number: PCHAR('x'); } } - if (!ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + while (dwidth-- > 0) + PCHAR('0'); while (*p) PCHAR(*p--); - if (ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (ladjust) + while (width-- > 0) + PCHAR(' '); break; default: From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 18:59:10 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7109106566B; Tue, 20 Jul 2010 18:59:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94AE08FC08; Tue, 20 Jul 2010 18:59: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 o6KIxAG1080790; Tue, 20 Jul 2010 18:59:10 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KIxAYE080788; Tue, 20 Jul 2010 18:59:10 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201859.o6KIxAYE080788@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 18:59: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: r210306 - stable/8/lib/libstand X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 18:59:10 -0000 Author: jkim Date: Tue Jul 20 18:59:10 2010 New Revision: 210306 URL: http://svn.freebsd.org/changeset/base/210306 Log: MFC: r209837, r209842, r209949 Sync. printf() of libstand(3) with sys/kern/subr_prf.c. CVS r1.94 jhb: Cast the integer read as the first argument for %b to an unsigned integer so it's value is not sign extended when assigned to the uintmax_t variable used internally by printf. For example, if bit 31 is set in the cpuid feature word, then %b would print out the initial value as a 16 character hexadecimal value. Now it only prints out an 8 character value. CVS r1.109 njl: Add support for 'h' and 'hh' modifiers for printf(9). CVS r1.117 phk: If we ignore an unknown % sequence, we must stop interpreting the remaining % arguments because the varargs are now out of sync and there is a risk that we might for instance dereference an integer in a %s argument. SVN r209836 jkim: Implement optional 'precision' for numbers. Previously, it was parsed but ignored. Some third-party modules (e.g., ACPICA) prefer this format over zero padding flag '0'. Modified: stable/8/lib/libstand/printf.c Directory Properties: stable/8/lib/libstand/ (props changed) Modified: stable/8/lib/libstand/printf.c ============================================================================== --- stable/8/lib/libstand/printf.c Tue Jul 20 18:55:13 2010 (r210305) +++ stable/8/lib/libstand/printf.c Tue Jul 20 18:59:10 2010 (r210306) @@ -159,10 +159,10 @@ kvprintf(char const *fmt, void (*func)(i int ch, n; uintmax_t num; int base, lflag, qflag, tmp, width, ladjust, sharpflag, neg, sign, dot; - int jflag, tflag, zflag; + int cflag, hflag, jflag, tflag, zflag; int dwidth, upper; char padc; - int retval = 0; + int stop = 0, retval = 0; num = 0; if (!func) @@ -179,7 +179,7 @@ kvprintf(char const *fmt, void (*func)(i for (;;) { padc = ' '; width = 0; - while ((ch = (u_char)*fmt++) != '%') { + while ((ch = (u_char)*fmt++) != '%' || stop) { if (ch == '\0') return (retval); PCHAR(ch); @@ -187,7 +187,7 @@ kvprintf(char const *fmt, void (*func)(i percent = fmt - 1; qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0; sign = 0; dot = 0; dwidth = 0; upper = 0; - jflag = 0; tflag = 0; zflag = 0; + cflag = 0; hflag = 0; jflag = 0; tflag = 0; zflag = 0; reswitch: switch (ch = (u_char)*fmt++) { case '.': dot = 1; @@ -234,7 +234,7 @@ reswitch: switch (ch = (u_char)*fmt++) { width = n; goto reswitch; case 'b': - num = va_arg(ap, int); + num = (u_int)va_arg(ap, int); p = va_arg(ap, char *); for (q = ksprintn(nbuf, num, *p++, NULL, 0); *q;) PCHAR(*q--); @@ -278,6 +278,13 @@ reswitch: switch (ch = (u_char)*fmt++) { base = 10; sign = 1; goto handle_sign; + case 'h': + if (hflag) { + hflag = 0; + cflag = 1; + } else + hflag = 1; + goto reswitch; case 'j': jflag = 1; goto reswitch; @@ -297,6 +304,10 @@ reswitch: switch (ch = (u_char)*fmt++) { *(va_arg(ap, long *)) = retval; else if (zflag) *(va_arg(ap, size_t *)) = retval; + else if (hflag) + *(va_arg(ap, short *)) = retval; + else if (cflag) + *(va_arg(ap, char *)) = retval; else *(va_arg(ap, int *)) = retval; break; @@ -368,6 +379,10 @@ handle_nosign: num = va_arg(ap, u_long); else if (zflag) num = va_arg(ap, size_t); + else if (hflag) + num = (u_short)va_arg(ap, int); + else if (cflag) + num = (u_char)va_arg(ap, int); else num = va_arg(ap, u_int); goto number; @@ -382,6 +397,10 @@ handle_sign: num = va_arg(ap, long); else if (zflag) num = va_arg(ap, ssize_t); + else if (hflag) + num = (short)va_arg(ap, int); + else if (cflag) + num = (char)va_arg(ap, int); else num = va_arg(ap, int); number: @@ -389,7 +408,8 @@ number: neg = 1; num = -(intmax_t)num; } - p = ksprintn(nbuf, num, base, &tmp, upper); + p = ksprintn(nbuf, num, base, &n, upper); + tmp = 0; if (sharpflag && num != 0) { if (base == 8) tmp++; @@ -399,9 +419,13 @@ number: if (neg) tmp++; - if (!ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (!ladjust && padc == '0') + dwidth = width - tmp; + width -= tmp + imax(dwidth, n); + dwidth -= n; + if (!ladjust) + while (width-- > 0) + PCHAR(' '); if (neg) PCHAR('-'); if (sharpflag && num != 0) { @@ -412,18 +436,27 @@ number: PCHAR('x'); } } + while (dwidth-- > 0) + PCHAR('0'); while (*p) PCHAR(*p--); - if (ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (ladjust) + while (width-- > 0) + PCHAR(' '); break; default: while (percent < fmt) PCHAR(*percent++); + /* + * Since we ignore an formatting argument it is no + * longer safe to obey the remaining formatting + * arguments as the arguments will no longer match + * the format specs. + */ + stop = 1; break; } } From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 19:38:39 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58531106566B; Tue, 20 Jul 2010 19:38:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 460E28FC12; Tue, 20 Jul 2010 19:38:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KJcdTa090225; Tue, 20 Jul 2010 19:38:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KJcd2E090222; Tue, 20 Jul 2010 19:38:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201938.o6KJcd2E090222@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 19:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210313 - stable/8/sys/dev/acpica/Osd X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 19:38:39 -0000 Author: jkim Date: Tue Jul 20 19:38:38 2010 New Revision: 210313 URL: http://svn.freebsd.org/changeset/base/210313 Log: MFC: r209965, r209966, r210129, r210137, r210155, r210157 - According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 32-bit or 64-bit return value even if the bit width of the port or location is less than 32 or 64. - Use pmap_mapdev()/pmap_unmapdev() to map device memory instead of using AcpiOsMapMemory()/AcpiOsUnmapMemory() (-> pmap_mapbios()/pmap_unmapbios()) for AcpiOsReadMemory() and AcpiOsWriteMemory(). Although they do not sound too obvious, these functions are exclusively used to access memory mapped IO in ACPICA. - Remove 64-bit access from AcpiOsReadMemory() and AcpiOsWriteMemory(). These functions do not support 64-bit access. Likewise, return error when 64-bit access is requested for PCI configuration space. - Simplify AcpiOsReadPort() and AcpiOsWritePort() with iodev_read_*() and iodev_write_*(). This removes unnecessary uses of temporary macros as well. There is no functional change after this (verified with md5(1) on amd64). Modified: stable/8/sys/dev/acpica/Osd/OsdHardware.c stable/8/sys/dev/acpica/Osd/OsdMemory.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- stable/8/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 20 19:32:25 2010 (r210312) +++ stable/8/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 20 19:38:38 2010 (r210313) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include @@ -48,42 +48,21 @@ __FBSDID("$FreeBSD$"); * * In order to deal with this, we ignore resource ownership entirely, and simply * use the native I/O space accessor functionality. This is Evil, but it works. - * - * XXX use an intermediate #define for the tag/handle */ -#ifdef __i386__ -#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif -#ifdef __ia64__ -#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif -#ifdef __amd64__ -#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif - ACPI_STATUS AcpiOsReadPort(ACPI_IO_ADDRESS InPort, UINT32 *Value, UINT32 Width) { switch (Width) { case 8: - *(u_int8_t *)Value = bus_space_read_1(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); - break; + *Value = iodev_read_1(InPort); + break; case 16: - *(u_int16_t *)Value = bus_space_read_2(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); - break; + *Value = iodev_read_2(InPort); + break; case 32: - *(u_int32_t *)Value = bus_space_read_4(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); - break; - default: - /* debug trap goes here */ + *Value = iodev_read_4(InPort); break; } @@ -96,16 +75,13 @@ AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, switch (Width) { case 8: - bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + iodev_write_1(OutPort, Value); + break; case 16: - bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + iodev_write_2(OutPort, Value); + break; case 32: - bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; - default: - /* debug trap goes here */ + iodev_write_4(OutPort, Value); break; } @@ -116,28 +92,15 @@ ACPI_STATUS AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, void *Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; - u_int32_t val; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) - return (AE_NOT_EXIST); + return (AE_NOT_EXIST); - val = pci_cfgregread(PciId->Bus, PciId->Device, PciId->Function, Register, - byte_width); - switch (Width) { - case 8: - *(u_int8_t *)Value = val & 0xff; - break; - case 16: - *(u_int16_t *)Value = val & 0xffff; - break; - case 32: - *(u_int32_t *)Value = val; - break; - default: - /* debug trap goes here */ - break; - } + *(UINT64 *)Value = pci_cfgregread(PciId->Bus, PciId->Device, + PciId->Function, Register, Width / 8); return (AE_OK); } @@ -147,13 +110,15 @@ ACPI_STATUS AcpiOsWritePciConfiguration (ACPI_PCI_ID *PciId, UINT32 Register, UINT64 Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) return (AE_NOT_EXIST); pci_cfgregwrite(PciId->Bus, PciId->Device, PciId->Function, Register, - Value, byte_width); + Value, Width / 8); return (AE_OK); } Modified: stable/8/sys/dev/acpica/Osd/OsdMemory.c ============================================================================== --- stable/8/sys/dev/acpica/Osd/OsdMemory.c Tue Jul 20 19:32:25 2010 (r210312) +++ stable/8/sys/dev/acpica/Osd/OsdMemory.c Tue Jul 20 19:38:38 2010 (r210313) @@ -97,29 +97,23 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); switch (Width) { case 8: - *(u_int8_t *)Value = (*(volatile u_int8_t *)LogicalAddress); + *Value = *(volatile uint8_t *)LogicalAddress; break; case 16: - *(u_int16_t *)Value = (*(volatile u_int16_t *)LogicalAddress); + *Value = *(volatile uint16_t *)LogicalAddress; break; case 32: - *(u_int32_t *)Value = (*(volatile u_int32_t *)LogicalAddress); - break; - case 64: - *(u_int64_t *)Value = (*(volatile u_int64_t *)LogicalAddress); - break; - default: - /* debug trap goes here */ + *Value = *(volatile uint32_t *)LogicalAddress; break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } @@ -129,29 +123,23 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); switch (Width) { case 8: - (*(volatile u_int8_t *)LogicalAddress) = Value & 0xff; + *(volatile uint8_t *)LogicalAddress = Value; break; case 16: - (*(volatile u_int16_t *)LogicalAddress) = Value & 0xffff; + *(volatile uint16_t *)LogicalAddress = Value; break; case 32: - (*(volatile u_int32_t *)LogicalAddress) = Value & 0xffffffff; - break; - case 64: - (*(volatile u_int64_t *)LogicalAddress) = Value; - break; - default: - /* debug trap goes here */ + *(volatile uint32_t *)LogicalAddress = Value; break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 20:15:33 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 156DE106566B; Tue, 20 Jul 2010 20:15:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 029D88FC13; Tue, 20 Jul 2010 20:15:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KKFWMn098567; Tue, 20 Jul 2010 20:15:32 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KKFWFC098562; Tue, 20 Jul 2010 20:15:32 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007202015.o6KKFWFC098562@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 20:15: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: r210315 - in stable/8/sys: amd64/acpica conf dev/acpica modules/acpi/acpi X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 20:15:33 -0000 Author: jkim Date: Tue Jul 20 20:15:32 2010 New Revision: 210315 URL: http://svn.freebsd.org/changeset/base/210315 Log: MFC: r209957, r210003, r210005 - Move i386-inherited logic of building ACPI headers for acpi_wakeup.c into better places and remove intermediate makefile and shell scripts. This makes parallel kernel build little bit safer for amd64. - Make SMP code path in acpi.c conditional at run-time. - Define SMP unconditionally for amd64 and remove opt_global.h from SRCS in sys/modules/acpi/acpi/Makefile. Note it is done just for correctness sake because we do not build, ship, or support acpi.ko on amd64. Deleted: stable/8/sys/amd64/acpica/Makefile stable/8/sys/amd64/acpica/genwakecode.sh stable/8/sys/amd64/acpica/genwakedata.sh Modified: stable/8/sys/amd64/acpica/acpi_wakecode.S stable/8/sys/conf/files.amd64 stable/8/sys/dev/acpica/acpi.c stable/8/sys/modules/acpi/acpi/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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/8/sys/amd64/acpica/acpi_wakecode.S Tue Jul 20 19:43:25 2010 (r210314) +++ stable/8/sys/amd64/acpica/acpi_wakecode.S Tue Jul 20 20:15:32 2010 (r210315) @@ -29,8 +29,6 @@ * $FreeBSD$ */ -#define LOCORE - #include #include Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Tue Jul 20 19:43:25 2010 (r210314) +++ stable/8/sys/conf/files.amd64 Tue Jul 20 20:15:32 2010 (r210315) @@ -70,17 +70,26 @@ hptrr_lib.o optional hptrr \ amd64/acpica/OsdEnvironment.c optional acpi amd64/acpica/acpi_machdep.c optional acpi amd64/acpica/acpi_switch.S optional acpi -acpi_wakecode.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ +acpi_wakecode.o optional acpi \ + dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ + compile-with "${NORMAL_S}" \ no-obj no-implicit-rule before-depend \ - clean "acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin" -# -acpi_wakedata.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ - no-obj no-implicit-rule before-depend \ - clean "acpi_wakedata.h acpi_wakecode.o acpi_wakecode.bin" + clean "acpi_wakecode.o" +acpi_wakecode.bin optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with "objcopy -S -O binary acpi_wakecode.o ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.bin" +acpi_wakecode.h optional acpi \ + dependency "acpi_wakecode.bin" \ + compile-with "file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.h" +acpi_wakedata.h optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with 'nm -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define $${what} 0x$${offset}"; done > ${.TARGET}' \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakedata.h" # amd64/acpica/acpi_wakeup.c optional acpi amd64/acpica/madt.c optional acpi Modified: stable/8/sys/dev/acpica/acpi.c ============================================================================== --- stable/8/sys/dev/acpica/acpi.c Tue Jul 20 19:43:25 2010 (r210314) +++ stable/8/sys/dev/acpica/acpi.c Tue Jul 20 20:15:32 2010 (r210315) @@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SMP #include -#endif #include #include @@ -2536,11 +2534,11 @@ acpi_EnterSleepState(struct acpi_softc * return_ACPI_STATUS (AE_OK); } -#ifdef SMP - thread_lock(curthread); - sched_bind(curthread, 0); - thread_unlock(curthread); -#endif + if (smp_started) { + thread_lock(curthread); + sched_bind(curthread, 0); + thread_unlock(curthread); + } /* * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE @@ -2621,11 +2619,11 @@ backout: mtx_unlock(&Giant); -#ifdef SMP - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); -#endif + if (smp_started) { + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); + } /* Allow another sleep request after a while. */ timeout(acpi_sleep_enable, sc, hz * ACPI_MINIMUM_AWAKETIME); Modified: stable/8/sys/modules/acpi/acpi/Makefile ============================================================================== --- stable/8/sys/modules/acpi/acpi/Makefile Tue Jul 20 19:43:25 2010 (r210314) +++ stable/8/sys/modules/acpi/acpi/Makefile Tue Jul 20 20:15:32 2010 (r210315) @@ -99,15 +99,28 @@ SRCS+= assym.s madt.c CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o .if ${MACHINE_ARCH} == "amd64" -SRCS+= acpi_switch.S opt_global.h +.if !defined(KERNBUILDDIR) +CFLAGS+=-DSMP +.endif +SRCS+= acpi_switch.S acpi_wakedata.h CLEANFILES+= acpi_wakedata.h ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} acpi_switch.o: acpi_switch.S ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} -.endif - +acpi_wakecode.o: acpi_wakecode.S assym.s + ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} +acpi_wakecode.bin: acpi_wakecode.o + objcopy -S -O binary acpi_wakecode.o ${.TARGET} +acpi_wakecode.h: acpi_wakecode.bin + file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > \ + ${.TARGET} +acpi_wakedata.h: acpi_wakecode.o + nm -n --defined-only ${.ALLSRC} | while read offset dummy what; do \ + echo "#define $${what} 0x$${offset}"; done > ${.TARGET} +.else acpi_wakecode.h: acpi_wakecode.S assym.s ${MAKE} -f ${.CURDIR}/../../../${MACHINE_ARCH}/acpica/Makefile \ MAKESRCPATH=${.CURDIR}/../../../${MACHINE_ARCH}/acpica +.endif .include From owner-svn-src-stable-8@FreeBSD.ORG Tue Jul 20 20:27:35 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B016106564A; Tue, 20 Jul 2010 20:27:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FE368FC0A; Tue, 20 Jul 2010 20:27:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KKRZPI001420; Tue, 20 Jul 2010 20:27:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KKRZlM001416; Tue, 20 Jul 2010 20:27:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007202027.o6KKRZlM001416@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 20:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210316 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 20:27:35 -0000 Author: jkim Date: Tue Jul 20 20:27:34 2010 New Revision: 210316 URL: http://svn.freebsd.org/changeset/base/210316 Log: MFC: r209189 Fix typos that broke duration calculations on protection frames. Modified: stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_ural.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Tue Jul 20 20:15:32 2010 (r210315) +++ stable/8/sys/dev/usb/wlan/if_rum.c Tue Jul 20 20:27:34 2010 (r210316) @@ -1049,7 +1049,7 @@ rum_sendprot(struct rum_softc *sc, ackrate = ieee80211_ack_rate(ic->ic_rt, rate); isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort); + dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) + ieee80211_ack_duration(ic->ic_rt, rate, isshort); flags = RT2573_TX_MORE_FRAG; if (prot == IEEE80211_PROT_RTSCTS) { Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Tue Jul 20 20:15:32 2010 (r210315) +++ stable/8/sys/dev/usb/wlan/if_run.c Tue Jul 20 20:27:34 2010 (r210316) @@ -3164,7 +3164,7 @@ run_sendprot(struct run_softc *sc, ackrate = ieee80211_ack_rate(ic->ic_rt, rate); isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort); + dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) + ieee80211_ack_duration(ic->ic_rt, rate, isshort); wflags = RT2860_TX_FRAG; Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Tue Jul 20 20:15:32 2010 (r210315) +++ stable/8/sys/dev/usb/wlan/if_ural.c Tue Jul 20 20:27:34 2010 (r210316) @@ -1157,7 +1157,7 @@ ural_sendprot(struct ural_softc *sc, ackrate = ieee80211_ack_rate(ic->ic_rt, rate); isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort); + dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) + ieee80211_ack_duration(ic->ic_rt, rate, isshort); flags = RAL_TX_RETRY(7); if (prot == IEEE80211_PROT_RTSCTS) { From owner-svn-src-stable-8@FreeBSD.ORG Wed Jul 21 08:48:46 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F05371065675; Wed, 21 Jul 2010 08:48:45 +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 DD35C8FC19; Wed, 21 Jul 2010 08:48: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 o6L8mjej065838; Wed, 21 Jul 2010 08:48:45 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L8mjVZ065832; Wed, 21 Jul 2010 08:48:45 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201007210848.o6L8mjVZ065832@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 21 Jul 2010 08:48:45 +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: r210322 - in stable/8/sbin/geom: class/part core misc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 08:48:46 -0000 Author: ae Date: Wed Jul 21 08:48:45 2010 New Revision: 210322 URL: http://svn.freebsd.org/changeset/base/210322 Log: MFC r209388: Remove G_TYPE_ASCLBA type and replace it with G_TYPE_STRING in gpart. Move code that converts params from humanized numbers to sectors count to subr.c and adjust comment. Add post-processing for "size" and "start offset" params in gpart, now they are properly converted to sectors count with known sector size that can be greater that 512 bytes. Also replace "unsigned long long" type to "off_t" for unify code since it used for medium size in libgeom(3) and DIOCGMEDIASIZE ioctl. PR: bin/146277 MFC r209392: Check for overflow before it occurs. Also add check for negative numbers. Suggested by: ache Approved by: mav (mentor) Modified: stable/8/sbin/geom/class/part/geom_part.c stable/8/sbin/geom/core/geom.c stable/8/sbin/geom/core/geom.h stable/8/sbin/geom/misc/subr.c stable/8/sbin/geom/misc/subr.h Directory Properties: stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/stripe/ (props changed) Modified: stable/8/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/8/sbin/geom/class/part/geom_part.c Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/class/part/geom_part.c Wed Jul 21 08:48:45 2010 (r210322) @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -60,6 +62,9 @@ static char autofill[] = "*"; static char optional[] = ""; static char flags[] = "C"; +static char sstart[32]; +static char ssize[32]; + static const char const bootcode_param[] = "bootcode"; static const char const index_param[] = "index"; static const char const partcode_param[] = "partcode"; @@ -68,8 +73,7 @@ static struct gclass *find_class(struct static struct ggeom * find_geom(struct gclass *, const char *); static const char *find_geomcfg(struct ggeom *, const char *); static const char *find_provcfg(struct gprovider *, const char *); -static struct gprovider *find_provider(struct ggeom *, - unsigned long long); +static struct gprovider *find_provider(struct ggeom *, off_t); static const char *fmtsize(int64_t); static int gpart_autofill(struct gctl_req *); static void gpart_bootcode(struct gctl_req *, unsigned int); @@ -83,8 +87,8 @@ static void gpart_write_partcode_vtoc8(s struct g_command PUBSYM(class_commands)[] = { { "add", 0, gpart_issue, { - { 'b', "start", autofill, G_TYPE_ASCLBA }, - { 's', "size", autofill, G_TYPE_ASCLBA }, + { 'b', "start", autofill, G_TYPE_STRING }, + { 's', "size", autofill, G_TYPE_STRING }, { 't', "type", NULL, G_TYPE_STRING }, { 'i', index_param, optional, G_TYPE_ASCNUM }, { 'l', "label", optional, G_TYPE_STRING }, @@ -148,7 +152,7 @@ struct g_command PUBSYM(class_commands)[ "geom", NULL }, { "resize", 0, gpart_issue, { - { 's', "size", autofill, G_TYPE_ASCLBA }, + { 's', "size", autofill, G_TYPE_STRING }, { 'i', index_param, NULL, G_TYPE_ASCNUM }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, @@ -206,11 +210,11 @@ find_provcfg(struct gprovider *pp, const } static struct gprovider * -find_provider(struct ggeom *gp, unsigned long long minsector) +find_provider(struct ggeom *gp, off_t minsector) { struct gprovider *pp, *bestpp; const char *s; - unsigned long long sector, bestsector; + off_t sector, bestsector; bestpp = NULL; bestsector = 0; @@ -218,9 +222,10 @@ find_provider(struct ggeom *gp, unsigned s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - sector = atoll(s) / pp->lg_sectorsize; + sector = + (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - sector = atoll(s); + sector = (off_t)strtoimax(s, NULL, 0); if (sector < minsector) continue; @@ -270,18 +275,12 @@ gpart_autofill_resize(struct gctl_req *r struct gclass *cp; struct ggeom *gp; struct gprovider *pp; - unsigned long long last, size, start, new_size; - unsigned long long lba, new_lba; + off_t last, size, start, new_size; + off_t lba, new_lba; const char *s; char *val; int error, idx; - s = gctl_get_ascii(req, "size"); - if (*s == '*') - new_size = (unsigned long long)atoll(s); - else - return (0); - s = gctl_get_ascii(req, index_param); idx = strtol(s, &val, 10); if (idx < 1 || *s == '\0' || *val != '\0') @@ -302,8 +301,22 @@ gpart_autofill_resize(struct gctl_req *r gp = find_geom(cp, s); if (gp == NULL) errx(EXIT_FAILURE, "No such geom: %s.", s); - last = atoll(find_geomcfg(gp, "last")); + pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; + if (pp == NULL) + errx(EXIT_FAILURE, "Provider for geom %s not found.", s); + + s = gctl_get_ascii(req, "size"); + if (*s == '*') + new_size = 0; + else { + error = g_parse_lba(s, pp->lg_sectorsize, &new_size); + if (error) + errc(EXIT_FAILURE, error, "Invalid size param"); + /* no autofill necessary. */ + goto done; + } + last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0); LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { s = find_provcfg(pp, "index"); if (s == NULL) @@ -317,18 +330,21 @@ gpart_autofill_resize(struct gctl_req *r s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - start = atoll(s) / pp->lg_sectorsize; + start = (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - start = atoll(s); + start = (off_t)strtoimax(s, NULL, 0); s = find_provcfg(pp, "end"); if (s == NULL) { s = find_provcfg(pp, "length"); - lba = start + atoll(s) / pp->lg_sectorsize; + lba = start + + (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - lba = atoll(s) + 1; + lba = (off_t)strtoimax(s, NULL, 0) + 1; - if (lba > last) + if (lba > last) { + geom_deletetree(&mesh); return (ENOSPC); + } size = lba - start; pp = find_provider(gp, lba); if (pp == NULL) @@ -337,22 +353,25 @@ gpart_autofill_resize(struct gctl_req *r s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - new_lba = atoll(s) / pp->lg_sectorsize; + new_lba = + (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - new_lba = atoll(s); - /* Is there any free space between current and + new_lba = (off_t)strtoimax(s, NULL, 0); + /* + * Is there any free space between current and * next providers? */ if (new_lba > lba) new_size = new_lba - start; - else + else { + geom_deletetree(&mesh); return (ENOSPC); + } } - asprintf(&val, "%llu", new_size); - if (val == NULL) - return (ENOMEM); - gctl_change_param(req, "size", -1, val); - +done: + snprintf(ssize, sizeof(ssize), "%jd", (intmax_t)new_size); + gctl_change_param(req, "size", -1, ssize); + geom_deletetree(&mesh); return (0); } @@ -363,11 +382,11 @@ gpart_autofill(struct gctl_req *req) struct gclass *cp; struct ggeom *gp; struct gprovider *pp; - unsigned long long first, last; - unsigned long long size, start; - unsigned long long lba, len, grade; + off_t first, last; + off_t size, start; + off_t lba, len; + uintmax_t grade; const char *s; - char *val; int error, has_size, has_start; s = gctl_get_ascii(req, "verb"); @@ -376,18 +395,6 @@ gpart_autofill(struct gctl_req *req) if (strcmp(s, "add") != 0) return (0); - s = gctl_get_ascii(req, "size"); - has_size = (*s == '*') ? 0 : 1; - size = (has_size) ? (unsigned long long)atoll(s) : 0ULL; - - s = gctl_get_ascii(req, "start"); - has_start = (*s == '*') ? 0 : 1; - start = (has_start) ? (unsigned long long)atoll(s) : ~0ULL; - - /* No autofill necessary. */ - if (has_size && has_start) - return (0); - error = geom_gettree(&mesh); if (error) return (error); @@ -403,22 +410,49 @@ gpart_autofill(struct gctl_req *req) gp = find_geom(cp, s); if (gp == NULL) errx(EXIT_FAILURE, "No such geom: %s.", s); - first = atoll(find_geomcfg(gp, "first")); - last = atoll(find_geomcfg(gp, "last")); + pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; + if (pp == NULL) + errx(EXIT_FAILURE, "Provider for geom %s not found.", s); + + s = gctl_get_ascii(req, "size"); + has_size = (*s == '*') ? 0 : 1; + size = 0; + if (has_size) { + error = g_parse_lba(s, pp->lg_sectorsize, &size); + if (error) + errc(EXIT_FAILURE, error, "Invalid size param"); + } + + s = gctl_get_ascii(req, "start"); + has_start = (*s == '*') ? 0 : 1; + start = 0ULL; + if (has_start) { + error = g_parse_lba(s, pp->lg_sectorsize, &start); + if (error) + errc(EXIT_FAILURE, error, "Invalid start param"); + } + + /* No autofill necessary. */ + if (has_size && has_start) + goto done; + + first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0); + last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0); grade = ~0ULL; while ((pp = find_provider(gp, first)) != NULL) { s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - lba = atoll(s) / pp->lg_sectorsize; + lba = (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - lba = atoll(s); + lba = (off_t)strtoimax(s, NULL, 0); if (first < lba) { /* Free space [first, lba> */ len = lba - first; if (has_size) { - if (len >= size && len - size < grade) { + if (len >= size && + (uintmax_t)(len - size) < grade) { start = first; grade = len - size; } @@ -439,15 +473,17 @@ gpart_autofill(struct gctl_req *req) s = find_provcfg(pp, "end"); if (s == NULL) { s = find_provcfg(pp, "length"); - first = lba + atoll(s) / pp->lg_sectorsize; + first = lba + + (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - first = atoll(s) + 1; + first = (off_t)strtoimax(s, NULL, 0) + 1; } if (first <= last) { /* Free space [first-last] */ len = last - first + 1; if (has_size) { - if (len >= size && len - size < grade) { + if (len >= size && + (uintmax_t)(len - size) < grade) { start = first; grade = len - size; } @@ -465,21 +501,17 @@ gpart_autofill(struct gctl_req *req) } } - if (grade == ~0ULL) + if (grade == ~0ULL) { + geom_deletetree(&mesh); return (ENOSPC); - - if (!has_size) { - asprintf(&val, "%llu", size); - if (val == NULL) - return (ENOMEM); - gctl_change_param(req, "size", -1, val); - } - if (!has_start) { - asprintf(&val, "%llu", start); - if (val == NULL) - return (ENOMEM); - gctl_change_param(req, "start", -1, val); } + +done: + snprintf(ssize, sizeof(ssize), "%jd", (intmax_t)size); + gctl_change_param(req, "size", -1, ssize); + snprintf(sstart, sizeof(sstart), "%jd", (intmax_t)start); + gctl_change_param(req, "start", -1, sstart); + geom_deletetree(&mesh); return (0); } @@ -488,21 +520,21 @@ gpart_show_geom(struct ggeom *gp, const { struct gprovider *pp; const char *s, *scheme; - unsigned long long first, last, sector, end; - unsigned long long length, secsz; + off_t first, last, sector, end; + off_t length, secsz; int idx, wblocks, wname; scheme = find_geomcfg(gp, "scheme"); s = find_geomcfg(gp, "first"); - first = atoll(s); + first = (off_t)strtoimax(s, NULL, 0); s = find_geomcfg(gp, "last"); - last = atoll(s); + last = (off_t)strtoimax(s, NULL, 0); wblocks = strlen(s); wname = strlen(gp->lg_name); pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; secsz = pp->lg_sectorsize; - printf("=>%*llu %*llu %*s %s (%s)\n", - wblocks, first, wblocks, (last - first + 1), + printf("=>%*jd %*jd %*s %s (%s)\n", + wblocks, (intmax_t)first, wblocks, (intmax_t)(last - first + 1), wname, gp->lg_name, scheme, fmtsize(pp->lg_mediasize)); @@ -510,37 +542,37 @@ gpart_show_geom(struct ggeom *gp, const s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - sector = atoll(s) / secsz; + sector = (off_t)strtoimax(s, NULL, 0) / secsz; } else - sector = atoll(s); + sector = (off_t)strtoimax(s, NULL, 0); s = find_provcfg(pp, "end"); if (s == NULL) { s = find_provcfg(pp, "length"); - length = atoll(s) / secsz; + length = (off_t)strtoimax(s, NULL, 0) / secsz; end = sector + length - 1; } else { - end = atoll(s); + end = (off_t)strtoimax(s, NULL, 0); length = end - sector + 1; } s = find_provcfg(pp, "index"); idx = atoi(s); if (first < sector) { - printf(" %*llu %*llu %*s - free - (%s)\n", - wblocks, first, wblocks, sector - first, - wname, "", + printf(" %*jd %*jd %*s - free - (%s)\n", + wblocks, (intmax_t)first, wblocks, + (intmax_t)(sector - first), wname, "", fmtsize((sector - first) * secsz)); } - printf(" %*llu %*llu %*d %s %s (%s)\n", - wblocks, sector, wblocks, length, + printf(" %*jd %*jd %*d %s %s (%s)\n", + wblocks, (intmax_t)sector, wblocks, (intmax_t)length, wname, idx, find_provcfg(pp, element), fmtattrib(pp), fmtsize(pp->lg_mediasize)); first = end + 1; } if (first <= last) { length = last - first + 1; - printf(" %*llu %*llu %*s - free - (%s)\n", - wblocks, first, wblocks, length, + printf(" %*jd %*jd %*s - free - (%s)\n", + wblocks, (intmax_t)first, wblocks, (intmax_t)length, wname, "", fmtsize(length * secsz)); } Modified: stable/8/sbin/geom/core/geom.c ============================================================================== --- stable/8/sbin/geom/core/geom.c Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/core/geom.c Wed Jul 21 08:48:45 2010 (r210322) @@ -249,94 +249,6 @@ set_option(struct gctl_req *req, struct opt->go_val); } else gctl_ro_param(req, opt->go_name, -1, opt->go_val); - } else if (G_OPT_TYPE(opt) == G_TYPE_ASCLBA) { - /* - * LBAs are ugly. The argument is a sector. The size of a - * sector is context specific (i.e. determined by the media), - * which we don't know here. But when users enter a value - * with a SI unit, they really mean the byte-size or byte- - * offset and not the size or offset in sectors. - * So how can we map the byte-oriented value into a sector- - * oriented value if we don't know the sector size in bytes? - * The approach taken here is: - * o Sectors are 512 bytes in size. Mostly the case anyway. - * o When no SI unit is specified the value is in sectors. - * o With an SI unit the value is in bytes. - * o The 'b' suffix forces byte interpretation and the 's' - * suffix forces sector interpretation. - * - * Thus: - * o 2 and 2s mean 2 sectors, and 2b means 2 bytes. - * o 4k and 4kb mean 4096 bytes, and 4ks means 4096 sectors. - * - * "This seemed like a good idea at the time" - */ - intmax_t mult, unit; - - number = strtoimax(val, &s, 0); - if (s == val) - errc(EXIT_FAILURE, EINVAL, "argument '%c'", - opt->go_char); - mult = 1; - unit = 512; /* sector */ - if (*s == '\0') - goto done; - switch (*s) { - case 'e': case 'E': - mult *= 1024; - /*FALLTHROUGH*/ - case 'p': case 'P': - mult *= 1024; - /*FALLTHROUGH*/ - case 't': case 'T': - mult *= 1024; - /*FALLTHROUGH*/ - case 'g': case 'G': - mult *= 1024; - /*FALLTHROUGH*/ - case 'm': case 'M': - mult *= 1024; - /*FALLTHROUGH*/ - case 'k': case 'K': - mult *= 1024; - break; - default: - goto sfx; - } - unit = 1; /* bytes */ - s++; - if (*s == '\0') - goto done; -sfx: - switch (*s) { - case 's': case 'S': - unit = 512; /* sector */ - break; - case 'b': case 'B': - unit = 1; /* bytes */ - break; - default: - errc(EXIT_FAILURE, EINVAL, "argument '%c': suffix '%c'", - opt->go_char, *s); - } - s++; - if (*s != '\0') - errx(EXIT_FAILURE, "argument '%c': junk at end (%s)", - opt->go_char, s); -done: - if (mult * unit < mult || number * mult * unit < number) - errc(EXIT_FAILURE, ERANGE, "argument '%c'", - opt->go_char); - number *= mult * unit; - if (number % 512) - errx(EXIT_FAILURE, "argument '%c': " - "not a valid block address", opt->go_char); - number /= 512; - asprintf(&s, "%jd", number); - if (s == NULL) - err(EXIT_FAILURE, NULL); - opt->go_val = s; - gctl_ro_param(req, opt->go_name, -1, s); } else if (G_OPT_TYPE(opt) == G_TYPE_STRING) { gctl_ro_param(req, opt->go_name, -1, val); } else if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { @@ -429,8 +341,7 @@ parse_arguments(struct g_command *cmd, s gctl_ro_param(req, opt->go_name, sizeof(intmax_t), opt->go_val); } else if (G_OPT_TYPE(opt) == G_TYPE_STRING || - G_OPT_TYPE(opt) == G_TYPE_ASCNUM || - G_OPT_TYPE(opt) == G_TYPE_ASCLBA) { + G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { if (cmd->gc_argname == NULL || opt->go_val == NULL || *(char *)opt->go_val != '\0') Modified: stable/8/sbin/geom/core/geom.h ============================================================================== --- stable/8/sbin/geom/core/geom.h Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/core/geom.h Wed Jul 21 08:48:45 2010 (r210322) @@ -39,7 +39,6 @@ #define G_TYPE_STRING 0x02 #define G_TYPE_NUMBER 0x03 #define G_TYPE_ASCNUM 0x04 -#define G_TYPE_ASCLBA 0x05 #define G_TYPE_MASK 0x0f #define G_TYPE_DONE 0x10 Modified: stable/8/sbin/geom/misc/subr.c ============================================================================== --- stable/8/sbin/geom/misc/subr.c Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/misc/subr.c Wed Jul 21 08:48:45 2010 (r210322) @@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -107,6 +109,94 @@ bitcount32(uint32_t x) return (x); } +/* + * The size of a sector is context specific (i.e. determined by the + * media). But when users enter a value with a SI unit, they really + * mean the byte-size or byte-offset and not the size or offset in + * sectors. We should map the byte-oriented value into a sector-oriented + * value when we already know the sector size in bytes. At this time + * we can use g_parse_lba() function. It converts user specified + * value into sectors with following conditions: + * o Sectors size taken as argument from caller. + * o When no SI unit is specified the value is in sectors. + * o With an SI unit the value is in bytes. + * o The 'b' suffix forces byte interpretation and the 's' + * suffix forces sector interpretation. + * + * Thus: + * o 2 and 2s mean 2 sectors, and 2b means 2 bytes. + * o 4k and 4kb mean 4096 bytes, and 4ks means 4096 sectors. + * + */ +int +g_parse_lba(const char *lbastr, unsigned sectorsize, off_t *sectors) +{ + off_t number, mult, unit; + char *s; + + assert(lbastr != NULL); + assert(sectorsize > 0); + assert(sectors != NULL); + + number = (off_t)strtoimax(lbastr, &s, 0); + if (s == lbastr || number < 0) + return (EINVAL); + + mult = 1; + unit = sectorsize; + if (*s == '\0') + goto done; + switch (*s) { + case 'e': case 'E': + mult *= 1024; + /* FALLTHROUGH */ + case 'p': case 'P': + mult *= 1024; + /* FALLTHROUGH */ + case 't': case 'T': + mult *= 1024; + /* FALLTHROUGH */ + case 'g': case 'G': + mult *= 1024; + /* FALLTHROUGH */ + case 'm': case 'M': + mult *= 1024; + /* FALLTHROUGH */ + case 'k': case 'K': + mult *= 1024; + break; + default: + goto sfx; + } + unit = 1; /* bytes */ + s++; + if (*s == '\0') + goto done; +sfx: + switch (*s) { + case 's': case 'S': + unit = sectorsize; /* sector */ + break; + case 'b': case 'B': + unit = 1; /* bytes */ + break; + default: + return (EINVAL); + } + s++; + if (*s != '\0') + return (EINVAL); +done: + if ((OFF_MAX / unit) < mult || (OFF_MAX / mult / unit) < number) + return (ERANGE); + number *= mult * unit; + if (number % sectorsize) + return (EINVAL); + number /= sectorsize; + *sectors = number; + return (0); +} + off_t g_get_mediasize(const char *name) { Modified: stable/8/sbin/geom/misc/subr.h ============================================================================== --- stable/8/sbin/geom/misc/subr.h Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/misc/subr.h Wed Jul 21 08:48:45 2010 (r210322) @@ -32,6 +32,7 @@ unsigned g_lcm(unsigned a, unsigned b); uint32_t bitcount32(uint32_t x); +int g_parse_lba(const char *lbastr, unsigned sectorsize, off_t *sectors); off_t g_get_mediasize(const char *name); unsigned g_get_sectorsize(const char *name); From owner-svn-src-stable-8@FreeBSD.ORG Wed Jul 21 10:36:28 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57084106566B; Wed, 21 Jul 2010 10:36:28 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440348FC1B; Wed, 21 Jul 2010 10:36:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LAaSSE090625; Wed, 21 Jul 2010 10:36:28 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LAaSMx090623; Wed, 21 Jul 2010 10:36:28 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007211036.o6LAaSMx090623@svn.freebsd.org> From: Hiroki Sato Date: Wed, 21 Jul 2010 10:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210339 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 10:36:28 -0000 Author: hrs Date: Wed Jul 21 10:36:27 2010 New Revision: 210339 URL: http://svn.freebsd.org/changeset/base/210339 Log: Add relnotes item for 8.1R (first round): ddb(4) show mount improved, fcntl(2) F_READAHEAD and F_RDAHEAD added, lindev(4) added, more dtrace probes, SMP support in PowerPC G5, ULE %CPU fix, VIMAGE + SCTP build fix, vfs.root.mountfrom space-separated list support added, loader(8) memory range selection improved, zfsloader added, zfsboot and gptboot added, adb(4) supports taps on ADB touchpad, apt(4) added, uart(4) NetMos NM9865 support added, bge(4) 5761, 5784, 57780 support added, cxgb(4) updated to T3 firmware 7.8.0, msk(4) 88E8042, 88E8057 and DGE-560SX support added, re(4) unnecessary reinitialization eliminated, tsec(4) now supports ALTQ, urtw(4) now supports RTL8187B, net.inet.ipcomp.ipcomp_enable=1 by default, IPV6_V6ONLY by default for IPv6 sockets in Linux emulation, gmirror(8) priority change support, gmirror(8) "load" balancing algorithm improved and now used as default, "option ATA_CAM" added, ata(4) fix for interrupt storms/command timeouts added, ata(4) umass support removed, ahd(4) error counter improved, cam(3) SATA/PATA support improved, bsnmpd(1) high CPU load issue fixed, bzip2(1) multi-session bzip2 file handling fixed, ee(1) crach fixed, factor(6) performance issue fixed, fetch(1) NO_PROXY handling fixed, ifconfig(8) now supports NDP flag handling, ntpd(8) no longer attempts to bind IPv6 anycast addresses, unifdef(1) updated to 1.188, ENOTCAPABLE new errno, rc.d/static_arp added, and ISC BIND 9.6.1-P2. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 10:25:02 2010 (r210338) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 10:36:27 2010 (r210339) @@ -201,16 +201,94 @@ + The show mount command in the + &man.ddb.4; debugger now prints active string mount + options. + + Two commands to enable/disable read-ahead has been added + to &man.fcntl.2; system call: + + + + F_READAHEAD specifies the amount + for sequential access. The amount is specified in bytes and is + rounded up to nearest block size. + + + + F_RDAHEAD is a Darwin compatible + version that use 128KB as the sequential access + size. + + + + Note that the read-ahead amount is also constrainted by + sysctl variable vfs.read_max, which may + need to be raised in order to better utilize this + feature. + + The &man.lindev.4; driver has been added. This is for + supporting various linux-specific pseudo devices such as + /dev/full. Note that this is not + included in GENERIC kernel. + + New SDT (Statically Defined Tracing) probes such as ones + for opencrypto have been added to &os; &man.dtrace.1; + subsystem. + + &os; now supports SMP in PowerPC G5 + systems. Note that SMP support is disabled by default in + GENERIC kernel. + + A bug in the &man.sched.ule.4; scheduler which prevented + process usage (%CPU) from working correctly + has been fixed. + + The VIMAGE &man.jail.8; virtualization container can work + with &man.sctp.4; now. Note that the VIMAGE is not enabled by + default in GENERIC kernel. + Boot Loader Changes + A kernel environment variable + vfs.root.mountfrom now supports + multiple elements for root file system in a space-separated + list. Each list element will be tried in order and the + first available one will be mounted. + + The algorithm the &man.loader.8; uses has + been improved to choose a memory range for its heap when + using a range above 1MB. This fixes a symptom that the + loader fails to load a kernel. + + The zfsloader has been added. This + is a separate &man.zfs.8; enabled loader. Note that a ZFS + bootcode (zfsboot or + gptzfsboot) need to be installed + to use this new loader. + + The zfsboot and + gptzfsboot bootcode now fully support + 64-bit LBAs for disk addresses. This allows booting from + large volumes. + Hardware Support - + The adb driver now + supports for interpreting taps on ADB touchpads as a button + click. + + The apt driver for + the Apple Touchpad present on MacBook has been added to + GENERIC kernel. + + The &man.uart.4; driver now supports NetMos NM9865 + family of Serial/Parallel ports. Multimedia Support @@ -222,6 +300,24 @@ Network Interface Support + + The &man.bge.4; driver now supports 5761, 5784, and + 57780-based devices. + + The &man.cxgb.4; driver has been updated to T3 + firmware 7.8.0. + + The &man.msk.4; driver now supports Marvell Yukon + 88E8042, 88E8057 devices and DGE-560SX (Yukon XL). + + The &man.re.4; driver no longer performs an + unnecessary interface up/down during getting IP address + via DHCP. + + The tsec(4) driver now supports &man.altq.4;. + + The &man.urtw.4; driver has been improved and now + supports RTL8187B-based devices. @@ -229,12 +325,82 @@ Network Protocols + + IPcomp (IP Payload Compression Protocol defined in RFC + 2393) protocol is now enabled by default. Note that this + requires in the kernel + configuration file and GENERIC kernel + does not include it. This functionality can be disabled by + using a sysctl variable + net.inet.ipcomp.ipcomp_enable. + + IPv6 sockets in Linux emulation environment are + unconditionally set as IPV6_V6ONLY + regardless of net.inet6.ip6.v6only sysctl + variable. Disks and Storage + + The &man.gmirror.8; utility now supports + configure + priority command to + change the providers priority. + + The balancing mode algorithm load + used in the &man.gmirror.8; utility has been changed and it + is now the default one instead of + split: + + + + Instead of measuring last request execution time for + each drive and choosing one with smallest time, use + averaged number of requests, running on each drive. This + information is more accurate and timely. It allows to + distribute load between drives in more even and + predictable way. + + + + For each drive track offset of the last submitted + request. If new request offset matches previous one or + close for some drive, prefer that drive. It allows to + significantly speedup simultaneous sequential reads. + + + + A new kernel option has + been added. This turns &man.ata.4; controller drivers into + &man.cam.4; interface modules. When enabled, this option + deprecates all &man.ata.4; peripheral drivers and interfaces + such as ad and + acd, and allows &man.cam.4; drivers + ada, and cd and + interfaces to be natively used instead. Note that this is + not enabled by default in the GENERIC + kernel. + + A bug in the &man.ata.4; driver which can lead to + interrupt storms and command timeouts. + + USB mass storage device support in the &man.ata.4; + driver has been removed. Note that this was not used in + GENERIC kernel and the &man.umass.4; + driver supports such devices for a long time. + + The &man.ahd.4; driver now supports three separated + error counters for correctable, uncorrectable, and fatal, in + &man.sysctl.8; MIB. + + SATA and PATA support of &os; &man.cam.3; SCSI framework + has been improved and it now recognizes more detail device + capabilities. For example, the &man.ahci.4; and + &man.siis.4; driver now reports maximum tag number to the + framework to optimize the NCQ handling. @@ -247,12 +413,47 @@ Userland Changes - + A bug in &man.bsnmpd.1; program which leads to high CPU + consumption on a loaded system has been fixed. + + A bug in &man.bzip2.1; utility which prevented it from + working with multi-session bzip2 files. + + A bug in &man.ee.1; utility which can crash the + program has been fixed. + + A bug in &man.factor.6; utility which leads to performance + degradation has been fixed. + + A bug in &man.fetch.1; utility which incorrectly evaluates + a variable NO_PROXY has been fixed. + + The &man.ifconfig.8; utility now supports manipulation of + NDP flags handled by &man.ndp.8;. + + The &man.ntpd.8; program no longer tries to bind to an + IPv6 anycast address. + + The &man.unifdef.1; utility has been updated to version + 1.188. It now supports a new flag to + compress blank lines around a deleted section to prevent blank + lines around paragraphs of code from getting doubled. + + A new errno ENOTCAPABLE has been added. + This is to be returned when a process requests an operation on + a file descriptor that is not authorized by the descriptor's + capability flags. <filename>/etc/rc.d</filename> Scripts + + A new rc.d script + static_arp has been added. This allows + the administrator to statically define mappings of MAC + address to IPv4 at boot time. See also the &man.rc.conf.5; + manual page for more details. @@ -260,9 +461,10 @@ Contributed Software + + ISC BIND has been updated to + version 9.6.1-P2. From owner-svn-src-stable-8@FreeBSD.ORG Wed Jul 21 20:38:45 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B25A41065679; Wed, 21 Jul 2010 20:38:45 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A12248FC18; Wed, 21 Jul 2010 20:38: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 o6LKcj6s032097; Wed, 21 Jul 2010 20:38:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LKcjg2032095; Wed, 21 Jul 2010 20:38:45 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007212038.o6LKcjg2032095@svn.freebsd.org> From: Hiroki Sato Date: Wed, 21 Jul 2010 20:38:45 +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: r210360 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 20:38:45 -0000 Author: hrs Date: Wed Jul 21 20:38:45 2010 New Revision: 210360 URL: http://svn.freebsd.org/changeset/base/210360 Log: Fix missing words. Spotted by: pluknet at gmail.com Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 20:32:22 2010 (r210359) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 20:38:45 2010 (r210360) @@ -669,7 +669,7 @@ consumption on a loaded system has been fixed. A bug in &man.bzip2.1; utility which prevented it from - working with multi-session bzip2 files. + working with multi-session bzip2 files has been fixed. The &man.camcontrol.8; utility now supports a flag in the subcommand From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 22 01:01:17 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 086421065674; Thu, 22 Jul 2010 01:01:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8A5B8FC12; Thu, 22 Jul 2010 01:01:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6M11G0g090507; Thu, 22 Jul 2010 01:01:16 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6M11Guh090505; Thu, 22 Jul 2010 01:01:16 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007220101.o6M11Guh090505@svn.freebsd.org> From: Hiroki Sato Date: Thu, 22 Jul 2010 01:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210362 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 01:01:17 -0000 Author: hrs Date: Thu Jul 22 01:01:16 2010 New Revision: 210362 URL: http://svn.freebsd.org/changeset/base/210362 Log: New release notes: ddb(4) show vnetrcrs, sched_4bsd race fix, pfil(9) virtualization, ahci(4) Marvell 88SE912x support, ahci(4) FBS support in PM, ata(4) PUIS support, cam(3) kern.cam.boot_delay, error recovery improvement, gmultipath(8) destroy subcommand added, isp(4) improved, siis(4) Max Read Request Size increased, nfsiod(8) race fixed, ffs(7) inode number is now unsigned, cp(1) -x added, fsck_ffs(8) UFS1 last cylinder group issue fixed, ifconfig(8) description support added, netstat(1) -q option added, restore(8) -P shot read issue fixed, rtsold(8) -a improved, strsignal(3) thread-safe, sysctl(8) -i added, rc.d/rtsold added, firewall_coscripts in rc.conf added, and ISC BIND 9.6.1-P3. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 21:23:23 2010 (r210361) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jul 22 01:01:16 2010 (r210362) @@ -205,6 +205,11 @@ &man.ddb.4; debugger now prints active string mount options. + The &man.ddb.4; now supports show + vnetrcrs command to dump the whole log of + distinctive curvnet recursion + events. + The default &man.devfs.5; rules now expose the upper 256 of &man.pty.4; device nodes. @@ -267,6 +272,9 @@ timestamp for the sleeping operation is not cleaned up on the wakeup has been fixed. + A race condition in the &man.sched.4bsd.4; scheduler has + been fixed. + A bug in the &man.sched.ule.4; scheduler which prevented process usage (%CPU) from working correctly has been fixed. @@ -521,6 +529,10 @@ check. This feature is in the latest version of pf. + The &man.pfil.9; framework for packet filtering in &os; + kernel now supports separate packet filtering instances like + &man.ipfw.4; for each VIMAGE jail. + A bug that proxy ARP entries cannot be added over point-to-point link types has been fixed. @@ -551,6 +563,70 @@ /dev/ada1, for example. + The &man.ahci.4; driver now supports SATA part of + Marvell 88SE912x controllers. + + The &man.ahci.4; driver now supports FIS-based (Frame + Information Structure) switching of port multiplier on + supported controlers. + + The &man.ahd.4; driver now supports three separated + error counters for correctable, uncorrectable, and fatal, in + &man.sysctl.8; MIB. + + A new kernel option has + been added. This turns &man.ata.4; controller drivers into + &man.cam.4; interface modules. When enabled, this option + deprecates all &man.ata.4; peripheral drivers and interfaces + such as ad and + acd, and allows &man.cam.4; drivers + ada, and cd and + interfaces to be natively used instead. Note that this is + not enabled by default in the GENERIC + kernel. + + A bug in the &man.ata.4; driver which can lead to + interrupt storms and command timeouts has been fixed. + + The &man.ata.4; driver now supports Power-Up In Stand-by + (PUIS). The PUIS is a configudation of SATA or PATA drives + to prevent them from automatic spin-up when power is + applied. This feature can be controled via &man.cam.3; + framework (a typical application is staggered + spin-up). + + USB mass storage device support in the &man.ata.4; + driver has been removed. Note that this was not used in + GENERIC kernel and the &man.umass.4; + driver supports such devices for a long time. + + &os; &man.cam.3; SCSI framework has been improved: + + + + SATA and PATA support has been improved and it now + recognizes more detail device capabilities. For example, + the &man.ahci.4; and &man.siis.4; driver now reports maximum + tag number to the framework to optimize the NCQ + handling. + + + + A loader tunable + kern.cam.boot_delay has been added. + This controls the delay time before &man.cam.3; probes + the attached devices. + + + + SCSI error recovery for devices on buses without + automatic sense reporting has been improved. Typical + devices are on ATAPI and USB. For example, this allows + &man.cam.3; to wait, while CD drive loads disk, instead + of immediately return error status. + + + A bug in the &man.fdc.4; driver which prevents the kernel module from unloading has been fixed. @@ -588,6 +664,9 @@ + The &man.gmultipath.8; utility now supports + destroy command. + A bug in the &man.graid3.8; which causes a panic when a large request arrives has been fixed. This happens when MAXPHYS is set as larger than 128k. @@ -595,34 +674,12 @@ The default block size of &man.gstripe.8; has been increased from 4k to 64k. - A new kernel option has - been added. This turns &man.ata.4; controller drivers into - &man.cam.4; interface modules. When enabled, this option - deprecates all &man.ata.4; peripheral drivers and interfaces - such as ad and - acd, and allows &man.cam.4; drivers - ada, and cd and - interfaces to be natively used instead. Note that this is - not enabled by default in the GENERIC - kernel. + The &man.isp.4; driver has been improved in + stability. - A bug in the &man.ata.4; driver which can lead to - interrupt storms and command timeouts has been fixed. - - USB mass storage device support in the &man.ata.4; - driver has been removed. Note that this was not used in - GENERIC kernel and the &man.umass.4; - driver supports such devices for a long time. - - The &man.ahd.4; driver now supports three separated - error counters for correctable, uncorrectable, and fatal, in - &man.sysctl.8; MIB. - - SATA and PATA support of &os; &man.cam.3; SCSI framework - has been improved and it now recognizes more detail device - capabilities. For example, the &man.ahci.4; and - &man.siis.4; driver now reports maximum tag number to the - framework to optimize the NCQ handling. + The Max Read Request Size in the &man.siis.4; driver for + PCIe chips has been increased from 512 to 1024 bytes for + better performance. @@ -639,6 +696,20 @@ to 0 disables negative name caching for the mount point. + A race condition in &os; NFS subsystem that occurs when + &man.nfsiod.8; threads are being created has been fixed. + This also fixes an interoperability issue found in + combination of a &os; NFS client and a Linux NFS + server. + + The inode number handling in &man.ffs.7; file system is + now unsigned. Previously some large inode numbers can be + treated as negative, and this issue shows up at file systems + with the size of more than 16Tb in 16k block case. The + &man.newfs.8; utility never create a file system with more + than 2^32 inodes by cutting back on the number of inodes per + cylinder group if necessary to stay under the limit. + &os; &man.VFS.9; subsystem now supports a new sysctl variable vfs.vlru_allow_cache_src. This allow vnlru kernel thread to reclaim @@ -676,6 +747,9 @@ identify. It displays whole of identify data block. + The &man.cp.1; now supports a flag to + make it not traverse across multiple mount points. + The &man.cp.1;, &man.find.1;, &man.getfacl.1;, &man.mv.1;, and &man.setfacl.1; utilities now support NFSv4 ACL. @@ -695,15 +769,36 @@ A bug in &man.fetch.1; utility which incorrectly evaluates a variable NO_PROXY has been fixed. + A bug in the &man.fsck.ffs.8; utility which causes the + last cylinder group of a UFS1 file system is always reported + as broken even after it is fixed. + The &man.gcore.1; utility now recognizes threads in the process and handles dumps on a thread scope. The &man.ifconfig.8; utility now supports manipulation of NDP flags handled by &man.ndp.8;. + The &man.ifconfig.8; utility now supports a + description + value command to add a + description value to the specified + interface. + + The &man.mount.nfs.8; utility now supports + [ipaddr]:path + notation in addition to the existing one. This allows IPv6 + address in the address field, and a path including + : to be mounted. + The &man.netstat.1; utility now supports ARP information in statistics shown by the flag. + The &man.netstat.1; utility now supports a option to specify + the number of outputs. This is used in conjunction with + option. + The &man.newsyslog.8; utility does not consider non-existence of a PID file as an error now. A new flag reverts it to the old behavior. @@ -715,6 +810,15 @@ to the Solaris utility of the same name, and waits for any process to terminate. + A bug in the &man.restore.8; utility which caused short + reads when a option was used has been + fixed. + + The &man.rtsold.8; flag now excludes + the interfaces which IPv6 or accepting ICMPv6 Router + Advertisement message is disabled from the auto-probed + interface list. + The &man.scandir.3; and &man.alphasort.3; functions has been updated to conform POSIX.1-2008 (IEEE Std 1003.1-2008). @@ -736,6 +840,15 @@ available memory becomes short. This kind of process termination happens in a swap-intensive workload. + The &man.strsignal.3; function is now thread-safe. + + The &man.sysctl.8; utility now supports a + flag to ignore failures while retrieving + individual OIDs. This allows the same list of OIDs to be + passed to &man.sysctl.8; across different systems where + particular OIDs may not exist, and still get as much + information as possible from them. + The &man.traceroute.8; utility now performs source address selection correctly even in a VIMAGE &man.jail.8; environment. @@ -774,11 +887,20 @@ rc.d system. A new rc.d script + rtsold has been added. This handles + &man.rtsold.8; daemon. + + A new rc.d script static_arp has been added. This allows the administrator to statically define mappings of MAC address to IPv4 at boot time. See also the &man.rc.conf.5; manual page for more details. + The &man.rc.conf.5; now supports a + firewall_coscripts variable. This should + contain a list of commands which should be excuted after + firewall starts or stops. + The &man.rc.conf.5; now supports configuring &man.vlan.4; interfaces as child devices similar to &man.wlan.4; interfaces. &man.vlan.4; interfaces are listed @@ -807,7 +929,7 @@ the 23 October 2007 release to the 26 November 2009 release. ISC BIND has been updated to - version 9.6.1-P2. + version 9.6.1-P3. netcat has been updated to version 4.6. From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 22 01:14:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D862106566C; Thu, 22 Jul 2010 01:14:34 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B8EA8FC21; Thu, 22 Jul 2010 01:14:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6M1EXY3093470; Thu, 22 Jul 2010 01:14:33 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6M1EXBN093468; Thu, 22 Jul 2010 01:14:33 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007220114.o6M1EXBN093468@svn.freebsd.org> From: Hiroki Sato Date: Thu, 22 Jul 2010 01:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210363 - stable/8/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 01:14:34 -0000 Author: hrs Date: Thu Jul 22 01:14:33 2010 New Revision: 210363 URL: http://svn.freebsd.org/changeset/base/210363 Log: Document two possible errata. Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Thu Jul 22 01:01:16 2010 (r210362) +++ stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Thu Jul 22 01:14:33 2010 (r210363) @@ -216,6 +216,17 @@ Late-Breaking News and Corrections - No news. + A deadlock can occur in UFS with the QUOTA enabled due to a + lock order reversal. This problem has been fixed in r209367 + (HEAD). An Errata Notice for &release.bugfix; is + planned. + + A legacy device detection in the &man.ata.4; can fail in + some cases. Specifically, Marvell 88SX6141 controllers can + cause attach failure or panic. This problem has been fixed in + r210168 + (HEAD). An Errata Notice for &release.bugfix; is + planned. From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 22 01:23:39 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDC6B106566C; Thu, 22 Jul 2010 01:23:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B29158FC16; Thu, 22 Jul 2010 01:23:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6M1Ndwi095558; Thu, 22 Jul 2010 01:23:39 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6M1NdVu095555; Thu, 22 Jul 2010 01:23:39 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201007220123.o6M1NdVu095555@svn.freebsd.org> From: Ed Maste Date: Thu, 22 Jul 2010 01:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210364 - stable/8/games/pom X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 01:23:40 -0000 Author: emaste Date: Thu Jul 22 01:23:39 2010 New Revision: 210364 URL: http://svn.freebsd.org/changeset/base/210364 Log: MFC r210089: Add -p option to have pom(6) print just the percentage, without extra text. PR: bin/51070 Submitted by: Matt Koivisto mkoivisto sandvine com Modified: stable/8/games/pom/pom.6 stable/8/games/pom/pom.c Directory Properties: stable/8/games/pom/ (props changed) Modified: stable/8/games/pom/pom.6 ============================================================================== --- stable/8/games/pom/pom.6 Thu Jul 22 01:14:33 2010 (r210363) +++ stable/8/games/pom/pom.6 Thu Jul 22 01:23:39 2010 (r210364) @@ -32,7 +32,7 @@ .\" @(#)pom.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd May 31, 1993 +.Dd July 14, 2010 .Dt POM 6 .UC 7 .Sh NAME @@ -40,6 +40,7 @@ .Nd display the phase of the moon .Sh SYNOPSIS .Nm +.Op Fl p .Op Fl d Ar yyyy.mm.dd .Op Fl t Ar hh:mm:ss .Sh DESCRIPTION @@ -49,6 +50,10 @@ utility displays the current phase of th Useful for selecting software completion target dates and predicting managerial behavior. .Pp +Use the +.Fl p +option to print just the phase as a percentage. +.Pp Use the arguments .Fl d and Modified: stable/8/games/pom/pom.c ============================================================================== --- stable/8/games/pom/pom.c Thu Jul 22 01:14:33 2010 (r210363) +++ stable/8/games/pom/pom.c Thu Jul 22 01:23:39 2010 (r210364) @@ -88,14 +88,17 @@ main(int argc, char **argv) time_t tt; struct tm GMT, tmd; double days, today, tomorrow; - int ch, cnt; + int ch, cnt, pflag = 0; char *odate = NULL, *otime = NULL; - while ((ch = getopt(argc, argv, "d:t:")) != -1) + while ((ch = getopt(argc, argv, "d:pt:")) != -1) switch (ch) { case 'd': odate = optarg; break; + case 'p': + pflag = 1; + break; case 't': otime = optarg; break; @@ -138,6 +141,10 @@ main(int argc, char **argv) for (cnt = EPOCH; cnt < GMT.tm_year; ++cnt) days += isleap(1900 + cnt) ? 366 : 365; today = potm(days) + .5; + if (pflag) { + (void)printf("%1.0f\n", today); + return (0); + } (void)printf("The Moon is "); if ((int)today == 100) (void)printf("Full\n"); @@ -231,6 +238,7 @@ static void usage(char *progname) { - fprintf(stderr, "Usage: %s [-d yyyy.mm.dd] [-t hh:mm:ss]\n", progname); + fprintf(stderr, "Usage: %s [-p] [-d yyyy.mm.dd] [-t hh:mm:ss]\n", + progname); exit(EX_USAGE); } From owner-svn-src-stable-8@FreeBSD.ORG Thu Jul 22 05:53:12 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B548C1065676; Thu, 22 Jul 2010 05:53:12 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9936D8FC16; Thu, 22 Jul 2010 05:53: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 o6M5rCfl055818; Thu, 22 Jul 2010 05:53:12 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6M5rCTU055816; Thu, 22 Jul 2010 05:53:12 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007220553.o6M5rCTU055816@svn.freebsd.org> From: Hiroki Sato Date: Thu, 22 Jul 2010 05:53: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: r210366 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 05:53:12 -0000 Author: hrs Date: Thu Jul 22 05:53:12 2010 New Revision: 210366 URL: http://svn.freebsd.org/changeset/base/210366 Log: New relnotes item: syscons(4) history handling improved, X86BIOS added on i386/amd64, loader(8) U-Boot storage support [powerpc], smu(4) thermal management and monitoring [powerpc], tnt4882(4) now supports TNT5004, acpi_video(4) LCD brightness control notify handler support, acpi_sony(4) now supports brightness, wired LAN power, bass gain, ath(4) supports AR9285, bge(4) ASF heartbeat sending fixed, vlan(4) IFCAP_VLAN_HWTSO, ciss(4) livelock fixed, find(1) -newerXB fixed, procstat(1) -i/-j added, and tzdata2010e. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jul 22 05:42:29 2010 (r210365) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jul 22 05:53:12 2010 (r210366) @@ -221,7 +221,7 @@ kernel configuration file and recompilation of the kernel. - Two commands to enable/disable read-ahead has been added + Two commands to enable/disable read-ahead have been added to &man.fcntl.2; system call: @@ -279,6 +279,17 @@ process usage (%CPU) from working correctly has been fixed. + The &man.syscons.4; driver has been improved. The history + buffer can be fully saved/restored in the VESA mode switching + via a loader tunable + hint.sc.0.vesa_mode. + + An x86 real mode emulator based on + OpenBSD's x86emu implementation has been added to improve real + mode BIOS call support on both &arch.i386; and &arch.amd64;. + The &man.atkbdc.4;, &man.dpms.4;, vesa(4), &man.vga.4; driver + now use this emulator and work on the both platforms. + The VIMAGE &man.jail.8; virtualization container can work with &man.sctp.4; now. Note that the VIMAGE is not enabled by default in GENERIC kernel. @@ -306,6 +317,9 @@ default value of currdev. This option can be set by the EFI boot manager. + The &man.loader.8; program now supports + U-Boot storage. + A kernel environment variable vfs.root.mountfrom now supports multiple elements for root file system in a space-separated @@ -355,6 +369,15 @@ JBus to PCIe bridge (called as Fire) found in the Sun Fire V215/V245 and Sun Ultra 25/45 machines. + The &man.smu.4; driver now provides + thermal management and monitoring features. This allows fan + control and thermal monitoring on SMU-based Apple G5 + machines, as well as an &man.led.4; interface to control the + sleep LED. + + The &man.tnt4882.4; driver for IEEE-488 (GPIB) bus now + supports National Instruments TNT5004 chip. + The &man.uart.4; driver now supports NetMos NM9865 family of Serial/Parallel ports. @@ -366,6 +389,13 @@ + The &man.acpi.video.4; driver now supports LCD + brightness control notify handler. + + The &man.acpi.sony.4; helper driver now supports + default display brightness, wired LAN power, and bass + gain. + The &man.agp.4; driver has been improved. It includes a fix for aparture size calculation issue which prevents some graphics cards from working. @@ -387,13 +417,23 @@ + The &man.ath.4; driver now supports Atheros + AR9285-based devices. + + A bug in the &man.ath.4; driver which causes a problem + of AR5416-based chipsets including AR9285 has been fixed. + The &man.bge.4; driver now supports BCM5761, BCM5784, and BCM57780-based devices. The &man.bge.4; driver now supports TSO (TCP - segmentation offloading) on BCM5755 or newer + Segmentation Offloading) on BCM5755 or newer contollers. + A long-standing bug in the &man.bge.4; driver which + was related to ASF heartbeat sending has been + fixed. + A long-standing stability issue of the &man.bce.4; and &man.bge.4; driver due to a hardware bug in its DMA handling when the system has more than 4GB memory has been @@ -539,6 +579,12 @@ The &man.vlan.4; pseudo interface has been added to GENERIC kernel. + The &man.vlan.4; pseudo interface now supports TSO (TCP + Segmentation Offloading). The capability flag is named as + IFCAP_VLAN_HWTSO and it is separated from + IFCAP_VLAN_HWTAGGING. The &man.mxge.4; + driver supports this feature. + The &man.vlan.4; pseudo interface for IEEE 802.1Q VLAN now ignore renaming of the parent's interface name. The configured VLAN interfaces continue to work with the new @@ -627,6 +673,9 @@ + A livelock issue of the &man.ciss.4; driver under a high + load has been fixed. + A bug in the &man.fdc.4; driver which prevents the kernel module from unloading has been fixed. @@ -769,6 +818,10 @@ A bug in &man.fetch.1; utility which incorrectly evaluates a variable NO_PROXY has been fixed. + A bug in &man.find.1; utility has been fixed. An option + was interpreted as the same as + . + A bug in the &man.fsck.ffs.8; utility which causes the last cylinder group of a UFS1 file system is always reported as broken even after it is fixed. @@ -806,6 +859,11 @@ The &man.ntpd.8; program no longer tries to bind to an IPv6 anycast address. + The &man.procstat.1; utility now supports two new flags + and to display + information about signal disposition and pending/blocked + status for signals. + The &man.pwait.1; utility has been added. This is similar to the Solaris utility of the same name, and waits for any process to terminate. @@ -938,7 +996,7 @@ version 8.14.4. The timezone database has been updated to the - tzdata2010b release. + tzdata2010e release. - - - - Ports/Packages Collection Infrastructure - - + tzdata2010j release. From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 23 21:51:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B2F71065670; Fri, 23 Jul 2010 21:51:42 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 085C08FC08; Fri, 23 Jul 2010 21:51:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NLpf8H027095; Fri, 23 Jul 2010 21:51:41 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NLpf3v027093; Fri, 23 Jul 2010 21:51:41 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232151.o6NLpf3v027093@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 21:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210434 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 21:51:42 -0000 Author: hrs Date: Fri Jul 23 21:51:41 2010 New Revision: 210434 URL: http://svn.freebsd.org/changeset/base/210434 Log: - Spelling correction. - Remove 64-bit quota entry; it was not merged[*]. Spotted by: kib[*] Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 21:38:26 2010 (r210433) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 21:51:41 2010 (r210434) @@ -247,7 +247,7 @@ A new kernel thread called deadlock resolver has been added. This can be used to detect possible deadlock by using information of thread state and - heuristical analysis. This is not enabled by default. To + heuristic analysis. This is not enabled by default. To enable this, an option in kernel configuration file and recompilation of the kernel. @@ -269,13 +269,13 @@ - Note that the read-ahead amount is also constrainted by + Note that the read-ahead amount is also limited by sysctl variable vfs.read_max, which may need to be raised in order to better utilize this feature. The &man.lindev.4; driver has been added. This is for - supporting various linux-specific pseudo devices such as + supporting various Linux-specific pseudo devices such as /dev/full. Note that this is not included in GENERIC kernel. @@ -444,7 +444,7 @@ gain. The &man.agp.4; driver has been improved. It includes - a fix for aparture size calculation issue which prevents + a fix for aperture size calculation issue which prevents some graphics cards from working. The &man.snd.hda.4; driver now allows AD1981HD codecs @@ -452,7 +452,7 @@ The &man.snd.hda.4; driver now supports multichannel (4.0 and 7.1) playback support. The 5.1 mode support is - disabled now due to unidentified synchonization problem. + disabled now due to unidentified synchronization problem. Devices which supports the 7.1 mode can handle the 5.1 operation via software upmix done by &man.sound.4;. Note that stereo stream is no longer duplicated to all @@ -477,7 +477,7 @@ The &man.bge.4; driver now supports TSO (TCP Segmentation Offloading) on BCM5755 or newer - contollers. + controllers. A long-standing bug in the &man.bge.4; driver which was related to ASF heartbeat sending has been @@ -514,7 +514,7 @@ filtering based on inspection of L2/L3/L4 headers. Filtering based on source IP address, destination IP address, source port number, destination port number, - 802.1q VLAN frame tag, UDP, TCP, and MAC address addr is + 802.1q VLAN frame tag, UDP, TCP, and MAC address is possible. The configuration can be done by the cxgbtool(8) utility. Note that cxgbtool(8) is in src/usr.sbin/cxgbtool but not @@ -578,7 +578,7 @@ via DHCP. The &man.re.4; driver now uses 2048 - as PCIe Maximuim Read Request Size. This improves bulk + as PCIe Maximum Read Request Size. This improves bulk transfer performance. The &man.run.4; driver for Ralink @@ -692,7 +692,7 @@ interface has changed, and lets stacked interfaces such as &man.vlan.4; detect that their lower interface has changed and adjust things in order to keep working. This fixes an - issue of &man.lagg.4; and &man.vlan.4; configulation. + issue of &man.lagg.4; and &man.vlan.4; configuration. IPcomp (IP Payload Compression Protocol defined in RFC 2393) protocol is now enabled by default. Note that this @@ -766,7 +766,7 @@ A memory alignment issue in the &man.ng.ksocket.4; and &man.ng.ppp.4;, Netgraph node drivers have been fixed. This - fixes kernel panics due to the misalightment. + fixes kernel panics due to the misalignment. The &man.ng.bridge.4; and &man.ng.hub.4; Netgraph node drivers now supports a flag persistent. @@ -831,7 +831,7 @@ The &man.ahci.4; driver now supports FIS-based (Frame Information Structure) switching of port multiplier on - supported controlers. + supported controllers. The &man.ahd.4; driver now supports three separated error counters for correctable, uncorrectable, and fatal, in @@ -997,7 +997,7 @@ kern.geom.label.gpt.enable The userland part consists of &man.hastd.8;, - &man.hastctl.8;, and &man.hast.conf.5;. More datails + &man.hastctl.8;, and &man.hast.conf.5;. More details can be found at . @@ -1060,16 +1060,6 @@ kern.geom.label.gpt.enableThe UFS file system (&man.ffs.7;) now supports NFSv4 ACL. - The UFS file system (&man.ffs.7;) now supports both - 32-bit and 64-bit &man.quota.1;. The command - quotacheck -c 64 converts the 32-bit - quota to 64-bit. Note that the traditional 32-bit quota - still works with no problem for sizes smaller than 2Tb, and - the quota subsystem is not compilied in - GENERIC kernel by default. To enable - it, an option in the kernel - configuration file and recompilation of the kernel. - &os; &man.VFS.9; subsystem now supports a new sysctl variable vfs.vlru_allow_cache_src. This allow vnlru kernel thread to reclaim @@ -1251,7 +1241,7 @@ kern.geom.label.gpt.enable The &man.ln.1; utility now removes trailing slash - characters when creating a link to a directory. The followin + characters when creating a link to a directory. The following command sequence reported an error in the previous releases: @@ -1394,7 +1384,7 @@ kern.geom.label.gpt.enableThe &man.whois.1; utility now supports searching IPv6 addresses just like IPv4 without specifying the ARIN server. - A flag has been removed becuase it is now + A flag has been removed because it is now obsolete. A new errno ENOTCAPABLE has been added. @@ -1449,7 +1439,7 @@ kern.geom.label.gpt.enableThe &man.rc.conf.5; now supports a firewall_coscripts variable. This should - contain a list of commands which should be excuted after + contain a list of commands which should be executed after firewall starts or stops. The &man.rc.conf.5; now supports configuring From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 23 22:00:20 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FCF31065670; Fri, 23 Jul 2010 22:00:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CCDA8FC18; Fri, 23 Jul 2010 22:00:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NM0KY9029141; Fri, 23 Jul 2010 22:00:20 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NM0K3L029139; Fri, 23 Jul 2010 22:00:20 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232200.o6NM0K3L029139@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 22:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210435 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 22:00:20 -0000 Author: hrs Date: Fri Jul 23 22:00:19 2010 New Revision: 210435 URL: http://svn.freebsd.org/changeset/base/210435 Log: Sort entries. Cosmetic changes only. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 21:51:41 2010 (r210434) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:00:19 2010 (r210435) @@ -241,9 +241,6 @@ - The default &man.devfs.5; rules now expose the upper 256 - of &man.pty.4; device nodes. - A new kernel thread called deadlock resolver has been added. This can be used to detect possible deadlock by using information of thread state and @@ -252,6 +249,9 @@ kernel configuration file and recompilation of the kernel. + The default &man.devfs.5; rules now expose the upper 256 + of &man.pty.4; device nodes. + Two commands to enable/disable read-ahead have been added to &man.fcntl.2; system call: @@ -287,6 +287,17 @@ INCLUDE_CONFIG_FILE has been added to GENERIC kernel by default. + A bug in the &man.sched.4bsd.4; scheduler that the + timestamp for the sleeping operation is not cleaned up on the + wakeup has been fixed. + + A race condition in the &man.sched.4bsd.4; scheduler has + been fixed. + + A bug in the &man.sched.ule.4; scheduler which prevented + process usage (%CPU) from working correctly + has been fixed. + New SDT (Statically Defined Tracing) probes such as ones for opencrypto and vnet have been added to &os; &man.dtrace.1; subsystem. @@ -299,26 +310,15 @@ &os; now supports UltraSPARC IV, IV+, and SPARC64 V CPUs. - A bug in the &man.tty.4; driver that - TIOCSTI did not work has been fixed. This - affects applications like &man.mail.1;. - - A bug in the &man.sched.4bsd.4; scheduler that the - timestamp for the sleeping operation is not cleaned up on the - wakeup has been fixed. - - A race condition in the &man.sched.4bsd.4; scheduler has - been fixed. - - A bug in the &man.sched.ule.4; scheduler which prevented - process usage (%CPU) from working correctly - has been fixed. - The &man.syscons.4; driver has been improved. The history buffer can be fully saved/restored in the VESA mode switching via a loader tunable hint.sc.0.vesa_mode. + A bug in the &man.tty.4; driver that + TIOCSTI did not work has been fixed. This + affects applications like &man.mail.1;. + An x86 real mode emulator based on OpenBSD's x86emu implementation has been added to improve real mode BIOS call support on both &arch.i386; and &arch.amd64;. @@ -355,17 +355,17 @@ The &man.loader.8; program now supports U-Boot storage. + The algorithm the &man.loader.8; uses has + been improved to choose a memory range for its heap when + using a range above 1MB. This fixes a symptom that the + loader fails to load a kernel. + A kernel environment variable vfs.root.mountfrom now supports multiple elements for root file system in a space-separated list. Each list element will be tried in order and the first available one will be mounted. - The algorithm the &man.loader.8; uses has - been improved to choose a memory range for its heap when - using a range above 1MB. This fixes a symptom that the - loader fails to load a kernel. - The zfsloader has been added. This is a separate &man.zfs.8; enabled loader. Note that a ZFS bootcode (zfsboot or @@ -402,6 +402,25 @@ JBus to PCIe bridge (called as Fire) found in the Sun Fire V215/V245 and Sun Ultra 25/45 machines. + The &man.smu.4; driver now provides + thermal management and monitoring features. This allows fan + control and thermal monitoring on SMU-based Apple G5 + machines, as well as an &man.led.4; interface to control the + sleep LED. + + The &man.tnt4882.4; driver for IEEE-488 (GPIB) bus now + supports National Instruments TNT5004 chip. + + The &man.uart.4; driver now supports NetMos NM9865 + family of Serial/Parallel ports. + + The &man.uep.4; driver for USB onscreen touch panel + from eGalax has been added. This driver is supported by + x11-drivers/xf86-input-egalax. + + A bug in the &man.uftdi.4; driver that can allow to send + a zero length packet has been fixed. + The &man.usb.4; subsystem now reports &man.devd.8; notify events with the device properties instead of attach events. The following is an @@ -418,21 +437,6 @@ action "/path/to/command -flag"; }; - The &man.smu.4; driver now provides - thermal management and monitoring features. This allows fan - control and thermal monitoring on SMU-based Apple G5 - machines, as well as an &man.led.4; interface to control the - sleep LED. - - The &man.tnt4882.4; driver for IEEE-488 (GPIB) bus now - supports National Instruments TNT5004 chip. - - The &man.uart.4; driver now supports NetMos NM9865 - family of Serial/Parallel ports. - - A bug in the &man.uftdi.4; driver that can allow to send - a zero length packet has been fixed. - Multimedia Support @@ -457,10 +461,6 @@ operation via software upmix done by &man.sound.4;. Note that stereo stream is no longer duplicated to all ports. - - The &man.uep.4; driver for USB onscreen touch panel - from eGalax has been added. This driver is supported by - x11-drivers/xf86-input-egalax. @@ -520,12 +520,12 @@ src/usr.sbin/cxgbtool but not compilied by default. - The et(4) driver now supports MSI and Tx checksum - offloading of IPv4, TCP, and UDP. - The &man.em.4; driver has been updated to version 7.0.0. + The et(4) driver now supports MSI and Tx checksum + offloading of IPv4, TCP, and UDP. + The &man.fxp.4; driver now exports the hardware MAC statistics via sysctl variables. @@ -881,18 +881,22 @@ &man.cam.3; to wait, while CD drive loads disk, instead of immediately return error status. - - The &man.cam.4; ATA transport layer now supports - Power-Up In Stand-by (PUIS). The PUIS is a configuration of - SATA or PATA drives to prevent them from automatic spin-up - when power is applied. A typical application is staggered - spin-up. - - The &man.cam.4; ATA transport layer now supports - negotiating and enabling additional SATA features such as - device initiated power management, Automatic Partial to - Slumber mode transition, and DMA auto-activation. + + The &man.cam.4; ATA transport layer now supports + Power-Up In Stand-by (PUIS). The PUIS is a configuration of + SATA or PATA drives to prevent them from automatic spin-up + when power is applied. A typical application is staggered + spin-up. + + + + The &man.cam.4; ATA transport layer now supports + negotiating and enabling additional SATA features such as + device initiated power management, Automatic Partial to + Slumber mode transition, and DMA auto-activation. + + A livelock issue of the &man.ciss.4; driver under a high load has been fixed. From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 23 22:18:05 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E36F01065676; Fri, 23 Jul 2010 22:18:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1D908FC18; Fri, 23 Jul 2010 22:18:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NMI5xM033255; Fri, 23 Jul 2010 22:18:05 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NMI58v033253; Fri, 23 Jul 2010 22:18:05 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232218.o6NMI58v033253@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 22:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210436 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 22:18:06 -0000 Author: hrs Date: Fri Jul 23 22:18:05 2010 New Revision: 210436 URL: http://svn.freebsd.org/changeset/base/210436 Log: Fix a typo. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:00:19 2010 (r210435) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:18:05 2010 (r210436) @@ -973,7 +973,7 @@ kern.geom.label.gpt.enable - The HAST (Highly Avalable STorage) franework has been + The HAST (Highly Avalable STorage) framework has been added: From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 23 22:20:26 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B91311065677; Fri, 23 Jul 2010 22:20:26 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A74AC8FC24; Fri, 23 Jul 2010 22: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 o6NMKQJr033836; Fri, 23 Jul 2010 22:20:26 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NMKQZm033834; Fri, 23 Jul 2010 22:20:26 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232220.o6NMKQZm033834@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 22: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: r210437 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 22:20:26 -0000 Author: hrs Date: Fri Jul 23 22:20:26 2010 New Revision: 210437 URL: http://svn.freebsd.org/changeset/base/210437 Log: Fix a typo. Spotted by: np Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:18:05 2010 (r210436) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:20:26 2010 (r210437) @@ -518,7 +518,7 @@ possible. The configuration can be done by the cxgbtool(8) utility. Note that cxgbtool(8) is in src/usr.sbin/cxgbtool but not - compilied by default. + compiled by default. The &man.em.4; driver has been updated to version 7.0.0. From owner-svn-src-stable-8@FreeBSD.ORG Fri Jul 23 22:49:25 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0EB81065673; Fri, 23 Jul 2010 22:49:25 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF3AD8FC0C; Fri, 23 Jul 2010 22:49:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NMnPLo040544; Fri, 23 Jul 2010 22:49:25 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NMnP62040542; Fri, 23 Jul 2010 22:49:25 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232249.o6NMnP62040542@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 22:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210439 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 22:49:26 -0000 Author: hrs Date: Fri Jul 23 22:49:25 2010 New Revision: 210439 URL: http://svn.freebsd.org/changeset/base/210439 Log: Add ale(4) to the IFCAP_VLAN_HWTSO-supported device list. Spotted by: yongari Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:24:25 2010 (r210438) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:49:25 2010 (r210439) @@ -800,9 +800,9 @@ Segmentation Offloading). The capability flag is named as IFCAP_VLAN_HWTSO and it is separated from IFCAP_VLAN_HWTAGGING. The &man.age.4;, - &man.alc.4;, &man.bce.4;, &man.bge.4;, &man.cxgb.4;, &man.jme.4;, - &man.re.4;, and &man.mxge.4; driver support this - feature. + &man.alc.4;, &man.ale.4;, &man.bce.4;, &man.bge.4;, + &man.cxgb.4;, &man.jme.4;, &man.re.4;, and &man.mxge.4; + driver support this feature. The &man.vlan.4; pseudo interface for IEEE 802.1Q VLAN now ignore renaming of the parent's interface name. The From owner-svn-src-stable-8@FreeBSD.ORG Sat Jul 24 01:52:28 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD180106566B; Sat, 24 Jul 2010 01:52:28 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC7528FC16; Sat, 24 Jul 2010 01:52:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6O1qShl081761; Sat, 24 Jul 2010 01:52:28 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6O1qSUr081728; Sat, 24 Jul 2010 01:52:28 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201007240152.o6O1qSUr081728@svn.freebsd.org> From: Ken Smith Date: Sat, 24 Jul 2010 01: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: r210441 - stable/8/sys/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 01:52:29 -0000 Author: kensmith Date: Sat Jul 24 01:52:26 2010 New Revision: 210441 URL: http://svn.freebsd.org/changeset/base/210441 Log: Shift to -STABLE now that 8.1-RELEASE is done. Modified: stable/8/sys/conf/newvers.sh Modified: stable/8/sys/conf/newvers.sh ============================================================================== --- stable/8/sys/conf/newvers.sh Fri Jul 23 23:58:57 2010 (r210440) +++ stable/8/sys/conf/newvers.sh Sat Jul 24 01:52:26 2010 (r210441) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.1" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-8@FreeBSD.ORG Sat Jul 24 11:15:41 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BF7F1065670; Sat, 24 Jul 2010 11:15:41 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF50A8FC19; Sat, 24 Jul 2010 11:15:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OBFeec007679; Sat, 24 Jul 2010 11:15:40 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OBFeaO007678; Sat, 24 Jul 2010 11:15:40 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007241115.o6OBFeaO007678@svn.freebsd.org> From: Benedict Reuschling Date: Sat, 24 Jul 2010 11:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210445 - stable/8/lib/libarchive X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 11:15:41 -0000 Author: bcr (doc committer) Date: Sat Jul 24 11:15:40 2010 New Revision: 210445 URL: http://svn.freebsd.org/changeset/base/210445 Log: MFC r210191: s/an struct/a struct PR: docs/148660 Submitted by: Warren Block (wblock at wonkity dot com) Reviewed by: Tim Kientzle Mentored by: jkois Modified: stable/8/lib/libarchive/libarchive.3 Directory Properties: stable/8/lib/libarchive/ (props changed) Modified: stable/8/lib/libarchive/libarchive.3 ============================================================================== --- stable/8/lib/libarchive/libarchive.3 Sat Jul 24 10:49:59 2010 (r210444) +++ stable/8/lib/libarchive/libarchive.3 Sat Jul 24 11:15:40 2010 (r210445) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2006 +.Dd July 17, 2010 .Dt LIBARCHIVE 3 .Os .Sh NAME @@ -158,7 +158,7 @@ Each archive entry consists of a header amount of data. You can obtain the next header with .Fn archive_read_next_header , -which returns a pointer to an +which returns a pointer to a .Tn struct archive_entry structure with information about the current archive element. If the entry is a regular file, then the header will be followed @@ -324,7 +324,7 @@ or the arbitrary key/value pairs that ca pax interchange format archives. .Pp Conversely, of course, not all of the information that can be -stored in an +stored in a .Tn struct archive_entry is supported by all formats. For example, cpio formats do not support nanosecond timestamps; From owner-svn-src-stable-8@FreeBSD.ORG Sat Jul 24 17:44:32 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D9551065673; Sat, 24 Jul 2010 17:44:32 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91D6A8FC12; Sat, 24 Jul 2010 17:44:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OHiV8j092811; Sat, 24 Jul 2010 17:44:31 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OHiVEG092809; Sat, 24 Jul 2010 17:44:31 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007241744.o6OHiVEG092809@svn.freebsd.org> From: Hiroki Sato Date: Sat, 24 Jul 2010 17:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210449 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 17:44:32 -0000 Author: hrs Date: Sat Jul 24 17:44:31 2010 New Revision: 210449 URL: http://svn.freebsd.org/changeset/base/210449 Log: Fix typos. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Jul 24 15:37:36 2010 (r210448) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Jul 24 17:44:31 2010 (r210449) @@ -521,7 +521,7 @@ compiled by default. The &man.em.4; driver has been updated to version - 7.0.0. + 7.0.5. The et(4) driver now supports MSI and Tx checksum offloading of IPv4, TCP, and UDP. @@ -530,7 +530,7 @@ statistics via sysctl variables. The &man.igb.4; driver has been updated to version - 1.9.3. + 1.9.5. The &man.iwn.4; driver has been updated. This includes various improvements and bugfixes regarding RF @@ -667,7 +667,7 @@ supports RTL8187B-based devices. The &os; Xen netfront driver has been improved in - stability and performance./para> + stability and performance. @@ -973,7 +973,7 @@ kern.geom.label.gpt.enable - The HAST (Highly Avalable STorage) framework has been + The HAST (Highly Available STorage) framework has been added: @@ -1100,7 +1100,7 @@ kern.geom.label.gpt.enable - ZFS prefech statistics has been added as a sysctl + ZFS prefetch statistics has been added as a sysctl variable kstat.zfs.misc.zfetchstats. From owner-svn-src-stable-8@FreeBSD.ORG Sat Jul 24 18:05:11 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B3AA1065670; Sat, 24 Jul 2010 18:05:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC728FC0A; Sat, 24 Jul 2010 18:05: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 o6OI5Bpd097395; Sat, 24 Jul 2010 18:05:11 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OI5BlN097393; Sat, 24 Jul 2010 18:05:11 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007241805.o6OI5BlN097393@svn.freebsd.org> From: Hiroki Sato Date: Sat, 24 Jul 2010 18:05: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: r210450 - stable/8/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 18:05:11 -0000 Author: hrs Date: Sat Jul 24 18:05:10 2010 New Revision: 210450 URL: http://svn.freebsd.org/changeset/base/210450 Log: Trim SA list. Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Sat Jul 24 17:44:31 2010 (r210449) +++ stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Sat Jul 24 18:05:10 2010 (r210450) @@ -124,6 +124,9 @@ Security Advisories + No advisory. + + From owner-svn-src-stable-8@FreeBSD.ORG Sat Jul 24 18:54:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DC54106564A; Sat, 24 Jul 2010 18:54:57 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95FC38FC19; Sat, 24 Jul 2010 18:54:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OIsv2O008683; Sat, 24 Jul 2010 18:54:57 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OIsvsx008681; Sat, 24 Jul 2010 18:54:57 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201007241854.o6OIsvsx008681@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 24 Jul 2010 18:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210453 - stable/8/sys/fs/pseudofs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 18:54:57 -0000 Author: jh Date: Sat Jul 24 18:54:57 2010 New Revision: 210453 URL: http://svn.freebsd.org/changeset/base/210453 Log: MFC r202783: Truncate read request rather than returning EIO if the request is larger than MAXPHYS + 1. This fixes a problem with cat(1) when it uses a large I/O buffer. Modified: stable/8/sys/fs/pseudofs/pseudofs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- stable/8/sys/fs/pseudofs/pseudofs_vnops.c Sat Jul 24 18:53:46 2010 (r210452) +++ stable/8/sys/fs/pseudofs/pseudofs_vnops.c Sat Jul 24 18:54:57 2010 (r210453) @@ -637,10 +637,8 @@ pfs_read(struct vop_read_args *va) error = EINVAL; goto ret; } - if (buflen > MAXPHYS + 1) { - error = EIO; - goto ret; - } + if (buflen > MAXPHYS + 1) + buflen = MAXPHYS + 1; sb = sbuf_new(sb, NULL, buflen, 0); if (sb == NULL) {