From owner-svn-src-stable@FreeBSD.ORG Sun Nov 23 00:16:10 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90CDD1065670; Sun, 23 Nov 2008 00:16:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B6228FC0C; Sun, 23 Nov 2008 00:16:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAN0GAKX033235; Sun, 23 Nov 2008 00:16:10 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAN0GA7x033233; Sun, 23 Nov 2008 00:16:10 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200811230016.mAN0GA7x033233@svn.freebsd.org> From: Xin LI Date: Sun, 23 Nov 2008 00:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185192 - in stable/7/sbin/geom: . class/part misc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2008 00:16:10 -0000 Author: delphij Date: Sun Nov 23 00:16:10 2008 New Revision: 185192 URL: http://svn.freebsd.org/changeset/base/185192 Log: MFC r185038,185044,185046: Automatically pad gptboot, style for include files, use humanize_number() for consistency and reduce code duplication. Approved by: re (kib) Modified: stable/7/sbin/geom/ (props changed) stable/7/sbin/geom/class/part/ (props changed) stable/7/sbin/geom/class/part/Makefile stable/7/sbin/geom/class/part/geom_part.c stable/7/sbin/geom/misc/ (props changed) Modified: stable/7/sbin/geom/class/part/Makefile ============================================================================== --- stable/7/sbin/geom/class/part/Makefile Sun Nov 23 00:13:25 2008 (r185191) +++ stable/7/sbin/geom/class/part/Makefile Sun Nov 23 00:16:10 2008 (r185192) @@ -4,6 +4,8 @@ CLASS= part +LDADD= -lutil + WARNS?= 4 .include Modified: stable/7/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/7/sbin/geom/class/part/geom_part.c Sun Nov 23 00:13:25 2008 (r185191) +++ stable/7/sbin/geom/class/part/geom_part.c Sun Nov 23 00:16:10 2008 (r185192) @@ -27,19 +27,21 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include +#include + +#include #include +#include #include -#include -#include #include +#include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "core/geom.h" #include "misc/subr.h" @@ -202,21 +204,12 @@ find_provider(struct ggeom *gp, unsigned } static const char * -fmtsize(long double rawsz) +fmtsize(int64_t rawsz) { - static char buf[32]; - static const char *sfx[] = { "B", "KB", "MB", "GB", "TB" }; - long double sz; - int sfxidx; - - sfxidx = 0; - sz = (long double)rawsz; - while (sfxidx < 4 && sz > 1099.0) { - sz /= 1000; - sfxidx++; - } + static char buf[5]; - sprintf(buf, "%.1Lf%s", sz, sfx[sfxidx]); + humanize_number(buf, sizeof(buf), rawsz, "", HN_AUTOSCALE, + HN_B | HN_NOSPACE | HN_DECIMAL); return (buf); } @@ -386,6 +379,8 @@ gpart_write_partcode(struct gctl_req *re struct ggeom *gp; struct gprovider *pp; const char *s; + char *buf; + off_t bsize; int error, fd; s = gctl_get_ascii(req, "class"); @@ -421,8 +416,21 @@ gpart_write_partcode(struct gctl_req *re errx(EXIT_FAILURE, "%s: not enough space", dsf); if (lseek(fd, 0, SEEK_SET) != 0) err(EXIT_FAILURE, "%s", dsf); - if (write(fd, code, size) != size) + + /* + * When writing to a disk device, the write must be + * sector aligned and not write to any partial sectors, + * so round up the buffer size to the next sector and zero it. + */ + bsize = (size + pp->lg_sectorsize - 1) / + pp->lg_sectorsize * pp->lg_sectorsize; + buf = calloc(1, bsize); + if (buf == NULL) + err(EXIT_FAILURE, "%s", dsf); + bcopy(code, buf, size); + if (write(fd, buf, bsize) != bsize) err(EXIT_FAILURE, "%s", dsf); + free(buf); close(fd); } else errx(EXIT_FAILURE, "invalid partition index"); From owner-svn-src-stable@FreeBSD.ORG Sun Nov 23 16:08:36 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77C7C1065674; Sun, 23 Nov 2008 16:08:36 +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 69DAE8FC14; Sun, 23 Nov 2008 16:08:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mANG8aee056632; Sun, 23 Nov 2008 16:08:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mANG8aPg056631; Sun, 23 Nov 2008 16:08:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200811231608.mANG8aPg056631@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 23 Nov 2008 16:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185210 - in stable/7/sys: . modules/cxgb vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2008 16:08:36 -0000 Author: kib Date: Sun Nov 23 16:08:36 2008 New Revision: 185210 URL: http://svn.freebsd.org/changeset/base/185210 Log: MFC r185012: Instead of forcing vn_start_write() to reset mp back to NULL for the failed calls with non-NULL vp, explicitely clear mp after failure. Approved by: re (kensmith) PR: 123768 Modified: stable/7/sys/ (props changed) stable/7/sys/modules/cxgb/ (props changed) stable/7/sys/vm/vm_pageout.c Modified: stable/7/sys/vm/vm_pageout.c ============================================================================== --- stable/7/sys/vm/vm_pageout.c Sun Nov 23 16:06:41 2008 (r185209) +++ stable/7/sys/vm/vm_pageout.c Sun Nov 23 16:08:36 2008 (r185210) @@ -947,8 +947,7 @@ rescan0: vp = object->handle; if (vp->v_type == VREG && vn_start_write(vp, &mp, V_NOWAIT) != 0) { - KASSERT(mp == NULL, - ("vm_pageout_scan: mp != NULL")); + mp = NULL; ++pageout_lock_miss; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; From owner-svn-src-stable@FreeBSD.ORG Sun Nov 23 17:10:05 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CF30106564A; Sun, 23 Nov 2008 17:10:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E0B38FC19; Sun, 23 Nov 2008 17:10:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mANHA5p2057969; Sun, 23 Nov 2008 17:10:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mANHA5bx057968; Sun, 23 Nov 2008 17:10:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200811231710.mANHA5bx057968@svn.freebsd.org> From: Marius Strobl Date: Sun, 23 Nov 2008 17:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185212 - stable/7/share/man/man9 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2008 17:10:05 -0000 Author: marius Date: Sun Nov 23 17:10:04 2008 New Revision: 185212 URL: http://svn.freebsd.org/changeset/base/185212 Log: MFC: r185004 - For maximum flexibility, sparc64 supports BUS_DMA_COHERENT also with bus_dmamap_create() and not only bus_dmamem_alloc() so move the description of this flag up accordingly in order to document this fact. While at it, refine this description with an application example. - Reword the description of BUS_DMA_NOCACHE as this flag is also implemented on sparc64. Approved by: re (kib) Modified: stable/7/share/man/man9/ (props changed) stable/7/share/man/man9/bus_dma.9 Modified: stable/7/share/man/man9/bus_dma.9 ============================================================================== --- stable/7/share/man/man9/bus_dma.9 Sun Nov 23 16:44:49 2008 (r185211) +++ stable/7/share/man/man9/bus_dma.9 Sun Nov 23 17:10:04 2008 (r185212) @@ -60,7 +60,7 @@ .\" $FreeBSD$ .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $ .\" -.Dd March 6, 2007 +.Dd November 16, 2008 .Dt BUS_DMA 9 .Os .Sh NAME @@ -474,9 +474,23 @@ Arguments are as follows: .It Fa dmat DMA tag. .It Fa flags -The value of this argument is currently undefined and should be -specified as -.Ql 0 . +Are as follows: +.Bl -tag -width ".Dv BUS_DMA_COHERENT" +.It Dv BUS_DMA_COHERENT +Attempt to map the memory loaded with this map such that cache sync +operations are as cheap as possible. +This flag is typically set on maps when the memory loaded with these will +be accessed by both a CPU and a DMA engine, frequently such as control data +and as opposed to streamable data such as receive and transmit buffers. +Use of this flag does not remove the requirement of using +.Fn bus_dmamap_sync , +but it may reduce the cost of performing these operations. +For +.Fn bus_dmamap_create , +the +.Dv BUS_DMA_COHERENT +flag is currently implemented on sparc64. +.El .It Fa mapp Pointer to a .Vt bus_dmamap_t @@ -542,9 +556,11 @@ and instead should return immediately wi The allocated memory will not be cached in the processor caches. All memory accesses appear on the bus and are executed without reordering. -Currently the flag is implemented for i386 and amd64 architectures -only, where it results in the Strong Uncacheable -PAT to be set for the allocated virtual address range. +On the amd64 and i386 architectures this flag results in the +Strong Uncacheable PAT to be set for the allocated virtual address range. +The +.Dv BUS_DMA_NOCACHE +flag is currently implemented on amd64, i386 and sparc64. .El .El .Pp @@ -749,16 +765,15 @@ If resources are not available, .Dv ENOMEM is returned. .It Dv BUS_DMA_COHERENT -Attempt to map this memory such that cache sync operations are -as cheap as possible. -This flag is typically set on memory that will be accessed by both -a CPU and a DMA engine, frequently. -Use of this flag does not remove the requirement of using -bus_dmamap_sync, but it may reduce the cost of performing -these operations. -The +Attempt to map this memory in a coherent fashion. +See +.Fn bus_dmamap_create +above for a description of this flag. +For +.Fn bus_dmamem_alloc , +the .Dv BUS_DMA_COHERENT -flag is currently implemented on sparc64 and arm. +flag is currently implemented on arm and sparc64. .It Dv BUS_DMA_ZERO Causes the allocated memory to be set to all zeros. .El From owner-svn-src-stable@FreeBSD.ORG Sun Nov 23 17:34:00 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 376B3106567C; Sun, 23 Nov 2008 17:34:00 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27DE78FC17; Sun, 23 Nov 2008 17:34:00 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mANHY0vk058472; Sun, 23 Nov 2008 17:34:00 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mANHY0Q1058471; Sun, 23 Nov 2008 17:34:00 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200811231734.mANHY0Q1058471@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 23 Nov 2008 17:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185213 - stable/6/sys/dev/puc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2008 17:34:00 -0000 Author: marcel Date: Sun Nov 23 17:33:59 2008 New Revision: 185213 URL: http://svn.freebsd.org/changeset/base/185213 Log: Correct the Device ID of the NetMos quad UART. PR: 128931 Approved by: re (kensmith) Modified: stable/6/sys/dev/puc/pucdata.c Modified: stable/6/sys/dev/puc/pucdata.c ============================================================================== --- stable/6/sys/dev/puc/pucdata.c Sun Nov 23 17:10:04 2008 (r185212) +++ stable/6/sys/dev/puc/pucdata.c Sun Nov 23 17:33:59 2008 (r185213) @@ -955,7 +955,7 @@ const struct puc_device_description puc_ /* NetMos 4S0P PCI: 4S, 0P */ { "NetMos NM9845 Quad UART", - { 0x9710, 0x9845, 0, 0x0014 }, + { 0x9710, 0x9845, 0, 0x0004 }, { 0xffff, 0xffff, 0, 0xffff }, { { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, From owner-svn-src-stable@FreeBSD.ORG Sun Nov 23 18:50:44 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CB69106564A; Sun, 23 Nov 2008 18:50:44 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout013.mac.com (asmtpout013.mac.com [17.148.16.88]) by mx1.freebsd.org (Postfix) with ESMTP id 369DE8FC13; Sun, 23 Nov 2008 18:50:44 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed Received: from [192.168.1.95] (209-128-86-226.BAYAREA.NET [209.128.86.226]) by asmtp013.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KAS00MKDS8HAQ00@asmtp013.mac.com>; Sun, 23 Nov 2008 09:50:44 -0800 (PST) Message-id: <441DF4B4-CD86-4769-A6D3-27D1010E1DE0@mac.com> From: Marcel Moolenaar To: Xin LI In-reply-to: <200811230016.mAN0GA7x033233@svn.freebsd.org> Date: Sun, 23 Nov 2008 09:50:41 -0800 References: <200811230016.mAN0GA7x033233@svn.freebsd.org> X-Mailer: Apple Mail (2.929.2) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r185192 - in stable/7/sbin/geom: . class/part misc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2008 18:50:44 -0000 On Nov 22, 2008, at 4:16 PM, Xin LI wrote: > Author: delphij > Date: Sun Nov 23 00:16:10 2008 > New Revision: 185192 > URL: http://svn.freebsd.org/changeset/base/185192 > > Log: > MFC r185038,185044,185046: Thanks! -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 00:52:26 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA1E61065670; Mon, 24 Nov 2008 00:52:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A376B8FC0A; Mon, 24 Nov 2008 00:52:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAO0qQpc069102; Mon, 24 Nov 2008 00:52:26 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAO0qQ3H069096; Mon, 24 Nov 2008 00:52:26 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811240052.mAO0qQ3H069096@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Nov 2008 00:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185238 - in stable/7/sys: . amd64/conf boot/forth conf dev/ale i386/conf modules modules/ale modules/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 00:52:26 -0000 Author: yongari Date: Mon Nov 24 00:52:26 2008 New Revision: 185238 URL: http://svn.freebsd.org/changeset/base/185238 Log: MFC r184870: Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet controller. The controller is also known as L1E(AR8121) and L2E(AR8113/AR8114). Unlike its predecessor Attansic L1, AR8121/AR8113/AR8114 uses completely different Rx logic such that it requires separate driver. Datasheet for AR81xx is not available to open source driver writers but it shares large part of Tx and PHY logic of L1. I still don't understand some part of register meaning and some MAC statistics counters but the driver seems to have no critical issues for performance and stability. The AR81xx requires copy operation to pass received frames to upper stack such that ale(4) consumes a lot of CPU cycles than that of other controller. A couple of silicon bugs also adds more CPU cycles to address the known hardware bug. However, if you have fast CPU you can still saturate the link. Currently ale(4) supports the following hardware features. - MSI. - TCP Segmentation offload. - Hardware VLAN tag insertion/stripping with checksum offload. - Tx TCP/UDP checksum offload and Rx IP/TCP/UDP checksum offload. - Tx/Rx interrupt moderation. - Hardware statistics counters. - Jumbo frame. - WOL. AR81xx PCIe ethernet controllers are mainly found on ASUS EeePC or P5Q series of ASUS motherboards. Special thanks to Jeremy Chadwick who sent the hardware to me. Without his donation writing a driver for AR81xx would never have been possible. Big thanks to all people who reported feedback or tested patches. HW donated by: koitsu Tested by: bsam, Joao Barros gmail DOT com > Jan Henrik Sylvester janh DOT de > Ivan Brawley < ivan <> brawley DOT id DOT au >, CURRENT ML Approved by: re (kib) Note, GENERIC kernel does NOT include ale(4) but users can still kldload it. It was requested by re. Added: stable/7/sys/dev/ale/ - copied from r184870, head/sys/dev/ale/ stable/7/sys/modules/ale/ - copied from r184870, head/sys/modules/ale/ Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/conf/GENERIC stable/7/sys/boot/forth/loader.conf stable/7/sys/conf/NOTES stable/7/sys/conf/files stable/7/sys/i386/conf/GENERIC stable/7/sys/modules/Makefile stable/7/sys/modules/cxgb/ (props changed) Modified: stable/7/sys/amd64/conf/GENERIC ============================================================================== --- stable/7/sys/amd64/conf/GENERIC Sun Nov 23 23:26:12 2008 (r185237) +++ stable/7/sys/amd64/conf/GENERIC Mon Nov 24 00:52:26 2008 (r185238) @@ -194,6 +194,7 @@ device vx # 3Com 3c590, 3c595 (``Vorte # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device age # Attansic/Atheros L1 Gigabit Ethernet +#device ale # Atheros AR8121/AR8113/AR8114 Ethernet device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet Modified: stable/7/sys/boot/forth/loader.conf ============================================================================== --- stable/7/sys/boot/forth/loader.conf Sun Nov 23 23:26:12 2008 (r185237) +++ stable/7/sys/boot/forth/loader.conf Mon Nov 24 00:52:26 2008 (r185238) @@ -208,6 +208,7 @@ pf_load="NO" # packet filter miibus_load="NO" # miibus support, needed for some drivers if_age_load="NO" # Attansic/Atheros L1 Gigabit Ethernet +if_ale_load="NO" # Atheros AR8121/AR8113/AR8114 Ethernet if_an_load="NO" # Aironet 4500/4800 802.11 wireless NICs if_ar_load="NO" # Digi SYNC/570i if_arl_load="NO" # Aironet Arlan 655 wireless network adapter Modified: stable/7/sys/conf/NOTES ============================================================================== --- stable/7/sys/conf/NOTES Sun Nov 23 23:26:12 2008 (r185237) +++ stable/7/sys/conf/NOTES Mon Nov 24 00:52:26 2008 (r185238) @@ -1724,6 +1724,7 @@ device miibus # Harris (Intersil) Chipset with PCnetMobile firmware by AMD. # age: Support for gigabit ethernet adapters based on the Attansic/Atheros # L1 PCI express gigabit ethernet controllers. +# ale: Support for Atheros AR8121/AR8113/AR8114 PCIe ethernet controllers. # bce: Broadcom NetXtreme II (BCM5706/BCM5708) PCI/PCIe Gigabit Ethernet # adapters. # bfe: Broadcom BCM4401 Ethernet adapter. @@ -1868,6 +1869,7 @@ device xe # PCI Ethernet NICs that use the common MII bus controller code. device ae # Attansic/Atheros L2 FastEthernet device age # Attansic/Atheros L1 Gigabit Ethernet +device ale # Atheros AR8121/AR8113/AR8114 Ethernet device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Sun Nov 23 23:26:12 2008 (r185237) +++ stable/7/sys/conf/files Mon Nov 24 00:52:26 2008 (r185238) @@ -446,6 +446,7 @@ dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci +dev/ale/if_ale.c optional ale pci dev/amd/amd.c optional amd dev/amr/amr.c optional amr dev/amr/amr_cam.c optional amr Modified: stable/7/sys/i386/conf/GENERIC ============================================================================== --- stable/7/sys/i386/conf/GENERIC Sun Nov 23 23:26:12 2008 (r185237) +++ stable/7/sys/i386/conf/GENERIC Mon Nov 24 00:52:26 2008 (r185238) @@ -204,6 +204,7 @@ device vx # 3Com 3c590, 3c595 (``Vorte # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device age # Attansic/Atheros L1 Gigabit Ethernet +#device ale # Atheros AR8121/AR8113/AR8114 Ethernet device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Sun Nov 23 23:26:12 2008 (r185237) +++ stable/7/sys/modules/Makefile Mon Nov 24 00:52:26 2008 (r185238) @@ -17,6 +17,7 @@ SUBDIR= ${_3dfx} \ aic7xxx \ aio \ ${_amd} \ + ale \ amr \ ${_an} \ ${_aout} \ From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 00:56:20 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0540106564A; Mon, 24 Nov 2008 00:56:20 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB8FF8FC16; Mon, 24 Nov 2008 00:56:20 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAO0uJWF069239; Mon, 24 Nov 2008 00:56:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAO0uJDJ069238; Mon, 24 Nov 2008 00:56:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811240056.mAO0uJDJ069238@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Nov 2008 00:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185239 - stable/7/usr.sbin/sysinstall X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 00:56:21 -0000 Author: yongari Date: Mon Nov 24 00:56:19 2008 New Revision: 185239 URL: http://svn.freebsd.org/changeset/base/185239 Log: MFC r184871: Add ale(4) to the list of supported network interface. Approved by: re (kib) Modified: stable/7/usr.sbin/sysinstall/ (props changed) stable/7/usr.sbin/sysinstall/devices.c Modified: stable/7/usr.sbin/sysinstall/devices.c ============================================================================== --- stable/7/usr.sbin/sysinstall/devices.c Mon Nov 24 00:52:26 2008 (r185238) +++ stable/7/usr.sbin/sysinstall/devices.c Mon Nov 24 00:56:19 2008 (r185239) @@ -95,6 +95,7 @@ static struct _devname { SERIAL("cuad%d", "%s on device %s (COM%d)", 16), NETWORK("ae", "Attansic/Atheros L2 FastEthernet"), NETWORK("age", "Attansic/Atheros L1 Gigabit Ethernet"), + NETWORK("ale", "Atheros AR8121/AR8113/AR8114 PCIe Ethernet"), NETWORK("an", "Aironet 4500/4800 802.11 wireless adapter"), NETWORK("ath", "Atheros IEEE 802.11 wireless adapter"), NETWORK("aue", "ADMtek USB Ethernet adapter"), From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 01:00:37 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6034C1065673; Mon, 24 Nov 2008 01:00:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 499DF8FC0C; Mon, 24 Nov 2008 01:00:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAO10bLJ069414; Mon, 24 Nov 2008 01:00:37 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAO10b9M069409; Mon, 24 Nov 2008 01:00:37 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811240100.mAO10b9M069409@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Nov 2008 01:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185240 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 01:00:37 -0000 Author: yongari Date: Mon Nov 24 01:00:36 2008 New Revision: 185240 URL: http://svn.freebsd.org/changeset/base/185240 Log: MFC r184872-184873: Add ale(4) man page and hook up ale(4) to the build. Also add Xr to appropriate man pages. Approved by: re (kib) Added: stable/7/share/man/man4/ale.4 - copied unchanged from r184872, head/share/man/man4/ale.4 Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/Makefile stable/7/share/man/man4/altq.4 stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/miibus.4 stable/7/share/man/man4/vlan.4 Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Mon Nov 24 00:56:19 2008 (r185239) +++ stable/7/share/man/man4/Makefile Mon Nov 24 01:00:36 2008 (r185240) @@ -16,6 +16,7 @@ MAN= aac.4 \ ahc.4 \ ahd.4 \ aio.4 \ + ale.4 \ altq.4 \ amd.4 \ ${_amdsmb.4} \ Copied: stable/7/share/man/man4/ale.4 (from r184872, head/share/man/man4/ale.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man4/ale.4 Mon Nov 24 01:00:36 2008 (r185240, copy of r184872, head/share/man/man4/ale.4) @@ -0,0 +1,162 @@ +.\" Copyright (c) 2008 Pyun YongHyeon +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 12, 2008 +.Dt ALE 4 +.Os +.Sh NAME +.Nm ale +.Nd Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device miibus" +.Cd "device ale" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ale_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for Atheros AR8121 PCI Express +Gigabit Ethernet controller and Atheros AR8113/AR8114 PCI +Express Fast Ethernet controllers. +.Pp +All LOMs supported by the +.Nm +driver have TCP/UDP/IP checksum offload for both receive and transmit, +TCP segmentation offload (TSO), hardware VLAN tag stripping/insertion +features, Wake On Lan (WOL) and an interrupt coalescing/moderation +mechanism as well as a 64-bit multicast hash filter. +.Pp +The AR8121 also supports Jumbo Frames (up to 8132 bytes), which can +be configured via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +.Pp +The +.Nm +driver supports the following media types: +.Bl -tag -width ".Cm 10baseT/UTP" +.It Cm autoselect +Enable autoselection of the media type and options. +The user can manually override +the autoselected mode by adding media options to +.Xr rc.conf 5 . +.It Cm 10baseT/UTP +Set 10Mbps operation. +.It Cm 100baseTX +Set 100Mbps (Fast Ethernet) operation. +.It Cm 1000baseTX +Set 1000baseTX operation over twisted pair. +.El +.Pp +The +.Nm +driver supports the following media options: +.Bl -tag -width ".Cm full-duplex" +.It Cm full-duplex +Force full duplex operation. +.It Cm half-duplex +Force half duplex operation. +.El +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +device driver provides support for the following Ethernet controllers: +.Pp +.Bl -bullet -compact +.It +Atheros AR8113 PCI Express Fast Ethernet controller +.It +Atheros AR8114 PCI Express Fast Ethernet controller +.It +Atheros AR8121 PCI Express Gigabit Ethernet controller +.El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xxxxxx" +.It Va hw.ale.msi_disable +This tunable disables MSI support on the Ethernet hardware. +The default value is 0. +.It Va hw.ale.msix_disable +This tunable disables MSI-X support on the Ethernet hardware. +The default value is 0. +.El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width "xxxxxx" +.It Va dev.ale.%d.int_rx_mod +Maximum amount of time to delay receive interrupt processing in +units of 1us. +The accepted range is 0 to 130000, the default is 30(30us). +Value 0 completely disables the interrupt moderation. +.It Va dev.ale.%d.int_tx_mod +Maximum amount of time to delay transmit interrupt processing in +units of 1us. +The accepted range is 0 to 130000, the default is 1000(1ms). +Value 0 completely disables the interrupt moderation. +.It Va dev.ale.%d.process_limit +Maximum amount of Rx frames to be processed in the event loop before +rescheduling a taskqueue. +The accepted range is 32 to 255, the default value is 128 events. +The interface does not need to be brought down and up again before +a change takes effect. +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr miibus 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +driver was written by +.An Pyun YongHyeon +.Aq yongari@FreeBSD.org . +It first appeared in +.Fx 7.1 . Modified: stable/7/share/man/man4/altq.4 ============================================================================== --- stable/7/share/man/man4/altq.4 Mon Nov 24 00:56:19 2008 (r185239) +++ stable/7/share/man/man4/altq.4 Mon Nov 24 01:00:36 2008 (r185240) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2008 +.Dd November 12, 2008 .Dt ALTQ 4 .Os .Sh NAME @@ -116,6 +116,7 @@ are required to use a certain network ca .Nm . They have been applied to the following hardware drivers: .Xr age 4 , +.Xr ale 4 , .Xr an 4 , .Xr ath 4 , .Xr aue 4 , Modified: stable/7/share/man/man4/miibus.4 ============================================================================== --- stable/7/share/man/man4/miibus.4 Mon Nov 24 00:56:19 2008 (r185239) +++ stable/7/share/man/man4/miibus.4 Mon Nov 24 01:00:36 2008 (r185240) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2008 +.Dd November 12, 2008 .Dt MIIBUS 4 .Os .Sh NAME @@ -47,6 +47,8 @@ interface: .Bl -tag -compact -width ".Xr fxp 4" .It Xr age 4 Attansic/Atheros L1 Gigabit Ethernet +.It Xr ale 4 +Atheros AR8121/AR8113/AR8114 PCIe Ethernet .It Xr aue 4 ADMtek USB Ethernet .It Xr axe 4 @@ -125,6 +127,7 @@ and but as a result are not well behaved newbus device drivers. .Sh SEE ALSO .Xr age 4 , +.Xr ale 4 , .Xr arp 4 , .Xr aue 4 , .Xr axe 4 , Modified: stable/7/share/man/man4/vlan.4 ============================================================================== --- stable/7/share/man/man4/vlan.4 Mon Nov 24 00:56:19 2008 (r185239) +++ stable/7/share/man/man4/vlan.4 Mon Nov 24 01:00:36 2008 (r185240) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2008 +.Dd November 12, 2008 .Dt VLAN 4 .Os .Sh NAME @@ -124,6 +124,7 @@ By now, the list of physical interfaces in the hardware is limited to the following devices: .Xr ae 4 , .Xr age 4 , +.Xr ale 4 , .Xr bce 4 , .Xr bge 4 , .Xr cxgb 4 , From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 11:22:26 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71F24106564A; Mon, 24 Nov 2008 11:22:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 610298FC18; Mon, 24 Nov 2008 11:22:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAOBMQqE085871; Mon, 24 Nov 2008 11:22:26 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAOBMQr1085870; Mon, 24 Nov 2008 11:22:26 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811241122.mAOBMQr1085870@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Nov 2008 11:22:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185249 - in stable/7/sys: . dev/vr modules/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 11:22:26 -0000 Author: yongari Date: Mon Nov 24 11:22:25 2008 New Revision: 185249 URL: http://svn.freebsd.org/changeset/base/185249 Log: MFC r185014: Fix typo. It restuled in activating unwanted Rx filtering as well as resetting Rx threshold configuration. Submitted by: Joost Mulders < Joost.Mulders <> Sun DOT COM > Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/dev/vr/if_vr.c stable/7/sys/modules/cxgb/ (props changed) Modified: stable/7/sys/dev/vr/if_vr.c ============================================================================== --- stable/7/sys/dev/vr/if_vr.c Mon Nov 24 11:07:25 2008 (r185248) +++ stable/7/sys/dev/vr/if_vr.c Mon Nov 24 11:22:25 2008 (r185249) @@ -465,7 +465,8 @@ vr_set_filter(struct vr_softc *sc) ifp = sc->vr_ifp; rxfilt = CSR_READ_1(sc, VR_RXCFG); - rxfilt = ~(VR_RXCFG_RX_PROMISC | VR_RXCFG_RX_BROAD | VR_RXCFG_RX_MULTI); + rxfilt &= ~(VR_RXCFG_RX_PROMISC | VR_RXCFG_RX_BROAD | + VR_RXCFG_RX_MULTI); if (ifp->if_flags & IFF_BROADCAST) rxfilt |= VR_RXCFG_RX_BROAD; if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 17:39:40 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47B161065670; Mon, 24 Nov 2008 17:39:40 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35B238FC13; Mon, 24 Nov 2008 17:39:40 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAOHdetu093567; Mon, 24 Nov 2008 17:39:40 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAOHdeiR093565; Mon, 24 Nov 2008 17:39:40 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200811241739.mAOHdeiR093565@svn.freebsd.org> From: Colin Percival Date: Mon, 24 Nov 2008 17:39:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185254 - head/sys/dev/random releng/6.3 releng/6.3/sys/conf releng/6.3/sys/dev/random releng/6.4 releng/6.4/sys/dev/random releng/7.0 releng/7.0/sys/conf releng/7.0/sys/dev/random stab... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 17:39:40 -0000 Author: cperciva Date: Mon Nov 24 17:39:39 2008 New Revision: 185254 URL: http://svn.freebsd.org/changeset/base/185254 Log: Make sure arc4random(9) is properly seeded when /etc/rc.d/initrandom returns. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-08:11.arc4random Modified: stable/7/sys/dev/random/randomdev.c stable/7/sys/dev/random/randomdev_soft.c Changes in other areas also in this revision: Modified: head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev_soft.c releng/6.3/UPDATING releng/6.3/sys/conf/newvers.sh releng/6.3/sys/dev/random/randomdev.c releng/6.3/sys/dev/random/randomdev_soft.c releng/6.4/UPDATING releng/6.4/sys/dev/random/randomdev.c releng/6.4/sys/dev/random/randomdev_soft.c releng/7.0/UPDATING releng/7.0/sys/conf/newvers.sh releng/7.0/sys/dev/random/randomdev.c releng/7.0/sys/dev/random/randomdev_soft.c stable/6/sys/dev/random/randomdev.c stable/6/sys/dev/random/randomdev_soft.c Modified: stable/7/sys/dev/random/randomdev.c ============================================================================== --- stable/7/sys/dev/random/randomdev.c Mon Nov 24 17:34:00 2008 (r185253) +++ stable/7/sys/dev/random/randomdev.c Mon Nov 24 17:39:39 2008 (r185254) @@ -90,6 +90,7 @@ random_close(struct cdev *dev __unused, && (securelevel_gt(td->td_ucred, 0) == 0)) { (*random_systat.reseed)(); random_systat.seeded = 1; + arc4rand(NULL, 0, 1); /* Reseed arc4random as well. */ } return (0); Modified: stable/7/sys/dev/random/randomdev_soft.c ============================================================================== --- stable/7/sys/dev/random/randomdev_soft.c Mon Nov 24 17:34:00 2008 (r185253) +++ stable/7/sys/dev/random/randomdev_soft.c Mon Nov 24 17:39:39 2008 (r185254) @@ -61,6 +61,7 @@ random_harvest_internal(u_int64_t, const u_int, u_int, enum esource); static int random_yarrow_poll(int event,struct thread *td); static int random_yarrow_block(int flag); +static void random_yarrow_flush_reseed(void); struct random_systat random_yarrow = { .ident = "Software, Yarrow", @@ -70,7 +71,7 @@ struct random_systat random_yarrow = { .read = random_yarrow_read, .write = random_yarrow_write, .poll = random_yarrow_poll, - .reseed = random_yarrow_reseed, + .reseed = random_yarrow_flush_reseed, .seeded = 1, }; @@ -96,7 +97,7 @@ static struct entropyfifo emptyfifo; /* Harvested entropy */ static struct entropyfifo harvestfifo[ENTROPYSOURCE]; -/* <0 to end the kthread, 0 to let it run */ +/* <0 to end the kthread, 0 to let it run, 1 to flush the harvest queues */ static int random_kthread_control = 0; static struct proc *random_kthread_proc; @@ -241,7 +242,7 @@ random_kthread(void *arg __unused) local_count = 0; /* Process until told to stop */ - for (; random_kthread_control == 0;) { + for (; random_kthread_control >= 0;) { active = 0; @@ -276,6 +277,13 @@ random_kthread(void *arg __unused) KASSERT(local_count == 0, ("random_kthread: local_count %d", local_count)); + /* + * If a queue flush was commanded, it has now happened, + * and we can mark this by resetting the command. + */ + if (random_kthread_control == 1) + random_kthread_control = 0; + /* Found nothing, so don't belabour the issue */ if (!active) pause("-", hz / 10); @@ -400,3 +408,15 @@ random_yarrow_block(int flag) return error; } + +/* Helper routine to perform explicit reseeds */ +static void +random_yarrow_flush_reseed(void) +{ + /* Command a entropy queue flush and wait for it to finish */ + random_kthread_control = 1; + while (random_kthread_control) + pause("-", hz / 10); + + random_yarrow_reseed(); +} From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 17:39:41 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43C891065674; Mon, 24 Nov 2008 17:39:41 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31E408FC1F; Mon, 24 Nov 2008 17:39:41 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAOHdfkJ093597; Mon, 24 Nov 2008 17:39:41 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAOHdfVU093595; Mon, 24 Nov 2008 17:39:41 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200811241739.mAOHdfVU093595@svn.freebsd.org> From: Colin Percival Date: Mon, 24 Nov 2008 17:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185254 - head/sys/dev/random releng/6.3 releng/6.3/sys/conf releng/6.3/sys/dev/random releng/6.4 releng/6.4/sys/dev/random releng/7.0 releng/7.0/sys/conf releng/7.0/sys/dev/random stab... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 17:39:41 -0000 Author: cperciva Date: Mon Nov 24 17:39:39 2008 New Revision: 185254 URL: http://svn.freebsd.org/changeset/base/185254 Log: Make sure arc4random(9) is properly seeded when /etc/rc.d/initrandom returns. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-08:11.arc4random Modified: stable/6/sys/dev/random/randomdev.c stable/6/sys/dev/random/randomdev_soft.c Changes in other areas also in this revision: Modified: head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev_soft.c releng/6.3/UPDATING releng/6.3/sys/conf/newvers.sh releng/6.3/sys/dev/random/randomdev.c releng/6.3/sys/dev/random/randomdev_soft.c releng/6.4/UPDATING releng/6.4/sys/dev/random/randomdev.c releng/6.4/sys/dev/random/randomdev_soft.c releng/7.0/UPDATING releng/7.0/sys/conf/newvers.sh releng/7.0/sys/dev/random/randomdev.c releng/7.0/sys/dev/random/randomdev_soft.c stable/7/sys/dev/random/randomdev.c stable/7/sys/dev/random/randomdev_soft.c Modified: stable/6/sys/dev/random/randomdev.c ============================================================================== --- stable/6/sys/dev/random/randomdev.c Mon Nov 24 17:34:00 2008 (r185253) +++ stable/6/sys/dev/random/randomdev.c Mon Nov 24 17:39:39 2008 (r185254) @@ -89,6 +89,7 @@ random_close(struct cdev *dev __unused, && (securelevel_gt(td->td_ucred, 0) == 0)) { (*random_systat.reseed)(); random_systat.seeded = 1; + arc4rand(NULL, 0, 1); /* Reseed arc4random as well. */ } return (0); Modified: stable/6/sys/dev/random/randomdev_soft.c ============================================================================== --- stable/6/sys/dev/random/randomdev_soft.c Mon Nov 24 17:34:00 2008 (r185253) +++ stable/6/sys/dev/random/randomdev_soft.c Mon Nov 24 17:39:39 2008 (r185254) @@ -61,6 +61,7 @@ random_harvest_internal(u_int64_t, const u_int, u_int, enum esource); static int random_yarrow_poll(int event,struct thread *td); static int random_yarrow_block(int flag); +static void random_yarrow_flush_reseed(void); struct random_systat random_yarrow = { .ident = "Software, Yarrow", @@ -70,7 +71,7 @@ struct random_systat random_yarrow = { .read = random_yarrow_read, .write = random_yarrow_write, .poll = random_yarrow_poll, - .reseed = random_yarrow_reseed, + .reseed = random_yarrow_flush_reseed, .seeded = 1, }; @@ -96,7 +97,7 @@ static struct entropyfifo emptyfifo; /* Harvested entropy */ static struct entropyfifo harvestfifo[ENTROPYSOURCE]; -/* <0 to end the kthread, 0 to let it run */ +/* <0 to end the kthread, 0 to let it run, 1 to flush the harvest queues */ static int random_kthread_control = 0; static struct proc *random_kthread_proc; @@ -247,7 +248,7 @@ random_kthread(void *arg __unused) local_count = 0; /* Process until told to stop */ - for (; random_kthread_control == 0;) { + for (; random_kthread_control >= 0;) { active = 0; @@ -282,6 +283,13 @@ random_kthread(void *arg __unused) KASSERT(local_count == 0, ("random_kthread: local_count %d", local_count)); + /* + * If a queue flush was commanded, it has now happened, + * and we can mark this by resetting the command. + */ + if (random_kthread_control == 1) + random_kthread_control = 0; + /* Found nothing, so don't belabour the issue */ if (!active) tsleep(&harvestfifo, 0, "-", hz / 10); @@ -406,3 +414,15 @@ random_yarrow_block(int flag) return error; } + +/* Helper routine to perform explicit reseeds */ +static void +random_yarrow_flush_reseed(void) +{ + /* Command a entropy queue flush and wait for it to finish */ + random_kthread_control = 1; + while (random_kthread_control) + tsleep(&harvestfifo, 0, "-", hz / 10); + + random_yarrow_reseed(); +} From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 19:52:20 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D5E51065673; Mon, 24 Nov 2008 19:52:20 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EBBD8FC17; Mon, 24 Nov 2008 19:52:20 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAOJqKjR096360; Mon, 24 Nov 2008 19:52:20 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAOJqKX1096359; Mon, 24 Nov 2008 19:52:20 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200811241952.mAOJqKX1096359@svn.freebsd.org> From: Christian Brueffer Date: Mon, 24 Nov 2008 19:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185257 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 19:52:20 -0000 Author: brueffer Date: Mon Nov 24 19:52:19 2008 New Revision: 185257 URL: http://svn.freebsd.org/changeset/base/185257 Log: MFC r184523 - Add one more supported adapter - Fix a couple of typos Approved by: re (kensmith) Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/zyd.4 Modified: stable/7/share/man/man4/zyd.4 ============================================================================== --- stable/7/share/man/man4/zyd.4 Mon Nov 24 19:28:52 2008 (r185256) +++ stable/7/share/man/man4/zyd.4 Mon Nov 24 19:52:19 2008 (r185257) @@ -32,7 +32,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 6, 2007 +.Dd November 1, 2008 .Dt ZYD 4 .Os .Sh NAME @@ -103,7 +103,7 @@ driver: .It Airlink+ AWLL3025 .It Airlink 101 AWLL3026 .It AOpen 802.11g WL54 -.It Asus A9T integrated wirless +.It Asus A9T integrated wireless .It Asus WL-159g .It Belkin F5D7050 v.4000 .It Billion BiPAC 3011G @@ -117,6 +117,7 @@ driver: .It Linksys WUSBF54G .It Longshine LCS-8131G3 .It MSI US54SE +.It MyTek MWU-201 USB adapter .It Philips SNU5600 .It Planet WL-U356 .It Planex GW-US54GZ @@ -143,7 +144,7 @@ driver: .El .Sh EXAMPLES The following -examples configures zyd0 to join whatever network is available on boot, +example configures zyd0 to join whatever network is available on boot, using WEP key .Dq 0x1deadbeef1 , channel 11: From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 20:05:15 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05A451065674; Mon, 24 Nov 2008 20:05:15 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAC978FC17; Mon, 24 Nov 2008 20:05:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAOK5E4x096676; Mon, 24 Nov 2008 20:05:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAOK5EFj096674; Mon, 24 Nov 2008 20:05:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200811242005.mAOK5EFj096674@svn.freebsd.org> From: Xin LI Date: Mon, 24 Nov 2008 20:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185258 - in stable/7/release/doc/en_US.ISO8859-1: hardware relnotes X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 20:05:15 -0000 Author: delphij Date: Mon Nov 24 20:05:14 2008 New Revision: 185258 URL: http://svn.freebsd.org/changeset/base/185258 Log: MFC: Document ale(4), mention that it is not present in GENERIC kernel for this release. Approved by: re (blackend) Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml Mon Nov 24 19:52:19 2008 (r185257) +++ stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml Mon Nov 24 20:05:14 2008 (r185258) @@ -615,6 +615,8 @@ Ethernet Interfaces + &hwlist.ale; + &hwlist.aue; &hwlist.axe; Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Nov 24 19:52:19 2008 (r185257) +++ stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Nov 24 20:05:14 2008 (r185258) @@ -198,6 +198,11 @@ Network Interface Support + The &man.ale.4; driver has been added to provide support + for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers. + This driver is not enabled in GENERIC + kernels for this release. + The &man.em.4; driver has been split into two drivers with some common parts. The &man.em.4; driver will continue to support adapters up to the 82575, as well as new From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 21:09:05 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E512A106567E; Mon, 24 Nov 2008 21:09:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB6BD8FC08; Mon, 24 Nov 2008 21:09:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAOL95KP098290; Mon, 24 Nov 2008 21:09:05 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAOL95vh098288; Mon, 24 Nov 2008 21:09:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200811242109.mAOL95vh098288@svn.freebsd.org> From: Xin LI Date: Mon, 24 Nov 2008 21:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185261 - in stable/7/release/doc/zh_CN.GB2312: hardware relnotes X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 21:09:06 -0000 Author: delphij Date: Mon Nov 24 21:09:05 2008 New Revision: 185261 URL: http://svn.freebsd.org/changeset/base/185261 Log: MFen rev 185258: Document ale(4). Approved by: re (blackend) Modified: stable/7/release/doc/zh_CN.GB2312/hardware/article.sgml stable/7/release/doc/zh_CN.GB2312/relnotes/article.sgml Modified: stable/7/release/doc/zh_CN.GB2312/hardware/article.sgml ============================================================================== --- stable/7/release/doc/zh_CN.GB2312/hardware/article.sgml Mon Nov 24 21:08:43 2008 (r185260) +++ stable/7/release/doc/zh_CN.GB2312/hardware/article.sgml Mon Nov 24 21:09:05 2008 (r185261) @@ -392,7 +392,7 @@ - + @@ -183,6 +183,11 @@ ÍøÂç½Ó¿ÚÖ§³Ö + ÐÂÔöÁËÓÃÓÚÖ§³Ö + Atheros AR8121/AR8113/AR8114 ǧÕ×/°ÙÕ×ÒÔÌ«Íø¿ØÖÆÆ÷µÄ &man.ale.4; Çý¶¯³ÌÐò¡£ + ÔÚÕâÒ»°æ±¾ÖÐµÄ GENERIC + ÄÚºËÖÐĬÈϲ¢²»°üº¬´ËÇý¶¯¡£ + ½« &man.em.4; Çý¶¯³ÌÐò·Ö²ð³ÉÁËÁ½¸ö¹²Ïí²¿·Ö´úÂëµÄÇý¶¯³ÌÐò¡£ &man.em.4; Çý¶¯³ÌÐò½«¼ÌÐøÖ§³Ö¸ßÖÁ 82575 µÄÍø¿¨ÒÔ¼°ÐµÄÕë¶Ô¿Í»§»ú/×ÀÃæµÄÍø¿¨¡£ ÐÂÔöµÄ &man.igb.4; Çý¶¯³ÌÐòÔòÓÃÓÚÖ§³ÖеķþÎñÆ÷Íø¿¨¡£ From owner-svn-src-stable@FreeBSD.ORG Mon Nov 24 21:18:40 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 695EC1065672; Mon, 24 Nov 2008 21:18:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BBAB8FC13; Mon, 24 Nov 2008 21:18:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAOLIeXE098581; Mon, 24 Nov 2008 21:18:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAOLIemj098580; Mon, 24 Nov 2008 21:18:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200811242118.mAOLIemj098580@svn.freebsd.org> From: Marius Strobl Date: Mon, 24 Nov 2008 21:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185263 - stable/6/sys/pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 21:18:40 -0000 Author: marius Date: Mon Nov 24 21:18:40 2008 New Revision: 185263 URL: http://svn.freebsd.org/changeset/base/185263 Log: Revert r182461 except for the introduction of the DC_HAS_BROKEN_RXSTATE() macro for the upcoming release as doing MII-operations on DM9102A while the link is up has turned out to occasionally cause panics. This again prevents the link state form ever being checked once it's up, which is considered less worse than the panics tough. Approved by: re (kensmith) Modified: stable/6/sys/pci/if_dc.c Modified: stable/6/sys/pci/if_dc.c ============================================================================== --- stable/6/sys/pci/if_dc.c Mon Nov 24 21:10:08 2008 (r185262) +++ stable/6/sys/pci/if_dc.c Mon Nov 24 21:18:40 2008 (r185263) @@ -2916,12 +2916,8 @@ dc_tick(void *xsc) if (sc->dc_link == 0) mii_tick(mii); } else { - /* - * For NICs which never report DC_RXSTATE_WAIT, we - * have to bite the bullet... - */ - if ((DC_HAS_BROKEN_RXSTATE(sc) || (CSR_READ_4(sc, - DC_ISR) & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT) && + r = CSR_READ_4(sc, DC_ISR); + if ((r & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT && sc->dc_cdata.dc_tx_cnt == 0) { mii_tick(mii); if (!(mii->mii_media_status & IFM_ACTIVE)) From owner-svn-src-stable@FreeBSD.ORG Tue Nov 25 17:27:11 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D082C1065670; Tue, 25 Nov 2008 17:27:11 +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 C5D838FC16; Tue, 25 Nov 2008 17:27:11 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAPHRBtT029759; Tue, 25 Nov 2008 17:27:11 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAPHRBNt029758; Tue, 25 Nov 2008 17:27:11 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200811251727.mAPHRBNt029758@svn.freebsd.org> From: Ken Smith Date: Tue, 25 Nov 2008 17:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185301 - stable/7/release X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2008 17:27:12 -0000 Author: kensmith Date: Tue Nov 25 17:27:11 2008 New Revision: 185301 URL: http://svn.freebsd.org/changeset/base/185301 Log: With the branch for 7.1 done start bumping misc. version numbers from 7.0 to 7.1. Approved by: re (implicit) Modified: stable/7/release/Makefile Modified: stable/7/release/Makefile ============================================================================== --- stable/7/release/Makefile Tue Nov 25 16:38:10 2008 (r185300) +++ stable/7/release/Makefile Tue Nov 25 17:27:11 2008 (r185301) @@ -18,11 +18,11 @@ # Set these, release builder! # # Fixed version: -#BUILDNAME=7.0-STABLE +#BUILDNAME=7.1-STABLE # # Automatic SNAP versioning: DATE != date +%Y%m%d -BASE = 7.0 +BASE = 7.1 BUILDNAME?=${BASE}-${DATE}-SNAP # #CHROOTDIR=/junk/release From owner-svn-src-stable@FreeBSD.ORG Tue Nov 25 17:31:45 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92DB5106567A; Tue, 25 Nov 2008 17:31:45 +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 8833A8FC17; Tue, 25 Nov 2008 17:31:45 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAPHVjpX029889; Tue, 25 Nov 2008 17:31:45 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAPHVjLB029888; Tue, 25 Nov 2008 17:31:45 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200811251731.mAPHVjLB029888@svn.freebsd.org> From: Ken Smith Date: Tue, 25 Nov 2008 17:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185302 - stable/7/sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2008 17:31:45 -0000 Author: kensmith Date: Tue Nov 25 17:31:45 2008 New Revision: 185302 URL: http://svn.freebsd.org/changeset/base/185302 Log: Bump __FreeBSD_version for 7.1. Approved by: re (implicit) Modified: stable/7/sys/sys/param.h Modified: stable/7/sys/sys/param.h ============================================================================== --- stable/7/sys/sys/param.h Tue Nov 25 17:27:11 2008 (r185301) +++ stable/7/sys/sys/param.h Tue Nov 25 17:31:45 2008 (r185302) @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 700112 /* Master, propagated to newvers */ +#define __FreeBSD_version 701100 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-stable@FreeBSD.ORG Tue Nov 25 17:34:36 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5156B106564A; Tue, 25 Nov 2008 17:34:36 +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 46B1C8FC12; Tue, 25 Nov 2008 17:34:36 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAPHYa1n029999; Tue, 25 Nov 2008 17:34:36 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAPHYabD029998; Tue, 25 Nov 2008 17:34:36 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200811251734.mAPHYabD029998@svn.freebsd.org> From: Ken Smith Date: Tue, 25 Nov 2008 17:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185303 - stable/7/usr.sbin/pkg_install/add X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2008 17:34:36 -0000 Author: kensmith Date: Tue Nov 25 17:34:36 2008 New Revision: 185303 URL: http://svn.freebsd.org/changeset/base/185303 Log: Add FreeBSD_version and package directory for 7.1. Approved by: re (implicit) Modified: stable/7/usr.sbin/pkg_install/add/main.c Modified: stable/7/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/7/usr.sbin/pkg_install/add/main.c Tue Nov 25 17:31:45 2008 (r185302) +++ stable/7/usr.sbin/pkg_install/add/main.c Tue Nov 25 17:34:36 2008 (r185303) @@ -79,6 +79,7 @@ struct { { 602000, 602099, "/packages-6.2-release" }, { 603000, 603099, "/packages-6.3-release" }, { 700000, 700099, "/packages-7.0-release" }, + { 701000, 701099, "/packages-7.1-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, From owner-svn-src-stable@FreeBSD.ORG Tue Nov 25 19:26:37 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68804106564A; Tue, 25 Nov 2008 19:26:37 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5679F8FC1B; Tue, 25 Nov 2008 19:26:37 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAPJQbTt032617; Tue, 25 Nov 2008 19:26:37 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAPJQbqY032613; Tue, 25 Nov 2008 19:26:37 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200811251926.mAPJQbqY032613@svn.freebsd.org> From: Julian Elischer Date: Tue, 25 Nov 2008 19:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185311 - in stable/7/sys: kern netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2008 19:26:37 -0000 Author: julian Date: Tue Nov 25 19:26:36 2008 New Revision: 185311 URL: http://svn.freebsd.org/changeset/base/185311 Log: MFC @ 185101 Fix a scope problem in the multiple routing table code that stopped the SO_SETFIB socket option from working correctly. Approved by: re (kensmith, kostik) Obtained from: Ironport Modified: stable/7/sys/kern/uipc_socket.c stable/7/sys/netinet/ip_divert.c stable/7/sys/netinet/ip_output.c stable/7/sys/netinet/raw_ip.c Modified: stable/7/sys/kern/uipc_socket.c ============================================================================== --- stable/7/sys/kern/uipc_socket.c Tue Nov 25 19:25:54 2008 (r185310) +++ stable/7/sys/kern/uipc_socket.c Tue Nov 25 19:26:36 2008 (r185311) @@ -2218,6 +2218,9 @@ sosetopt(struct socket *so, struct socko if ((so->so_proto->pr_domain->dom_family == PF_INET) || (so->so_proto->pr_domain->dom_family == PF_ROUTE)) { so->so_fibnum = optval; + /* Note: ignore error */ + if (so->so_proto && so->so_proto->pr_ctloutput) + (*so->so_proto->pr_ctloutput)(so, sopt); } else { so->so_fibnum = 0; } Modified: stable/7/sys/netinet/ip_divert.c ============================================================================== --- stable/7/sys/netinet/ip_divert.c Tue Nov 25 19:25:54 2008 (r185310) +++ stable/7/sys/netinet/ip_divert.c Tue Nov 25 19:26:36 2008 (r185311) @@ -314,6 +314,7 @@ div_output(struct socket *so, struct mbu */ m->m_pkthdr.rcvif = NULL; m->m_nextpkt = NULL; + M_SETFIB(m, so->so_fibnum); if (control) m_freem(control); /* XXX */ Modified: stable/7/sys/netinet/ip_output.c ============================================================================== --- stable/7/sys/netinet/ip_output.c Tue Nov 25 19:25:54 2008 (r185310) +++ stable/7/sys/netinet/ip_output.c Tue Nov 25 19:26:36 2008 (r185311) @@ -125,8 +125,10 @@ ip_output(struct mbuf *m, struct mbuf *o bzero(ro, sizeof (*ro)); } - if (inp != NULL) + if (inp != NULL) { + M_SETFIB(m, inp->inp_inc.inc_fibnum); INP_LOCK_ASSERT(inp); + } if (opt) { len = 0; @@ -808,6 +810,11 @@ ip_ctloutput(struct socket *so, struct s error = optval = 0; if (sopt->sopt_level != IPPROTO_IP) { + if ((sopt->sopt_level == SOL_SOCKET) && + (sopt->sopt_name == SO_SETFIB)) { + inp->inp_inc.inc_fibnum = so->so_fibnum; + return (0); + } return (EINVAL); } Modified: stable/7/sys/netinet/raw_ip.c ============================================================================== --- stable/7/sys/netinet/raw_ip.c Tue Nov 25 19:25:54 2008 (r185310) +++ stable/7/sys/netinet/raw_ip.c Tue Nov 25 19:26:36 2008 (r185311) @@ -441,8 +441,14 @@ rip_ctloutput(struct socket *so, struct struct inpcb *inp = sotoinpcb(so); int error, optval; - if (sopt->sopt_level != IPPROTO_IP) + if (sopt->sopt_level != IPPROTO_IP) { + if ((sopt->sopt_level == SOL_SOCKET) && + (sopt->sopt_name == SO_SETFIB)) { + inp->inp_inc.inc_fibnum = so->so_fibnum; + return (0); + } return (EINVAL); + } error = 0; switch (sopt->sopt_dir) { From owner-svn-src-stable@FreeBSD.ORG Wed Nov 26 15:20:45 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 202491065674 for ; Wed, 26 Nov 2008 15:20:45 +0000 (UTC) (envelope-from cmdlnkid@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id B6DC08FC4B for ; Wed, 26 Nov 2008 15:20:44 +0000 (UTC) (envelope-from cmdlnkid@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so252487yxb.13 for ; Wed, 26 Nov 2008 07:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=0zTIOF7oEskrIb8UqfHdxR9LTq3n4liwscwVtiTndLk=; b=rL68k/y9LfFJV6WJzwdJwYGOIJx/lmuyTG6cGHj/MhrAWnPDvPay1bcIHVrMlprg5N aEW8mHiyKHTMxHzRgyvEoZOhFa2ujSVdmKaPAsQ8pCsPQwH2xzp2jues+6TaGjtxBHY2 glNZ4xi28nc55T/j2zuCa+jzOMszkToM2bevY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=P9xJHz51rJ0LkS9kNhPucRe/0h+yPIDe1OJiywNdTp5JEN1agSTxGDokUMQpskWYlR 3tkZ/lPfD/1681hjIseJ1YwGt8CSs6NOJC/V4/3mOGt8M0PVS+tt255hL/CAela2BX/r Dq/liy41uZMbHIw0pVh3uj+pY8d9mGLozkDfw= Received: by 10.90.94.2 with SMTP id r2mr3381433agb.62.1227712391701; Wed, 26 Nov 2008 07:13:11 -0800 (PST) Received: from dimension.5p.local (c-24-11-6-132.hsd1.mi.comcast.net [24.11.6.132]) by mx.google.com with ESMTPS id 38sm226469aga.4.2008.11.26.07.13.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 26 Nov 2008 07:13:10 -0800 (PST) Message-ID: <492D677E.7020104@gmail.com> Date: Wed, 26 Nov 2008 10:13:02 -0500 From: CmdLnKid User-Agent: Thunderbird 2.0.0.18 (X11/20081123) MIME-Version: 1.0 To: Pyun YongHyeon , src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org References: <492D669B.7010008@gmail.com> In-Reply-To: <492D669B.7010008@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r185238 - in stable/7/sys: . amd64/conf boot/forth conf dev/ale i386/conf modules modules/ale modules/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2008 15:20:45 -0000 CmdLnKid wrote: > I don't suppose any support for the WMP110 which reports as Atheros will > be added before the release of 7.1. > > data sheet. > http://www.linksys.com/servlet/Satellite?c=L_CASupport_C2&childpagename=US%2FLayout&cid=1$ > > > ndis0@pci0:1:8:0: class=0x028000 card=0x00721737 chip=0x0023168c > rev=0x01 hdr=0x00 > vendor = 'Atheros Communications Inc.' > device = 'AR5008 Wireless Network Adapter' > class = network > > as you can tell it works great under NDIS but I would rather see a > resolve with a native driver. > > Best regards, > CmdLnKid - J. Hellenthal Sorry for the broken link. Here it is again. http://www.linksys.com/servlet/Satellite?c=L_CASupport_C2&childpagename=US%2FLayout&cid=1175244795392&pagename=Linksys%2FCommon%2FVisitorWrapper&lid=9539240888B11&displaypage=download#versiondetail From owner-svn-src-stable@FreeBSD.ORG Wed Nov 26 15:37:44 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B91301065672 for ; Wed, 26 Nov 2008 15:37:44 +0000 (UTC) (envelope-from cmdlnkid@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id 5E0F08FC16 for ; Wed, 26 Nov 2008 15:37:44 +0000 (UTC) (envelope-from cmdlnkid@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so256375ywe.13 for ; Wed, 26 Nov 2008 07:37:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=NnYas38zm3pfeN0fN+pAcegvt+IbeHVlxGIz2vdA2/A=; b=LaCCpMPamRR/ivnR3NDH3jS70lnF2t6I15SYg1yjXgAtwAnTcadeeiPQ1qJERFVZCX V8rzwtSh2PuD1YeKRIyaQJKivmCotn7TdLDgHyoWQ/mwVvxzYU8f0RuBuqTVx/QHXpVa LOUx7tLdvAqu5giJvSQqwR5bGMQeQ6/QpUVoY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=cD1Mf5Rd44itlcSli53XhrgT5qZSw0+Qgx+9std6SYloLT4j9etCSwrKUjr2hLGqsW SW9AF3EjFe3yG4fcVNdrLTFQxSOuDoCB9S/ITHtkiz+nSw0seFrRVy7KZ3cSf6oNh6ig kPQ1sGwKmzTJyLb6cYrmUdq7QvXZANKN8/KnA= Received: by 10.90.120.17 with SMTP id s17mr3357173agc.101.1227712162703; Wed, 26 Nov 2008 07:09:22 -0800 (PST) Received: from dimension.5p.local (c-24-11-6-132.hsd1.mi.comcast.net [24.11.6.132]) by mx.google.com with ESMTPS id 5sm221345agc.29.2008.11.26.07.09.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 26 Nov 2008 07:09:21 -0800 (PST) Message-ID: <492D669B.7010008@gmail.com> Date: Wed, 26 Nov 2008 10:09:15 -0500 From: CmdLnKid User-Agent: Thunderbird 2.0.0.18 (X11/20081123) MIME-Version: 1.0 To: Pyun YongHyeon , src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r185238 - in stable/7/sys: . amd64/conf boot/forth conf dev/ale i386/conf modules modules/ale modules/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2008 15:37:44 -0000 I don't suppose any support for the WMP110 which reports as Atheros will be added before the release of 7.1. data sheet. http://www.linksys.com/servlet/Satellite?c=L_CASupport_C2&childpagename=US%2FLayout&cid=1$ ndis0@pci0:1:8:0: class=0x028000 card=0x00721737 chip=0x0023168c rev=0x01 hdr=0x00 vendor = 'Atheros Communications Inc.' device = 'AR5008 Wireless Network Adapter' class = network as you can tell it works great under NDIS but I would rather see a resolve with a native driver. Best regards, CmdLnKid - J. Hellenthal From owner-svn-src-stable@FreeBSD.ORG Wed Nov 26 16:44:19 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E49B310656A4; Wed, 26 Nov 2008 16:44:19 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id A71958FC24; Wed, 26 Nov 2008 16:44:19 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id mAQGMHa4066187 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 26 Nov 2008 08:22:17 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <492D77B9.6090104@freebsd.org> Date: Wed, 26 Nov 2008 08:22:17 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: CmdLnKid References: <492D669B.7010008@gmail.com> In-Reply-To: <492D669B.7010008@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: svn-src-stable@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r185238 - in stable/7/sys: . amd64/conf boot/forth conf dev/ale i386/conf modules modules/ale modules/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2008 16:44:20 -0000 CmdLnKid wrote: > I don't suppose any support for the WMP110 which reports as Atheros will > be added before the release of 7.1. > > data sheet. > http://www.linksys.com/servlet/Satellite?c=L_CASupport_C2&childpagename=US%2FLayout&cid=1$ > > > ndis0@pci0:1:8:0: class=0x028000 card=0x00721737 chip=0x0023168c > rev=0x01 hdr=0x00 > vendor = 'Atheros Communications Inc.' > device = 'AR5008 Wireless Network Adapter' > class = network > > as you can tell it works great under NDIS but I would rather see a > resolve with a native driver. > Definitely not before 7.1. Sam From owner-svn-src-stable@FreeBSD.ORG Wed Nov 26 19:22:09 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22B6E1065673; Wed, 26 Nov 2008 19:22:09 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBB528FC0A; Wed, 26 Nov 2008 19:22:08 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAQJM8Fu063959; Wed, 26 Nov 2008 19:22:08 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAQJM8bQ063958; Wed, 26 Nov 2008 19:22:08 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200811261922.mAQJM8bQ063958@svn.freebsd.org> From: Peter Wemm Date: Wed, 26 Nov 2008 19:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185340 - stable/7/sys/modules/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2008 19:22:09 -0000 Author: peter Date: Wed Nov 26 19:22:08 2008 New Revision: 185340 URL: http://svn.freebsd.org/changeset/base/185340 Log: Remove zombie mergeinfo that Julian brought back to life in rev 184739. Submitted by: bz Approved by: re (implicit) Modified: stable/7/sys/modules/cxgb/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Wed Nov 26 22:36:35 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFC0A1065670; Wed, 26 Nov 2008 22:36:35 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A32CF8FC18; Wed, 26 Nov 2008 22:36:35 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAQMaZVl068358; Wed, 26 Nov 2008 22:36:35 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAQMaZsm068357; Wed, 26 Nov 2008 22:36:35 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200811262236.mAQMaZsm068357@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 26 Nov 2008 22:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185350 - in stable/7/sys: . netinet6 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2008 22:36:35 -0000 Author: bz Date: Wed Nov 26 22:36:35 2008 New Revision: 185350 URL: http://svn.freebsd.org/changeset/base/185350 Log: MFC: r185332 Plug a credential leak in case the inpcb is freed by in6_pcbfree() instead of in_pcbfree(); missed in r183606. Approved by: re (gnn) Modified: stable/7/sys/ (props changed) stable/7/sys/netinet6/in6_pcb.c Modified: stable/7/sys/netinet6/in6_pcb.c ============================================================================== --- stable/7/sys/netinet6/in6_pcb.c Wed Nov 26 22:33:55 2008 (r185349) +++ stable/7/sys/netinet6/in6_pcb.c Wed Nov 26 22:36:35 2008 (r185350) @@ -437,6 +437,7 @@ in6_pcbfree(struct inpcb *inp) if (inp->inp_moptions != NULL) inp_freemoptions(inp->inp_moptions); inp->inp_vflag = 0; + crfree(inp->inp_cred); #ifdef MAC mac_destroy_inpcb(inp); #endif From owner-svn-src-stable@FreeBSD.ORG Fri Nov 28 20:08:48 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76D461065674; Fri, 28 Nov 2008 20:08:48 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7AF8FC16; Fri, 28 Nov 2008 20:08:48 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mASK8m8E028605; Fri, 28 Nov 2008 20:08:48 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mASK8l6H028595; Fri, 28 Nov 2008 20:08:47 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200811282008.mASK8l6H028595@svn.freebsd.org> From: Tim Kientzle Date: Fri, 28 Nov 2008 20:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185408 - in stable/7/lib/libarchive: . test X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2008 20:08:48 -0000 Author: kientzle Date: Fri Nov 28 20:08:47 2008 New Revision: 185408 URL: http://svn.freebsd.org/changeset/base/185408 Log: MFC 182590,182778,182779,184109: Support for certain archive_entry attributes to be explicitly "unset". This fixes a number of issues: * Zip archives with "length at end" can now be extracted correctly, since the Zip extractor can simply mark the size as "unknown." * Extract-to-disk can now accurately handle cases with partial time information (e.g., mtime is known but not atime) * We get more accurate handling of different hardlink extraction cases; sometimes a hardlink entry has definitive size information and sometimes not. Approved by: re Modified: stable/7/lib/libarchive/ (props changed) stable/7/lib/libarchive/archive_entry.c stable/7/lib/libarchive/archive_entry.h stable/7/lib/libarchive/archive_entry_private.h stable/7/lib/libarchive/archive_read_support_format_zip.c stable/7/lib/libarchive/archive_write_disk.c stable/7/lib/libarchive/test/test_entry.c stable/7/lib/libarchive/test/test_read_format_zip.c stable/7/lib/libarchive/test/test_read_format_zip.zip.uu stable/7/lib/libarchive/test/test_write_disk.c stable/7/lib/libarchive/test/test_write_disk_hardlink.c Modified: stable/7/lib/libarchive/archive_entry.c ============================================================================== --- stable/7/lib/libarchive/archive_entry.c Fri Nov 28 19:58:31 2008 (r185407) +++ stable/7/lib/libarchive/archive_entry.c Fri Nov 28 20:08:47 2008 (r185408) @@ -395,8 +395,7 @@ archive_entry_clone(struct archive_entry aes_copy(&entry2->ae_hardlink, &entry->ae_hardlink); aes_copy(&entry2->ae_pathname, &entry->ae_pathname); aes_copy(&entry2->ae_symlink, &entry->ae_symlink); - entry2->ae_hardlinkset = entry->ae_hardlinkset; - entry2->ae_symlinkset = entry->ae_symlinkset; + entry2->ae_set = entry->ae_set; aes_copy(&entry2->ae_uname, &entry->ae_uname); /* Copy ACL data over. */ @@ -455,12 +454,24 @@ archive_entry_atime_nsec(struct archive_ return (entry->ae_stat.aest_atime_nsec); } +int +archive_entry_atime_is_set(struct archive_entry *entry) +{ + return (entry->ae_set & AE_SET_ATIME); +} + time_t archive_entry_ctime(struct archive_entry *entry) { return (entry->ae_stat.aest_ctime); } +int +archive_entry_ctime_is_set(struct archive_entry *entry) +{ + return (entry->ae_set & AE_SET_CTIME); +} + long archive_entry_ctime_nsec(struct archive_entry *entry) { @@ -562,17 +573,17 @@ archive_entry_gname_w(struct archive_ent const char * archive_entry_hardlink(struct archive_entry *entry) { - if (!entry->ae_hardlinkset) - return (NULL); - return (aes_get_mbs(&entry->ae_hardlink)); + if (entry->ae_set & AE_SET_HARDLINK) + return (aes_get_mbs(&entry->ae_hardlink)); + return (NULL); } const wchar_t * archive_entry_hardlink_w(struct archive_entry *entry) { - if (!entry->ae_hardlinkset) - return (NULL); - return (aes_get_wcs(&entry->ae_hardlink)); + if (entry->ae_set & AE_SET_HARDLINK) + return (aes_get_wcs(&entry->ae_hardlink)); + return (NULL); } ino_t @@ -599,6 +610,12 @@ archive_entry_mtime_nsec(struct archive_ return (entry->ae_stat.aest_mtime_nsec); } +int +archive_entry_mtime_is_set(struct archive_entry *entry) +{ + return (entry->ae_set & AE_SET_MTIME); +} + unsigned int archive_entry_nlink(struct archive_entry *entry) { @@ -651,6 +668,12 @@ archive_entry_size(struct archive_entry return (entry->ae_stat.aest_size); } +int +archive_entry_size_is_set(struct archive_entry *entry) +{ + return (entry->ae_set & AE_SET_SIZE); +} + const char * archive_entry_sourcepath(struct archive_entry *entry) { @@ -660,17 +683,17 @@ archive_entry_sourcepath(struct archive_ const char * archive_entry_symlink(struct archive_entry *entry) { - if (!entry->ae_symlinkset) - return (NULL); - return (aes_get_mbs(&entry->ae_symlink)); + if (entry->ae_set & AE_SET_SYMLINK) + return (aes_get_mbs(&entry->ae_symlink)); + return (NULL); } const wchar_t * archive_entry_symlink_w(struct archive_entry *entry) { - if (!entry->ae_symlinkset) - return (NULL); - return (aes_get_wcs(&entry->ae_symlink)); + if (entry->ae_set & AE_SET_SYMLINK) + return (aes_get_wcs(&entry->ae_symlink)); + return (NULL); } uid_t @@ -773,7 +796,9 @@ archive_entry_set_hardlink(struct archiv { aes_set_mbs(&entry->ae_hardlink, target); if (target != NULL) - entry->ae_hardlinkset = 1; + entry->ae_set |= AE_SET_HARDLINK; + else + entry->ae_set &= ~AE_SET_HARDLINK; } void @@ -781,7 +806,9 @@ archive_entry_copy_hardlink(struct archi { aes_copy_mbs(&entry->ae_hardlink, target); if (target != NULL) - entry->ae_hardlinkset = 1; + entry->ae_set |= AE_SET_HARDLINK; + else + entry->ae_set &= ~AE_SET_HARDLINK; } void @@ -789,26 +816,44 @@ archive_entry_copy_hardlink_w(struct arc { aes_copy_wcs(&entry->ae_hardlink, target); if (target != NULL) - entry->ae_hardlinkset = 1; + entry->ae_set |= AE_SET_HARDLINK; + else + entry->ae_set &= ~AE_SET_HARDLINK; } void archive_entry_set_atime(struct archive_entry *entry, time_t t, long ns) { entry->stat_valid = 0; + entry->ae_set |= AE_SET_ATIME; entry->ae_stat.aest_atime = t; entry->ae_stat.aest_atime_nsec = ns; } void +archive_entry_unset_atime(struct archive_entry *entry) +{ + archive_entry_set_atime(entry, 0, 0); + entry->ae_set &= ~AE_SET_ATIME; +} + +void archive_entry_set_ctime(struct archive_entry *entry, time_t t, long ns) { entry->stat_valid = 0; + entry->ae_set |= AE_SET_CTIME; entry->ae_stat.aest_ctime = t; entry->ae_stat.aest_ctime_nsec = ns; } void +archive_entry_unset_ctime(struct archive_entry *entry) +{ + archive_entry_set_ctime(entry, 0, 0); + entry->ae_set &= ~AE_SET_CTIME; +} + +void archive_entry_set_dev(struct archive_entry *entry, dev_t d) { entry->stat_valid = 0; @@ -836,7 +881,7 @@ archive_entry_set_devminor(struct archiv void archive_entry_set_link(struct archive_entry *entry, const char *target) { - if (entry->ae_symlinkset) + if (entry->ae_set & AE_SET_SYMLINK) aes_set_mbs(&entry->ae_symlink, target); else aes_set_mbs(&entry->ae_hardlink, target); @@ -846,7 +891,7 @@ archive_entry_set_link(struct archive_en void archive_entry_copy_link(struct archive_entry *entry, const char *target) { - if (entry->ae_symlinkset) + if (entry->ae_set & AE_SET_SYMLINK) aes_copy_mbs(&entry->ae_symlink, target); else aes_copy_mbs(&entry->ae_hardlink, target); @@ -856,7 +901,7 @@ archive_entry_copy_link(struct archive_e void archive_entry_copy_link_w(struct archive_entry *entry, const wchar_t *target) { - if (entry->ae_symlinkset) + if (entry->ae_set & AE_SET_SYMLINK) aes_copy_wcs(&entry->ae_symlink, target); else aes_copy_wcs(&entry->ae_hardlink, target); @@ -865,7 +910,7 @@ archive_entry_copy_link_w(struct archive int archive_entry_update_link_utf8(struct archive_entry *entry, const char *target) { - if (entry->ae_symlinkset) + if (entry->ae_set & AE_SET_SYMLINK) return (aes_update_utf8(&entry->ae_symlink, target)); else return (aes_update_utf8(&entry->ae_hardlink, target)); @@ -882,11 +927,19 @@ void archive_entry_set_mtime(struct archive_entry *entry, time_t m, long ns) { entry->stat_valid = 0; + entry->ae_set |= AE_SET_MTIME; entry->ae_stat.aest_mtime = m; entry->ae_stat.aest_mtime_nsec = ns; } void +archive_entry_unset_mtime(struct archive_entry *entry) +{ + archive_entry_set_mtime(entry, 0, 0); + entry->ae_set &= ~AE_SET_MTIME; +} + +void archive_entry_set_nlink(struct archive_entry *entry, unsigned int nlink) { entry->stat_valid = 0; @@ -954,6 +1007,14 @@ archive_entry_set_size(struct archive_en { entry->stat_valid = 0; entry->ae_stat.aest_size = s; + entry->ae_set |= AE_SET_SIZE; +} + +void +archive_entry_unset_size(struct archive_entry *entry) +{ + archive_entry_set_size(entry, 0); + entry->ae_set &= ~AE_SET_SIZE; } void @@ -967,7 +1028,9 @@ archive_entry_set_symlink(struct archive { aes_set_mbs(&entry->ae_symlink, linkname); if (linkname != NULL) - entry->ae_symlinkset = 1; + entry->ae_set |= AE_SET_SYMLINK; + else + entry->ae_set &= ~AE_SET_SYMLINK; } void @@ -975,7 +1038,9 @@ archive_entry_copy_symlink(struct archiv { aes_copy_mbs(&entry->ae_symlink, linkname); if (linkname != NULL) - entry->ae_symlinkset = 1; + entry->ae_set |= AE_SET_SYMLINK; + else + entry->ae_set &= ~AE_SET_SYMLINK; } void @@ -983,7 +1048,9 @@ archive_entry_copy_symlink_w(struct arch { aes_copy_wcs(&entry->ae_symlink, linkname); if (linkname != NULL) - entry->ae_symlinkset = 1; + entry->ae_set |= AE_SET_SYMLINK; + else + entry->ae_set &= ~AE_SET_SYMLINK; } void Modified: stable/7/lib/libarchive/archive_entry.h ============================================================================== --- stable/7/lib/libarchive/archive_entry.h Fri Nov 28 19:58:31 2008 (r185407) +++ stable/7/lib/libarchive/archive_entry.h Fri Nov 28 20:08:47 2008 (r185408) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003-2007 Tim Kientzle + * Copyright (c) 2003-2008 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -152,12 +152,29 @@ __LA_DECL struct archive_entry *archive_ /* * Retrieve fields from an archive_entry. + * + * There are a number of implicit conversions among these fields. For + * example, if a regular string field is set and you read the _w wide + * character field, the entry will implicitly convert narrow-to-wide + * using the current locale. Similarly, dev values are automatically + * updated when you write devmajor or devminor and vice versa. + * + * In addition, fields can be "set" or "unset." Unset string fields + * return NULL, non-string fields have _is_set() functions to test + * whether they've been set. You can "unset" a string field by + * assigning NULL; non-string fields have _unset() functions to + * unset them. + * + * Note: There is one ambiguity in the above; string fields will + * also return NULL when implicit character set conversions fail. + * This is usually what you want. */ - __LA_DECL time_t archive_entry_atime(struct archive_entry *); __LA_DECL long archive_entry_atime_nsec(struct archive_entry *); +__LA_DECL int archive_entry_atime_is_set(struct archive_entry *); __LA_DECL time_t archive_entry_ctime(struct archive_entry *); __LA_DECL long archive_entry_ctime_nsec(struct archive_entry *); +__LA_DECL int archive_entry_ctime_is_set(struct archive_entry *); __LA_DECL dev_t archive_entry_dev(struct archive_entry *); __LA_DECL dev_t archive_entry_devmajor(struct archive_entry *); __LA_DECL dev_t archive_entry_devminor(struct archive_entry *); @@ -175,6 +192,7 @@ __LA_DECL __LA_INO_T archive_entry_ino( __LA_DECL __LA_MODE_T archive_entry_mode(struct archive_entry *); __LA_DECL time_t archive_entry_mtime(struct archive_entry *); __LA_DECL long archive_entry_mtime_nsec(struct archive_entry *); +__LA_DECL int archive_entry_mtime_is_set(struct archive_entry *); __LA_DECL unsigned int archive_entry_nlink(struct archive_entry *); __LA_DECL const char *archive_entry_pathname(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_pathname_w(struct archive_entry *); @@ -183,6 +201,7 @@ __LA_DECL dev_t archive_entry_rdevmajo __LA_DECL dev_t archive_entry_rdevminor(struct archive_entry *); __LA_DECL const char *archive_entry_sourcepath(struct archive_entry *); __LA_DECL int64_t archive_entry_size(struct archive_entry *); +__LA_DECL int archive_entry_size_is_set(struct archive_entry *); __LA_DECL const char *archive_entry_strmode(struct archive_entry *); __LA_DECL const char *archive_entry_symlink(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *); @@ -195,10 +214,16 @@ __LA_DECL const wchar_t *archive_entry_u * * Note that string 'set' functions do not copy the string, only the pointer. * In contrast, 'copy' functions do copy the object pointed to. + * + * Note: As of libarchive 2.4, 'set' functions do copy the string and + * are therefore exact synonyms for the 'copy' versions. The 'copy' + * names will be retired in libarchive 3.0. */ __LA_DECL void archive_entry_set_atime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_unset_atime(struct archive_entry *); __LA_DECL void archive_entry_set_ctime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_unset_ctime(struct archive_entry *); __LA_DECL void archive_entry_set_dev(struct archive_entry *, dev_t); __LA_DECL void archive_entry_set_devmajor(struct archive_entry *, dev_t); __LA_DECL void archive_entry_set_devminor(struct archive_entry *, dev_t); @@ -226,6 +251,7 @@ __LA_DECL void archive_entry_copy_link_w __LA_DECL int archive_entry_update_link_utf8(struct archive_entry *, const char *); __LA_DECL void archive_entry_set_mode(struct archive_entry *, __LA_MODE_T); __LA_DECL void archive_entry_set_mtime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_unset_mtime(struct archive_entry *); __LA_DECL void archive_entry_set_nlink(struct archive_entry *, unsigned int); __LA_DECL void archive_entry_set_pathname(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_pathname(struct archive_entry *, const char *); @@ -236,6 +262,7 @@ __LA_DECL void archive_entry_set_rdev(st __LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, dev_t); __LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, dev_t); __LA_DECL void archive_entry_set_size(struct archive_entry *, int64_t); +__LA_DECL void archive_entry_unset_size(struct archive_entry *); __LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *); __LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *); @@ -257,6 +284,7 @@ __LA_DECL int archive_entry_update_uname __LA_DECL const struct stat *archive_entry_stat(struct archive_entry *); __LA_DECL void archive_entry_copy_stat(struct archive_entry *, const struct stat *); + /* * ACL routines. This used to simply store and return text-format ACL * strings, but that proved insufficient for a number of reasons: Modified: stable/7/lib/libarchive/archive_entry_private.h ============================================================================== --- stable/7/lib/libarchive/archive_entry_private.h Fri Nov 28 19:58:31 2008 (r185407) +++ stable/7/lib/libarchive/archive_entry_private.h Fri Nov 28 20:08:47 2008 (r185408) @@ -136,6 +136,14 @@ struct archive_entry { dev_t aest_rdevminor; } ae_stat; + int ae_set; /* bitmap of fields that are currently set */ +#define AE_SET_HARDLINK 1 +#define AE_SET_SYMLINK 2 +#define AE_SET_ATIME 4 +#define AE_SET_CTIME 8 +#define AE_SET_MTIME 16 +#define AE_SET_SIZE 64 + /* * Use aes here so that we get transparent mbs<->wcs conversions. */ @@ -147,8 +155,6 @@ struct archive_entry { struct aes ae_pathname; /* Name of entry */ struct aes ae_symlink; /* symlink contents */ struct aes ae_uname; /* Name of owner */ - unsigned char ae_hardlinkset; - unsigned char ae_symlinkset; /* Not used within libarchive; useful for some clients. */ struct aes ae_sourcepath; /* Path this entry is sourced from. */ Modified: stable/7/lib/libarchive/archive_read_support_format_zip.c ============================================================================== --- stable/7/lib/libarchive/archive_read_support_format_zip.c Fri Nov 28 19:58:31 2008 (r185407) +++ stable/7/lib/libarchive/archive_read_support_format_zip.c Fri Nov 28 20:08:47 2008 (r185408) @@ -444,7 +444,9 @@ zip_read_file_header(struct archive_read archive_entry_set_mtime(entry, zip->mtime, 0); archive_entry_set_ctime(entry, zip->ctime, 0); archive_entry_set_atime(entry, zip->atime, 0); - archive_entry_set_size(entry, zip->uncompressed_size); + /* Set the size only if it's meaningful. */ + if (0 == (zip->flags & ZIP_LENGTH_AT_END)) + archive_entry_set_size(entry, zip->uncompressed_size); zip->entry_bytes_remaining = zip->compressed_size; zip->entry_offset = 0; @@ -573,12 +575,16 @@ archive_read_format_zip_read_data(struct } break; } + if (r != ARCHIVE_OK) + return (r); /* Update checksum */ - if (r == ARCHIVE_OK && *size) { + if (*size) zip->entry_crc32 = crc32(zip->entry_crc32, *buff, *size); - } - return (r); + /* Return EOF immediately if this is a non-regular file. */ + if (AE_IFREG != (zip->mode & AE_IFMT)) + return (ARCHIVE_EOF); + return (ARCHIVE_OK); } /* Modified: stable/7/lib/libarchive/archive_write_disk.c ============================================================================== --- stable/7/lib/libarchive/archive_write_disk.c Fri Nov 28 19:58:31 2008 (r185407) +++ stable/7/lib/libarchive/archive_write_disk.c Fri Nov 28 20:08:47 2008 (r185408) @@ -176,7 +176,7 @@ struct archive_write_disk { int fd; /* Current offset for writing data to the file. */ off_t offset; - /* Maximum size of file. */ + /* Maximum size of file, -1 if unknown. */ off_t filesize; /* Dir we were in before this restore; only for deep paths. */ int restore_pwd; @@ -231,7 +231,8 @@ static int set_time(struct archive_write static struct fixup_entry *sort_dir_list(struct fixup_entry *p); static gid_t trivial_lookup_gid(void *, const char *, gid_t); static uid_t trivial_lookup_uid(void *, const char *, uid_t); - +static ssize_t write_data_block(struct archive_write_disk *, + const char *, size_t, off_t); static struct archive_vtable *archive_write_disk_vtable(void); @@ -337,7 +338,10 @@ _archive_write_header(struct archive *_a a->offset = 0; a->uid = a->user_uid; a->mode = archive_entry_mode(a->entry); - a->filesize = archive_entry_size(a->entry); + if (archive_entry_size_is_set(a->entry)) + a->filesize = archive_entry_size(a->entry); + else + a->filesize = -1; archive_strcpy(&(a->_name_data), archive_entry_pathname(a->entry)); a->name = a->_name_data.s; archive_clear_error(&a->archive); @@ -439,15 +443,25 @@ _archive_write_header(struct archive *_a fe->mode = a->mode; } - if (a->deferred & TODO_TIMES) { + if ((a->deferred & TODO_TIMES) + && (archive_entry_mtime_is_set(entry) + || archive_entry_atime_is_set(entry))) { fe = current_fixup(a, archive_entry_pathname(entry)); fe->fixup |= TODO_TIMES; - fe->mtime = archive_entry_mtime(entry); - fe->mtime_nanos = archive_entry_mtime_nsec(entry); - fe->atime = archive_entry_atime(entry); - fe->atime_nanos = archive_entry_atime_nsec(entry); - if (fe->atime == 0 && fe->atime_nanos == 0) + if (archive_entry_mtime_is_set(entry)) { + fe->mtime = archive_entry_mtime(entry); + fe->mtime_nanos = archive_entry_mtime_nsec(entry); + } else { + fe->mtime = a->start_time; + fe->mtime_nanos = 0; + } + if (archive_entry_atime_is_set(entry)) { + fe->atime = archive_entry_atime(entry); + fe->atime_nanos = archive_entry_atime_nsec(entry); + } else { fe->atime = a->start_time; + fe->atime_nanos = 0; + } } if (a->deferred & TODO_FFLAGS) { @@ -486,89 +500,113 @@ archive_write_disk_set_skip_file(struct } static ssize_t -_archive_write_data_block(struct archive *_a, - const void *buff, size_t size, off_t offset) +write_data_block(struct archive_write_disk *a, + const char *buff, size_t size, off_t offset) { - struct archive_write_disk *a = (struct archive_write_disk *)_a; ssize_t bytes_written = 0; - ssize_t block_size, bytes_to_write; - int r = ARCHIVE_OK; + ssize_t block_size = 0, bytes_to_write; + int r; - __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, - ARCHIVE_STATE_DATA, "archive_write_disk_block"); - if (a->fd < 0) { - archive_set_error(&a->archive, 0, "File not open"); + if (a->filesize == 0 || a->fd < 0) { + archive_set_error(&a->archive, 0, + "Attempt to write to an empty file"); return (ARCHIVE_WARN); } - archive_clear_error(&a->archive); if (a->flags & ARCHIVE_EXTRACT_SPARSE) { if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK) return (r); block_size = a->pst->st_blksize; - } else - block_size = -1; - - if ((off_t)(offset + size) > a->filesize) { - size = (size_t)(a->filesize - a->offset); - archive_set_error(&a->archive, 0, - "Write request too large"); - r = ARCHIVE_WARN; } + if (a->filesize >= 0 && (off_t)(offset + size) > a->filesize) + size = (size_t)(a->filesize - offset); + /* Write the data. */ while (size > 0) { - if (block_size != -1) { - const char *buf; - - for (buf = buff; size; ++buf, --size, ++offset) { - if (*buf != '\0') + if (block_size == 0) { + bytes_to_write = size; + } else { + /* We're sparsifying the file. */ + const char *p, *end; + off_t block_end; + + /* Skip leading zero bytes. */ + for (p = buff, end = buff + size; p < end; ++p) { + if (*p != '\0') break; } + offset += p - buff; + size -= p - buff; + buff = p; if (size == 0) break; - bytes_to_write = block_size - offset % block_size; - buff = buf; - } else + + /* Calculate next block boundary after offset. */ + block_end + = (offset / block_size) * block_size + block_size; + + /* If the adjusted write would cross block boundary, + * truncate it to the block boundary. */ bytes_to_write = size; + if (offset + bytes_to_write > block_end) + bytes_to_write = block_end - offset; + } + /* Seek if necessary to the specified offset. */ if (offset != a->last_offset) { if (lseek(a->fd, offset, SEEK_SET) < 0) { - archive_set_error(&a->archive, errno, "Seek failed"); + archive_set_error(&a->archive, errno, + "Seek failed"); return (ARCHIVE_FATAL); } } - bytes_written = write(a->fd, buff, size); + bytes_written = write(a->fd, buff, bytes_to_write); if (bytes_written < 0) { archive_set_error(&a->archive, errno, "Write failed"); return (ARCHIVE_WARN); } - buff = (const char *)buff + bytes_written; + buff += bytes_written; size -= bytes_written; offset += bytes_written; a->archive.file_position += bytes_written; a->archive.raw_position += bytes_written; a->last_offset = a->offset = offset; } - a->offset = offset; - return (r); + return (bytes_written); +} + +static ssize_t +_archive_write_data_block(struct archive *_a, + const void *buff, size_t size, off_t offset) +{ + struct archive_write_disk *a = (struct archive_write_disk *)_a; + ssize_t r; + + __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, + ARCHIVE_STATE_DATA, "archive_write_disk_block"); + + r = write_data_block(a, buff, size, offset); + + if (r < 0) + return (r); + if ((size_t)r < size) { + archive_set_error(&a->archive, 0, + "Write request too large"); + return (ARCHIVE_WARN); + } + return (ARCHIVE_OK); } static ssize_t _archive_write_data(struct archive *_a, const void *buff, size_t size) { struct archive_write_disk *a = (struct archive_write_disk *)_a; - int r; __archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_DATA, "archive_write_data"); - if (a->fd < 0) - return (ARCHIVE_OK); - r = _archive_write_data_block(_a, buff, size, a->offset); - if (r < ARCHIVE_OK) - return (r); - return size; + return (write_data_block(a, buff, size, a->offset)); } static int @@ -584,7 +622,15 @@ _archive_write_finish_entry(struct archi return (ARCHIVE_OK); archive_clear_error(&a->archive); - if (a->last_offset != a->filesize && a->fd >= 0) { + /* Pad or truncate file to the right size. */ + if (a->fd < 0) { + /* There's no file. */ + } else if (a->filesize < 0) { + /* File size is unknown, so we can't set the size. */ + } else if (a->last_offset == a->filesize) { + /* Last write ended at exactly the filesize; we're done. */ + /* Hopefully, this is the common case. */ + } else { if (ftruncate(a->fd, a->filesize) == -1 && a->filesize == 0) { archive_set_error(&a->archive, errno, @@ -601,7 +647,8 @@ _archive_write_finish_entry(struct archi if (a->st.st_size != a->filesize) { const char nul = '\0'; if (lseek(a->fd, a->st.st_size - 1, SEEK_SET) < 0) { - archive_set_error(&a->archive, errno, "Seek failed"); + archive_set_error(&a->archive, errno, + "Seek failed"); return (ARCHIVE_FATAL); } if (write(a->fd, &nul, 1) < 0) { @@ -609,6 +656,7 @@ _archive_write_finish_entry(struct archi "Write to restore size failed"); return (ARCHIVE_FATAL); } + a->pst = NULL; } } @@ -975,7 +1023,7 @@ create_filesystem_object(struct archive_ * If the hardlink does carry data, let the last * archive entry decide ownership. */ - if (r == 0 && a->filesize == 0) { + if (r == 0 && a->filesize <= 0) { a->todo = 0; a->deferred = 0; } if (r == 0 && a->filesize > 0) { @@ -1635,18 +1683,31 @@ set_time(struct archive_write_disk *a) { struct timeval times[2]; - times[1].tv_sec = archive_entry_mtime(a->entry); - times[1].tv_usec = archive_entry_mtime_nsec(a->entry) / 1000; + /* If no time was provided, we're done. */ + if (!archive_entry_atime_is_set(a->entry) + && !archive_entry_mtime_is_set(a->entry)) + return (ARCHIVE_OK); - times[0].tv_sec = archive_entry_atime(a->entry); - times[0].tv_usec = archive_entry_atime_nsec(a->entry) / 1000; + /* We know at least one is set, so... */ + if (archive_entry_mtime_is_set(a->entry)) { + times[1].tv_sec = archive_entry_mtime(a->entry); + times[1].tv_usec = archive_entry_mtime_nsec(a->entry) / 1000; + } else { + times[1].tv_sec = a->start_time; + times[1].tv_usec = 0; + } /* If no atime was specified, use start time instead. */ /* In theory, it would be marginally more correct to use * time(NULL) here, but that would cost us an extra syscall * for little gain. */ - if (times[0].tv_sec == 0 && times[0].tv_usec == 0) + if (archive_entry_atime_is_set(a->entry)) { + times[0].tv_sec = archive_entry_atime(a->entry); + times[0].tv_usec = archive_entry_atime_nsec(a->entry) / 1000; + } else { times[0].tv_sec = a->start_time; + times[0].tv_usec = 0; + } #ifdef HAVE_FUTIMES if (a->fd >= 0 && futimes(a->fd, times) == 0) { @@ -1684,10 +1745,24 @@ set_time(struct archive_write_disk *a) { struct utimbuf times; - times.modtime = archive_entry_mtime(a->entry); - times.actime = archive_entry_atime(a->entry); - if (times.actime == 0) + /* If no time was provided, we're done. */ + if (!archive_entry_atime_is_set(a->entry) + && !archive_entry_mtime_is_set(a->entry)) + return (ARCHIVE_OK); + + /* We know at least one is set, so... */ + /* Set mtime from mtime if set, else start time. */ + if (archive_entry_mtime_is_set(a->entry)) + times.modtime = archive_entry_mtime(a->entry); + else + times.modtime = a->start_time; + + /* Set atime from provided atime, else mtime. */ + if (archive_entry_atime_is_set(a->entry)) + times.actime = archive_entry_atime(a->entry); + else times.actime = a->start_time; + if (!S_ISLNK(a->mode) && utime(a->name, ×) != 0) { archive_set_error(&a->archive, errno, "Can't update time for %s", a->name); Modified: stable/7/lib/libarchive/test/test_entry.c ============================================================================== --- stable/7/lib/libarchive/test/test_entry.c Fri Nov 28 19:58:31 2008 (r185407) +++ stable/7/lib/libarchive/test/test_entry.c Fri Nov 28 20:08:47 2008 (r185408) @@ -69,14 +69,25 @@ DEFINE_TEST(test_entry) * The following tests are ordered alphabetically by the * name of the field. */ + /* atime */ archive_entry_set_atime(e, 13579, 24680); assertEqualInt(archive_entry_atime(e), 13579); assertEqualInt(archive_entry_atime_nsec(e), 24680); + archive_entry_unset_atime(e); + assertEqualInt(archive_entry_atime(e), 0); + assertEqualInt(archive_entry_atime_nsec(e), 0); + assert(!archive_entry_atime_is_set(e)); + /* ctime */ archive_entry_set_ctime(e, 13580, 24681); assertEqualInt(archive_entry_ctime(e), 13580); assertEqualInt(archive_entry_ctime_nsec(e), 24681); + archive_entry_unset_ctime(e); + assertEqualInt(archive_entry_ctime(e), 0); + assertEqualInt(archive_entry_ctime_nsec(e), 0); + assert(!archive_entry_ctime_is_set(e)); + #if ARCHIVE_VERSION_STAMP >= 1009000 /* dev */ archive_entry_set_dev(e, 235); @@ -85,6 +96,7 @@ DEFINE_TEST(test_entry) skipping("archive_entry_dev()"); #endif /* devmajor/devminor are tested specially below. */ + #if ARCHIVE_VERSION_STAMP >= 1009000 /* filetype */ archive_entry_set_filetype(e, AE_IFREG); @@ -92,10 +104,13 @@ DEFINE_TEST(test_entry) #else skipping("archive_entry_filetype()"); #endif + /* fflags are tested specially below */ + /* gid */ archive_entry_set_gid(e, 204); assertEqualInt(archive_entry_gid(e), 204); + /* gname */ archive_entry_set_gname(e, "group"); assertEqualString(archive_entry_gname(e), "group"); @@ -104,6 +119,7 @@ DEFINE_TEST(test_entry) assertEqualWString(archive_entry_gname_w(e), L"wgroup"); memset(wbuff, 0, sizeof(wbuff)); assertEqualWString(archive_entry_gname_w(e), L"wgroup"); + /* hardlink */ archive_entry_set_hardlink(e, "hardlinkname"); assertEqualString(archive_entry_hardlink(e), "hardlinkname"); @@ -158,10 +174,16 @@ DEFINE_TEST(test_entry) /* mode */ archive_entry_set_mode(e, 0123456); assertEqualInt(archive_entry_mode(e), 0123456); + /* mtime */ archive_entry_set_mtime(e, 13581, 24682); assertEqualInt(archive_entry_mtime(e), 13581); assertEqualInt(archive_entry_mtime_nsec(e), 24682); + archive_entry_unset_mtime(e); + assertEqualInt(archive_entry_mtime(e), 0); + assertEqualInt(archive_entry_mtime_nsec(e), 0); + assert(!archive_entry_mtime_is_set(e)); + #if ARCHIVE_VERSION_STAMP >= 1009000 /* nlink */ archive_entry_set_nlink(e, 736); @@ -169,6 +191,7 @@ DEFINE_TEST(test_entry) #else skipping("archive_entry_nlink()"); #endif + /* pathname */ archive_entry_set_pathname(e, "path"); assertEqualString(archive_entry_pathname(e), "path"); @@ -184,6 +207,7 @@ DEFINE_TEST(test_entry) assertEqualWString(archive_entry_pathname_w(e), L"wpath"); memset(wbuff, 0, sizeof(wbuff)); assertEqualWString(archive_entry_pathname_w(e), L"wpath"); + #if ARCHIVE_VERSION_STAMP >= 1009000 /* rdev */ archive_entry_set_rdev(e, 532); @@ -192,9 +216,14 @@ DEFINE_TEST(test_entry) skipping("archive_entry_rdev()"); #endif /* rdevmajor/rdevminor are tested specially below. */ + /* size */ archive_entry_set_size(e, 987654321); assertEqualInt(archive_entry_size(e), 987654321); + archive_entry_unset_size(e); + assertEqualInt(archive_entry_size(e), 0); + assert(!archive_entry_size_is_set(e)); + /* symlink */ archive_entry_set_symlink(e, "symlinkname"); assertEqualString(archive_entry_symlink(e), "symlinkname"); @@ -207,9 +236,11 @@ DEFINE_TEST(test_entry) #endif archive_entry_copy_symlink_w(e, L"wsymlink"); assertEqualWString(archive_entry_symlink_w(e), L"wsymlink"); + /* uid */ archive_entry_set_uid(e, 83); assertEqualInt(archive_entry_uid(e), 83); + /* uname */ archive_entry_set_uname(e, "user"); assertEqualString(archive_entry_uname(e), "user"); Modified: stable/7/lib/libarchive/test/test_read_format_zip.c ============================================================================== --- stable/7/lib/libarchive/test/test_read_format_zip.c Fri Nov 28 19:58:31 2008 (r185407) +++ stable/7/lib/libarchive/test/test_read_format_zip.c Fri Nov 28 20:08:47 2008 (r185408) @@ -25,6 +25,12 @@ #include "test.h" __FBSDID("$FreeBSD$"); +/* + * The reference file for this has been manually tweaked so that: + * * file2 has length-at-end but file1 does not + * * file2 has an invalid CRC + */ + DEFINE_TEST(test_read_format_zip) { const char *refname = "test_read_format_zip.zip"; @@ -57,7 +63,8 @@ DEFINE_TEST(test_read_format_zip) assertA(0 == archive_read_next_header(a, &ae)); assertEqualString("file2", archive_entry_pathname(ae)); assertEqualInt(1179605932, archive_entry_mtime(ae)); - assertEqualInt(18, archive_entry_size(ae)); + failure("file2 has length-at-end, so we shouldn't see a valid size"); + assertEqualInt(0, archive_entry_size_is_set(ae)); failure("file2 has a bad CRC, so reading to end should fail"); assertEqualInt(ARCHIVE_WARN, archive_read_data(a, buff, 19)); assert(0 == memcmp(buff, "hello\nhello\nhello\n", 18)); Modified: stable/7/lib/libarchive/test/test_read_format_zip.zip.uu ============================================================================== --- stable/7/lib/libarchive/test/test_read_format_zip.zip.uu Fri Nov 28 19:58:31 2008 (r185407) +++ stable/7/lib/libarchive/test/test_read_format_zip.zip.uu Fri Nov 28 20:08:47 2008 (r185408) @@ -1,13 +1,14 @@ $FreeBSD$ begin 644 test_read_format_zip.zip -M4$L#!`H``````%EFLS8````````````````$`!4`9&ER+U54"0`#&55/1AE5 -M3T95>`0`Z`/H`U!+`P04````"`!O9K,V.C=F/0H````2````!0`5`&9I;&4Q -M550)``-!54]&K%M/1E5X!`#H`^@#RTC-R%8T$@H````2````!0`5`&9I;&4R550)``.L6T]&K%M/1E5X!`#H`^@#RTC- -MR%8T$@H````2````!0`-```````!````I(%Y```` -H9FEL93)55`4``ZQ;3T95>```4$L%!@`````#``,`OP```+L````````` +M4$L#!`H`"````%EFLS8````````````````$`!4`9&ER+U54"0`#&55/1M19 +M_4A5>`0`Z`/H`U!+!P@```````````````!02P,$%`````@`;V:S-CHW9CT* +M````$@````4`%0!F:6QE,554"0`#055/1L!9_4A5>`0`Z`/H`\M(S`0`Z`/H`\M(S```4$L!`A<#%``(``@`;V:S-CHW9CT*````$@````4`#0`` +M`````0```.V!1P```&9I;&4Q550%``-!54]&57@``%!+`0(7`Q0`"``(`%IJ +MLS8Z-V8]"@```!(````%``T```````$```#M@8D```!F:6QE,E54!0`#K%M/ +;1E5X``!02P4&``````,``P"_````VP`````` ` end Modified: stable/7/lib/libarchive/test/test_write_disk.c ============================================================================== --- stable/7/lib/libarchive/test/test_write_disk.c Fri Nov 28 19:58:31 2008 (r185407) +++ stable/7/lib/libarchive/test/test_write_disk.c Fri Nov 28 20:08:47 2008 (r185408) @@ -84,7 +84,7 @@ static void create_reg_file(struct archi * the entry being a maximum size. */ archive_entry_set_size(ae, sizeof(data)); - archive_entry_set_mtime(ae, 123456789, 0); + archive_entry_set_mtime(ae, 123456789, 0); assertEqualIntA(ad, 0, archive_write_header(ad, ae)); assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data))); assertEqualIntA(ad, 0, archive_write_finish_entry(ad)); @@ -152,6 +152,61 @@ static void create_reg_file2(struct arch free(compare); free(data); } + +static void create_reg_file3(struct archive_entry *ae, const char *msg) +{ + static const char data[]="abcdefghijklmnopqrstuvwxyz"; + struct archive *ad; + struct stat st; + + /* Write the entry to disk. */ + assert((ad = archive_write_disk_new()) != NULL); + failure("%s", msg); + /* Set the size smaller than the data and verify the truncation. */ + archive_entry_set_size(ae, 5); + assertEqualIntA(ad, 0, archive_write_header(ad, ae)); + assertEqualInt(5, archive_write_data(ad, data, sizeof(data))); + assertEqualIntA(ad, 0, archive_write_finish_entry(ad)); +#if ARCHIVE_VERSION_NUMBER < 2000000 + archive_write_finish(ad); +#else + assertEqualInt(0, archive_write_finish(ad)); +#endif + /* Test the entry on disk. */ + assert(0 == stat(archive_entry_pathname(ae), &st)); + failure("st.st_mode=%o archive_entry_mode(ae)=%o", + st.st_mode, archive_entry_mode(ae)); + assertEqualInt(st.st_mode, (archive_entry_mode(ae) & ~UMASK)); + assertEqualInt(st.st_size, 5); +} + + +static void create_reg_file4(struct archive_entry *ae, const char *msg) +{ + static const char data[]="abcdefghijklmnopqrstuvwxyz"; + struct archive *ad; + struct stat st; + + /* Write the entry to disk. */ + assert((ad = archive_write_disk_new()) != NULL); + /* Leave the size unset. The data should not be truncated. */ + assertEqualIntA(ad, 0, archive_write_header(ad, ae)); + assertEqualInt(ARCHIVE_OK, + archive_write_data_block(ad, data, sizeof(data), 0)); + assertEqualIntA(ad, 0, archive_write_finish_entry(ad)); +#if ARCHIVE_VERSION_NUMBER < 2000000 + archive_write_finish(ad); +#else + assertEqualInt(0, archive_write_finish(ad)); +#endif + /* Test the entry on disk. */ + assert(0 == stat(archive_entry_pathname(ae), &st)); + failure("st.st_mode=%o archive_entry_mode(ae)=%o", + st.st_mode, archive_entry_mode(ae)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Nov 28 20:13:24 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 476581065673; Fri, 28 Nov 2008 20:13:24 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 317AF8FC08; Fri, 28 Nov 2008 20:13:24 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mASKDOAG028811; Fri, 28 Nov 2008 20:13:24 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mASKDORv028810; Fri, 28 Nov 2008 20:13:24 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200811282013.mASKDORv028810@svn.freebsd.org> From: Tim Kientzle Date: Fri, 28 Nov 2008 20:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185410 - stable/7/usr.bin/tar X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2008 20:13:24 -0000 Author: kientzle Date: Fri Nov 28 20:13:23 2008 New Revision: 185410 URL: http://svn.freebsd.org/changeset/base/185410 Log: MFC r185359: Return a non-zero exit code when directories disappear during the filesystem traversal. Tested by: David Wolfskill Approved by: re Modified: stable/7/usr.bin/tar/ (props changed) stable/7/usr.bin/tar/write.c Modified: stable/7/usr.bin/tar/write.c ============================================================================== --- stable/7/usr.bin/tar/write.c Fri Nov 28 20:09:48 2008 (r185409) +++ stable/7/usr.bin/tar/write.c Fri Nov 28 20:13:23 2008 (r185410) @@ -659,8 +659,10 @@ write_hierarchy(struct bsdtar *bsdtar, s const struct stat *st = NULL, *lst = NULL; int descend; - if (tree_ret == TREE_ERROR_DIR) + if (tree_ret == TREE_ERROR_DIR) { bsdtar_warnc(bsdtar, errno, "%s: Couldn't visit directory", name); + bsdtar->return_value = 1; + } if (tree_ret != TREE_REGULAR) continue; lst = tree_current_lstat(tree); From owner-svn-src-stable@FreeBSD.ORG Fri Nov 28 22:06:31 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE048106573C; Fri, 28 Nov 2008 22:06:31 +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 C84908FC17; Fri, 28 Nov 2008 22:06:31 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mASM6Vb9031053; Fri, 28 Nov 2008 22:06:31 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mASM6Vos031052; Fri, 28 Nov 2008 22:06:31 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200811282206.mASM6Vos031052@svn.freebsd.org> From: Ken Smith Date: Fri, 28 Nov 2008 22:06:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185414 - stable/6/sys/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2008 22:06:32 -0000 Author: kensmith Date: Fri Nov 28 22:06:31 2008 New Revision: 185414 URL: http://svn.freebsd.org/changeset/base/185414 Log: 6.4-RELEASE is done so shift stable/6 over to 6.4-STABLE. Approved by: re (implicit) Modified: stable/6/sys/conf/newvers.sh Modified: stable/6/sys/conf/newvers.sh ============================================================================== --- stable/6/sys/conf/newvers.sh Fri Nov 28 20:47:48 2008 (r185413) +++ stable/6/sys/conf/newvers.sh Fri Nov 28 22:06:31 2008 (r185414) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="6.4" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Sat Nov 29 03:17:30 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 201BF1065672; Sat, 29 Nov 2008 03:17:30 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 069E38FC17; Sat, 29 Nov 2008 03:17:30 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAT3HTvI037472; Sat, 29 Nov 2008 03:17:29 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAT3HTDc037471; Sat, 29 Nov 2008 03:17:29 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200811290317.mAT3HTDc037471@svn.freebsd.org> From: Tim Kientzle Date: Sat, 29 Nov 2008 03:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185423 - stable/7/sys/fs/cd9660 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 03:17:30 -0000 Author: kientzle Date: Sat Nov 29 03:17:29 2008 New Revision: 185423 URL: http://svn.freebsd.org/changeset/base/185423 Log: MFC r185361: timezone value is signed PR: kern/128934 Submitted by: J.R. Oldroyd Approved by: re Modified: stable/7/sys/fs/cd9660/cd9660_node.c Modified: stable/7/sys/fs/cd9660/cd9660_node.c ============================================================================== --- stable/7/sys/fs/cd9660/cd9660_node.c Sat Nov 29 02:28:05 2008 (r185422) +++ stable/7/sys/fs/cd9660/cd9660_node.c Sat Nov 29 03:17:29 2008 (r185423) @@ -242,7 +242,7 @@ cd9660_tstamp_conv7(pi,pu,ftype) minute = pi[4]; second = pi[5]; if(ftype != ISO_FTYPE_HIGH_SIERRA) - tz = pi[6]; + tz = ((signed char *)pi)[6]; /* Timezone value is signed. */ else /* original high sierra misses timezone data */ tz = 0; From owner-svn-src-stable@FreeBSD.ORG Sat Nov 29 05:10:30 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CFF31065679; Sat, 29 Nov 2008 05:10:30 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52E168FC13; Sat, 29 Nov 2008 05:10:30 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAT5AUDi039757; Sat, 29 Nov 2008 05:10:30 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAT5AUkb039756; Sat, 29 Nov 2008 05:10:30 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200811290510.mAT5AUkb039756@svn.freebsd.org> From: Tim Kientzle Date: Sat, 29 Nov 2008 05:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185426 - stable/7/sys/fs/cd9660 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 05:10:30 -0000 Author: kientzle Date: Sat Nov 29 05:10:30 2008 New Revision: 185426 URL: http://svn.freebsd.org/changeset/base/185426 Log: MFC r185334: Recognize Rockridge extensions even when the IEEE-standard extension name (as standardized in 1994) is used. PR: kern/128942 Submitted by: J.R. Oldroyd Approved by: re Modified: stable/7/sys/fs/cd9660/cd9660_rrip.c Modified: stable/7/sys/fs/cd9660/cd9660_rrip.c ============================================================================== --- stable/7/sys/fs/cd9660/cd9660_rrip.c Sat Nov 29 05:08:49 2008 (r185425) +++ stable/7/sys/fs/cd9660/cd9660_rrip.c Sat Nov 29 05:10:30 2008 (r185426) @@ -467,8 +467,12 @@ cd9660_rrip_extref(p,ana) ISO_RRIP_EXTREF *p; ISO_RRIP_ANALYZE *ana; { - if (isonum_711(p->len_id) != 10 - || bcmp((char *)p + 8,"RRIP_1991A",10) + if ( ! ((isonum_711(p->len_id) == 10 + && bcmp((char *)p + 8,"RRIP_1991A",10) == 0) + || (isonum_711(p->len_id) == 10 + && bcmp((char *)p + 8,"IEEE_P1282",10) == 0) + || (isonum_711(p->len_id) == 9 + && bcmp((char *)p + 8,"IEEE_1282", 9) == 0)) || isonum_711(p->version) != 1) return 0; ana->fields &= ~ISO_SUSP_EXTREF; From owner-svn-src-stable@FreeBSD.ORG Sat Nov 29 14:49:57 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10CC21065672; Sat, 29 Nov 2008 14:49:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7EEE8FC13; Sat, 29 Nov 2008 14:49:56 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mATEnuUU054183; Sat, 29 Nov 2008 14:49:56 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mATEnuIG054182; Sat, 29 Nov 2008 14:49:56 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811291449.mATEnuIG054182@svn.freebsd.org> From: Robert Watson Date: Sat, 29 Nov 2008 14:49:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185437 - in stable/7/contrib/smbfs: . lib/smb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 14:49:57 -0000 Author: rwatson Date: Sat Nov 29 14:49:56 2008 New Revision: 185437 URL: http://svn.freebsd.org/changeset/base/185437 Log: Merge r184567 from head to stable/7: When encoding an smb name, truncate one byte earlier in order than we did previously in order to ensure it fit properly in the bufer when encoded. This prevents a debugging printf from firing if a source or destination host name for an smb mount exceeds 15 characters. Obtained from: Apple, Inc. Approved by: re (kensmith) Modified: stable/7/contrib/smbfs/ (props changed) stable/7/contrib/smbfs/lib/smb/nb_name.c Modified: stable/7/contrib/smbfs/lib/smb/nb_name.c ============================================================================== --- stable/7/contrib/smbfs/lib/smb/nb_name.c Sat Nov 29 14:34:30 2008 (r185436) +++ stable/7/contrib/smbfs/lib/smb/nb_name.c Sat Nov 29 14:49:56 2008 (r185437) @@ -169,7 +169,7 @@ nb_name_encode(struct nb_name *np, u_cha memsetw(cp + 2, NB_NAMELEN - 1, NBENCODE(' ')); cp += NB_ENCNAMELEN; } else { - for (i = 0; *name && i < NB_NAMELEN; i++, cp += 2, name++) + for (i = 0; *name && i < NB_NAMELEN - 1; i++, cp += 2, name++) *(u_short*)cp = NBENCODE(toupper(*name)); i = NB_NAMELEN - i - 1; if (i > 0) { From owner-svn-src-stable@FreeBSD.ORG Sat Nov 29 14:58:59 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14B8B1065672; Sat, 29 Nov 2008 14:58:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DFAF8FC17; Sat, 29 Nov 2008 14:58:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mATEwxTm054505; Sat, 29 Nov 2008 14:58:59 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mATEwx32054504; Sat, 29 Nov 2008 14:58:59 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811291458.mATEwx32054504@svn.freebsd.org> From: Robert Watson Date: Sat, 29 Nov 2008 14:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185440 - stable/7/sys/security/mac_bsdextended X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 14:58:59 -0000 Author: rwatson Date: Sat Nov 29 14:58:58 2008 New Revision: 185440 URL: http://svn.freebsd.org/changeset/base/185440 Log: Merge r184367 from head to stable/7: When the mac_bsdextended policy is unloaded, free rule memory. Obtained from: TrustedBSD Project Approved by: re (kensmith) Modified: stable/7/sys/security/mac_bsdextended/mac_bsdextended.c Modified: stable/7/sys/security/mac_bsdextended/mac_bsdextended.c ============================================================================== --- stable/7/sys/security/mac_bsdextended/mac_bsdextended.c Sat Nov 29 14:57:58 2008 (r185439) +++ stable/7/sys/security/mac_bsdextended/mac_bsdextended.c Sat Nov 29 14:58:58 2008 (r185440) @@ -208,7 +208,12 @@ ugidfw_init(struct mac_policy_conf *mpc) static void ugidfw_destroy(struct mac_policy_conf *mpc) { + int i; + for (i = 0; i < MAC_BSDEXTENDED_MAXRULES; i++) { + if (rules[i] != NULL) + free(rules[i], M_MACBSDEXTENDED); + } mtx_destroy(&ugidfw_mtx); } From owner-svn-src-stable@FreeBSD.ORG Sat Nov 29 17:33:38 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E2CD1065670; Sat, 29 Nov 2008 17:33:38 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C5518FC0A; Sat, 29 Nov 2008 17:33:38 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mATHXcEE057777; Sat, 29 Nov 2008 17:33:38 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mATHXcJt057774; Sat, 29 Nov 2008 17:33:38 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200811291733.mATHXcJt057774@svn.freebsd.org> From: Robert Noland Date: Sat, 29 Nov 2008 17:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185443 - in stable/7/sys: . pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 17:33:38 -0000 Author: rnoland Date: Sat Nov 29 17:33:38 2008 New Revision: 185443 URL: http://svn.freebsd.org/changeset/base/185443 Log: MFC r183555: Correctly handle Intel g33 chips and add support for g45 chips. g33 based chips use a different method of identifying the gtt size. g45 based chips gtt is located in a different area of stolen memory. Approved by: re@ (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/pci/agp_i810.c stable/7/sys/pci/agpreg.h Modified: stable/7/sys/pci/agp_i810.c ============================================================================== --- stable/7/sys/pci/agp_i810.c Sat Nov 29 17:14:06 2008 (r185442) +++ stable/7/sys/pci/agp_i810.c Sat Nov 29 17:33:38 2008 (r185443) @@ -70,6 +70,7 @@ enum { CHIP_I915, /* 915G/915GM */ CHIP_I965, /* G965 */ CHIP_G33, /* G33/Q33/Q35 */ + CHIP_G4X, /* G45/Q45 */ }; /* The i810 through i855 have the registers at BAR 1, and the GATT gets @@ -133,7 +134,7 @@ static const struct agp_i810_match { {0x25628086, CHIP_I830, 0x00020000, "Intel 82845M (845M GMCH) SVGA controller"}, {0x35828086, CHIP_I855, 0x00020000, - "Intel 82852/5"}, + "Intel 82852/855GM SVGA controller"}, {0x25728086, CHIP_I855, 0x00020000, "Intel 82865G (865G GMCH) SVGA controller"}, {0x25828086, CHIP_I915, 0x00020000, @@ -154,18 +155,26 @@ static const struct agp_i810_match { "Intel G965 SVGA controller"}, {0x29928086, CHIP_I965, 0x00020000, "Intel Q965 SVGA controller"}, - {0x29a28086, CHIP_I965, 0x00020000, + {0x29A28086, CHIP_I965, 0x00020000, "Intel G965 SVGA controller"}, - {0x29b28086, CHIP_G33, 0x00020000, + {0x29B28086, CHIP_G33, 0x00020000, "Intel Q35 SVGA controller"}, - {0x29c28086, CHIP_G33, 0x00020000, + {0x29C28086, CHIP_G33, 0x00020000, "Intel G33 SVGA controller"}, - {0x29d28086, CHIP_G33, 0x00020000, + {0x29D28086, CHIP_G33, 0x00020000, "Intel Q33 SVGA controller"}, - {0x2a028086, CHIP_I965, 0x00020000, + {0x2A028086, CHIP_I965, 0x00020000, "Intel GM965 SVGA controller"}, - {0x2a128086, CHIP_I965, 0x00020000, + {0x2A128086, CHIP_I965, 0x00020000, "Intel GME965 SVGA controller"}, + {0x2A428086, CHIP_I965, 0x00020000, + "Intel GM45 SVGA controller"}, + {0x2E028086, CHIP_G4X, 0x00020000, + "Intel 4 Series SVGA controller"}, + {0x2E128086, CHIP_G4X, 0x00020000, + "Intel Q45 SVGA controller"}, + {0x2E228086, CHIP_G4X, 0x00020000, + "Intel G45 SVGA controller"}, {0, 0, 0, NULL} }; @@ -377,6 +386,7 @@ agp_i810_attach(device_t dev) agp_set_aperture_resource(dev, AGP_I915_GMADR); break; case CHIP_I965: + case CHIP_G4X: sc->sc_res_spec = agp_i965_res_spec; agp_set_aperture_resource(dev, AGP_I915_GMADR); break; @@ -476,7 +486,8 @@ agp_i810_attach(device_t dev) gatt->ag_physical = pgtblctl & ~1; } else if (sc->chiptype == CHIP_I855 || sc->chiptype == CHIP_I915 || - sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33) { + sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_G4X) { unsigned int gcc1, pgtblctl, stolen, gtt_size; /* Stolen memory is set up at the beginning of the aperture by @@ -491,7 +502,6 @@ agp_i810_attach(device_t dev) gtt_size = 256; break; case CHIP_I965: - case CHIP_G33: switch (bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL) & AGP_I810_PGTBL_SIZE_MASK) { case AGP_I810_PGTBL_SIZE_128KB: @@ -503,6 +513,33 @@ agp_i810_attach(device_t dev) case AGP_I810_PGTBL_SIZE_512KB: gtt_size = 512; break; + case AGP_I965_PGTBL_SIZE_1MB: + gtt_size = 1024; + break; + case AGP_I965_PGTBL_SIZE_2MB: + gtt_size = 2048; + break; + case AGP_I965_PGTBL_SIZE_1_5MB: + gtt_size = 1024 + 512; + break; + default: + device_printf(dev, "Bad PGTBL size\n"); + bus_release_resources(dev, sc->sc_res_spec, + sc->sc_res); + free(gatt, M_AGP); + agp_generic_detach(dev); + return EINVAL; + } + break; + case CHIP_G33: + gcc1 = pci_read_config(sc->bdev, AGP_I855_GCC1, 2); + switch (gcc1 & AGP_G33_MGGC_GGMS_MASK) { + case AGP_G33_MGGC_GGMS_SIZE_1M: + gtt_size = 1024; + break; + case AGP_G33_MGGC_GGMS_SIZE_2M: + gtt_size = 2048; + break; default: device_printf(dev, "Bad PGTBL size\n"); bus_release_resources(dev, sc->sc_res_spec, @@ -512,6 +549,9 @@ agp_i810_attach(device_t dev) return EINVAL; } break; + case CHIP_G4X: + gtt_size = 0; + break; default: device_printf(dev, "Bad chiptype\n"); bus_release_resources(dev, sc->sc_res_spec, @@ -528,28 +568,86 @@ agp_i810_attach(device_t dev) stolen = 1024; break; case AGP_I855_GCC1_GMS_STOLEN_4M: - stolen = 4096; + stolen = 4 * 1024; break; case AGP_I855_GCC1_GMS_STOLEN_8M: - stolen = 8192; + stolen = 8 * 1024; break; case AGP_I855_GCC1_GMS_STOLEN_16M: - stolen = 16384; + stolen = 16 * 1024; break; case AGP_I855_GCC1_GMS_STOLEN_32M: - stolen = 32768; + stolen = 32 * 1024; break; case AGP_I915_GCC1_GMS_STOLEN_48M: - stolen = 49152; + if (sc->chiptype == CHIP_I915 || + sc->chiptype == CHIP_I965 || + sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_G4X) { + stolen = 48 * 1024; + } else { + stolen = 0; + } break; case AGP_I915_GCC1_GMS_STOLEN_64M: - stolen = 65536; + if (sc->chiptype == CHIP_I915 || + sc->chiptype == CHIP_I965 || + sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_G4X) { + stolen = 64 * 1024; + } else { + stolen = 0; + } break; case AGP_G33_GCC1_GMS_STOLEN_128M: - stolen = 128 * 1024; + if (sc->chiptype == CHIP_I965 || + sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_G4X) { + stolen = 128 * 1024; + } else { + stolen = 0; + } break; case AGP_G33_GCC1_GMS_STOLEN_256M: - stolen = 256 * 1024; + if (sc->chiptype == CHIP_I965 || + sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_G4X) { + stolen = 256 * 1024; + } else { + stolen = 0; + } + break; + case AGP_G4X_GCC1_GMS_STOLEN_96M: + if (sc->chiptype == CHIP_I965 || + sc->chiptype == CHIP_G4X) { + stolen = 96 * 1024; + } else { + stolen = 0; + } + break; + case AGP_G4X_GCC1_GMS_STOLEN_160M: + if (sc->chiptype == CHIP_I965 || + sc->chiptype == CHIP_G4X) { + stolen = 160 * 1024; + } else { + stolen = 0; + } + break; + case AGP_G4X_GCC1_GMS_STOLEN_224M: + if (sc->chiptype == CHIP_I965 || + sc->chiptype == CHIP_G4X) { + stolen = 224 * 1024; + } else { + stolen = 0; + } + break; + case AGP_G4X_GCC1_GMS_STOLEN_352M: + if (sc->chiptype == CHIP_I965 || + sc->chiptype == CHIP_G4X) { + stolen = 352 * 1024; + } else { + stolen = 0; + } break; default: device_printf(dev, "unknown memory configuration, " @@ -560,7 +658,11 @@ agp_i810_attach(device_t dev) agp_generic_detach(dev); return EINVAL; } - sc->stolen = (stolen - gtt_size - 4) * 1024 / 4096; + + if (sc->chiptype != CHIP_G4X) + gtt_size += 4; + + sc->stolen = (stolen - gtt_size) * 1024 / 4096; if (sc->stolen > 0) device_printf(dev, "detected %dk stolen memory\n", sc->stolen * 4); device_printf(dev, "aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); Modified: stable/7/sys/pci/agpreg.h ============================================================================== --- stable/7/sys/pci/agpreg.h Sat Nov 29 17:14:06 2008 (r185442) +++ stable/7/sys/pci/agpreg.h Sat Nov 29 17:33:38 2008 (r185443) @@ -215,7 +215,7 @@ #define AGP_I855_GCC1_DEV2 0x08 #define AGP_I855_GCC1_DEV2_ENABLED 0x00 #define AGP_I855_GCC1_DEV2_DISABLED 0x08 -#define AGP_I855_GCC1_GMS 0x70 +#define AGP_I855_GCC1_GMS 0xf0 /* Top bit reserved pre-G33 */ #define AGP_I855_GCC1_GMS_STOLEN_0M 0x00 #define AGP_I855_GCC1_GMS_STOLEN_1M 0x10 #define AGP_I855_GCC1_GMS_STOLEN_4M 0x20 @@ -259,14 +259,28 @@ #define AGP_I965_MSAC_GMASIZE_128 0x00 #define AGP_I965_MSAC_GMASIZE_256 0x02 #define AGP_I965_MSAC_GMASIZE_512 0x06 +#define AGP_I965_PGTBL_SIZE_1MB (3 << 1) +#define AGP_I965_PGTBL_SIZE_2MB (4 << 1) +#define AGP_I965_PGTBL_SIZE_1_5MB (5 << 1) /* * G33 registers */ +#define AGP_G33_MGGC_GGMS_MASK (3 << 8) +#define AGP_G33_MGGC_GGMS_SIZE_1M (1 << 8) +#define AGP_G33_MGGC_GGMS_SIZE_2M (2 << 8) #define AGP_G33_GCC1_GMS_STOLEN_128M 0x80 #define AGP_G33_GCC1_GMS_STOLEN_256M 0x90 /* + * G4X registers + */ +#define AGP_G4X_GCC1_GMS_STOLEN_96M 0xa0 +#define AGP_G4X_GCC1_GMS_STOLEN_160M 0xb0 +#define AGP_G4X_GCC1_GMS_STOLEN_224M 0xc0 +#define AGP_G4X_GCC1_GMS_STOLEN_352M 0xd0 + +/* * NVIDIA nForce/nForce2 registers */ #define AGP_NVIDIA_0_APBASE 0x10