From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 08:45:45 2009 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 43B061065676; Sun, 1 Nov 2009 08:45:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F2178FC18; Sun, 1 Nov 2009 08:45:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA18jjdW017751; Sun, 1 Nov 2009 08:45:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA18jice017741; Sun, 1 Nov 2009 08:45:44 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911010845.nA18jice017741@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 08:45:44 +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: r198742 - in stable/7/sys: . amd64/include arm/include contrib/pf i386/include ia64/include kern powerpc/include sparc64/include sun4v/include 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: Sun, 01 Nov 2009 08:45:45 -0000 Author: alc Date: Sun Nov 1 08:45:44 2009 New Revision: 198742 URL: http://svn.freebsd.org/changeset/base/198742 Log: MFC r197316 Add a new sysctl for reporting all of the supported page sizes. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/include/param.h stable/7/sys/arm/include/param.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/include/param.h stable/7/sys/ia64/include/param.h stable/7/sys/kern/kern_mib.c stable/7/sys/powerpc/include/param.h stable/7/sys/sparc64/include/param.h stable/7/sys/sun4v/include/param.h stable/7/sys/sys/systm.h Modified: stable/7/sys/amd64/include/param.h ============================================================================== --- stable/7/sys/amd64/include/param.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/amd64/include/param.h Sun Nov 1 08:45:44 2009 (r198742) @@ -115,6 +115,8 @@ #define NBPML4 (1ul<flags & SCTL_MASK32) { + /* + * Recreate the "pagesizes" array with 32-bit elements. Truncate + * any page size greater than UINT32_MAX to zero. + */ + for (i = 0; i < MAXPAGESIZES; i++) + pagesizes32[i] = (uint32_t)pagesizes[i]; + + error = SYSCTL_OUT(req, pagesizes32, sizeof(pagesizes32)); + } else +#endif + error = SYSCTL_OUT(req, pagesizes, sizeof(pagesizes)); + return (error); +} +SYSCTL_PROC(_hw, OID_AUTO, pagesizes, CTLTYPE_ULONG | CTLFLAG_RD, + NULL, 0, sysctl_hw_pagesizes, "LU", "Supported page sizes"); + static char machine_arch[] = MACHINE_ARCH; SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD, machine_arch, 0, "System architecture"); Modified: stable/7/sys/powerpc/include/param.h ============================================================================== --- stable/7/sys/powerpc/include/param.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/powerpc/include/param.h Sun Nov 1 08:45:44 2009 (r198742) @@ -81,6 +81,8 @@ #define PAGE_MASK (PAGE_SIZE - 1) #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) +#define MAXPAGESIZES 1 /* maximum number of supported page sizes */ + #ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* includes pcb */ #endif Modified: stable/7/sys/sparc64/include/param.h ============================================================================== --- stable/7/sys/sparc64/include/param.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/sparc64/include/param.h Sun Nov 1 08:45:44 2009 (r198742) @@ -107,6 +107,8 @@ #define PAGE_SIZE_MAX PAGE_SIZE_4M #define PAGE_MASK_MAX PAGE_MASK_4M +#define MAXPAGESIZES 1 /* maximum number of supported page sizes */ + #ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */ #endif Modified: stable/7/sys/sun4v/include/param.h ============================================================================== --- stable/7/sys/sun4v/include/param.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/sun4v/include/param.h Sun Nov 1 08:45:44 2009 (r198742) @@ -102,6 +102,8 @@ #define PAGE_SIZE_MAX PAGE_SIZE_4M #define PAGE_MASK_MAX PAGE_MASK_4M +#define MAXPAGESIZES 1 /* maximum number of supported page sizes */ + #ifndef KSTACK_PAGES #define KSTACK_PAGES 4 /* pages of kernel stack (with pcb) */ #endif Modified: stable/7/sys/sys/systm.h ============================================================================== --- stable/7/sys/sys/systm.h Sun Nov 1 08:20:30 2009 (r198741) +++ stable/7/sys/sys/systm.h Sun Nov 1 08:45:44 2009 (r198742) @@ -60,6 +60,7 @@ extern u_int nselcoll; /* select collis extern struct mtx sellock; /* select lock variable */ extern struct cv selwait; /* select conditional variable */ +extern u_long pagesizes[]; /* supported page sizes */ extern long physmem; /* physical memory */ extern long realmem; /* 'real' memory */ From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 08:48:31 2009 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 39988106566B; Sun, 1 Nov 2009 08:48:31 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27C6E8FC08; Sun, 1 Nov 2009 08:48:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA18mUJj017841; Sun, 1 Nov 2009 08:48:30 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA18mUNQ017838; Sun, 1 Nov 2009 08:48:30 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911010848.nA18mUNQ017838@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 08:48: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: r198743 - in stable/7/sys: . amd64/amd64 contrib/pf i386/i386 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, 01 Nov 2009 08:48:31 -0000 Author: alc Date: Sun Nov 1 08:48:30 2009 New Revision: 198743 URL: http://svn.freebsd.org/changeset/base/198743 Log: MFC r197317 When superpages are enabled, add the 2 or 4MB page size to the array of supported page sizes. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/i386/pmap.c Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Sun Nov 1 08:45:44 2009 (r198742) +++ stable/7/sys/amd64/amd64/pmap.c Sun Nov 1 08:48:30 2009 (r198743) @@ -666,6 +666,11 @@ pmap_init(void) * Are large page mappings enabled? */ TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled); + if (pg_ps_enabled) { + KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, + ("pmap_init: can't assign to pagesizes[1]")); + pagesizes[1] = NBPDR; + } /* * Calculate the size of the pv head table for superpages. Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Sun Nov 1 08:45:44 2009 (r198742) +++ stable/7/sys/i386/i386/pmap.c Sun Nov 1 08:48:30 2009 (r198743) @@ -666,6 +666,11 @@ pmap_init(void) * Are large page mappings enabled? */ TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled); + if (pg_ps_enabled) { + KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, + ("pmap_init: can't assign to pagesizes[1]")); + pagesizes[1] = NBPDR; + } /* * Calculate the size of the pv head table for superpages. From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 10:01:39 2009 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 63B4E1065670; Sun, 1 Nov 2009 10:01:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 515F58FC19; Sun, 1 Nov 2009 10:01:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1A1drG019270; Sun, 1 Nov 2009 10:01:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1A1dQn019268; Sun, 1 Nov 2009 10:01:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911011001.nA1A1dQn019268@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Nov 2009 10:01:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198744 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris conf contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 01 Nov 2009 10:01:39 -0000 Author: mav Date: Sun Nov 1 10:01:39 2009 New Revision: 198744 URL: http://svn.freebsd.org/changeset/base/198744 Log: MFC rev. 198623: Add missing ATA kernel options dependencies. Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/files stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sun Nov 1 08:48:30 2009 (r198743) +++ stable/8/sys/conf/files Sun Nov 1 10:01:39 2009 (r198744) @@ -517,14 +517,14 @@ dev/ata/chipsets/ata-highpoint.c optiona dev/ata/chipsets/ata-intel.c optional ata pci | ataintel dev/ata/chipsets/ata-ite.c optional ata pci | ataite dev/ata/chipsets/ata-jmicron.c optional ata pci | atajmicron -dev/ata/chipsets/ata-marvell.c optional ata pci | atamarvell +dev/ata/chipsets/ata-marvell.c optional ata pci | atamarvell | ataadaptec dev/ata/chipsets/ata-micron.c optional ata pci | atamicron dev/ata/chipsets/ata-national.c optional ata pci | atanational dev/ata/chipsets/ata-netcell.c optional ata pci | atanetcell dev/ata/chipsets/ata-nvidia.c optional ata pci | atanvidia dev/ata/chipsets/ata-promise.c optional ata pci | atapromise dev/ata/chipsets/ata-serverworks.c optional ata pci | ataserverworks -dev/ata/chipsets/ata-siliconimage.c optional ata pci | atasiliconimage +dev/ata/chipsets/ata-siliconimage.c optional ata pci | atasiliconimage | ataati dev/ata/chipsets/ata-sis.c optional ata pci | atasis dev/ata/chipsets/ata-via.c optional ata pci | atavia dev/ata/ata-disk.c optional atadisk From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 10:30:31 2009 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 6B40C1065679; Sun, 1 Nov 2009 10:30:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5774A8FC08; Sun, 1 Nov 2009 10:30:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1AUVQO019968; Sun, 1 Nov 2009 10:30:31 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1AUVsN019962; Sun, 1 Nov 2009 10:30:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200911011030.nA1AUVsN019962@svn.freebsd.org> From: Ed Schouten Date: Sun, 1 Nov 2009 10:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 10:30:31 -0000 Author: ed Date: Sun Nov 1 10:30:30 2009 New Revision: 198745 URL: http://svn.freebsd.org/changeset/base/198745 Log: MFC various commits back to stable/8: SVN r197174: Make sure we never place the cursor outside the screen. For some vague reason, it may be possible that scp->cursor_pos exceeds scp->ysize * scp->xsize. This means that teken_set_cursor() may get called with an invalid position. Just ignore the old cursor position in this case. Reported by: Paul B. Mahol SVN r198213: Make lock devices work properly. It turned out I did add the code to use the init state devices to set the termios structure when opening the device, but it seems I totally forgot to add the bits required to force the actual locking of flags through the lock state devices. Reported by: ru SVN r198215, r198217: Fix a typo in the jail(8) manpage. Submitted by: Jille Timmermans SVN r198216: Fix qouting in a comment, to make it look more consistent Submitted by: Jille Timmermans SVN r198223: Properly set the low watermarks when reducing the baud rate. Now that buffers are deallocated lazily, we should not use tty*q_getsize() to obtain the buffer size to calculate the low watermarks. Doing this may cause the watermark to be placed outside the typical buffer size. This caused some regressions after my previous commit to the TTY code, which allows pseudo-devices to resize the buffers as well. Reported by: yongari, dougb Modified: stable/8/etc/ (props changed) stable/8/etc/rc.subr stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/syscons/scterm-teken.c stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/tty.c stable/8/sys/sys/ttyqueue.h stable/8/usr.sbin/jail/ (props changed) stable/8/usr.sbin/jail/jail.8 Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/etc/rc.subr Sun Nov 1 10:30:30 2009 (r198745) @@ -565,7 +565,7 @@ run_rc_command() rc_fast=yes rc_quiet=yes ;; - force*) # "force prefix; always run + force*) # "force" prefix; always run rc_force=yes _rc_prefix=force rc_arg=${rc_arg#${_rc_prefix}} Modified: stable/8/sys/dev/syscons/scterm-teken.c ============================================================================== --- stable/8/sys/dev/syscons/scterm-teken.c Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/sys/dev/syscons/scterm-teken.c Sun Nov 1 10:30:30 2009 (r198745) @@ -130,9 +130,12 @@ scteken_init(scr_stat *scp, void **softc tp.tp_col = scp->xsize; teken_set_winsize(&ts->ts_teken, &tp); - tp.tp_row = scp->cursor_pos / scp->xsize; - tp.tp_col = scp->cursor_pos % scp->xsize; - teken_set_cursor(&ts->ts_teken, &tp); + if (scp->cursor_pos < scp->ysize * scp->xsize) { + /* Valid old cursor position. */ + tp.tp_row = scp->cursor_pos / scp->xsize; + tp.tp_col = scp->cursor_pos % scp->xsize; + teken_set_cursor(&ts->ts_teken, &tp); + } break; } Modified: stable/8/sys/kern/tty.c ============================================================================== --- stable/8/sys/kern/tty.c Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/sys/kern/tty.c Sun Nov 1 10:30:30 2009 (r198745) @@ -109,14 +109,14 @@ tty_watermarks(struct tty *tp) ttyinq_setsize(&tp->t_inq, tp, bs); /* Set low watermark at 10% (when 90% is available). */ - tp->t_inlow = (ttyinq_getsize(&tp->t_inq) * 9) / 10; + tp->t_inlow = (ttyinq_getallocatedsize(&tp->t_inq) * 9) / 10; /* Provide an ouput buffer for 0.2 seconds of data. */ bs = MIN(tp->t_termios.c_ospeed / 5, TTYBUF_MAX); ttyoutq_setsize(&tp->t_outq, tp, bs); /* Set low watermark at 10% (when 90% is available). */ - tp->t_outlow = (ttyoutq_getsize(&tp->t_outq) * 9) / 10; + tp->t_outlow = (ttyoutq_getallocatedsize(&tp->t_outq) * 9) / 10; } static int @@ -523,6 +523,34 @@ ttydev_ioctl(struct cdev *dev, u_long cm goto done; } + if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { + struct termios *old = &tp->t_termios; + struct termios *new = (struct termios *)data; + struct termios *lock = TTY_CALLOUT(tp, dev) ? + &tp->t_termios_lock_out : &tp->t_termios_lock_in; + int cc; + + /* + * Lock state devices. Just overwrite the values of the + * commands that are currently in use. + */ + new->c_iflag = (old->c_iflag & lock->c_iflag) | + (new->c_iflag & ~lock->c_iflag); + new->c_oflag = (old->c_oflag & lock->c_oflag) | + (new->c_oflag & ~lock->c_oflag); + new->c_cflag = (old->c_cflag & lock->c_cflag) | + (new->c_cflag & ~lock->c_cflag); + new->c_lflag = (old->c_lflag & lock->c_lflag) | + (new->c_lflag & ~lock->c_lflag); + for (cc = 0; cc < NCCS; ++cc) + if (lock->c_cc[cc]) + new->c_cc[cc] = old->c_cc[cc]; + if (lock->c_ispeed) + new->c_ispeed = old->c_ispeed; + if (lock->c_ospeed) + new->c_ospeed = old->c_ospeed; + } + error = tty_ioctl(tp, cmd, data, td); done: tty_unlock(tp); Modified: stable/8/sys/sys/ttyqueue.h ============================================================================== --- stable/8/sys/sys/ttyqueue.h Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/sys/sys/ttyqueue.h Sun Nov 1 10:30:30 2009 (r198745) @@ -93,6 +93,13 @@ ttyinq_getsize(struct ttyinq *ti) } static __inline size_t +ttyinq_getallocatedsize(struct ttyinq *ti) +{ + + return (ti->ti_quota * TTYINQ_DATASIZE); +} + +static __inline size_t ttyinq_bytesleft(struct ttyinq *ti) { size_t len; @@ -143,6 +150,13 @@ ttyoutq_getsize(struct ttyoutq *to) } static __inline size_t +ttyoutq_getallocatedsize(struct ttyoutq *to) +{ + + return (to->to_quota * TTYOUTQ_DATASIZE); +} + +static __inline size_t ttyoutq_bytesleft(struct ttyoutq *to) { size_t len; Modified: stable/8/usr.sbin/jail/jail.8 ============================================================================== --- stable/8/usr.sbin/jail/jail.8 Sun Nov 1 10:01:39 2009 (r198744) +++ stable/8/usr.sbin/jail/jail.8 Sun Nov 1 10:30:30 2009 (r198745) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2009 +.Dd October 18, 2009 .Dt JAIL 8 .Os .Sh NAME @@ -377,7 +377,7 @@ Since raw sockets can be used to configu network subsystems, extra caution should be used where privileged access to jails is given out to untrusted parties. .It Va allow.chflags -Normally, priveleged users inside a jail are treated as unprivileged by +Normally, privileged users inside a jail are treated as unprivileged by .Xr chflags 2 . When this parameter is set, such users are treated as privileged, and may manipulate system file flags subject to the usual constraints on From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 10:56:03 2009 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 D8664106566C; Sun, 1 Nov 2009 10:56:03 +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 9257B8FC14; Sun, 1 Nov 2009 10:56:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Au3ne021537; Sun, 1 Nov 2009 10:56:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Au3ic021534; Sun, 1 Nov 2009 10:56:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911011056.nA1Au3ic021534@svn.freebsd.org> From: Christian Brueffer Date: Sun, 1 Nov 2009 10:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198746 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 10:56:04 -0000 Author: brueffer Date: Sun Nov 1 10:56:03 2009 New Revision: 198746 URL: http://svn.freebsd.org/changeset/base/198746 Log: MFC: r198609 Revert part of r198363, there is no "device cam", it is included in "device scbus". Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/atapicam.4 stable/8/share/man/man4/umass.4 Modified: stable/8/share/man/man4/atapicam.4 ============================================================================== --- stable/8/share/man/man4/atapicam.4 Sun Nov 1 10:30:30 2009 (r198745) +++ stable/8/share/man/man4/atapicam.4 Sun Nov 1 10:56:03 2009 (r198746) @@ -39,7 +39,6 @@ place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" -.Cd "device cam" .Cd "device ata" .Cd "device atapicam" .Ed Modified: stable/8/share/man/man4/umass.4 ============================================================================== --- stable/8/share/man/man4/umass.4 Sun Nov 1 10:30:30 2009 (r198745) +++ stable/8/share/man/man4/umass.4 Sun Nov 1 10:56:03 2009 (r198746) @@ -39,7 +39,6 @@ place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" -.Cd "device cam" .Cd "device usb" .Cd "device umass" .Ed From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 10:57:07 2009 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 B7B151065693; Sun, 1 Nov 2009 10:57:07 +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 A69A38FC18; Sun, 1 Nov 2009 10:57:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Av7HT021604; Sun, 1 Nov 2009 10:57:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Av71L021601; Sun, 1 Nov 2009 10:57:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911011057.nA1Av71L021601@svn.freebsd.org> From: Christian Brueffer Date: Sun, 1 Nov 2009 10:57:07 +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: r198747 - 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: Sun, 01 Nov 2009 10:57:07 -0000 Author: brueffer Date: Sun Nov 1 10:57:07 2009 New Revision: 198747 URL: http://svn.freebsd.org/changeset/base/198747 Log: MFC: r198609 Revert part of r198363, there is no "device cam", it is included in "device scbus". Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/atapicam.4 stable/7/share/man/man4/umass.4 Modified: stable/7/share/man/man4/atapicam.4 ============================================================================== --- stable/7/share/man/man4/atapicam.4 Sun Nov 1 10:56:03 2009 (r198746) +++ stable/7/share/man/man4/atapicam.4 Sun Nov 1 10:57:07 2009 (r198747) @@ -39,7 +39,6 @@ place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" -.Cd "device cam" .Cd "device ata" .Cd "device atapicam" .Ed Modified: stable/7/share/man/man4/umass.4 ============================================================================== --- stable/7/share/man/man4/umass.4 Sun Nov 1 10:56:03 2009 (r198746) +++ stable/7/share/man/man4/umass.4 Sun Nov 1 10:57:07 2009 (r198747) @@ -39,7 +39,6 @@ place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" -.Cd "device cam" .Cd "device usb" .Cd "device umass" .Ed From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 11:34:14 2009 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 5E9A3106566B; Sun, 1 Nov 2009 11:34:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C0888FC0A; Sun, 1 Nov 2009 11:34:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1BYDvP022375; Sun, 1 Nov 2009 11:34:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1BYD9f022372; Sun, 1 Nov 2009 11:34:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011134.nA1BYD9f022372@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 11:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198749 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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: Sun, 01 Nov 2009 11:34:14 -0000 Author: avg Date: Sun Nov 1 11:34:13 2009 New Revision: 198749 URL: http://svn.freebsd.org/changeset/base/198749 Log: MFC r197128,197325: add support for smbus controller found in AMD SB700 Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/pci/intpm.c stable/8/sys/pci/intpmreg.h Modified: stable/8/sys/pci/intpm.c ============================================================================== --- stable/8/sys/pci/intpm.c Sun Nov 1 11:31:06 2009 (r198748) +++ stable/8/sys/pci/intpm.c Sun Nov 1 11:34:13 2009 (r198749) @@ -53,6 +53,8 @@ struct intsmb_softc { void *irq_hand; device_t smbus; int isbusy; + int cfg_irq9; + int poll; struct mtx lock; }; @@ -96,6 +98,10 @@ intsmb_probe(device_t dev) #endif device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); break; + case 0x43851002: + device_set_desc(dev, "AMD SB600/700/710/750 SMBus Controller"); + /* XXX Maybe force polling right here? */ + break; default: return (ENXIO); } @@ -108,12 +114,24 @@ intsmb_attach(device_t dev) { struct intsmb_softc *sc = device_get_softc(dev); int error, rid, value; + int intr; char *str; sc->dev = dev; mtx_init(&sc->lock, device_get_nameunit(dev), "intsmb", MTX_DEF); + sc->cfg_irq9 = 0; +#ifndef NO_CHANGE_PCICONF + switch (pci_get_devid(dev)) { + case 0x71138086: /* Intel 82371AB */ + case 0x719b8086: /* Intel 82443MX */ + /* Changing configuration is allowed. */ + sc->cfg_irq9 = 1; + break; + } +#endif + rid = PCI_BASE_ADDR_SMB; sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); @@ -123,27 +141,42 @@ intsmb_attach(device_t dev) goto fail; } -#ifndef NO_CHANGE_PCICONF - pci_write_config(dev, PCIR_INTLINE, 0x9, 1); - pci_write_config(dev, PCI_HST_CFG_SMB, - PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); -#endif + if (sc->cfg_irq9) { + pci_write_config(dev, PCIR_INTLINE, 0x9, 1); + pci_write_config(dev, PCI_HST_CFG_SMB, + PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); + } value = pci_read_config(dev, PCI_HST_CFG_SMB, 1); - switch (value & 0xe) { + sc->poll = (value & PCI_INTR_SMB_ENABLE) == 0; + intr = value & PCI_INTR_SMB_MASK; + switch (intr) { case PCI_INTR_SMB_SMI: str = "SMI"; break; case PCI_INTR_SMB_IRQ9: str = "IRQ 9"; break; + case PCI_INTR_SMB_IRQ_PCI: + str = "PCI IRQ"; + break; default: str = "BOGUS"; } + device_printf(dev, "intr %s %s ", str, - (value & 1) ? "enabled" : "disabled"); + sc->poll == 0 ? "enabled" : "disabled"); printf("revision %d\n", pci_read_config(dev, PCI_REVID_SMB, 1)); - if ((value & 0xe) != PCI_INTR_SMB_IRQ9) { + if (!sc->poll && intr == PCI_INTR_SMB_SMI) { + device_printf(dev, + "using polling mode when configured interrupt is SMI\n"); + sc->poll = 1; + } + + if (sc->poll) + goto no_intr; + + if (intr != PCI_INTR_SMB_IRQ9 && intr != PCI_INTR_SMB_IRQ_PCI) { device_printf(dev, "Unsupported interrupt mode\n"); error = ENXIO; goto fail; @@ -151,7 +184,9 @@ intsmb_attach(device_t dev) /* Force IRQ 9. */ rid = 0; - bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + if (sc->cfg_irq9) + bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { @@ -167,6 +202,7 @@ intsmb_attach(device_t dev) goto fail; } +no_intr: sc->isbusy = 0; sc->smbus = device_add_child(dev, "smbus", -1); if (sc->smbus == NULL) { @@ -361,7 +397,7 @@ intsmb_start(struct intsmb_softc *sc, un tmp |= PIIX4_SMBHSTCNT_START; /* While not in autoconfiguration enable interrupts. */ - if (!cold && !nointr) + if (!sc->poll && !cold && !nointr) tmp |= PIIX4_SMBHSTCNT_INTREN; bus_write_1(sc->io_res, PIIX4_SMBHSTCNT, tmp); } @@ -411,8 +447,6 @@ intsmb_stop_poll(struct intsmb_softc *sc if (!(status & PIIX4_SMBHSTSTAT_BUSY)) { sc->isbusy = 0; error = intsmb_error(sc->dev, status); - if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR)) - device_printf(sc->dev, "unknown cause why?\n"); return (error); } } @@ -434,7 +468,7 @@ intsmb_stop(struct intsmb_softc *sc) INTSMB_LOCK_ASSERT(sc); - if (cold) + if (sc->poll || cold) /* So that it can use device during device probe on SMBus. */ return (intsmb_stop_poll(sc)); Modified: stable/8/sys/pci/intpmreg.h ============================================================================== --- stable/8/sys/pci/intpmreg.h Sun Nov 1 11:31:06 2009 (r198748) +++ stable/8/sys/pci/intpmreg.h Sun Nov 1 11:34:13 2009 (r198749) @@ -35,7 +35,9 @@ #define PCI_BASE_ADDR_SMB 0x90 /* IO BAR. */ #define PCI_BASE_ADDR_PM 0x40 #define PCI_HST_CFG_SMB 0xd2 /* Host Configuration */ +#define PCI_INTR_SMB_MASK 0xe #define PCI_INTR_SMB_SMI 0 +#define PCI_INTR_SMB_IRQ_PCI 2 #define PCI_INTR_SMB_IRQ9 8 #define PCI_INTR_SMB_ENABLE 1 #define PCI_SLV_CMD_SMB 0xd3 /*SLAVE COMMAND*/ From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 11:41:20 2009 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 8B7EE106566C; Sun, 1 Nov 2009 11:41:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E3338FC15; Sun, 1 Nov 2009 11:41:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1BfKTc022602; Sun, 1 Nov 2009 11:41:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1BfKcP022599; Sun, 1 Nov 2009 11:41:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011141.nA1BfKcP022599@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 11:41: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: r198751 - in stable/7/sys: . contrib/pf 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: Sun, 01 Nov 2009 11:41:20 -0000 Author: avg Date: Sun Nov 1 11:41:20 2009 New Revision: 198751 URL: http://svn.freebsd.org/changeset/base/198751 Log: MFC r197128,197325: add support for smbus controller found in AMD SB700 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/pci/intpm.c stable/7/sys/pci/intpmreg.h Modified: stable/7/sys/pci/intpm.c ============================================================================== --- stable/7/sys/pci/intpm.c Sun Nov 1 11:39:07 2009 (r198750) +++ stable/7/sys/pci/intpm.c Sun Nov 1 11:41:20 2009 (r198751) @@ -53,6 +53,8 @@ struct intsmb_softc { void *irq_hand; device_t smbus; int isbusy; + int cfg_irq9; + int poll; struct mtx lock; }; @@ -96,6 +98,10 @@ intsmb_probe(device_t dev) #endif device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); break; + case 0x43851002: + device_set_desc(dev, "AMD SB600/700/710/750 SMBus Controller"); + /* XXX Maybe force polling right here? */ + break; default: return (ENXIO); } @@ -108,12 +114,24 @@ intsmb_attach(device_t dev) { struct intsmb_softc *sc = device_get_softc(dev); int error, rid, value; + int intr; char *str; sc->dev = dev; mtx_init(&sc->lock, device_get_nameunit(dev), "intsmb", MTX_DEF); + sc->cfg_irq9 = 0; +#ifndef NO_CHANGE_PCICONF + switch (pci_get_devid(dev)) { + case 0x71138086: /* Intel 82371AB */ + case 0x719b8086: /* Intel 82443MX */ + /* Changing configuration is allowed. */ + sc->cfg_irq9 = 1; + break; + } +#endif + rid = PCI_BASE_ADDR_SMB; sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); @@ -123,27 +141,42 @@ intsmb_attach(device_t dev) goto fail; } -#ifndef NO_CHANGE_PCICONF - pci_write_config(dev, PCIR_INTLINE, 0x9, 1); - pci_write_config(dev, PCI_HST_CFG_SMB, - PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); -#endif + if (sc->cfg_irq9) { + pci_write_config(dev, PCIR_INTLINE, 0x9, 1); + pci_write_config(dev, PCI_HST_CFG_SMB, + PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); + } value = pci_read_config(dev, PCI_HST_CFG_SMB, 1); - switch (value & 0xe) { + sc->poll = (value & PCI_INTR_SMB_ENABLE) == 0; + intr = value & PCI_INTR_SMB_MASK; + switch (intr) { case PCI_INTR_SMB_SMI: str = "SMI"; break; case PCI_INTR_SMB_IRQ9: str = "IRQ 9"; break; + case PCI_INTR_SMB_IRQ_PCI: + str = "PCI IRQ"; + break; default: str = "BOGUS"; } + device_printf(dev, "intr %s %s ", str, - (value & 1) ? "enabled" : "disabled"); + sc->poll == 0 ? "enabled" : "disabled"); printf("revision %d\n", pci_read_config(dev, PCI_REVID_SMB, 1)); - if ((value & 0xe) != PCI_INTR_SMB_IRQ9) { + if (!sc->poll && intr == PCI_INTR_SMB_SMI) { + device_printf(dev, + "using polling mode when configured interrupt is SMI\n"); + sc->poll = 1; + } + + if (sc->poll) + goto no_intr; + + if (intr != PCI_INTR_SMB_IRQ9 && intr != PCI_INTR_SMB_IRQ_PCI) { device_printf(dev, "Unsupported interrupt mode\n"); error = ENXIO; goto fail; @@ -151,7 +184,9 @@ intsmb_attach(device_t dev) /* Force IRQ 9. */ rid = 0; - bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + if (sc->cfg_irq9) + bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { @@ -167,6 +202,7 @@ intsmb_attach(device_t dev) goto fail; } +no_intr: sc->isbusy = 0; sc->smbus = device_add_child(dev, "smbus", -1); if (sc->smbus == NULL) { @@ -361,7 +397,7 @@ intsmb_start(struct intsmb_softc *sc, un tmp |= PIIX4_SMBHSTCNT_START; /* While not in autoconfiguration enable interrupts. */ - if (!cold && !nointr) + if (!sc->poll && !cold && !nointr) tmp |= PIIX4_SMBHSTCNT_INTREN; bus_write_1(sc->io_res, PIIX4_SMBHSTCNT, tmp); } @@ -411,8 +447,6 @@ intsmb_stop_poll(struct intsmb_softc *sc if (!(status & PIIX4_SMBHSTSTAT_BUSY)) { sc->isbusy = 0; error = intsmb_error(sc->dev, status); - if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR)) - device_printf(sc->dev, "unknown cause why?\n"); return (error); } } @@ -434,7 +468,7 @@ intsmb_stop(struct intsmb_softc *sc) INTSMB_LOCK_ASSERT(sc); - if (cold) + if (sc->poll || cold) /* So that it can use device during device probe on SMBus. */ return (intsmb_stop_poll(sc)); Modified: stable/7/sys/pci/intpmreg.h ============================================================================== --- stable/7/sys/pci/intpmreg.h Sun Nov 1 11:39:07 2009 (r198750) +++ stable/7/sys/pci/intpmreg.h Sun Nov 1 11:41:20 2009 (r198751) @@ -35,7 +35,9 @@ #define PCI_BASE_ADDR_SMB 0x90 /* IO BAR. */ #define PCI_BASE_ADDR_PM 0x40 #define PCI_HST_CFG_SMB 0xd2 /* Host Configuration */ +#define PCI_INTR_SMB_MASK 0xe #define PCI_INTR_SMB_SMI 0 +#define PCI_INTR_SMB_IRQ_PCI 2 #define PCI_INTR_SMB_IRQ9 8 #define PCI_INTR_SMB_ENABLE 1 #define PCI_SLV_CMD_SMB 0xd3 /*SLAVE COMMAND*/ From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 15:31:29 2009 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 D15C5106566C; Sun, 1 Nov 2009 15:31:29 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 78F668FC2C; Sun, 1 Nov 2009 15:31:29 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 2B67C46B2A; Sun, 1 Nov 2009 10:31:29 -0500 (EST) Date: Sun, 1 Nov 2009 15:31:29 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <200911011030.nA1AUVsN019962@svn.freebsd.org> Message-ID: References: <200911011030.nA1AUVsN019962@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 15:31:29 -0000 On Sun, 1 Nov 2009, Ed Schouten wrote: > Log: > MFC various commits back to stable/8: Is there some relationship between the various changesets merged together here? One nice thing about grouping merged changesets in some way is that it makes backing them out more sensible if there's a problem (since you just revert the whole changeset, etc). Robert > > SVN r197174: > Make sure we never place the cursor outside the screen. > > For some vague reason, it may be possible that scp->cursor_pos exceeds > scp->ysize * scp->xsize. This means that teken_set_cursor() may get > called with an invalid position. Just ignore the old cursor position in > this case. > > Reported by: Paul B. Mahol > > SVN r198213: > Make lock devices work properly. > > It turned out I did add the code to use the init state devices to set > the termios structure when opening the device, but it seems I totally > forgot to add the bits required to force the actual locking of flags > through the lock state devices. > > Reported by: ru > > SVN r198215, r198217: > Fix a typo in the jail(8) manpage. > > Submitted by: Jille Timmermans > > SVN r198216: > Fix qouting in a comment, to make it look more consistent > > Submitted by: Jille Timmermans > > SVN r198223: > Properly set the low watermarks when reducing the baud rate. > > Now that buffers are deallocated lazily, we should not use > tty*q_getsize() to obtain the buffer size to calculate the low > watermarks. Doing this may cause the watermark to be placed outside the > typical buffer size. > > This caused some regressions after my previous commit to the TTY code, > which allows pseudo-devices to resize the buffers as well. > > Reported by: yongari, dougb > > Modified: > stable/8/etc/ (props changed) > stable/8/etc/rc.subr > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > stable/8/sys/dev/syscons/scterm-teken.c > stable/8/sys/dev/xen/xenpci/ (props changed) > stable/8/sys/kern/tty.c > stable/8/sys/sys/ttyqueue.h > stable/8/usr.sbin/jail/ (props changed) > stable/8/usr.sbin/jail/jail.8 > > Modified: stable/8/etc/rc.subr > ============================================================================== > --- stable/8/etc/rc.subr Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/etc/rc.subr Sun Nov 1 10:30:30 2009 (r198745) > @@ -565,7 +565,7 @@ run_rc_command() > rc_fast=yes > rc_quiet=yes > ;; > - force*) # "force prefix; always run > + force*) # "force" prefix; always run > rc_force=yes > _rc_prefix=force > rc_arg=${rc_arg#${_rc_prefix}} > > Modified: stable/8/sys/dev/syscons/scterm-teken.c > ============================================================================== > --- stable/8/sys/dev/syscons/scterm-teken.c Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/sys/dev/syscons/scterm-teken.c Sun Nov 1 10:30:30 2009 (r198745) > @@ -130,9 +130,12 @@ scteken_init(scr_stat *scp, void **softc > tp.tp_col = scp->xsize; > teken_set_winsize(&ts->ts_teken, &tp); > > - tp.tp_row = scp->cursor_pos / scp->xsize; > - tp.tp_col = scp->cursor_pos % scp->xsize; > - teken_set_cursor(&ts->ts_teken, &tp); > + if (scp->cursor_pos < scp->ysize * scp->xsize) { > + /* Valid old cursor position. */ > + tp.tp_row = scp->cursor_pos / scp->xsize; > + tp.tp_col = scp->cursor_pos % scp->xsize; > + teken_set_cursor(&ts->ts_teken, &tp); > + } > break; > } > > > Modified: stable/8/sys/kern/tty.c > ============================================================================== > --- stable/8/sys/kern/tty.c Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/sys/kern/tty.c Sun Nov 1 10:30:30 2009 (r198745) > @@ -109,14 +109,14 @@ tty_watermarks(struct tty *tp) > ttyinq_setsize(&tp->t_inq, tp, bs); > > /* Set low watermark at 10% (when 90% is available). */ > - tp->t_inlow = (ttyinq_getsize(&tp->t_inq) * 9) / 10; > + tp->t_inlow = (ttyinq_getallocatedsize(&tp->t_inq) * 9) / 10; > > /* Provide an ouput buffer for 0.2 seconds of data. */ > bs = MIN(tp->t_termios.c_ospeed / 5, TTYBUF_MAX); > ttyoutq_setsize(&tp->t_outq, tp, bs); > > /* Set low watermark at 10% (when 90% is available). */ > - tp->t_outlow = (ttyoutq_getsize(&tp->t_outq) * 9) / 10; > + tp->t_outlow = (ttyoutq_getallocatedsize(&tp->t_outq) * 9) / 10; > } > > static int > @@ -523,6 +523,34 @@ ttydev_ioctl(struct cdev *dev, u_long cm > goto done; > } > > + if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { > + struct termios *old = &tp->t_termios; > + struct termios *new = (struct termios *)data; > + struct termios *lock = TTY_CALLOUT(tp, dev) ? > + &tp->t_termios_lock_out : &tp->t_termios_lock_in; > + int cc; > + > + /* > + * Lock state devices. Just overwrite the values of the > + * commands that are currently in use. > + */ > + new->c_iflag = (old->c_iflag & lock->c_iflag) | > + (new->c_iflag & ~lock->c_iflag); > + new->c_oflag = (old->c_oflag & lock->c_oflag) | > + (new->c_oflag & ~lock->c_oflag); > + new->c_cflag = (old->c_cflag & lock->c_cflag) | > + (new->c_cflag & ~lock->c_cflag); > + new->c_lflag = (old->c_lflag & lock->c_lflag) | > + (new->c_lflag & ~lock->c_lflag); > + for (cc = 0; cc < NCCS; ++cc) > + if (lock->c_cc[cc]) > + new->c_cc[cc] = old->c_cc[cc]; > + if (lock->c_ispeed) > + new->c_ispeed = old->c_ispeed; > + if (lock->c_ospeed) > + new->c_ospeed = old->c_ospeed; > + } > + > error = tty_ioctl(tp, cmd, data, td); > done: tty_unlock(tp); > > > Modified: stable/8/sys/sys/ttyqueue.h > ============================================================================== > --- stable/8/sys/sys/ttyqueue.h Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/sys/sys/ttyqueue.h Sun Nov 1 10:30:30 2009 (r198745) > @@ -93,6 +93,13 @@ ttyinq_getsize(struct ttyinq *ti) > } > > static __inline size_t > +ttyinq_getallocatedsize(struct ttyinq *ti) > +{ > + > + return (ti->ti_quota * TTYINQ_DATASIZE); > +} > + > +static __inline size_t > ttyinq_bytesleft(struct ttyinq *ti) > { > size_t len; > @@ -143,6 +150,13 @@ ttyoutq_getsize(struct ttyoutq *to) > } > > static __inline size_t > +ttyoutq_getallocatedsize(struct ttyoutq *to) > +{ > + > + return (to->to_quota * TTYOUTQ_DATASIZE); > +} > + > +static __inline size_t > ttyoutq_bytesleft(struct ttyoutq *to) > { > size_t len; > > Modified: stable/8/usr.sbin/jail/jail.8 > ============================================================================== > --- stable/8/usr.sbin/jail/jail.8 Sun Nov 1 10:01:39 2009 (r198744) > +++ stable/8/usr.sbin/jail/jail.8 Sun Nov 1 10:30:30 2009 (r198745) > @@ -34,7 +34,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd July 25, 2009 > +.Dd October 18, 2009 > .Dt JAIL 8 > .Os > .Sh NAME > @@ -377,7 +377,7 @@ Since raw sockets can be used to configu > network subsystems, extra caution should be used where privileged access > to jails is given out to untrusted parties. > .It Va allow.chflags > -Normally, priveleged users inside a jail are treated as unprivileged by > +Normally, privileged users inside a jail are treated as unprivileged by > .Xr chflags 2 . > When this parameter is set, such users are treated as privileged, and > may manipulate system file flags subject to the usual constraints on > From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 15:43:36 2009 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 DA520106566B; Sun, 1 Nov 2009 15:43:36 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 9B5058FC0C; Sun, 1 Nov 2009 15:43:36 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C3E7D1CF70; Sun, 1 Nov 2009 16:43:35 +0100 (CET) Date: Sun, 1 Nov 2009 16:43:35 +0100 From: Ed Schouten To: Robert Watson Message-ID: <20091101154335.GJ1293@hoeg.nl> References: <200911011030.nA1AUVsN019962@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlXFiQcSFG/a+HqU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 15:43:37 -0000 --HlXFiQcSFG/a+HqU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Robert, * Robert Watson wrote: > Is there some relationship between the various changesets merged > together here? One nice thing about grouping merged changesets in > some way is that it makes backing them out more sensible if there's > a problem (since you just revert the whole changeset, etc). Well, it initially happened like this, because I wanted to merge back multiple changes back to releng/8 with re@'s approval. re@ required diff files to include commit messages and proper mergeinfo. Because I can't think of a way to prepare a larger set of patches that include proper mergeinfo without constantly reverting back and forth or keeping track of multiple 1.2 GB checkouts, I eventually just decided to create a bigger patch, so it was more an exception than a routine. Reverting patches shouldn't be a problem, because I could always just svn merge -c -123456 to revert individual commits. --=20 Ed Schouten WWW: http://80386.nl/ --HlXFiQcSFG/a+HqU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrtrKcACgkQ52SDGA2eCwVSaQCfdWZyR9hTrFO+cvI1pTd6q0Bu fbkAoIE8nt3tLb1DZE57KXPkbhp8vBHp =bUCl -----END PGP SIGNATURE----- --HlXFiQcSFG/a+HqU-- From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 16:41:07 2009 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 9ACC31065694; Sun, 1 Nov 2009 16:41:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6FB888FC19; Sun, 1 Nov 2009 16:41:07 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 0965546B39; Sun, 1 Nov 2009 11:41:07 -0500 (EST) Date: Sun, 1 Nov 2009 16:41:06 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <20091101154335.GJ1293@hoeg.nl> Message-ID: References: <200911011030.nA1AUVsN019962@svn.freebsd.org> <20091101154335.GJ1293@hoeg.nl> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 16:41:07 -0000 On Sun, 1 Nov 2009, Ed Schouten wrote: > * Robert Watson wrote: >> Is there some relationship between the various changesets merged together >> here? One nice thing about grouping merged changesets in some way is that >> it makes backing them out more sensible if there's a problem (since you >> just revert the whole changeset, etc). > > Well, it initially happened like this, because I wanted to merge back > multiple changes back to releng/8 with re@'s approval. re@ required diff > files to include commit messages and proper mergeinfo. > > Because I can't think of a way to prepare a larger set of patches that > include proper mergeinfo without constantly reverting back and forth or > keeping track of multiple 1.2 GB checkouts, I eventually just decided to > create a bigger patch, so it was more an exception than a routine. > > Reverting patches shouldn't be a problem, because I could always just svn > merge -c -123456 to revert individual commits. I had more in mind that instructions to locally roll back particular changesets to users will have weird side effects that they didn't have before. Robert From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:15:39 2009 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 001971065748; Sun, 1 Nov 2009 17:15:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE28E8FC13; Sun, 1 Nov 2009 17:15:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1HFcm4028975; Sun, 1 Nov 2009 17:15:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HFcpG028973; Sun, 1 Nov 2009 17:15:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011715.nA1HFcpG028973@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:15: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: r198755 - stable/7/usr.bin/fstat 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, 01 Nov 2009 17:15:39 -0000 Author: avg Date: Sun Nov 1 17:15:38 2009 New Revision: 198755 URL: http://svn.freebsd.org/changeset/base/198755 Log: MFC 196399: fstat: fix fsid comparison on systems with 64-bit long Modified: stable/7/usr.bin/fstat/ (props changed) stable/7/usr.bin/fstat/fstat.c stable/7/usr.bin/fstat/zfs.c Modified: stable/7/usr.bin/fstat/fstat.c ============================================================================== --- stable/7/usr.bin/fstat/fstat.c Sun Nov 1 17:05:08 2009 (r198754) +++ stable/7/usr.bin/fstat/fstat.c Sun Nov 1 17:15:38 2009 (r198755) @@ -649,7 +649,7 @@ devfs_filestat(struct vnode *vp, struct (void *)devfs_dirent.de_vnode, Pid); return 0; } - fsp->fsid = (long)mount.mnt_stat.f_fsid.val[0]; + fsp->fsid = (long)(uint32_t)mount.mnt_stat.f_fsid.val[0]; fsp->fileid = devfs_dirent.de_inode; fsp->mode = (devfs_dirent.de_mode & ~S_IFMT) | S_IFCHR; fsp->size = 0; Modified: stable/7/usr.bin/fstat/zfs.c ============================================================================== --- stable/7/usr.bin/fstat/zfs.c Sun Nov 1 17:05:08 2009 (r198754) +++ stable/7/usr.bin/fstat/zfs.c Sun Nov 1 17:15:38 2009 (r198755) @@ -117,7 +117,7 @@ zfs_filestat(struct vnode *vp, struct fi goto bad; } - fsp->fsid = (long)mount.mnt_stat.f_fsid.val[0]; + fsp->fsid = (long)(uint32_t)mount.mnt_stat.f_fsid.val[0]; fsp->fileid = *zid; /* * XXX: Shows up wrong in output, but UFS has this error too. Could From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:17:26 2009 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 A95D31065670; Sun, 1 Nov 2009 17:17:26 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 5BC688FC12; Sun, 1 Nov 2009 17:17:26 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 874776D41B; Sun, 1 Nov 2009 17:17:25 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 6F3DE84503; Sun, 1 Nov 2009 18:17:25 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <200911011030.nA1AUVsN019962@svn.freebsd.org> <20091101154335.GJ1293@hoeg.nl> Date: Sun, 01 Nov 2009 18:17:25 +0100 In-Reply-To: <20091101154335.GJ1293@hoeg.nl> (Ed Schouten's message of "Sun, 1 Nov 2009 16:43:35 +0100") Message-ID: <86hbtejhay.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , svn-src-stable-8@freebsd.org Subject: Re: svn commit: r198745 - in stable/8: etc sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/syscons sys/dev/xen/xenpci sys/kern sys/sys usr.sbin/jail 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, 01 Nov 2009 17:17:26 -0000 Ed Schouten writes: > Because I can't think of a way to prepare a larger set of patches that > include proper mergeinfo without constantly reverting back and forth or > keeping track of multiple 1.2 GB checkouts, I eventually just decided to > create a bigger patch, so it was more an exception than a routine. Use ZFS, snapshot a clean tree and create a separate clone for each patchset. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:36:37 2009 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 1872D106566C; Sun, 1 Nov 2009 17:36:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04A1C8FC1A; Sun, 1 Nov 2009 17:36:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Haaw7029491; Sun, 1 Nov 2009 17:36:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Haa10029490; Sun, 1 Nov 2009 17:36:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011736.nA1Haa10029490@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198756 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 17:36:37 -0000 Author: avg Date: Sun Nov 1 17:36:36 2009 New Revision: 198756 URL: http://svn.freebsd.org/changeset/base/198756 Log: MFC 197641: print_caddr_t: drop incorrect __unused from parameter Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/init_main.c Modified: stable/8/sys/kern/init_main.c ============================================================================== --- stable/8/sys/kern/init_main.c Sun Nov 1 17:15:38 2009 (r198755) +++ stable/8/sys/kern/init_main.c Sun Nov 1 17:36:36 2009 (r198756) @@ -284,7 +284,7 @@ restart: *************************************************************************** */ static void -print_caddr_t(void *data __unused) +print_caddr_t(void *data) { printf("%s", (char *)data); } From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:37:03 2009 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 B1A7710656C1; Sun, 1 Nov 2009 17:37:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5908FC17; Sun, 1 Nov 2009 17:37:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Hb3gJ029536; Sun, 1 Nov 2009 17:37:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Hb3Kl029534; Sun, 1 Nov 2009 17:37:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011737.nA1Hb3Kl029534@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:37:03 +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: r198757 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 17:37:03 -0000 Author: avg Date: Sun Nov 1 17:37:03 2009 New Revision: 198757 URL: http://svn.freebsd.org/changeset/base/198757 Log: MFC 197641: print_caddr_t: drop incorrect __unused from parameter Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/init_main.c Modified: stable/7/sys/kern/init_main.c ============================================================================== --- stable/7/sys/kern/init_main.c Sun Nov 1 17:36:36 2009 (r198756) +++ stable/7/sys/kern/init_main.c Sun Nov 1 17:37:03 2009 (r198757) @@ -284,7 +284,7 @@ restart: *************************************************************************** */ static void -print_caddr_t(void *data __unused) +print_caddr_t(void *data) { printf("%s", (char *)data); } From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:40:05 2009 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 97F361065670; Sun, 1 Nov 2009 17:40:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 842768FC15; Sun, 1 Nov 2009 17:40:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1He5X9029651; Sun, 1 Nov 2009 17:40:05 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1He5i5029649; Sun, 1 Nov 2009 17:40:05 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011740.nA1He5i5029649@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198758 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 17:40:05 -0000 Author: avg Date: Sun Nov 1 17:40:05 2009 New Revision: 198758 URL: http://svn.freebsd.org/changeset/base/198758 Log: MFC 197658: print machine in kernel boot version string PR: kern/126926 Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/init_main.c Modified: stable/8/sys/kern/init_main.c ============================================================================== --- stable/8/sys/kern/init_main.c Sun Nov 1 17:37:03 2009 (r198757) +++ stable/8/sys/kern/init_main.c Sun Nov 1 17:40:05 2009 (r198758) @@ -288,11 +288,24 @@ print_caddr_t(void *data) { printf("%s", (char *)data); } + +static void +print_version(void *data __unused) +{ + int len; + + /* Strip a trailing newline from version. */ + len = strlen(version); + while (len > 0 && version[len - 1] == '\n') + len--; + printf("%.*s %s\n", len, version, machine); +} + SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright); SYSINIT(trademark, SI_SUB_COPYRIGHT, SI_ORDER_SECOND, print_caddr_t, trademark); -SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_caddr_t, version); +SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_version, NULL); #ifdef WITNESS static char wit_warn[] = From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:43:00 2009 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 1091E106566B; Sun, 1 Nov 2009 17:43:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F22A68FC08; Sun, 1 Nov 2009 17:42:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Hgxt7029753; Sun, 1 Nov 2009 17:42:59 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Hgx0N029751; Sun, 1 Nov 2009 17:42:59 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011742.nA1Hgx0N029751@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:42: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: r198759 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 17:43:00 -0000 Author: avg Date: Sun Nov 1 17:42:59 2009 New Revision: 198759 URL: http://svn.freebsd.org/changeset/base/198759 Log: MFC 197658: print machine in kernel boot version string PR: kern/126926 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/init_main.c Modified: stable/7/sys/kern/init_main.c ============================================================================== --- stable/7/sys/kern/init_main.c Sun Nov 1 17:40:05 2009 (r198758) +++ stable/7/sys/kern/init_main.c Sun Nov 1 17:42:59 2009 (r198759) @@ -288,11 +288,24 @@ print_caddr_t(void *data) { printf("%s", (char *)data); } + +static void +print_version(void *data __unused) +{ + int len; + + /* Strip a trailing newline from version. */ + len = strlen(version); + while (len > 0 && version[len - 1] == '\n') + len--; + printf("%.*s %s\n", len, version, machine); +} + SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright); SYSINIT(trademark, SI_SUB_COPYRIGHT, SI_ORDER_SECOND, print_caddr_t, trademark); -SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_caddr_t, version); +SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_version, NULL); #ifdef WITNESS static char wit_warn[] = From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:45:38 2009 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 62826106568D; Sun, 1 Nov 2009 17:45:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E89E8FC18; Sun, 1 Nov 2009 17:45:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1HjbrL029895; Sun, 1 Nov 2009 17:45:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HjbrE029892; Sun, 1 Nov 2009 17:45:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011745.nA1HjbrE029892@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198760 - in stable/8/sys: . amd64/include amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 17:45:38 -0000 Author: avg Date: Sun Nov 1 17:45:37 2009 New Revision: 198760 URL: http://svn.freebsd.org/changeset/base/198760 Log: MFC 197647: cpufunc.h: unify/correct style of c extension names Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/cpufunc.h stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/i386/include/cpufunc.h Modified: stable/8/sys/amd64/include/cpufunc.h ============================================================================== --- stable/8/sys/amd64/include/cpufunc.h Sun Nov 1 17:42:59 2009 (r198759) +++ stable/8/sys/amd64/include/cpufunc.h Sun Nov 1 17:45:37 2009 (r198760) @@ -277,7 +277,7 @@ static __inline void mfence(void) { - __asm__ __volatile("mfence" : : : "memory"); + __asm __volatile("mfence" : : : "memory"); } static __inline void @@ -457,14 +457,14 @@ load_es(u_int sel) __asm __volatile("mov %0,%%es" : : "rm" (sel)); } -static inline void +static __inline void cpu_monitor(const void *addr, int extensions, int hints) { __asm __volatile("monitor;" : :"a" (addr), "c" (extensions), "d"(hints)); } -static inline void +static __inline void cpu_mwait(int extensions, int hints) { __asm __volatile("mwait;" : :"a" (hints), "c" (extensions)); Modified: stable/8/sys/i386/include/cpufunc.h ============================================================================== --- stable/8/sys/i386/include/cpufunc.h Sun Nov 1 17:42:59 2009 (r198759) +++ stable/8/sys/i386/include/cpufunc.h Sun Nov 1 17:45:37 2009 (r198760) @@ -132,14 +132,14 @@ enable_intr(void) #endif } -static inline void +static __inline void cpu_monitor(const void *addr, int extensions, int hints) { __asm __volatile("monitor;" : :"a" (addr), "c" (extensions), "d"(hints)); } -static inline void +static __inline void cpu_mwait(int extensions, int hints) { __asm __volatile("mwait;" : :"a" (hints), "c" (extensions)); From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:53:33 2009 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 62041106566C; Sun, 1 Nov 2009 17:53:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED8A8FC1B; Sun, 1 Nov 2009 17:53:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1HrXOv030110; Sun, 1 Nov 2009 17:53:33 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HrXW0030108; Sun, 1 Nov 2009 17:53:33 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011753.nA1HrXW0030108@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198761 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci i386/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: Sun, 01 Nov 2009 17:53:33 -0000 Author: avg Date: Sun Nov 1 17:53:33 2009 New Revision: 198761 URL: http://svn.freebsd.org/changeset/base/198761 Log: MFC 198271: add amdtemp to i386 NOTES Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/i386/conf/NOTES Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Sun Nov 1 17:45:37 2009 (r198760) +++ stable/8/sys/i386/conf/NOTES Sun Nov 1 17:53:33 2009 (r198761) @@ -786,8 +786,10 @@ device ichwd # Temperature sensors: # # coretemp: on-die sensor on Intel Core and newer CPUs +# amdtemp: on-die sensor on AMD K8/K10/K11 CPUs # device coretemp +device amdtemp # # CPU control pseudo-device. Provides access to MSRs, CPUID info and From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:54:49 2009 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 7BE0E1065670; Sun, 1 Nov 2009 17:54:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69DD78FC0A; Sun, 1 Nov 2009 17:54:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1HsnaQ030188; Sun, 1 Nov 2009 17:54:49 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HsngE030186; Sun, 1 Nov 2009 17:54:49 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011754.nA1HsngE030186@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:54:49 +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: r198762 - in stable/7/sys: . contrib/pf i386/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: Sun, 01 Nov 2009 17:54:49 -0000 Author: avg Date: Sun Nov 1 17:54:49 2009 New Revision: 198762 URL: http://svn.freebsd.org/changeset/base/198762 Log: MFC 198271: add amdtemp to i386 NOTES Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/conf/NOTES Modified: stable/7/sys/i386/conf/NOTES ============================================================================== --- stable/7/sys/i386/conf/NOTES Sun Nov 1 17:53:33 2009 (r198761) +++ stable/7/sys/i386/conf/NOTES Sun Nov 1 17:54:49 2009 (r198762) @@ -870,8 +870,10 @@ device ichwd # Temperature sensors: # # coretemp: on-die sensor on Intel Core and newer CPUs +# amdtemp: on-die sensor on AMD K8/K10/K11 CPUs # device coretemp +device amdtemp #--------------------------------------------------------------------------- # ISDN4BSD From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:56:46 2009 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 431F6106566B; Sun, 1 Nov 2009 17:56:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F8508FC08; Sun, 1 Nov 2009 17:56:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Hujp1030294; Sun, 1 Nov 2009 17:56:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HujOF030292; Sun, 1 Nov 2009 17:56:45 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011756.nA1HujOF030292@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198763 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci modules 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, 01 Nov 2009 17:56:46 -0000 Author: avg Date: Sun Nov 1 17:56:45 2009 New Revision: 198763 URL: http://svn.freebsd.org/changeset/base/198763 Log: MFC 198279: fix sorting of some amd* entries in some makefiles Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/Makefile Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Sun Nov 1 17:54:49 2009 (r198762) +++ stable/8/sys/modules/Makefile Sun Nov 1 17:56:45 2009 (r198763) @@ -18,10 +18,10 @@ SUBDIR= ${_3dfx} \ ${_aic} \ aic7xxx \ aio \ - ${_amd} \ - ${_amdtemp} \ alc \ ale \ + ${_amd} \ + ${_amdtemp} \ amr \ ${_an} \ ${_aout} \ From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 17:58:57 2009 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 510EC106568F; Sun, 1 Nov 2009 17:58:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2DB8FC0A; Sun, 1 Nov 2009 17:58:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Hwvcn030394; Sun, 1 Nov 2009 17:58:57 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1HwvF8030392; Sun, 1 Nov 2009 17:58:57 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011758.nA1HwvF8030392@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 17:58:57 +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: r198764 - in stable/7/sys: . contrib/pf modules 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, 01 Nov 2009 17:58:57 -0000 Author: avg Date: Sun Nov 1 17:58:56 2009 New Revision: 198764 URL: http://svn.freebsd.org/changeset/base/198764 Log: MFC 198279: fix sorting of some amd* entries in some makefiles Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/modules/Makefile Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Sun Nov 1 17:56:45 2009 (r198763) +++ stable/7/sys/modules/Makefile Sun Nov 1 17:58:56 2009 (r198764) @@ -16,10 +16,10 @@ SUBDIR= ${_3dfx} \ ${_aic} \ aic7xxx \ aio \ - ${_amd} \ - ${_amdtemp} \ alc \ ale \ + ${_amd} \ + ${_amdtemp} \ amr \ ${_an} \ ${_aout} \ From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 18:10:39 2009 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 F3B96106568F; Sun, 1 Nov 2009 18:10:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E20E38FC1E; Sun, 1 Nov 2009 18:10:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1IAcjm030829; Sun, 1 Nov 2009 18:10:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1IAc9A030827; Sun, 1 Nov 2009 18:10:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011810.nA1IAc9A030827@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198765 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 18:10:39 -0000 Author: avg Date: Sun Nov 1 18:10:38 2009 New Revision: 198765 URL: http://svn.freebsd.org/changeset/base/198765 Log: MFC 198279: fix sorting of some amd* entries in some makefiles Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/Makefile Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Sun Nov 1 17:58:56 2009 (r198764) +++ stable/8/share/man/man4/Makefile Sun Nov 1 18:10:38 2009 (r198765) @@ -30,8 +30,8 @@ MAN= aac.4 \ ale.4 \ altq.4 \ amd.4 \ - ${_amdtemp.4} \ ${_amdsmb.4} \ + ${_amdtemp.4} \ amr.4 \ an.4 \ arcmsr.4 \ From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 18:16:56 2009 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 01BC51065670; Sun, 1 Nov 2009 18:16:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E35BE8FC17; Sun, 1 Nov 2009 18:16:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1IGtdf031031; Sun, 1 Nov 2009 18:16:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1IGt7A031029; Sun, 1 Nov 2009 18:16:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011816.nA1IGt7A031029@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198766 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 18:16:56 -0000 Author: avg Date: Sun Nov 1 18:16:55 2009 New Revision: 198766 URL: http://svn.freebsd.org/changeset/base/198766 Log: MFC 198272, 198288: fix watchdogd(8) reference Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/ichwd.4 Modified: stable/8/share/man/man4/ichwd.4 ============================================================================== --- stable/8/share/man/man4/ichwd.4 Sun Nov 1 18:10:38 2009 (r198765) +++ stable/8/share/man/man4/ichwd.4 Sun Nov 1 18:16:55 2009 (r198766) @@ -66,7 +66,7 @@ it believes the WDT is disabled. .Sh SEE ALSO .Xr watchdog 4 , .Xr watchdog 8 , -.Xr watchdogd 8, +.Xr watchdogd 8 , .Xr watchdog 9 .Rs .%T Using the Intel ICH Family Watchdog Timer (WDT) From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 18:19:00 2009 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 E3874106568B; Sun, 1 Nov 2009 18:19:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D23EE8FC0A; Sun, 1 Nov 2009 18:19:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1IJ0NP031146; Sun, 1 Nov 2009 18:19:00 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1IJ0pq031144; Sun, 1 Nov 2009 18:19:00 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011819.nA1IJ0pq031144@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:19:00 +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: r198767 - 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: Sun, 01 Nov 2009 18:19:01 -0000 Author: avg Date: Sun Nov 1 18:19:00 2009 New Revision: 198767 URL: http://svn.freebsd.org/changeset/base/198767 Log: MFC 198272, 198288: fix watchdogd(8) reference Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/ichwd.4 Modified: stable/7/share/man/man4/ichwd.4 ============================================================================== --- stable/7/share/man/man4/ichwd.4 Sun Nov 1 18:16:55 2009 (r198766) +++ stable/7/share/man/man4/ichwd.4 Sun Nov 1 18:19:00 2009 (r198767) @@ -66,7 +66,7 @@ it believes the WDT is disabled. .Sh SEE ALSO .Xr watchdog 4 , .Xr watchdog 8 , -.Xr watchdogd 8, +.Xr watchdogd 8 , .Xr watchdog 9 .Rs .%T Using the Intel ICH Family Watchdog Timer (WDT) From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 18:39:26 2009 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 EA7151065670; Sun, 1 Nov 2009 18:39:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6F5A8FC13; Sun, 1 Nov 2009 18:39:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1IdQRd031725; Sun, 1 Nov 2009 18:39:26 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1IdQIL031721; Sun, 1 Nov 2009 18:39:26 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011839.nA1IdQIL031721@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:39:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198769 - in stable/8/sys: . amd64/include/xen amd64/pci cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/pci dev/xen/xenpci i386/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: Sun, 01 Nov 2009 18:39:27 -0000 Author: avg Date: Sun Nov 1 18:39:26 2009 New Revision: 198769 URL: http://svn.freebsd.org/changeset/base/198769 Log: MFC 197450: number of cleanups in i386 and amd64 pci md code Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/amd64/pci/pci_cfgreg.c stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/pci/pcireg.h stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/i386/pci/pci_cfgreg.c Modified: stable/8/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- stable/8/sys/amd64/pci/pci_cfgreg.c Sun Nov 1 18:25:11 2009 (r198768) +++ stable/8/sys/amd64/pci/pci_cfgreg.c Sun Nov 1 18:39:26 2009 (r198769) @@ -181,9 +181,9 @@ pci_cfgenable(unsigned bus, unsigned slo { int dataport = 0; - if (bus <= PCI_BUSMAX && slot < 32 && func <= PCI_FUNCMAX && - reg <= PCI_REGMAX && bytes != 3 && (unsigned) bytes <= 4 && - (reg & (bytes - 1)) == 0) { + if (bus <= PCI_BUSMAX && slot <= PCI_SLOTMAX && func <= PCI_FUNCMAX && + (unsigned)reg <= PCI_REGMAX && bytes != 3 && + (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { outl(CONF1_ADDR_PORT, (1 << 31) | (bus << 16) | (slot << 11) | (func << 8) | (reg & ~0x03)); dataport = CONF1_DATA_PORT + (reg & 0x03); @@ -281,7 +281,7 @@ pcie_cfgregopen(uint64_t base, uint8_t m * fall back to using type 1 config access instead. */ if (pci_cfgregopen() != 0) { - for (slot = 0; slot < 32; slot++) { + for (slot = 0; slot <= PCI_SLOTMAX; slot++) { val1 = pcireg_cfgread(0, slot, 0, 0, 4); if (val1 == 0xffffffff) continue; @@ -309,8 +309,8 @@ pciereg_cfgread(int bus, unsigned slot, volatile vm_offset_t va; int data = -1; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return (-1); va = PCIE_VADDR(pcie_base, reg, bus, slot, func); @@ -336,8 +336,8 @@ pciereg_cfgwrite(int bus, unsigned slot, { volatile vm_offset_t va; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return; va = PCIE_VADDR(pcie_base, reg, bus, slot, func); Modified: stable/8/sys/dev/pci/pcireg.h ============================================================================== --- stable/8/sys/dev/pci/pcireg.h Sun Nov 1 18:25:11 2009 (r198768) +++ stable/8/sys/dev/pci/pcireg.h Sun Nov 1 18:39:26 2009 (r198769) @@ -44,6 +44,7 @@ #define PCI_SLOTMAX 31 /* highest supported slot number */ #define PCI_FUNCMAX 7 /* highest supported function number */ #define PCI_REGMAX 255 /* highest supported config register addr. */ +#define PCIE_REGMAX 4095 /* highest supported config register addr. */ #define PCI_MAXHDRTYPE 2 /* PCI config header registers for all devices */ Modified: stable/8/sys/i386/pci/pci_cfgreg.c ============================================================================== --- stable/8/sys/i386/pci/pci_cfgreg.c Sun Nov 1 18:25:11 2009 (r198768) +++ stable/8/sys/i386/pci/pci_cfgreg.c Sun Nov 1 18:39:26 2009 (r198769) @@ -299,9 +299,9 @@ pci_cfgenable(unsigned bus, unsigned slo if (bus <= PCI_BUSMAX && slot < devmax && func <= PCI_FUNCMAX - && reg <= PCI_REGMAX + && (unsigned)reg <= PCI_REGMAX && bytes != 3 - && (unsigned) bytes <= 4 + && (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { switch (cfgmech) { case CFGMECH_PCIE: @@ -595,7 +595,7 @@ pcie_cfgregopen(uint64_t base, uint8_t m * fall back to using type 1 config access instead. */ if (pci_cfgregopen() != 0) { - for (slot = 0; slot < 32; slot++) { + for (slot = 0; slot <= PCI_SLOTMAX; slot++) { val1 = pcireg_cfgread(0, slot, 0, 0, 4); if (val1 == 0xffffffff) continue; @@ -661,8 +661,8 @@ pciereg_cfgread(int bus, unsigned slot, vm_paddr_t pa, papage; int data = -1; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000 || bytes > 4 || bytes == 3) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return (-1); critical_enter(); @@ -695,8 +695,8 @@ pciereg_cfgwrite(int bus, unsigned slot, volatile vm_offset_t va; vm_paddr_t pa, papage; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return; critical_enter(); From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 18:40:03 2009 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 91D76106568B; Sun, 1 Nov 2009 18:40:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9828FC0C; Sun, 1 Nov 2009 18:40:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Ie3Zs031783; Sun, 1 Nov 2009 18:40:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Ie3jC031779; Sun, 1 Nov 2009 18:40:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200911011840.nA1Ie3jC031779@svn.freebsd.org> From: Andriy Gapon Date: Sun, 1 Nov 2009 18:40:03 +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: r198770 - in stable/7/sys: . amd64/pci contrib/pf dev/pci i386/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: Sun, 01 Nov 2009 18:40:03 -0000 Author: avg Date: Sun Nov 1 18:40:03 2009 New Revision: 198770 URL: http://svn.freebsd.org/changeset/base/198770 Log: MFC 197450: number of cleanups in i386 and amd64 pci md code Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/pci/pci_cfgreg.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/pci/pcireg.h stable/7/sys/i386/pci/pci_cfgreg.c Modified: stable/7/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- stable/7/sys/amd64/pci/pci_cfgreg.c Sun Nov 1 18:39:26 2009 (r198769) +++ stable/7/sys/amd64/pci/pci_cfgreg.c Sun Nov 1 18:40:03 2009 (r198770) @@ -181,9 +181,9 @@ pci_cfgenable(unsigned bus, unsigned slo { int dataport = 0; - if (bus <= PCI_BUSMAX && slot < 32 && func <= PCI_FUNCMAX && - reg <= PCI_REGMAX && bytes != 3 && (unsigned) bytes <= 4 && - (reg & (bytes - 1)) == 0) { + if (bus <= PCI_BUSMAX && slot <= PCI_SLOTMAX && func <= PCI_FUNCMAX && + (unsigned)reg <= PCI_REGMAX && bytes != 3 && + (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { outl(CONF1_ADDR_PORT, (1 << 31) | (bus << 16) | (slot << 11) | (func << 8) | (reg & ~0x03)); dataport = CONF1_DATA_PORT + (reg & 0x03); @@ -281,7 +281,7 @@ pcie_cfgregopen(uint64_t base, uint8_t m * fall back to using type 1 config access instead. */ if (pci_cfgregopen() != 0) { - for (slot = 0; slot < 32; slot++) { + for (slot = 0; slot <= PCI_SLOTMAX; slot++) { val1 = pcireg_cfgread(0, slot, 0, 0, 4); if (val1 == 0xffffffff) continue; @@ -309,8 +309,8 @@ pciereg_cfgread(int bus, unsigned slot, volatile vm_offset_t va; int data = -1; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return (-1); va = PCIE_VADDR(pcie_base, reg, bus, slot, func); @@ -336,8 +336,8 @@ pciereg_cfgwrite(int bus, unsigned slot, { volatile vm_offset_t va; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return; va = PCIE_VADDR(pcie_base, reg, bus, slot, func); Modified: stable/7/sys/dev/pci/pcireg.h ============================================================================== --- stable/7/sys/dev/pci/pcireg.h Sun Nov 1 18:39:26 2009 (r198769) +++ stable/7/sys/dev/pci/pcireg.h Sun Nov 1 18:40:03 2009 (r198770) @@ -44,6 +44,7 @@ #define PCI_SLOTMAX 31 /* highest supported slot number */ #define PCI_FUNCMAX 7 /* highest supported function number */ #define PCI_REGMAX 255 /* highest supported config register addr. */ +#define PCIE_REGMAX 4095 /* highest supported config register addr. */ #define PCI_MAXHDRTYPE 2 /* PCI config header registers for all devices */ Modified: stable/7/sys/i386/pci/pci_cfgreg.c ============================================================================== --- stable/7/sys/i386/pci/pci_cfgreg.c Sun Nov 1 18:39:26 2009 (r198769) +++ stable/7/sys/i386/pci/pci_cfgreg.c Sun Nov 1 18:40:03 2009 (r198770) @@ -291,9 +291,9 @@ pci_cfgenable(unsigned bus, unsigned slo if (bus <= PCI_BUSMAX && slot < devmax && func <= PCI_FUNCMAX - && reg <= PCI_REGMAX + && (unsigned)reg <= PCI_REGMAX && bytes != 3 - && (unsigned) bytes <= 4 + && (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { switch (cfgmech) { case CFGMECH_PCIE: @@ -586,7 +586,7 @@ pcie_cfgregopen(uint64_t base, uint8_t m * fall back to using type 1 config access instead. */ if (pci_cfgregopen() != 0) { - for (slot = 0; slot < 32; slot++) { + for (slot = 0; slot <= PCI_SLOTMAX; slot++) { val1 = pcireg_cfgread(0, slot, 0, 0, 4); if (val1 == 0xffffffff) continue; @@ -651,8 +651,8 @@ pciereg_cfgread(int bus, unsigned slot, vm_paddr_t pa, papage; int data = -1; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000 || bytes > 4 || bytes == 3) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return (-1); critical_enter(); @@ -685,8 +685,8 @@ pciereg_cfgwrite(int bus, unsigned slot, volatile vm_offset_t va; vm_paddr_t pa, papage; - if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || - func > PCI_FUNCMAX || reg >= 0x1000) + if (bus < pcie_minbus || bus > pcie_maxbus || slot > PCI_SLOTMAX || + func > PCI_FUNCMAX || reg > PCIE_REGMAX) return; critical_enter(); From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 18:48:06 2009 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 EA1131065676; Sun, 1 Nov 2009 18:48:06 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D88EC8FC17; Sun, 1 Nov 2009 18:48:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1Im6Fi032015; Sun, 1 Nov 2009 18:48:06 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1Im6D5032013; Sun, 1 Nov 2009 18:48:06 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911011848.nA1Im6D5032013@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 18:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198771 - in stable/8/gnu/usr.bin/groff: . tmac 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, 01 Nov 2009 18:48:07 -0000 Author: alc Date: Sun Nov 1 18:48:06 2009 New Revision: 198771 URL: http://svn.freebsd.org/changeset/base/198771 Log: MFC r197393 Add FreeBSD 7.2 and 7.3. Modified: stable/8/gnu/usr.bin/groff/ (props changed) stable/8/gnu/usr.bin/groff/tmac/mdoc.local Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Nov 1 18:40:03 2009 (r198770) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Nov 1 18:48:06 2009 (r198771) @@ -72,6 +72,8 @@ .ds doc-operating-system-FreeBSD-6.3 6.3 .ds doc-operating-system-FreeBSD-6.4 6.4 .ds doc-operating-system-FreeBSD-7.1 7.1 +.ds doc-operating-system-FreeBSD-7.2 7.2 +.ds doc-operating-system-FreeBSD-7.3 7.3 .ds doc-operating-system-FreeBSD-8.0 8.0 . .\" Definitions not (yet) in doc-syms From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 19:22:08 2009 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 96B1910656A7; Sun, 1 Nov 2009 19:22:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 822988FC1A; Sun, 1 Nov 2009 19:22:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1JM87B032952; Sun, 1 Nov 2009 19:22:08 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1JM8OY032946; Sun, 1 Nov 2009 19:22:08 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911011922.nA1JM8OY032946@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 19:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198772 - in stable/8: lib/libc/gen sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/xen/xenpci 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: Sun, 01 Nov 2009 19:22:08 -0000 Author: alc Date: Sun Nov 1 19:22:07 2009 New Revision: 198772 URL: http://svn.freebsd.org/changeset/base/198772 Log: MFC r197331, r197394 Add getpagesizes(3). Added: stable/8/lib/libc/gen/getpagesizes.3 - copied, changed from r197331, head/lib/libc/gen/getpagesizes.3 stable/8/lib/libc/gen/getpagesizes.c - copied unchanged from r197331, head/lib/libc/gen/getpagesizes.c Modified: stable/8/lib/libc/gen/ (props changed) stable/8/lib/libc/gen/Makefile.inc stable/8/lib/libc/gen/Symbol.map stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/sys/mman.h Modified: stable/8/lib/libc/gen/Makefile.inc ============================================================================== --- stable/8/lib/libc/gen/Makefile.inc Sun Nov 1 18:48:06 2009 (r198771) +++ stable/8/lib/libc/gen/Makefile.inc Sun Nov 1 19:22:07 2009 (r198772) @@ -15,7 +15,7 @@ SRCS+= __getosreldate.c __xuname.c \ getbootfile.c getbsize.c \ getcap.c getcwd.c getdomainname.c getgrent.c getgrouplist.c \ gethostname.c getloadavg.c getlogin.c getmntinfo.c getnetgrent.c \ - getosreldate.c getpagesize.c \ + getosreldate.c getpagesize.c getpagesizes.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ @@ -51,8 +51,8 @@ MAN+= alarm.3 arc4random.3 \ getbootfile.3 getbsize.3 getcap.3 getcontext.3 getcwd.3 \ getdiskbyname.3 getdomainname.3 getfsent.3 \ getgrent.3 getgrouplist.3 gethostname.3 getloadavg.3 \ - getmntinfo.3 getnetgrent.3 getosreldate.3 \ - getpagesize.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \ + getmntinfo.3 getnetgrent.3 getosreldate.3 getpagesize.3 \ + getpagesizes.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \ getttyent.3 getusershell.3 getvfsbyname.3 \ glob.3 initgroups.3 isgreater.3 ldexp.3 lockf.3 makecontext.3 \ modf.3 \ Modified: stable/8/lib/libc/gen/Symbol.map ============================================================================== --- stable/8/lib/libc/gen/Symbol.map Sun Nov 1 18:48:06 2009 (r198771) +++ stable/8/lib/libc/gen/Symbol.map Sun Nov 1 19:22:07 2009 (r198772) @@ -366,6 +366,10 @@ FBSD_1.1 { tcsetsid; }; +FBSD_1.2 { + getpagesizes; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Copied and modified: stable/8/lib/libc/gen/getpagesizes.3 (from r197331, head/lib/libc/gen/getpagesizes.3) ============================================================================== --- head/lib/libc/gen/getpagesizes.3 Sat Sep 19 18:01:32 2009 (r197331, copy source) +++ stable/8/lib/libc/gen/getpagesizes.3 Sun Nov 1 19:22:07 2009 (r198772) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 19, 2009 +.Dd September 21, 2009 .Dt GETPAGESIZES 3 .Os .Sh NAME @@ -94,5 +94,6 @@ function first appeared in Solaris 9. This manual page was written in conjunction with a new but compatible implementation that was first released in .Fx 7.3 . -.Sh AUTHOR -.An Alan L. Cox Aq alc@cs.rice.edu +.Sh AUTHORS +This manual page was written by +.An Alan L. Cox Aq alc@cs.rice.edu . Copied: stable/8/lib/libc/gen/getpagesizes.c (from r197331, head/lib/libc/gen/getpagesizes.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libc/gen/getpagesizes.c Sun Nov 1 19:22:07 2009 (r198772, copy of r197331, head/lib/libc/gen/getpagesizes.c) @@ -0,0 +1,78 @@ +/*- + * Copyright (c) 2009 Alan L. Cox + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +/* + * Retrieves page size information from the system. Specifically, returns the + * number of distinct page sizes that are supported by the system, if + * "pagesize" is NULL and "nelem" is 0. Otherwise, assigns up to "nelem" of + * the system-supported page sizes to consecutive elements of the array + * referenced by "pagesize", and returns the number of such page sizes that it + * assigned to the array. These page sizes are expressed in bytes. + * + * The implementation of this function does not directly or indirectly call + * malloc(3) or any other dynamic memory allocator that may itself call this + * function. + */ +int +getpagesizes(size_t pagesize[], int nelem) +{ + static u_long ps[MAXPAGESIZES]; + static int nops; + size_t size; + int i; + + if (nelem < 0 || (nelem > 0 && pagesize == NULL)) { + errno = EINVAL; + return (-1); + } + /* Cache the result of the sysctl(2). */ + if (nops == 0) { + size = sizeof(ps); + if (sysctlbyname("hw.pagesizes", ps, &size, NULL, 0) == -1) + return (-1); + /* Count the number of page sizes that are supported. */ + nops = size / sizeof(ps[0]); + while (nops > 0 && ps[nops - 1] == 0) + nops--; + } + if (pagesize == NULL) + return (nops); + /* Return up to "nelem" page sizes from the cached result. */ + if (nelem > nops) + nelem = nops; + for (i = 0; i < nelem; i++) + pagesize[i] = ps[i]; + return (nelem); +} Modified: stable/8/sys/sys/mman.h ============================================================================== --- stable/8/sys/sys/mman.h Sun Nov 1 18:48:06 2009 (r198771) +++ stable/8/sys/sys/mman.h Sun Nov 1 19:22:07 2009 (r198772) @@ -208,6 +208,7 @@ __BEGIN_DECLS * posix_typed_mem_open(). */ #if __BSD_VISIBLE +int getpagesizes(size_t *, int); int madvise(void *, size_t, int); int mincore(const void *, size_t, char *); int minherit(void *, size_t, int); From owner-svn-src-stable@FreeBSD.ORG Sun Nov 1 20:24:17 2009 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 8512F1065676; Sun, 1 Nov 2009 20:24:17 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72E4F8FC23; Sun, 1 Nov 2009 20:24:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1KOHtd034444; Sun, 1 Nov 2009 20:24:17 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA1KOHvi034442; Sun, 1 Nov 2009 20:24:17 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911012024.nA1KOHvi034442@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 20:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198773 - in stable/8/lib/libc: . gen stdio stdtime string 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, 01 Nov 2009 20:24:17 -0000 Author: alc Date: Sun Nov 1 20:24:17 2009 New Revision: 198773 URL: http://svn.freebsd.org/changeset/base/198773 Log: MFC r197163 Add the FBSD_1.2 namespace. Reminded by: kib Modified: stable/8/lib/libc/ (props changed) stable/8/lib/libc/Versions.def stable/8/lib/libc/gen/ (props changed) stable/8/lib/libc/stdio/asprintf.c (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/string/ffsll.c (props changed) stable/8/lib/libc/string/flsll.c (props changed) stable/8/lib/libc/string/wcpcpy.c (props changed) stable/8/lib/libc/string/wcpncpy.c (props changed) Modified: stable/8/lib/libc/Versions.def ============================================================================== --- stable/8/lib/libc/Versions.def Sun Nov 1 19:22:07 2009 (r198772) +++ stable/8/lib/libc/Versions.def Sun Nov 1 20:24:17 2009 (r198773) @@ -1,5 +1,11 @@ # $FreeBSD$ +# +# Note: Whenever bumping the FBSD version, always make +# FBSDprivate_1.0 depend on the new FBSD version. +# This will keep it at the end of the dependency chain. +# + # This is our first version; it depends on no other. # This version was first added to 7.0-current. FBSD_1.0 { @@ -9,6 +15,10 @@ FBSD_1.0 { FBSD_1.1 { } FBSD_1.0; +# This version was first added to 9.0-current. +FBSD_1.2 { +} FBSD_1.1; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write @@ -16,4 +26,4 @@ FBSD_1.1 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.1; +} FBSD_1.2; From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 09:47:16 2009 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 55C911065670; Mon, 2 Nov 2009 09:47:16 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4417A8FC08; Mon, 2 Nov 2009 09:47:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA29lFVn051834; Mon, 2 Nov 2009 09:47:15 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA29lFbr051832; Mon, 2 Nov 2009 09:47:15 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <200911020947.nA29lFbr051832@svn.freebsd.org> From: Max Khon Date: Mon, 2 Nov 2009 09:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198783 - stable/8/sys/tools X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2009 09:47:16 -0000 Author: fjoe Date: Mon Nov 2 09:47:15 2009 New Revision: 198783 URL: http://svn.freebsd.org/changeset/base/198783 Log: MFC: Allow KMOD with hypens and dots. Modified: stable/8/sys/tools/fw_stub.awk Modified: stable/8/sys/tools/fw_stub.awk ============================================================================== --- stable/8/sys/tools/fw_stub.awk Mon Nov 2 08:31:00 2009 (r198782) +++ stable/8/sys/tools/fw_stub.awk Mon Nov 2 09:47:15 2009 (r198783) @@ -118,6 +118,8 @@ if (!num_files || !opt_m) cfilename = opt_c; ctmpfilename = cfilename ".tmp"; +modname = opt_m; +gsub(/[-\.]/, "_", modname); printc("#include \ #include \ @@ -139,7 +141,7 @@ for (file_i = 0; file_i < num_files; fil } printc("\nstatic int\n"\ -opt_m "_fw_modevent(module_t mod, int type, void *unused)\ +modname "_fw_modevent(module_t mod, int type, void *unused)\ {\ const struct firmware *fp, *parent;\ int error;\ @@ -206,14 +208,14 @@ printc("\t\treturn (error);\ return (EINVAL);\ }\ \ -static moduledata_t " opt_m "_fw_mod = {\ - \"" opt_m "_fw\",\ - " opt_m "_fw_modevent,\ +static moduledata_t " modname "_fw_mod = {\ + \"" modname "_fw\",\ + " modname "_fw_modevent,\ 0\ };\ -DECLARE_MODULE(" opt_m "_fw, " opt_m "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ -MODULE_VERSION(" opt_m "_fw, 1);\ -MODULE_DEPEND(" opt_m "_fw, firmware, 1, 1, 1);\ +DECLARE_MODULE(" modname "_fw, " modname "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ +MODULE_VERSION(" modname "_fw, 1);\ +MODULE_DEPEND(" modname "_fw, firmware, 1, 1, 1);\ "); if (opt_c) From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 09:47:41 2009 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 7D22F10656A6; Mon, 2 Nov 2009 09:47:41 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BCD58FC33; Mon, 2 Nov 2009 09:47:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA29lflY051883; Mon, 2 Nov 2009 09:47:41 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA29lfNG051881; Mon, 2 Nov 2009 09:47:41 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <200911020947.nA29lfNG051881@svn.freebsd.org> From: Max Khon Date: Mon, 2 Nov 2009 09:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198784 - stable/7/sys/tools X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2009 09:47:41 -0000 Author: fjoe Date: Mon Nov 2 09:47:41 2009 New Revision: 198784 URL: http://svn.freebsd.org/changeset/base/198784 Log: MFC: Allow KMOD with hypens and dots. Modified: stable/7/sys/tools/fw_stub.awk Modified: stable/7/sys/tools/fw_stub.awk ============================================================================== --- stable/7/sys/tools/fw_stub.awk Mon Nov 2 09:47:15 2009 (r198783) +++ stable/7/sys/tools/fw_stub.awk Mon Nov 2 09:47:41 2009 (r198784) @@ -118,6 +118,8 @@ if (!num_files || !opt_m) cfilename = opt_c; ctmpfilename = cfilename ".tmp"; +modname = opt_m; +gsub(/[-\.]/, "_", modname); printc("#include \ #include \ @@ -139,7 +141,7 @@ for (file_i = 0; file_i < num_files; fil } printc("\nstatic int\n"\ -opt_m "_fw_modevent(module_t mod, int type, void *unused)\ +modname "_fw_modevent(module_t mod, int type, void *unused)\ {\ const struct firmware *fp, *parent;\ int error;\ @@ -206,14 +208,14 @@ printc("\t\treturn (error);\ return (EINVAL);\ }\ \ -static moduledata_t " opt_m "_fw_mod = {\ - \"" opt_m "_fw\",\ - " opt_m "_fw_modevent,\ +static moduledata_t " modname "_fw_mod = {\ + \"" modname "_fw\",\ + " modname "_fw_modevent,\ 0\ };\ -DECLARE_MODULE(" opt_m "_fw, " opt_m "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ -MODULE_VERSION(" opt_m "_fw, 1);\ -MODULE_DEPEND(" opt_m "_fw, firmware, 1, 1, 1);\ +DECLARE_MODULE(" modname "_fw, " modname "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ +MODULE_VERSION(" modname "_fw, 1);\ +MODULE_DEPEND(" modname "_fw, firmware, 1, 1, 1);\ "); if (opt_c) From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 15:53:33 2009 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 0A8751065676; Mon, 2 Nov 2009 15:53:33 +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 D19148FC08; Mon, 2 Nov 2009 15:53:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2FrWAL061379; Mon, 2 Nov 2009 15:53:32 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2FrWpY061377; Mon, 2 Nov 2009 15:53:32 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021553.nA2FrWpY061377@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 15:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198792 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/drm dev/xen/xenpci 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, 02 Nov 2009 15:53:33 -0000 Author: rnoland Date: Mon Nov 2 15:53:32 2009 New Revision: 198792 URL: http://svn.freebsd.org/changeset/base/198792 Log: MFC 198691 Fix blitter support for RS880 chips Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/drm/r600_blit.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/drm/r600_blit.c ============================================================================== --- stable/8/sys/dev/drm/r600_blit.c Mon Nov 2 15:43:54 2009 (r198791) +++ stable/8/sys/dev/drm/r600_blit.c Mon Nov 2 15:53:32 2009 (r198792) @@ -1367,7 +1367,7 @@ set_vtx_resource(drm_radeon_private_t *d if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || - /*((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) ||*/ + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV710)) cp_set_surface_sync(dev_priv, R600_TC_ACTION_ENA, 48, gpu_addr); @@ -1509,7 +1509,7 @@ set_default_state(drm_radeon_private_t * case CHIP_RV610: case CHIP_RV620: case CHIP_RS780: - /*case CHIP_RS880:*/ + case CHIP_RS880: default: num_ps_gprs = 84; num_vs_gprs = 36; @@ -1591,7 +1591,7 @@ set_default_state(drm_radeon_private_t * if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || - /*((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) ||*/ + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV710)) sq_config = 0; else From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 15:54:41 2009 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 B2BAB10656C3; Mon, 2 Nov 2009 15:54:41 +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 A09298FC08; Mon, 2 Nov 2009 15:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2FsfFb061437; Mon, 2 Nov 2009 15:54:41 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2FsfbD061435; Mon, 2 Nov 2009 15:54:41 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021554.nA2FsfbD061435@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 15:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198793 - in stable/7/sys: . contrib/pf dev/drm 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, 02 Nov 2009 15:54:41 -0000 Author: rnoland Date: Mon Nov 2 15:54:41 2009 New Revision: 198793 URL: http://svn.freebsd.org/changeset/base/198793 Log: MFC 198691 Fix blitter support for RS880 chips Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/r600_blit.c Modified: stable/7/sys/dev/drm/r600_blit.c ============================================================================== --- stable/7/sys/dev/drm/r600_blit.c Mon Nov 2 15:53:32 2009 (r198792) +++ stable/7/sys/dev/drm/r600_blit.c Mon Nov 2 15:54:41 2009 (r198793) @@ -1367,7 +1367,7 @@ set_vtx_resource(drm_radeon_private_t *d if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || - /*((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) ||*/ + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV710)) cp_set_surface_sync(dev_priv, R600_TC_ACTION_ENA, 48, gpu_addr); @@ -1509,7 +1509,7 @@ set_default_state(drm_radeon_private_t * case CHIP_RV610: case CHIP_RV620: case CHIP_RS780: - /*case CHIP_RS880:*/ + case CHIP_RS880: default: num_ps_gprs = 84; num_vs_gprs = 36; @@ -1591,7 +1591,7 @@ set_default_state(drm_radeon_private_t * if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || - /*((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) ||*/ + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV710)) sq_config = 0; else From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 15:57:04 2009 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 3859B1065692; Mon, 2 Nov 2009 15:57:04 +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 0B3818FC16; Mon, 2 Nov 2009 15:57:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2Fv3O4061548; Mon, 2 Nov 2009 15:57:03 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Fv3g0061546; Mon, 2 Nov 2009 15:57:03 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021557.nA2Fv3g0061546@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 15:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198794 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/drm dev/xen/xenpci 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, 02 Nov 2009 15:57:04 -0000 Author: rnoland Date: Mon Nov 2 15:57:03 2009 New Revision: 198794 URL: http://svn.freebsd.org/changeset/base/198794 Log: MFC 198692 Use system specified memory barriers rather than rolling our own. Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/drm/drmP.h stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/drm/drmP.h ============================================================================== --- stable/8/sys/dev/drm/drmP.h Mon Nov 2 15:54:41 2009 (r198793) +++ stable/8/sys/dev/drm/drmP.h Mon Nov 2 15:57:03 2009 (r198794) @@ -223,23 +223,9 @@ typedef u_int8_t u8; * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. * DRM_MEMORYBARRIER() prevents reordering of reads and writes. */ -#if defined(__i386__) -#define DRM_READMEMORYBARRIER() __asm __volatile( \ - "lock; addl $0,0(%%esp)" : : : "memory"); -#define DRM_WRITEMEMORYBARRIER() __asm __volatile("" : : : "memory"); -#define DRM_MEMORYBARRIER() __asm __volatile( \ - "lock; addl $0,0(%%esp)" : : : "memory"); -#elif defined(__alpha__) -#define DRM_READMEMORYBARRIER() alpha_mb(); -#define DRM_WRITEMEMORYBARRIER() alpha_wmb(); -#define DRM_MEMORYBARRIER() alpha_mb(); -#elif defined(__amd64__) -#define DRM_READMEMORYBARRIER() __asm __volatile( \ - "lock; addl $0,0(%%rsp)" : : : "memory"); -#define DRM_WRITEMEMORYBARRIER() __asm __volatile("" : : : "memory"); -#define DRM_MEMORYBARRIER() __asm __volatile( \ - "lock; addl $0,0(%%rsp)" : : : "memory"); -#endif +#define DRM_READMEMORYBARRIER() rmb() +#define DRM_WRITEMEMORYBARRIER() wmb() +#define DRM_MEMORYBARRIER() mb() #define DRM_READ8(map, offset) \ *(volatile u_int8_t *)(((vm_offset_t)(map)->handle) + \ From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 15:59:56 2009 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 62FB5106566C; Mon, 2 Nov 2009 15:59:56 +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 359598FC1F; Mon, 2 Nov 2009 15:59:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2FxuXk061660; Mon, 2 Nov 2009 15:59:56 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Fxu3D061658; Mon, 2 Nov 2009 15:59:56 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021559.nA2Fxu3D061658@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 15:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198795 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/drm dev/xen/xenpci 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, 02 Nov 2009 15:59:56 -0000 Author: rnoland Date: Mon Nov 2 15:59:55 2009 New Revision: 198795 URL: http://svn.freebsd.org/changeset/base/198795 Log: MFC 198695 A bit of cleanup work on radeon_freelist_get() * Fix the main loop to search all buffers before sleeping. * Remove dead code Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/drm/radeon_cp.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/drm/radeon_cp.c ============================================================================== --- stable/8/sys/dev/drm/radeon_cp.c Mon Nov 2 15:57:03 2009 (r198794) +++ stable/8/sys/dev/drm/radeon_cp.c Mon Nov 2 15:59:55 2009 (r198795) @@ -1860,8 +1860,8 @@ struct drm_buf *radeon_freelist_get(stru for (t = 0; t < dev_priv->usec_timeout; t++) { u32 done_age = GET_SCRATCH(dev_priv, 1); DRM_DEBUG("done_age = %d\n", done_age); - for (i = start; i < dma->buf_count; i++) { - buf = dma->buflist[i]; + for (i = 0; i < dma->buf_count; i++) { + buf = dma->buflist[start]; buf_priv = buf->dev_private; if (buf->file_priv == NULL || (buf->pending && buf_priv->age <= @@ -1870,7 +1870,8 @@ struct drm_buf *radeon_freelist_get(stru buf->pending = 0; return buf; } - start = 0; + if (++start >= dma->buf_count) + start = 0; } if (t) { @@ -1879,47 +1880,9 @@ struct drm_buf *radeon_freelist_get(stru } } - DRM_DEBUG("returning NULL!\n"); return NULL; } -#if 0 -struct drm_buf *radeon_freelist_get(struct drm_device * dev) -{ - struct drm_device_dma *dma = dev->dma; - drm_radeon_private_t *dev_priv = dev->dev_private; - drm_radeon_buf_priv_t *buf_priv; - struct drm_buf *buf; - int i, t; - int start; - u32 done_age; - - done_age = radeon_read_ring_rptr(dev_priv, RADEON_SCRATCHOFF(1)); - if (++dev_priv->last_buf >= dma->buf_count) - dev_priv->last_buf = 0; - - start = dev_priv->last_buf; - dev_priv->stats.freelist_loops++; - - for (t = 0; t < 2; t++) { - for (i = start; i < dma->buf_count; i++) { - buf = dma->buflist[i]; - buf_priv = buf->dev_private; - if (buf->file_priv == 0 || (buf->pending && - buf_priv->age <= - done_age)) { - dev_priv->stats.requested_bufs++; - buf->pending = 0; - return buf; - } - } - start = 0; - } - - return NULL; -} -#endif - void radeon_freelist_reset(struct drm_device * dev) { struct drm_device_dma *dma = dev->dma; From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:00:20 2009 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 EF2BE106573F; Mon, 2 Nov 2009 16:00:01 +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 AC3428FC1A; Mon, 2 Nov 2009 16:00:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2G01iD061712; Mon, 2 Nov 2009 16:00:01 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2G01HF061711; Mon, 2 Nov 2009 16:00:01 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021600.nA2G01HF061711@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 16:00:01 +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: r198796 - in stable/7/sys: . contrib/pf dev/drm 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, 02 Nov 2009 16:00:20 -0000 Author: rnoland Date: Mon Nov 2 16:00:01 2009 New Revision: 198796 URL: http://svn.freebsd.org/changeset/base/198796 Log: MFC 198695 A bit of cleanup work on radeon_freelist_get() * Fix the main loop to search all buffers before sleeping. * Remove dead code Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/radeon_cp.c Modified: stable/7/sys/dev/drm/radeon_cp.c ============================================================================== --- stable/7/sys/dev/drm/radeon_cp.c Mon Nov 2 15:59:55 2009 (r198795) +++ stable/7/sys/dev/drm/radeon_cp.c Mon Nov 2 16:00:01 2009 (r198796) @@ -1860,8 +1860,8 @@ struct drm_buf *radeon_freelist_get(stru for (t = 0; t < dev_priv->usec_timeout; t++) { u32 done_age = GET_SCRATCH(dev_priv, 1); DRM_DEBUG("done_age = %d\n", done_age); - for (i = start; i < dma->buf_count; i++) { - buf = dma->buflist[i]; + for (i = 0; i < dma->buf_count; i++) { + buf = dma->buflist[start]; buf_priv = buf->dev_private; if (buf->file_priv == NULL || (buf->pending && buf_priv->age <= @@ -1870,7 +1870,8 @@ struct drm_buf *radeon_freelist_get(stru buf->pending = 0; return buf; } - start = 0; + if (++start >= dma->buf_count) + start = 0; } if (t) { @@ -1879,47 +1880,9 @@ struct drm_buf *radeon_freelist_get(stru } } - DRM_DEBUG("returning NULL!\n"); return NULL; } -#if 0 -struct drm_buf *radeon_freelist_get(struct drm_device * dev) -{ - struct drm_device_dma *dma = dev->dma; - drm_radeon_private_t *dev_priv = dev->dev_private; - drm_radeon_buf_priv_t *buf_priv; - struct drm_buf *buf; - int i, t; - int start; - u32 done_age; - - done_age = radeon_read_ring_rptr(dev_priv, RADEON_SCRATCHOFF(1)); - if (++dev_priv->last_buf >= dma->buf_count) - dev_priv->last_buf = 0; - - start = dev_priv->last_buf; - dev_priv->stats.freelist_loops++; - - for (t = 0; t < 2; t++) { - for (i = start; i < dma->buf_count; i++) { - buf = dma->buflist[i]; - buf_priv = buf->dev_private; - if (buf->file_priv == 0 || (buf->pending && - buf_priv->age <= - done_age)) { - dev_priv->stats.requested_bufs++; - buf->pending = 0; - return buf; - } - } - start = 0; - } - - return NULL; -} -#endif - void radeon_freelist_reset(struct drm_device * dev) { struct drm_device_dma *dma = dev->dma; From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:02:16 2009 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 A88631065672; Mon, 2 Nov 2009 16:02:16 +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 94EB38FC0C; Mon, 2 Nov 2009 16:02:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2G2Gph061836; Mon, 2 Nov 2009 16:02:16 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2G2Gsv061834; Mon, 2 Nov 2009 16:02:16 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021602.nA2G2Gsv061834@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 16:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198797 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/drm dev/xen/xenpci 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, 02 Nov 2009 16:02:16 -0000 Author: rnoland Date: Mon Nov 2 16:02:16 2009 New Revision: 198797 URL: http://svn.freebsd.org/changeset/base/198797 Log: MFC 198696 Cleanup in r600_blit - Don't bother to assign vb until we know we have enough space - Add variables for sx2, sy2, dx2, dy2 so that these aren't calculated over and over, also reduce chance of errors. - Use switch to assign color/format Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/drm/r600_blit.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/drm/r600_blit.c ============================================================================== --- stable/8/sys/dev/drm/r600_blit.c Mon Nov 2 16:00:01 2009 (r198796) +++ stable/8/sys/dev/drm/r600_blit.c Mon Nov 2 16:02:16 2009 (r198797) @@ -1719,7 +1719,10 @@ r600_blit_copy(struct drm_device *dev, u32 *vb; vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + DRM_DEBUG("src=0x%016llx, dst=0x%016llx, size=%d\n", + (unsigned long long)src_gpu_addr, + (unsigned long long)dst_gpu_addr, size_bytes); if ((size_bytes & 3) || (src_gpu_addr & 3) || (dst_gpu_addr & 3)) { max_bytes = 8192; @@ -1757,7 +1760,7 @@ r600_blit_copy(struct drm_device *dev, return; set_shaders(dev); vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } vb[0] = i2f(dst_x); @@ -1847,7 +1850,7 @@ r600_blit_copy(struct drm_device *dev, return; set_shaders(dev); vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } vb[0] = i2f(dst_x / 4); @@ -1913,12 +1916,10 @@ r600_blit_swap(struct drm_device *dev, { drm_radeon_private_t *dev_priv = dev->dev_private; int cb_format, tex_format; + int sx2, sy2, dx2, dy2; u64 vb_addr; u32 *vb; - vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); - if ((dev_priv->blit_vb->used + 48) > dev_priv->blit_vb->total) { dev_priv->blit_vb->used = 0; radeon_cp_discard_buffer(dev, dev_priv->blit_vb); @@ -1926,20 +1927,14 @@ r600_blit_swap(struct drm_device *dev, if (!dev_priv->blit_vb) return; set_shaders(dev); - vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } + vb = (u32 *) ((char *)dev->agp_buffer_map->handle + + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); - if (cpp == 4) { - cb_format = COLOR_8_8_8_8; - tex_format = FMT_8_8_8_8; - } else if (cpp == 2) { - cb_format = COLOR_5_6_5; - tex_format = FMT_5_6_5; - } else { - cb_format = COLOR_8; - tex_format = FMT_8; - } + sx2 = sx + w; + sy2 = sy + h; + dx2 = dx + w; + dy2 = dy + h; vb[0] = i2f(dx); vb[1] = i2f(dy); @@ -1947,31 +1942,46 @@ r600_blit_swap(struct drm_device *dev, vb[3] = i2f(sy); vb[4] = i2f(dx); - vb[5] = i2f(dy + h); + vb[5] = i2f(dy2); vb[6] = i2f(sx); - vb[7] = i2f(sy + h); + vb[7] = i2f(sy2); + + vb[8] = i2f(dx2); + vb[9] = i2f(dy2); + vb[10] = i2f(sx2); + vb[11] = i2f(sy2); - vb[8] = i2f(dx + w); - vb[9] = i2f(dy + h); - vb[10] = i2f(sx + w); - vb[11] = i2f(sy + h); + switch(cpp) { + case 4: + cb_format = COLOR_8_8_8_8; + tex_format = FMT_8_8_8_8; + break; + case 2: + cb_format = COLOR_5_6_5; + tex_format = FMT_5_6_5; + break; + default: + cb_format = COLOR_8; + tex_format = FMT_8; + break; + } /* src */ set_tex_resource(dev_priv, tex_format, src_pitch / cpp, - sy + h, src_pitch / cpp, + sy2, src_pitch / cpp, src_gpu_addr); cp_set_surface_sync(dev_priv, - R600_TC_ACTION_ENA, (src_pitch * (sy + h)), src_gpu_addr); + R600_TC_ACTION_ENA, src_pitch * sy2, src_gpu_addr); /* dst */ set_render_target(dev_priv, cb_format, - dst_pitch / cpp, dy + h, + dst_pitch / cpp, dy2, dst_gpu_addr); /* scissors */ - set_scissors(dev_priv, dx, dy, dx + w, dy + h); + set_scissors(dev_priv, dx, dy, dx2, dy2); /* Vertex buffer setup */ vb_addr = dev_priv->gart_buffers_offset + @@ -1984,7 +1994,7 @@ r600_blit_swap(struct drm_device *dev, cp_set_surface_sync(dev_priv, R600_CB_ACTION_ENA | R600_CB0_DEST_BASE_ENA, - dst_pitch * (dy + h), dst_gpu_addr); + dst_pitch * dy2, dst_gpu_addr); dev_priv->blit_vb->used += 12 * 4; } From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:02:37 2009 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 05BAC1065693; Mon, 2 Nov 2009 16:02:37 +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 E74B68FC16; Mon, 2 Nov 2009 16:02:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2G2atX061877; Mon, 2 Nov 2009 16:02:36 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2G2a82061875; Mon, 2 Nov 2009 16:02:36 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200911021602.nA2G2a82061875@svn.freebsd.org> From: Robert Noland Date: Mon, 2 Nov 2009 16:02: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: r198798 - in stable/7/sys: . contrib/pf dev/drm 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, 02 Nov 2009 16:02:37 -0000 Author: rnoland Date: Mon Nov 2 16:02:36 2009 New Revision: 198798 URL: http://svn.freebsd.org/changeset/base/198798 Log: MFC 198696 Cleanup in r600_blit - Don't bother to assign vb until we know we have enough space - Add variables for sx2, sy2, dx2, dy2 so that these aren't calculated over and over, also reduce chance of errors. - Use switch to assign color/format Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/r600_blit.c Modified: stable/7/sys/dev/drm/r600_blit.c ============================================================================== --- stable/7/sys/dev/drm/r600_blit.c Mon Nov 2 16:02:16 2009 (r198797) +++ stable/7/sys/dev/drm/r600_blit.c Mon Nov 2 16:02:36 2009 (r198798) @@ -1719,7 +1719,10 @@ r600_blit_copy(struct drm_device *dev, u32 *vb; vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + DRM_DEBUG("src=0x%016llx, dst=0x%016llx, size=%d\n", + (unsigned long long)src_gpu_addr, + (unsigned long long)dst_gpu_addr, size_bytes); if ((size_bytes & 3) || (src_gpu_addr & 3) || (dst_gpu_addr & 3)) { max_bytes = 8192; @@ -1757,7 +1760,7 @@ r600_blit_copy(struct drm_device *dev, return; set_shaders(dev); vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } vb[0] = i2f(dst_x); @@ -1847,7 +1850,7 @@ r600_blit_copy(struct drm_device *dev, return; set_shaders(dev); vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } vb[0] = i2f(dst_x / 4); @@ -1913,12 +1916,10 @@ r600_blit_swap(struct drm_device *dev, { drm_radeon_private_t *dev_priv = dev->dev_private; int cb_format, tex_format; + int sx2, sy2, dx2, dy2; u64 vb_addr; u32 *vb; - vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); - if ((dev_priv->blit_vb->used + 48) > dev_priv->blit_vb->total) { dev_priv->blit_vb->used = 0; radeon_cp_discard_buffer(dev, dev_priv->blit_vb); @@ -1926,20 +1927,14 @@ r600_blit_swap(struct drm_device *dev, if (!dev_priv->blit_vb) return; set_shaders(dev); - vb = (u32 *) ((char *)dev->agp_buffer_map->handle + - dev_priv->blit_vb->offset + dev_priv->blit_vb->used); } + vb = (u32 *) ((char *)dev->agp_buffer_map->handle + + dev_priv->blit_vb->offset + dev_priv->blit_vb->used); - if (cpp == 4) { - cb_format = COLOR_8_8_8_8; - tex_format = FMT_8_8_8_8; - } else if (cpp == 2) { - cb_format = COLOR_5_6_5; - tex_format = FMT_5_6_5; - } else { - cb_format = COLOR_8; - tex_format = FMT_8; - } + sx2 = sx + w; + sy2 = sy + h; + dx2 = dx + w; + dy2 = dy + h; vb[0] = i2f(dx); vb[1] = i2f(dy); @@ -1947,31 +1942,46 @@ r600_blit_swap(struct drm_device *dev, vb[3] = i2f(sy); vb[4] = i2f(dx); - vb[5] = i2f(dy + h); + vb[5] = i2f(dy2); vb[6] = i2f(sx); - vb[7] = i2f(sy + h); + vb[7] = i2f(sy2); + + vb[8] = i2f(dx2); + vb[9] = i2f(dy2); + vb[10] = i2f(sx2); + vb[11] = i2f(sy2); - vb[8] = i2f(dx + w); - vb[9] = i2f(dy + h); - vb[10] = i2f(sx + w); - vb[11] = i2f(sy + h); + switch(cpp) { + case 4: + cb_format = COLOR_8_8_8_8; + tex_format = FMT_8_8_8_8; + break; + case 2: + cb_format = COLOR_5_6_5; + tex_format = FMT_5_6_5; + break; + default: + cb_format = COLOR_8; + tex_format = FMT_8; + break; + } /* src */ set_tex_resource(dev_priv, tex_format, src_pitch / cpp, - sy + h, src_pitch / cpp, + sy2, src_pitch / cpp, src_gpu_addr); cp_set_surface_sync(dev_priv, - R600_TC_ACTION_ENA, (src_pitch * (sy + h)), src_gpu_addr); + R600_TC_ACTION_ENA, src_pitch * sy2, src_gpu_addr); /* dst */ set_render_target(dev_priv, cb_format, - dst_pitch / cpp, dy + h, + dst_pitch / cpp, dy2, dst_gpu_addr); /* scissors */ - set_scissors(dev_priv, dx, dy, dx + w, dy + h); + set_scissors(dev_priv, dx, dy, dx2, dy2); /* Vertex buffer setup */ vb_addr = dev_priv->gart_buffers_offset + @@ -1984,7 +1994,7 @@ r600_blit_swap(struct drm_device *dev, cp_set_surface_sync(dev_priv, R600_CB_ACTION_ENA | R600_CB0_DEST_BASE_ENA, - dst_pitch * (dy + h), dst_gpu_addr); + dst_pitch * dy2, dst_gpu_addr); dev_priv->blit_vb->used += 12 * 4; } From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:22:59 2009 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 BD27E1065670; Mon, 2 Nov 2009 16:22:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9A8C8FC0A; Mon, 2 Nov 2009 16:22:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GMxxv062409; Mon, 2 Nov 2009 16:22:59 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GMxIS062407; Mon, 2 Nov 2009 16:22:59 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021622.nA2GMxIS062407@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198799 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/aac dev/xen/xenpci 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, 02 Nov 2009 16:22:59 -0000 Author: emaste Date: Mon Nov 2 16:22:59 2009 New Revision: 198799 URL: http://svn.freebsd.org/changeset/base/198799 Log: MFC r198541: Do first controller time sync after 1 minute, as in Adaptec's vendor driver. Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/aac/aac.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/aac/aac.c ============================================================================== --- stable/8/sys/dev/aac/aac.c Mon Nov 2 16:02:36 2009 (r198798) +++ stable/8/sys/dev/aac/aac.c Mon Nov 2 16:22:59 2009 (r198799) @@ -354,7 +354,7 @@ aac_attach(struct aac_softc *sc) } mtx_lock(&sc->aac_io_lock); - callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); + callout_reset(&sc->aac_daemontime, 60 * hz, aac_daemon, sc); mtx_unlock(&sc->aac_io_lock); return(0); From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:25:01 2009 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 A24EE106566B; Mon, 2 Nov 2009 16:25:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FE9A8FC18; Mon, 2 Nov 2009 16:25:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GP1ik062488; Mon, 2 Nov 2009 16:25:01 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GP1cL062486; Mon, 2 Nov 2009 16:25:01 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021625.nA2GP1cL062486@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:25:01 +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: r198800 - in stable/7/sys: . contrib/pf dev/aac 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, 02 Nov 2009 16:25:01 -0000 Author: emaste Date: Mon Nov 2 16:25:00 2009 New Revision: 198800 URL: http://svn.freebsd.org/changeset/base/198800 Log: MFC r198541: Do first controller time sync after 1 minute, as in Adaptec's vendor driver. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/aac/aac.c Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Mon Nov 2 16:22:59 2009 (r198799) +++ stable/7/sys/dev/aac/aac.c Mon Nov 2 16:25:00 2009 (r198800) @@ -354,7 +354,7 @@ aac_attach(struct aac_softc *sc) } mtx_lock(&sc->aac_io_lock); - callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); + callout_reset(&sc->aac_daemontime, 60 * hz, aac_daemon, sc); mtx_unlock(&sc->aac_io_lock); return(0); From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:25:15 2009 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 81D421065694; Mon, 2 Nov 2009 16:25:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F97D8FC18; Mon, 2 Nov 2009 16:25:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GPFpC062535; Mon, 2 Nov 2009 16:25:15 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GPF3U062533; Mon, 2 Nov 2009 16:25:15 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021625.nA2GPF3U062533@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:25:15 +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: r198801 - in stable/6/sys: . conf contrib/pf dev/aac dev/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, 02 Nov 2009 16:25:15 -0000 Author: emaste Date: Mon Nov 2 16:25:15 2009 New Revision: 198801 URL: http://svn.freebsd.org/changeset/base/198801 Log: MFC r198541: Do first controller time sync after 1 minute, as in Adaptec's vendor driver. Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/aac/aac.c stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aac/aac.c ============================================================================== --- stable/6/sys/dev/aac/aac.c Mon Nov 2 16:25:00 2009 (r198800) +++ stable/6/sys/dev/aac/aac.c Mon Nov 2 16:25:15 2009 (r198801) @@ -354,7 +354,7 @@ aac_attach(struct aac_softc *sc) } mtx_lock(&sc->aac_io_lock); - callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); + callout_reset(&sc->aac_daemontime, 60 * hz, aac_daemon, sc); mtx_unlock(&sc->aac_io_lock); return(0); From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:27:34 2009 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 C3C07106566C; Mon, 2 Nov 2009 16:27:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1FB68FC12; Mon, 2 Nov 2009 16:27:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GRYso062639; Mon, 2 Nov 2009 16:27:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GRYPj062637; Mon, 2 Nov 2009 16:27:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021627.nA2GRYPj062637@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198802 - in stable/8/usr.sbin/ntp: . doc 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, 02 Nov 2009 16:27:34 -0000 Author: emaste Date: Mon Nov 2 16:27:34 2009 New Revision: 198802 URL: http://svn.freebsd.org/changeset/base/198802 Log: MFC r198029: Correct typo: thetime -> the time PR: docs/139447 Submitted by: Guido Falsi mad at madpilot dot net Modified: stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/ntp/doc/ntpd.8 Modified: stable/8/usr.sbin/ntp/doc/ntpd.8 ============================================================================== --- stable/8/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:25:15 2009 (r198801) +++ stable/8/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:27:34 2009 (r198802) @@ -121,7 +121,7 @@ Normally, .Nm exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. -This option allows thetime to be set to any value without restriction; +This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, .Nm From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:29:04 2009 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 609C01065672; Mon, 2 Nov 2009 16:29:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EC338FC14; Mon, 2 Nov 2009 16:29:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GT44D062728; Mon, 2 Nov 2009 16:29:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GT4jq062726; Mon, 2 Nov 2009 16:29:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021629.nA2GT4jq062726@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:29:04 +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: r198803 - in stable/7/usr.sbin/ntp: . doc 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, 02 Nov 2009 16:29:04 -0000 Author: emaste Date: Mon Nov 2 16:29:04 2009 New Revision: 198803 URL: http://svn.freebsd.org/changeset/base/198803 Log: MFC r198029: Correct typo: thetime -> the time PR: docs/139447 Submitted by: Guido Falsi mad at madpilot dot net Modified: stable/7/usr.sbin/ntp/ (props changed) stable/7/usr.sbin/ntp/doc/ntpd.8 Modified: stable/7/usr.sbin/ntp/doc/ntpd.8 ============================================================================== --- stable/7/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:27:34 2009 (r198802) +++ stable/7/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:29:04 2009 (r198803) @@ -121,7 +121,7 @@ Normally, .Nm exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. -This option allows thetime to be set to any value without restriction; +This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, .Nm From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:29:54 2009 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 B40CB106566C; Mon, 2 Nov 2009 16:29:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1FA68FC1F; Mon, 2 Nov 2009 16:29:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GTsMY062782; Mon, 2 Nov 2009 16:29:54 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GTsmw062780; Mon, 2 Nov 2009 16:29:54 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021629.nA2GTsmw062780@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:29:54 +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: r198804 - in stable/6/usr.sbin/ntp: . doc 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, 02 Nov 2009 16:29:54 -0000 Author: emaste Date: Mon Nov 2 16:29:54 2009 New Revision: 198804 URL: http://svn.freebsd.org/changeset/base/198804 Log: MFC r198029: Correct typo: thetime -> the time PR: docs/139447 Submitted by: Guido Falsi mad at madpilot dot net Modified: stable/6/usr.sbin/ntp/ (props changed) stable/6/usr.sbin/ntp/doc/ (props changed) stable/6/usr.sbin/ntp/doc/ntpd.8 Modified: stable/6/usr.sbin/ntp/doc/ntpd.8 ============================================================================== --- stable/6/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:29:04 2009 (r198803) +++ stable/6/usr.sbin/ntp/doc/ntpd.8 Mon Nov 2 16:29:54 2009 (r198804) @@ -120,7 +120,7 @@ Normally, .Nm exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. -This option allows thetime to be set to any value without restriction; +This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, .Nm From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:32:33 2009 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 42BD91065679; Mon, 2 Nov 2009 16:32:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F7278FC1F; Mon, 2 Nov 2009 16:32:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GWXPF062888; Mon, 2 Nov 2009 16:32:33 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GWXLC062886; Mon, 2 Nov 2009 16:32:33 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021632.nA2GWXLC062886@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198805 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2009 16:32:33 -0000 Author: emaste Date: Mon Nov 2 16:32:32 2009 New Revision: 198805 URL: http://svn.freebsd.org/changeset/base/198805 Log: MFC r197692: In fill_kinfo_thread, copy the thread's name into struct kinfo_proc even if it is empty. Otherwise the previous thread's name would remain in the struct and then be reported for this thread. Submitted by: Ryan Stone Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_proc.c Modified: stable/8/sys/kern/kern_proc.c ============================================================================== --- stable/8/sys/kern/kern_proc.c Mon Nov 2 16:29:54 2009 (r198804) +++ stable/8/sys/kern/kern_proc.c Mon Nov 2 16:32:32 2009 (r198805) @@ -847,8 +847,7 @@ fill_kinfo_thread(struct thread *td, str strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg)); else bzero(kp->ki_wmesg, sizeof(kp->ki_wmesg)); - if (td->td_name[0] != '\0') - strlcpy(kp->ki_ocomm, td->td_name, sizeof(kp->ki_ocomm)); + strlcpy(kp->ki_ocomm, td->td_name, sizeof(kp->ki_ocomm)); if (TD_ON_LOCK(td)) { kp->ki_kiflag |= KI_LOCKBLOCK; strlcpy(kp->ki_lockname, td->td_lockname, From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:46:07 2009 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 6575A1065894; Mon, 2 Nov 2009 16:46:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51CD08FC14; Mon, 2 Nov 2009 16:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2Gk7R1063225; Mon, 2 Nov 2009 16:46:07 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Gk7Sq063223; Mon, 2 Nov 2009 16:46:07 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021646.nA2Gk7Sq063223@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198806 - in stable/8/sys: . amd64/include/xen boot/i386/libi386 cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 02 Nov 2009 16:46:07 -0000 Author: emaste Date: Mon Nov 2 16:46:06 2009 New Revision: 198806 URL: http://svn.freebsd.org/changeset/base/198806 Log: MFC r197082: If the pxe client is told to use / as the root path, honour that rather of trying to mount /pxeroot instead. PR: i386/106493 Submitted by: Andrey Russev Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/i386/libi386/pxe.c stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/i386/libi386/pxe.c ============================================================================== --- stable/8/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:32:32 2009 (r198805) +++ stable/8/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:46:06 2009 (r198806) @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...) bootp(pxe_sock, BOOTP_PXE); if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; - if (!rootpath[1]) + if (!rootpath[0]) strcpy(rootpath, PXENFSROOTPATH); for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:46:53 2009 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 E70E41065679; Mon, 2 Nov 2009 16:46:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4DDC8FC1F; Mon, 2 Nov 2009 16:46:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GkrHC063274; Mon, 2 Nov 2009 16:46:53 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GkrCk063272; Mon, 2 Nov 2009 16:46:53 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021646.nA2GkrCk063272@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:46:53 +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: r198807 - in stable/7/sys: . boot/i386/libi386 contrib/pf 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, 02 Nov 2009 16:46:54 -0000 Author: emaste Date: Mon Nov 2 16:46:53 2009 New Revision: 198807 URL: http://svn.freebsd.org/changeset/base/198807 Log: MFC r197082: If the pxe client is told to use / as the root path, honour that rather of trying to mount /pxeroot instead. PR: i386/106493 Submitted by: Andrey Russev Modified: stable/7/sys/ (props changed) stable/7/sys/boot/i386/libi386/pxe.c stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/i386/libi386/pxe.c ============================================================================== --- stable/7/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:46:06 2009 (r198806) +++ stable/7/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:46:53 2009 (r198807) @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...) bootp(pxe_sock, BOOTP_PXE); if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; - if (!rootpath[1]) + if (!rootpath[0]) strcpy(rootpath, PXENFSROOTPATH); for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:49:57 2009 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 59BC91065694; Mon, 2 Nov 2009 16:49:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4712A8FC17; Mon, 2 Nov 2009 16:49:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2Gnvr5063382; Mon, 2 Nov 2009 16:49:57 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GnvkY063380; Mon, 2 Nov 2009 16:49:57 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021649.nA2GnvkY063380@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:49:57 +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: r198808 - in stable/6/sys: . boot/i386/libi386 conf contrib/pf dev/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, 02 Nov 2009 16:49:57 -0000 Author: emaste Date: Mon Nov 2 16:49:57 2009 New Revision: 198808 URL: http://svn.freebsd.org/changeset/base/198808 Log: MFC r197082: If the pxe client is told to use / as the root path, honour that rather of trying to mount /pxeroot instead. PR: i386/106493 Submitted by: Andrey Russev Modified: stable/6/sys/ (props changed) stable/6/sys/boot/i386/libi386/pxe.c stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/i386/libi386/pxe.c ============================================================================== --- stable/6/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:46:53 2009 (r198807) +++ stable/6/sys/boot/i386/libi386/pxe.c Mon Nov 2 16:49:57 2009 (r198808) @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...) bootp(pxe_sock, BOOTP_PXE); if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; - if (!rootpath[1]) + if (!rootpath[0]) strcpy(rootpath, PXENFSROOTPATH); for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:54:24 2009 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 3FE621065695; Mon, 2 Nov 2009 16:54:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C58F8FC08; Mon, 2 Nov 2009 16:54:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GsOA4063517; Mon, 2 Nov 2009 16:54:24 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GsOo3063516; Mon, 2 Nov 2009 16:54:24 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021654.nA2GsOo3063516@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198809 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/aac dev/xen/xenpci 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, 02 Nov 2009 16:54:24 -0000 Author: emaste Date: Mon Nov 2 16:54:23 2009 New Revision: 198809 URL: http://svn.freebsd.org/changeset/base/198809 Log: MFC r197011: Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious "COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages. Any commands that get truly stuck will still trigger the warning and the hardware health check, just a little bit later. Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/aac/aacvar.h stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/aac/aacvar.h ============================================================================== --- stable/8/sys/dev/aac/aacvar.h Mon Nov 2 16:49:57 2009 (r198808) +++ stable/8/sys/dev/aac/aacvar.h Mon Nov 2 16:54:23 2009 (r198809) @@ -88,7 +88,7 @@ /* * Timeout for normal commands */ -#define AAC_CMD_TIMEOUT 30 /* seconds */ +#define AAC_CMD_TIMEOUT 120 /* seconds */ /* * Rate at which we periodically check for timed out commands and kick the From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 16:55:34 2009 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 32B61106568B; Mon, 2 Nov 2009 16:55:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20C9C8FC13; Mon, 2 Nov 2009 16:55:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2GtYRK063607; Mon, 2 Nov 2009 16:55:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2GtYrg063605; Mon, 2 Nov 2009 16:55:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021655.nA2GtYrg063605@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 16:55:34 +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: r198810 - in stable/7/sys: . contrib/pf dev/aac 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, 02 Nov 2009 16:55:34 -0000 Author: emaste Date: Mon Nov 2 16:55:33 2009 New Revision: 198810 URL: http://svn.freebsd.org/changeset/base/198810 Log: MFC r197011: Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious "COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages. Any commands that get truly stuck will still trigger the warning and the hardware health check, just a little bit later. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/aac/aacvar.h Modified: stable/7/sys/dev/aac/aacvar.h ============================================================================== --- stable/7/sys/dev/aac/aacvar.h Mon Nov 2 16:54:23 2009 (r198809) +++ stable/7/sys/dev/aac/aacvar.h Mon Nov 2 16:55:33 2009 (r198810) @@ -88,7 +88,7 @@ /* * Timeout for normal commands */ -#define AAC_CMD_TIMEOUT 30 /* seconds */ +#define AAC_CMD_TIMEOUT 120 /* seconds */ /* * Rate at which we periodically check for timed out commands and kick the From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 18:44:02 2009 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 B0C7F106566B; Mon, 2 Nov 2009 18:44:02 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84D668FC1B; Mon, 2 Nov 2009 18:44:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2Ii2op066254; Mon, 2 Nov 2009 18:44:02 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2Ii2br066253; Mon, 2 Nov 2009 18:44:02 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911021844.nA2Ii2br066253@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Nov 2009 18:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198815 - stable/8/lib/libc/stdlib 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, 02 Nov 2009 18:44:02 -0000 Author: alc Date: Mon Nov 2 18:44:01 2009 New Revision: 198815 URL: http://svn.freebsd.org/changeset/base/198815 Log: MFC r197524 Make malloc(3) superpage aware. Modified: stable/8/lib/libc/stdlib/ (props changed) stable/8/lib/libc/stdlib/malloc.3 stable/8/lib/libc/stdlib/malloc.c Modified: stable/8/lib/libc/stdlib/malloc.3 ============================================================================== --- stable/8/lib/libc/stdlib/malloc.3 Mon Nov 2 18:35:05 2009 (r198814) +++ stable/8/lib/libc/stdlib/malloc.3 Mon Nov 2 18:44:01 2009 (r198815) @@ -32,7 +32,7 @@ .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 26, 2008 +.Dd September 26, 2009 .Dt MALLOC 3 .Os .Sh NAME @@ -245,7 +245,8 @@ will be initialized to 0x5a. This is intended for debugging and will impact performance negatively. .It K Double/halve the virtual memory chunk size. -The default chunk size is 1 MB. +The default chunk size is the maximum of 1 MB and the largest +page size that is less than or equal to 4 MB. .It M Use .Xr mmap 2 @@ -561,6 +562,7 @@ _malloc_options = "X"; .Xr alloca 3 , .Xr atexit 3 , .Xr getpagesize 3 , +.Xr getpagesizes 3 , .Xr memory 3 , .Xr posix_memalign 3 .Sh STANDARDS Modified: stable/8/lib/libc/stdlib/malloc.c ============================================================================== --- stable/8/lib/libc/stdlib/malloc.c Mon Nov 2 18:35:05 2009 (r198814) +++ stable/8/lib/libc/stdlib/malloc.c Mon Nov 2 18:44:01 2009 (r198815) @@ -4795,6 +4795,21 @@ malloc_init_hard(void) } } + /* + * Increase the chunk size to the largest page size that is greater + * than the default chunk size and less than or equal to 4MB. + */ + { + size_t pagesizes[MAXPAGESIZES]; + int k, nsizes; + + nsizes = getpagesizes(pagesizes, MAXPAGESIZES); + for (k = 0; k < nsizes; k++) + if (pagesizes[k] <= (1LU << 22)) + while ((1LU << opt_chunk_2pow) < pagesizes[k]) + opt_chunk_2pow++; + } + for (i = 0; i < 3; i++) { unsigned j; From owner-svn-src-stable@FreeBSD.ORG Mon Nov 2 19:01:20 2009 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 632EE106566B; Mon, 2 Nov 2009 19:01:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 507228FC12; Mon, 2 Nov 2009 19:01:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA2J1K0r066730; Mon, 2 Nov 2009 19:01:20 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA2J1K8b066728; Mon, 2 Nov 2009 19:01:20 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200911021901.nA2J1K8b066728@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Nov 2009 19:01:20 +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: r198817 - in stable/6/sys: . conf contrib/pf dev/aac dev/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, 02 Nov 2009 19:01:20 -0000 Author: emaste Date: Mon Nov 2 19:01:20 2009 New Revision: 198817 URL: http://svn.freebsd.org/changeset/base/198817 Log: MFC r197011: Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious "COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages. Any commands that get truly stuck will still trigger the warning and the hardware health check, just a little bit later. Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/aac/aacvar.h stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/aac/aacvar.h ============================================================================== --- stable/6/sys/dev/aac/aacvar.h Mon Nov 2 18:51:24 2009 (r198816) +++ stable/6/sys/dev/aac/aacvar.h Mon Nov 2 19:01:20 2009 (r198817) @@ -88,7 +88,7 @@ /* * Timeout for normal commands */ -#define AAC_CMD_TIMEOUT 30 /* seconds */ +#define AAC_CMD_TIMEOUT 120 /* seconds */ /* * Rate at which we periodically check for timed out commands and kick the From owner-svn-src-stable@FreeBSD.ORG Tue Nov 3 21:57:01 2009 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 4F22E106566B; Tue, 3 Nov 2009 21:57:01 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 242F58FC14; Tue, 3 Nov 2009 21:57:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA3Lv06V006584; Tue, 3 Nov 2009 21:57:00 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3Lv0Qn006582; Tue, 3 Nov 2009 21:57:00 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200911032157.nA3Lv0Qn006582@svn.freebsd.org> From: Max Laier Date: Tue, 3 Nov 2009 21:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198863 - stable/8/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: Tue, 03 Nov 2009 21:57:01 -0000 Author: mlaier Date: Tue Nov 3 21:57:00 2009 New Revision: 198863 URL: http://svn.freebsd.org/changeset/base/198863 Log: MFC r197334,r197433: Extract svn and git version info from git-svn repos. Modified: stable/8/sys/conf/newvers.sh Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/newvers.sh ============================================================================== --- stable/8/sys/conf/newvers.sh Tue Nov 3 21:47:07 2009 (r198862) +++ stable/8/sys/conf/newvers.sh Tue Nov 3 21:57:00 2009 (r198863) @@ -89,28 +89,54 @@ i=`${MAKE:-make} -V KERN_IDENT` case "$d" in */sys/*) + SRCDIR=${d##*obj} + if [ -n "$MACHINE" ]; then + SRCDIR=${SRCDIR##/$MACHINE} + fi + SRCDIR=${SRCDIR%%/sys/*} + for dir in /bin /usr/bin /usr/local/bin; do - if [ -x "${dir}/svnversion" ]; then + if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then svnversion=${dir}/svnversion - SRCDIR=${d##*obj} - if [ -n "$MACHINE" ]; then - SRCDIR=${SRCDIR##/$MACHINE} - fi - SRCDIR=${SRCDIR%%/sys/*} + break + fi + if [ -d "${SRCDIR}/.git" -a -x "${dir}/git" ] ; then + git_cmd="${dir}/git --git-dir=${SRCDIR}/.git" break fi done - if [ -n "$svnversion" -a -d "${SRCDIR}/sys/.svn" ] ; then + if [ -n "$svnversion" ] ; then svn=" r`cd ${SRCDIR}/sys && $svnversion`" fi + if [ -n "$git_cmd" ] ; then + git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` + svn=`$git_cmd svn find-rev $git 2>/dev/null` + if [ -n "$svn" ] ; then + svn=" r${svn}" + git="=${git}" + else + svn=`$git_cmd log | fgrep 'git-svn-id:' | head -1 | \ + sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` + if [ -n $svn ] ; then + svn=" r${svn}" + git="+${git}" + else + git=" ${git}" + fi + fi + if $git_cmd --work-tree=${SRCDIR} diff-index \ + --name-only HEAD | read dummy; then + git="${git}-dirty" + fi + fi ;; esac cat << EOF > vers.c $COPYRIGHT -#define SCCSSTR "@(#)${VERSION} #${v}${svn}: ${t}" -#define VERSTR "${VERSION} #${v}${svn}: ${t}\\n ${u}@${h}:${d}\\n" +#define SCCSSTR "@(#)${VERSION} #${v}${svn}${git}: ${t}" +#define VERSTR "${VERSION} #${v}${svn}${git}: ${t}\\n ${u}@${h}:${d}\\n" #define RELSTR "${RELEASE}" char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; From owner-svn-src-stable@FreeBSD.ORG Tue Nov 3 23:26:32 2009 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 28FD11065672; Tue, 3 Nov 2009 23:26:32 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1804C8FC1B; Tue, 3 Nov 2009 23:26:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA3NQVJ7009195; Tue, 3 Nov 2009 23:26:31 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA3NQVZG009193; Tue, 3 Nov 2009 23:26:31 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911032326.nA3NQVZG009193@svn.freebsd.org> From: Rui Paulo Date: Tue, 3 Nov 2009 23:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198864 - stable/8/sys/net80211 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, 03 Nov 2009 23:26:32 -0000 Author: rpaulo Date: Tue Nov 3 23:26:31 2009 New Revision: 198864 URL: http://svn.freebsd.org/changeset/base/198864 Log: MFC r198581: Update the route's sequence number upon receiving a RANN. Modified: stable/8/sys/net80211/ieee80211_hwmp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_hwmp.c ============================================================================== --- stable/8/sys/net80211/ieee80211_hwmp.c Tue Nov 3 21:57:00 2009 (r198863) +++ stable/8/sys/net80211/ieee80211_hwmp.c Tue Nov 3 23:26:31 2009 (r198864) @@ -1239,15 +1239,18 @@ hwmp_recv_rann(struct ieee80211vap *vap, return; } hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route); - if (HWMP_SEQ_GT(rann->rann_seq, hr->hr_seq) && rann->rann_ttl > 1 && - rann->rann_hopcount < hs->hs_maxhops && - (ms->ms_flags & IEEE80211_MESHFLAGS_FWD)) { - memcpy(&prann, rann, sizeof(prann)); - prann.rann_hopcount += 1; - prann.rann_ttl -= 1; - prann.rann_metric += ms->ms_pmetric->mpm_metric(ni); - hwmp_send_rann(vap->iv_bss, vap->iv_myaddr, broadcastaddr, - &prann); + if (HWMP_SEQ_GT(rann->rann_seq, hr->hr_seq)) { + hr->hr_seq = rann->rann_seq; + if (rann->rann_ttl > 1 && + rann->rann_hopcount < hs->hs_maxhops && + (ms->ms_flags & IEEE80211_MESHFLAGS_FWD)) { + memcpy(&prann, rann, sizeof(prann)); + prann.rann_hopcount += 1; + prann.rann_ttl -= 1; + prann.rann_metric += ms->ms_pmetric->mpm_metric(ni); + hwmp_send_rann(vap->iv_bss, vap->iv_myaddr, + broadcastaddr, &prann); + } } } From owner-svn-src-stable@FreeBSD.ORG Wed Nov 4 01:50:26 2009 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 0B35F1065693; Wed, 4 Nov 2009 01:50:26 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D43C58FC1E; Wed, 4 Nov 2009 01:50:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA41oPL5013290; Wed, 4 Nov 2009 01:50:25 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA41oPZ3013287; Wed, 4 Nov 2009 01:50:25 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911040150.nA41oPZ3013287@svn.freebsd.org> From: Andrew Thompson Date: Wed, 4 Nov 2009 01:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198869 - stable/8/sys/dev/usb 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, 04 Nov 2009 01:50:26 -0000 Author: thompsa Date: Wed Nov 4 01:50:25 2009 New Revision: 198869 URL: http://svn.freebsd.org/changeset/base/198869 Log: MFC r198775 Fix a corner case where usbd_transfer_drain() can return too early if the callback has dropped the mutex, leading to a panic. Submitted by: HPS Modified: stable/8/sys/dev/usb/usb_core.h stable/8/sys/dev/usb/usb_transfer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usb_core.h ============================================================================== --- stable/8/sys/dev/usb/usb_core.h Wed Nov 4 01:32:59 2009 (r198868) +++ stable/8/sys/dev/usb/usb_core.h Wed Nov 4 01:50:25 2009 (r198869) @@ -112,6 +112,7 @@ struct usb_xfer_flags_int { uint8_t curr_dma_set:1; /* used by USB HC/DC driver */ uint8_t can_cancel_immed:1; /* set if USB transfer can be * cancelled immediately */ + uint8_t doing_callback:1; /* set if executing the callback */ }; /* Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Wed Nov 4 01:32:59 2009 (r198868) +++ stable/8/sys/dev/usb/usb_transfer.c Wed Nov 4 01:50:25 2009 (r198869) @@ -1797,8 +1797,18 @@ usbd_transfer_drain(struct usb_xfer *xfe usbd_transfer_stop(xfer); - while (usbd_transfer_pending(xfer)) { + while (usbd_transfer_pending(xfer) || + xfer->flags_int.doing_callback) { + + /* + * It is allowed that the callback can drop its + * transfer mutex. In that case checking only + * "usbd_transfer_pending()" is not enough to tell if + * the USB transfer is fully drained. We also need to + * check the internal "doing_callback" flag. + */ xfer->flags_int.draining = 1; + /* * Wait until the current outstanding USB * transfer is complete ! @@ -2043,6 +2053,9 @@ usbd_callback_wrapper(struct usb_xfer_qu /* get next USB transfer in the queue */ info->done_q.curr = NULL; + /* set flag in case of drain */ + xfer->flags_int.doing_callback = 1; + USB_BUS_UNLOCK(info->bus); USB_BUS_LOCK_ASSERT(info->bus, MA_NOTOWNED); @@ -2095,12 +2108,17 @@ usbd_callback_wrapper(struct usb_xfer_qu if ((!xfer->flags_int.open) && (xfer->flags_int.started) && (xfer->usb_state == USB_ST_ERROR)) { + /* clear flag in case of drain */ + xfer->flags_int.doing_callback = 0; /* try to loop, but not recursivly */ usb_command_wrapper(&info->done_q, xfer); return; } done: + /* clear flag in case of drain */ + xfer->flags_int.doing_callback = 0; + /* * Check if we are draining. */ From owner-svn-src-stable@FreeBSD.ORG Wed Nov 4 10:46:56 2009 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 E5804106568D; Wed, 4 Nov 2009 10:46:55 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D22088FC1D; Wed, 4 Nov 2009 10:46:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4Akta8028777; Wed, 4 Nov 2009 10:46:55 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Akt03028773; Wed, 4 Nov 2009 10:46:55 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200911041046.nA4Akt03028773@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 4 Nov 2009 10:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198878 - stable/8/share/zoneinfo X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2009 10:46:56 -0000 Author: edwin Date: Wed Nov 4 10:46:55 2009 New Revision: 198878 URL: http://svn.freebsd.org/changeset/base/198878 Log: MFC of r198825: tzdata2009q - New region: Asia/Novokuznetsk - Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on 29 March 2010 - Add historical data for Hongkong 1941 - 1980 - Syria will go to winter time in the last weekend of October 2009. Modified: stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/zone.tab Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/asia ============================================================================== --- stable/8/share/zoneinfo/asia Wed Nov 4 08:25:58 2009 (r198877) +++ stable/8/share/zoneinfo/asia Wed Nov 4 10:46:55 2009 (r198878) @@ -1,5 +1,4 @@ -#
-# @(#)asia	8.42
+# @(#)asia	8.44
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -369,14 +368,84 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
 			5:00	-	KAST	1980 May
 			8:00	PRC	C%sT
 
+
+# From Lee Yiu Chung (2009-10-24):
+# I found there are some mistakes for the historial DST rule for Hong
+# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
+# it is not [an] observatory, but the official meteorological agency of HK,
+# and also serves as the official timing agency), there are some missing
+# and incorrect rules. Although the exact switch over time is missing, I
+# think 3:30 is correct. The official DST record for Hong Kong can be
+# obtained from
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# .
+
+# From Arthur David Olson (2009-10-28):
+# Here are the dates given at
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# 
+# as of 2009-10-28:
+# Year        Period
+# 1941        1 Apr to 30 Sep
+# 1942        Whole year 
+# 1943        Whole year
+# 1944        Whole year
+# 1945        Whole year
+# 1946        20 Apr to 1 Dec
+# 1947        13 Apr to 30 Dec
+# 1948        2 May to 31 Oct
+# 1949        3 Apr to 30 Oct
+# 1950        2 Apr to 29 Oct
+# 1951        1 Apr to 28 Oct
+# 1952        6 Apr to 25 Oct
+# 1953        5 Apr to 1 Nov
+# 1954        21 Mar to 31 Oct
+# 1955        20 Mar to 6 Nov
+# 1956        18 Mar to 4 Nov
+# 1957        24 Mar to 3 Nov
+# 1958        23 Mar to 2 Nov
+# 1959        22 Mar to 1 Nov
+# 1960        20 Mar to 6 Nov
+# 1961        19 Mar to 5 Nov
+# 1962        18 Mar to 4 Nov
+# 1963        24 Mar to 3 Nov
+# 1964        22 Mar to 1 Nov
+# 1965        18 Apr to 17 Oct
+# 1966        17 Apr to 16 Oct
+# 1967        16 Apr to 22 Oct
+# 1968        21 Apr to 20 Oct
+# 1969        20 Apr to 19 Oct
+# 1970        19 Apr to 18 Oct
+# 1971        18 Apr to 17 Oct
+# 1972        16 Apr to 22 Oct
+# 1973        22 Apr to 21 Oct
+# 1973/74     30 Dec 73 to 20 Oct 74
+# 1975        20 Apr to 19 Oct
+# 1976        18 Apr to 17 Oct
+# 1977        Nil
+# 1978        Nil
+# 1979        13 May to 21 Oct
+# 1980 to Now Nil
+# The page does not give start or end times of day.
+# The page does not give a start date for 1942.
+# The page does not givw an end date for 1945.
+# The Japanese occupation of Hong Kong began on 1941-12-25.
+# The Japanese surrender of Hong Kong was signed 1945-09-15.
+# For lack of anything better, use start of those days as the transition times.
+
 # Hong Kong (Xianggang)
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	HK	1941	only	-	Apr	1	3:30	1:00	S
+Rule	HK	1941	only	-	Sep	30	3:30	0	-
 Rule	HK	1946	only	-	Apr	20	3:30	1:00	S
 Rule	HK	1946	only	-	Dec	1	3:30	0	-
 Rule	HK	1947	only	-	Apr	13	3:30	1:00	S
 Rule	HK	1947	only	-	Dec	30	3:30	0	-
 Rule	HK	1948	only	-	May	2	3:30	1:00	S
-Rule	HK	1948	1952	-	Oct	lastSun	3:30	0	-
+Rule	HK	1948	1951	-	Oct	lastSun	3:30	0	-
+Rule	HK	1952	only	-	Oct	25	3:30	0	-
 Rule	HK	1949	1953	-	Apr	Sun>=1	3:30	1:00	S
 Rule	HK	1953	only	-	Nov	1	3:30	0	-
 Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
@@ -384,13 +453,15 @@ Rule	HK	1954	only	-	Oct	31	3:30	0	-
 Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
 Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
 Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
-Rule	HK	1979	1980	-	May	Sun>=8	3:30	1:00	S
-Rule	HK	1979	1980	-	Oct	Sun>=16	3:30	0	-
+Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
+Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
+Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 Oct 30
+			8:00	HK	HK%sT	1941 Dec 25
+			9:00	-	JST	1945 Sep 15
 			8:00	HK	HK%sT
 
-
 ###############################################################################
 
 # Taiwan
@@ -2236,9 +2307,23 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
 # http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
 # 
 
+# From Steffen Thorsen (2009-10-27):
+# The Syrian Arab News Network on 2009-09-29 reported that Syria will 
+# revert back to winter (standard) time on midnight between Thursday 
+# 2009-10-29 and Friday 2009-10-30:
+# 
+# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
+# 
+
+# From Arthur David Olson (2009-10-28):
+# We'll see if future DST switching times turn out to be end of the last
+# Thursday of the month or the start of the last Friday of the month or
+# something else. For now, use the start of the last Friday.
+
 Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
-Rule	Syria	2008	max	-	Nov	1	0:00	0	-
+Rule	Syria	2008	only	-	Nov	1	0:00	0	-
 Rule	Syria	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule	Syria	2009	max	-	Oct	lastFri	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Wed Nov  4 08:25:58 2009	(r198877)
+++ stable/8/share/zoneinfo/europe	Wed Nov  4 10:46:55 2009	(r198878)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.22
+# @(#)europe	8.24
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2072,9 +2072,43 @@ Zone Asia/Novosibirsk	 5:31:40 -	LMT	191
 			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
 			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
 			 6:00	Russia	NOV%sT
+
+# From Alexander Krivenyshev (2009-10-13):
+# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
+# March 28, 2010:
+# from current Russia Zone 6 - Krasnoyarsk Time Zone (KRA) UTC +0700
+# to Russia Zone 5 - Novosibirsk Time Zone (NOV) UTC +0600
+#
+# This is according to Government of Russia decree # 740, on September
+# 14, 2009 "Application in the territory of the Kemerovo region the Fifth
+# time zone." ("Russia Zone 5" or old "USSR Zone 5" is GMT +0600)
+#
+# Russian Government web site (Russian language)
+# 
+# http://www.government.ru/content/governmentactivity/rfgovernmentdecisions/archive/2009/09/14/991633.htm
+# 
+# or Russian-English translation by WorldTimeZone.com with reference
+# map to local region and new Russia Time Zone map after March 28, 2010
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_russia03.html
+# 
+#
+# Thus, when Russia will switch to DST on the night of March 28, 2010
+# Kemerovo region (Kemerovo oblast') will not change the clock.
+#
+# As a result, Kemerovo oblast' will be in the same time zone as
+# Novosibirsk, Omsk, Tomsk, Barnaul and Altai Republic.
+
+Zone Asia/Novokuznetsk	 5:48:48 -	NMT	1920 Jan  6
+			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
+			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
+			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
+			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
+			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
-# Kemerovskaya oblast', Krasnoyarskij kraj,
+# Krasnoyarskij kraj,
 # Tajmyrskij (Dolgano-Nenetskij) avtonomnyj okrug,
 # Respublika Tuva, Respublika Khakasiya, Evenkijskij avtonomnyj okrug.
 Zone Asia/Krasnoyarsk	 6:11:20 -	LMT	1920 Jan  6

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Wed Nov  4 08:25:58 2009	(r198877)
+++ stable/8/share/zoneinfo/zone.tab	Wed Nov  4 10:46:55 2009	(r198878)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.28
+# @(#)zone.tab	8.29
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,6 +330,7 @@ RU	+5312+05009	Europe/Samara	Moscow+01 -
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
+RU	+5345+08707	Asia/Novokuznetsk	Moscow+03 - Novokuznetsk
 RU	+5601+09250	Asia/Krasnoyarsk	Moscow+04 - Yenisei River
 RU	+5216+10420	Asia/Irkutsk	Moscow+05 - Lake Baikal
 RU	+6200+12940	Asia/Yakutsk	Moscow+06 - Lena River

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 10:47:05 2009
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 A85E91065759;
	Wed,  4 Nov 2009 10:47:03 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C0438FC15;
	Wed,  4 Nov 2009 10:47:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4Al38v028820;
	Wed, 4 Nov 2009 10:47:03 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Al2Pe028816;
	Wed, 4 Nov 2009 10:47:02 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200911041047.nA4Al2Pe028816@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 4 Nov 2009 10:47:02 +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: r198879 - stable/6/share/zoneinfo
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Nov 2009 10:47:05 -0000

Author: edwin
Date: Wed Nov  4 10:47:02 2009
New Revision: 198879
URL: http://svn.freebsd.org/changeset/base/198879

Log:
  MFC of r198825: tzdata2009q
  
  - New region: Asia/Novokuznetsk
  - Kemerovo oblast' (Kemerovo region) in Russia will change current
    time zone on 29 March 2010
  - Add historical data for Hongkong 1941 - 1980
  - Syria will go to winter time in the last weekend of October 2009.

Modified:
  stable/6/share/zoneinfo/asia
  stable/6/share/zoneinfo/europe
  stable/6/share/zoneinfo/zone.tab
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Wed Nov  4 10:46:55 2009	(r198878)
+++ stable/6/share/zoneinfo/asia	Wed Nov  4 10:47:02 2009	(r198879)
@@ -1,5 +1,4 @@
-# 
-# @(#)asia	8.42
+# @(#)asia	8.44
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -369,14 +368,84 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
 			5:00	-	KAST	1980 May
 			8:00	PRC	C%sT
 
+
+# From Lee Yiu Chung (2009-10-24):
+# I found there are some mistakes for the historial DST rule for Hong
+# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
+# it is not [an] observatory, but the official meteorological agency of HK,
+# and also serves as the official timing agency), there are some missing
+# and incorrect rules. Although the exact switch over time is missing, I
+# think 3:30 is correct. The official DST record for Hong Kong can be
+# obtained from
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# .
+
+# From Arthur David Olson (2009-10-28):
+# Here are the dates given at
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# 
+# as of 2009-10-28:
+# Year        Period
+# 1941        1 Apr to 30 Sep
+# 1942        Whole year 
+# 1943        Whole year
+# 1944        Whole year
+# 1945        Whole year
+# 1946        20 Apr to 1 Dec
+# 1947        13 Apr to 30 Dec
+# 1948        2 May to 31 Oct
+# 1949        3 Apr to 30 Oct
+# 1950        2 Apr to 29 Oct
+# 1951        1 Apr to 28 Oct
+# 1952        6 Apr to 25 Oct
+# 1953        5 Apr to 1 Nov
+# 1954        21 Mar to 31 Oct
+# 1955        20 Mar to 6 Nov
+# 1956        18 Mar to 4 Nov
+# 1957        24 Mar to 3 Nov
+# 1958        23 Mar to 2 Nov
+# 1959        22 Mar to 1 Nov
+# 1960        20 Mar to 6 Nov
+# 1961        19 Mar to 5 Nov
+# 1962        18 Mar to 4 Nov
+# 1963        24 Mar to 3 Nov
+# 1964        22 Mar to 1 Nov
+# 1965        18 Apr to 17 Oct
+# 1966        17 Apr to 16 Oct
+# 1967        16 Apr to 22 Oct
+# 1968        21 Apr to 20 Oct
+# 1969        20 Apr to 19 Oct
+# 1970        19 Apr to 18 Oct
+# 1971        18 Apr to 17 Oct
+# 1972        16 Apr to 22 Oct
+# 1973        22 Apr to 21 Oct
+# 1973/74     30 Dec 73 to 20 Oct 74
+# 1975        20 Apr to 19 Oct
+# 1976        18 Apr to 17 Oct
+# 1977        Nil
+# 1978        Nil
+# 1979        13 May to 21 Oct
+# 1980 to Now Nil
+# The page does not give start or end times of day.
+# The page does not give a start date for 1942.
+# The page does not givw an end date for 1945.
+# The Japanese occupation of Hong Kong began on 1941-12-25.
+# The Japanese surrender of Hong Kong was signed 1945-09-15.
+# For lack of anything better, use start of those days as the transition times.
+
 # Hong Kong (Xianggang)
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	HK	1941	only	-	Apr	1	3:30	1:00	S
+Rule	HK	1941	only	-	Sep	30	3:30	0	-
 Rule	HK	1946	only	-	Apr	20	3:30	1:00	S
 Rule	HK	1946	only	-	Dec	1	3:30	0	-
 Rule	HK	1947	only	-	Apr	13	3:30	1:00	S
 Rule	HK	1947	only	-	Dec	30	3:30	0	-
 Rule	HK	1948	only	-	May	2	3:30	1:00	S
-Rule	HK	1948	1952	-	Oct	lastSun	3:30	0	-
+Rule	HK	1948	1951	-	Oct	lastSun	3:30	0	-
+Rule	HK	1952	only	-	Oct	25	3:30	0	-
 Rule	HK	1949	1953	-	Apr	Sun>=1	3:30	1:00	S
 Rule	HK	1953	only	-	Nov	1	3:30	0	-
 Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
@@ -384,13 +453,15 @@ Rule	HK	1954	only	-	Oct	31	3:30	0	-
 Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
 Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
 Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
-Rule	HK	1979	1980	-	May	Sun>=8	3:30	1:00	S
-Rule	HK	1979	1980	-	Oct	Sun>=16	3:30	0	-
+Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
+Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
+Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 Oct 30
+			8:00	HK	HK%sT	1941 Dec 25
+			9:00	-	JST	1945 Sep 15
 			8:00	HK	HK%sT
 
-
 ###############################################################################
 
 # Taiwan
@@ -2236,9 +2307,23 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
 # http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
 # 
 
+# From Steffen Thorsen (2009-10-27):
+# The Syrian Arab News Network on 2009-09-29 reported that Syria will 
+# revert back to winter (standard) time on midnight between Thursday 
+# 2009-10-29 and Friday 2009-10-30:
+# 
+# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
+# 
+
+# From Arthur David Olson (2009-10-28):
+# We'll see if future DST switching times turn out to be end of the last
+# Thursday of the month or the start of the last Friday of the month or
+# something else. For now, use the start of the last Friday.
+
 Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
-Rule	Syria	2008	max	-	Nov	1	0:00	0	-
+Rule	Syria	2008	only	-	Nov	1	0:00	0	-
 Rule	Syria	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule	Syria	2009	max	-	Oct	lastFri	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq

Modified: stable/6/share/zoneinfo/europe
==============================================================================
--- stable/6/share/zoneinfo/europe	Wed Nov  4 10:46:55 2009	(r198878)
+++ stable/6/share/zoneinfo/europe	Wed Nov  4 10:47:02 2009	(r198879)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.22
+# @(#)europe	8.24
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2072,9 +2072,43 @@ Zone Asia/Novosibirsk	 5:31:40 -	LMT	191
 			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
 			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
 			 6:00	Russia	NOV%sT
+
+# From Alexander Krivenyshev (2009-10-13):
+# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
+# March 28, 2010:
+# from current Russia Zone 6 - Krasnoyarsk Time Zone (KRA) UTC +0700
+# to Russia Zone 5 - Novosibirsk Time Zone (NOV) UTC +0600
+#
+# This is according to Government of Russia decree # 740, on September
+# 14, 2009 "Application in the territory of the Kemerovo region the Fifth
+# time zone." ("Russia Zone 5" or old "USSR Zone 5" is GMT +0600)
+#
+# Russian Government web site (Russian language)
+# 
+# http://www.government.ru/content/governmentactivity/rfgovernmentdecisions/archive/2009/09/14/991633.htm
+# 
+# or Russian-English translation by WorldTimeZone.com with reference
+# map to local region and new Russia Time Zone map after March 28, 2010
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_russia03.html
+# 
+#
+# Thus, when Russia will switch to DST on the night of March 28, 2010
+# Kemerovo region (Kemerovo oblast') will not change the clock.
+#
+# As a result, Kemerovo oblast' will be in the same time zone as
+# Novosibirsk, Omsk, Tomsk, Barnaul and Altai Republic.
+
+Zone Asia/Novokuznetsk	 5:48:48 -	NMT	1920 Jan  6
+			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
+			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
+			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
+			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
+			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
-# Kemerovskaya oblast', Krasnoyarskij kraj,
+# Krasnoyarskij kraj,
 # Tajmyrskij (Dolgano-Nenetskij) avtonomnyj okrug,
 # Respublika Tuva, Respublika Khakasiya, Evenkijskij avtonomnyj okrug.
 Zone Asia/Krasnoyarsk	 6:11:20 -	LMT	1920 Jan  6

Modified: stable/6/share/zoneinfo/zone.tab
==============================================================================
--- stable/6/share/zoneinfo/zone.tab	Wed Nov  4 10:46:55 2009	(r198878)
+++ stable/6/share/zoneinfo/zone.tab	Wed Nov  4 10:47:02 2009	(r198879)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.28
+# @(#)zone.tab	8.29
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,6 +330,7 @@ RU	+5312+05009	Europe/Samara	Moscow+01 -
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
+RU	+5345+08707	Asia/Novokuznetsk	Moscow+03 - Novokuznetsk
 RU	+5601+09250	Asia/Krasnoyarsk	Moscow+04 - Yenisei River
 RU	+5216+10420	Asia/Irkutsk	Moscow+05 - Lake Baikal
 RU	+6200+12940	Asia/Yakutsk	Moscow+06 - Lena River

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 10:47:09 2009
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 631111065692;
	Wed,  4 Nov 2009 10:47:09 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5022F8FC0C;
	Wed,  4 Nov 2009 10:47:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4Al96W028861;
	Wed, 4 Nov 2009 10:47:09 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Al91C028857;
	Wed, 4 Nov 2009 10:47:09 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200911041047.nA4Al91C028857@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 4 Nov 2009 10:47:09 +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: r198880 - stable/7/share/zoneinfo
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Nov 2009 10:47:09 -0000

Author: edwin
Date: Wed Nov  4 10:47:09 2009
New Revision: 198880
URL: http://svn.freebsd.org/changeset/base/198880

Log:
  MFC of r198825: tzdata2009q
  
  - New region: Asia/Novokuznetsk
  - Kemerovo oblast' (Kemerovo region) in Russia will change current
    time zone on 29 March 2010
  - Add historical data for Hongkong 1941 - 1980
  - Syria will go to winter time in the last weekend of October 2009.

Modified:
  stable/7/share/zoneinfo/asia
  stable/7/share/zoneinfo/europe
  stable/7/share/zoneinfo/zone.tab
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Wed Nov  4 10:47:02 2009	(r198879)
+++ stable/7/share/zoneinfo/asia	Wed Nov  4 10:47:09 2009	(r198880)
@@ -1,5 +1,4 @@
-# 
-# @(#)asia	8.42
+# @(#)asia	8.44
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -369,14 +368,84 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
 			5:00	-	KAST	1980 May
 			8:00	PRC	C%sT
 
+
+# From Lee Yiu Chung (2009-10-24):
+# I found there are some mistakes for the historial DST rule for Hong
+# Kong. Accoring to the DST record from Hong Kong Observatory (actually,
+# it is not [an] observatory, but the official meteorological agency of HK,
+# and also serves as the official timing agency), there are some missing
+# and incorrect rules. Although the exact switch over time is missing, I
+# think 3:30 is correct. The official DST record for Hong Kong can be
+# obtained from
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# .
+
+# From Arthur David Olson (2009-10-28):
+# Here are the dates given at
+# 
+# http://www.hko.gov.hk/gts/time/Summertime.htm
+# 
+# as of 2009-10-28:
+# Year        Period
+# 1941        1 Apr to 30 Sep
+# 1942        Whole year 
+# 1943        Whole year
+# 1944        Whole year
+# 1945        Whole year
+# 1946        20 Apr to 1 Dec
+# 1947        13 Apr to 30 Dec
+# 1948        2 May to 31 Oct
+# 1949        3 Apr to 30 Oct
+# 1950        2 Apr to 29 Oct
+# 1951        1 Apr to 28 Oct
+# 1952        6 Apr to 25 Oct
+# 1953        5 Apr to 1 Nov
+# 1954        21 Mar to 31 Oct
+# 1955        20 Mar to 6 Nov
+# 1956        18 Mar to 4 Nov
+# 1957        24 Mar to 3 Nov
+# 1958        23 Mar to 2 Nov
+# 1959        22 Mar to 1 Nov
+# 1960        20 Mar to 6 Nov
+# 1961        19 Mar to 5 Nov
+# 1962        18 Mar to 4 Nov
+# 1963        24 Mar to 3 Nov
+# 1964        22 Mar to 1 Nov
+# 1965        18 Apr to 17 Oct
+# 1966        17 Apr to 16 Oct
+# 1967        16 Apr to 22 Oct
+# 1968        21 Apr to 20 Oct
+# 1969        20 Apr to 19 Oct
+# 1970        19 Apr to 18 Oct
+# 1971        18 Apr to 17 Oct
+# 1972        16 Apr to 22 Oct
+# 1973        22 Apr to 21 Oct
+# 1973/74     30 Dec 73 to 20 Oct 74
+# 1975        20 Apr to 19 Oct
+# 1976        18 Apr to 17 Oct
+# 1977        Nil
+# 1978        Nil
+# 1979        13 May to 21 Oct
+# 1980 to Now Nil
+# The page does not give start or end times of day.
+# The page does not give a start date for 1942.
+# The page does not givw an end date for 1945.
+# The Japanese occupation of Hong Kong began on 1941-12-25.
+# The Japanese surrender of Hong Kong was signed 1945-09-15.
+# For lack of anything better, use start of those days as the transition times.
+
 # Hong Kong (Xianggang)
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	HK	1941	only	-	Apr	1	3:30	1:00	S
+Rule	HK	1941	only	-	Sep	30	3:30	0	-
 Rule	HK	1946	only	-	Apr	20	3:30	1:00	S
 Rule	HK	1946	only	-	Dec	1	3:30	0	-
 Rule	HK	1947	only	-	Apr	13	3:30	1:00	S
 Rule	HK	1947	only	-	Dec	30	3:30	0	-
 Rule	HK	1948	only	-	May	2	3:30	1:00	S
-Rule	HK	1948	1952	-	Oct	lastSun	3:30	0	-
+Rule	HK	1948	1951	-	Oct	lastSun	3:30	0	-
+Rule	HK	1952	only	-	Oct	25	3:30	0	-
 Rule	HK	1949	1953	-	Apr	Sun>=1	3:30	1:00	S
 Rule	HK	1953	only	-	Nov	1	3:30	0	-
 Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
@@ -384,13 +453,15 @@ Rule	HK	1954	only	-	Oct	31	3:30	0	-
 Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
 Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
 Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
-Rule	HK	1979	1980	-	May	Sun>=8	3:30	1:00	S
-Rule	HK	1979	1980	-	Oct	Sun>=16	3:30	0	-
+Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
+Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
+Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 Oct 30
+			8:00	HK	HK%sT	1941 Dec 25
+			9:00	-	JST	1945 Sep 15
 			8:00	HK	HK%sT
 
-
 ###############################################################################
 
 # Taiwan
@@ -2236,9 +2307,23 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
 # http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
 # 
 
+# From Steffen Thorsen (2009-10-27):
+# The Syrian Arab News Network on 2009-09-29 reported that Syria will 
+# revert back to winter (standard) time on midnight between Thursday 
+# 2009-10-29 and Friday 2009-10-30:
+# 
+# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
+# 
+
+# From Arthur David Olson (2009-10-28):
+# We'll see if future DST switching times turn out to be end of the last
+# Thursday of the month or the start of the last Friday of the month or
+# something else. For now, use the start of the last Friday.
+
 Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
-Rule	Syria	2008	max	-	Nov	1	0:00	0	-
+Rule	Syria	2008	only	-	Nov	1	0:00	0	-
 Rule	Syria	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule	Syria	2009	max	-	Oct	lastFri	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Wed Nov  4 10:47:02 2009	(r198879)
+++ stable/7/share/zoneinfo/europe	Wed Nov  4 10:47:09 2009	(r198880)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.22
+# @(#)europe	8.24
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2072,9 +2072,43 @@ Zone Asia/Novosibirsk	 5:31:40 -	LMT	191
 			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
 			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
 			 6:00	Russia	NOV%sT
+
+# From Alexander Krivenyshev (2009-10-13):
+# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
+# March 28, 2010:
+# from current Russia Zone 6 - Krasnoyarsk Time Zone (KRA) UTC +0700
+# to Russia Zone 5 - Novosibirsk Time Zone (NOV) UTC +0600
+#
+# This is according to Government of Russia decree # 740, on September
+# 14, 2009 "Application in the territory of the Kemerovo region the Fifth
+# time zone." ("Russia Zone 5" or old "USSR Zone 5" is GMT +0600)
+#
+# Russian Government web site (Russian language)
+# 
+# http://www.government.ru/content/governmentactivity/rfgovernmentdecisions/archive/2009/09/14/991633.htm
+# 
+# or Russian-English translation by WorldTimeZone.com with reference
+# map to local region and new Russia Time Zone map after March 28, 2010
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_russia03.html
+# 
+#
+# Thus, when Russia will switch to DST on the night of March 28, 2010
+# Kemerovo region (Kemerovo oblast') will not change the clock.
+#
+# As a result, Kemerovo oblast' will be in the same time zone as
+# Novosibirsk, Omsk, Tomsk, Barnaul and Altai Republic.
+
+Zone Asia/Novokuznetsk	 5:48:48 -	NMT	1920 Jan  6
+			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
+			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
+			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
+			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
+			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
-# Kemerovskaya oblast', Krasnoyarskij kraj,
+# Krasnoyarskij kraj,
 # Tajmyrskij (Dolgano-Nenetskij) avtonomnyj okrug,
 # Respublika Tuva, Respublika Khakasiya, Evenkijskij avtonomnyj okrug.
 Zone Asia/Krasnoyarsk	 6:11:20 -	LMT	1920 Jan  6

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Wed Nov  4 10:47:02 2009	(r198879)
+++ stable/7/share/zoneinfo/zone.tab	Wed Nov  4 10:47:09 2009	(r198880)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.28
+# @(#)zone.tab	8.29
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,6 +330,7 @@ RU	+5312+05009	Europe/Samara	Moscow+01 -
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
+RU	+5345+08707	Asia/Novokuznetsk	Moscow+03 - Novokuznetsk
 RU	+5601+09250	Asia/Krasnoyarsk	Moscow+04 - Yenisei River
 RU	+5216+10420	Asia/Irkutsk	Moscow+05 - Lake Baikal
 RU	+6200+12940	Asia/Yakutsk	Moscow+06 - Lena River

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 12:35:35 2009
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 669EB106568B;
	Wed,  4 Nov 2009 12:35:35 +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 54A4A8FC13;
	Wed,  4 Nov 2009 12:35:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4CZZ4b031579;
	Wed, 4 Nov 2009 12:35:35 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4CZZOV031577;
	Wed, 4 Nov 2009 12:35:35 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041235.nA4CZZOV031577@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 12:35:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198881 - stable/8/sys/dev/amr
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, 04 Nov 2009 12:35:35 -0000

Author: brueffer
Date: Wed Nov  4 12:35:35 2009
New Revision: 198881
URL: http://svn.freebsd.org/changeset/base/198881

Log:
  MFC: r198546
  
  Remove spurious `)`

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

Modified: stable/8/sys/dev/amr/amr.c
==============================================================================
--- stable/8/sys/dev/amr/amr.c	Wed Nov  4 10:47:09 2009	(r198880)
+++ stable/8/sys/dev/amr/amr.c	Wed Nov  4 12:35:35 2009	(r198881)
@@ -225,7 +225,7 @@ amr_attach(struct amr_softc *sc)
     }
 
 #ifdef AMR_BOARD_INIT
-    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc))))
+    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc)))
 	return(ENXIO);
 #endif
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 12:38:21 2009
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 ABE63106568D;
	Wed,  4 Nov 2009 12:38:21 +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 866958FC19;
	Wed,  4 Nov 2009 12:38:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4CcLUg031667;
	Wed, 4 Nov 2009 12:38:21 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4CcLNP031665;
	Wed, 4 Nov 2009 12:38:21 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041238.nA4CcLNP031665@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 12:38:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198882 - stable/7/sys/dev/amr
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, 04 Nov 2009 12:38:21 -0000

Author: brueffer
Date: Wed Nov  4 12:38:21 2009
New Revision: 198882
URL: http://svn.freebsd.org/changeset/base/198882

Log:
  MFC: r198546
  
  Remove spurious `)`

Modified:
  stable/7/sys/dev/amr/amr.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/amr/amr.c
==============================================================================
--- stable/7/sys/dev/amr/amr.c	Wed Nov  4 12:35:35 2009	(r198881)
+++ stable/7/sys/dev/amr/amr.c	Wed Nov  4 12:38:21 2009	(r198882)
@@ -231,7 +231,7 @@ amr_attach(struct amr_softc *sc)
     }
 
 #ifdef AMR_BOARD_INIT
-    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc))))
+    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc)))
 	return(ENXIO);
 #endif
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 12:43:33 2009
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 93F67106566C;
	Wed,  4 Nov 2009 12:43:33 +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 81DD18FC1D;
	Wed,  4 Nov 2009 12:43:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4ChWds031806;
	Wed, 4 Nov 2009 12:43:32 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4ChWQi031804;
	Wed, 4 Nov 2009 12:43:32 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041243.nA4ChWQi031804@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 12:43:32 +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: r198883 - stable/6/sys/dev/amr
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, 04 Nov 2009 12:43:33 -0000

Author: brueffer
Date: Wed Nov  4 12:43:31 2009
New Revision: 198883
URL: http://svn.freebsd.org/changeset/base/198883

Log:
  MFC: r198546
  
  Remove spurious `)`

Modified:
  stable/6/sys/dev/amr/amr.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/conf/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/dev/amr/amr.c
==============================================================================
--- stable/6/sys/dev/amr/amr.c	Wed Nov  4 12:38:21 2009	(r198882)
+++ stable/6/sys/dev/amr/amr.c	Wed Nov  4 12:43:31 2009	(r198883)
@@ -229,7 +229,7 @@ amr_attach(struct amr_softc *sc)
     }
 
 #ifdef AMR_BOARD_INIT
-    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc))))
+    if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc)))
 	return(ENXIO);
 #endif
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 13:06:09 2009
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 677FB106568F;
	Wed,  4 Nov 2009 13:06:09 +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 555698FC15;
	Wed,  4 Nov 2009 13:06:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4D69Po032337;
	Wed, 4 Nov 2009 13:06:09 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4D698O032335;
	Wed, 4 Nov 2009 13:06:09 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041306.nA4D698O032335@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 13:06:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198884 - stable/8/sys/boot/common
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, 04 Nov 2009 13:06:09 -0000

Author: brueffer
Date: Wed Nov  4 13:06:09 2009
New Revision: 198884
URL: http://svn.freebsd.org/changeset/base/198884

Log:
  MFC: r198537
  
  Close a file descriptor leak in an error case.

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

Modified: stable/8/sys/boot/common/commands.c
==============================================================================
--- stable/8/sys/boot/common/commands.c	Wed Nov  4 12:43:31 2009	(r198883)
+++ stable/8/sys/boot/common/commands.c	Wed Nov  4 13:06:09 2009	(r198884)
@@ -150,6 +150,7 @@ command_help(int argc, char *argv[]) 
 	break;
     default:
 	command_errmsg = "usage is 'help  []";
+	close(hfd);
 	return(CMD_ERROR);
     }
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 13:08:57 2009
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 7FB03106566B;
	Wed,  4 Nov 2009 13:08:57 +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 6D73A8FC0C;
	Wed,  4 Nov 2009 13:08:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4D8voQ032432;
	Wed, 4 Nov 2009 13:08:57 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4D8v4B032430;
	Wed, 4 Nov 2009 13:08:57 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041308.nA4D8v4B032430@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 13:08:57 +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: r198885 - stable/7/sys/boot/common
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, 04 Nov 2009 13:08:57 -0000

Author: brueffer
Date: Wed Nov  4 13:08:57 2009
New Revision: 198885
URL: http://svn.freebsd.org/changeset/base/198885

Log:
  MFC: r198537
  
  Close a file descriptor leak in an error case.

Modified:
  stable/7/sys/boot/common/commands.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/boot/common/commands.c
==============================================================================
--- stable/7/sys/boot/common/commands.c	Wed Nov  4 13:06:09 2009	(r198884)
+++ stable/7/sys/boot/common/commands.c	Wed Nov  4 13:08:57 2009	(r198885)
@@ -150,6 +150,7 @@ command_help(int argc, char *argv[]) 
 	break;
     default:
 	command_errmsg = "usage is 'help  []";
+	close(hfd);
 	return(CMD_ERROR);
     }
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 13:30:32 2009
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 7EF0A1065676;
	Wed,  4 Nov 2009 13:30:32 +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 6CC818FC0C;
	Wed,  4 Nov 2009 13:30:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4DUWR5032912;
	Wed, 4 Nov 2009 13:30:32 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4DUW3e032910;
	Wed, 4 Nov 2009 13:30:32 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041330.nA4DUW3e032910@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 13:30:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198886 - stable/8/sys/netinet/libalias
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, 04 Nov 2009 13:30:32 -0000

Author: brueffer
Date: Wed Nov  4 13:30:32 2009
New Revision: 198886
URL: http://svn.freebsd.org/changeset/base/198886

Log:
  MFC: r198539
  
  Close a stream file descriptor leak.

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

Modified: stable/8/sys/netinet/libalias/alias.c
==============================================================================
--- stable/8/sys/netinet/libalias/alias.c	Wed Nov  4 13:08:57 2009	(r198885)
+++ stable/8/sys/netinet/libalias/alias.c	Wed Nov  4 13:30:32 2009	(r198886)
@@ -1669,6 +1669,7 @@ LibAliasRefreshModules(void)
 			LibAliasLoadModule(buf);
 		}
 	}
+	fclose(fd);
 	return (0);
 }
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 13:32:25 2009
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 E3817106568F;
	Wed,  4 Nov 2009 13:32:25 +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 D17DC8FC17;
	Wed,  4 Nov 2009 13:32:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4DWPg8032990;
	Wed, 4 Nov 2009 13:32:25 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4DWPHK032988;
	Wed, 4 Nov 2009 13:32:25 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041332.nA4DWPHK032988@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 13:32:25 +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: r198887 - stable/7/sys/netinet/libalias
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, 04 Nov 2009 13:32:26 -0000

Author: brueffer
Date: Wed Nov  4 13:32:25 2009
New Revision: 198887
URL: http://svn.freebsd.org/changeset/base/198887

Log:
  MFC: 198539
  
  Close a stream file descriptor leak.

Modified:
  stable/7/sys/netinet/libalias/alias.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netinet/libalias/alias.c
==============================================================================
--- stable/7/sys/netinet/libalias/alias.c	Wed Nov  4 13:30:32 2009	(r198886)
+++ stable/7/sys/netinet/libalias/alias.c	Wed Nov  4 13:32:25 2009	(r198887)
@@ -1580,6 +1580,7 @@ LibAliasRefreshModules(void)
 			LibAliasLoadModule(buf);
 		}
 	}
+	fclose(fd);
 	return (0);
 }
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 13:40:04 2009
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 C1D281065679;
	Wed,  4 Nov 2009 13:40:04 +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 AF8068FC12;
	Wed,  4 Nov 2009 13:40:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4De4jC033191;
	Wed, 4 Nov 2009 13:40:04 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4De4Mr033189;
	Wed, 4 Nov 2009 13:40:04 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041340.nA4De4Mr033189@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 13:40:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198888 - stable/8/lib/libstand
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, 04 Nov 2009 13:40:04 -0000

Author: brueffer
Date: Wed Nov  4 13:40:04 2009
New Revision: 198888
URL: http://svn.freebsd.org/changeset/base/198888

Log:
  MFC: r198542
  
  Initialize f_rabuf in the raw device case. A subsequent close()
  later on would try to free it, leading to a crash.

Modified:
  stable/8/lib/libstand/open.c
Directory Properties:
  stable/8/lib/libstand/   (props changed)

Modified: stable/8/lib/libstand/open.c
==============================================================================
--- stable/8/lib/libstand/open.c	Wed Nov  4 13:32:25 2009	(r198887)
+++ stable/8/lib/libstand/open.c	Wed Nov  4 13:40:04 2009	(r198888)
@@ -113,6 +113,7 @@ open(const char *fname, int mode)
     /* see if we opened a raw device; otherwise, 'file' is the file name. */
     if (file == (char *)0 || *file == '\0') {
 	f->f_flags |= F_RAW;
+	f->f_rabuf = NULL;
 	return (fd);
     }
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 13:40:51 2009
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 4F211106566B;
	Wed,  4 Nov 2009 13:40:51 +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 3D2318FC1E;
	Wed,  4 Nov 2009 13:40:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4DepeX033254;
	Wed, 4 Nov 2009 13:40:51 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Depix033252;
	Wed, 4 Nov 2009 13:40:51 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041340.nA4Depix033252@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 13:40:51 +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: r198889 - stable/7/lib/libstand
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, 04 Nov 2009 13:40:51 -0000

Author: brueffer
Date: Wed Nov  4 13:40:50 2009
New Revision: 198889
URL: http://svn.freebsd.org/changeset/base/198889

Log:
  MFC: r198542
  
  Initialize f_rabuf in the raw device case. A subsequent close()
  later on would try to free it, leading to a crash.

Modified:
  stable/7/lib/libstand/open.c
Directory Properties:
  stable/7/lib/libstand/   (props changed)

Modified: stable/7/lib/libstand/open.c
==============================================================================
--- stable/7/lib/libstand/open.c	Wed Nov  4 13:40:04 2009	(r198888)
+++ stable/7/lib/libstand/open.c	Wed Nov  4 13:40:50 2009	(r198889)
@@ -113,6 +113,7 @@ open(const char *fname, int mode)
     /* see if we opened a raw device; otherwise, 'file' is the file name. */
     if (file == (char *)0 || *file == '\0') {
 	f->f_flags |= F_RAW;
+	f->f_rabuf = NULL;
 	return (fd);
     }
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 13:41:43 2009
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 903251065670;
	Wed,  4 Nov 2009 13:41:43 +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 7E1938FC1A;
	Wed,  4 Nov 2009 13:41:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4DfhQ1033322;
	Wed, 4 Nov 2009 13:41:43 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4DfhNq033320;
	Wed, 4 Nov 2009 13:41:43 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911041341.nA4DfhNq033320@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 4 Nov 2009 13:41:43 +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: r198890 - stable/6/lib/libstand
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, 04 Nov 2009 13:41:43 -0000

Author: brueffer
Date: Wed Nov  4 13:41:43 2009
New Revision: 198890
URL: http://svn.freebsd.org/changeset/base/198890

Log:
  MFC: 198542
  
  Initialize f_rabuf in the raw device case. A subsequent close()
  later on would try to free it, leading to a crash.

Modified:
  stable/6/lib/libstand/open.c
Directory Properties:
  stable/6/lib/libstand/   (props changed)

Modified: stable/6/lib/libstand/open.c
==============================================================================
--- stable/6/lib/libstand/open.c	Wed Nov  4 13:40:50 2009	(r198889)
+++ stable/6/lib/libstand/open.c	Wed Nov  4 13:41:43 2009	(r198890)
@@ -117,6 +117,7 @@ open(const char *fname, int mode)
     /* see if we opened a raw device; otherwise, 'file' is the file name. */
     if (file == (char *)0 || *file == '\0') {
 	f->f_flags |= F_RAW;
+	f->f_rabuf = NULL;
 	return (fd);
     }
 

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 16:03:48 2009
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 067701065672;
	Wed,  4 Nov 2009 16:03:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CEC998FC08;
	Wed,  4 Nov 2009 16:03:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4G3lBj037421;
	Wed, 4 Nov 2009 16:03:47 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4G3lZ0037419;
	Wed, 4 Nov 2009 16:03:47 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911041603.nA4G3lZ0037419@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 4 Nov 2009 16:03:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198900 - stable/8/sbin/ddb
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, 04 Nov 2009 16:03:48 -0000

Author: jhb
Date: Wed Nov  4 16:03:47 2009
New Revision: 198900
URL: http://svn.freebsd.org/changeset/base/198900

Log:
  MFC 198585:
  When extracting the capture buffer from a crashdump, only read the valid
  portion of the capture buffer.

Modified:
  stable/8/sbin/ddb/ddb_capture.c
Directory Properties:
  stable/8/sbin/ddb/   (props changed)

Modified: stable/8/sbin/ddb/ddb_capture.c
==============================================================================
--- stable/8/sbin/ddb/ddb_capture.c	Wed Nov  4 15:40:19 2009	(r198899)
+++ stable/8/sbin/ddb/ddb_capture.c	Wed Nov  4 16:03:47 2009	(r198900)
@@ -95,24 +95,24 @@ kread_symbol(kvm_t *kvm, int index, void
 static void
 ddb_capture_print_kvm(kvm_t *kvm)
 {
-	u_int db_capture_bufsize;
+	u_int db_capture_bufoff;
 	char *buffer, *db_capture_buf;
 
 	if (kread_symbol(kvm, X_DB_CAPTURE_BUF, &db_capture_buf,
 	    sizeof(db_capture_buf), 0) < 0)
 		errx(-1, "kvm: unable to read db_capture_buf");
 
-	if (kread_symbol(kvm, X_DB_CAPTURE_BUFSIZE, &db_capture_bufsize,
-	    sizeof(db_capture_bufsize), 0) < 0)
-		errx(-1, "kvm: unable to read db_capture_bufsize");
+	if (kread_symbol(kvm, X_DB_CAPTURE_BUFOFF, &db_capture_bufoff,
+	    sizeof(db_capture_bufoff), 0) < 0)
+		errx(-1, "kvm: unable to read db_capture_bufoff");
 
-	buffer = malloc(db_capture_bufsize + 1);
+	buffer = malloc(db_capture_bufoff + 1);
 	if (buffer == NULL)
-		err(-1, "malloc: db_capture_bufsize (%u)",
-		    db_capture_bufsize);
-	bzero(buffer, db_capture_bufsize + 1);
+		err(-1, "malloc: db_capture_bufoff (%u)",
+		    db_capture_bufoff);
+	bzero(buffer, db_capture_bufoff + 1);
 
-	if (kread(kvm, db_capture_buf, buffer, db_capture_bufsize, 0) < 0)
+	if (kread(kvm, db_capture_buf, buffer, db_capture_bufoff, 0) < 0)
 		errx(-1, "kvm: unable to read buffer");
 
 	printf("%s\n", buffer);
@@ -161,7 +161,7 @@ ddb_capture_status_kvm(kvm_t *kvm)
 		errx(-1, "kvm: unable to read db_capture_bufsize");
 	if (kread_symbol(kvm, X_DB_CAPTURE_INPROGRESS,
 	    &db_capture_inprogress, sizeof(db_capture_inprogress), 0) < 0)
-		err(-1, "kvm: unable to read db_capture_inpgoress");
+		err(-1, "kvm: unable to read db_capture_inprogress");
 	printf("%u/%u bytes used\n", db_capture_bufoff, db_capture_bufsize);
 	if (db_capture_inprogress)
 		printf("capture is on\n");

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 16:03:59 2009
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 3E8DF106566C;
	Wed,  4 Nov 2009 16:03:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 134998FC1E;
	Wed,  4 Nov 2009 16:03:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4G3wAt037463;
	Wed, 4 Nov 2009 16:03:58 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4G3wGd037461;
	Wed, 4 Nov 2009 16:03:58 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911041603.nA4G3wGd037461@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 4 Nov 2009 16:03:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198901 - stable/7/sbin/ddb
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, 04 Nov 2009 16:03:59 -0000

Author: jhb
Date: Wed Nov  4 16:03:58 2009
New Revision: 198901
URL: http://svn.freebsd.org/changeset/base/198901

Log:
  MFC 198585:
  When extracting the capture buffer from a crashdump, only read the valid
  portion of the capture buffer.

Modified:
  stable/7/sbin/ddb/ddb_capture.c
Directory Properties:
  stable/7/sbin/ddb/   (props changed)

Modified: stable/7/sbin/ddb/ddb_capture.c
==============================================================================
--- stable/7/sbin/ddb/ddb_capture.c	Wed Nov  4 16:03:47 2009	(r198900)
+++ stable/7/sbin/ddb/ddb_capture.c	Wed Nov  4 16:03:58 2009	(r198901)
@@ -95,24 +95,24 @@ kread_symbol(kvm_t *kvm, int index, void
 static void
 ddb_capture_print_kvm(kvm_t *kvm)
 {
-	u_int db_capture_bufsize;
+	u_int db_capture_bufoff;
 	char *buffer, *db_capture_buf;
 
 	if (kread_symbol(kvm, X_DB_CAPTURE_BUF, &db_capture_buf,
 	    sizeof(db_capture_buf), 0) < 0)
 		errx(-1, "kvm: unable to read db_capture_buf");
 
-	if (kread_symbol(kvm, X_DB_CAPTURE_BUFSIZE, &db_capture_bufsize,
-	    sizeof(db_capture_bufsize), 0) < 0)
-		errx(-1, "kvm: unable to read db_capture_bufsize");
+	if (kread_symbol(kvm, X_DB_CAPTURE_BUFOFF, &db_capture_bufoff,
+	    sizeof(db_capture_bufoff), 0) < 0)
+		errx(-1, "kvm: unable to read db_capture_bufoff");
 
-	buffer = malloc(db_capture_bufsize + 1);
+	buffer = malloc(db_capture_bufoff + 1);
 	if (buffer == NULL)
-		err(-1, "malloc: db_capture_bufsize (%u)",
-		    db_capture_bufsize);
-	bzero(buffer, db_capture_bufsize + 1);
+		err(-1, "malloc: db_capture_bufoff (%u)",
+		    db_capture_bufoff);
+	bzero(buffer, db_capture_bufoff + 1);
 
-	if (kread(kvm, db_capture_buf, buffer, db_capture_bufsize, 0) < 0)
+	if (kread(kvm, db_capture_buf, buffer, db_capture_bufoff, 0) < 0)
 		errx(-1, "kvm: unable to read buffer");
 
 	printf("%s\n", buffer);
@@ -161,7 +161,7 @@ ddb_capture_status_kvm(kvm_t *kvm)
 		errx(-1, "kvm: unable to read db_capture_bufsize");
 	if (kread_symbol(kvm, X_DB_CAPTURE_INPROGRESS,
 	    &db_capture_inprogress, sizeof(db_capture_inprogress), 0) < 0)
-		err(-1, "kvm: unable to read db_capture_inpgoress");
+		err(-1, "kvm: unable to read db_capture_inprogress");
 	printf("%u/%u bytes used\n", db_capture_bufoff, db_capture_bufsize);
 	if (db_capture_inprogress)
 		printf("capture is on\n");

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 16:05:10 2009
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 228F11065692;
	Wed,  4 Nov 2009 16:05:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 10EFF8FC3C;
	Wed,  4 Nov 2009 16:05:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4G59Kv037561;
	Wed, 4 Nov 2009 16:05:09 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4G59o6037559;
	Wed, 4 Nov 2009 16:05:09 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911041605.nA4G59o6037559@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 4 Nov 2009 16:05:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198902 - stable/8/usr.sbin/crashinfo
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, 04 Nov 2009 16:05:10 -0000

Author: jhb
Date: Wed Nov  4 16:05:09 2009
New Revision: 198902
URL: http://svn.freebsd.org/changeset/base/198902

Log:
  MFC 198586: Include the output of the ddb(4) capture buffer.

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

Modified: stable/8/usr.sbin/crashinfo/crashinfo.sh
==============================================================================
--- stable/8/usr.sbin/crashinfo/crashinfo.sh	Wed Nov  4 16:03:58 2009	(r198901)
+++ stable/8/usr.sbin/crashinfo/crashinfo.sh	Wed Nov  4 16:05:09 2009	(r198902)
@@ -304,3 +304,10 @@ echo "----------------------------------
 echo "kernel config"
 echo
 config -x $KERNEL
+
+echo
+echo "------------------------------------------------------------------------"
+echo "ddb capture buffer"
+echo
+
+ddb capture -M $VMCORE -N $KERNEL print

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 16:05:18 2009
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 ED39A106568B;
	Wed,  4 Nov 2009 16:05:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DC05A8FC1D;
	Wed,  4 Nov 2009 16:05:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4G5ITm037600;
	Wed, 4 Nov 2009 16:05:18 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4G5I57037598;
	Wed, 4 Nov 2009 16:05:18 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911041605.nA4G5I57037598@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 4 Nov 2009 16:05:18 +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: r198903 - stable/7/usr.sbin/crashinfo
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, 04 Nov 2009 16:05:19 -0000

Author: jhb
Date: Wed Nov  4 16:05:18 2009
New Revision: 198903
URL: http://svn.freebsd.org/changeset/base/198903

Log:
  MFC 198586: Include the output of the ddb(4) capture buffer.

Modified:
  stable/7/usr.sbin/crashinfo/crashinfo.sh
Directory Properties:
  stable/7/usr.sbin/crashinfo/   (props changed)

Modified: stable/7/usr.sbin/crashinfo/crashinfo.sh
==============================================================================
--- stable/7/usr.sbin/crashinfo/crashinfo.sh	Wed Nov  4 16:05:09 2009	(r198902)
+++ stable/7/usr.sbin/crashinfo/crashinfo.sh	Wed Nov  4 16:05:18 2009	(r198903)
@@ -304,3 +304,10 @@ echo "----------------------------------
 echo "kernel config"
 echo
 config -x $KERNEL
+
+echo
+echo "------------------------------------------------------------------------"
+echo "ddb capture buffer"
+echo
+
+ddb capture -M $VMCORE -N $KERNEL print

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 16:58:26 2009
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 B234C106566B;
	Wed,  4 Nov 2009 16:58:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A0AF98FC0A;
	Wed,  4 Nov 2009 16:58:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4GwQH6039186;
	Wed, 4 Nov 2009 16:58:26 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4GwQSB039184;
	Wed, 4 Nov 2009 16:58:26 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911041658.nA4GwQSB039184@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 4 Nov 2009 16:58:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198907 - stable/8/sys/dev/ppbus
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, 04 Nov 2009 16:58:26 -0000

Author: jhb
Date: Wed Nov  4 16:58:26 2009
New Revision: 198907
URL: http://svn.freebsd.org/changeset/base/198907

Log:
  MFC 197772:
  When the timeout backoff hits the maximum value, leave it capped at the
  maximum value rather than setting it to the result of a boolean expression
  that is always true.

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

Modified: stable/8/sys/dev/ppbus/lpt.c
==============================================================================
--- stable/8/sys/dev/ppbus/lpt.c	Wed Nov  4 16:57:12 2009	(r198906)
+++ stable/8/sys/dev/ppbus/lpt.c	Wed Nov  4 16:58:26 2009	(r198907)
@@ -456,7 +456,7 @@ lptout(void *arg)
 	if (sc->sc_state & OPEN) {
 		sc->sc_backoff++;
 		if (sc->sc_backoff > hz/LPTOUTMAX)
-			sc->sc_backoff = sc->sc_backoff > hz/LPTOUTMAX;
+			sc->sc_backoff = hz/LPTOUTMAX;
 		callout_reset(&sc->sc_timer, sc->sc_backoff, lptout, sc);
 	} else
 		sc->sc_state &= ~TOUT;

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 16:59:21 2009
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 9A93B1065693;
	Wed,  4 Nov 2009 16:59:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 891C58FC0C;
	Wed,  4 Nov 2009 16:59:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4GxL8c039246;
	Wed, 4 Nov 2009 16:59:21 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4GxL7n039244;
	Wed, 4 Nov 2009 16:59:21 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911041659.nA4GxL7n039244@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 4 Nov 2009 16:59:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198908 - stable/7/sys/dev/ppbus
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, 04 Nov 2009 16:59:21 -0000

Author: jhb
Date: Wed Nov  4 16:59:21 2009
New Revision: 198908
URL: http://svn.freebsd.org/changeset/base/198908

Log:
  MFC 197772:
  When the timeout backoff hits the maximum value, leave it capped at the
  maximum value rather than setting it to the result of a boolean expression
  that is always true.

Modified:
  stable/7/sys/dev/ppbus/lpt.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/ppbus/lpt.c
==============================================================================
--- stable/7/sys/dev/ppbus/lpt.c	Wed Nov  4 16:58:26 2009	(r198907)
+++ stable/7/sys/dev/ppbus/lpt.c	Wed Nov  4 16:59:21 2009	(r198908)
@@ -437,7 +437,7 @@ lptout(void *arg)
 	if (sc->sc_state & OPEN) {
 		sc->sc_backoff++;
 		if (sc->sc_backoff > hz/LPTOUTMAX)
-			sc->sc_backoff = sc->sc_backoff > hz/LPTOUTMAX;
+			sc->sc_backoff = hz/LPTOUTMAX;
 		timeout(lptout, (caddr_t)dev, sc->sc_backoff);
 	} else
 		sc->sc_state &= ~TOUT;

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 18:03:19 2009
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 B82791065670;
	Wed,  4 Nov 2009 18:03:19 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A5B5F8FC08;
	Wed,  4 Nov 2009 18:03:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4I3J54041045;
	Wed, 4 Nov 2009 18:03:19 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4I3JuB041043;
	Wed, 4 Nov 2009 18:03:19 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041803.nA4I3JuB041043@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 18:03: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: r198912 - stable/7/sys/dev/fxp
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, 04 Nov 2009 18:03:19 -0000

Author: yongari
Date: Wed Nov  4 18:03:19 2009
New Revision: 198912
URL: http://svn.freebsd.org/changeset/base/198912

Log:
  MFC r193875:
    Controller will dma SCB command status for a given command and
    driver should read updated status back after issuing a SCB command.
    To send a command to controller and read updated status back,
    driver should synchronize both memory read and write operations
    with device. Fix bus_dmamap_sync operation specifier used in
    fxp_dma_wait() by adding both memory read and memory write
    operations.

Modified:
  stable/7/sys/dev/fxp/if_fxp.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 17:30:48 2009	(r198911)
+++ stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:03:19 2009	(r198912)
@@ -348,12 +348,14 @@ static void
 fxp_dma_wait(struct fxp_softc *sc, volatile uint16_t *status,
     bus_dma_tag_t dmat, bus_dmamap_t map)
 {
-	int i = 10000;
+	int i;
 
-	bus_dmamap_sync(dmat, map, BUS_DMASYNC_POSTREAD);
-	while (!(le16toh(*status) & FXP_CB_STATUS_C) && --i) {
+	for (i = 10000; i > 0; i--) {
 		DELAY(2);
-		bus_dmamap_sync(dmat, map, BUS_DMASYNC_POSTREAD);
+		bus_dmamap_sync(dmat, map,
+		    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
+		if ((le16toh(*status) & FXP_CB_STATUS_C) != 0)
+			break;
 	}
 	if (i == 0)
 		device_printf(sc->dev, "DMA timeout\n");
@@ -2222,13 +2224,12 @@ fxp_init_body(struct fxp_softc *sc)
 	 	 * Start the multicast setup command.
 		 */
 		fxp_scb_wait(sc);
-		bus_dmamap_sync(sc->mcs_tag, sc->mcs_map, BUS_DMASYNC_PREWRITE);
+		bus_dmamap_sync(sc->mcs_tag, sc->mcs_map,
+		    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 		CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->mcs_addr);
 		fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START);
 		/* ...and wait for it to complete. */
 		fxp_dma_wait(sc, &mcsp->cb_status, sc->mcs_tag, sc->mcs_map);
-		bus_dmamap_sync(sc->mcs_tag, sc->mcs_map,
-		    BUS_DMASYNC_POSTWRITE);
 	}
 
 	/*
@@ -2336,12 +2337,12 @@ fxp_init_body(struct fxp_softc *sc)
 	 * Start the config command/DMA.
 	 */
 	fxp_scb_wait(sc);
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE);
+	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
+	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->fxp_desc.cbl_addr);
 	fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START);
 	/* ...and wait for it to complete. */
 	fxp_dma_wait(sc, &cbp->cb_status, sc->cbl_tag, sc->cbl_map);
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_POSTWRITE);
 
 	/*
 	 * Now initialize the station address. Temporarily use the TxCB
@@ -2357,11 +2358,11 @@ fxp_init_body(struct fxp_softc *sc)
 	 * Start the IAS (Individual Address Setup) command/DMA.
 	 */
 	fxp_scb_wait(sc);
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE);
+	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
+	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START);
 	/* ...and wait for it to complete. */
 	fxp_dma_wait(sc, &cb_ias->cb_status, sc->cbl_tag, sc->cbl_map);
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_POSTWRITE);
 
 	/*
 	 * Initialize transmit control block (TxCB) list.
@@ -3006,12 +3007,12 @@ fxp_load_ucode(struct fxp_softc *sc)
 	 * Download the ucode to the chip.
 	 */
 	fxp_scb_wait(sc);
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE);
+	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
+	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->fxp_desc.cbl_addr);
 	fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START);
 	/* ...and wait for it to complete. */
 	fxp_dma_wait(sc, &cbp->cb_status, sc->cbl_tag, sc->cbl_map);
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_POSTWRITE);
 	device_printf(sc->dev,
 	    "Microcode loaded, int_delay: %d usec  bundle_max: %d\n",
 	    sc->tunable_int_delay,

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 18:07:09 2009
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 D9CD61065672;
	Wed,  4 Nov 2009 18:07:09 +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 C6EA38FC16;
	Wed,  4 Nov 2009 18:07:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4I79SU041182;
	Wed, 4 Nov 2009 18:07:09 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4I79MQ041179;
	Wed, 4 Nov 2009 18:07:09 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041807.nA4I79MQ041179@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 18:07:09 +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: r198913 - stable/7/sys/dev/fxp
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, 04 Nov 2009 18:07:10 -0000

Author: yongari
Date: Wed Nov  4 18:07:09 2009
New Revision: 198913
URL: http://svn.freebsd.org/changeset/base/198913

Log:
  MFC r194569:
    Introduce Rx mbuf dma tag and use it in Rx path. Previously it used
    common mbuf dma tag for both Tx and Rx path but Rx buffer should
    have single DMA segment and maximum buffer size of the segment
    should be less than MCLBYTES.
    fxp(4) also have to check Tx completion status which was updated by
    DMA so we need BUS_DMASYNC_PREREAD and BUS_DMASYNC_POSTWRITE
    synchronization in Tx path. Fix all misuse of bus_dmamap_sync(9) in
    fxp(4). I guess this change shall fix occasional driver breakage in
    PAE environments.
  
    While I'm here add error messages of dma tag/buffer creation and
    correct messages.

Modified:
  stable/7/sys/dev/fxp/if_fxp.c
  stable/7/sys/dev/fxp/if_fxpvar.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:03:19 2009	(r198912)
+++ stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:07:09 2009	(r198913)
@@ -643,9 +643,18 @@ fxp_attach(device_t dev)
 	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
 	    sc->maxsegsize * sc->maxtxseg + sizeof(struct ether_vlan_header),
 	    sc->maxtxseg, sc->maxsegsize, 0,
-	    busdma_lock_mutex, &Giant, &sc->fxp_mtag);
+	    busdma_lock_mutex, &Giant, &sc->fxp_txmtag);
 	if (error) {
-		device_printf(dev, "could not allocate dma tag\n");
+		device_printf(dev, "could not create TX DMA tag\n");
+		goto fail;
+	}
+
+	error = bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0,
+	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+	    MCLBYTES, 1, MCLBYTES, 0,
+	    busdma_lock_mutex, &Giant, &sc->fxp_rxmtag);
+	if (error) {
+		device_printf(dev, "could not create RX DMA tag\n");
 		goto fail;
 	}
 
@@ -654,18 +663,20 @@ fxp_attach(device_t dev)
 	    sizeof(struct fxp_stats), 1, sizeof(struct fxp_stats), 0,
 	    busdma_lock_mutex, &Giant, &sc->fxp_stag);
 	if (error) {
-		device_printf(dev, "could not allocate dma tag\n");
+		device_printf(dev, "could not create stats DMA tag\n");
 		goto fail;
 	}
 
 	error = bus_dmamem_alloc(sc->fxp_stag, (void **)&sc->fxp_stats,
 	    BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->fxp_smap);
-	if (error)
+	if (error) {
+		device_printf(dev, "could not allocate stats DMA memory\n");
 		goto fail;
+	}
 	error = bus_dmamap_load(sc->fxp_stag, sc->fxp_smap, sc->fxp_stats,
 	    sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr, 0);
 	if (error) {
-		device_printf(dev, "could not map the stats buffer\n");
+		device_printf(dev, "could not load the stats DMA buffer\n");
 		goto fail;
 	}
 
@@ -674,20 +685,22 @@ fxp_attach(device_t dev)
 	    FXP_TXCB_SZ, 1, FXP_TXCB_SZ, 0,
 	    busdma_lock_mutex, &Giant, &sc->cbl_tag);
 	if (error) {
-		device_printf(dev, "could not allocate dma tag\n");
+		device_printf(dev, "could not create TxCB DMA tag\n");
 		goto fail;
 	}
 
 	error = bus_dmamem_alloc(sc->cbl_tag, (void **)&sc->fxp_desc.cbl_list,
 	    BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->cbl_map);
-	if (error)
+	if (error) {
+		device_printf(dev, "could not allocate TxCB DMA memory\n");
 		goto fail;
+	}
 
 	error = bus_dmamap_load(sc->cbl_tag, sc->cbl_map,
 	    sc->fxp_desc.cbl_list, FXP_TXCB_SZ, fxp_dma_map_addr,
 	    &sc->fxp_desc.cbl_addr, 0);
 	if (error) {
-		device_printf(dev, "could not map DMA memory\n");
+		device_printf(dev, "could not load TxCB DMA buffer\n");
 		goto fail;
 	}
 
@@ -696,18 +709,23 @@ fxp_attach(device_t dev)
 	    sizeof(struct fxp_cb_mcs), 1, sizeof(struct fxp_cb_mcs), 0,
 	    busdma_lock_mutex, &Giant, &sc->mcs_tag);
 	if (error) {
-		device_printf(dev, "could not allocate dma tag\n");
+		device_printf(dev,
+		    "could not create multicast setup DMA tag\n");
 		goto fail;
 	}
 
 	error = bus_dmamem_alloc(sc->mcs_tag, (void **)&sc->mcsp,
-	    BUS_DMA_NOWAIT, &sc->mcs_map);
-	if (error)
+	    BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->mcs_map);
+	if (error) {
+		device_printf(dev,
+		    "could not allocate multicast setup DMA memory\n");
 		goto fail;
+	}
 	error = bus_dmamap_load(sc->mcs_tag, sc->mcs_map, sc->mcsp,
 	    sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr, 0);
 	if (error) {
-		device_printf(dev, "can't map the multicast setup command\n");
+		device_printf(dev,
+		    "can't load the multicast setup DMA buffer\n");
 		goto fail;
 	}
 
@@ -719,13 +737,13 @@ fxp_attach(device_t dev)
 	tcbp = sc->fxp_desc.cbl_list;
 	for (i = 0; i < FXP_NTXCB; i++) {
 		txp[i].tx_cb = tcbp + i;
-		error = bus_dmamap_create(sc->fxp_mtag, 0, &txp[i].tx_map);
+		error = bus_dmamap_create(sc->fxp_txmtag, 0, &txp[i].tx_map);
 		if (error) {
 			device_printf(dev, "can't create DMA map for TX\n");
 			goto fail;
 		}
 	}
-	error = bus_dmamap_create(sc->fxp_mtag, 0, &sc->spare_map);
+	error = bus_dmamap_create(sc->fxp_rxmtag, 0, &sc->spare_map);
 	if (error) {
 		device_printf(dev, "can't create spare DMA map\n");
 		goto fail;
@@ -737,7 +755,7 @@ fxp_attach(device_t dev)
 	sc->fxp_desc.rx_head = sc->fxp_desc.rx_tail = NULL;
 	for (i = 0; i < FXP_NRFABUFS; i++) {
 		rxp = &sc->fxp_desc.rx_list[i];
-		error = bus_dmamap_create(sc->fxp_mtag, 0, &rxp->rx_map);
+		error = bus_dmamap_create(sc->fxp_rxmtag, 0, &rxp->rx_map);
 		if (error) {
 			device_printf(dev, "can't create DMA map for RX\n");
 			goto fail;
@@ -911,29 +929,32 @@ fxp_release(struct fxp_softc *sc)
 		bus_dmamem_free(sc->mcs_tag, sc->mcsp, sc->mcs_map);
 	}
 	bus_release_resources(sc->dev, sc->fxp_spec, sc->fxp_res);
-	if (sc->fxp_mtag) {
+	if (sc->fxp_rxmtag) {
 		for (i = 0; i < FXP_NRFABUFS; i++) {
 			rxp = &sc->fxp_desc.rx_list[i];
 			if (rxp->rx_mbuf != NULL) {
-				bus_dmamap_sync(sc->fxp_mtag, rxp->rx_map,
+				bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map,
 				    BUS_DMASYNC_POSTREAD);
-				bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map);
+				bus_dmamap_unload(sc->fxp_rxmtag, rxp->rx_map);
 				m_freem(rxp->rx_mbuf);
 			}
-			bus_dmamap_destroy(sc->fxp_mtag, rxp->rx_map);
+			bus_dmamap_destroy(sc->fxp_rxmtag, rxp->rx_map);
 		}
-		bus_dmamap_destroy(sc->fxp_mtag, sc->spare_map);
+		bus_dmamap_destroy(sc->fxp_rxmtag, sc->spare_map);
+		bus_dma_tag_destroy(sc->fxp_rxmtag);
+	}
+	if (sc->fxp_txmtag) {
 		for (i = 0; i < FXP_NTXCB; i++) {
 			txp = &sc->fxp_desc.tx_list[i];
 			if (txp->tx_mbuf != NULL) {
-				bus_dmamap_sync(sc->fxp_mtag, txp->tx_map,
+				bus_dmamap_sync(sc->fxp_txmtag, txp->tx_map,
 				    BUS_DMASYNC_POSTWRITE);
-				bus_dmamap_unload(sc->fxp_mtag, txp->tx_map);
+				bus_dmamap_unload(sc->fxp_txmtag, txp->tx_map);
 				m_freem(txp->tx_mbuf);
 			}
-			bus_dmamap_destroy(sc->fxp_mtag, txp->tx_map);
+			bus_dmamap_destroy(sc->fxp_txmtag, txp->tx_map);
 		}
-		bus_dma_tag_destroy(sc->fxp_mtag);
+		bus_dma_tag_destroy(sc->fxp_txmtag);
 	}
 	if (sc->fxp_stag)
 		bus_dma_tag_destroy(sc->fxp_stag);
@@ -1325,7 +1346,8 @@ fxp_start_body(struct ifnet *ifp)
 	 * going again if suspended.
 	 */
 	if (txqueued > 0) {
-		bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE);
+		bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
+		    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 		fxp_scb_wait(sc);
 		fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_RESUME);
 		/*
@@ -1499,7 +1521,7 @@ fxp_encap(struct fxp_softc *sc, struct m
 		*m_head = m;
 	}
 
-	error = bus_dmamap_load_mbuf_sg(sc->fxp_mtag, txp->tx_map, *m_head,
+	error = bus_dmamap_load_mbuf_sg(sc->fxp_txmtag, txp->tx_map, *m_head,
 	    segs, &nseg, 0);
 	if (error == EFBIG) {
 		m = m_collapse(*m_head, M_DONTWAIT, sc->maxtxseg);
@@ -1509,7 +1531,7 @@ fxp_encap(struct fxp_softc *sc, struct m
 			return (ENOMEM);
 		}
 		*m_head = m;
-		error = bus_dmamap_load_mbuf_sg(sc->fxp_mtag, txp->tx_map,
+		error = bus_dmamap_load_mbuf_sg(sc->fxp_txmtag, txp->tx_map,
 	    	    *m_head, segs, &nseg, 0);
 		if (error != 0) {
 			m_freem(*m_head);
@@ -1525,7 +1547,7 @@ fxp_encap(struct fxp_softc *sc, struct m
 	}
 
 	KASSERT(nseg <= sc->maxtxseg, ("too many DMA segments"));
-	bus_dmamap_sync(sc->fxp_mtag, txp->tx_map, BUS_DMASYNC_PREWRITE);
+	bus_dmamap_sync(sc->fxp_txmtag, txp->tx_map, BUS_DMASYNC_PREWRITE);
 
 	cbp = txp->tx_cb;
 	for (i = 0; i < nseg; i++) {
@@ -1705,14 +1727,15 @@ fxp_txeof(struct fxp_softc *sc)
 	struct fxp_tx *txp;
 
 	ifp = sc->ifp;
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREREAD);
+	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
+	    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 	for (txp = sc->fxp_desc.tx_first; sc->tx_queued &&
 	    (le16toh(txp->tx_cb->cb_status) & FXP_CB_STATUS_C) != 0;
 	    txp = txp->tx_next) {
 		if (txp->tx_mbuf != NULL) {
-			bus_dmamap_sync(sc->fxp_mtag, txp->tx_map,
+			bus_dmamap_sync(sc->fxp_txmtag, txp->tx_map,
 			    BUS_DMASYNC_POSTWRITE);
-			bus_dmamap_unload(sc->fxp_mtag, txp->tx_map);
+			bus_dmamap_unload(sc->fxp_txmtag, txp->tx_map);
 			m_freem(txp->tx_mbuf);
 			txp->tx_mbuf = NULL;
 			/* clear this to reset csum offload bits */
@@ -1722,7 +1745,8 @@ fxp_txeof(struct fxp_softc *sc)
 		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 	}
 	sc->fxp_desc.tx_first = txp;
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE);
+	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
+	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	if (sc->tx_queued == 0) {
 		sc->watchdog_timer = 0;
 		if (sc->need_mcsetup)
@@ -1874,7 +1898,7 @@ fxp_intr_body(struct fxp_softc *sc, stru
 		m = rxp->rx_mbuf;
 		rfa = (struct fxp_rfa *)(m->m_ext.ext_buf +
 		    RFA_ALIGNMENT_FUDGE);
-		bus_dmamap_sync(sc->fxp_mtag, rxp->rx_map,
+		bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map,
 		    BUS_DMASYNC_POSTREAD);
 
 #ifdef DEVICE_POLLING /* loop at most count times if count >=0 */
@@ -2107,9 +2131,10 @@ fxp_stop(struct fxp_softc *sc)
 	if (txp != NULL) {
 		for (i = 0; i < FXP_NTXCB; i++) {
  			if (txp[i].tx_mbuf != NULL) {
-				bus_dmamap_sync(sc->fxp_mtag, txp[i].tx_map,
+				bus_dmamap_sync(sc->fxp_txmtag, txp[i].tx_map,
 				    BUS_DMASYNC_POSTWRITE);
-				bus_dmamap_unload(sc->fxp_mtag, txp[i].tx_map);
+				bus_dmamap_unload(sc->fxp_txmtag,
+				    txp[i].tx_map);
 				m_freem(txp[i].tx_mbuf);
 				txp[i].tx_mbuf = NULL;
 				/* clear this to reset csum offload bits */
@@ -2117,7 +2142,8 @@ fxp_stop(struct fxp_softc *sc)
 			}
 		}
 	}
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE);
+	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
+	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	sc->tx_queued = 0;
 }
 
@@ -2389,7 +2415,8 @@ fxp_init_body(struct fxp_softc *sc)
 	 * unit. It will execute the NOP and then suspend.
 	 */
 	tcbp->cb_command = htole16(FXP_CB_COMMAND_NOP | FXP_CB_COMMAND_S);
-	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE);
+	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
+	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	sc->fxp_desc.tx_first = sc->fxp_desc.tx_last = txp;
 	sc->tx_queued = 1;
 
@@ -2539,7 +2566,7 @@ fxp_new_rfabuf(struct fxp_softc *sc, str
 	le32enc(&rfa->rbd_addr, 0xffffffff);
 
 	/* Map the RFA into DMA memory. */
-	error = bus_dmamap_load(sc->fxp_mtag, sc->spare_map, rfa,
+	error = bus_dmamap_load(sc->fxp_rxmtag, sc->spare_map, rfa,
 	    MCLBYTES - RFA_ALIGNMENT_FUDGE, fxp_dma_map_addr,
 	    &rxp->rx_addr, 0);
 	if (error) {
@@ -2548,13 +2575,13 @@ fxp_new_rfabuf(struct fxp_softc *sc, str
 	}
 
 	if (rxp->rx_mbuf != NULL)
-		bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map);
+		bus_dmamap_unload(sc->fxp_rxmtag, rxp->rx_map);
 	tmp_map = sc->spare_map;
 	sc->spare_map = rxp->rx_map;
 	rxp->rx_map = tmp_map;
 	rxp->rx_mbuf = m;
 
-	bus_dmamap_sync(sc->fxp_mtag, rxp->rx_map,
+	bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map,
 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	return (0);
 }
@@ -2576,7 +2603,7 @@ fxp_add_rfabuf(struct fxp_softc *sc, str
 		p_rx->rx_next = rxp;
 		le32enc(&p_rfa->link_addr, rxp->rx_addr);
 		p_rfa->rfa_control = 0;
-		bus_dmamap_sync(sc->fxp_mtag, p_rx->rx_map,
+		bus_dmamap_sync(sc->fxp_rxmtag, p_rx->rx_map,
 		    BUS_DMASYNC_PREWRITE);
 	} else {
 		rxp->rx_next = NULL;
@@ -2620,7 +2647,7 @@ fxp_discard_rfabuf(struct fxp_softc *sc,
 	le32enc(&rfa->link_addr, 0xffffffff);
 	le32enc(&rfa->rbd_addr, 0xffffffff);
 
-	bus_dmamap_sync(sc->fxp_mtag, rxp->rx_map,
+	bus_dmamap_sync(sc->fxp_rxmtag, rxp->rx_map,
 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 }
 
@@ -2939,7 +2966,8 @@ fxp_mc_setup(struct fxp_softc *sc)
 	 * Start the multicast setup command.
 	 */
 	fxp_scb_wait(sc);
-	bus_dmamap_sync(sc->mcs_tag, sc->mcs_map, BUS_DMASYNC_PREWRITE);
+	bus_dmamap_sync(sc->mcs_tag, sc->mcs_map,
+	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->mcs_addr);
 	fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START);
 

Modified: stable/7/sys/dev/fxp/if_fxpvar.h
==============================================================================
--- stable/7/sys/dev/fxp/if_fxpvar.h	Wed Nov  4 18:03:19 2009	(r198912)
+++ stable/7/sys/dev/fxp/if_fxpvar.h	Wed Nov  4 18:07:09 2009	(r198913)
@@ -152,7 +152,8 @@ struct fxp_softc {
 	struct resource_spec *fxp_spec;	/* the resource spec we used */
 	void *ih;			/* interrupt handler cookie */
 	struct mtx sc_mtx;
-	bus_dma_tag_t fxp_mtag;		/* bus DMA tag for mbufs */
+	bus_dma_tag_t fxp_txmtag;	/* bus DMA tag for Tx mbufs */
+	bus_dma_tag_t fxp_rxmtag;	/* bus DMA tag for Rx mbufs */
 	bus_dma_tag_t fxp_stag;		/* bus DMA tag for stats */
 	bus_dmamap_t fxp_smap;		/* bus DMA map for stats */
 	bus_dma_tag_t cbl_tag;		/* DMA tag for the TxCB list */

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 18:08:54 2009
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 1845C106568D;
	Wed,  4 Nov 2009 18:08:54 +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 06B008FC08;
	Wed,  4 Nov 2009 18:08:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4I8reu041267;
	Wed, 4 Nov 2009 18:08:53 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4I8raU041265;
	Wed, 4 Nov 2009 18:08:53 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041808.nA4I8raU041265@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 18:08:53 +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: r198914 - stable/7/sys/dev/fxp
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, 04 Nov 2009 18:08:54 -0000

Author: yongari
Date: Wed Nov  4 18:08:53 2009
New Revision: 198914
URL: http://svn.freebsd.org/changeset/base/198914

Log:
  MFC r194570:
    Due to possible PCI bus lock-up issues fxp(4) didn't perform full
    hardware reset in attach phase. Selective reset does not clear
    configured parameters so I think full hardware reset is required.
    To prevent PCI bus lock-up, do selective reset first which will get
    off the controller from PCI bus and request software reset after
    selective reset. Software reset will unmask interrupts so disable
    it after the reset.

Modified:
  stable/7/sys/dev/fxp/if_fxp.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:07:09 2009	(r198913)
+++ stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:08:53 2009	(r198914)
@@ -467,10 +467,14 @@ fxp_attach(device_t dev)
 	}
 
 	/*
-	 * Reset to a stable state.
+	 * Put CU/RU idle state and prepare full reset.
 	 */
 	CSR_WRITE_4(sc, FXP_CSR_PORT, FXP_PORT_SELECTIVE_RESET);
 	DELAY(10);
+	/* Full reset and disable interrupts. */
+	CSR_WRITE_4(sc, FXP_CSR_PORT, FXP_PORT_SOFTWARE_RESET);
+	DELAY(10);
+	CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE);
 
 	/*
 	 * Find out how large of an SEEPROM we have.

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 18:14:20 2009
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 284B01065670;
	Wed,  4 Nov 2009 18:14: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 16A1F8FC15;
	Wed,  4 Nov 2009 18:14:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4IEJGk041453;
	Wed, 4 Nov 2009 18:14:19 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IEJoY041450;
	Wed, 4 Nov 2009 18:14:19 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041814.nA4IEJoY041450@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 18:14: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: r198915 - stable/7/sys/dev/fxp
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, 04 Nov 2009 18:14:20 -0000

Author: yongari
Date: Wed Nov  4 18:14:19 2009
New Revision: 198915
URL: http://svn.freebsd.org/changeset/base/198915

Log:
  MFC r194571:
    Don't blindly enable Rx lock-up workaround. Newer chips do not need
    the Rx lock-up workaround.
  
    Obtained from:        NetBSD

Modified:
  stable/7/sys/dev/fxp/if_fxp.c
  stable/7/sys/dev/fxp/if_fxpvar.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:08:53 2009	(r198914)
+++ stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:14:19 2009	(r198915)
@@ -501,6 +501,13 @@ fxp_attach(device_t dev)
 			sc->flags |= FXP_FLAG_WOLCAP;
 	}
 
+	/* Receiver lock-up workaround detection. */
+	fxp_read_eeprom(sc, &data, 3, 1);
+	if ((data & 0x03) != 0x03) {
+		sc->flags |= FXP_FLAG_RXBUG;
+		device_printf(dev, "Enabling Rx lock-up workaround\n");
+	}
+
 	/*
 	 * Determine whether we must use the 503 serial interface.
 	 */
@@ -2015,7 +2022,7 @@ fxp_tick(void *xsc)
 	if (sp->rx_good) {
 		ifp->if_ipackets += le32toh(sp->rx_good);
 		sc->rx_idle_secs = 0;
-	} else {
+	} else if (sc->flags & FXP_FLAG_RXBUG) {
 		/*
 		 * Receiver's been idle for another second.
 		 */

Modified: stable/7/sys/dev/fxp/if_fxpvar.h
==============================================================================
--- stable/7/sys/dev/fxp/if_fxpvar.h	Wed Nov  4 18:08:53 2009	(r198914)
+++ stable/7/sys/dev/fxp/if_fxpvar.h	Wed Nov  4 18:14:19 2009	(r198915)
@@ -204,6 +204,7 @@ struct fxp_softc {
 #define FXP_FLAG_82559_RXCSUM	0x1000	/* 82559 compatible RX checksum */
 #define FXP_FLAG_WOLCAP		0x2000	/* WOL capability */
 #define FXP_FLAG_WOL		0x4000	/* WOL active */
+#define FXP_FLAG_RXBUG		0x8000	/* Rx lock-up bug */
 
 /* Macros to ease CSR access. */
 #define	CSR_READ_1(sc, reg)		bus_read_1(sc->fxp_res[0], reg)

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 18:18:10 2009
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 F39A41065670;
	Wed,  4 Nov 2009 18:18:09 +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 7537B8FC1B;
	Wed,  4 Nov 2009 18:18:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4II9Iu041610;
	Wed, 4 Nov 2009 18:18:09 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4II9R2041608;
	Wed, 4 Nov 2009 18:18:09 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041818.nA4II9R2041608@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 18:18:09 +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: r198916 - stable/7/sys/dev/fxp
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, 04 Nov 2009 18:18:10 -0000

Author: yongari
Date: Wed Nov  4 18:18:09 2009
New Revision: 198916
URL: http://svn.freebsd.org/changeset/base/198916

Log:
  MFC r194572:
    Always check fxp(4) is running, see if it can accept frames from
    upper stack in fxp_start_body().
    fxp(4) drops driver lock in Rx path so check the fxp(4) is still
    running after reacquiring driver lock in Rx path. Also don't
    invoke fxp_intr_body if fxp(4) is not running. With this change
    there is no need to set suspend bit in device attach phase.

Modified:
  stable/7/sys/dev/fxp/if_fxp.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:14:19 2009	(r198915)
+++ stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:18:09 2009	(r198916)
@@ -993,7 +993,6 @@ fxp_detach(device_t dev)
 #endif
 
 	FXP_LOCK(sc);
-	sc->suspended = 1;	/* Do same thing as we do for suspend */
 	/*
 	 * Stop DMA and drop transmit queue, but disable interrupts first.
 	 */
@@ -1320,6 +1319,10 @@ fxp_start_body(struct ifnet *ifp)
 	if (sc->need_mcsetup)
 		return;
 
+	if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
+	    IFF_DRV_RUNNING)
+		return;
+
 	if (sc->tx_queued > FXP_NTXCB_HIWAT)
 		fxp_txeof(sc);
 	/*
@@ -1726,7 +1729,8 @@ fxp_intr(void *xsc)
 		 * First ACK all the interrupts in this pass.
 		 */
 		CSR_WRITE_1(sc, FXP_CSR_SCB_STATACK, statack);
-		fxp_intr_body(sc, ifp, statack, -1);
+		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+			fxp_intr_body(sc, ifp, statack, -1);
 	}
 	FXP_UNLOCK(sc);
 }
@@ -1982,6 +1986,8 @@ fxp_intr_body(struct fxp_softc *sc, stru
 			FXP_UNLOCK(sc);
 			(*ifp->if_input)(ifp, m);
 			FXP_LOCK(sc);
+			if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+				return;
 		} else {
 			/* Reuse RFA and loaded DMA map. */
 			ifp->if_iqdrops++;
@@ -2064,7 +2070,8 @@ fxp_tick(void *xsc)
 	 */
 	if (sc->rx_idle_secs > FXP_MAX_RX_IDLE) {
 		sc->rx_idle_secs = 0;
-		fxp_mc_setup(sc);
+		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+			fxp_mc_setup(sc);
 	}
 	/*
 	 * If there is no pending command, start another stats

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 18:20:32 2009
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 44A431065670;
	Wed,  4 Nov 2009 18:20:32 +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 31A9C8FC20;
	Wed,  4 Nov 2009 18:20:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4IKWrr041714;
	Wed, 4 Nov 2009 18:20:32 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IKWXA041711;
	Wed, 4 Nov 2009 18:20:32 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041820.nA4IKWXA041711@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 18:20:32 +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: r198917 - stable/7/sys/dev/fxp
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, 04 Nov 2009 18:20:32 -0000

Author: yongari
Date: Wed Nov  4 18:20:31 2009
New Revision: 198917
URL: http://svn.freebsd.org/changeset/base/198917

Log:
  MFC r194573:
    Overhaul fxp(4) multicast filter programming. fxp(4) hardwares do
    not allow multicast filter programming when controller is busy to
    send/receive frames. So it used to mark need_mcsetup bit and defer
    multicast filter programming until controller becomes idle state.
    To detect when the controller is idle fxp(4) relied on Tx
    completion interrupt with NOP command and fxp_start_body and
    fxp_intr_body had to see whether pending multicast filter
    programming was requested. This resulted in very complex logic and
    sometimes it did not work as expected.
    Since the controller should be in idle state before any multicast
    filter modifications I changed it to reinitialize the controller
    whenever multicast filter programming is required. This is the same
    way what OpenBSD and NetBSD does. Also I added IFF_DRV_RUNNING
    check in ioctl handler so controller would be reinitialized only if
    it is absolutely needed.
    With this change I guess we can remove fxp(4) DELAY hack in ifioctl
    for IPv6 case.

Modified:
  stable/7/sys/dev/fxp/if_fxp.c
  stable/7/sys/dev/fxp/if_fxpvar.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:18:09 2009	(r198916)
+++ stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:20:31 2009	(r198917)
@@ -1311,14 +1311,6 @@ fxp_start_body(struct ifnet *ifp)
 
 	FXP_LOCK_ASSERT(sc, MA_OWNED);
 
-	/*
-	 * See if we need to suspend xmit until the multicast filter
-	 * has been reprogrammed (which can only be done at the head
-	 * of the command chain).
-	 */
-	if (sc->need_mcsetup)
-		return;
-
 	if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
 	    IFF_DRV_RUNNING)
 		return;
@@ -1762,11 +1754,8 @@ fxp_txeof(struct fxp_softc *sc)
 	sc->fxp_desc.tx_first = txp;
 	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
-	if (sc->tx_queued == 0) {
+	if (sc->tx_queued == 0)
 		sc->watchdog_timer = 0;
-		if (sc->need_mcsetup)
-			fxp_mc_setup(sc);
-	}
 }
 
 static void
@@ -2071,7 +2060,8 @@ fxp_tick(void *xsc)
 	if (sc->rx_idle_secs > FXP_MAX_RX_IDLE) {
 		sc->rx_idle_secs = 0;
 		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
-			fxp_mc_setup(sc);
+			fxp_init_body(sc);
+		return;
 	}
 	/*
 	 * If there is no pending command, start another stats
@@ -2213,7 +2203,6 @@ fxp_init_body(struct fxp_softc *sc)
 	struct fxp_cb_ias *cb_ias;
 	struct fxp_cb_tx *tcbp;
 	struct fxp_tx *txp;
-	struct fxp_cb_mcs *mcsp;
 	int i, prm;
 
 	FXP_LOCK_ASSERT(sc, MA_OWNED);
@@ -2256,25 +2245,10 @@ fxp_init_body(struct fxp_softc *sc)
 		fxp_load_ucode(sc);
 
 	/*
-	 * Initialize the multicast address list.
+	 * Set IFF_ALLMULTI status. It's needed in configure action
+	 * command.
 	 */
-	if (fxp_mc_addrs(sc)) {
-		mcsp = sc->mcsp;
-		mcsp->cb_status = 0;
-		mcsp->cb_command =
-		    htole16(FXP_CB_COMMAND_MCAS | FXP_CB_COMMAND_EL);
-		mcsp->link_addr = 0xffffffff;
-		/*
-	 	 * Start the multicast setup command.
-		 */
-		fxp_scb_wait(sc);
-		bus_dmamap_sync(sc->mcs_tag, sc->mcs_map,
-		    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
-		CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->mcs_addr);
-		fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START);
-		/* ...and wait for it to complete. */
-		fxp_dma_wait(sc, &mcsp->cb_status, sc->mcs_tag, sc->mcs_map);
-	}
+	fxp_mc_addrs(sc);
 
 	/*
 	 * We temporarily use memory that contains the TxCB list to
@@ -2348,7 +2322,7 @@ fxp_init_body(struct fxp_softc *sc)
 	cbp->force_fdx =	0;	/* (don't) force full duplex */
 	cbp->fdx_pin_en =	1;	/* (enable) FDX# pin */
 	cbp->multi_ia =		0;	/* (don't) accept multiple IAs */
-	cbp->mc_all =		sc->flags & FXP_FLAG_ALL_MCAST ? 1 : 0;
+	cbp->mc_all =		ifp->if_flags & IFF_ALLMULTI ? 1 : 0;
 	cbp->gamla_rx =		sc->flags & FXP_FLAG_EXT_RFA ? 1 : 0;
 	cbp->vlan_strip_en =	((sc->flags & FXP_FLAG_EXT_RFA) != 0 &&
 	    (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) ? 1 : 0;
@@ -2404,11 +2378,17 @@ fxp_init_body(struct fxp_softc *sc)
 	fxp_scb_wait(sc);
 	bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+	CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->fxp_desc.cbl_addr);
 	fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START);
 	/* ...and wait for it to complete. */
 	fxp_dma_wait(sc, &cb_ias->cb_status, sc->cbl_tag, sc->cbl_map);
 
 	/*
+	 * Initialize the multicast address list.
+	 */
+	fxp_mc_setup(sc);
+
+	/*
 	 * Initialize transmit control block (TxCB) list.
 	 */
 	txp = sc->fxp_desc.tx_list;
@@ -2439,6 +2419,7 @@ fxp_init_body(struct fxp_softc *sc)
 	sc->tx_queued = 1;
 
 	fxp_scb_wait(sc);
+	CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->fxp_desc.cbl_addr);
 	fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START);
 
 	/*
@@ -2718,11 +2699,6 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
 	switch (command) {
 	case SIOCSIFFLAGS:
 		FXP_LOCK(sc);
-		if (ifp->if_flags & IFF_ALLMULTI)
-			sc->flags |= FXP_FLAG_ALL_MCAST;
-		else
-			sc->flags &= ~FXP_FLAG_ALL_MCAST;
-
 		/*
 		 * If interface is marked up and not running, then start it.
 		 * If it is marked down and running, stop it.
@@ -2730,35 +2706,24 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
 		 * such as IFF_PROMISC are handled.
 		 */
 		if (ifp->if_flags & IFF_UP) {
-			fxp_init_body(sc);
+			if (((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) &&
+			    ((ifp->if_flags ^ sc->if_flags) &
+			    (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0)
+				fxp_init_body(sc);
+			else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+				fxp_init_body(sc);
 		} else {
-			if (ifp->if_drv_flags & IFF_DRV_RUNNING)
+			if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
 				fxp_stop(sc);
 		}
+		sc->if_flags = ifp->if_flags;
 		FXP_UNLOCK(sc);
 		break;
 
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:
-		FXP_LOCK(sc);
-		if (ifp->if_flags & IFF_ALLMULTI)
-			sc->flags |= FXP_FLAG_ALL_MCAST;
-		else
-			sc->flags &= ~FXP_FLAG_ALL_MCAST;
-		/*
-		 * Multicast list has changed; set the hardware filter
-		 * accordingly.
-		 */
-		if ((sc->flags & FXP_FLAG_ALL_MCAST) == 0)
-			fxp_mc_setup(sc);
-		/*
-		 * fxp_mc_setup() can set FXP_FLAG_ALL_MCAST, so check it
-		 * again rather than else {}.
-		 */
-		if (sc->flags & FXP_FLAG_ALL_MCAST)
-			fxp_init_body(sc);
-		FXP_UNLOCK(sc);
-		error = 0;
+		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+			fxp_init(sc);
 		break;
 
 	case SIOCSIFMEDIA:
@@ -2862,13 +2827,13 @@ fxp_mc_addrs(struct fxp_softc *sc)
 	int nmcasts;
 
 	nmcasts = 0;
-	if ((sc->flags & FXP_FLAG_ALL_MCAST) == 0) {
+	if ((ifp->if_flags & IFF_ALLMULTI) == 0) {
 		IF_ADDR_LOCK(ifp);
 		TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
 			if (ifma->ifma_addr->sa_family != AF_LINK)
 				continue;
 			if (nmcasts >= MAXMCADDR) {
-				sc->flags |= FXP_FLAG_ALL_MCAST;
+				ifp->if_flags |= IFF_ALLMULTI;
 				nmcasts = 0;
 				break;
 			}
@@ -2893,87 +2858,28 @@ fxp_mc_addrs(struct fxp_softc *sc)
  * points to the TxCB ring, but the mcsetup descriptor itself is not part
  * of it. We then can do 'CU_START' on the mcsetup descriptor and have it
  * lead into the regular TxCB ring when it completes.
- *
- * This function must be called at splimp.
  */
 static void
 fxp_mc_setup(struct fxp_softc *sc)
 {
-	struct fxp_cb_mcs *mcsp = sc->mcsp;
-	struct fxp_tx *txp;
+	struct fxp_cb_mcs *mcsp;
 	int count;
 
 	FXP_LOCK_ASSERT(sc, MA_OWNED);
-	/*
-	 * If there are queued commands, we must wait until they are all
-	 * completed. If we are already waiting, then add a NOP command
-	 * with interrupt option so that we're notified when all commands
-	 * have been completed - fxp_start() ensures that no additional
-	 * TX commands will be added when need_mcsetup is true.
-	 */
-	if (sc->tx_queued) {
-		/*
-		 * need_mcsetup will be true if we are already waiting for the
-		 * NOP command to be completed (see below). In this case, bail.
-		 */
-		if (sc->need_mcsetup)
-			return;
-		sc->need_mcsetup = 1;
-
-		/*
-		 * Add a NOP command with interrupt so that we are notified
-		 * when all TX commands have been processed.
-		 */
-		txp = sc->fxp_desc.tx_last->tx_next;
-		txp->tx_mbuf = NULL;
-		txp->tx_cb->cb_status = 0;
-		txp->tx_cb->cb_command = htole16(FXP_CB_COMMAND_NOP |
-		    FXP_CB_COMMAND_S | FXP_CB_COMMAND_I);
-		/*
-		 * Advance the end of list forward.
-		 */
-		sc->fxp_desc.tx_last->tx_cb->cb_command &=
-		    htole16(~FXP_CB_COMMAND_S);
-		bus_dmamap_sync(sc->cbl_tag, sc->cbl_map, BUS_DMASYNC_PREWRITE);
-		sc->fxp_desc.tx_last = txp;
-		sc->tx_queued++;
-		/*
-		 * Issue a resume in case the CU has just suspended.
-		 */
-		fxp_scb_wait(sc);
-		fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_RESUME);
-		/*
-		 * Set a 5 second timer just in case we don't hear from the
-		 * card again.
-		 */
-		sc->watchdog_timer = 5;
-
-		return;
-	}
-	sc->need_mcsetup = 0;
 
-	/*
-	 * Initialize multicast setup descriptor.
-	 */
+	mcsp = sc->mcsp;
 	mcsp->cb_status = 0;
-	mcsp->cb_command = htole16(FXP_CB_COMMAND_MCAS |
-	    FXP_CB_COMMAND_S | FXP_CB_COMMAND_I);
-	mcsp->link_addr = htole32(sc->fxp_desc.cbl_addr);
-	txp = &sc->fxp_desc.mcs_tx;
-	txp->tx_mbuf = NULL;
-	txp->tx_cb = (struct fxp_cb_tx *)sc->mcsp;
-	txp->tx_next = sc->fxp_desc.tx_list;
-	(void) fxp_mc_addrs(sc);
-	sc->fxp_desc.tx_first = sc->fxp_desc.tx_last = txp;
-	sc->tx_queued = 1;
+	mcsp->cb_command = htole16(FXP_CB_COMMAND_MCAS | FXP_CB_COMMAND_EL);
+	mcsp->link_addr = 0xffffffff;
+	fxp_mc_addrs(sc);
 
 	/*
-	 * Wait until command unit is not active. This should never
-	 * be the case when nothing is queued, but make sure anyway.
+	 * Wait until command unit is idle. This should never be the
+	 * case when nothing is queued, but make sure anyway.
 	 */
 	count = 100;
-	while ((CSR_READ_1(sc, FXP_CSR_SCB_RUSCUS) >> 6) ==
-	    FXP_SCB_CUS_ACTIVE && --count)
+	while ((CSR_READ_1(sc, FXP_CSR_SCB_RUSCUS) >> 6) !=
+	    FXP_SCB_CUS_IDLE && --count)
 		DELAY(10);
 	if (count == 0) {
 		device_printf(sc->dev, "command queue timeout\n");
@@ -2988,9 +2894,8 @@ fxp_mc_setup(struct fxp_softc *sc)
 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->mcs_addr);
 	fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START);
-
-	sc->watchdog_timer = 2;
-	return;
+	/* ...and wait for it to complete. */
+	fxp_dma_wait(sc, &mcsp->cb_status, sc->mcs_tag, sc->mcs_map);
 }
 
 static uint32_t fxp_ucode_d101a[] = D101_A_RCVBUNDLE_UCODE;

Modified: stable/7/sys/dev/fxp/if_fxpvar.h
==============================================================================
--- stable/7/sys/dev/fxp/if_fxpvar.h	Wed Nov  4 18:18:09 2009	(r198916)
+++ stable/7/sys/dev/fxp/if_fxpvar.h	Wed Nov  4 18:20:31 2009	(r198917)
@@ -165,7 +165,6 @@ struct fxp_softc {
 	int maxtxseg;			/* maximum # of TX segments */
 	int maxsegsize;			/* maximum size of a TX segment */
 	int tx_queued;			/* # of active TxCB's */
-	int need_mcsetup;		/* multicast filter needs programming */
 	struct fxp_stats *fxp_stats;	/* Pointer to interface stats */
 	uint32_t stats_addr;		/* DMA address of the stats structure */
 	int rx_idle_secs;		/* # of seconds RX has been idle */
@@ -185,6 +184,7 @@ struct fxp_softc {
 	int cu_resume_bug;
 	int revision;
 	int flags;
+	int if_flags;
 	uint8_t rfa_size;
 	uint32_t tx_cmd;
 };
@@ -195,7 +195,6 @@ struct fxp_softc {
 #define FXP_FLAG_EXT_TXCB	0x0008	/* enable use of extended TXCB */
 #define FXP_FLAG_SERIAL_MEDIA	0x0010	/* 10Mbps serial interface */
 #define FXP_FLAG_LONG_PKT_EN	0x0020	/* enable long packet reception */
-#define FXP_FLAG_ALL_MCAST	0x0040	/* accept all multicast frames */
 #define FXP_FLAG_CU_RESUME_BUG	0x0080	/* requires workaround for CU_RESUME */
 #define FXP_FLAG_UCODE		0x0100	/* ucode is loaded */
 #define FXP_FLAG_DEFERRED_RNR	0x0200	/* DEVICE_POLLING deferred RNR */

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 18:22:59 2009
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 E099F106568B;
	Wed,  4 Nov 2009 18:22:59 +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 CDA1A8FC19;
	Wed,  4 Nov 2009 18:22:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4IMxws041836;
	Wed, 4 Nov 2009 18:22:59 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IMxkw041833;
	Wed, 4 Nov 2009 18:22:59 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041822.nA4IMxkw041833@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 18:22: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: r198918 - stable/7/sys/dev/fxp
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, 04 Nov 2009 18:23:00 -0000

Author: yongari
Date: Wed Nov  4 18:22:59 2009
New Revision: 198918
URL: http://svn.freebsd.org/changeset/base/198918

Log:
  MFC r194574:
    For ICH based fxp(4) controllers treat them as 82559 compatibles.
    To detect which controller is ICH based one, add a new member
    variable ich to struct fxp_ident and move the struct to
    if_fxpvar.h. Since I've faked controller revision, don't allow
    microcode loading for ICH based controllers.
    With this change all ICH based controllers will have WOL and Rx
    checksum offload capability.
  
    PR:		kern/135451
    Tested by:	Alexey Shuvaev ( shuvaev <> physik dot uni-wuerzburg dot de ),
  		pluknet ( pluknet <> gmail dot com ),
  		Gary Jennejohn ( gary.jennejohn <> freenet dot de )

Modified:
  stable/7/sys/dev/fxp/if_fxp.c
  stable/7/sys/dev/fxp/if_fxpvar.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:20:31 2009	(r198917)
+++ stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:22:59 2009	(r198918)
@@ -140,12 +140,6 @@ static u_char fxp_cb_config_template[] =
 	0x5	/* 21 */
 };
 
-struct fxp_ident {
-	uint16_t	devid;
-	int16_t		revid;		/* -1 matches anything */
-	char 		*name;
-};
-
 /*
  * Claim various Intel PCI device identifiers for this driver.  The
  * sub-vendor and sub-device field are extensively used to identify
@@ -153,52 +147,52 @@ struct fxp_ident {
  * them.
  */
 static struct fxp_ident fxp_ident_table[] = {
-    { 0x1029,	-1,	"Intel 82559 PCI/CardBus Pro/100" },
-    { 0x1030,	-1,	"Intel 82559 Pro/100 Ethernet" },
-    { 0x1031,	-1,	"Intel 82801CAM (ICH3) Pro/100 VE Ethernet" },
-    { 0x1032,	-1,	"Intel 82801CAM (ICH3) Pro/100 VE Ethernet" },
-    { 0x1033,	-1,	"Intel 82801CAM (ICH3) Pro/100 VM Ethernet" },
-    { 0x1034,	-1,	"Intel 82801CAM (ICH3) Pro/100 VM Ethernet" },
-    { 0x1035,	-1,	"Intel 82801CAM (ICH3) Pro/100 Ethernet" },
-    { 0x1036,	-1,	"Intel 82801CAM (ICH3) Pro/100 Ethernet" },
-    { 0x1037,	-1,	"Intel 82801CAM (ICH3) Pro/100 Ethernet" },
-    { 0x1038,	-1,	"Intel 82801CAM (ICH3) Pro/100 VM Ethernet" },
-    { 0x1039,	-1,	"Intel 82801DB (ICH4) Pro/100 VE Ethernet" },
-    { 0x103A,	-1,	"Intel 82801DB (ICH4) Pro/100 Ethernet" },
-    { 0x103B,	-1,	"Intel 82801DB (ICH4) Pro/100 VM Ethernet" },
-    { 0x103C,	-1,	"Intel 82801DB (ICH4) Pro/100 Ethernet" },
-    { 0x103D,	-1,	"Intel 82801DB (ICH4) Pro/100 VE Ethernet" },
-    { 0x103E,	-1,	"Intel 82801DB (ICH4) Pro/100 VM Ethernet" },
-    { 0x1050,	-1,	"Intel 82801BA (D865) Pro/100 VE Ethernet" },
-    { 0x1051,	-1,	"Intel 82562ET (ICH5/ICH5R) Pro/100 VE Ethernet" },
-    { 0x1059,	-1,	"Intel 82551QM Pro/100 M Mobile Connection" },
-    { 0x1064,	-1,	"Intel 82562EZ (ICH6)" },
-    { 0x1065,	-1,	"Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet" },
-    { 0x1068,	-1,	"Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" },
-    { 0x1069,	-1,	"Intel 82562EM/EX/GX Pro/100 Ethernet" },
-    { 0x1091,	-1,	"Intel 82562GX Pro/100 Ethernet" },
-    { 0x1092,	-1,	"Intel Pro/100 VE Network Connection" },
-    { 0x1093,	-1,	"Intel Pro/100 VM Network Connection" },
-    { 0x1094,	-1,	"Intel Pro/100 946GZ (ICH7) Network Connection" },
-    { 0x1209,	-1,	"Intel 82559ER Embedded 10/100 Ethernet" },
-    { 0x1229,	0x01,	"Intel 82557 Pro/100 Ethernet" },
-    { 0x1229,	0x02,	"Intel 82557 Pro/100 Ethernet" },
-    { 0x1229,	0x03,	"Intel 82557 Pro/100 Ethernet" },
-    { 0x1229,	0x04,	"Intel 82558 Pro/100 Ethernet" },
-    { 0x1229,	0x05,	"Intel 82558 Pro/100 Ethernet" },
-    { 0x1229,	0x06,	"Intel 82559 Pro/100 Ethernet" },
-    { 0x1229,	0x07,	"Intel 82559 Pro/100 Ethernet" },
-    { 0x1229,	0x08,	"Intel 82559 Pro/100 Ethernet" },
-    { 0x1229,	0x09,	"Intel 82559ER Pro/100 Ethernet" },
-    { 0x1229,	0x0c,	"Intel 82550 Pro/100 Ethernet" },
-    { 0x1229,	0x0d,	"Intel 82550 Pro/100 Ethernet" },
-    { 0x1229,	0x0e,	"Intel 82550 Pro/100 Ethernet" },
-    { 0x1229,	0x0f,	"Intel 82551 Pro/100 Ethernet" },
-    { 0x1229,	0x10,	"Intel 82551 Pro/100 Ethernet" },
-    { 0x1229,	-1,	"Intel 82557/8/9 Pro/100 Ethernet" },
-    { 0x2449,	-1,	"Intel 82801BA/CAM (ICH2/3) Pro/100 Ethernet" },
-    { 0x27dc,	-1,	"Intel 82801GB (ICH7) 10/100 Ethernet" },
-    { 0,	-1,	NULL },
+    { 0x1029,	-1,	0, "Intel 82559 PCI/CardBus Pro/100" },
+    { 0x1030,	-1,	0, "Intel 82559 Pro/100 Ethernet" },
+    { 0x1031,	-1,	3, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" },
+    { 0x1032,	-1,	3, "Intel 82801CAM (ICH3) Pro/100 VE Ethernet" },
+    { 0x1033,	-1,	3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" },
+    { 0x1034,	-1,	3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" },
+    { 0x1035,	-1,	3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" },
+    { 0x1036,	-1,	3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" },
+    { 0x1037,	-1,	3, "Intel 82801CAM (ICH3) Pro/100 Ethernet" },
+    { 0x1038,	-1,	3, "Intel 82801CAM (ICH3) Pro/100 VM Ethernet" },
+    { 0x1039,	-1,	4, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" },
+    { 0x103A,	-1,	4, "Intel 82801DB (ICH4) Pro/100 Ethernet" },
+    { 0x103B,	-1,	4, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" },
+    { 0x103C,	-1,	4, "Intel 82801DB (ICH4) Pro/100 Ethernet" },
+    { 0x103D,	-1,	4, "Intel 82801DB (ICH4) Pro/100 VE Ethernet" },
+    { 0x103E,	-1,	4, "Intel 82801DB (ICH4) Pro/100 VM Ethernet" },
+    { 0x1050,	-1,	5, "Intel 82801BA (D865) Pro/100 VE Ethernet" },
+    { 0x1051,	-1,	5, "Intel 82562ET (ICH5/ICH5R) Pro/100 VE Ethernet" },
+    { 0x1059,	-1,	0, "Intel 82551QM Pro/100 M Mobile Connection" },
+    { 0x1064,	-1,	6, "Intel 82562EZ (ICH6)" },
+    { 0x1065,	-1,	6, "Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet" },
+    { 0x1068,	-1,	6, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" },
+    { 0x1069,	-1,	6, "Intel 82562EM/EX/GX Pro/100 Ethernet" },
+    { 0x1091,	-1,	7, "Intel 82562GX Pro/100 Ethernet" },
+    { 0x1092,	-1,	7, "Intel Pro/100 VE Network Connection" },
+    { 0x1093,	-1,	7, "Intel Pro/100 VM Network Connection" },
+    { 0x1094,	-1,	7, "Intel Pro/100 946GZ (ICH7) Network Connection" },
+    { 0x1209,	-1,	0, "Intel 82559ER Embedded 10/100 Ethernet" },
+    { 0x1229,	0x01,	0, "Intel 82557 Pro/100 Ethernet" },
+    { 0x1229,	0x02,	0, "Intel 82557 Pro/100 Ethernet" },
+    { 0x1229,	0x03,	0, "Intel 82557 Pro/100 Ethernet" },
+    { 0x1229,	0x04,	0, "Intel 82558 Pro/100 Ethernet" },
+    { 0x1229,	0x05,	0, "Intel 82558 Pro/100 Ethernet" },
+    { 0x1229,	0x06,	0, "Intel 82559 Pro/100 Ethernet" },
+    { 0x1229,	0x07,	0, "Intel 82559 Pro/100 Ethernet" },
+    { 0x1229,	0x08,	0, "Intel 82559 Pro/100 Ethernet" },
+    { 0x1229,	0x09,	0, "Intel 82559ER Pro/100 Ethernet" },
+    { 0x1229,	0x0c,	0, "Intel 82550 Pro/100 Ethernet" },
+    { 0x1229,	0x0d,	0, "Intel 82550 Pro/100 Ethernet" },
+    { 0x1229,	0x0e,	0, "Intel 82550 Pro/100 Ethernet" },
+    { 0x1229,	0x0f,	0, "Intel 82551 Pro/100 Ethernet" },
+    { 0x1229,	0x10,	0, "Intel 82551 Pro/100 Ethernet" },
+    { 0x1229,	-1,	0, "Intel 82557/8/9 Pro/100 Ethernet" },
+    { 0x2449,	-1,	2, "Intel 82801BA/CAM (ICH2/3) Pro/100 Ethernet" },
+    { 0x27dc,	-1,	7, "Intel 82801GB (ICH7) 10/100 Ethernet" },
+    { 0,	-1,	0, NULL },
 };
 
 #ifdef FXP_IP_CSUM_WAR
@@ -214,6 +208,7 @@ static int		fxp_shutdown(device_t dev);
 static int		fxp_suspend(device_t dev);
 static int		fxp_resume(device_t dev);
 
+static struct fxp_ident	*fxp_find_ident(device_t dev);
 static void		fxp_intr(void *xsc);
 static void		fxp_rxcsum(struct fxp_softc *sc, struct ifnet *ifp,
 			    struct mbuf *m, uint16_t status, int pos);
@@ -361,11 +356,8 @@ fxp_dma_wait(struct fxp_softc *sc, volat
 		device_printf(sc->dev, "DMA timeout\n");
 }
 
-/*
- * Return identification string if this device is ours.
- */
-static int
-fxp_probe(device_t dev)
+static struct fxp_ident *
+fxp_find_ident(device_t dev)
 {
 	uint16_t devid;
 	uint8_t revid;
@@ -377,11 +369,26 @@ fxp_probe(device_t dev)
 		for (ident = fxp_ident_table; ident->name != NULL; ident++) {
 			if (ident->devid == devid &&
 			    (ident->revid == revid || ident->revid == -1)) {
-				device_set_desc(dev, ident->name);
-				return (BUS_PROBE_DEFAULT);
+				return (ident);
 			}
 		}
 	}
+	return (NULL);
+}
+
+/*
+ * Return identification string if this device is ours.
+ */
+static int
+fxp_probe(device_t dev)
+{
+	struct fxp_ident *ident;
+
+	ident = fxp_find_ident(dev);
+	if (ident != NULL) {
+		device_set_desc(dev, ident->name);
+		return (BUS_PROBE_DEFAULT);
+	}
 	return (ENXIO);
 }
 
@@ -484,11 +491,17 @@ fxp_attach(device_t dev)
 	/*
 	 * Find out the chip revision; lump all 82557 revs together.
 	 */
-	fxp_read_eeprom(sc, &data, 5, 1);
-	if ((data >> 8) == 1)
-		sc->revision = FXP_REV_82557;
-	else
-		sc->revision = pci_get_revid(dev);
+	sc->ident = fxp_find_ident(dev);
+	if (sc->ident->ich > 0) {
+		/* Assume ICH controllers are 82559. */
+		sc->revision = FXP_REV_82559_A0;
+	} else {
+		fxp_read_eeprom(sc, &data, 5, 1);
+		if ((data >> 8) == 1)
+			sc->revision = FXP_REV_82557;
+		else
+			sc->revision = pci_get_revid(dev);
+	}
 
 	/*
 	 * Check availability of WOL. 82559ER does not support WOL.
@@ -561,9 +574,8 @@ fxp_attach(device_t dev)
 	 *
 	 * See Intel 82801BA/82801BAM Specification Update, Errata #30.
 	 */
-	i = pci_get_device(dev);
-	if (i == 0x2449 || (i > 0x1030 && i < 0x1039) ||
-	    sc->revision >= FXP_REV_82559_A0) {
+	if ((sc->ident->ich >= 2 && sc->ident->ich <= 3) ||
+	    (sc->ident->ich == 0 && sc->revision >= FXP_REV_82559_A0)) {
 		fxp_read_eeprom(sc, &data, 10, 1);
 		if (data & 0x02) {			/* STB enable */
 			uint16_t cksum;
@@ -2240,9 +2252,13 @@ fxp_init_body(struct fxp_softc *sc)
 
 	/*
 	 * Attempt to load microcode if requested.
+	 * For ICH based controllers do not load microcode.
 	 */
-	if (ifp->if_flags & IFF_LINK0 && (sc->flags & FXP_FLAG_UCODE) == 0)
-		fxp_load_ucode(sc);
+	if (sc->ident->ich == 0) {
+		if (ifp->if_flags & IFF_LINK0 &&
+		    (sc->flags & FXP_FLAG_UCODE) == 0)
+			fxp_load_ucode(sc);
+	}
 
 	/*
 	 * Set IFF_ALLMULTI status. It's needed in configure action

Modified: stable/7/sys/dev/fxp/if_fxpvar.h
==============================================================================
--- stable/7/sys/dev/fxp/if_fxpvar.h	Wed Nov  4 18:20:31 2009	(r198917)
+++ stable/7/sys/dev/fxp/if_fxpvar.h	Wed Nov  4 18:22:59 2009	(r198918)
@@ -142,6 +142,13 @@ struct fxp_desc_list {
 	bus_dma_tag_t rx_tag;
 };
 
+struct fxp_ident {
+	uint16_t	devid;
+	int16_t		revid;		/* -1 matches anything */
+	uint8_t		ich;
+	char 		*name;
+};
+
 /*
  * NOTE: Elements are ordered for optimal cacheline behavior, and NOT
  *	 for functional grouping.
@@ -151,6 +158,7 @@ struct fxp_softc {
 	struct resource	*fxp_res[2];	/* I/O and IRQ resources */
 	struct resource_spec *fxp_spec;	/* the resource spec we used */
 	void *ih;			/* interrupt handler cookie */
+	struct fxp_ident *ident;
 	struct mtx sc_mtx;
 	bus_dma_tag_t fxp_txmtag;	/* bus DMA tag for Tx mbufs */
 	bus_dma_tag_t fxp_rxmtag;	/* bus DMA tag for Rx mbufs */

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 18:31:43 2009
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 87F46106566C;
	Wed,  4 Nov 2009 18:31:43 +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 761D98FC1B;
	Wed,  4 Nov 2009 18:31:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4IVho1042110;
	Wed, 4 Nov 2009 18:31:43 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IVh3W042108;
	Wed, 4 Nov 2009 18:31:43 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041831.nA4IVh3W042108@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 18:31:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198919 - stable/8/sys/dev/fxp
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, 04 Nov 2009 18:31:43 -0000

Author: yongari
Date: Wed Nov  4 18:31:43 2009
New Revision: 198919
URL: http://svn.freebsd.org/changeset/base/198919

Log:
  MFC r197586:
    It seems some 82559ER controllers do not support Rx checksum
    offloading. Datasheet said nothing about the limitation of 82559ER
    except WOL. Explicitly disable Rx checksum offloading for
    controllers that is known to lack the capability.
  
    PR:	kern/138135
    Tested by:	Gooderum, Mark < mgooderum <> websense dot com >

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

Modified: stable/8/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/8/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:22:59 2009	(r198918)
+++ stable/8/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:31:43 2009	(r198919)
@@ -631,8 +631,11 @@ fxp_attach(device_t dev)
 	}
 
 	/* For 82559 or later chips, Rx checksum offload is supported. */
-	if (sc->revision >= FXP_REV_82559_A0)
-		sc->flags |= FXP_FLAG_82559_RXCSUM;
+	if (sc->revision >= FXP_REV_82559_A0) {
+		/* 82559ER does not support Rx checksum offloading. */
+		if (sc->ident->devid != 0x1209)
+			sc->flags |= FXP_FLAG_82559_RXCSUM;
+	}
 	/*
 	 * Enable use of extended RFDs and TCBs for 82550
 	 * and later chips. Note: we need extended TXCB support

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 18:34:15 2009
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 576771065670;
	Wed,  4 Nov 2009 18:34:15 +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 457928FC0C;
	Wed,  4 Nov 2009 18:34:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4IYEKI042247;
	Wed, 4 Nov 2009 18:34:14 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IYEkk042244;
	Wed, 4 Nov 2009 18:34:14 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041834.nA4IYEkk042244@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 18:34: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: r198920 - stable/7/sys/dev/fxp
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, 04 Nov 2009 18:34:15 -0000

Author: yongari
Date: Wed Nov  4 18:34:14 2009
New Revision: 198920
URL: http://svn.freebsd.org/changeset/base/198920

Log:
  MFC r197586:
    It seems some 82559ER controllers do not support Rx checksum
    offloading. Datasheet said nothing about the limitation of 82559ER
    except WOL. Explicitly disable Rx checksum offloading for
    controllers that is known to lack the capability.
  
    PR:	kern/138135
    Tested by:	Gooderum, Mark < mgooderum <> websense dot com >

Modified:
  stable/7/sys/dev/fxp/if_fxp.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:31:43 2009	(r198919)
+++ stable/7/sys/dev/fxp/if_fxp.c	Wed Nov  4 18:34:14 2009	(r198920)
@@ -632,8 +632,11 @@ fxp_attach(device_t dev)
 	}
 
 	/* For 82559 or later chips, Rx checksum offload is supported. */
-	if (sc->revision >= FXP_REV_82559_A0)
-		sc->flags |= FXP_FLAG_82559_RXCSUM;
+	if (sc->revision >= FXP_REV_82559_A0) {
+		/* 82559ER does not support Rx checksum offloading. */
+		if (sc->ident->devid != 0x1209)
+			sc->flags |= FXP_FLAG_82559_RXCSUM;
+	}
 	/*
 	 * Enable use of extended RFDs and TCBs for 82550
 	 * and later chips. Note: we need extended TXCB support

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 19:01:36 2009
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 93FA41065676;
	Wed,  4 Nov 2009 19:01:36 +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 4BF428FC15;
	Wed,  4 Nov 2009 19:01:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4J1ZRb043101;
	Wed, 4 Nov 2009 19:01:35 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4J1ZB2043098;
	Wed, 4 Nov 2009 19:01:35 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200911041901.nA4J1ZB2043098@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 4 Nov 2009 19:01: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: r198922 - stable/7/sys/dev/de
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, 04 Nov 2009 19:01:36 -0000

Author: yongari
Date: Wed Nov  4 19:01:35 2009
New Revision: 198922
URL: http://svn.freebsd.org/changeset/base/198922

Log:
  MFC r197461:
    Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply
    alignment fixup code for received frames on strict alignment
    architectures.
  
  MFC r197463:
   Consistently use bus_addr_t.
  
  MFC r197464:
    Destroy dmamap in dma cleanup.
  
  MFC r197465:
    Align Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE.
    Also align setup descriptor on 32 bytes boundary. Tx buffer have no
    alignment limitation so create dmamap without alignment
    restriction[1]. Rx buffer still seems to require 4 bytes alignment
    limitation but we can simply use MCLBYTES for size to map the
    buffer instead of TULIP_DATA_PER_DESC as the buffer is allocated
    with m_getcl(9).
    de(4) supports up to TULIP_MAX_TXSEG segments for Tx buffers,
    increase maximum dma segment size to TULIP_MAX_TXSEG * MCLBYTES.
    While I'm here remove TULIP_DATA_PER_DESC as it is not used anymore.
  
    This should fix de(4) breakage introduced after r176206.
    Submitted by:	jhb [1]
    Reported by:	WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >
    Tested by:	WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >,
  		Takahashi Yoshihiro < nyan <> jp dot freebsd dot org >

Modified:
  stable/7/sys/dev/de/if_de.c
  stable/7/sys/dev/de/if_devar.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/de/if_de.c
==============================================================================
--- stable/7/sys/dev/de/if_de.c	Wed Nov  4 18:40:05 2009	(r198921)
+++ stable/7/sys/dev/de/if_de.c	Wed Nov  4 19:01:35 2009	(r198922)
@@ -160,7 +160,7 @@ static void	tulip_dma_map_rxbuf(void *, 
 static void
 tulip_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
 {
-    u_int32_t *paddr;
+    bus_addr_t *paddr;
 
     if (error)
 	return;
@@ -182,7 +182,7 @@ tulip_dma_map_rxbuf(void *arg, bus_dma_s
     KASSERT(nseg == 1, ("too many DMA segments"));
     KASSERT(segs[0].ds_len >= TULIP_RX_BUFLEN, ("receive buffer too small"));
 
-    desc->d_addr1 = segs[0].ds_addr;
+    desc->d_addr1 = segs[0].ds_addr & 0xffffffff;
     desc->d_length1 = TULIP_RX_BUFLEN;
 #ifdef not_needed
     /* These should already always be zero. */
@@ -3171,8 +3171,8 @@ tulip_reset(tulip_softc_t * const sc)
 	sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
     }
 
-    TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txinfo.ri_dma_addr);
-    TULIP_CSR_WRITE(sc, csr_rxlist, sc->tulip_rxinfo.ri_dma_addr);
+    TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txinfo.ri_dma_addr & 0xffffffff);
+    TULIP_CSR_WRITE(sc, csr_rxlist, sc->tulip_rxinfo.ri_dma_addr & 0xffffffff);
     TULIP_CSR_WRITE(sc, csr_busmode,
 		    (1 << (3 /*pci_max_burst_len*/ + 8))
 		    |TULIP_BUSMODE_CACHE_ALIGN8
@@ -3488,7 +3488,7 @@ tulip_rx_intr(tulip_softc_t * const sc)
 	    struct mbuf *m0;
 
 	    KASSERT(ms != NULL, ("no packet to accept"));
-#if defined(TULIP_COPY_RXDATA)
+#ifndef	__NO_STRICT_ALIGNMENT
 	    /*
 	     * Copy the data into a new mbuf that is properly aligned.  If
 	     * we fail to allocate a new mbuf, then drop the packet.  We will
@@ -3527,7 +3527,7 @@ tulip_rx_intr(tulip_softc_t * const sc)
 	     */
 	    ms = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
 
-#if defined(TULIP_COPY_RXDATA)
+#ifndef __NO_STRICT_ALIGNMENT
     skip_input:
 #endif
 	if (ms == NULL) {
@@ -4016,9 +4016,9 @@ tulip_txput(tulip_softc_t * const sc, st
 	eop = nextout;
 	eop->di_desc->d_flag   &= TULIP_DFLAG_ENDRING|TULIP_DFLAG_CHAIN;
 	eop->di_desc->d_status  = d_status;
-	eop->di_desc->d_addr1   = segs[segcnt].ds_addr;
+	eop->di_desc->d_addr1   = segs[segcnt].ds_addr & 0xffffffff;
 	eop->di_desc->d_length1 = segs[segcnt].ds_len;
-	eop->di_desc->d_addr2   = segs[segcnt+1].ds_addr;
+	eop->di_desc->d_addr2   = segs[segcnt+1].ds_addr & 0xffffffff;
 	eop->di_desc->d_length2 = segs[segcnt+1].ds_len;
 	d_status = TULIP_DSTS_OWNER;
 	if (++nextout == ri->ri_last)
@@ -4028,7 +4028,7 @@ tulip_txput(tulip_softc_t * const sc, st
 	eop = nextout;
 	eop->di_desc->d_flag   &= TULIP_DFLAG_ENDRING|TULIP_DFLAG_CHAIN;
 	eop->di_desc->d_status  = d_status;
-	eop->di_desc->d_addr1   = segs[segcnt].ds_addr;
+	eop->di_desc->d_addr1   = segs[segcnt].ds_addr & 0xffffffff;
 	eop->di_desc->d_length1 = segs[segcnt].ds_len;
 	eop->di_desc->d_addr2   = 0;
 	eop->di_desc->d_length2 = 0;
@@ -4194,7 +4194,7 @@ tulip_txput_setup(tulip_softc_t * const 
     nextout->d_length2 = 0;
     nextout->d_addr2 = 0;
     nextout->d_length1 = sizeof(sc->tulip_setupdata);
-    nextout->d_addr1 = sc->tulip_setup_dma_addr;
+    nextout->d_addr1 = sc->tulip_setup_dma_addr & 0xffffffff;
     bus_dmamap_sync(sc->tulip_setup_tag, sc->tulip_setup_map,
 	BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
     TULIP_TXDESC_PRESYNC(ri);
@@ -4491,7 +4491,7 @@ tulip_busdma_freering(tulip_ringinfo_t *
 /* Allocate memory for a single descriptor ring. */
 static int
 tulip_busdma_allocring(device_t dev, tulip_softc_t * const sc, size_t count,
-    bus_size_t maxsize, int nsegs, tulip_ringinfo_t *ri, const char *name)
+    bus_size_t align, int nsegs, tulip_ringinfo_t *ri, const char *name)
 {
     size_t size;
     int error, i;
@@ -4499,7 +4499,7 @@ tulip_busdma_allocring(device_t dev, tul
     /* First, setup a tag. */
     ri->ri_max = count;
     size = count * sizeof(tulip_desc_t);
-    error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT,
+    error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT,
 	BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL,
 	&ri->ri_ring_tag);
     if (error) {
@@ -4527,9 +4527,9 @@ tulip_busdma_allocring(device_t dev, tul
     }
 
     /* Allocate a tag for the data buffers. */
-    error = bus_dma_tag_create(NULL, 4, 0,
+    error = bus_dma_tag_create(NULL, align, 0,
 	BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
-	maxsize, nsegs, TULIP_DATA_PER_DESC, 0, NULL, NULL, &ri->ri_data_tag);
+	MCLBYTES * nsegs, nsegs, MCLBYTES, 0, NULL, NULL, &ri->ri_data_tag);
     if (error) {
 	device_printf(dev, "failed to allocate %s buffer dma tag\n", name);
 	return (error);
@@ -4563,6 +4563,7 @@ tulip_busdma_cleanup(tulip_softc_t * con
     if (sc->tulip_setupbuf != NULL) {
 	bus_dmamem_free(sc->tulip_setup_tag, sc->tulip_setupdata,
 	    sc->tulip_setup_map);
+	bus_dmamap_destroy(sc->tulip_setup_tag, sc->tulip_setup_map);
 	sc->tulip_setup_map = NULL;
 	sc->tulip_setupbuf = NULL;
     }
@@ -4586,8 +4587,8 @@ tulip_busdma_init(device_t dev, tulip_so
     /*
      * Allocate space and dmamap for transmit ring.
      */
-    error = tulip_busdma_allocring(dev, sc, TULIP_TXDESCS, TULIP_DATA_PER_DESC,
-	TULIP_MAX_TXSEG, &sc->tulip_txinfo, "transmit");
+    error = tulip_busdma_allocring(dev, sc, TULIP_TXDESCS, 1, TULIP_MAX_TXSEG,
+	&sc->tulip_txinfo, "transmit");
     if (error)
 	return (error);
 
@@ -4598,7 +4599,7 @@ tulip_busdma_init(device_t dev, tulip_so
      * a waste in practice though as an ethernet frame can easily fit
      * in TULIP_RX_BUFLEN bytes.
      */
-    error = tulip_busdma_allocring(dev, sc, TULIP_RXDESCS, MCLBYTES, 1,
+    error = tulip_busdma_allocring(dev, sc, TULIP_RXDESCS, 4, 1,
 	&sc->tulip_rxinfo, "receive");
     if (error)
 	return (error);
@@ -4606,7 +4607,7 @@ tulip_busdma_init(device_t dev, tulip_so
     /*
      * Allocate a DMA tag, memory, and map for setup descriptor
      */
-    error = bus_dma_tag_create(NULL, 4, 0,
+    error = bus_dma_tag_create(NULL, 32, 0,
 	BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
 	sizeof(sc->tulip_setupdata), 1, sizeof(sc->tulip_setupdata), 0,
 	NULL, NULL, &sc->tulip_setup_tag);

Modified: stable/7/sys/dev/de/if_devar.h
==============================================================================
--- stable/7/sys/dev/de/if_devar.h	Wed Nov  4 18:40:05 2009	(r198921)
+++ stable/7/sys/dev/de/if_devar.h	Wed Nov  4 19:01:35 2009	(r198922)
@@ -104,7 +104,7 @@ typedef struct {
 	tulip_descinfo_t *ri_descinfo;
 	bus_dma_tag_t	ri_ring_tag;
 	bus_dmamap_t	ri_ring_map;
-	uint32_t	ri_dma_addr;
+	bus_addr_t	ri_dma_addr;
 	bus_dma_tag_t	ri_data_tag;
 	bus_dmamap_t	*ri_data_maps;
 } tulip_ringinfo_t;
@@ -134,11 +134,7 @@ typedef struct {
  * architecture which can't handle unaligned accesses) because with
  * 100Mb/s cards the copying is just too much of a hit.
  */
-#if !defined(__i386__)
-#define	TULIP_COPY_RXDATA	1
-#endif
 
-#define	TULIP_DATA_PER_DESC	2032
 #define	TULIP_TXTIMER		4
 #define	TULIP_RXDESCS		48
 #define	TULIP_TXDESCS		128
@@ -560,7 +556,7 @@ struct tulip_softc {
 	 */
 	bus_dma_tag_t		tulip_setup_tag;
 	bus_dmamap_t		tulip_setup_map;
-	uint32_t		tulip_setup_dma_addr;
+	bus_addr_t		tulip_setup_dma_addr;
 	u_int32_t		*tulip_setupbuf;
 	u_int32_t		tulip_setupdata[192 / sizeof(u_int32_t)];
 	char			tulip_boardid[24];

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 20:49:15 2009
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 24F2E106566B;
	Wed,  4 Nov 2009 20:49:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 095EC8FC12;
	Wed,  4 Nov 2009 20:49:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4KnEi9046119;
	Wed, 4 Nov 2009 20:49:14 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4KnEs9046116;
	Wed, 4 Nov 2009 20:49:14 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911042049.nA4KnEs9046116@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 4 Nov 2009 20:49:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198925 - in stable/8/sys: amd64/linux32 i386/linux
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Nov 2009 20:49:15 -0000

Author: jhb
Date: Wed Nov  4 20:49:14 2009
New Revision: 198925
URL: http://svn.freebsd.org/changeset/base/198925

Log:
  MFC 198554:
  Fix some problems with effective mmap() offsets > 32 bits.  This was
  partially fixed on amd64 earlier.  Rather than forcing linux_mmap_common()
  to use a 32-bit offset, have it accept a 64-bit file offset.  This offset
  is then passed to the real mmap() call.  Rather than inventing a structure
  to hold the normal linux_mmap args that has a 64-bit offset, just pass
  each of the arguments individually to linux_mmap_common() since that more
  closes matches the existing style of various kern_foo() functions.

Modified:
  stable/8/sys/amd64/linux32/linux32_machdep.c
  stable/8/sys/i386/linux/linux_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/linux32/linux32_machdep.c
==============================================================================
--- stable/8/sys/amd64/linux32/linux32_machdep.c	Wed Nov  4 20:40:38 2009	(r198924)
+++ stable/8/sys/amd64/linux32/linux32_machdep.c	Wed Nov  4 20:49:14 2009	(r198925)
@@ -91,6 +91,10 @@ linux_to_bsd_sigaltstack(int lsa)
 	return (bsa);
 }
 
+static int	linux_mmap_common(struct thread *td, l_uintptr_t addr,
+		    l_size_t len, l_int prot, l_int flags, l_int fd,
+		    l_loff_t pos);
+
 int
 bsd_to_linux_sigaltstack(int bsa)
 {
@@ -759,12 +763,9 @@ linux_clone(struct thread *td, struct li
 #define STACK_SIZE  (2 * 1024 * 1024)
 #define GUARD_SIZE  (4 * PAGE_SIZE)
 
-static int linux_mmap_common(struct thread *, struct l_mmap_argv *);
-
 int
 linux_mmap2(struct thread *td, struct linux_mmap2_args *args)
 {
-	struct l_mmap_argv linux_args;
 
 #ifdef DEBUG
 	if (ldebug(mmap2))
@@ -773,14 +774,9 @@ linux_mmap2(struct thread *td, struct li
 		    args->flags, args->fd, args->pgoff);
 #endif
 
-	linux_args.addr = PTROUT(args->addr);
-	linux_args.len = args->len;
-	linux_args.prot = args->prot;
-	linux_args.flags = args->flags;
-	linux_args.fd = args->fd;
-	linux_args.pgoff = args->pgoff;
-
-	return (linux_mmap_common(td, &linux_args));
+	return (linux_mmap_common(td, PTROUT(args->addr), args->len, args->prot,
+		args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff *
+		PAGE_SIZE));
 }
 
 int
@@ -799,15 +795,15 @@ linux_mmap(struct thread *td, struct lin
 		    linux_args.addr, linux_args.len, linux_args.prot,
 		    linux_args.flags, linux_args.fd, linux_args.pgoff);
 #endif
-	if ((linux_args.pgoff % PAGE_SIZE) != 0)
-		return (EINVAL);
-	linux_args.pgoff /= PAGE_SIZE;
 
-	return (linux_mmap_common(td, &linux_args));
+	return (linux_mmap_common(td, linux_args.addr, linux_args.len,
+	    linux_args.prot, linux_args.flags, linux_args.fd,
+	    (uint32_t)linux_args.pgoff));
 }
 
 static int
-linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args)
+linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot,
+    l_int flags, l_int fd, l_loff_t pos)
 {
 	struct proc *p = td->td_proc;
 	struct mmap_args /* {
@@ -830,21 +826,20 @@ linux_mmap_common(struct thread *td, str
 	 * Linux mmap(2):
 	 * You must specify exactly one of MAP_SHARED and MAP_PRIVATE
 	 */
-	if (! ((linux_args->flags & LINUX_MAP_SHARED) ^
-	    (linux_args->flags & LINUX_MAP_PRIVATE)))
+	if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE)))
 		return (EINVAL);
 
-	if (linux_args->flags & LINUX_MAP_SHARED)
+	if (flags & LINUX_MAP_SHARED)
 		bsd_args.flags |= MAP_SHARED;
-	if (linux_args->flags & LINUX_MAP_PRIVATE)
+	if (flags & LINUX_MAP_PRIVATE)
 		bsd_args.flags |= MAP_PRIVATE;
-	if (linux_args->flags & LINUX_MAP_FIXED)
+	if (flags & LINUX_MAP_FIXED)
 		bsd_args.flags |= MAP_FIXED;
-	if (linux_args->flags & LINUX_MAP_ANON)
+	if (flags & LINUX_MAP_ANON)
 		bsd_args.flags |= MAP_ANON;
 	else
 		bsd_args.flags |= MAP_NOSYNC;
-	if (linux_args->flags & LINUX_MAP_GROWSDOWN)
+	if (flags & LINUX_MAP_GROWSDOWN)
 		bsd_args.flags |= MAP_STACK;
 
 	/*
@@ -852,12 +847,12 @@ linux_mmap_common(struct thread *td, str
 	 * on Linux/i386. We do this to ensure maximum compatibility.
 	 * Linux/ia64 does the same in i386 emulation mode.
 	 */
-	bsd_args.prot = linux_args->prot;
+	bsd_args.prot = prot;
 	if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
 		bsd_args.prot |= PROT_READ | PROT_EXEC;
 
 	/* Linux does not check file descriptor when MAP_ANONYMOUS is set. */
-	bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd;
+	bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd;
 	if (bsd_args.fd != -1) {
 		/*
 		 * Linux follows Solaris mmap(2) description:
@@ -882,7 +877,7 @@ linux_mmap_common(struct thread *td, str
 		fdrop(fp, td);
 	}
 
-	if (linux_args->flags & LINUX_MAP_GROWSDOWN) {
+	if (flags & LINUX_MAP_GROWSDOWN) {
 		/*
 		 * The Linux MAP_GROWSDOWN option does not limit auto
 		 * growth of the region.  Linux mmap with this option
@@ -905,8 +900,7 @@ linux_mmap_common(struct thread *td, str
 		 * fixed size of (STACK_SIZE - GUARD_SIZE).
 		 */
 
-		if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len >
-		    p->p_vmspace->vm_maxsaddr) {
+		if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) {
 			/*
 			 * Some Linux apps will attempt to mmap
 			 * thread stacks near the top of their
@@ -937,19 +931,19 @@ linux_mmap_common(struct thread *td, str
 		 * we map the full stack, since we don't have a way
 		 * to autogrow it.
 		 */
-		if (linux_args->len > STACK_SIZE - GUARD_SIZE) {
-			bsd_args.addr = (caddr_t)PTRIN(linux_args->addr);
-			bsd_args.len = linux_args->len;
+		if (len > STACK_SIZE - GUARD_SIZE) {
+			bsd_args.addr = (caddr_t)PTRIN(addr);
+			bsd_args.len = len;
 		} else {
-			bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) -
-			    (STACK_SIZE - GUARD_SIZE - linux_args->len);
+			bsd_args.addr = (caddr_t)PTRIN(addr) -
+			    (STACK_SIZE - GUARD_SIZE - len);
 			bsd_args.len = STACK_SIZE - GUARD_SIZE;
 		}
 	} else {
-		bsd_args.addr = (caddr_t)PTRIN(linux_args->addr);
-		bsd_args.len  = linux_args->len;
+		bsd_args.addr = (caddr_t)PTRIN(addr);
+		bsd_args.len  = len;
 	}
-	bsd_args.pos = (off_t)linux_args->pgoff * PAGE_SIZE;
+	bsd_args.pos = pos;
 
 #ifdef DEBUG
 	if (ldebug(mmap))

Modified: stable/8/sys/i386/linux/linux_machdep.c
==============================================================================
--- stable/8/sys/i386/linux/linux_machdep.c	Wed Nov  4 20:40:38 2009	(r198924)
+++ stable/8/sys/i386/linux/linux_machdep.c	Wed Nov  4 20:49:14 2009	(r198925)
@@ -93,6 +93,10 @@ struct l_old_select_argv {
 	struct l_timeval	*timeout;
 };
 
+static int	linux_mmap_common(struct thread *td, l_uintptr_t addr,
+		    l_size_t len, l_int prot, l_int flags, l_int fd,
+		    l_loff_t pos);
+
 int
 linux_to_bsd_sigaltstack(int lsa)
 {
@@ -591,12 +595,9 @@ linux_clone(struct thread *td, struct li
 #define STACK_SIZE  (2 * 1024 * 1024)
 #define GUARD_SIZE  (4 * PAGE_SIZE)
 
-static int linux_mmap_common(struct thread *, struct l_mmap_argv *);
-
 int
 linux_mmap2(struct thread *td, struct linux_mmap2_args *args)
 {
-	struct l_mmap_argv linux_args;
 
 #ifdef DEBUG
 	if (ldebug(mmap2))
@@ -605,14 +606,9 @@ linux_mmap2(struct thread *td, struct li
 		    args->flags, args->fd, args->pgoff);
 #endif
 
-	linux_args.addr = args->addr;
-	linux_args.len = args->len;
-	linux_args.prot = args->prot;
-	linux_args.flags = args->flags;
-	linux_args.fd = args->fd;
-	linux_args.pgoff = args->pgoff * PAGE_SIZE;
-
-	return (linux_mmap_common(td, &linux_args));
+	return (linux_mmap_common(td, args->addr, args->len, args->prot,
+		args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff *
+		PAGE_SIZE));
 }
 
 int
@@ -632,11 +628,14 @@ linux_mmap(struct thread *td, struct lin
 		    linux_args.flags, linux_args.fd, linux_args.pgoff);
 #endif
 
-	return (linux_mmap_common(td, &linux_args));
+	return (linux_mmap_common(td, linux_args.addr, linux_args.len,
+	    linux_args.prot, linux_args.flags, linux_args.fd,
+	    (uint32_t)linux_args.pgoff));
 }
 
 static int
-linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args)
+linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot,
+    l_int flags, l_int fd, l_loff_t pos)
 {
 	struct proc *p = td->td_proc;
 	struct mmap_args /* {
@@ -659,21 +658,20 @@ linux_mmap_common(struct thread *td, str
 	 * Linux mmap(2):
 	 * You must specify exactly one of MAP_SHARED and MAP_PRIVATE
 	 */
-	if (! ((linux_args->flags & LINUX_MAP_SHARED) ^
-	    (linux_args->flags & LINUX_MAP_PRIVATE)))
+	if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE)))
 		return (EINVAL);
 
-	if (linux_args->flags & LINUX_MAP_SHARED)
+	if (flags & LINUX_MAP_SHARED)
 		bsd_args.flags |= MAP_SHARED;
-	if (linux_args->flags & LINUX_MAP_PRIVATE)
+	if (flags & LINUX_MAP_PRIVATE)
 		bsd_args.flags |= MAP_PRIVATE;
-	if (linux_args->flags & LINUX_MAP_FIXED)
+	if (flags & LINUX_MAP_FIXED)
 		bsd_args.flags |= MAP_FIXED;
-	if (linux_args->flags & LINUX_MAP_ANON)
+	if (flags & LINUX_MAP_ANON)
 		bsd_args.flags |= MAP_ANON;
 	else
 		bsd_args.flags |= MAP_NOSYNC;
-	if (linux_args->flags & LINUX_MAP_GROWSDOWN)
+	if (flags & LINUX_MAP_GROWSDOWN)
 		bsd_args.flags |= MAP_STACK;
 
 	/*
@@ -681,12 +679,12 @@ linux_mmap_common(struct thread *td, str
 	 * on Linux/i386. We do this to ensure maximum compatibility.
 	 * Linux/ia64 does the same in i386 emulation mode.
 	 */
-	bsd_args.prot = linux_args->prot;
+	bsd_args.prot = prot;
 	if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
 		bsd_args.prot |= PROT_READ | PROT_EXEC;
 
 	/* Linux does not check file descriptor when MAP_ANONYMOUS is set. */
-	bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd;
+	bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd;
 	if (bsd_args.fd != -1) {
 		/*
 		 * Linux follows Solaris mmap(2) description:
@@ -711,9 +709,9 @@ linux_mmap_common(struct thread *td, str
 		fdrop(fp, td);
 	}
 
-	if (linux_args->flags & LINUX_MAP_GROWSDOWN) {
+	if (flags & LINUX_MAP_GROWSDOWN) {
 		/* 
-		 * The linux MAP_GROWSDOWN option does not limit auto
+		 * The Linux MAP_GROWSDOWN option does not limit auto
 		 * growth of the region.  Linux mmap with this option
 		 * takes as addr the inital BOS, and as len, the initial
 		 * region size.  It can then grow down from addr without
@@ -734,8 +732,7 @@ linux_mmap_common(struct thread *td, str
 		 * fixed size of (STACK_SIZE - GUARD_SIZE).
 		 */
 
-		if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len >
-		    p->p_vmspace->vm_maxsaddr) {
+		if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) {
 			/* 
 			 * Some linux apps will attempt to mmap
 			 * thread stacks near the top of their
@@ -766,19 +763,19 @@ linux_mmap_common(struct thread *td, str
 		 * we map the full stack, since we don't have a way
 		 * to autogrow it.
 		 */
-		if (linux_args->len > STACK_SIZE - GUARD_SIZE) {
-			bsd_args.addr = (caddr_t)PTRIN(linux_args->addr);
-			bsd_args.len = linux_args->len;
+		if (len > STACK_SIZE - GUARD_SIZE) {
+			bsd_args.addr = (caddr_t)PTRIN(addr);
+			bsd_args.len = len;
 		} else {
-			bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) -
-			    (STACK_SIZE - GUARD_SIZE - linux_args->len);
+			bsd_args.addr = (caddr_t)PTRIN(addr) -
+			    (STACK_SIZE - GUARD_SIZE - len);
 			bsd_args.len = STACK_SIZE - GUARD_SIZE;
 		}
 	} else {
-		bsd_args.addr = (caddr_t)PTRIN(linux_args->addr);
-		bsd_args.len  = linux_args->len;
+		bsd_args.addr = (caddr_t)PTRIN(addr);
+		bsd_args.len  = len;
 	}
-	bsd_args.pos = linux_args->pgoff;
+	bsd_args.pos = pos;
 
 #ifdef DEBUG
 	if (ldebug(mmap))

From owner-svn-src-stable@FreeBSD.ORG  Wed Nov  4 20:53:36 2009
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 500A8106566B;
	Wed,  4 Nov 2009 20:53:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3CEC08FC14;
	Wed,  4 Nov 2009 20:53:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4KrZt6046267;
	Wed, 4 Nov 2009 20:53:35 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4KrZh8046264;
	Wed, 4 Nov 2009 20:53:35 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911042053.nA4KrZh8046264@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 4 Nov 2009 20:53: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: r198926 - in stable/7/sys: amd64/linux32 i386/linux
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 04 Nov 2009 20:53:36 -0000

Author: jhb
Date: Wed Nov  4 20:53:35 2009
New Revision: 198926
URL: http://svn.freebsd.org/changeset/base/198926

Log:
  MFC 198554:
  Fix some problems with effective mmap() offsets > 32 bits.  This was
  partially fixed on amd64 earlier.  Rather than forcing linux_mmap_common()
  to use a 32-bit offset, have it accept a 64-bit file offset.  This offset
  is then passed to the real mmap() call.  Rather than inventing a structure
  to hold the normal linux_mmap args that has a 64-bit offset, just pass
  each of the arguments individually to linux_mmap_common() since that more
  closes matches the existing style of various kern_foo() functions.

Modified:
  stable/7/sys/amd64/linux32/linux32_machdep.c
  stable/7/sys/i386/linux/linux_machdep.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/linux32/linux32_machdep.c
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_machdep.c	Wed Nov  4 20:49:14 2009	(r198925)
+++ stable/7/sys/amd64/linux32/linux32_machdep.c	Wed Nov  4 20:53:35 2009	(r198926)
@@ -91,6 +91,10 @@ linux_to_bsd_sigaltstack(int lsa)
 	return (bsa);
 }
 
+static int	linux_mmap_common(struct thread *td, l_uintptr_t addr,
+		    l_size_t len, l_int prot, l_int flags, l_int fd,
+		    l_loff_t pos);
+
 int
 bsd_to_linux_sigaltstack(int bsa)
 {
@@ -759,12 +763,9 @@ linux_clone(struct thread *td, struct li
 #define STACK_SIZE  (2 * 1024 * 1024)
 #define GUARD_SIZE  (4 * PAGE_SIZE)
 
-static int linux_mmap_common(struct thread *, struct l_mmap_argv *);
-
 int
 linux_mmap2(struct thread *td, struct linux_mmap2_args *args)
 {
-	struct l_mmap_argv linux_args;
 
 #ifdef DEBUG
 	if (ldebug(mmap2))
@@ -773,14 +774,9 @@ linux_mmap2(struct thread *td, struct li
 		    args->flags, args->fd, args->pgoff);
 #endif
 
-	linux_args.addr = PTROUT(args->addr);
-	linux_args.len = args->len;
-	linux_args.prot = args->prot;
-	linux_args.flags = args->flags;
-	linux_args.fd = args->fd;
-	linux_args.pgoff = args->pgoff;
-
-	return (linux_mmap_common(td, &linux_args));
+	return (linux_mmap_common(td, PTROUT(args->addr), args->len, args->prot,
+		args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff *
+		PAGE_SIZE));
 }
 
 int
@@ -799,15 +795,15 @@ linux_mmap(struct thread *td, struct lin
 		    linux_args.addr, linux_args.len, linux_args.prot,
 		    linux_args.flags, linux_args.fd, linux_args.pgoff);
 #endif
-	if ((linux_args.pgoff % PAGE_SIZE) != 0)
-		return (EINVAL);
-	linux_args.pgoff /= PAGE_SIZE;
 
-	return (linux_mmap_common(td, &linux_args));
+	return (linux_mmap_common(td, linux_args.addr, linux_args.len,
+	    linux_args.prot, linux_args.flags, linux_args.fd,
+	    (uint32_t)linux_args.pgoff));
 }
 
 static int
-linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args)
+linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot,
+    l_int flags, l_int fd, l_loff_t pos)
 {
 	struct proc *p = td->td_proc;
 	struct mmap_args /* {
@@ -830,21 +826,20 @@ linux_mmap_common(struct thread *td, str
 	 * Linux mmap(2):
 	 * You must specify exactly one of MAP_SHARED and MAP_PRIVATE
 	 */
-	if (! ((linux_args->flags & LINUX_MAP_SHARED) ^
-	    (linux_args->flags & LINUX_MAP_PRIVATE)))
+	if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE)))
 		return (EINVAL);
 
-	if (linux_args->flags & LINUX_MAP_SHARED)
+	if (flags & LINUX_MAP_SHARED)
 		bsd_args.flags |= MAP_SHARED;
-	if (linux_args->flags & LINUX_MAP_PRIVATE)
+	if (flags & LINUX_MAP_PRIVATE)
 		bsd_args.flags |= MAP_PRIVATE;
-	if (linux_args->flags & LINUX_MAP_FIXED)
+	if (flags & LINUX_MAP_FIXED)
 		bsd_args.flags |= MAP_FIXED;
-	if (linux_args->flags & LINUX_MAP_ANON)
+	if (flags & LINUX_MAP_ANON)
 		bsd_args.flags |= MAP_ANON;
 	else
 		bsd_args.flags |= MAP_NOSYNC;
-	if (linux_args->flags & LINUX_MAP_GROWSDOWN)
+	if (flags & LINUX_MAP_GROWSDOWN)
 		bsd_args.flags |= MAP_STACK;
 
 	/*
@@ -852,12 +847,12 @@ linux_mmap_common(struct thread *td, str
 	 * on Linux/i386. We do this to ensure maximum compatibility.
 	 * Linux/ia64 does the same in i386 emulation mode.
 	 */
-	bsd_args.prot = linux_args->prot;
+	bsd_args.prot = prot;
 	if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
 		bsd_args.prot |= PROT_READ | PROT_EXEC;
 
 	/* Linux does not check file descriptor when MAP_ANONYMOUS is set. */
-	bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd;
+	bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd;
 	if (bsd_args.fd != -1) {
 		/*
 		 * Linux follows Solaris mmap(2) description:
@@ -882,7 +877,7 @@ linux_mmap_common(struct thread *td, str
 		fdrop(fp, td);
 	}
 
-	if (linux_args->flags & LINUX_MAP_GROWSDOWN) {
+	if (flags & LINUX_MAP_GROWSDOWN) {
 		/*
 		 * The Linux MAP_GROWSDOWN option does not limit auto
 		 * growth of the region.  Linux mmap with this option
@@ -905,8 +900,7 @@ linux_mmap_common(struct thread *td, str
 		 * fixed size of (STACK_SIZE - GUARD_SIZE).
 		 */
 
-		if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len >
-		    p->p_vmspace->vm_maxsaddr) {
+		if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) {
 			/*
 			 * Some Linux apps will attempt to mmap
 			 * thread stacks near the top of their
@@ -937,19 +931,19 @@ linux_mmap_common(struct thread *td, str
 		 * we map the full stack, since we don't have a way
 		 * to autogrow it.
 		 */
-		if (linux_args->len > STACK_SIZE - GUARD_SIZE) {
-			bsd_args.addr = (caddr_t)PTRIN(linux_args->addr);
-			bsd_args.len = linux_args->len;
+		if (len > STACK_SIZE - GUARD_SIZE) {
+			bsd_args.addr = (caddr_t)PTRIN(addr);
+			bsd_args.len = len;
 		} else {
-			bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) -
-			    (STACK_SIZE - GUARD_SIZE - linux_args->len);
+			bsd_args.addr = (caddr_t)PTRIN(addr) -
+			    (STACK_SIZE - GUARD_SIZE - len);
 			bsd_args.len = STACK_SIZE - GUARD_SIZE;
 		}
 	} else {
-		bsd_args.addr = (caddr_t)PTRIN(linux_args->addr);
-		bsd_args.len  = linux_args->len;
+		bsd_args.addr = (caddr_t)PTRIN(addr);
+		bsd_args.len  = len;
 	}
-	bsd_args.pos = (off_t)linux_args->pgoff * PAGE_SIZE;
+	bsd_args.pos = pos;
 
 #ifdef DEBUG
 	if (ldebug(mmap))

Modified: stable/7/sys/i386/linux/linux_machdep.c
==============================================================================
--- stable/7/sys/i386/linux/linux_machdep.c	Wed Nov  4 20:49:14 2009	(r198925)
+++ stable/7/sys/i386/linux/linux_machdep.c	Wed Nov  4 20:53:35 2009	(r198926)
@@ -93,6 +93,10 @@ struct l_old_select_argv {
 	struct l_timeval	*timeout;
 };
 
+static int	linux_mmap_common(struct thread *td, l_uintptr_t addr,
+		    l_size_t len, l_int prot, l_int flags, l_int fd,
+		    l_loff_t pos);
+
 int
 linux_to_bsd_sigaltstack(int lsa)
 {
@@ -591,12 +595,9 @@ linux_clone(struct thread *td, struct li
 #define STACK_SIZE  (2 * 1024 * 1024)
 #define GUARD_SIZE  (4 * PAGE_SIZE)
 
-static int linux_mmap_common(struct thread *, struct l_mmap_argv *);
-
 int
 linux_mmap2(struct thread *td, struct linux_mmap2_args *args)
 {
-	struct l_mmap_argv linux_args;
 
 #ifdef DEBUG
 	if (ldebug(mmap2))
@@ -605,14 +606,9 @@ linux_mmap2(struct thread *td, struct li
 		    args->flags, args->fd, args->pgoff);
 #endif
 
-	linux_args.addr = args->addr;
-	linux_args.len = args->len;
-	linux_args.prot = args->prot;
-	linux_args.flags = args->flags;
-	linux_args.fd = args->fd;
-	linux_args.pgoff = args->pgoff * PAGE_SIZE;
-
-	return (linux_mmap_common(td, &linux_args));
+	return (linux_mmap_common(td, args->addr, args->len, args->prot,
+		args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff *
+		PAGE_SIZE));
 }
 
 int
@@ -632,11 +628,14 @@ linux_mmap(struct thread *td, struct lin
 		    linux_args.flags, linux_args.fd, linux_args.pgoff);
 #endif
 
-	return (linux_mmap_common(td, &linux_args));
+	return (linux_mmap_common(td, linux_args.addr, linux_args.len,
+	    linux_args.prot, linux_args.flags, linux_args.fd,
+	    (uint32_t)linux_args.pgoff));
 }
 
 static int
-linux_mmap_common(struct thread *td, struct l_mmap_argv *linux_args)
+linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot,
+    l_int flags, l_int fd, l_loff_t pos)
 {
 	struct proc *p = td->td_proc;
 	struct mmap_args /* {
@@ -659,21 +658,20 @@ linux_mmap_common(struct thread *td, str
 	 * Linux mmap(2):
 	 * You must specify exactly one of MAP_SHARED and MAP_PRIVATE
 	 */
-	if (! ((linux_args->flags & LINUX_MAP_SHARED) ^
-	    (linux_args->flags & LINUX_MAP_PRIVATE)))
+	if (!((flags & LINUX_MAP_SHARED) ^ (flags & LINUX_MAP_PRIVATE)))
 		return (EINVAL);
 
-	if (linux_args->flags & LINUX_MAP_SHARED)
+	if (flags & LINUX_MAP_SHARED)
 		bsd_args.flags |= MAP_SHARED;
-	if (linux_args->flags & LINUX_MAP_PRIVATE)
+	if (flags & LINUX_MAP_PRIVATE)
 		bsd_args.flags |= MAP_PRIVATE;
-	if (linux_args->flags & LINUX_MAP_FIXED)
+	if (flags & LINUX_MAP_FIXED)
 		bsd_args.flags |= MAP_FIXED;
-	if (linux_args->flags & LINUX_MAP_ANON)
+	if (flags & LINUX_MAP_ANON)
 		bsd_args.flags |= MAP_ANON;
 	else
 		bsd_args.flags |= MAP_NOSYNC;
-	if (linux_args->flags & LINUX_MAP_GROWSDOWN)
+	if (flags & LINUX_MAP_GROWSDOWN)
 		bsd_args.flags |= MAP_STACK;
 
 	/*
@@ -681,12 +679,12 @@ linux_mmap_common(struct thread *td, str
 	 * on Linux/i386. We do this to ensure maximum compatibility.
 	 * Linux/ia64 does the same in i386 emulation mode.
 	 */
-	bsd_args.prot = linux_args->prot;
+	bsd_args.prot = prot;
 	if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
 		bsd_args.prot |= PROT_READ | PROT_EXEC;
 
 	/* Linux does not check file descriptor when MAP_ANONYMOUS is set. */
-	bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd;
+	bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : fd;
 	if (bsd_args.fd != -1) {
 		/*
 		 * Linux follows Solaris mmap(2) description:
@@ -711,9 +709,9 @@ linux_mmap_common(struct thread *td, str
 		fdrop(fp, td);
 	}
 
-	if (linux_args->flags & LINUX_MAP_GROWSDOWN) {
+	if (flags & LINUX_MAP_GROWSDOWN) {
 		/* 
-		 * The linux MAP_GROWSDOWN option does not limit auto
+		 * The Linux MAP_GROWSDOWN option does not limit auto
 		 * growth of the region.  Linux mmap with this option
 		 * takes as addr the inital BOS, and as len, the initial
 		 * region size.  It can then grow down from addr without
@@ -734,8 +732,7 @@ linux_mmap_common(struct thread *td, str
 		 * fixed size of (STACK_SIZE - GUARD_SIZE).
 		 */
 
-		if ((caddr_t)PTRIN(linux_args->addr) + linux_args->len >
-		    p->p_vmspace->vm_maxsaddr) {
+		if ((caddr_t)PTRIN(addr) + len > p->p_vmspace->vm_maxsaddr) {
 			/* 
 			 * Some linux apps will attempt to mmap
 			 * thread stacks near the top of their
@@ -766,19 +763,19 @@ linux_mmap_common(struct thread *td, str
 		 * we map the full stack, since we don't have a way
 		 * to autogrow it.
 		 */
-		if (linux_args->len > STACK_SIZE - GUARD_SIZE) {
-			bsd_args.addr = (caddr_t)PTRIN(linux_args->addr);
-			bsd_args.len = linux_args->len;
+		if (len > STACK_SIZE - GUARD_SIZE) {
+			bsd_args.addr = (caddr_t)PTRIN(addr);
+			bsd_args.len = len;
 		} else {
-			bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) -
-			    (STACK_SIZE - GUARD_SIZE - linux_args->len);
+			bsd_args.addr = (caddr_t)PTRIN(addr) -
+			    (STACK_SIZE - GUARD_SIZE - len);
 			bsd_args.len = STACK_SIZE - GUARD_SIZE;
 		}
 	} else {
-		bsd_args.addr = (caddr_t)PTRIN(linux_args->addr);
-		bsd_args.len  = linux_args->len;
+		bsd_args.addr = (caddr_t)PTRIN(addr);
+		bsd_args.len  = len;
 	}
-	bsd_args.pos = linux_args->pgoff;
+	bsd_args.pos = pos;
 
 #ifdef DEBUG
 	if (ldebug(mmap))

From owner-svn-src-stable@FreeBSD.ORG  Thu Nov  5 02:27:57 2009
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 1E1F8106566C;
	Thu,  5 Nov 2009 02:27:57 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0C00F8FC0A;
	Thu,  5 Nov 2009 02:27:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA52RuHo054302;
	Thu, 5 Nov 2009 02:27:56 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA52RuFl054300;
	Thu, 5 Nov 2009 02:27:56 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <200911050227.nA52RuFl054300@svn.freebsd.org>
From: Ed Maste 
Date: Thu, 5 Nov 2009 02:27:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198935 - stable/8/usr.bin/gcore
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Nov 2009 02:27:57 -0000

Author: emaste
Date: Thu Nov  5 02:27:56 2009
New Revision: 198935
URL: http://svn.freebsd.org/changeset/base/198935

Log:
  MFC r197437:
  
    Use %zu for size_t, not %zd.

Modified:
  stable/8/usr.bin/gcore/elfcore.c
Directory Properties:
  stable/8/usr.bin/gcore/   (props changed)

Modified: stable/8/usr.bin/gcore/elfcore.c
==============================================================================
--- stable/8/usr.bin/gcore/elfcore.c	Wed Nov  4 23:36:23 2009	(r198934)
+++ stable/8/usr.bin/gcore/elfcore.c	Thu Nov  5 02:27:56 2009	(r198935)
@@ -158,7 +158,7 @@ elf_coredump(int efd __unused, int fd, p
 				err(1, "read from %s", memname);
 			if ((size_t)ngot < nwant)
 				errx(1, "short read from %s:"
-				    " wanted %zd, got %zd", memname,
+				    " wanted %zu, got %zd", memname,
 				    nwant, ngot);
 			ngot = write(fd, buf, nwant);
 			if (ngot == -1)
@@ -414,7 +414,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu
 	if ((n = read(fd, &status->pr_reg, sizeof status->pr_reg)) == -1)
 		err(1, "read error from %s", name);
 	if ((size_t)n < sizeof(status->pr_reg))
-		errx(1, "short read from %s: wanted %zd, got %d", name,
+		errx(1, "short read from %s: wanted %zu, got %d", name,
 		    sizeof status->pr_reg, n);
 	close(fd);
 
@@ -425,7 +425,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu
 	if ((n = read(fd, fpregset, sizeof *fpregset)) == -1)
 		err(1, "read error from %s", name);
 	if ((size_t)n < sizeof(*fpregset))
-		errx(1, "short read from %s: wanted %zd, got %d", name,
+		errx(1, "short read from %s: wanted %zu, got %d", name,
 		    sizeof *fpregset, n);
 	close(fd);
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Nov  5 02:29:46 2009
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 4463A1065670;
	Thu,  5 Nov 2009 02:29:46 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 325D08FC1C;
	Thu,  5 Nov 2009 02:29:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA52Tkbs054387;
	Thu, 5 Nov 2009 02:29:46 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA52TkIr054385;
	Thu, 5 Nov 2009 02:29:46 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <200911050229.nA52TkIr054385@svn.freebsd.org>
From: Ed Maste 
Date: Thu, 5 Nov 2009 02:29:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198936 - stable/7/usr.bin/gcore
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Nov 2009 02:29:46 -0000

Author: emaste
Date: Thu Nov  5 02:29:45 2009
New Revision: 198936
URL: http://svn.freebsd.org/changeset/base/198936

Log:
  MFC r197437:
  
    Use %zu for size_t, not %zd.

Modified:
  stable/7/usr.bin/gcore/elfcore.c
Directory Properties:
  stable/7/usr.bin/gcore/   (props changed)

Modified: stable/7/usr.bin/gcore/elfcore.c
==============================================================================
--- stable/7/usr.bin/gcore/elfcore.c	Thu Nov  5 02:27:56 2009	(r198935)
+++ stable/7/usr.bin/gcore/elfcore.c	Thu Nov  5 02:29:45 2009	(r198936)
@@ -158,7 +158,7 @@ elf_coredump(int efd __unused, int fd, p
 				err(1, "read from %s", memname);
 			if ((size_t)ngot < nwant)
 				errx(1, "short read from %s:"
-				    " wanted %zd, got %zd", memname,
+				    " wanted %zu, got %zd", memname,
 				    nwant, ngot);
 			ngot = write(fd, buf, nwant);
 			if (ngot == -1)
@@ -414,7 +414,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu
 	if ((n = read(fd, &status->pr_reg, sizeof status->pr_reg)) == -1)
 		err(1, "read error from %s", name);
 	if ((size_t)n < sizeof(status->pr_reg))
-		errx(1, "short read from %s: wanted %zd, got %d", name,
+		errx(1, "short read from %s: wanted %zu, got %d", name,
 		    sizeof status->pr_reg, n);
 	close(fd);
 
@@ -425,7 +425,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu
 	if ((n = read(fd, fpregset, sizeof *fpregset)) == -1)
 		err(1, "read error from %s", name);
 	if ((size_t)n < sizeof(*fpregset))
-		errx(1, "short read from %s: wanted %zd, got %d", name,
+		errx(1, "short read from %s: wanted %zu, got %d", name,
 		    sizeof *fpregset, n);
 	close(fd);
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Nov  5 02:31:10 2009
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 E6E82106566C;
	Thu,  5 Nov 2009 02:31:10 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D500E8FC13;
	Thu,  5 Nov 2009 02:31:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA52VADW054482;
	Thu, 5 Nov 2009 02:31:10 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA52VAAW054480;
	Thu, 5 Nov 2009 02:31:10 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <200911050231.nA52VAAW054480@svn.freebsd.org>
From: Ed Maste 
Date: Thu, 5 Nov 2009 02:31:10 +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: r198937 - stable/6/usr.bin/gcore
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Nov 2009 02:31:11 -0000

Author: emaste
Date: Thu Nov  5 02:31:10 2009
New Revision: 198937
URL: http://svn.freebsd.org/changeset/base/198937

Log:
  MFC r197437:
  
    Use %zu for size_t, not %zd.

Modified:
  stable/6/usr.bin/gcore/elfcore.c
Directory Properties:
  stable/6/usr.bin/gcore/   (props changed)

Modified: stable/6/usr.bin/gcore/elfcore.c
==============================================================================
--- stable/6/usr.bin/gcore/elfcore.c	Thu Nov  5 02:29:45 2009	(r198936)
+++ stable/6/usr.bin/gcore/elfcore.c	Thu Nov  5 02:31:10 2009	(r198937)
@@ -158,7 +158,7 @@ elf_coredump(int efd __unused, int fd, p
 				err(1, "read from %s", memname);
 			if ((size_t)ngot < nwant)
 				errx(1, "short read from %s:"
-				    " wanted %zd, got %zd", memname,
+				    " wanted %zu, got %zd", memname,
 				    nwant, ngot);
 			ngot = write(fd, buf, nwant);
 			if (ngot == -1)
@@ -414,7 +414,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu
 	if ((n = read(fd, &status->pr_reg, sizeof status->pr_reg)) == -1)
 		err(1, "read error from %s", name);
 	if ((size_t)n < sizeof(status->pr_reg))
-		errx(1, "short read from %s: wanted %zd, got %d", name,
+		errx(1, "short read from %s: wanted %zu, got %d", name,
 		    sizeof status->pr_reg, n);
 	close(fd);
 
@@ -425,7 +425,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu
 	if ((n = read(fd, fpregset, sizeof *fpregset)) == -1)
 		err(1, "read error from %s", name);
 	if ((size_t)n < sizeof(*fpregset))
-		errx(1, "short read from %s: wanted %zd, got %d", name,
+		errx(1, "short read from %s: wanted %zu, got %d", name,
 		    sizeof *fpregset, n);
 	close(fd);
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Nov  5 08:31:42 2009
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 B4833106566C;
	Thu,  5 Nov 2009 08:31:42 +0000 (UTC)
	(envelope-from netchild@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A15C68FC18;
	Thu,  5 Nov 2009 08:31:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA58Vgs7068307;
	Thu, 5 Nov 2009 08:31:42 GMT (envelope-from netchild@svn.freebsd.org)
Received: (from netchild@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA58VgvF068287;
	Thu, 5 Nov 2009 08:31:42 GMT (envelope-from netchild@svn.freebsd.org)
Message-Id: <200911050831.nA58VgvF068287@svn.freebsd.org>
From: Alexander Leidinger 
Date: Thu, 5 Nov 2009 08:31:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198946 - stable/8/tools/kerneldoc/subsys
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Nov 2009 08:31:42 -0000

Author: netchild
Date: Thu Nov  5 08:31:42 2009
New Revision: 198946
URL: http://svn.freebsd.org/changeset/base/198946

Log:
  MFC r196511:
    - Update config to doxygen 1.5.2 (I use this with 1.5.9).
    - Add linprocfs and linsysfs to the linuxulator dox.
    - Take the generated includes from the .m files from a subdirectory
      instead of putting everything into $(.OBJDIR). This imporves the
      human readbility of the source directory contents a lot, if you do not
      create a separate OBJDIR.
    - Assume UTF-8 encoding for every input file.
    - Strip the source and dest path from the output, we are not interested
      in the absolute location on the machine where the docs are created,
      relative the the root of the FreeBSD source is what interests us.
    - Exclude .svn directories.
    - Switch to alphabetic index.
    - Use one line per INCLUDE_PATH member in the common dox-config.
    - Bump the __FreeBSD__ version to 9. [here in the MFC: to 8]
    - Switch from hardcoded .m files to an run-time generated one. Takes
      a little bit more time to get started with actual work, but at least
      is more future-proof. If you generate dox for all subsystems, the
      time to find all .m files in the source is magnitutes lower than
      producing the docs.
    - Make the *DEST_PATH overidable from the environment. This allows to
      produce the output directly in the docroot of a webserver.
    - Fix the path when telling the user where he can find the API docs.

Modified:
  stable/8/tools/kerneldoc/subsys/Dependencies
  stable/8/tools/kerneldoc/subsys/Doxyfile-cam
  stable/8/tools/kerneldoc/subsys/Doxyfile-crypto
  stable/8/tools/kerneldoc/subsys/Doxyfile-dev_pci
  stable/8/tools/kerneldoc/subsys/Doxyfile-dev_sound
  stable/8/tools/kerneldoc/subsys/Doxyfile-dev_usb
  stable/8/tools/kerneldoc/subsys/Doxyfile-geom
  stable/8/tools/kerneldoc/subsys/Doxyfile-kern
  stable/8/tools/kerneldoc/subsys/Doxyfile-libkern
  stable/8/tools/kerneldoc/subsys/Doxyfile-linux
  stable/8/tools/kerneldoc/subsys/Doxyfile-net80211
  stable/8/tools/kerneldoc/subsys/Doxyfile-netgraph
  stable/8/tools/kerneldoc/subsys/Doxyfile-netinet
  stable/8/tools/kerneldoc/subsys/Doxyfile-netinet6
  stable/8/tools/kerneldoc/subsys/Doxyfile-netipsec
  stable/8/tools/kerneldoc/subsys/Doxyfile-opencrypto
  stable/8/tools/kerneldoc/subsys/Doxyfile-vm
  stable/8/tools/kerneldoc/subsys/Makefile
  stable/8/tools/kerneldoc/subsys/common-Doxyfile
Directory Properties:
  stable/8/tools/kerneldoc/subsys/   (props changed)

Modified: stable/8/tools/kerneldoc/subsys/Dependencies
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Dependencies	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Dependencies	Thu Nov  5 08:31:42 2009	(r198946)
@@ -6,15 +6,15 @@
 
 $(.OBJDIR)/dev_sound/dev_sound.tag:	$(.OBJDIR)/dev_pci/dev_pci.tag \
 					$(.OBJDIR)/dev_usb/dev_usb.tag \
-					$(.OBJDIR)/ac97_if.h \
-					$(.OBJDIR)/channel_if.h \
-					$(.OBJDIR)/feeder_if.h \
-					$(.OBJDIR)/mixer_if.h
+					$(.OBJDIR)/include/ac97_if.h \
+					$(.OBJDIR)/include/channel_if.h \
+					$(.OBJDIR)/include/feeder_if.h \
+					$(.OBJDIR)/include/mixer_if.h
 
 $(.OBJDIR)/dev_usb/dev_usb.tag:	$(.OBJDIR)/dev_pci/dev_pci.tag \
-				$(.OBJDIR)/usb_if.h
+				$(.OBJDIR)/include/usb_if.h
 
-$(.OBJDIR)/dev_pci/dev_pci.tag:	$(.OBJDIR)/pci_if.h \
-				$(.OBJDIR)/pcib_if.h \
-				$(.OBJDIR)/bus_if.h
+$(.OBJDIR)/dev_pci/dev_pci.tag:	$(.OBJDIR)/include/pci_if.h \
+				$(.OBJDIR)/include/pcib_if.h \
+				$(.OBJDIR)/include/bus_if.h
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-cam
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-cam	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-cam	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-crypto
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-crypto	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-crypto	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-dev_pci
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-dev_pci	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-dev_pci	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-dev_sound
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-dev_sound	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-dev_sound	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-dev_usb
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-dev_usb	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-dev_usb	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-geom
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-geom	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-geom	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-kern
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-kern	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-kern	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-libkern
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-libkern	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-libkern	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-linux
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-linux	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-linux	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 
@@ -12,6 +12,8 @@ EXTRACT_ALL            = YES    # for un
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 INPUT                  = $(DOXYGEN_SRC_PATH)/compat/linux \
+			 $(DOXYGEN_SRC_PATH)/compat/linprocfs \
+			 $(DOXYGEN_SRC_PATH)/compat/linsysfs \
                          $(DOXYGEN_LINUX_PATH) $(NOTREVIEWED)
 
 GENERATE_TAGFILE       = linux/linux.tag

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-net80211
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-net80211	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-net80211	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-netgraph
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-netgraph	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-netgraph	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-netinet
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-netinet	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-netinet	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-netinet6
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-netinet6	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-netinet6	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-netipsec
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-netipsec	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-netipsec	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-opencrypto
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-opencrypto	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-opencrypto	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Doxyfile-vm
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Doxyfile-vm	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Doxyfile-vm	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,4 +1,4 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 

Modified: stable/8/tools/kerneldoc/subsys/Makefile
==============================================================================
--- stable/8/tools/kerneldoc/subsys/Makefile	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/Makefile	Thu Nov  5 08:31:42 2009	(r198946)
@@ -10,49 +10,7 @@ TARGET_ARCH?=	${MACHINE_ARCH}
 S?=/usr/src/sys
 LOCALBASE?=/usr/local
 
-MFILES+=dev/acpica/acpi_if.m
-MFILES+=dev/ata/ata_if.m
-MFILES+=dev/eisa/eisa_if.m
-MFILES+=dev/iicbus/iicbb_if.m
-MFILES+=dev/iicbus/iicbus_if.m
-MFILES+=dev/mii/miibus_if.m
-MFILES+=dev/mmc/mmcbr_if.m
-MFILES+=dev/mmc/mmcbus_if.m
-MFILES+=dev/ofw/ofw_bus_if.m
-MFILES+=dev/pccard/card_if.m
-MFILES+=dev/pccard/power_if.m
-MFILES+=dev/pci/pci_if.m
-MFILES+=dev/pci/pcib_if.m
-MFILES+=dev/ppbus/ppbus_if.m
-MFILES+=dev/scc/scc_if.m
-MFILES+=dev/smbus/smbus_if.m
-MFILES+=dev/sound/midi/mpu_if.m
-MFILES+=dev/sound/midi/mpufoi_if.m
-MFILES+=dev/sound/midi/synth_if.m
-MFILES+=dev/sound/pcm/ac97_if.m
-MFILES+=dev/sound/pcm/channel_if.m
-MFILES+=dev/sound/pcm/feeder_if.m
-MFILES+=dev/sound/pcm/mixer_if.m
-MFILES+=dev/spibus/spibus_if.m
-MFILES+=dev/uart/uart_if.m
-MFILES+=dev/usb/usb_if.m
-MFILES+=geom/part/g_part_if.m
-MFILES+=isa/isa_if.m
-MFILES+=kern/bus_if.m
-MFILES+=kern/clock_if.m
-MFILES+=kern/cpufreq_if.m
-MFILES+=kern/device_if.m
-MFILES+=kern/linker_if.m
-MFILES+=kern/serdev_if.m
-MFILES+=libkern/iconv_converter_if.m
-MFILES+=opencrypto/cryptodev_if.m
-MFILES+=pc98/pc98/canbus_if.m
-MFILES+=pci/agp_if.m
-MFILES+=powerpc/powerpc/mmu_if.m
-MFILES+=powerpc/powerpc/pic_if.m
-MFILES+=sparc64/pci/ofw_pci_if.m
-MFILES+=sun4v/mdesc/mdesc_bus_if.m
-
+MFILES!= find ${S} -name \*.m | sed -e 's:${S}/::g'
 HFILES=	${MFILES:T:S/.m$/.h/}
 AWK?=	awk
 
@@ -73,16 +31,16 @@ usage:
 all:	${ALL}
 pdf-all:${PDF_ALL}
 
-mfiles: ${HFILES:S/^/${.OBJDIR}\//}
+mfiles: ${HFILES:S/^/${.OBJDIR}\/include\//}
 
-DOXYGEN_DEST_PATH=	${.OBJDIR}
-DOXYGEN_LATEX_DEST_PATH=${.OBJDIR}
-DOXYGEN_PDF_DEST_PATH=	${.OBJDIR}
+DOXYGEN_DEST_PATH?=	${.OBJDIR}
+DOXYGEN_LATEX_DEST_PATH?=${.OBJDIR}
+DOXYGEN_PDF_DEST_PATH?=	${.OBJDIR}
 
-.if exists{${S}/${TARGET_ARCH}/linux}
+.if exists(${S}/${TARGET_ARCH}/linux)
 DOXYGEN_LINUX_PATH=	${S}/${TARGET_ARCH}/linux
 .endif
-.if exists{${S}/${TARGET_ARCH}/linux32}
+.if exists(${S}/${TARGET_ARCH}/linux32)
 DOXYGEN_LINUX_PATH+=	${S}/${TARGET_ARCH}/linux32
 .endif
 
@@ -98,13 +56,13 @@ ${.OBJDIR}/${target}/${target}.tag:
 		env DOXYGEN_INCLUDE_PATH=${.CURDIR} \
 		    DOXYGEN_SRC_PATH=${S}  \
 		    DOXYGEN_DEST_PATH=${DOXYGEN_DEST_PATH} \
-		    DOXYGEN_SRC_INCLUDE_PATH="${S}/sys ${S}/../include ${S}/${TARGET_ARCH}/include" \
+		    DOXYGEN_SRC_INCLUDE_PATH="${S}/sys ${S}/../include ${S}/${TARGET_ARCH}/include ${.OBJDIR}/include" \
 		    DOXYGEN_TARGET_ARCH=${TARGET_ARCH} \
 		    DOXYGEN_LINUX_PATH=${DOXYGEN_LINUX_PATH} \
 		    NOTREVIEWED=${.CURDIR}/notreviewed.dox \
 		    PATH=${LOCALBASE}/bin:${PATH} \
 			doxygen ${.CURDIR}/Doxyfile-${target}
-	@echo "API docs for ${target} are now available in ${.OBJDIR}/${target}/." | /usr/bin/fmt
+	@echo "API docs for ${target} are now available in ${DOXYGEN_DEST_PATH}/${target}/." | /usr/bin/fmt
 
 pdf-${target}:	${.OBJDIR}/${target}/${target}.tag
 	@cd ${DOXYGEN_LATEX_DEST_PATH}/${target}/latex && ${MAKE} refman.pdf && cp refman.pdf ${DOXYGEN_PDF_DEST_PATH}/${target}.pdf
@@ -117,10 +75,12 @@ clean-${target}:
 	rm -rf ${DOXYGEN_DEST_PATH}/${target} ${.OBJDIR}/${target}
 .endfor
 
+CLEANDIRS+=	${.OBJDIR}/include
 .for file in ${MFILES}
-CLEANDIRS+=     ${.OBJDIR}/${file:T:S/.m$/.h/}
-${.OBJDIR}/${file:T:S/.m$/.h/}: ${S}/${file}
-	cd ${.OBJDIR}; ${AWK} -f $S/tools/makeobjops.awk ${S}/${file} -h
+CLEANFILES+=     ${.OBJDIR}/include/${file:T:S/.m$/.h/}
+${.OBJDIR}/include/${file:T:S/.m$/.h/}: ${S}/${file}
+	@mkdir -p ${.OBJDIR}/include
+	cd ${.OBJDIR}/include && ${AWK} -f $S/tools/makeobjops.awk ${S}/${file} -h
 .endfor
 
 #

Modified: stable/8/tools/kerneldoc/subsys/common-Doxyfile
==============================================================================
--- stable/8/tools/kerneldoc/subsys/common-Doxyfile	Thu Nov  5 07:37:48 2009	(r198945)
+++ stable/8/tools/kerneldoc/subsys/common-Doxyfile	Thu Nov  5 08:31:42 2009	(r198946)
@@ -1,14 +1,14 @@
-# Doxyfile 1.4.1
+# Doxyfile 1.5.2
 
 # $FreeBSD$
 
 #---------------------------------------------------------------------------
 # Project related configuration options
 #---------------------------------------------------------------------------
+DOXYFILE_ENCODING      = UTF-8
 PROJECT_NUMBER         = 
 CREATE_SUBDIRS         = YES
 OUTPUT_LANGUAGE        = English
-USE_WINDOWS_ENCODING   = NO
 BRIEF_MEMBER_DESC      = YES
 REPEAT_BRIEF           = YES
 ABBREVIATE_BRIEF       = "The $name class" \
@@ -25,18 +25,20 @@ ABBREVIATE_BRIEF       = "The $name clas
 ALWAYS_DETAILED_SEC    = NO
 INLINE_INHERITED_MEMB  = NO
 FULL_PATH_NAMES        = YES
-STRIP_FROM_PATH        = 
+STRIP_FROM_PATH        = $(DOXYGEN_SRC_PATH) $(DOXYGEN_DEST_PATH)
 STRIP_FROM_INC_PATH    = 
 SHORT_NAMES            = NO
 JAVADOC_AUTOBRIEF      = NO
 MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP         = NO
 INHERIT_DOCS           = YES
-DISTRIBUTE_GROUP_DOC   = NO
+SEPARATE_MEMBER_PAGES  = NO
 TAB_SIZE               = 8
 ALIASES                = 
 OPTIMIZE_OUTPUT_FOR_C  = YES
 OPTIMIZE_OUTPUT_JAVA   = NO
+BUILTIN_STL_SUPPORT    = NO
+CPP_CLI_SUPPORT        = NO
+DISTRIBUTE_GROUP_DOC   = NO
 SUBGROUPING            = YES
 #---------------------------------------------------------------------------
 # Build related configuration options
@@ -76,9 +78,11 @@ WARN_IF_DOC_ERROR      = YES
 WARN_NO_PARAMDOC       = NO
 WARN_FORMAT            = "$file:$line: $text"
 WARN_LOGFILE           = 
+
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
+INPUT_ENCODING         = UTF-8
 FILE_PATTERNS          = *.c \
                          *.cc \
                          *.cxx \
@@ -120,7 +124,8 @@ FILE_PATTERNS          = *.c \
 RECURSIVE              = YES
 EXCLUDE                = 
 EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = */.\#*
+EXCLUDE_PATTERNS       = */.\#* */.svn/*
+EXCLUDE_SYMBOLS        = 
 EXAMPLE_PATH           = 
 EXAMPLE_PATTERNS       = *
 EXAMPLE_RECURSIVE      = NO
@@ -136,11 +141,13 @@ INLINE_SOURCES         = NO
 STRIP_CODE_COMMENTS    = YES
 REFERENCED_BY_RELATION = YES
 REFERENCES_RELATION    = YES
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS              = NO
 VERBATIM_HEADERS       = YES
 #---------------------------------------------------------------------------
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = NO
+ALPHABETICAL_INDEX     = YES
 COLS_IN_ALPHA_INDEX    = 5
 IGNORE_PREFIX          = 
 #---------------------------------------------------------------------------
@@ -220,12 +227,13 @@ ENABLE_PREPROCESSING   = YES
 MACRO_EXPANSION        = YES
 EXPAND_ONLY_PREDEF     = YES
 SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = $(DOXYGEN_SRC_INCLUDE_PATH) .
+INCLUDE_PATH           = $(DOXYGEN_SRC_INCLUDE_PATH) \
+                         .
 INCLUDE_FILE_PATTERNS  = *.h
-PREDEFINED             = "_KERNEL" \
-			 "__FreeBSD__=7" \
-			 "__${TARGET_ARCH}__=1" \
-			 "__${TARGET_ARCH}=1"
+PREDEFINED             = _KERNEL \
+                         __FreeBSD__=8 \
+                         __${TARGET_ARCH}__=1 \
+                         __${TARGET_ARCH}=1
 EXPAND_AS_DEFINED      = 
 SKIP_FUNCTION_MACROS   = YES
 #---------------------------------------------------------------------------
@@ -238,6 +246,7 @@ PERL_PATH              = /usr/bin/perl
 # Configuration options related to the dot tool   
 #---------------------------------------------------------------------------
 CLASS_DIAGRAMS         = NO
+MSCGEN_PATH            = 
 HIDE_UNDOC_RELATIONS   = YES
 HAVE_DOT               = YES
 CLASS_GRAPH            = YES
@@ -248,14 +257,13 @@ TEMPLATE_RELATIONS     = NO
 INCLUDE_GRAPH          = YES
 INCLUDED_BY_GRAPH      = YES
 CALL_GRAPH             = YES
+CALLER_GRAPH           = YES
 GRAPHICAL_HIERARCHY    = YES
 DIRECTORY_GRAPH        = YES
 DOT_IMAGE_FORMAT       = png
 DOT_PATH               = 
 DOTFILE_DIRS           = 
-MAX_DOT_GRAPH_WIDTH    = 1024
-MAX_DOT_GRAPH_HEIGHT   = 1024
-MAX_DOT_GRAPH_DEPTH    = 1000
+DOT_GRAPH_MAX_NODES    = 50
 DOT_TRANSPARENT        = NO
 DOT_MULTI_TARGETS      = YES
 GENERATE_LEGEND        = YES

From owner-svn-src-stable@FreeBSD.ORG  Thu Nov  5 13:54:36 2009
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 24BDA106566C;
	Thu,  5 Nov 2009 13:54:36 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 13AED8FC1D;
	Thu,  5 Nov 2009 13:54:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA5DsZmv079637;
	Thu, 5 Nov 2009 13:54:35 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5DsZpb079635;
	Thu, 5 Nov 2009 13:54:35 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <200911051354.nA5DsZpb079635@svn.freebsd.org>
From: Ed Maste 
Date: Thu, 5 Nov 2009 13:54:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198949 - stable/8/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: Thu, 05 Nov 2009 13:54:36 -0000

Author: emaste
Date: Thu Nov  5 13:54:35 2009
New Revision: 198949
URL: http://svn.freebsd.org/changeset/base/198949

Log:
  MFC r198518:
  
    Add link for callout_schedule(9).

Modified:
  stable/8/share/man/man9/Makefile
Directory Properties:
  stable/8/share/man/man9/   (props changed)

Modified: stable/8/share/man/man9/Makefile
==============================================================================
--- stable/8/share/man/man9/Makefile	Thu Nov  5 10:01:15 2009	(r198948)
+++ stable/8/share/man/man9/Makefile	Thu Nov  5 13:54:35 2009	(r198949)
@@ -1215,6 +1215,7 @@ MLINKS+=timeout.9 callout.9 \
 	timeout.9 callout_init_rw.9 \
 	timeout.9 callout_pending.9 \
 	timeout.9 callout_reset.9 \
+	timeout.9 callout_schedule.9 \
 	timeout.9 callout_stop.9 \
 	timeout.9 untimeout.9
 MLINKS+=ucred.9 crcopy.9 \

From owner-svn-src-stable@FreeBSD.ORG  Thu Nov  5 18:25:27 2009
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 2F1111065672;
	Thu,  5 Nov 2009 18:25:27 +0000 (UTC)
	(envelope-from mjacob@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1CD458FC1B;
	Thu,  5 Nov 2009 18:25:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA5IPRYu086886;
	Thu, 5 Nov 2009 18:25:27 GMT (envelope-from mjacob@svn.freebsd.org)
Received: (from mjacob@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5IPQjv086884;
	Thu, 5 Nov 2009 18:25:27 GMT (envelope-from mjacob@svn.freebsd.org)
Message-Id: <200911051825.nA5IPQjv086884@svn.freebsd.org>
From: Matt Jacob 
Date: Thu, 5 Nov 2009 18:25:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198959 - stable/8/sys/dev/isp
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Nov 2009 18:25:27 -0000

Author: mjacob
Date: Thu Nov  5 18:25:26 2009
New Revision: 198959
URL: http://svn.freebsd.org/changeset/base/198959

Log:
  Unbreak SBus cards which have been broken (apparently) for a while.
  Most of the pieces came from Marius- correct settings for channels
  and resource management. The one piece missing was that you cannot
  for SBus cards replace 32 bit operations with A64 operations- not
  supported. This is an MFC of r198822.

Modified:
  stable/8/sys/dev/isp/isp_sbus.c

Modified: stable/8/sys/dev/isp/isp_sbus.c
==============================================================================
--- stable/8/sys/dev/isp/isp_sbus.c	Thu Nov  5 18:15:47 2009	(r198958)
+++ stable/8/sys/dev/isp/isp_sbus.c	Thu Nov  5 18:25:26 2009	(r198959)
@@ -193,6 +193,8 @@ isp_sbus_attach(device_t dev)
 	isp->isp_param = &sbs->sbus_param;
 	isp->isp_osinfo.pc.ptr = &sbs->sbus_spi;
 	isp->isp_revision = 0;	/* XXX */
+	isp->isp_dev = dev;
+	isp->isp_nchan = 1;
 	ISP_SET_PC(isp, 0, role, role);
 
 	/*
@@ -316,18 +318,16 @@ isp_sbus_attach(device_t dev)
 		goto bad;
 	}
 	isp_init(isp);
-	if (role != ISP_ROLE_NONE && isp->isp_state != ISP_INITSTATE) {
-		isp_uninit(isp);
-		ISP_UNLOCK(isp);
-		goto bad;
+	if (isp->isp_state == ISP_INITSTATE) {
+		isp->isp_state = ISP_RUNSTATE;
 	}
-	isp_attach(isp);
-	if (role != ISP_ROLE_NONE && isp->isp_state != ISP_RUNSTATE) {
+	ISP_UNLOCK(isp);
+	if (isp_attach(isp)) {
+		ISP_LOCK(isp);
 		isp_uninit(isp);
 		ISP_UNLOCK(isp);
 		goto bad;
 	}
-	ISP_UNLOCK(isp);
 	return (0);
 
 bad:
@@ -345,13 +345,10 @@ bad:
 	}
 
 	if (regs) {
-		(void) bus_release_resource(dev, 0, 0, regs);
+		(void) bus_release_resource(dev, SYS_RES_MEMORY, 0, regs);
 	}
 
 	if (sbs) {
-		if (sbs->sbus_isp.isp_param) {
-			free(sbs->sbus_isp.isp_param, M_DEVBUF);
-		}
 		free(sbs, M_DEVBUF);
 	}
 	return (ENXIO);
@@ -584,13 +581,6 @@ dma2(void *arg, bus_dma_segment_t *dm_se
 	isp = mp->isp;
 	rq = mp->rq;
 	if (nseg) {
-		if (sizeof (bus_addr_t) > 4) {
-			if (rq->req_header.rqs_entry_type == RQSTYPE_T2RQS) {
-				rq->req_header.rqs_entry_type = RQSTYPE_T3RQS;
-			} else if (rq->req_header.rqs_entry_type == RQSTYPE_REQUEST) {
-				rq->req_header.rqs_entry_type = RQSTYPE_A64;
-			}
-		}
 		if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
 			bus_dmamap_sync(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap, BUS_DMASYNC_PREREAD);
 			ddir = ISP_FROM_DEVICE;

From owner-svn-src-stable@FreeBSD.ORG  Thu Nov  5 18:34:02 2009
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 14BEE1065672;
	Thu,  5 Nov 2009 18:34:02 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 027258FC16;
	Thu,  5 Nov 2009 18:34:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA5IY1me087154;
	Thu, 5 Nov 2009 18:34:01 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5IY1wr087151;
	Thu, 5 Nov 2009 18:34:01 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <200911051834.nA5IY1wr087151@svn.freebsd.org>
From: Ed Maste 
Date: Thu, 5 Nov 2009 18:34:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198960 - stable/8/sys/dev/aac
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Nov 2009 18:34:02 -0000

Author: emaste
Date: Thu Nov  5 18:34:01 2009
New Revision: 198960
URL: http://svn.freebsd.org/changeset/base/198960

Log:
  MFC r198525:
  
    Whitespace fixup: 8 spaces -> tab

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

Modified: stable/8/sys/dev/aac/aac.c
==============================================================================
--- stable/8/sys/dev/aac/aac.c	Thu Nov  5 18:25:26 2009	(r198959)
+++ stable/8/sys/dev/aac/aac.c	Thu Nov  5 18:34:01 2009	(r198960)
@@ -229,7 +229,7 @@ static int		aac_query_disk(struct aac_so
 static int		aac_get_pci_info(struct aac_softc *sc, caddr_t uptr);
 static int		aac_supported_features(struct aac_softc *sc, caddr_t uptr);
 static void		aac_ioctl_event(struct aac_softc *sc,
-				        struct aac_event *event, void *arg);
+					struct aac_event *event, void *arg);
 static struct aac_mntinforesp *
 	aac_get_container_info(struct aac_softc *sc, struct aac_fib *fib, int cid);
 
@@ -3618,7 +3618,7 @@ aac_query_disk(struct aac_softc *sc, cad
 		query_disk.Lun = 0;
 		query_disk.UnMapped = 0;
 		sprintf(&query_disk.diskDeviceName[0], "%s%d",
-		        disk->ad_disk->d_name, disk->ad_disk->d_unit);
+			disk->ad_disk->d_name, disk->ad_disk->d_unit);
 	}
 	mtx_unlock(&sc->aac_container_lock);
 

Modified: stable/8/sys/dev/aac/aac_cam.c
==============================================================================
--- stable/8/sys/dev/aac/aac_cam.c	Thu Nov  5 18:25:26 2009	(r198959)
+++ stable/8/sys/dev/aac/aac_cam.c	Thu Nov  5 18:34:01 2009	(r198960)
@@ -272,10 +272,10 @@ aac_cam_action(struct cam_sim *sim, unio
 		strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN);
 		strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
 		cpi->unit_number = cam_sim_unit(sim);
-                cpi->transport = XPORT_SPI;
-                cpi->transport_version = 2;
-                cpi->protocol = PROTO_SCSI;
-                cpi->protocol_version = SCSI_REV_2;
+		cpi->transport = XPORT_SPI;
+		cpi->transport_version = 2;
+		cpi->protocol = PROTO_SCSI;
+		cpi->protocol_version = SCSI_REV_2;
 		ccb->ccb_h.status = CAM_REQ_CMP;
 		xpt_done(ccb);
 		return;

From owner-svn-src-stable@FreeBSD.ORG  Thu Nov  5 18:38:12 2009
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 D5FCD1065672;
	Thu,  5 Nov 2009 18:38:12 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AA6318FC18;
	Thu,  5 Nov 2009 18:38:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA5IcCWi087304;
	Thu, 5 Nov 2009 18:38:12 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA5IcCVD087301;
	Thu, 5 Nov 2009 18:38:12 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <200911051838.nA5IcCVD087301@svn.freebsd.org>
From: Ed Maste 
Date: Thu, 5 Nov 2009 18:38:12 +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: r198961 - stable/7/sys/dev/aac
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Nov 2009 18:38:13 -0000

Author: emaste
Date: Thu Nov  5 18:38:12 2009
New Revision: 198961
URL: http://svn.freebsd.org/changeset/base/198961

Log:
  MFC r198525:
  
    Whitespace fixup: 8 spaces -> tab

Modified:
  stable/7/sys/dev/aac/aac.c
  stable/7/sys/dev/aac/aac_cam.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/aac/aac.c
==============================================================================
--- stable/7/sys/dev/aac/aac.c	Thu Nov  5 18:34:01 2009	(r198960)
+++ stable/7/sys/dev/aac/aac.c	Thu Nov  5 18:38:12 2009	(r198961)
@@ -229,7 +229,7 @@ static int		aac_query_disk(struct aac_so
 static int		aac_get_pci_info(struct aac_softc *sc, caddr_t uptr);
 static int		aac_supported_features(struct aac_softc *sc, caddr_t uptr);
 static void		aac_ioctl_event(struct aac_softc *sc,
-				        struct aac_event *event, void *arg);
+					struct aac_event *event, void *arg);
 static struct aac_mntinforesp *
 	aac_get_container_info(struct aac_softc *sc, struct aac_fib *fib, int cid);
 
@@ -3618,7 +3618,7 @@ aac_query_disk(struct aac_softc *sc, cad
 		query_disk.Lun = 0;
 		query_disk.UnMapped = 0;
 		sprintf(&query_disk.diskDeviceName[0], "%s%d",
-		        disk->ad_disk->d_name, disk->ad_disk->d_unit);
+			disk->ad_disk->d_name, disk->ad_disk->d_unit);
 	}
 	mtx_unlock(&sc->aac_container_lock);
 

Modified: stable/7/sys/dev/aac/aac_cam.c
==============================================================================
--- stable/7/sys/dev/aac/aac_cam.c	Thu Nov  5 18:34:01 2009	(r198960)
+++ stable/7/sys/dev/aac/aac_cam.c	Thu Nov  5 18:38:12 2009	(r198961)
@@ -272,10 +272,10 @@ aac_cam_action(struct cam_sim *sim, unio
 		strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN);
 		strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
 		cpi->unit_number = cam_sim_unit(sim);
-                cpi->transport = XPORT_SPI;
-                cpi->transport_version = 2;
-                cpi->protocol = PROTO_SCSI;
-                cpi->protocol_version = SCSI_REV_2;
+		cpi->transport = XPORT_SPI;
+		cpi->transport_version = 2;
+		cpi->protocol = PROTO_SCSI;
+		cpi->protocol_version = SCSI_REV_2;
 		ccb->ccb_h.status = CAM_REQ_CMP;
 		xpt_done(ccb);
 		return;

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 06:50:46 2009
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 823BA106566C;
	Fri,  6 Nov 2009 06:50:46 +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 6EF148FC16;
	Fri,  6 Nov 2009 06:50:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA66okoe005782;
	Fri, 6 Nov 2009 06:50:46 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA66okSP005779;
	Fri, 6 Nov 2009 06:50:46 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911060650.nA66okSP005779@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 6 Nov 2009 06:50:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198969 - stable/8/sys/dev/aic7xxx
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, 06 Nov 2009 06:50:46 -0000

Author: brueffer
Date: Fri Nov  6 06:50:45 2009
New Revision: 198969
URL: http://svn.freebsd.org/changeset/base/198969

Log:
  MFC: r198684
  
  Add support for Adaptec 39320LPE adapters.

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

Modified: stable/8/sys/dev/aic7xxx/aic79xx_pci.c
==============================================================================
--- stable/8/sys/dev/aic7xxx/aic79xx_pci.c	Fri Nov  6 06:09:04 2009	(r198968)
+++ stable/8/sys/dev/aic7xxx/aic79xx_pci.c	Fri Nov  6 06:50:45 2009	(r198969)
@@ -89,6 +89,7 @@ ahd_compose_id(u_int device, u_int vendo
 #define ID_AHA_39320D_B			0x801C900500419005ull
 #define ID_AHA_39320D_HP		0x8011900500AC0E11ull
 #define ID_AHA_39320D_B_HP		0x801C900500AC0E11ull
+#define ID_AHA_39320LPE 		0x8017900500459005ull
 #define ID_AIC7902_PCI_REV_A4		0x3
 #define ID_AIC7902_PCI_REV_B0		0x10
 #define SUBID_HP			0x0E11
@@ -204,6 +205,12 @@ struct ahd_pci_identity ahd_pci_ident_ta
 		"Adaptec (HP OEM) 39320D Ultra320 SCSI adapter",
 		ahd_aic7902_setup
 	},
+	{
+		ID_AHA_39320LPE,
+		ID_ALL_MASK,
+		"Adaptec 39320LPE Ultra320 SCSI adapter",
+		ahd_aic7902_setup
+	},
 	/* Generic chip probes for devices we don't know 'exactly' */
 	{
 		ID_AIC7901 & ID_9005_GENERIC_MASK,

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 06:57:04 2009
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 17C35106566C;
	Fri,  6 Nov 2009 06:57:04 +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 062438FC16;
	Fri,  6 Nov 2009 06:57:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA66v3mQ006001;
	Fri, 6 Nov 2009 06:57:03 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA66v3D2005999;
	Fri, 6 Nov 2009 06:57:03 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911060657.nA66v3D2005999@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 6 Nov 2009 06:57:03 +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: r198971 - stable/7/sys/dev/aic7xxx
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, 06 Nov 2009 06:57:04 -0000

Author: brueffer
Date: Fri Nov  6 06:57:03 2009
New Revision: 198971
URL: http://svn.freebsd.org/changeset/base/198971

Log:
  MFC: r198684
  
  Add support for Adaptec 39320LPE adapters.

Modified:
  stable/7/sys/dev/aic7xxx/aic79xx_pci.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/aic7xxx/aic79xx_pci.c
==============================================================================
--- stable/7/sys/dev/aic7xxx/aic79xx_pci.c	Fri Nov  6 06:50:45 2009	(r198970)
+++ stable/7/sys/dev/aic7xxx/aic79xx_pci.c	Fri Nov  6 06:57:03 2009	(r198971)
@@ -89,6 +89,7 @@ ahd_compose_id(u_int device, u_int vendo
 #define ID_AHA_39320D_B			0x801C900500419005ull
 #define ID_AHA_39320D_HP		0x8011900500AC0E11ull
 #define ID_AHA_39320D_B_HP		0x801C900500AC0E11ull
+#define ID_AHA_39320LPE 		0x8017900500459005ull
 #define ID_AIC7902_PCI_REV_A4		0x3
 #define ID_AIC7902_PCI_REV_B0		0x10
 #define SUBID_HP			0x0E11
@@ -204,6 +205,12 @@ struct ahd_pci_identity ahd_pci_ident_ta
 		"Adaptec (HP OEM) 39320D Ultra320 SCSI adapter",
 		ahd_aic7902_setup
 	},
+	{
+		ID_AHA_39320LPE,
+		ID_ALL_MASK,
+		"Adaptec 39320LPE Ultra320 SCSI adapter",
+		ahd_aic7902_setup
+	},
 	/* Generic chip probes for devices we don't know 'exactly' */
 	{
 		ID_AIC7901 & ID_9005_GENERIC_MASK,

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 07:02:16 2009
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 9E30A106568F;
	Fri,  6 Nov 2009 07:02:16 +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 8C5008FC17;
	Fri,  6 Nov 2009 07:02:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA672G7Z006192;
	Fri, 6 Nov 2009 07:02:16 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA672GFe006190;
	Fri, 6 Nov 2009 07:02:16 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911060702.nA672GFe006190@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 6 Nov 2009 07:02:16 +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: r198972 - stable/6/sys/dev/aic7xxx
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, 06 Nov 2009 07:02:16 -0000

Author: brueffer
Date: Fri Nov  6 07:02:16 2009
New Revision: 198972
URL: http://svn.freebsd.org/changeset/base/198972

Log:
  MFC: r198684
  
  Add support for Adaptec 39320LPE adapters.

Modified:
  stable/6/sys/dev/aic7xxx/aic79xx_pci.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/conf/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/dev/aic7xxx/aic79xx_pci.c
==============================================================================
--- stable/6/sys/dev/aic7xxx/aic79xx_pci.c	Fri Nov  6 06:57:03 2009	(r198971)
+++ stable/6/sys/dev/aic7xxx/aic79xx_pci.c	Fri Nov  6 07:02:16 2009	(r198972)
@@ -89,6 +89,7 @@ ahd_compose_id(u_int device, u_int vendo
 #define ID_AHA_39320D_B			0x801C900500419005ull
 #define ID_AHA_39320D_HP		0x8011900500AC0E11ull
 #define ID_AHA_39320D_B_HP		0x801C900500AC0E11ull
+#define ID_AHA_39320LPE 		0x8017900500459005ull
 #define ID_AIC7902_PCI_REV_A4		0x3
 #define ID_AIC7902_PCI_REV_B0		0x10
 #define SUBID_HP			0x0E11
@@ -204,6 +205,12 @@ struct ahd_pci_identity ahd_pci_ident_ta
 		"Adaptec (HP OEM) 39320D Ultra320 SCSI adapter",
 		ahd_aic7902_setup
 	},
+	{
+		ID_AHA_39320LPE,
+		ID_ALL_MASK,
+		"Adaptec 39320LPE Ultra320 SCSI adapter",
+		ahd_aic7902_setup
+	},
 	/* Generic chip probes for devices we don't know 'exactly' */
 	{
 		ID_AIC7901 & ID_9005_GENERIC_MASK,

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 08:08:48 2009
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 7F6C5106566B;
	Fri,  6 Nov 2009 08:08:48 +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 6DB228FC21;
	Fri,  6 Nov 2009 08:08:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA688mSP007840;
	Fri, 6 Nov 2009 08:08:48 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA688mq5007838;
	Fri, 6 Nov 2009 08:08:48 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <200911060808.nA688mq5007838@svn.freebsd.org>
From: Christian Brueffer 
Date: Fri, 6 Nov 2009 08:08:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198974 - stable/8/share/man/man5
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, 06 Nov 2009 08:08:48 -0000

Author: brueffer
Date: Fri Nov  6 08:08:47 2009
New Revision: 198974
URL: http://svn.freebsd.org/changeset/base/198974

Log:
  MFC: r198543
  
  Fix date (1) and SEE ALSO section.

Modified:
  stable/8/share/man/man5/regdomain.5
Directory Properties:
  stable/8/share/man/man5/   (props changed)

Modified: stable/8/share/man/man5/regdomain.5
==============================================================================
--- stable/8/share/man/man5/regdomain.5	Fri Nov  6 07:17:31 2009	(r198973)
+++ stable/8/share/man/man5/regdomain.5	Fri Nov  6 08:08:47 2009	(r198974)
@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd Apri 13, 2008
+.Dd April 13, 2008
 .Dt REGDOMAIN 5
 .Os
 .Sh NAME
@@ -44,5 +44,5 @@ This file should be changed only to refl
 XML database of 802.11 regulatory constraints
 .El
 .Sh SEE ALSO
-.Xr wlan 4
-.Xr ifconfig 8 ,
+.Xr wlan 4 ,
+.Xr ifconfig 8

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 09:39:35 2009
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 93123106568F;
	Fri,  6 Nov 2009 09:39:35 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 816BB8FC1C;
	Fri,  6 Nov 2009 09:39:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA69dZxr010233;
	Fri, 6 Nov 2009 09:39:35 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA69dZeV010231;
	Fri, 6 Nov 2009 09:39:35 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <200911060939.nA69dZeV010231@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Fri, 6 Nov 2009 09:39:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198975 - stable/8/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Nov 2009 09:39:35 -0000

Author: trasz
Date: Fri Nov  6 09:39:35 2009
New Revision: 198975
URL: http://svn.freebsd.org/changeset/base/198975

Log:
  MFC r197789:
  
  Fix ACL support on sparc64.  Turns out that fuword(9) fetches 64 bits
  instead of sizeof(int), and on sparc64 that resulted in fetching wrong
  value for acl_maxcnt, which in turn caused __acl_get_link(2) to fail
  with EINVAL.
  
  PR:		sparc64/139304
  Submitted by:	Dmitry Afanasiev 

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

Modified: stable/8/sys/kern/vfs_acl.c
==============================================================================
--- stable/8/sys/kern/vfs_acl.c	Fri Nov  6 08:08:47 2009	(r198974)
+++ stable/8/sys/kern/vfs_acl.c	Fri Nov  6 09:39:35 2009	(r198975)
@@ -161,7 +161,7 @@ acl_copyout(struct acl *kernel_acl, void
 		break;
 
 	default:
-		if (fuword((char *)user_acl +
+		if (fuword32((char *)user_acl +
 		    offsetof(struct acl, acl_maxcnt)) != ACL_MAX_ENTRIES)
 			return (EINVAL);
 

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 10:15:16 2009
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 189BE106566B;
	Fri,  6 Nov 2009 10:15:16 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D81188FC15;
	Fri,  6 Nov 2009 10:15:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6AFFYh012875;
	Fri, 6 Nov 2009 10:15:15 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6AFFMK012872;
	Fri, 6 Nov 2009 10:15:15 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <200911061015.nA6AFFMK012872@svn.freebsd.org>
From: Attilio Rao 
Date: Fri, 6 Nov 2009 10:15:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198977 - in stable/8/sys: amd64/amd64 i386/i386
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, 06 Nov 2009 10:15:16 -0000

Author: attilio
Date: Fri Nov  6 10:15:15 2009
New Revision: 198977
URL: http://svn.freebsd.org/changeset/base/198977

Log:
  MFC r198868, r198950:
  Opteron rev E family of processor expose a bug where acq memory barriers
  can be broken, resulting in random breakages.
  Printout a warning message if affecred family and model are found.

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

Modified: stable/8/sys/amd64/amd64/identcpu.c
==============================================================================
--- stable/8/sys/amd64/amd64/identcpu.c	Fri Nov  6 10:07:38 2009	(r198976)
+++ stable/8/sys/amd64/amd64/identcpu.c	Fri Nov  6 10:15:15 2009	(r198977)
@@ -607,6 +607,21 @@ print_AMD_info(void)
 		printf(", %d lines/tag", (regs[2] >> 8) & 0x0f);
 		print_AMD_l2_assoc((regs[2] >> 12) & 0x0f);	
 	}
+
+	/*
+	 * Opteron Rev E shows a bug as in very rare occasions a read memory 
+	 * barrier is not performed as expected if it is followed by a 
+	 * non-atomic read-modify-write instruction.  
+	 * As long as that bug pops up very rarely (intensive machine usage
+	 * on other operating systems generally generates one unexplainable 
+	 * crash any 2 months) and as long as a model specific fix would be
+	 * impratical at this stage, print out a warning string if the broken
+	 * model and family are identified.
+	 */
+	if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 &&
+	    CPUID_TO_MODEL(cpu_id) <= 0x3f)
+		printf("WARNING: This architecture revision has known SMP "
+		    "hardware bugs which may cause random instability\n");
 }
 
 static void

Modified: stable/8/sys/i386/i386/identcpu.c
==============================================================================
--- stable/8/sys/i386/i386/identcpu.c	Fri Nov  6 10:07:38 2009	(r198976)
+++ stable/8/sys/i386/i386/identcpu.c	Fri Nov  6 10:15:15 2009	(r198977)
@@ -1303,6 +1303,21 @@ print_AMD_info(void)
 			    (amd_whcr & 0x0100) ? "Enable" : "Disable");
 		}
 	}
+
+	/*
+	 * Opteron Rev E shows a bug as in very rare occasions a read memory
+	 * barrier is not performed as expected if it is followed by a
+	 * non-atomic read-modify-write instruction.
+	 * As long as that bug pops up very rarely (intensive machine usage
+	 * on other operating systems generally generates one unexplainable
+	 * crash any 2 months) and as long as a model specific fix would be
+	 * impratical at this stage, print out a warning string if the broken
+	 * model and family are identified.
+	 */
+	if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 &&
+	    CPUID_TO_MODEL(cpu_id) <= 0x3f)
+		printf("WARNING: This architecture revision has known SMP "
+		    "hardware bugs which may cause random instability\n");
 }
 
 static void

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 10:38:33 2009
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 C7F68106566B;
	Fri,  6 Nov 2009 10:38:33 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9C73D8FC13;
	Fri,  6 Nov 2009 10:38:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6AcXYq013648;
	Fri, 6 Nov 2009 10:38:33 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6AcXgU013645;
	Fri, 6 Nov 2009 10:38:33 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <200911061038.nA6AcXgU013645@svn.freebsd.org>
From: Attilio Rao 
Date: Fri, 6 Nov 2009 10:38:33 +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: r198979 - in stable/7/sys: amd64/amd64 i386/i386
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, 06 Nov 2009 10:38:33 -0000

Author: attilio
Date: Fri Nov  6 10:38:33 2009
New Revision: 198979
URL: http://svn.freebsd.org/changeset/base/198979

Log:
  MFC r198868, r198950:
  Opteron rev E family of processor expose a bug where acq memory barriers
  can be broken, resulting in random breakages.
  Printout a warning message if affected family and model are found.

Modified:
  stable/7/sys/amd64/amd64/identcpu.c
  stable/7/sys/i386/i386/identcpu.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/amd64/identcpu.c
==============================================================================
--- stable/7/sys/amd64/amd64/identcpu.c	Fri Nov  6 10:17:08 2009	(r198978)
+++ stable/7/sys/amd64/amd64/identcpu.c	Fri Nov  6 10:38:33 2009	(r198979)
@@ -627,6 +627,21 @@ print_AMD_info(void)
 		printf(", %d lines/tag", (regs[2] >> 8) & 0x0f);
 		print_AMD_l2_assoc((regs[2] >> 12) & 0x0f);	
 	}
+
+	/*
+	 * Opteron Rev E shows a bug as in very rare occasions a read memory 
+	 * barrier is not performed as expected if it is followed by a 
+	 * non-atomic read-modify-write instruction.  
+	 * As long as that bug pops up very rarely (intensive machine usage
+	 * on other operating systems generally generates one unexplainable 
+	 * crash any 2 months) and as long as a model specific fix would be
+	 * impratical at this stage, print out a warning string if the broken
+	 * model and family are identified.
+	 */
+	if (AMD64_CPU_FAMILY(cpu_id) == 0xf &&
+	    AMD64_CPU_MODEL(cpu_id) >= 0x20 && AMD64_CPU_MODEL(cpu_id) <= 0x3f)
+		printf("WARNING: This architecture revision has known SMP "
+		    "hardware bugs which may cause random instability\n");
 }
 
 static void

Modified: stable/7/sys/i386/i386/identcpu.c
==============================================================================
--- stable/7/sys/i386/i386/identcpu.c	Fri Nov  6 10:17:08 2009	(r198978)
+++ stable/7/sys/i386/i386/identcpu.c	Fri Nov  6 10:38:33 2009	(r198979)
@@ -1320,6 +1320,21 @@ print_AMD_info(void)
 			    (amd_whcr & 0x0100) ? "Enable" : "Disable");
 		}
 	}
+
+	/*
+	 * Opteron Rev E shows a bug as in very rare occasions a read memory
+	 * barrier is not performed as expected if it is followed by a
+	 * non-atomic read-modify-write instruction.
+	 * As long as that bug pops up very rarely (intensive machine usage
+	 * on other operating systems generally generates one unexplainable
+	 * crash any 2 months) and as long as a model specific fix would be
+	 * impratical at this stage, print out a warning string if the broken
+	 * model and family are identified.
+	 */
+	if (I386_CPU_FAMILY(cpu_id) == 0xf && I386_CPU_MODEL(cpu_id) >= 0x20 &&
+	    I386_CPU_MODEL(cpu_id) <= 0x3f)
+		printf("WARNING: This architecture revision has known SMP "
+		    "hardware bugs which may cause random instability\n");
 }
 
 static void

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 10:45:38 2009
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 CBD4B106566C;
	Fri,  6 Nov 2009 10:45:38 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B99948FC08;
	Fri,  6 Nov 2009 10:45:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6AjbgQ013890;
	Fri, 6 Nov 2009 10:45:37 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Ajbvr013888;
	Fri, 6 Nov 2009 10:45:37 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911061045.nA6Ajbvr013888@svn.freebsd.org>
From: Alexander Motin 
Date: Fri, 6 Nov 2009 10:45:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198980 - stable/8/sys/dev/ata/chipsets
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Nov 2009 10:45:38 -0000

Author: mav
Date: Fri Nov  6 10:45:37 2009
New Revision: 198980
URL: http://svn.freebsd.org/changeset/base/198980

Log:
  MFC r197783:
  - Revert r191568 partially.  Forcing AHCI mode by changing device subclass
  and progif is evil.  It doesn't work reliably[1] and we should honor BIOS
  configuration by the user.
  - If the SATA controller is enbled but combined mode is disabled, mask off
  the emulated IDE channel on the legacy IDE controller.
  
  Pointed out by:	mav[1]

Modified:
  stable/8/sys/dev/ata/chipsets/ata-ati.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ata/chipsets/ata-ati.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-ati.c	Fri Nov  6 10:38:33 2009	(r198979)
+++ stable/8/sys/dev/ata/chipsets/ata-ati.c	Fri Nov  6 10:45:37 2009	(r198980)
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -55,9 +54,6 @@ __FBSDID("$FreeBSD$");
 /* local prototypes */
 static int ata_ati_chipinit(device_t dev);
 static void ata_ati_setmode(device_t dev, int mode);
-static void ata_ati_ahci_enable(device_t dev);
-static int ata_ati_ahci_chipinit(device_t dev);
-static int ata_ati_ahci_resume(device_t dev);
 
 /* misc defines */
 #define ATI_PATA	0x01
@@ -66,13 +62,6 @@ static int ata_ati_ahci_resume(device_t 
 #define SII_MEMIO       1
 #define SII_BUG         0x04
 
-/* Misc Control Register */
-#define	ATI_PCI_MISC_CTRL		0x40
-#define	ATI_PCI_MISCCTRL_ENABLE_WR	0x00000001
-
-/* Watchdog Control/Status Register */
-#define	ATI_PCI_WD_CTRL			0x44
-#define	ATI_PCI_WDCTRL_ENABLE		0x0001
 
 /*
  * ATI chipset support functions
@@ -121,19 +110,7 @@ ata_ati_probe(device_t dev)
 	ctlr->chipinit = ata_sii_chipinit;
 	break;
     case ATI_AHCI:
-	/*
-	 * Force AHCI mode if IDE mode is set from BIOS.
-	 */
-	if ((ctlr->chip->chipid == ATA_ATI_IXP600_S1 ||
-	    ctlr->chip->chipid == ATA_ATI_IXP700_S1) &&
-	    pci_get_subclass(dev) == PCIS_STORAGE_IDE) {
-	    struct pci_devinfo *dinfo = device_get_ivars(dev);
-	    pcicfgregs *cfg = &dinfo->cfg;
-	    cfg->subclass = PCIS_STORAGE_SATA;
-	    cfg->progif = PCIP_STORAGE_SATA_AHCI_1_0;
-	    ata_ati_ahci_enable(dev);
-	}
-	ctlr->chipinit = ata_ati_ahci_chipinit;
+	ctlr->chipinit = ata_ahci_chipinit;
 	break;
     }
     return (BUS_PROBE_DEFAULT);
@@ -143,13 +120,41 @@ static int
 ata_ati_chipinit(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
+    device_t smbdev;
+    int satacfg;
 
     if (ata_setup_interrupt(dev, ata_generic_intr))
 	return ENXIO;
 
-    /* IXP600 only has 1 PATA channel */
-    if (ctlr->chip->chipid == ATA_ATI_IXP600)
+    switch (ctlr->chip->chipid) {
+    case ATA_ATI_IXP600:
+	/* IXP600 only has 1 PATA channel */
 	ctlr->channels = 1;
+	break;
+    case ATA_ATI_IXP700:
+	/*
+	 * When "combined mode" is enabled, an additional PATA channel is
+	 * emulated with two SATA ports and appears on this device.
+	 * This mode can only be detected via SMB controller.
+	 */
+	smbdev = pci_find_device(ATA_ATI_ID, 0x4385);
+	if (smbdev != NULL) {
+	    satacfg = pci_read_config(smbdev, 0xad, 1);
+	    if (bootverbose)
+		device_printf(dev, "SATA controller %s (%s%s channel)\n",
+		    (satacfg & 0x01) == 0 ? "disabled" : "enabled",
+		    (satacfg & 0x08) == 0 ? "" : "combined mode, ",
+		    (satacfg & 0x10) == 0 ? "primary" : "secondary");
+
+	    /*
+	     * If SATA controller is enabled but combined mode is disabled,
+	     * we have only one PATA channel.  Ignore a non-existent channel.
+	     */
+	    if ((satacfg & 0x09) == 0x01)
+		ctlr->ichannels &= ~(1 << ((satacfg & 0x10) >> 4));
+	}
+	break;
+    }
 
     ctlr->setmode = ata_ati_setmode;
     return 0;
@@ -219,43 +224,6 @@ ata_ati_setmode(device_t dev, int mode)
     }
 }
 
-static void
-ata_ati_ahci_enable(device_t dev)
-{
-    struct pci_devinfo *dinfo = device_get_ivars(dev);
-    pcicfgregs *cfg = &dinfo->cfg;
-    uint32_t ctrl;
-
-    ctrl = pci_read_config(dev, ATI_PCI_MISC_CTRL, 4);
-    pci_write_config(dev, ATI_PCI_MISC_CTRL,
-	ctrl | ATI_PCI_MISCCTRL_ENABLE_WR, 4);
-    pci_write_config(dev, PCIR_SUBCLASS, cfg->subclass, 1);
-    pci_write_config(dev, PCIR_PROGIF, cfg->progif, 1);
-    pci_write_config(dev, ATI_PCI_WD_CTRL,
-	pci_read_config(dev, ATI_PCI_WD_CTRL, 2) | ATI_PCI_WDCTRL_ENABLE, 2);
-    pci_write_config(dev, ATI_PCI_MISC_CTRL,
-	ctrl & ~ATI_PCI_MISCCTRL_ENABLE_WR, 4);
-}
-
-static int
-ata_ati_ahci_chipinit(device_t dev)
-{
-    struct ata_pci_controller *ctlr = device_get_softc(dev);
-    int error;
-
-    error = ata_ahci_chipinit(dev);
-    ctlr->resume = ata_ati_ahci_resume;
-    return (error);
-}
-
-static int
-ata_ati_ahci_resume(device_t dev)
-{
-
-    ata_ati_ahci_enable(dev);
-    return (ata_ahci_ctlr_reset(dev));
-}
-
 ATA_DECLARE_DRIVER(ata_ati);
 MODULE_DEPEND(ata_ati, ata_ahci, 1, 1, 1);
 MODULE_DEPEND(ata_ati, ata_sii, 1, 1, 1);

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 10:48:45 2009
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 47C0F106566B;
	Fri,  6 Nov 2009 10:48:45 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 361938FC12;
	Fri,  6 Nov 2009 10:48:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6AmjVI014022;
	Fri, 6 Nov 2009 10:48:45 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6AmjMo014017;
	Fri, 6 Nov 2009 10:48:45 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911061048.nA6AmjMo014017@svn.freebsd.org>
From: Alexander Motin 
Date: Fri, 6 Nov 2009 10:48:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198981 - stable/8/sys/dev/ata
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, 06 Nov 2009 10:48:45 -0000

Author: mav
Date: Fri Nov  6 10:48:44 2009
New Revision: 198981
URL: http://svn.freebsd.org/changeset/base/198981

Log:
  MFC r198407:
  Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.

Modified:
  stable/8/sys/dev/ata/ata-queue.c
  stable/8/sys/dev/ata/atapi-cd.c
  stable/8/sys/dev/ata/atapi-fd.c
  stable/8/sys/dev/ata/atapi-tape.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ata/ata-queue.c
==============================================================================
--- stable/8/sys/dev/ata/ata-queue.c	Fri Nov  6 10:45:37 2009	(r198980)
+++ stable/8/sys/dev/ata/ata-queue.c	Fri Nov  6 10:48:44 2009	(r198981)
@@ -150,15 +150,11 @@ ata_atapicmd(device_t dev, u_int8_t *ccb
 	     int count, int flags, int timeout)
 {
     struct ata_request *request = ata_alloc_request();
-    struct ata_device *atadev = device_get_softc(dev);
     int error = ENOMEM;
 
     if (request) {
 	request->dev = dev;
-	if ((atadev->param.config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12)
-	    bcopy(ccb, request->u.atapi.ccb, 12);
-	else
-	    bcopy(ccb, request->u.atapi.ccb, 16);
+	bcopy(ccb, request->u.atapi.ccb, 16);
 	request->data = data;
 	request->bytecount = count;
 	request->transfersize = min(request->bytecount, 65534);

Modified: stable/8/sys/dev/ata/atapi-cd.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-cd.c	Fri Nov  6 10:45:37 2009	(r198980)
+++ stable/8/sys/dev/ata/atapi-cd.c	Fri Nov  6 10:48:44 2009	(r198981)
@@ -863,9 +863,7 @@ acd_strategy(struct bio *bp)
     }
     request->dev = dev;
     request->bio = bp;
-    bcopy(ccb, request->u.atapi.ccb,
-	  (atadev->param.config & ATA_PROTO_MASK) == 
-	  ATA_PROTO_ATAPI_12 ? 16 : 12);
+    bcopy(ccb, request->u.atapi.ccb, 16);
     request->data = bp->bio_data;
     request->bytecount = count * blocksize;
     request->transfersize = min(request->bytecount, 65534);

Modified: stable/8/sys/dev/ata/atapi-fd.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-fd.c	Fri Nov  6 10:45:37 2009	(r198980)
+++ stable/8/sys/dev/ata/atapi-fd.c	Fri Nov  6 10:48:44 2009	(r198981)
@@ -240,9 +240,7 @@ afd_strategy(struct bio *bp)
     }
     request->dev = dev;
     request->bio = bp;
-    bcopy(ccb, request->u.atapi.ccb,
-	  (atadev->param.config & ATA_PROTO_MASK) == 
-	  ATA_PROTO_ATAPI_12 ? 16 : 12);
+    bcopy(ccb, request->u.atapi.ccb, 16);
     request->data = bp->bio_data;
     request->bytecount = count * fdp->sectorsize;
     request->transfersize = min(request->bytecount, 65534);

Modified: stable/8/sys/dev/ata/atapi-tape.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-tape.c	Fri Nov  6 10:45:37 2009	(r198980)
+++ stable/8/sys/dev/ata/atapi-tape.c	Fri Nov  6 10:48:44 2009	(r198981)
@@ -373,7 +373,6 @@ static void 
 ast_strategy(struct bio *bp)
 {
     device_t dev = bp->bio_dev->si_drv1;
-    struct ata_device *atadev = device_get_softc(dev);
     struct ast_softc *stp = device_get_ivars(dev);
     struct ata_request *request;
     u_int32_t blkcount;
@@ -426,9 +425,7 @@ ast_strategy(struct bio *bp)
     }
     request->dev = dev;
     request->driver = bp;
-    bcopy(ccb, request->u.atapi.ccb,
-	  (atadev->param.config & ATA_PROTO_MASK) == 
-	  ATA_PROTO_ATAPI_12 ? 16 : 12);
+    bcopy(ccb, request->u.atapi.ccb, 16);
     request->data = bp->bio_data;
     request->bytecount = blkcount * stp->blksize;
     request->transfersize = min(request->bytecount, 65534);

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 10:56:44 2009
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 505E6106566C;
	Fri,  6 Nov 2009 10:56:44 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3DC578FC14;
	Fri,  6 Nov 2009 10:56:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6AuhLx014279;
	Fri, 6 Nov 2009 10:56:43 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Auh5d014275;
	Fri, 6 Nov 2009 10:56:43 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200911061056.nA6Auh5d014275@svn.freebsd.org>
From: Alexander Motin 
Date: Fri, 6 Nov 2009 10:56:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198982 - in stable/8/sys/dev/ata: . chipsets
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Nov 2009 10:56:44 -0000

Author: mav
Date: Fri Nov  6 10:56:43 2009
New Revision: 198982
URL: http://svn.freebsd.org/changeset/base/198982

Log:
  MFC r198700:
  Add support for different request block format used by Gen-IIe Marvell SATA.
  This adds support for Marvell 6042/7042 chips and Adaptec 1430SA controller.
  
  MFC r198718:
  Allow newly added controllers to use full I/O sizes.

Modified:
  stable/8/sys/dev/ata/ata-pci.h
  stable/8/sys/dev/ata/chipsets/ata-adaptec.c
  stable/8/sys/dev/ata/chipsets/ata-marvell.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.h	Fri Nov  6 10:48:44 2009	(r198981)
+++ stable/8/sys/dev/ata/ata-pci.h	Fri Nov  6 10:56:43 2009	(r198982)
@@ -97,6 +97,7 @@ struct ata_pci_controller {
 
 #define ATA_ADAPTEC_ID          0x9005
 #define ATA_ADAPTEC_1420        0x02419005
+#define ATA_ADAPTEC_1430        0x02439005
 
 #define ATA_ATI_ID              0x1002
 #define ATA_ATI_IXP200          0x43491002
@@ -216,7 +217,9 @@ struct ata_pci_controller {
 #define ATA_M88SX5080           0x508011ab
 #define ATA_M88SX5081           0x508111ab
 #define ATA_M88SX6041           0x604111ab
+#define ATA_M88SX6042           0x604211ab
 #define ATA_M88SX6081           0x608111ab
+#define ATA_M88SX7042           0x704211ab
 #define ATA_M88SX6101           0x610111ab
 #define ATA_M88SX6121           0x612111ab
 #define ATA_M88SX6145           0x614511ab

Modified: stable/8/sys/dev/ata/chipsets/ata-adaptec.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-adaptec.c	Fri Nov  6 10:48:44 2009	(r198981)
+++ stable/8/sys/dev/ata/chipsets/ata-adaptec.c	Fri Nov  6 10:56:43 2009	(r198982)
@@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
 
 /* misc defines */
 #define MV_60XX		60		//must match ata_marvell.c's definition
+#define MV_7042		72		//must match ata_marvell.c's definition
 
 
 /*
@@ -64,6 +65,7 @@ ata_adaptec_probe(device_t dev)
     struct ata_pci_controller *ctlr = device_get_softc(dev);
     static struct ata_chip_id ids[] =
     {{ ATA_ADAPTEC_1420, 0, 4, MV_60XX, ATA_SA300, "1420SA" },
+     { ATA_ADAPTEC_1430, 0, 4, MV_7042, ATA_SA300, "1430SA" },
      { 0, 0, 0, 0, 0, 0}};
 
     if (pci_get_vendor(dev) != ATA_ADAPTEC_ID)

Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-marvell.c	Fri Nov  6 10:48:44 2009	(r198981)
+++ stable/8/sys/dev/ata/chipsets/ata-marvell.c	Fri Nov  6 10:56:43 2009	(r198982)
@@ -67,6 +67,8 @@ static void ata_marvell_edma_dmainit(dev
 /* misc defines */
 #define MV_50XX		50
 #define MV_60XX		60
+#define MV_6042		62
+#define MV_7042		72
 #define MV_61XX		61
 
 
@@ -102,7 +104,9 @@ ata_marvell_probe(device_t dev)
      { ATA_M88SX5080, 0, 8, MV_50XX, ATA_SA150, "88SX5080" },
      { ATA_M88SX5081, 0, 8, MV_50XX, ATA_SA150, "88SX5081" },
      { ATA_M88SX6041, 0, 4, MV_60XX, ATA_SA300, "88SX6041" },
+     { ATA_M88SX6042, 0, 4, MV_6042, ATA_SA300, "88SX6042" },
      { ATA_M88SX6081, 0, 8, MV_60XX, ATA_SA300, "88SX6081" },
+     { ATA_M88SX7042, 0, 4, MV_7042, ATA_SA300, "88SX7042" },
      { ATA_M88SX6101, 0, 1, MV_61XX, ATA_UDMA6, "88SX6101" },
      { ATA_M88SX6121, 0, 1, MV_61XX, ATA_UDMA6, "88SX6121" },
      { ATA_M88SX6145, 0, 2, MV_61XX, ATA_UDMA6, "88SX6145" },
@@ -119,6 +123,8 @@ ata_marvell_probe(device_t dev)
     switch (ctlr->chip->cfg2) {
     case MV_50XX:
     case MV_60XX:
+    case MV_6042:
+    case MV_7042:
 	ctlr->chipinit = ata_marvell_edma_chipinit;
 	break;
     case MV_61XX:
@@ -251,6 +257,8 @@ ata_marvell_edma_ch_attach(device_t dev)
 	ch->r_io[ATA_SCONTROL].offset = 0x00108 + ATA_MV_HOST_BASE(ch);
 	break;
     case MV_60XX:
+    case MV_6042:
+    case MV_7042:
 	ch->r_io[ATA_SSTATUS].res = ctlr->r_res1;
 	ch->r_io[ATA_SSTATUS].offset =  0x02300 + ATA_MV_EDMA_BASE(ch);
 	ch->r_io[ATA_SERROR].res = ctlr->r_res1;
@@ -384,35 +392,61 @@ ata_marvell_edma_begin_transaction(struc
 	request->dma->sg_bus & 0xffffffff);
     le32enc(bytep + 1 * sizeof(u_int32_t),
 	(u_int64_t)request->dma->sg_bus >> 32);
-    le16enc(bytep + 4 * sizeof(u_int16_t),
-	(request->flags & ATA_R_READ ? 0x01 : 0x00) | (request->tag << 1));
-
-    i = 10;
-    bytep[i++] = (request->u.ata.count >> 8) & 0xff;
-    bytep[i++] = 0x10 | ATA_COUNT;
-    bytep[i++] = request->u.ata.count & 0xff;
-    bytep[i++] = 0x10 | ATA_COUNT;
-
-    bytep[i++] = (request->u.ata.lba >> 24) & 0xff;
-    bytep[i++] = 0x10 | ATA_SECTOR;
-    bytep[i++] = request->u.ata.lba & 0xff;
-    bytep[i++] = 0x10 | ATA_SECTOR;
-
-    bytep[i++] = (request->u.ata.lba >> 32) & 0xff;
-    bytep[i++] = 0x10 | ATA_CYL_LSB;
-    bytep[i++] = (request->u.ata.lba >> 8) & 0xff;
-    bytep[i++] = 0x10 | ATA_CYL_LSB;
-
-    bytep[i++] = (request->u.ata.lba >> 40) & 0xff;
-    bytep[i++] = 0x10 | ATA_CYL_MSB;
-    bytep[i++] = (request->u.ata.lba >> 16) & 0xff;
-    bytep[i++] = 0x10 | ATA_CYL_MSB;
-
-    bytep[i++] = ATA_D_LBA | ATA_D_IBM | ((request->u.ata.lba >> 24) & 0xf);
-    bytep[i++] = 0x10 | ATA_DRIVE;
-
-    bytep[i++] = request->u.ata.command;
-    bytep[i++] = 0x90 | ATA_COMMAND;
+    if (ctlr->chip->cfg2 != MV_6042 && ctlr->chip->cfg2 != MV_7042) {
+	    le16enc(bytep + 4 * sizeof(u_int16_t),
+		(request->flags & ATA_R_READ ? 0x01 : 0x00) | (request->tag << 1));
+
+	    i = 10;
+	    bytep[i++] = (request->u.ata.count >> 8) & 0xff;
+	    bytep[i++] = 0x10 | ATA_COUNT;
+	    bytep[i++] = request->u.ata.count & 0xff;
+	    bytep[i++] = 0x10 | ATA_COUNT;
+
+	    bytep[i++] = (request->u.ata.lba >> 24) & 0xff;
+	    bytep[i++] = 0x10 | ATA_SECTOR;
+	    bytep[i++] = request->u.ata.lba & 0xff;
+	    bytep[i++] = 0x10 | ATA_SECTOR;
+
+	    bytep[i++] = (request->u.ata.lba >> 32) & 0xff;
+	    bytep[i++] = 0x10 | ATA_CYL_LSB;
+	    bytep[i++] = (request->u.ata.lba >> 8) & 0xff;
+	    bytep[i++] = 0x10 | ATA_CYL_LSB;
+
+	    bytep[i++] = (request->u.ata.lba >> 40) & 0xff;
+	    bytep[i++] = 0x10 | ATA_CYL_MSB;
+	    bytep[i++] = (request->u.ata.lba >> 16) & 0xff;
+	    bytep[i++] = 0x10 | ATA_CYL_MSB;
+
+	    bytep[i++] = ATA_D_LBA | ATA_D_IBM | ((request->u.ata.lba >> 24) & 0xf);
+	    bytep[i++] = 0x10 | ATA_DRIVE;
+
+	    bytep[i++] = request->u.ata.command;
+	    bytep[i++] = 0x90 | ATA_COMMAND;
+    } else {
+	    le32enc(bytep + 2 * sizeof(u_int32_t),
+		(request->flags & ATA_R_READ ? 0x01 : 0x00) | (request->tag << 1));
+
+	    i = 16;
+	    bytep[i++] = 0;
+	    bytep[i++] = 0;
+	    bytep[i++] = request->u.ata.command;
+	    bytep[i++] = request->u.ata.feature & 0xff;
+
+	    bytep[i++] = request->u.ata.lba & 0xff;
+	    bytep[i++] = (request->u.ata.lba >> 8) & 0xff;
+	    bytep[i++] = (request->u.ata.lba >> 16) & 0xff;
+	    bytep[i++] = ATA_D_LBA | ATA_D_IBM | ((request->u.ata.lba >> 24) & 0x0f);
+
+	    bytep[i++] = (request->u.ata.lba >> 24) & 0xff;
+	    bytep[i++] = (request->u.ata.lba >> 32) & 0xff;
+	    bytep[i++] = (request->u.ata.lba >> 40) & 0xff;
+	    bytep[i++] = (request->u.ata.feature >> 8) & 0xff;
+
+	    bytep[i++] = request->u.ata.count & 0xff;
+	    bytep[i++] = (request->u.ata.count >> 8) & 0xff;
+	    bytep[i++] = 0;
+	    bytep[i++] = 0;
+    }
 
     bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map,
 	BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
@@ -557,7 +591,10 @@ ata_marvell_edma_dmainit(device_t dev)
 	ch->dma.max_address = BUS_SPACE_MAXADDR;
 
     /* chip does not reliably do 64K DMA transfers */
-    ch->dma.max_iosize = 64 * DEV_BSIZE; 
+    if (ctlr->chip->cfg2 == MV_50XX || ctlr->chip->cfg2 == MV_60XX)
+	ch->dma.max_iosize = 64 * DEV_BSIZE;
+    else
+	ch->dma.max_iosize = (ATA_DMA_ENTRIES - 1) * PAGE_SIZE;
 }
 
 ATA_DECLARE_DRIVER(ata_marvell);

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 15:00:02 2009
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 7AD9A106566C;
	Fri,  6 Nov 2009 15:00:02 +0000 (UTC)
	(envelope-from artis.caune@gmail.com)
Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com
	[209.85.220.227])
	by mx1.freebsd.org (Postfix) with ESMTP id 611CA8FC18;
	Fri,  6 Nov 2009 15:00:01 +0000 (UTC)
Received: by fxm27 with SMTP id 27so256413fxm.3
	for ; Fri, 06 Nov 2009 07:00:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=ULk6Pr5EaXslJg7qqYg1iphzcy6S/WTx4MXwyrtMhUk=;
	b=BgiwZjnNEm8Aubi+vHRahZZmoDdi4MsPRUNmhdXrOGYJVpXPVb/XoyQKHPo63o0uYJ
	qUM/pNEuEqy8JKvtFBvDn+jo/GJ4qJp5iGLiLUSWAcs49cjNNwESR2k/AgNCLoVBZEn5
	gpAqZ9hgzLdAIbAg98CZB7Sv0tCRS0hqW7v3g=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=wc5Cqqeqvt64Xn3f5m7ChNpbsC/dHCocdvlBjRvJDD1MEG5RjLvtujh+m1ZnByWzpb
	sl1c/UPs0svprPgoiuByQQX11RFM2NCggU8uyW5tA+BBThUvjvi9pvD5lBdt0iRPOCo4
	tXkOMyquOGzGGYwE8Rfa/7ydmghTcgQJgtd7w=
MIME-Version: 1.0
Received: by 10.204.3.19 with SMTP id 19mr4633230bkl.151.1257519600273; Fri, 
	06 Nov 2009 07:00:00 -0800 (PST)
In-Reply-To: <200911061015.nA6AFFMK012872@svn.freebsd.org>
References: <200911061015.nA6AFFMK012872@svn.freebsd.org>
Date: Fri, 6 Nov 2009 17:00:00 +0200
Message-ID: <9e20d71e0911060700m26365f0eqafc418af097c83a8@mail.gmail.com>
From: Artis Caune 
To: Attilio Rao 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r198977 - in stable/8/sys: amd64/amd64 i386/i386
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, 06 Nov 2009 15:00:02 -0000

2009/11/6 Attilio Rao :
> Author: attilio
> Date: Fri Nov =C2=A06 10:15:15 2009
> New Revision: 198977
> URL: http://svn.freebsd.org/changeset/base/198977
>
> Log:
> =C2=A0MFC r198868, r198950:
> =C2=A0Opteron rev E family of processor expose a bug where acq memory bar=
riers
> =C2=A0can be broken, resulting in random breakages.
> =C2=A0Printout a warning message if affecred family and model are found.

Hi,

I can not compile kernel anymore:

cc1: warnings being treated as errors
/usr/src/sys/amd64/amd64/identcpu.c: In function 'print_AMD_info':
/usr/src/sys/amd64/amd64/identcpu.c:621: warning: implicit declaration
of function 'CPUID_TO_FAMILY'
/usr/src/sys/amd64/amd64/identcpu.c:621: warning: nested extern
declaration of 'CPUID_TO_FAMILY'
/usr/src/sys/amd64/amd64/identcpu.c:621: warning: implicit declaration
of function 'CPUID_TO_MODEL'
/usr/src/sys/amd64/amd64/identcpu.c:621: warning: nested extern
declaration of 'CPUID_TO_MODEL'
*** Error code 1





--=20
Artis Caune

    Everything should be made as simple as possible, but not simpler.

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 15:24:49 2009
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 26B41106566B;
	Fri,  6 Nov 2009 15:24:49 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1333A8FC13;
	Fri,  6 Nov 2009 15:24:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6FOm6n021062;
	Fri, 6 Nov 2009 15:24:48 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6FOmAJ021052;
	Fri, 6 Nov 2009 15:24:48 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <200911061524.nA6FOmAJ021052@svn.freebsd.org>
From: Attilio Rao 
Date: Fri, 6 Nov 2009 15:24:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r198989 - in stable/8/sys: amd64/amd64 amd64/include
	i386/cpufreq i386/i386 i386/include
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Nov 2009 15:24:49 -0000

Author: attilio
Date: Fri Nov  6 15:24:48 2009
New Revision: 198989
URL: http://svn.freebsd.org/changeset/base/198989

Log:
  MFC r197070:
  Consolidate CPUID to CPU family/model macros for amd64 and i386 to reduce
  unnecessary #ifdef's for shared code between them.
  
  This MFC should unbreak the kernel build breakage introduced by
  r198977.
  
  Reported by:	kib
  Pointy hat to:	me

Modified:
  stable/8/sys/amd64/amd64/identcpu.c
  stable/8/sys/amd64/amd64/initcpu.c
  stable/8/sys/amd64/amd64/msi.c
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/cpufreq/hwpstate.c
  stable/8/sys/i386/i386/identcpu.c
  stable/8/sys/i386/i386/msi.c
  stable/8/sys/i386/i386/pmap.c
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/amd64/identcpu.c
==============================================================================
--- stable/8/sys/amd64/amd64/identcpu.c	Fri Nov  6 14:55:01 2009	(r198988)
+++ stable/8/sys/amd64/amd64/identcpu.c	Fri Nov  6 15:24:48 2009	(r198989)
@@ -371,21 +371,21 @@ printcpuinfo(void)
 			switch (cpu_vendor_id) {
 			case CPU_VENDOR_AMD:
 				if ((amd_pminfo & AMDPM_TSC_INVARIANT) ||
-				    AMD64_CPU_FAMILY(cpu_id) >= 0x10 ||
+				    CPUID_TO_FAMILY(cpu_id) >= 0x10 ||
 				    cpu_id == 0x60fb2)
 					tsc_is_invariant = 1;
 				break;
 			case CPU_VENDOR_INTEL:
 				if ((amd_pminfo & AMDPM_TSC_INVARIANT) ||
-				    (AMD64_CPU_FAMILY(cpu_id) == 0x6 &&
-				    AMD64_CPU_MODEL(cpu_id) >= 0xe) ||
-				    (AMD64_CPU_FAMILY(cpu_id) == 0xf &&
-				    AMD64_CPU_MODEL(cpu_id) >= 0x3))
+				    (CPUID_TO_FAMILY(cpu_id) == 0x6 &&
+				    CPUID_TO_MODEL(cpu_id) >= 0xe) ||
+				    (CPUID_TO_FAMILY(cpu_id) == 0xf &&
+				    CPUID_TO_MODEL(cpu_id) >= 0x3))
 					tsc_is_invariant = 1;
 				break;
 			case CPU_VENDOR_CENTAUR:
-				if (AMD64_CPU_FAMILY(cpu_id) == 0x6 &&
-				    AMD64_CPU_MODEL(cpu_id) >= 0xf &&
+				if (CPUID_TO_FAMILY(cpu_id) == 0x6 &&
+				    CPUID_TO_MODEL(cpu_id) >= 0xf &&
 				    (rdmsr(0x1203) & 0x100000000ULL) == 0)
 					tsc_is_invariant = 1;
 				break;

Modified: stable/8/sys/amd64/amd64/initcpu.c
==============================================================================
--- stable/8/sys/amd64/amd64/initcpu.c	Fri Nov  6 14:55:01 2009	(r198988)
+++ stable/8/sys/amd64/amd64/initcpu.c	Fri Nov  6 15:24:48 2009	(r198989)
@@ -154,8 +154,8 @@ initializecpu(void)
 		pg_nx = PG_NX;
 	}
 	if (cpu_vendor_id == CPU_VENDOR_CENTAUR &&
-	    AMD64_CPU_FAMILY(cpu_id) == 0x6 &&
-	    AMD64_CPU_MODEL(cpu_id) >= 0xf)
+	    CPUID_TO_FAMILY(cpu_id) == 0x6 &&
+	    CPUID_TO_MODEL(cpu_id) >= 0xf)
 		init_via();
 
 	/*

Modified: stable/8/sys/amd64/amd64/msi.c
==============================================================================
--- stable/8/sys/amd64/amd64/msi.c	Fri Nov  6 14:55:01 2009	(r198988)
+++ stable/8/sys/amd64/amd64/msi.c	Fri Nov  6 15:24:48 2009	(r198989)
@@ -275,8 +275,8 @@ msi_init(void)
 	case CPU_VENDOR_AMD:
 		break;
 	case CPU_VENDOR_CENTAUR:
-		if (AMD64_CPU_FAMILY(cpu_id) == 0x6 &&
-		    AMD64_CPU_MODEL(cpu_id) >= 0xf)
+		if (CPUID_TO_FAMILY(cpu_id) == 0x6 &&
+		    CPUID_TO_MODEL(cpu_id) >= 0xf)
 			break;
 		/* FALLTHROUGH */
 	default:

Modified: stable/8/sys/amd64/include/specialreg.h
==============================================================================
--- stable/8/sys/amd64/include/specialreg.h	Fri Nov  6 14:55:01 2009	(r198988)
+++ stable/8/sys/amd64/include/specialreg.h	Fri Nov  6 15:24:48 2009	(r198989)
@@ -168,10 +168,10 @@
 #define	CPUID_FAMILY		0x00000f00
 #define	CPUID_EXT_MODEL		0x000f0000
 #define	CPUID_EXT_FAMILY	0x0ff00000
-#define	AMD64_CPU_MODEL(id) \
+#define	CPUID_TO_MODEL(id) \
     ((((id) & CPUID_MODEL) >> 4) | \
     (((id) & CPUID_EXT_MODEL) >> 12))
-#define	AMD64_CPU_FAMILY(id) \
+#define	CPUID_TO_FAMILY(id) \
     ((((id) & CPUID_FAMILY) >> 8) + \
     (((id) & CPUID_EXT_FAMILY) >> 20))
 

Modified: stable/8/sys/i386/cpufreq/hwpstate.c
==============================================================================
--- stable/8/sys/i386/cpufreq/hwpstate.c	Fri Nov  6 14:55:01 2009	(r198988)
+++ stable/8/sys/i386/cpufreq/hwpstate.c	Fri Nov  6 15:24:48 2009	(r198989)
@@ -83,12 +83,6 @@ __FBSDID("$FreeBSD$");
 #define	AMD_10H_11H_CUR_DID(msr)		(((msr) >> 6) & 0x07)
 #define	AMD_10H_11H_CUR_FID(msr)		((msr) & 0x3F)
 
-#if defined(__amd64__)
-#define CPU_FAMILY(id)	AMD64_CPU_FAMILY(id)
-#elif defined(__i386__)
-#define CPU_FAMILY(id)	I386_CPU_FAMILY(id)
-#endif
-
 #define	HWPSTATE_DEBUG(dev, msg...)			\
 	do{						\
 		if(hwpstate_verbose)			\
@@ -302,7 +296,7 @@ hwpstate_identify(driver_t *driver, devi
 	if (device_find_child(parent, "hwpstate", -1) != NULL)
 		return;
 
-	if (cpu_vendor_id != CPU_VENDOR_AMD || CPU_FAMILY(cpu_id) < 0x10)
+	if (cpu_vendor_id != CPU_VENDOR_AMD || CPUID_TO_FAMILY(cpu_id) < 0x10)
 		return;
 
 	/*
@@ -405,7 +399,7 @@ hwpstate_get_info_from_msr(device_t dev)
 	uint64_t msr;
 	int family, i, fid, did;
 
-	family = CPU_FAMILY(cpu_id);
+	family = CPUID_TO_FAMILY(cpu_id);
 	sc = device_get_softc(dev);
 	/* Get pstate count */
 	msr = rdmsr(MSR_AMD_10H_11H_LIMIT);

Modified: stable/8/sys/i386/i386/identcpu.c
==============================================================================
--- stable/8/sys/i386/i386/identcpu.c	Fri Nov  6 14:55:01 2009	(r198988)
+++ stable/8/sys/i386/i386/identcpu.c	Fri Nov  6 15:24:48 2009	(r198989)
@@ -858,21 +858,21 @@ printcpuinfo(void)
 			switch (cpu_vendor_id) {
 			case CPU_VENDOR_AMD:
 				if ((amd_pminfo & AMDPM_TSC_INVARIANT) ||
-				    I386_CPU_FAMILY(cpu_id) >= 0x10 ||
+				    CPUID_TO_FAMILY(cpu_id) >= 0x10 ||
 				    cpu_id == 0x60fb2)
 					tsc_is_invariant = 1;
 				break;
 			case CPU_VENDOR_INTEL:
 				if ((amd_pminfo & AMDPM_TSC_INVARIANT) ||
-				    (I386_CPU_FAMILY(cpu_id) == 0x6 &&
-				    I386_CPU_MODEL(cpu_id) >= 0xe) ||
-				    (I386_CPU_FAMILY(cpu_id) == 0xf &&
-				    I386_CPU_MODEL(cpu_id) >= 0x3))
+				    (CPUID_TO_FAMILY(cpu_id) == 0x6 &&
+				    CPUID_TO_MODEL(cpu_id) >= 0xe) ||
+				    (CPUID_TO_FAMILY(cpu_id) == 0xf &&
+				    CPUID_TO_MODEL(cpu_id) >= 0x3))
 					tsc_is_invariant = 1;
 				break;
 			case CPU_VENDOR_CENTAUR:
-				if (I386_CPU_FAMILY(cpu_id) == 0x6 &&
-				    I386_CPU_MODEL(cpu_id) >= 0xf &&
+				if (CPUID_TO_FAMILY(cpu_id) == 0x6 &&
+				    CPUID_TO_MODEL(cpu_id) >= 0xf &&
 				    (rdmsr(0x1203) & 0x100000000ULL) == 0)
 					tsc_is_invariant = 1;
 				break;
@@ -1106,8 +1106,8 @@ finishidentcpu(void)
 	 * XXX This is only done on the BSP package.
 	 */
 	if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_high > 0 && cpu_high < 4 &&
-	    ((I386_CPU_FAMILY(cpu_id) == 0xf && I386_CPU_MODEL(cpu_id) >= 0x3) ||
-	    (I386_CPU_FAMILY(cpu_id) == 0x6 && I386_CPU_MODEL(cpu_id) >= 0xe))) {
+	    ((CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x3) ||
+	    (CPUID_TO_FAMILY(cpu_id) == 0x6 && CPUID_TO_MODEL(cpu_id) >= 0xe))) {
 		uint64_t msr;
 		msr = rdmsr(MSR_IA32_MISC_ENABLE);
 		if ((msr & 0x400000ULL) != 0) {

Modified: stable/8/sys/i386/i386/msi.c
==============================================================================
--- stable/8/sys/i386/i386/msi.c	Fri Nov  6 14:55:01 2009	(r198988)
+++ stable/8/sys/i386/i386/msi.c	Fri Nov  6 15:24:48 2009	(r198989)
@@ -275,8 +275,8 @@ msi_init(void)
 	case CPU_VENDOR_AMD:
 		break;
 	case CPU_VENDOR_CENTAUR:
-		if (I386_CPU_FAMILY(cpu_id) == 0x6 &&
-		    I386_CPU_MODEL(cpu_id) >= 0xf)
+		if (CPUID_TO_FAMILY(cpu_id) == 0x6 &&
+		    CPUID_TO_MODEL(cpu_id) >= 0xf)
 			break;
 		/* FALLTHROUGH */
 	default:

Modified: stable/8/sys/i386/i386/pmap.c
==============================================================================
--- stable/8/sys/i386/i386/pmap.c	Fri Nov  6 14:55:01 2009	(r198988)
+++ stable/8/sys/i386/i386/pmap.c	Fri Nov  6 15:24:48 2009	(r198989)
@@ -484,7 +484,7 @@ pmap_init_pat(void)
 		return;
 
 	if (cpu_vendor_id != CPU_VENDOR_INTEL ||
-	    (I386_CPU_FAMILY(cpu_id) == 6 && I386_CPU_MODEL(cpu_id) >= 0xe)) {
+	    (CPUID_TO_FAMILY(cpu_id) == 6 && CPUID_TO_MODEL(cpu_id) >= 0xe)) {
 		/*
 		 * Leave the indices 0-3 at the default of WB, WT, UC, and UC-.
 		 * Program 4 and 5 as WP and WC.

Modified: stable/8/sys/i386/include/specialreg.h
==============================================================================
--- stable/8/sys/i386/include/specialreg.h	Fri Nov  6 14:55:01 2009	(r198988)
+++ stable/8/sys/i386/include/specialreg.h	Fri Nov  6 15:24:48 2009	(r198989)
@@ -165,11 +165,11 @@
 #define	CPUID_FAMILY		0x00000f00
 #define	CPUID_EXT_MODEL		0x000f0000
 #define	CPUID_EXT_FAMILY	0x0ff00000
-#define	I386_CPU_MODEL(id) \
+#define	CPUID_TO_MODEL(id) \
     ((((id) & CPUID_MODEL) >> 4) | \
     ((((id) & CPUID_FAMILY) >= 0x600) ? \
     (((id) & CPUID_EXT_MODEL) >> 12) : 0))
-#define	I386_CPU_FAMILY(id) \
+#define	CPUID_TO_FAMILY(id) \
     ((((id) & CPUID_FAMILY) >> 8) + \
     ((((id) & CPUID_FAMILY) == 0xf00) ? \
     (((id) & CPUID_EXT_FAMILY) >> 20) : 0))

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 15:25:37 2009
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 F16BC106568D;
	Fri,  6 Nov 2009 15:25:37 +0000 (UTC)
	(envelope-from asmrookie@gmail.com)
Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com
	[209.85.220.227])
	by mx1.freebsd.org (Postfix) with ESMTP id 12C358FC1A;
	Fri,  6 Nov 2009 15:25:36 +0000 (UTC)
Received: by fxm27 with SMTP id 27so265639fxm.3
	for ; Fri, 06 Nov 2009 07:25:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=7lfVhf0pi9Xw0T2WLj2OCLWk1mHmvRXUYu+jz2V8Ues=;
	b=qTsvsL443CKzD5Fye8NNUakUxWUJrhJppTGIIAAnRt269gSqk7cevVCuZa2a2O8ZVi
	5h0WENQFqE26GJ6rMKyJUyGDCKkoCSUU3hSIwk3YqvtxrNwNXfP4N4guazUKRHBjlpRi
	5Ont5jAVq8/H0PCQpC42Ei9owF7OFapWiwGAY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=noMSM+k0kGl09+zopdiRrc9k+rd2bpOxBiURXOJtt3JR/9sgRH0+fYQIu2SKfH/CLl
	y8Wi4qvjnISpv/oi11nJFXO4Em55hR+4Q67OfrmuKiFhTBSubYClCdQQnPgH625IyAh+
	hSf0IHzoSWHNxoyd9Oj31dY9qJkJftnLT1NOc=
MIME-Version: 1.0
Sender: asmrookie@gmail.com
Received: by 10.223.14.140 with SMTP id g12mr650812faa.50.1257521136050; Fri, 
	06 Nov 2009 07:25:36 -0800 (PST)
In-Reply-To: <9e20d71e0911060700m26365f0eqafc418af097c83a8@mail.gmail.com>
References: <200911061015.nA6AFFMK012872@svn.freebsd.org>
	<9e20d71e0911060700m26365f0eqafc418af097c83a8@mail.gmail.com>
Date: Fri, 6 Nov 2009 16:25:35 +0100
X-Google-Sender-Auth: 6c3b90fdba6a43c1
Message-ID: <3bbf2fe10911060725i5e444dbane2cbc059aa57fb87@mail.gmail.com>
From: Attilio Rao 
To: Artis Caune 
Content-Type: text/plain; charset=UTF-8
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r198977 - in stable/8/sys: amd64/amd64 i386/i386
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, 06 Nov 2009 15:25:38 -0000

2009/11/6 Artis Caune :
> 2009/11/6 Attilio Rao :
>> Author: attilio
>> Date: Fri Nov  6 10:15:15 2009
>> New Revision: 198977
>> URL: http://svn.freebsd.org/changeset/base/198977
>>
>> Log:
>>  MFC r198868, r198950:
>>  Opteron rev E family of processor expose a bug where acq memory barriers
>>  can be broken, resulting in random breakages.
>>  Printout a warning message if affecred family and model are found.
>
> Hi,
>
> I can not compile kernel anymore:

Fixed with r198989.
Sorry for the mis-service.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 17:11:58 2009
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 B9E17106568F;
	Fri,  6 Nov 2009 17:11:58 +0000 (UTC)
	(envelope-from ambrisko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A715A8FC14;
	Fri,  6 Nov 2009 17:11:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6HBwHR023274;
	Fri, 6 Nov 2009 17:11:58 GMT (envelope-from ambrisko@svn.freebsd.org)
Received: (from ambrisko@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6HBwJv023271;
	Fri, 6 Nov 2009 17:11:58 GMT (envelope-from ambrisko@svn.freebsd.org)
Message-Id: <200911061711.nA6HBwJv023271@svn.freebsd.org>
From: Doug Ambrisko 
Date: Fri, 6 Nov 2009 17:11:58 +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: r198992 - in stable/6/sys: amd64/amd64 i386/i386
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, 06 Nov 2009 17:11:58 -0000

Author: ambrisko
Date: Fri Nov  6 17:11:58 2009
New Revision: 198992
URL: http://svn.freebsd.org/changeset/base/198992

Log:
  MFC:  Adjust the way we number CPUs on x86 so that we attempt to "group" all
  logical CPUs in a package.
  
  Merged by:	Subra @ Cisco
  Reviewed by:	jhb

Modified:
  stable/6/sys/amd64/amd64/mp_machdep.c
  stable/6/sys/i386/i386/mp_machdep.c
Directory Properties:
  stable/6/sys/   (props changed)

Modified: stable/6/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- stable/6/sys/amd64/amd64/mp_machdep.c	Fri Nov  6 17:09:04 2009	(r198991)
+++ stable/6/sys/amd64/amd64/mp_machdep.c	Fri Nov  6 17:11:58 2009	(r198992)
@@ -341,7 +341,6 @@ cpu_mp_start(void)
 	} else
 		KASSERT(boot_cpu_id == PCPU_GET(apic_id),
 		    ("BSP's APIC ID doesn't match boot_cpu_id"));
-	cpu_apic_ids[0] = boot_cpu_id;
 
 	assign_cpu_ids();
 
@@ -405,20 +404,29 @@ cpu_mp_start(void)
 void
 cpu_mp_announce(void)
 {
-	int i, x;
+	int i;
 
-	/* List CPUs */
+	/* List active CPUs first. */
 	printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id);
-	for (i = 1, x = 0; x <= MAX_APIC_ID; x++) {
-		if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp)
+	for (i = 1; i < mp_ncpus; i++) {
+		if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread)
+			hyperthread = "/HT";
+		else
+			hyperthread = "";
+		printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread,
+		    cpu_apic_ids[i]);
+	}
+
+	/* List disabled CPUs last. */
+	for (i = 0; i <= MAX_APIC_ID; i++) {
+		if (!cpu_info[i].cpu_present || !cpu_info[i].cpu_disabled)
 			continue;
-		if (cpu_info[x].cpu_disabled)
-			printf("  cpu (AP): APIC ID: %2d (disabled)\n", x);
-		else {
-			KASSERT(i < mp_ncpus,
-			    ("mp_ncpus and actual cpus are out of whack"));
-			printf(" cpu%d (AP): APIC ID: %2d\n", i++, x);
-		}
+		if (cpu_info[i].cpu_hyperthread)
+			hyperthread = "/HT";
+		else
+			hyperthread = "";
+		printf("  cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread,
+		    i);
 	}
 }
 
@@ -646,11 +654,19 @@ assign_cpu_ids(void)
 
 	/*
 	 * Assign CPU IDs to local APIC IDs and disable any CPUs
-	 * beyond MAXCPU.  CPU 0 has already been assigned to the BSP,
-	 * so we only have to assign IDs for APs.
+	 * beyond MAXCPU.  CPU 0 is always assigned to the BSP.
+	 *
+	 * To minimize confusion for userland, we attempt to number
+	 * CPUs such that all threads and cores in a package are
+	 * grouped together.  For now we assume that the BSP is always
+	 * the first thread in a package and just start adding APs
+	 * starting with the BSP's APIC ID.
 	 */
 	mp_ncpus = 1;
-	for (i = 0; i <= MAX_APIC_ID; i++) {
+	cpu_apic_ids[0] = boot_cpu_id;
+	apic_cpuids[boot_cpu_id] = 0;
+	for (i = boot_cpu_id + 1; i != boot_cpu_id;
+	     i == MAX_APIC_ID ? i = 0 : i++) {
 		if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp ||
 		    cpu_info[i].cpu_disabled)
 			continue;

Modified: stable/6/sys/i386/i386/mp_machdep.c
==============================================================================
--- stable/6/sys/i386/i386/mp_machdep.c	Fri Nov  6 17:09:04 2009	(r198991)
+++ stable/6/sys/i386/i386/mp_machdep.c	Fri Nov  6 17:11:58 2009	(r198992)
@@ -417,7 +417,6 @@ cpu_mp_start(void)
 	} else
 		KASSERT(boot_cpu_id == PCPU_GET(apic_id),
 		    ("BSP's APIC ID doesn't match boot_cpu_id"));
-	cpu_apic_ids[0] = boot_cpu_id;
 
 	assign_cpu_ids();
 
@@ -481,22 +480,31 @@ cpu_mp_start(void)
 void
 cpu_mp_announce(void)
 {
-	int i, x;
+	int i;
 
 	POSTCODE(MP_ANNOUNCE_POST);
 
-	/* List CPUs */
+	/* List active CPUs first. */
 	printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id);
-	for (i = 1, x = 0; x <= MAX_APIC_ID; x++) {
-		if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp)
+	for (i = 1; i < mp_ncpus; i++) {
+		if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread)
+			hyperthread = "/HT";
+		else
+			hyperthread = "";
+		printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread,
+		    cpu_apic_ids[i]);
+	}
+
+	/* List disabled CPUs last. */
+	for (i = 0; i <= MAX_APIC_ID; i++) {
+		if (!cpu_info[i].cpu_present || !cpu_info[i].cpu_disabled)
 			continue;
-		if (cpu_info[x].cpu_disabled)
-			printf("  cpu (AP): APIC ID: %2d (disabled)\n", x);
-		else {
-			KASSERT(i < mp_ncpus,
-			    ("mp_ncpus and actual cpus are out of whack"));
-			printf(" cpu%d (AP): APIC ID: %2d\n", i++, x);
-		}
+		if (cpu_info[i].cpu_hyperthread)
+			hyperthread = "/HT";
+		else
+			hyperthread = "";
+		printf("  cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread,
+		    i);
 	}
 }
 
@@ -724,11 +732,19 @@ assign_cpu_ids(void)
 
 	/*
 	 * Assign CPU IDs to local APIC IDs and disable any CPUs
-	 * beyond MAXCPU.  CPU 0 has already been assigned to the BSP,
-	 * so we only have to assign IDs for APs.
+	 * beyond MAXCPU.  CPU 0 is always assigned to the BSP.
+	 *
+	 * To minimize confusion for userland, we attempt to number
+	 * CPUs such that all threads and cores in a package are
+	 * grouped together.  For now we assume that the BSP is always
+	 * the first thread in a package and just start adding APs
+	 * starting with the BSP's APIC ID.
 	 */
 	mp_ncpus = 1;
-	for (i = 0; i <= MAX_APIC_ID; i++) {
+	cpu_apic_ids[0] = boot_cpu_id;
+	apic_cpuids[boot_cpu_id] = 0;
+	for (i = boot_cpu_id + 1; i != boot_cpu_id;
+	     i == MAX_APIC_ID ? i = 0 : i++) {
 		if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp ||
 		    cpu_info[i].cpu_disabled)
 			continue;

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 17:58:44 2009
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 E2CD91065695;
	Fri,  6 Nov 2009 17:58:44 +0000 (UTC)
	(envelope-from ambrisko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CEFA38FC1D;
	Fri,  6 Nov 2009 17:58:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6HwikF024310;
	Fri, 6 Nov 2009 17:58:44 GMT (envelope-from ambrisko@svn.freebsd.org)
Received: (from ambrisko@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6Hwic2024307;
	Fri, 6 Nov 2009 17:58:44 GMT (envelope-from ambrisko@svn.freebsd.org)
Message-Id: <200911061758.nA6Hwic2024307@svn.freebsd.org>
From: Doug Ambrisko 
Date: Fri, 6 Nov 2009 17:58:44 +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: r198994 - in stable/6/sys/dev: bce mii
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, 06 Nov 2009 17:58:45 -0000

Author: ambrisko
Date: Fri Nov  6 17:58:44 2009
New Revision: 198994
URL: http://svn.freebsd.org/changeset/base/198994

Log:
  MFC: Merge in minimal 5709/5716 support into 6.X extracted from current.
  This is not a direct merge since I tried to only extra the changes to
  support the 5709 from all of the other changes that have happened in
  head.  This should not introduce any issues that the other changes may
  have caused.  We have been running this code for months on Dell r710's.
  It has been lightly tested on systems with 5716's.
  
  This is to allow people to run newer hardware on 6.X.

Modified:
  stable/6/sys/dev/bce/if_bce.c
  stable/6/sys/dev/bce/if_bcefw.h
  stable/6/sys/dev/bce/if_bcereg.h
  stable/6/sys/dev/mii/brgphy.c
  stable/6/sys/dev/mii/miidevs

Modified: stable/6/sys/dev/bce/if_bce.c
==============================================================================
--- stable/6/sys/dev/bce/if_bce.c	Fri Nov  6 17:34:26 2009	(r198993)
+++ stable/6/sys/dev/bce/if_bce.c	Fri Nov  6 17:58:44 2009	(r198994)
@@ -110,6 +110,19 @@ static struct bce_type bce_devs[] = {
 	/* BCM5708S controllers and OEM boards. */
 	{ BRCM_VENDORID, BRCM_DEVICEID_BCM5708S,  PCI_ANY_ID,  PCI_ANY_ID,
 		"Broadcom NetXtreme II BCM5708 1000Base-SX" },
+
+	/* BCM5709C controllers and OEM boards. */
+	{ BRCM_VENDORID, BRCM_DEVICEID_BCM5709,  PCI_ANY_ID,  PCI_ANY_ID,
+		"Broadcom NetXtreme II BCM5709 1000Base-T" },
+
+	/* BCM5709S controllers and OEM boards. */
+	{ BRCM_VENDORID, BRCM_DEVICEID_BCM5709S,  PCI_ANY_ID,  PCI_ANY_ID,
+		"Broadcom NetXtreme II BCM5709 1000Base-SX" },
+
+	/* BCM5716 controllers and OEM boards. */
+	{ BRCM_VENDORID, BRCM_DEVICEID_BCM5716,  PCI_ANY_ID,  PCI_ANY_ID,
+		"Broadcom NetXtreme II BCM5716 1000Base-T" },
+
 	{ 0, 0, 0, 0, NULL }
 };
 
@@ -119,91 +132,109 @@ static struct bce_type bce_devs[] = {
 /****************************************************************************/
 static struct flash_spec flash_table[] =
 {
+#define BUFFERED_FLAGS		(BCE_NV_BUFFERED | BCE_NV_TRANSLATE)
+#define NONBUFFERED_FLAGS	(BCE_NV_WREN)
+
 	/* Slow EEPROM */
 	{0x00000000, 0x40830380, 0x009f0081, 0xa184a053, 0xaf000400,
-	 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE,
+	 BUFFERED_FLAGS, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE,
 	 SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE,
 	 "EEPROM - slow"},
 	/* Expansion entry 0001 */
 	{0x08000002, 0x4b808201, 0x00050081, 0x03840253, 0xaf020406,
-	 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
 	 SAIFUN_FLASH_BYTE_ADDR_MASK, 0,
 	 "Entry 0001"},
 	/* Saifun SA25F010 (non-buffered flash) */
 	/* strap, cfg1, & write1 need updates */
 	{0x04000001, 0x47808201, 0x00050081, 0x03840253, 0xaf020406,
-	 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
 	 SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*2,
 	 "Non-buffered flash (128kB)"},
 	/* Saifun SA25F020 (non-buffered flash) */
 	/* strap, cfg1, & write1 need updates */
 	{0x0c000003, 0x4f808201, 0x00050081, 0x03840253, 0xaf020406,
-	 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
 	 SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*4,
 	 "Non-buffered flash (256kB)"},
 	/* Expansion entry 0100 */
 	{0x11000000, 0x53808201, 0x00050081, 0x03840253, 0xaf020406,
-	 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
 	 SAIFUN_FLASH_BYTE_ADDR_MASK, 0,
 	 "Entry 0100"},
 	/* Entry 0101: ST M45PE10 (non-buffered flash, TetonII B0) */
 	{0x19000002, 0x5b808201, 0x000500db, 0x03840253, 0xaf020406,
-	 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE,
 	 ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*2,
 	 "Entry 0101: ST M45PE10 (128kB non-bufferred)"},
 	/* Entry 0110: ST M45PE20 (non-buffered flash)*/
 	{0x15000001, 0x57808201, 0x000500db, 0x03840253, 0xaf020406,
-	 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE,
 	 ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*4,
 	 "Entry 0110: ST M45PE20 (256kB non-bufferred)"},
 	/* Saifun SA25F005 (non-buffered flash) */
 	/* strap, cfg1, & write1 need updates */
 	{0x1d000003, 0x5f808201, 0x00050081, 0x03840253, 0xaf020406,
-	 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
 	 SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE,
 	 "Non-buffered flash (64kB)"},
 	/* Fast EEPROM */
 	{0x22000000, 0x62808380, 0x009f0081, 0xa184a053, 0xaf000400,
-	 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE,
+	 BUFFERED_FLAGS, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE,
 	 SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE,
 	 "EEPROM - fast"},
 	/* Expansion entry 1001 */
 	{0x2a000002, 0x6b808201, 0x00050081, 0x03840253, 0xaf020406,
-	 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
 	 SAIFUN_FLASH_BYTE_ADDR_MASK, 0,
 	 "Entry 1001"},
 	/* Expansion entry 1010 */
 	{0x26000001, 0x67808201, 0x00050081, 0x03840253, 0xaf020406,
-	 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
 	 SAIFUN_FLASH_BYTE_ADDR_MASK, 0,
 	 "Entry 1010"},
 	/* ATMEL AT45DB011B (buffered flash) */
 	{0x2e000003, 0x6e808273, 0x00570081, 0x68848353, 0xaf000400,
-	 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE,
+	 BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE,
 	 BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE,
 	 "Buffered flash (128kB)"},
 	/* Expansion entry 1100 */
 	{0x33000000, 0x73808201, 0x00050081, 0x03840253, 0xaf020406,
-	 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
 	 SAIFUN_FLASH_BYTE_ADDR_MASK, 0,
 	 "Entry 1100"},
 	/* Expansion entry 1101 */
 	{0x3b000002, 0x7b808201, 0x00050081, 0x03840253, 0xaf020406,
-	 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
+	 NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE,
 	 SAIFUN_FLASH_BYTE_ADDR_MASK, 0,
 	 "Entry 1101"},
 	/* Ateml Expansion entry 1110 */
 	{0x37000001, 0x76808273, 0x00570081, 0x68848353, 0xaf000400,
-	 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE,
+	 BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE,
 	 BUFFERED_FLASH_BYTE_ADDR_MASK, 0,
 	 "Entry 1110 (Atmel)"},
 	/* ATMEL AT45DB021B (buffered flash) */
 	{0x3f000003, 0x7e808273, 0x00570081, 0x68848353, 0xaf000400,
-	 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE,
+	 BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE,
 	 BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE*2,
 	 "Buffered flash (256kB)"},
 };
 
+/*
+ * The BCM5709 controllers transparently handle the
+ * differences between Atmel 264 byte pages and all
+ * flash devices which use 256 byte pages, so no
+ * logical-to-physical mapping is required in the
+ * driver.
+ */
+static struct flash_spec flash_5709 = {
+	.flags		= BCE_NV_BUFFERED,
+	.page_bits	= BCM5709_FLASH_PAGE_BITS,
+	.page_size	= BCM5709_FLASH_PAGE_SIZE,
+	.addr_mask	= BCM5709_FLASH_BYTE_ADDR_MASK,
+	.total_size	= BUFFERED_FLASH_TOTAL_SIZE * 2,
+	.name		= "5709 buffered flash (256kB)",
+};
 
 /****************************************************************************/
 /* FreeBSD device entry points.                                             */
@@ -268,6 +299,7 @@ static int  bce_nvram_write			(struct bc
 /****************************************************************************/
 /*                                                                          */
 /****************************************************************************/
+static void bce_get_media		(struct bce_softc *);
 static void bce_dma_map_addr		(void *, bus_dma_segment_t *, int, int);
 static int  bce_dma_alloc			(device_t);
 static void bce_dma_free			(struct bce_softc *);
@@ -279,19 +311,28 @@ static void bce_release_resources	(struc
 static int  bce_fw_sync				(struct bce_softc *, u32);
 static void bce_load_rv2p_fw		(struct bce_softc *, u32 *, u32, u32);
 static void bce_load_cpu_fw			(struct bce_softc *, struct cpu_reg *, struct fw_info *);
+static void bce_init_rxp_cpu		(struct bce_softc *);
+static void bce_init_txp_cpu 		(struct bce_softc *);
+static void bce_init_tpat_cpu		(struct bce_softc *);
+static void bce_init_cp_cpu		  	(struct bce_softc *);
+static void bce_init_com_cpu	  	(struct bce_softc *);
 static void bce_init_cpus			(struct bce_softc *);
 
+static void	bce_print_adapter_info	(struct bce_softc *);
+static void bce_probe_pci_caps		(device_t, struct bce_softc *);
 static void bce_stop				(struct bce_softc *);
 static int  bce_reset				(struct bce_softc *, u32);
 static int  bce_chipinit 			(struct bce_softc *);
 static int  bce_blockinit 			(struct bce_softc *);
-static int  bce_get_buf				(struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *);
 
 static int  bce_init_tx_chain		(struct bce_softc *);
-static void bce_fill_rx_chain		(struct bce_softc *);
+static void bce_free_tx_chain		(struct bce_softc *);
+
+static int  bce_get_buf			(struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *);
 static int  bce_init_rx_chain		(struct bce_softc *);
+static void bce_fill_rx_chain		(struct bce_softc *);
 static void bce_free_rx_chain		(struct bce_softc *);
-static void bce_free_tx_chain		(struct bce_softc *);
+static void bce_init_rx_context		(struct bce_softc *);
 
 static int  bce_tx_encap			(struct bce_softc *, struct mbuf **);
 static void bce_start_locked		(struct ifnet *);
@@ -437,6 +478,90 @@ bce_probe(device_t dev)
 	return(ENXIO);
 }
 
+static void
+bce_print_adapter_info(struct bce_softc *sc)
+{
+	BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid);
+	printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A',
+		((BCE_CHIP_ID(sc) & 0x0ff0) >> 4));
+
+	/* Bus info. */
+	if (sc->bce_flags & BCE_PCIE_FLAG) {
+		printf("Bus (PCIe x%d, ", sc->link_width);
+		switch (sc->link_speed) {
+			case 1: printf("2.5Gbps); "); break;
+			case 2:	printf("5Gbps); "); break;
+			default: printf("Unknown link speed); ");
+		}
+	} else {
+		printf("Bus (PCI%s, %s, %dMHz); ",
+			((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""),
+			((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"),
+			sc->bus_speed_mhz);
+	}
+
+	/* Firmware version and device features. */
+	printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver);
+#ifdef BCE_USE_SPLIT_HEADER
+	printf("SPLT ");
+#endif
+	if (sc->bce_flags & BCE_MFW_ENABLE_FLAG)
+		printf("MFW ");
+	if (sc->bce_flags & BCE_USING_MSI_FLAG)
+		printf("MSI ");
+	if (sc->bce_flags & BCE_USING_MSIX_FLAG)
+		printf("MSI-X ");
+	if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)
+		printf("2.5G ");
+	printf(")\n");
+}
+
+/****************************************************************************/
+/* PCI Capabilities Probe Function.                                         */
+/*                                                                          */
+/* Walks the PCI capabiites list for the device to find what features are   */
+/* supported.                                                               */
+/*                                                                          */
+/* Returns:                                                                 */
+/*   None.                                                                  */
+/****************************************************************************/
+static void
+bce_probe_pci_caps(device_t dev, struct bce_softc *sc)
+{
+	u32 reg;
+
+	/* Check if PCI-X capability is enabled. */
+	if (pci_find_extcap(dev, PCIY_PCIX, ®) == 0) {
+		if (reg != 0)
+			sc->bce_cap_flags |= BCE_PCIX_CAPABLE_FLAG;
+	}
+
+	/* Check if PCIe capability is enabled. */
+	if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
+		if (reg != 0) {
+			u16 link_status = pci_read_config(dev, reg + 0x12, 2);
+			DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = 0x%08X\n",
+				link_status);
+			sc->link_speed = link_status & 0xf;
+			sc->link_width = (link_status >> 4) & 0x3f;
+			sc->bce_cap_flags |= BCE_PCIE_CAPABLE_FLAG;
+			sc->bce_flags |= BCE_PCIE_FLAG;
+		}
+	}
+
+	/* Check if MSI capability is enabled. */
+	if (pci_find_extcap(dev, PCIY_MSI, ®) == 0) {
+		if (reg != 0)
+			sc->bce_cap_flags |= BCE_MSI_CAPABLE_FLAG;
+	}
+
+	/* Check if MSI-X capability is enabled. */
+	if (pci_find_extcap(dev, PCIY_MSIX, ®) == 0) {
+		if (reg != 0)
+			sc->bce_cap_flags |= BCE_MSIX_CAPABLE_FLAG;
+	}
+
+}
 
 /****************************************************************************/
 /* Device attach function.                                                  */
@@ -488,6 +613,7 @@ bce_attach(device_t dev)
 	sc->bce_bhandle = rman_get_bushandle(sc->bce_res_mem);
 	sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res_mem);
 
+	bce_probe_pci_caps(dev, sc);
 	/* If MSI is enabled in the driver, get the vector count. */
 	count = bce_msi_enable ? pci_msi_count(dev) : 0;
 
@@ -534,6 +660,10 @@ bce_attach(device_t dev)
 		case BCE_CHIP_ID_5706_A1:
 		case BCE_CHIP_ID_5708_A0:
 		case BCE_CHIP_ID_5708_B0:
+		case BCE_CHIP_ID_5709_A0:
+		case BCE_CHIP_ID_5709_B0:
+		case BCE_CHIP_ID_5709_B1:
+		case BCE_CHIP_ID_5709_B2:
 			BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n",
 				__FILE__, __LINE__, 
 				(((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'),
@@ -559,7 +689,9 @@ bce_attach(device_t dev)
 	 */
 	val = REG_RD_IND(sc, BCE_SHM_HDR_SIGNATURE);
 	if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG)
-		sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0);
+		/* Multi-port devices use different offsets in shared memory. */
+		sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0 +
+			(pci_get_function(sc->bce_dev) << 2));
 	else
 		sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE;
 
@@ -687,33 +819,14 @@ bce_attach(device_t dev)
 	/* Update statistics once every second. */
 	sc->bce_stats_ticks = 1000000 & 0xffff00;
 
-	/*
-	 * The SerDes based NetXtreme II controllers
-	 * that support 2.5Gb operation (currently 
-	 * 5708S) use a PHY at address 2, otherwise 
-	 * the PHY is present at address 1.
-	 */
-	sc->bce_phy_addr = 1;
-
-	if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) {
-		sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG;
-		sc->bce_flags |= BCE_NO_WOL_FLAG;
-		if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) {
-			sc->bce_phy_addr = 2;
-			val = REG_RD_IND(sc, sc->bce_shmem_base +
-					 BCE_SHARED_HW_CFG_CONFIG);
-			if (val & BCE_SHARED_HW_CFG_PHY_2_5G) {
-				sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG;
-				DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n");
-			}
-		}
-	}
+	/* Find the media type for the adapter. */
+	bce_get_media(sc);
 
 	/* Store data needed by PHY driver for backplane applications */
 	sc->bce_shared_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base +
 		BCE_SHARED_HW_CFG_CONFIG);
 	sc->bce_port_hw_cfg   = REG_RD_IND(sc, sc->bce_shmem_base +
-		BCE_SHARED_HW_CFG_CONFIG);
+		BCE_PORT_HW_CFG_CONFIG);
 
 	/* Allocate DMA memory resources. */
 	if (bce_dma_alloc(dev)) {
@@ -820,21 +933,7 @@ bce_attach(device_t dev)
 	BCE_UNLOCK(sc);
 
 	/* Finally, print some useful adapter info */
-	BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid);
-	printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A',
-		((BCE_CHIP_ID(sc) & 0x0ff0) >> 4));
-	printf("Bus (PCI%s, %s, %dMHz); ",
-		((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""),
-		((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"),
-		sc->bus_speed_mhz);
-	printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver);
-	if (sc->bce_flags & BCE_MFW_ENABLE_FLAG)
-		printf("MFW ");
-	if (sc->bce_flags & BCE_USING_MSI_FLAG)
-		printf("MSI ");
-	if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)
-		printf("2.5G ");
-	printf(")\n");
+	bce_print_adapter_info(sc);
 
 	goto bce_attach_exit;
 
@@ -995,15 +1094,39 @@ bce_reg_wr_ind(struct bce_softc *sc, u32
 /*   Nothing.                                                               */
 /****************************************************************************/
 static void
-bce_ctx_wr(struct bce_softc *sc, u32 cid_addr, u32 offset, u32 val)
+bce_ctx_wr(struct bce_softc *sc, u32 cid_addr, u32 ctx_offset, u32 ctx_val)
 {
+	u32 idx, offset = ctx_offset + cid_addr;
+	u32 val = 0, retry_cnt = 5;
+
+	DBPRINT(sc, BCE_EXTREME_CTX, "%s(); cid_addr = 0x%08X, offset = 0x%08X, "
+		"val = 0x%08X\n", __FUNCTION__, cid_addr, ctx_offset, ctx_val);
+
+	DBRUNIF((cid_addr > MAX_CID_ADDR || ctx_offset & 0x3 || cid_addr & CTX_MASK),
+		BCE_PRINTF("%s(): Invalid CID address: 0x%08X.\n",
+			__FUNCTION__, cid_addr));
+
+	if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) {
+
+		REG_WR(sc, BCE_CTX_CTX_DATA, ctx_val);
+		REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_WRITE_REQ));
 
-	DBPRINT(sc, BCE_EXCESSIVE, "%s(); cid_addr = 0x%08X, offset = 0x%08X, "
-		"val = 0x%08X\n", __FUNCTION__, cid_addr, offset, val);
+		for (idx = 0; idx < retry_cnt; idx++) {
+			val = REG_RD(sc, BCE_CTX_CTX_CTRL);
+			if ((val & BCE_CTX_CTX_CTRL_WRITE_REQ) == 0)
+				break;
+			DELAY(5);
+		}
 
-	offset += cid_addr;
-	REG_WR(sc, BCE_CTX_DATA_ADR, offset);
-	REG_WR(sc, BCE_CTX_DATA, val);
+		if (val & BCE_CTX_CTX_CTRL_WRITE_REQ)
+			BCE_PRINTF("%s(%d); Unable to write CTX memory: "
+				"cid_addr = 0x%08X, offset = 0x%08X!\n",
+				__FILE__, __LINE__, cid_addr, ctx_offset);
+
+	} else {
+		REG_WR(sc, BCE_CTX_DATA_ADR, offset);
+		REG_WR(sc, BCE_CTX_DATA, ctx_val);
+	}
 }
 
 
@@ -1323,7 +1446,7 @@ bce_enable_nvram_write(struct bce_softc 
 	val = REG_RD(sc, BCE_MISC_CFG);
 	REG_WR(sc, BCE_MISC_CFG, val | BCE_MISC_CFG_NVM_WR_EN_PCI);
 
-	if (!sc->bce_flash_info->buffered) {
+	if (!(sc->bce_flash_info->flags & BCE_NV_BUFFERED)) {
 		int j;
 
 		REG_WR(sc, BCE_NVM_COMMAND, BCE_NVM_COMMAND_DONE);
@@ -1339,9 +1462,11 @@ bce_enable_nvram_write(struct bce_softc 
 
 		if (j >= NVRAM_TIMEOUT_COUNT) {
 			DBPRINT(sc, BCE_WARN, "Timeout writing NVRAM!\n");
-			return EBUSY;
+			rc = EBUSY;
 		}
 	}
+
+
 	return 0;
 }
 
@@ -1412,6 +1537,7 @@ bce_disable_nvram_access(struct bce_soft
 	REG_WR(sc, BCE_NVM_ACCESS_ENABLE,
 		val & ~(BCE_NVM_ACCESS_ENABLE_EN |
 			BCE_NVM_ACCESS_ENABLE_WR_EN));
+
 }
 
 
@@ -1429,13 +1555,11 @@ static int
 bce_nvram_erase_page(struct bce_softc *sc, u32 offset)
 {
 	u32 cmd;
-	int j;
+	int j, rc = 0;
 
 	/* Buffered flash doesn't require an erase. */
-	if (sc->bce_flash_info->buffered)
-		return 0;
-
-	DBPRINT(sc, BCE_VERBOSE_NVRAM, "Erasing NVRAM page.\n");
+	if (sc->bce_flash_info->flags & BCE_NV_BUFFERED)
+		goto bce_nvram_erase_page_exit;
 
 	/* Build an erase command. */
 	cmd = BCE_NVM_COMMAND_ERASE | BCE_NVM_COMMAND_WR |
@@ -1462,10 +1586,12 @@ bce_nvram_erase_page(struct bce_softc *s
 
 	if (j >= NVRAM_TIMEOUT_COUNT) {
 		DBPRINT(sc, BCE_WARN, "Timeout erasing NVRAM.\n");
-		return EBUSY;
+		rc = EBUSY;
 	}
 
-	return 0;
+bce_nvram_erase_page_exit:
+
+	return rc;
 }
 #endif /* BCE_NVRAM_WRITE_SUPPORT */
 
@@ -1486,11 +1612,12 @@ bce_nvram_read_dword(struct bce_softc *s
 	u32 cmd;
 	int i, rc = 0;
 
+
 	/* Build the command word. */
 	cmd = BCE_NVM_COMMAND_DOIT | cmd_flags;
 
-	/* Calculate the offset for buffered flash. */
-	if (sc->bce_flash_info->buffered) {
+	/* Calculate the offset for buffered flash if translation is used. */
+	if (sc->bce_flash_info->flags & BCE_NV_TRANSLATE) {
 		offset = ((offset / sc->bce_flash_info->page_size) <<
 			   sc->bce_flash_info->page_bits) +
 			  (offset % sc->bce_flash_info->page_size);
@@ -1547,13 +1674,14 @@ bce_nvram_write_dword(struct bce_softc *
 	u32 cmd_flags)
 {
 	u32 cmd, val32;
-	int j;
+	int j, rc = 0;
+
 
 	/* Build the command word. */
 	cmd = BCE_NVM_COMMAND_DOIT | BCE_NVM_COMMAND_WR | cmd_flags;
 
-	/* Calculate the offset for buffered flash. */
-	if (sc->bce_flash_info->buffered) {
+	/* Calculate the offset for buffered flash if translation is used. */
+	if (sc->bce_flash_info->flags & BCE_NV_TRANSLATE) {
 		offset = ((offset / sc->bce_flash_info->page_size) <<
 			  sc->bce_flash_info->page_bits) +
 			 (offset % sc->bce_flash_info->page_size);
@@ -1580,10 +1708,10 @@ bce_nvram_write_dword(struct bce_softc *
 	if (j >= NVRAM_TIMEOUT_COUNT) {
 		BCE_PRINTF("%s(%d): Timeout error writing NVRAM at offset 0x%08X\n",
 			__FILE__, __LINE__, offset);
-		return EBUSY;
+		rc = EBUSY;
 	}
 
-	return 0;
+	return (rc);
 }
 #endif /* BCE_NVRAM_WRITE_SUPPORT */
 
@@ -1601,18 +1729,20 @@ static int
 bce_init_nvram(struct bce_softc *sc)
 {
 	u32 val;
-	int j, entry_count, rc;
+	int j, entry_count, rc = 0;
 	struct flash_spec *flash;
 
-	DBPRINT(sc, BCE_VERBOSE_NVRAM, "Entering %s()\n", __FUNCTION__);
+
+	if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) {
+		sc->bce_flash_info = &flash_5709;
+		goto bce_init_nvram_get_flash_size;
+	}
 
 	/* Determine the selected interface. */
 	val = REG_RD(sc, BCE_NVM_CFG1);
 
 	entry_count = sizeof(flash_table) / sizeof(struct flash_spec);
 
-	rc = 0;
-
 	/*
 	 * Flash reconfiguration is required to support additional
 	 * NVRAM devices not directly supported in hardware.
@@ -1623,7 +1753,7 @@ bce_init_nvram(struct bce_softc *sc)
 	if (val & 0x40000000) {
 		/* Flash interface reconfigured by bootcode. */
 
-		DBPRINT(sc,BCE_INFO_LOAD, 
+		DBPRINT(sc,BCE_INFO_LOAD,
 			"bce_init_nvram(): Flash WAS reconfigured.\n");
 
 		for (j = 0, flash = &flash_table[0]; j < entry_count;
@@ -1638,8 +1768,8 @@ bce_init_nvram(struct bce_softc *sc)
 		/* Flash interface not yet reconfigured. */
 		u32 mask;
 
-		DBPRINT(sc,BCE_INFO_LOAD, 
-			"bce_init_nvram(): Flash was NOT reconfigured.\n");
+		DBPRINT(sc, BCE_INFO_LOAD, "%s(): Flash was NOT reconfigured.\n",
+			__FUNCTION__);
 
 		if (val & (1 << 23))
 			mask = FLASH_BACKUP_STRAP_MASK;
@@ -1675,11 +1805,12 @@ bce_init_nvram(struct bce_softc *sc)
 	/* Check if a matching device was found. */
 	if (j == entry_count) {
 		sc->bce_flash_info = NULL;
-		BCE_PRINTF("%s(%d): Unknown Flash NVRAM found!\n", 
+		BCE_PRINTF("%s(%d): Unknown Flash NVRAM found!\n",
 			__FILE__, __LINE__);
 		rc = ENODEV;
 	}
 
+bce_init_nvram_get_flash_size:
 	/* Write the flash config data to the shared memory interface. */
 	val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_SHARED_HW_CFG_CONFIG2);
 	val &= BCE_SHARED_HW_CFG2_NVM_SIZE_MASK;
@@ -1688,11 +1819,10 @@ bce_init_nvram(struct bce_softc *sc)
 	else
 		sc->bce_flash_size = sc->bce_flash_info->total_size;
 
-	DBPRINT(sc, BCE_INFO_LOAD, "bce_init_nvram() flash->total_size = 0x%08X\n",
+	DBPRINT(sc, BCE_INFO_LOAD, "%s(): Found %s, size = 0x%08X\n",
+		__FUNCTION__, sc->bce_flash_info->name,
 		sc->bce_flash_info->total_size);
 
-	DBPRINT(sc, BCE_VERBOSE_NVRAM, "Exiting %s()\n", __FUNCTION__);
-
 	return rc;
 }
 
@@ -1713,12 +1843,13 @@ bce_nvram_read(struct bce_softc *sc, u32
 	int rc = 0;
 	u32 cmd_flags, offset32, len32, extra;
 
+
 	if (buf_size == 0)
-		return 0;
+		goto bce_nvram_read_exit;
 
 	/* Request access to the flash interface. */
 	if ((rc = bce_acquire_nvram_lock(sc)) != 0)
-		return rc;
+		goto bce_nvram_read_exit;
 
 	/* Enable access to flash interface */
 	bce_enable_nvram_access(sc);
@@ -1800,7 +1931,7 @@ bce_nvram_read(struct bce_softc *sc, u32
 		}
 
 		if (rc)
-			return rc;
+			goto bce_nvram_read_locked_exit;
 
 		cmd_flags = BCE_NVM_COMMAND_LAST;
 		rc = bce_nvram_read_dword(sc, offset32, buf, cmd_flags);
@@ -1808,10 +1939,12 @@ bce_nvram_read(struct bce_softc *sc, u32
 		memcpy(ret_buf, buf, 4 - extra);
 	}
 
+bce_nvram_read_locked_exit:
 	/* Disable access to flash interface and release the lock. */
 	bce_disable_nvram_access(sc);
 	bce_release_nvram_lock(sc);
 
+bce_nvram_read_exit:
 	return rc;
 }
 
@@ -1836,6 +1969,7 @@ bce_nvram_write(struct bce_softc *sc, u3
 	int rc = 0;
 	int align_start, align_end;
 
+
 	buf = data_buf;
 	offset32 = offset;
 	len32 = buf_size;
@@ -1845,7 +1979,7 @@ bce_nvram_write(struct bce_softc *sc, u3
 		offset32 &= ~3;
 		len32 += align_start;
 		if ((rc = bce_nvram_read(sc, offset32, start, 4)))
-			return rc;
+			goto bce_nvram_write_exit;
 	}
 
 	if (len32 & 3) {
@@ -1854,18 +1988,22 @@ bce_nvram_write(struct bce_softc *sc, u3
 			len32 += align_end;
 			if ((rc = bce_nvram_read(sc, offset32 + len32 - 4,
 				end, 4))) {
-				return rc;
+				goto bce_nvram_write_exit;
 			}
 		}
 	}
 
 	if (align_start || align_end) {
 		buf = malloc(len32, M_DEVBUF, M_NOWAIT);
-		if (buf == 0)
-			return ENOMEM;
+		if (buf == 0) {
+			rc = ENOMEM;
+			goto bce_nvram_write_exit;
+		}
+
 		if (align_start) {
 			memcpy(buf, start, 4);
 		}
+
 		if (align_end) {
 			memcpy(buf + len32 - 4, end, 4);
 		}
@@ -1892,13 +2030,13 @@ bce_nvram_write(struct bce_softc *sc, u3
 
 		/* Request access to the flash interface. */
 		if ((rc = bce_acquire_nvram_lock(sc)) != 0)
-			goto nvram_write_end;
+			goto bce_nvram_write_exit;
 
 		/* Enable access to flash interface */
 		bce_enable_nvram_access(sc);
 
 		cmd_flags = BCE_NVM_COMMAND_FIRST;
-		if (sc->bce_flash_info->buffered == 0) {
+		if (!(sc->bce_flash_info->flags & BCE_NV_BUFFERED)) {
 			int j;
 
 			/* Read the whole page into the buffer
@@ -1913,7 +2051,7 @@ bce_nvram_write(struct bce_softc *sc, u3
 					cmd_flags);
 
 				if (rc)
-					goto nvram_write_end;
+					goto bce_nvram_write_locked_exit;
 
 				cmd_flags = 0;
 			}
@@ -1921,11 +2059,11 @@ bce_nvram_write(struct bce_softc *sc, u3
 
 		/* Enable writes to flash interface (unlock write-protect) */
 		if ((rc = bce_enable_nvram_write(sc)) != 0)
-			goto nvram_write_end;
+			goto bce_nvram_write_locked_exit;
 
 		/* Erase the page */
 		if ((rc = bce_nvram_erase_page(sc, page_start)) != 0)
-			goto nvram_write_end;
+			goto bce_nvram_write_locked_exit;
 
 		/* Re-enable the write again for the actual write */
 		bce_enable_nvram_write(sc);
@@ -1933,7 +2071,7 @@ bce_nvram_write(struct bce_softc *sc, u3
 		/* Loop to write back the buffer data from page_start to
 		 * data_start */
 		i = 0;
-		if (sc->bce_flash_info->buffered == 0) {
+		if (!(sc->bce_flash_info->flags & BCE_NV_BUFFERED)) {
 			for (addr = page_start; addr < data_start;
 				addr += 4, i += 4) {
 
@@ -1941,7 +2079,7 @@ bce_nvram_write(struct bce_softc *sc, u3
 					&flash_buffer[i], cmd_flags);
 
 				if (rc != 0)
-					goto nvram_write_end;
+					goto bce_nvram_write_locked_exit;
 
 				cmd_flags = 0;
 			}
@@ -1950,8 +2088,8 @@ bce_nvram_write(struct bce_softc *sc, u3
 		/* Loop to write the new data from data_start to data_end */
 		for (addr = data_start; addr < data_end; addr += 4, i++) {
 			if ((addr == page_end - 4) ||
-				((sc->bce_flash_info->buffered) &&
-				 (addr == data_end - 4))) {
+				((sc->bce_flash_info->flags & BCE_NV_BUFFERED) &&
+				(addr == data_end - 4))) {
 
 				cmd_flags |= BCE_NVM_COMMAND_LAST;
 			}
@@ -1959,7 +2097,7 @@ bce_nvram_write(struct bce_softc *sc, u3
 				cmd_flags);
 
 			if (rc != 0)
-				goto nvram_write_end;
+				goto bce_nvram_write_locked_exit;
 
 			cmd_flags = 0;
 			buf += 4;
@@ -1967,7 +2105,7 @@ bce_nvram_write(struct bce_softc *sc, u3
 
 		/* Loop to write back the buffer data from data_end
 		 * to page_end */
-		if (sc->bce_flash_info->buffered == 0) {
+		if (!(sc->bce_flash_info->flags & BCE_NV_BUFFERED)) {
 			for (addr = data_end; addr < page_end;
 				addr += 4, i += 4) {
 
@@ -1978,7 +2116,7 @@ bce_nvram_write(struct bce_softc *sc, u3
 					&flash_buffer[i], cmd_flags);
 
 				if (rc != 0)
-					goto nvram_write_end;
+					goto bce_nvram_write_locked_exit;
 
 				cmd_flags = 0;
 			}
@@ -1995,11 +2133,18 @@ bce_nvram_write(struct bce_softc *sc, u3
 		written += data_end - data_start;
 	}
 
-nvram_write_end:
+	goto bce_nvram_write_exit;
+
+bce_nvram_write_locked_exit:
+		bce_disable_nvram_write(sc);
+		bce_disable_nvram_access(sc);
+		bce_release_nvram_lock(sc);
+
+bce_nvram_write_exit:
 	if (align_start || align_end)
 		free(buf, M_DEVBUF);
 
-	return rc;
+	return (rc);
 }
 #endif /* BCE_NVRAM_WRITE_SUPPORT */
 
@@ -2026,25 +2171,33 @@ bce_nvram_test(struct bce_softc *sc)
 	 * Check that the device NVRAM is valid by reading
 	 * the magic value at offset 0.
 	 */
-	if ((rc = bce_nvram_read(sc, 0, data, 4)) != 0)
-		goto bce_nvram_test_done;
-
+	if ((rc = bce_nvram_read(sc, 0, data, 4)) != 0) {
+		BCE_PRINTF("%s(%d): Unable to read NVRAM!\n", __FILE__, __LINE__);
+		goto bce_nvram_test_exit;
+	}
 
+	/*
+	 * Verify that offset 0 of the NVRAM contains
+	 * a valid magic number.
+	 */
     magic = bce_be32toh(buf[0]);
 	if (magic != BCE_NVRAM_MAGIC) {
 		rc = ENODEV;
 		BCE_PRINTF("%s(%d): Invalid NVRAM magic value! Expected: 0x%08X, "
 			"Found: 0x%08X\n",
 			__FILE__, __LINE__, BCE_NVRAM_MAGIC, magic);
-		goto bce_nvram_test_done;
+		goto bce_nvram_test_exit;
 	}
 
 	/*
 	 * Verify that the device NVRAM includes valid
 	 * configuration data.
 	 */
-	if ((rc = bce_nvram_read(sc, 0x100, data, BCE_NVRAM_SIZE)) != 0)
-		goto bce_nvram_test_done;
+	if ((rc = bce_nvram_read(sc, 0x100, data, BCE_NVRAM_SIZE)) != 0) {
+		BCE_PRINTF("%s(%d): Unable to read Manufacturing Information from "
+			"NVRAM!\n", __FILE__, __LINE__);
+		goto bce_nvram_test_exit;
+	}
 
 	csum = ether_crc32_le(data, 0x100);
 	if (csum != BCE_CRC32_RESIDUAL) {
@@ -2052,21 +2205,106 @@ bce_nvram_test(struct bce_softc *sc)
 		BCE_PRINTF("%s(%d): Invalid Manufacturing Information NVRAM CRC! "
 			"Expected: 0x%08X, Found: 0x%08X\n",
 			__FILE__, __LINE__, BCE_CRC32_RESIDUAL, csum);
-		goto bce_nvram_test_done;
+		goto bce_nvram_test_exit;
 	}
 
 	csum = ether_crc32_le(data + 0x100, 0x100);
 	if (csum != BCE_CRC32_RESIDUAL) {
+		rc = ENODEV;
 		BCE_PRINTF("%s(%d): Invalid Feature Configuration Information "
 			"NVRAM CRC! Expected: 0x%08X, Found: 08%08X\n",
 			__FILE__, __LINE__, BCE_CRC32_RESIDUAL, csum);
-		rc = ENODEV;
 	}
 
-bce_nvram_test_done:
+bce_nvram_test_exit:
 	return rc;
 }
 
+/****************************************************************************/
+/* Identifies the current media type of the controller and sets the PHY     */
+/* address.                                                                 */
+/*                                                                          */
+/* Returns:                                                                 */
+/*   Nothing.                                                               */
+/****************************************************************************/
+static void
+bce_get_media(struct bce_softc *sc)
+{
+	u32 val;
+
+	sc->bce_phy_addr = 1;
+
+	if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) {
+ 		u32 val = REG_RD(sc, BCE_MISC_DUAL_MEDIA_CTRL);
+		u32 bond_id = val & BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID;
+		u32 strap;
+
+		/*
+		 * The BCM5709S is software configurable
+		 * for Copper or SerDes operation.
+		 */
+		if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_C) {
+			DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for copper.\n");
+			goto bce_get_media_exit;
+		} else if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_S) {
+			DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for dual media.\n");
+			sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG;
+			goto bce_get_media_exit;
+		}
+
+		if (val & BCE_MISC_DUAL_MEDIA_CTRL_STRAP_OVERRIDE)
+			strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21;
+		else
+			strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8;
+
+		if (pci_get_function(sc->bce_dev) == 0) {
+			switch (strap) {
+			case 0x4:
+			case 0x5:
+			case 0x6:
+				DBPRINT(sc, BCE_INFO_LOAD, 
+					"BCM5709 s/w configured for SerDes.\n");
+				sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG;
+			default:
+				DBPRINT(sc, BCE_INFO_LOAD, 
+					"BCM5709 s/w configured for Copper.\n");
+			}
+		} else {
+			switch (strap) {
+			case 0x1:
+			case 0x2:
+			case 0x4:
+				DBPRINT(sc, BCE_INFO_LOAD, 
+					"BCM5709 s/w configured for SerDes.\n");
+				sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG;
+			default:
+				DBPRINT(sc, BCE_INFO_LOAD, 
+					"BCM5709 s/w configured for Copper.\n");
+			}
+		}
+
+	} else if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT)
+		sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG;
+
+	if (sc->bce_phy_flags && BCE_PHY_SERDES_FLAG) {
+		sc->bce_flags |= BCE_NO_WOL_FLAG;
+		if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) {
+			sc->bce_phy_addr = 2;
+			val = REG_RD_IND(sc, sc->bce_shmem_base +
+				 BCE_SHARED_HW_CFG_CONFIG);
+			if (val & BCE_SHARED_HW_CFG_PHY_2_5G) {
+				sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG;
+				DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n");
+			}
+		}
+	} else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) ||
+		   (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708))
+		sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG;
+
+bce_get_media_exit:
+	DBPRINT(sc, (BCE_INFO_LOAD | BCE_INFO_PHY),
+		"Using PHY address %d.\n", sc->bce_phy_addr);
+}
 
 /****************************************************************************/
 /* Free any DMA memory owned by the driver.                                 */
@@ -2121,6 +2359,34 @@ bce_dma_free(struct bce_softc *sc)
 	if (sc->stats_tag != NULL)
 		bus_dma_tag_destroy(sc->stats_tag);
 
+	/* Free, unmap and destroy all context memory pages. */
+	if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) {
+		for (i = 0; i < sc->ctx_pages; i++ ) {
+			if (sc->ctx_block[i] != NULL) {
+				bus_dmamem_free(
+					sc->ctx_tag,
+				    sc->ctx_block[i],
+				    sc->ctx_map[i]);
+				sc->ctx_block[i] = NULL;
+			}
+
+			if (sc->ctx_map[i] != NULL) {
+				bus_dmamap_unload(
+					sc->ctx_tag,
+		    		sc->ctx_map[i]);
+				bus_dmamap_destroy(
+					sc->ctx_tag,
+				    sc->ctx_map[i]);
+				sc->ctx_map[i] = NULL;
+			}
+		}
+
+		/* Destroy the context memory tag. */
+		if (sc->ctx_tag != NULL) {
+			bus_dma_tag_destroy(sc->ctx_tag);
+			sc->ctx_tag = NULL;
+		}
+	}
 
 	/* Free, unmap and destroy all TX buffer descriptor chain pages. */
 	for (i = 0; i < TX_PAGES; i++ ) {
@@ -2250,6 +2516,21 @@ bce_dma_map_addr(void *arg, bus_dma_segm
 /* Allocates DMA memory needed for the various global structures needed by  */
 /* hardware.                                                                */
 /*                                                                          */
+/*                                                                          */
+/* Memory alignment requirements:                                           */
+/* -----------------+----------+----------+                                 */
+/*                  |   5706   |   5708   |   5709   |   5716   |           */
+/* -----------------+----------+----------+----------+----------+           */
+/* Status Block     | 8 bytes  | 8 bytes  | 16 bytes | 16 bytes |           */
+/* Statistics Block | 8 bytes  | 8 bytes  | 16 bytes | 16 bytes |           */
+/* RX Buffers       | 16 bytes | 16 bytes | 16 bytes | 16 bytes |           */
+/* PG Buffers       |   none   |   none   |   none   |   none   |           */
+/* TX Buffers       |   none   |   none   |   none   |   none   |           */
+/* Chain Pages(1)   |   4KiB   |   4KiB   |   4KiB   |   4KiB   |           */
+/* -----------------+----------+----------+----------+----------+           */
+/*                                                                          */
+/* (1) Must align with CPU page size (BCM_PAGE_SZIE).                       */
+/*                                                                          */
 /* Returns:                                                                 */
 /*   0 for success, positive value for failure.                             */
 /****************************************************************************/

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

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 19:16:34 2009
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 4B599106566C;
	Fri,  6 Nov 2009 19:16:34 +0000 (UTC)
	(envelope-from ambrisko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 38E328FC0C;
	Fri,  6 Nov 2009 19:16:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6JGYYX026356;
	Fri, 6 Nov 2009 19:16:34 GMT (envelope-from ambrisko@svn.freebsd.org)
Received: (from ambrisko@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6JGYrm026353;
	Fri, 6 Nov 2009 19:16:34 GMT (envelope-from ambrisko@svn.freebsd.org)
Message-Id: <200911061916.nA6JGYrm026353@svn.freebsd.org>
From: Doug Ambrisko 
Date: Fri, 6 Nov 2009 19:16:34 +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: r198998 - in stable/6/sys: amd64/amd64 i386/i386
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, 06 Nov 2009 19:16:34 -0000

Author: ambrisko
Date: Fri Nov  6 19:16:33 2009
New Revision: 198998
URL: http://svn.freebsd.org/changeset/base/198998

Log:
  Fix botched merge.  This was in an old repo. that I thought was current.
  Check in the real working code.
  
  Pointy hat to:	ambrisko

Modified:
  stable/6/sys/amd64/amd64/mp_machdep.c
  stable/6/sys/i386/i386/mp_machdep.c

Modified: stable/6/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- stable/6/sys/amd64/amd64/mp_machdep.c	Fri Nov  6 18:51:05 2009	(r198997)
+++ stable/6/sys/amd64/amd64/mp_machdep.c	Fri Nov  6 19:16:33 2009	(r198998)
@@ -133,6 +133,7 @@ struct cpu_info {
 	int	cpu_present:1;
 	int	cpu_bsp:1;
 	int	cpu_disabled:1;
+	int	cpu_hyperthread:1;
 } static cpu_info[MAX_APIC_ID + 1];
 static int cpu_apic_ids[MAXCPU];
 
@@ -342,11 +343,6 @@ cpu_mp_start(void)
 		KASSERT(boot_cpu_id == PCPU_GET(apic_id),
 		    ("BSP's APIC ID doesn't match boot_cpu_id"));
 
-	assign_cpu_ids();
-
-	/* Start each Application Processor */
-	start_all_aps();
-
 	/* Setup the initial logical CPUs info. */
 	logical_cpus = logical_cpus_mask = 0;
 	if (cpu_feature & CPUID_HTT)
@@ -394,6 +390,12 @@ cpu_mp_start(void)
 			hyperthreading_cpus = logical_cpus;
 	}
 
+	assign_cpu_ids();
+
+	/* Start each Application Processor */
+	start_all_aps();
+
+
 	set_interrupt_apic_ids();
 }
 
@@ -404,9 +406,10 @@ cpu_mp_start(void)
 void
 cpu_mp_announce(void)
 {
+	const char *hyperthread;
 	int i;
 
-	/* List active CPUs first. */
+	/* List Active CPUs first. */
 	printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id);
 	for (i = 1; i < mp_ncpus; i++) {
 		if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread)
@@ -414,7 +417,7 @@ cpu_mp_announce(void)
 		else
 			hyperthread = "";
 		printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread,
-		    cpu_apic_ids[i]);
+			cpu_apic_ids[i]);
 	}
 
 	/* List disabled CPUs last. */
@@ -426,7 +429,7 @@ cpu_mp_announce(void)
 		else
 			hyperthread = "";
 		printf("  cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread,
-		    i);
+			i);
 	}
 }
 
@@ -645,6 +648,9 @@ assign_cpu_ids(void)
 		if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp)
 			continue;
 
+		if (hyperthreading_cpus > 1 && i % hyperthreading_cpus != 0)
+			cpu_info[i].cpu_hyperthread = 1;
+
 		/* Don't use this CPU if it has been disabled by a tunable. */
 		if (resource_disabled("lapic", i)) {
 			cpu_info[i].cpu_disabled = 1;
@@ -655,18 +661,17 @@ assign_cpu_ids(void)
 	/*
 	 * Assign CPU IDs to local APIC IDs and disable any CPUs
 	 * beyond MAXCPU.  CPU 0 is always assigned to the BSP.
-	 *
+	 * 
 	 * To minimize confusion for userland, we attempt to number
-	 * CPUs such that all threads and cores in a package are
-	 * grouped together.  For now we assume that the BSP is always
+	 * CPUs such that all the threads and cores in a package are
+	 * grouped together. For now we assume that the BSP is always
 	 * the first thread in a package and just start adding APs
 	 * starting with the BSP's APIC ID.
 	 */
 	mp_ncpus = 1;
 	cpu_apic_ids[0] = boot_cpu_id;
-	apic_cpuids[boot_cpu_id] = 0;
-	for (i = boot_cpu_id + 1; i != boot_cpu_id;
-	     i == MAX_APIC_ID ? i = 0 : i++) {
+	for (i = boot_cpu_id + 1; i != boot_cpu_id; 
+		 i == MAX_APIC_ID ? i = 0 : i++) {
 		if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp ||
 		    cpu_info[i].cpu_disabled)
 			continue;

Modified: stable/6/sys/i386/i386/mp_machdep.c
==============================================================================
--- stable/6/sys/i386/i386/mp_machdep.c	Fri Nov  6 18:51:05 2009	(r198997)
+++ stable/6/sys/i386/i386/mp_machdep.c	Fri Nov  6 19:16:33 2009	(r198998)
@@ -217,6 +217,7 @@ struct cpu_info {
 	int	cpu_present:1;
 	int	cpu_bsp:1;
 	int	cpu_disabled:1;
+	int	cpu_hyperthread:1;
 } static cpu_info[MAX_APIC_ID + 1];
 static int cpu_apic_ids[MAXCPU];
 
@@ -418,11 +419,6 @@ cpu_mp_start(void)
 		KASSERT(boot_cpu_id == PCPU_GET(apic_id),
 		    ("BSP's APIC ID doesn't match boot_cpu_id"));
 
-	assign_cpu_ids();
-
-	/* Start each Application Processor */
-	start_all_aps();
-
 	/* Setup the initial logical CPUs info. */
 	logical_cpus = logical_cpus_mask = 0;
 	if (cpu_feature & CPUID_HTT)
@@ -470,6 +466,11 @@ cpu_mp_start(void)
 			hyperthreading_cpus = logical_cpus;
 	}
 
+	assign_cpu_ids();
+
+	/* Start each Application Processor */
+	start_all_aps();
+
 	set_interrupt_apic_ids();
 }
 
@@ -480,11 +481,12 @@ cpu_mp_start(void)
 void
 cpu_mp_announce(void)
 {
+	const char *hyperthread;
 	int i;
 
 	POSTCODE(MP_ANNOUNCE_POST);
 
-	/* List active CPUs first. */
+	/* List Active CPUs first. */
 	printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id);
 	for (i = 1; i < mp_ncpus; i++) {
 		if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread)
@@ -492,11 +494,11 @@ cpu_mp_announce(void)
 		else
 			hyperthread = "";
 		printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread,
-		    cpu_apic_ids[i]);
+				cpu_apic_ids[i]);
 	}
 
 	/* List disabled CPUs last. */
-	for (i = 0; i <= MAX_APIC_ID; i++) {
+	for (i=0 ; i<= MAX_APIC_ID; i++ ) {
 		if (!cpu_info[i].cpu_present || !cpu_info[i].cpu_disabled)
 			continue;
 		if (cpu_info[i].cpu_hyperthread)
@@ -504,7 +506,7 @@ cpu_mp_announce(void)
 		else
 			hyperthread = "";
 		printf("  cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread,
-		    i);
+			i);
 	}
 }
 
@@ -723,6 +725,9 @@ assign_cpu_ids(void)
 		if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp)
 			continue;
 
+		if (hyperthreading_cpus > 1 && i % hyperthreading_cpus != 0)
+			cpu_info[i].cpu_hyperthread = 1;
+
 		/* Don't use this CPU if it has been disabled by a tunable. */
 		if (resource_disabled("lapic", i)) {
 			cpu_info[i].cpu_disabled = 1;
@@ -735,16 +740,15 @@ assign_cpu_ids(void)
 	 * beyond MAXCPU.  CPU 0 is always assigned to the BSP.
 	 *
 	 * To minimize confusion for userland, we attempt to number
-	 * CPUs such that all threads and cores in a package are
-	 * grouped together.  For now we assume that the BSP is always
+	 * CPUs such that all the threads and cores in a package are
+	 * grouped together. For now we assume that the BSP is always
 	 * the first thread in a package and just start adding APs
 	 * starting with the BSP's APIC ID.
 	 */
 	mp_ncpus = 1;
 	cpu_apic_ids[0] = boot_cpu_id;
-	apic_cpuids[boot_cpu_id] = 0;
 	for (i = boot_cpu_id + 1; i != boot_cpu_id;
-	     i == MAX_APIC_ID ? i = 0 : i++) {
+		 i == MAX_APIC_ID ? i = 0 : i++) {
 		if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp ||
 		    cpu_info[i].cpu_disabled)
 			continue;

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 20:23:17 2009
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 0EDF7106568F;
	Fri,  6 Nov 2009 20:23:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D84EB8FC0C;
	Fri,  6 Nov 2009 20:23:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6KNGeR027617;
	Fri, 6 Nov 2009 20:23:16 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6KNGfE027615;
	Fri, 6 Nov 2009 20:23:16 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911062023.nA6KNGfE027615@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 6 Nov 2009 20:23:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199000 - stable/8/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Nov 2009 20:23:17 -0000

Author: jhb
Date: Fri Nov  6 20:23:16 2009
New Revision: 199000
URL: http://svn.freebsd.org/changeset/base/199000

Log:
  MFC 198367:
  Set the devclass_t pointer specified in the DRIVER_MODULE() macro
  sooner so it is always valid when a driver's identify routine is
  called.

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

Modified: stable/8/sys/kern/subr_bus.c
==============================================================================
--- stable/8/sys/kern/subr_bus.c	Fri Nov  6 20:07:16 2009	(r198999)
+++ stable/8/sys/kern/subr_bus.c	Fri Nov  6 20:23:16 2009	(r199000)
@@ -1049,9 +1049,10 @@ devclass_driver_added(devclass_t dc, dri
  * @param driver	the driver to register
  */
 static int
-devclass_add_driver(devclass_t dc, driver_t *driver, int pass)
+devclass_add_driver(devclass_t dc, driver_t *driver, int pass, devclass_t *dcp)
 {
 	driverlink_t dl;
+	const char *parentname;
 
 	PDEBUG(("%s", DRIVERNAME(driver)));
 
@@ -1072,9 +1073,17 @@ devclass_add_driver(devclass_t dc, drive
 	kobj_class_compile((kobj_class_t) driver);
 
 	/*
-	 * Make sure the devclass which the driver is implementing exists.
+	 * If the driver has any base classes, make the
+	 * devclass inherit from the devclass of the driver's
+	 * first base class. This will allow the system to
+	 * search for drivers in both devclasses for children
+	 * of a device using this driver.
 	 */
-	devclass_find_internal(driver->name, NULL, TRUE);
+	if (driver->baseclasses)
+		parentname = driver->baseclasses[0]->name;
+	else
+		parentname = NULL;
+	*dcp = devclass_find_internal(driver->name, parentname, TRUE);
 
 	dl->driver = driver;
 	TAILQ_INSERT_TAIL(&dc->drivers, dl, link);
@@ -4117,27 +4126,8 @@ driver_module_handler(module_t mod, int 
 		driver = dmd->dmd_driver;
 		PDEBUG(("Loading module: driver %s on bus %s (pass %d)",
 		    DRIVERNAME(driver), dmd->dmd_busname, pass));
-		error = devclass_add_driver(bus_devclass, driver, pass);
-		if (error)
-			break;
-
-		/*
-		 * If the driver has any base classes, make the
-		 * devclass inherit from the devclass of the driver's
-		 * first base class. This will allow the system to
-		 * search for drivers in both devclasses for children
-		 * of a device using this driver.
-		 */
-		if (driver->baseclasses) {
-			const char *parentname;
-			parentname = driver->baseclasses[0]->name;
-			*dmd->dmd_devclass =
-				devclass_find_internal(driver->name,
-				    parentname, TRUE);
-		} else {
-			*dmd->dmd_devclass =
-				devclass_find_internal(driver->name, NULL, TRUE);
-		}
+		error = devclass_add_driver(bus_devclass, driver, pass,
+		    dmd->dmd_devclass);
 		break;
 
 	case MOD_UNLOAD:

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 20:23:43 2009
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 315FD1065695;
	Fri,  6 Nov 2009 20:23:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 15FB68FC16;
	Fri,  6 Nov 2009 20:23:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6KNgMx027662;
	Fri, 6 Nov 2009 20:23:42 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6KNgLt027659;
	Fri, 6 Nov 2009 20:23:42 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911062023.nA6KNgLt027659@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 6 Nov 2009 20:23:42 +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: r199001 - in stable/7/sys: kern sys
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 06 Nov 2009 20:23:43 -0000

Author: jhb
Date: Fri Nov  6 20:23:42 2009
New Revision: 199001
URL: http://svn.freebsd.org/changeset/base/199001

Log:
  MFC 198367:
  Set the devclass_t pointer specified in the DRIVER_MODULE() macro
  sooner so it is always valid when a driver's identify routine is
  called.

Modified:
  stable/7/sys/kern/subr_bus.c
  stable/7/sys/sys/bus.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/subr_bus.c
==============================================================================
--- stable/7/sys/kern/subr_bus.c	Fri Nov  6 20:23:16 2009	(r199000)
+++ stable/7/sys/kern/subr_bus.c	Fri Nov  6 20:23:42 2009	(r199001)
@@ -858,9 +858,10 @@ devclass_find(const char *classname)
  * @param driver	the driver to register
  */
 int
-devclass_add_driver(devclass_t dc, driver_t *driver)
+devclass_add_driver(devclass_t dc, driver_t *driver, devclass_t *dcp)
 {
 	driverlink_t dl;
+	const char *parentname;
 	int i;
 
 	PDEBUG(("%s", DRIVERNAME(driver)));
@@ -878,9 +879,17 @@ devclass_add_driver(devclass_t dc, drive
 	kobj_class_compile((kobj_class_t) driver);
 
 	/*
-	 * Make sure the devclass which the driver is implementing exists.
+	 * If the driver has any base classes, make the
+	 * devclass inherit from the devclass of the driver's
+	 * first base class. This will allow the system to
+	 * search for drivers in both devclasses for children
+	 * of a device using this driver.
 	 */
-	devclass_find_internal(driver->name, NULL, TRUE);
+	if (driver->baseclasses)
+		parentname = driver->baseclasses[0]->name;
+	else
+		parentname = NULL;
+	*dcp = devclass_find_internal(driver->name, parentname, TRUE);
 
 	dl->driver = driver;
 	TAILQ_INSERT_TAIL(&dc->drivers, dl, link);
@@ -3853,27 +3862,8 @@ driver_module_handler(module_t mod, int 
 		driver = dmd->dmd_driver;
 		PDEBUG(("Loading module: driver %s on bus %s",
 		    DRIVERNAME(driver), dmd->dmd_busname));
-		error = devclass_add_driver(bus_devclass, driver);
-		if (error)
-			break;
-
-		/*
-		 * If the driver has any base classes, make the
-		 * devclass inherit from the devclass of the driver's
-		 * first base class. This will allow the system to
-		 * search for drivers in both devclasses for children
-		 * of a device using this driver.
-		 */
-		if (driver->baseclasses) {
-			const char *parentname;
-			parentname = driver->baseclasses[0]->name;
-			*dmd->dmd_devclass =
-				devclass_find_internal(driver->name,
-				    parentname, TRUE);
-		} else {
-			*dmd->dmd_devclass =
-				devclass_find_internal(driver->name, NULL, TRUE);
-		}
+		error = devclass_add_driver(bus_devclass, driver,
+		    dmd->dmd_devclass);
 		break;
 
 	case MOD_UNLOAD:

Modified: stable/7/sys/sys/bus.h
==============================================================================
--- stable/7/sys/sys/bus.h	Fri Nov  6 20:23:16 2009	(r199000)
+++ stable/7/sys/sys/bus.h	Fri Nov  6 20:23:42 2009	(r199001)
@@ -432,7 +432,8 @@ void	device_verbose(device_t dev);
 /*
  * Access functions for devclass.
  */
-int	devclass_add_driver(devclass_t dc, kobj_class_t driver);
+int	devclass_add_driver(devclass_t dc, kobj_class_t driver,
+			    devclass_t *dcp);
 int	devclass_delete_driver(devclass_t dc, kobj_class_t driver);
 devclass_t	devclass_create(const char *classname);
 devclass_t	devclass_find(const char *classname);

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 20:33:40 2009
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 A5D6C1065670;
	Fri,  6 Nov 2009 20:33:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7ABC98FC21;
	Fri,  6 Nov 2009 20:33:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6KXe8t027962;
	Fri, 6 Nov 2009 20:33:40 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6KXePD027960;
	Fri, 6 Nov 2009 20:33:40 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911062033.nA6KXePD027960@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 6 Nov 2009 20:33:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199003 - stable/8/usr.bin/vmstat
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, 06 Nov 2009 20:33:40 -0000

Author: jhb
Date: Fri Nov  6 20:33:40 2009
New Revision: 199003
URL: http://svn.freebsd.org/changeset/base/199003

Log:
  MFC 198620:
  When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts
  and sum them to form the total counts.

Modified:
  stable/8/usr.bin/vmstat/vmstat.c
Directory Properties:
  stable/8/usr.bin/vmstat/   (props changed)

Modified: stable/8/usr.bin/vmstat/vmstat.c
==============================================================================
--- stable/8/usr.bin/vmstat/vmstat.c	Fri Nov  6 20:32:26 2009	(r199002)
+++ stable/8/usr.bin/vmstat/vmstat.c	Fri Nov  6 20:33:40 2009	(r199003)
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -418,10 +419,90 @@ getuptime(void)
 }
 
 static void
+fill_pcpu(struct pcpu ***pcpup, int* maxcpup)
+{
+	struct pcpu **pcpu;
+	
+	int maxcpu, size, i;
+
+	*pcpup = NULL;
+	
+	if (kd == NULL)
+		return;
+
+	maxcpu = kvm_getmaxcpu(kd);
+	if (maxcpu < 0)
+		errx(1, "kvm_getmaxcpu: %s", kvm_geterr(kd));
+
+	pcpu = calloc(maxcpu, sizeof(struct pcpu *));
+	if (pcpu == NULL)
+		err(1, "calloc");
+
+	for (i = 0; i < maxcpu; i++) {
+		pcpu[i] = kvm_getpcpu(kd, i);
+		if (pcpu[i] == (struct pcpu *)-1)
+			errx(1, "kvm_getpcpu: %s", kvm_geterr(kd));
+	}
+
+	*maxcpup = maxcpu;
+	*pcpup = pcpu;
+}
+
+static void
+free_pcpu(struct pcpu **pcpu, int maxcpu)
+{
+	int i;
+
+	for (i = 0; i < maxcpu; i++)
+		free(pcpu[i]);
+	free(pcpu);
+}
+
+static void
 fill_vmmeter(struct vmmeter *vmmp)
 {
+	struct pcpu **pcpu;
+	int maxcpu, i;
+
 	if (kd != NULL) {
 		kread(X_SUM, vmmp, sizeof(*vmmp));
+		fill_pcpu(&pcpu, &maxcpu);
+		for (i = 0; i < maxcpu; i++) {
+			if (pcpu[i] == NULL)
+				continue;
+#define ADD_FROM_PCPU(i, name) \
+			vmmp->name += pcpu[i]->pc_cnt.name
+			ADD_FROM_PCPU(i, v_swtch);
+			ADD_FROM_PCPU(i, v_trap);
+			ADD_FROM_PCPU(i, v_syscall);
+			ADD_FROM_PCPU(i, v_intr);
+			ADD_FROM_PCPU(i, v_soft);
+			ADD_FROM_PCPU(i, v_vm_faults);
+			ADD_FROM_PCPU(i, v_cow_faults);
+			ADD_FROM_PCPU(i, v_cow_optim);
+			ADD_FROM_PCPU(i, v_zfod);
+			ADD_FROM_PCPU(i, v_ozfod);
+			ADD_FROM_PCPU(i, v_swapin);
+			ADD_FROM_PCPU(i, v_swapout);
+			ADD_FROM_PCPU(i, v_swappgsin);
+			ADD_FROM_PCPU(i, v_swappgsout);
+			ADD_FROM_PCPU(i, v_vnodein);
+			ADD_FROM_PCPU(i, v_vnodeout);
+			ADD_FROM_PCPU(i, v_vnodepgsin);
+			ADD_FROM_PCPU(i, v_vnodepgsout);
+			ADD_FROM_PCPU(i, v_intrans);
+			ADD_FROM_PCPU(i, v_tfree);
+			ADD_FROM_PCPU(i, v_forks);
+			ADD_FROM_PCPU(i, v_vforks);
+			ADD_FROM_PCPU(i, v_rforks);
+			ADD_FROM_PCPU(i, v_kthreads);
+			ADD_FROM_PCPU(i, v_forkpages);
+			ADD_FROM_PCPU(i, v_vforkpages);
+			ADD_FROM_PCPU(i, v_rforkpages);
+			ADD_FROM_PCPU(i, v_kthreadpages);
+#undef ADD_FROM_PCPU
+		}
+		free_pcpu(pcpu, maxcpu);
 	} else {
 		size_t size = sizeof(unsigned int);
 #define GET_VM_STATS(cat, name) \

From owner-svn-src-stable@FreeBSD.ORG  Fri Nov  6 20:33:54 2009
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 1A50F10656AE;
	Fri,  6 Nov 2009 20:33:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C291D8FC17;
	Fri,  6 Nov 2009 20:33:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA6KXrpO028003;
	Fri, 6 Nov 2009 20:33:53 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA6KXr20028001;
	Fri, 6 Nov 2009 20:33:53 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200911062033.nA6KXr20028001@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 6 Nov 2009 20:33:53 +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: r199004 - stable/7/usr.bin/vmstat
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, 06 Nov 2009 20:33:54 -0000

Author: jhb
Date: Fri Nov  6 20:33:53 2009
New Revision: 199004
URL: http://svn.freebsd.org/changeset/base/199004

Log:
  MFC 198620:
  When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts
  and sum them to form the total counts.

Modified:
  stable/7/usr.bin/vmstat/vmstat.c
Directory Properties:
  stable/7/usr.bin/vmstat/   (props changed)

Modified: stable/7/usr.bin/vmstat/vmstat.c
==============================================================================
--- stable/7/usr.bin/vmstat/vmstat.c	Fri Nov  6 20:33:40 2009	(r199003)
+++ stable/7/usr.bin/vmstat/vmstat.c	Fri Nov  6 20:33:53 2009	(r199004)
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -420,10 +421,90 @@ getuptime(void)
 }
 
 static void
+fill_pcpu(struct pcpu ***pcpup, int* maxcpup)
+{
+	struct pcpu **pcpu;
+	
+	int maxcpu, size, i;
+
+	*pcpup = NULL;
+	
+	if (kd == NULL)
+		return;
+
+	maxcpu = kvm_getmaxcpu(kd);
+	if (maxcpu < 0)
+		errx(1, "kvm_getmaxcpu: %s", kvm_geterr(kd));
+
+	pcpu = calloc(maxcpu, sizeof(struct pcpu *));
+	if (pcpu == NULL)
+		err(1, "calloc");
+
+	for (i = 0; i < maxcpu; i++) {
+		pcpu[i] = kvm_getpcpu(kd, i);
+		if (pcpu[i] == (struct pcpu *)-1)
+			errx(1, "kvm_getpcpu: %s", kvm_geterr(kd));
+	}
+
+	*maxcpup = maxcpu;
+	*pcpup = pcpu;
+}
+
+static void
+free_pcpu(struct pcpu **pcpu, int maxcpu)
+{
+	int i;
+
+	for (i = 0; i < maxcpu; i++)
+		free(pcpu[i]);
+	free(pcpu);
+}
+
+static void
 fill_vmmeter(struct vmmeter *vmmp)
 {
+	struct pcpu **pcpu;
+	int maxcpu, i;
+
 	if (kd != NULL) {
 		kread(X_SUM, vmmp, sizeof(*vmmp));
+		fill_pcpu(&pcpu, &maxcpu);
+		for (i = 0; i < maxcpu; i++) {
+			if (pcpu[i] == NULL)
+				continue;
+#define ADD_FROM_PCPU(i, name) \
+			vmmp->name += pcpu[i]->pc_cnt.name
+			ADD_FROM_PCPU(i, v_swtch);
+			ADD_FROM_PCPU(i, v_trap);
+			ADD_FROM_PCPU(i, v_syscall);
+			ADD_FROM_PCPU(i, v_intr);
+			ADD_FROM_PCPU(i, v_soft);
+			ADD_FROM_PCPU(i, v_vm_faults);
+			ADD_FROM_PCPU(i, v_cow_faults);
+			ADD_FROM_PCPU(i, v_cow_optim);
+			ADD_FROM_PCPU(i, v_zfod);
+			ADD_FROM_PCPU(i, v_ozfod);
+			ADD_FROM_PCPU(i, v_swapin);
+			ADD_FROM_PCPU(i, v_swapout);
+			ADD_FROM_PCPU(i, v_swappgsin);
+			ADD_FROM_PCPU(i, v_swappgsout);
+			ADD_FROM_PCPU(i, v_vnodein);
+			ADD_FROM_PCPU(i, v_vnodeout);
+			ADD_FROM_PCPU(i, v_vnodepgsin);
+			ADD_FROM_PCPU(i, v_vnodepgsout);
+			ADD_FROM_PCPU(i, v_intrans);
+			ADD_FROM_PCPU(i, v_tfree);
+			ADD_FROM_PCPU(i, v_forks);
+			ADD_FROM_PCPU(i, v_vforks);
+			ADD_FROM_PCPU(i, v_rforks);
+			ADD_FROM_PCPU(i, v_kthreads);
+			ADD_FROM_PCPU(i, v_forkpages);
+			ADD_FROM_PCPU(i, v_vforkpages);
+			ADD_FROM_PCPU(i, v_rforkpages);
+			ADD_FROM_PCPU(i, v_kthreadpages);
+#undef ADD_FROM_PCPU
+		}
+		free_pcpu(pcpu, maxcpu);
 	} else {
 		size_t size = sizeof(unsigned int);
 #define GET_VM_STATS(cat, name) \

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 10:44:46 2009
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 99AFD106566B;
	Sat,  7 Nov 2009 10:44:46 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 55E038FC0C;
	Sat,  7 Nov 2009 10:44:46 +0000 (UTC)
Received: from fledge.watson.org (fledge.watson.org [65.122.17.41])
	by cyrus.watson.org (Postfix) with ESMTPS id CC18646B23;
	Sat,  7 Nov 2009 05:44:45 -0500 (EST)
Date: Sat, 7 Nov 2009 10:44:45 +0000 (GMT)
From: Robert Watson 
X-X-Sender: robert@fledge.watson.org
To: John Baldwin 
In-Reply-To: <200911062033.nA6KXr20028001@svn.freebsd.org>
Message-ID: 
References: <200911062033.nA6KXr20028001@svn.freebsd.org>
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org
Subject: Re: svn commit: r199004 - stable/7/usr.bin/vmstat
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, 07 Nov 2009 10:44:46 -0000


On Fri, 6 Nov 2009, John Baldwin wrote:

>  MFC 198620:
>  When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts
>  and sum them to form the total counts.

At some point, we need to complete the migration to per-CPU stats for most of 
our statistics counters, as well as a migration to DPCPU to store them. 
Among other things, this will reduce the endemic problem we have with per-CPU 
stats from different CPUs being packed into the same cache line.  Once we do 
that, we'll probably want a libkvm utility routine for managing DPCPU 
retrievals.

Robert N M Watson
Computer Laboratory
University of Cambridge

>
> Modified:
>  stable/7/usr.bin/vmstat/vmstat.c
> Directory Properties:
>  stable/7/usr.bin/vmstat/   (props changed)
>
> Modified: stable/7/usr.bin/vmstat/vmstat.c
> ==============================================================================
> --- stable/7/usr.bin/vmstat/vmstat.c	Fri Nov  6 20:33:40 2009	(r199003)
> +++ stable/7/usr.bin/vmstat/vmstat.c	Fri Nov  6 20:33:53 2009	(r199004)
> @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
> #include 
> #include 
> #include 
> +#include 
>
> #include 
>
> @@ -420,10 +421,90 @@ getuptime(void)
> }
>
> static void
> +fill_pcpu(struct pcpu ***pcpup, int* maxcpup)
> +{
> +	struct pcpu **pcpu;
> +
> +	int maxcpu, size, i;
> +
> +	*pcpup = NULL;
> +
> +	if (kd == NULL)
> +		return;
> +
> +	maxcpu = kvm_getmaxcpu(kd);
> +	if (maxcpu < 0)
> +		errx(1, "kvm_getmaxcpu: %s", kvm_geterr(kd));
> +
> +	pcpu = calloc(maxcpu, sizeof(struct pcpu *));
> +	if (pcpu == NULL)
> +		err(1, "calloc");
> +
> +	for (i = 0; i < maxcpu; i++) {
> +		pcpu[i] = kvm_getpcpu(kd, i);
> +		if (pcpu[i] == (struct pcpu *)-1)
> +			errx(1, "kvm_getpcpu: %s", kvm_geterr(kd));
> +	}
> +
> +	*maxcpup = maxcpu;
> +	*pcpup = pcpu;
> +}
> +
> +static void
> +free_pcpu(struct pcpu **pcpu, int maxcpu)
> +{
> +	int i;
> +
> +	for (i = 0; i < maxcpu; i++)
> +		free(pcpu[i]);
> +	free(pcpu);
> +}
> +
> +static void
> fill_vmmeter(struct vmmeter *vmmp)
> {
> +	struct pcpu **pcpu;
> +	int maxcpu, i;
> +
> 	if (kd != NULL) {
> 		kread(X_SUM, vmmp, sizeof(*vmmp));
> +		fill_pcpu(&pcpu, &maxcpu);
> +		for (i = 0; i < maxcpu; i++) {
> +			if (pcpu[i] == NULL)
> +				continue;
> +#define ADD_FROM_PCPU(i, name) \
> +			vmmp->name += pcpu[i]->pc_cnt.name
> +			ADD_FROM_PCPU(i, v_swtch);
> +			ADD_FROM_PCPU(i, v_trap);
> +			ADD_FROM_PCPU(i, v_syscall);
> +			ADD_FROM_PCPU(i, v_intr);
> +			ADD_FROM_PCPU(i, v_soft);
> +			ADD_FROM_PCPU(i, v_vm_faults);
> +			ADD_FROM_PCPU(i, v_cow_faults);
> +			ADD_FROM_PCPU(i, v_cow_optim);
> +			ADD_FROM_PCPU(i, v_zfod);
> +			ADD_FROM_PCPU(i, v_ozfod);
> +			ADD_FROM_PCPU(i, v_swapin);
> +			ADD_FROM_PCPU(i, v_swapout);
> +			ADD_FROM_PCPU(i, v_swappgsin);
> +			ADD_FROM_PCPU(i, v_swappgsout);
> +			ADD_FROM_PCPU(i, v_vnodein);
> +			ADD_FROM_PCPU(i, v_vnodeout);
> +			ADD_FROM_PCPU(i, v_vnodepgsin);
> +			ADD_FROM_PCPU(i, v_vnodepgsout);
> +			ADD_FROM_PCPU(i, v_intrans);
> +			ADD_FROM_PCPU(i, v_tfree);
> +			ADD_FROM_PCPU(i, v_forks);
> +			ADD_FROM_PCPU(i, v_vforks);
> +			ADD_FROM_PCPU(i, v_rforks);
> +			ADD_FROM_PCPU(i, v_kthreads);
> +			ADD_FROM_PCPU(i, v_forkpages);
> +			ADD_FROM_PCPU(i, v_vforkpages);
> +			ADD_FROM_PCPU(i, v_rforkpages);
> +			ADD_FROM_PCPU(i, v_kthreadpages);
> +#undef ADD_FROM_PCPU
> +		}
> +		free_pcpu(pcpu, maxcpu);
> 	} else {
> 		size_t size = sizeof(unsigned int);
> #define GET_VM_STATS(cat, name) \
>

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 21:10:50 2009
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 1E41B106568B;
	Sat,  7 Nov 2009 21:10:50 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0C7488FC18;
	Sat,  7 Nov 2009 21:10:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7LAnnD063413;
	Sat, 7 Nov 2009 21:10:49 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7LAmwD063409;
	Sat, 7 Nov 2009 21:10:48 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911072110.nA7LAmwD063409@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 7 Nov 2009 21:10:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199022 - stable/8/games/fortune/datfiles
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, 07 Nov 2009 21:10:50 -0000

Author: dougb
Date: Sat Nov  7 21:10:48 2009
New Revision: 199022
URL: http://svn.freebsd.org/changeset/base/199022

Log:
  MFC r197797:
  s/Putluck Pogo/Potluck Pogo/
  
  MFC r198921:
  Grammar/formatting fix
  
  MFC 199021:
  Remove svn:executable from datfiles/gerrold.limerick

Modified:
  stable/8/games/fortune/datfiles/fortunes
  stable/8/games/fortune/datfiles/fortunes.sp.ok
Directory Properties:
  stable/8/games/fortune/   (props changed)
  stable/8/games/fortune/datfiles/   (props changed)
  stable/8/games/fortune/datfiles/gerrold.limerick   (props changed)

Modified: stable/8/games/fortune/datfiles/fortunes
==============================================================================
--- stable/8/games/fortune/datfiles/fortunes	Sat Nov  7 21:02:40 2009	(r199021)
+++ stable/8/games/fortune/datfiles/fortunes	Sat Nov  7 21:10:48 2009	(r199022)
@@ -18126,7 +18126,7 @@ tail on me, go ahead.  They'd be very bo
 		   commenting on rumors of womanizing.
 %
 Food for thought is no substitute for the real thing.
-		-- Walt Kelly, "Putluck Pogo"
+		-- Walt Kelly, "Potluck Pogo"
 %
 Foolproof Operation:
 	No provision for adjustment.
@@ -25228,7 +25228,8 @@ them scream.
 		-- Sylvestre Matuschka, "the Hungarian Train Wreck Freak",
 		   escaped prison 1937, not heard from since
 %
-Iam
+I
+am
 not
 very
 happy

Modified: stable/8/games/fortune/datfiles/fortunes.sp.ok
==============================================================================
--- stable/8/games/fortune/datfiles/fortunes.sp.ok	Sat Nov  7 21:02:40 2009	(r199021)
+++ stable/8/games/fortune/datfiles/fortunes.sp.ok	Sat Nov  7 21:10:48 2009	(r199022)
@@ -3300,6 +3300,7 @@ postjudice
 Postnews
 Postpetroleum
 potholes
+Potluck
 potty
 Poul
 Pournelle
@@ -3376,7 +3377,6 @@ Purshottam
 PUSHes
 pushy
 pussycats
-Putluck
 Putt's
 PVLC
 PxP

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 22:27:36 2009
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 00EC31065670;
	Sat,  7 Nov 2009 22:27:36 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E28CD8FC17;
	Sat,  7 Nov 2009 22:27:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7MRZ60065431;
	Sat, 7 Nov 2009 22:27:35 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7MRYpK065428;
	Sat, 7 Nov 2009 22:27:34 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911072227.nA7MRYpK065428@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 7 Nov 2009 22:27:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199026 - stable/8/games/fortune/datfiles
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, 07 Nov 2009 22:27:36 -0000

Author: dougb
Date: Sat Nov  7 22:27:34 2009
New Revision: 199026
URL: http://svn.freebsd.org/changeset/base/199026

Log:
  MFC r199023:
  Move VCS fortune to fortunes-o
  
  MFC 199025:
  Sort fortune

Modified:
  stable/8/games/fortune/datfiles/fortunes
  stable/8/games/fortune/datfiles/fortunes-o.real
Directory Properties:
  stable/8/games/fortune/   (props changed)
  stable/8/games/fortune/datfiles/   (props changed)

Modified: stable/8/games/fortune/datfiles/fortunes
==============================================================================
--- stable/8/games/fortune/datfiles/fortunes	Sat Nov  7 22:13:29 2009	(r199025)
+++ stable/8/games/fortune/datfiles/fortunes	Sat Nov  7 22:27:34 2009	(r199026)
@@ -69,6 +69,17 @@ either.  If you need some help, give us 
 
 		-- CommUNIXque 1:1, ASCAR Business Systems
 %
+			   1/2
+	12 + 144 + 20 + 3*4                    2
+	----------------------  +  5 * 11  =  9  +  0
+		  7
+
+A dozen, a gross and a score,
+Plus three times the square root of four,
+	Divided by seven,
+	Plus five times eleven,
+Equals nine squared plus zero, no more!
+%
 			-- Gifts for Children --
 
 This is easy.  You never have to figure out what to get for children,
@@ -674,17 +685,6 @@ Liza Minnelli.
 %
 	... with liberty and justice for all who can afford it.
 %
-			   1/2
-	12 + 144 + 20 + 3*4                    2
-	----------------------  +  5 * 11  =  9  +  0
-		  7
-
-A dozen, a gross and a score,
-Plus three times the square root of four,
-	Divided by seven,
-	Plus five times eleven,
-Equals nine squared plus zero, no more!
-%
 	7,140	pounds on the Sun
 	   97	pounds on Mercury or Mars
 	  255	pounds on Earth
@@ -2516,12 +2516,6 @@ other people to screw things up when you
 yourself for far less money.  This article can help you.
 		-- Dave Barry, "The Taming of the Screw"
 %
-	I'd say that VCS is more like the anal sex of the software
-world: Everybody talks about it, some people do it, some people enjoy
-it, but typically only vague implications about the best techniques
-are ever voiced in public.
-              -- Warner Losh, on Version Control Systems
-%
 	"I'll tell you what I know, then," he decided.  "The pin I'm wearing
 means I'm a member of the IA.  That's Inamorati Anonymous.  An inamorato is
 somebody in love.  That's the worst addiction of all."
@@ -33071,6 +33065,10 @@ versions of songs from The Wizard of Oz.
 %
 May a Misguided Platypus lay its Eggs in your Jockey Shorts
 %
+May all your Emus lay soft boiled eggs, and may all your
+Kangaroos be born with iPods already fitted.
+		-- Aussie New Years wish, found on hasselbladinfo.com
+%
 May all your PUSHes be POPped.
 %
 May Euell Gibbons eat your only copy of the manual!
@@ -59770,6 +59768,17 @@ You've been telling me to relax all the 
 and now you're telling me just to be myself?
 		-- The Return of the Secaucus Seven
 %
+You've decked the halls with a dozen miles' length of electric lights. 
+Your front lawn is a gleaming testament of incandescent wonder. The neighbors 
+wear sunglasses 24/7,  and orbiting satellites have officially picked up 
+and pinpointed your house as the brightest spot on earth.
+        
+You've finally put together the Christmas wonderland of your dreams... now 
+if only you could get a good picture of it.
+        
+Photographing holiday lights is no easy task. 
+		-- from an email sent by photojojo.com
+%
 You've got to have a gimmick if your band sucks.
 		-- Gary Giddens
 %
@@ -59810,18 +59819,3 @@ since I first called my brother's father
 Zymurgy's Law of Volunteer Labor:
 	People are always available for work in the past tense.
 %
-You've decked the halls with a dozen miles' length of electric lights. 
-Your front lawn is a gleaming testament of incandescent wonder. The neighbors 
-wear sunglasses 24/7,  and orbiting satellites have officially picked up 
-and pinpointed your house as the brightest spot on earth.
-        
-You've finally put together the Christmas wonderland of your dreams... now 
-if only you could get a good picture of it.
-        
-Photographing holiday lights is no easy task. 
-		-- from an email sent by photojojo.com
-%
-May all your Emus lay soft boiled eggs, and may all your
-Kangaroos be born with iPods already fitted.
-		-- Aussie New Years wish, found on hasselbladinfo.com
-%

Modified: stable/8/games/fortune/datfiles/fortunes-o.real
==============================================================================
--- stable/8/games/fortune/datfiles/fortunes-o.real	Sat Nov  7 22:13:29 2009	(r199025)
+++ stable/8/games/fortune/datfiles/fortunes-o.real	Sat Nov  7 22:27:34 2009	(r199026)
@@ -1153,6 +1153,12 @@ and stuck it in my back."
 	"Gabriel's trumpet will produce you from the ass of a pig."
 		-- Al Swearingen, E. B. Farnum, _Deadwood_
 %
+	I'd say that VCS is more like the anal sex of the software
+world: Everybody talks about it, some people do it, some people enjoy
+it, but typically only vague implications about the best techniques
+are ever voiced in public.
+              -- Warner Losh, on Version Control Systems
+%
 	"I'll tell ya, Jeb," Wilbur said to his friend, "the tractor
 business ain't doin' too well.  I ain't sold one all month.
 	"You think you've got problems?" Jeb replied.  "The other day, I went

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 22:40:15 2009
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 49EDA106566B;
	Sat,  7 Nov 2009 22:40:15 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3607A8FC13;
	Sat,  7 Nov 2009 22:40:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7MeErM065694;
	Sat, 7 Nov 2009 22:40:14 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7MeDDU065687;
	Sat, 7 Nov 2009 22:40:13 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911072240.nA7MeDDU065687@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 7 Nov 2009 22:40:13 +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: r199027 - stable/7/games/fortune/datfiles
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, 07 Nov 2009 22:40:15 -0000

Author: dougb
Date: Sat Nov  7 22:40:13 2009
New Revision: 199027
URL: http://svn.freebsd.org/changeset/base/199027

Log:
  Mass MFC of older commits to bring these files up to date with HEAD:
  r174581, r174597, r174897, r175017, r175129, r175213, r176638, r176639,
  r176764, r177781, r177879, r178604, r178605, r178662, r179960, r179987,
  r180286, r180341, r181207, r183691, r183707, r189448
  
  MFC r197797:
  s/Putluck Pogo/Potluck Pogo/
  
  MFC r198921:
  Grammar/formatting fix
  
  MFC 199021:
  Remove svn:executable from datfiles/gerrold.limerick
  
  MFC r199023:
  Move VCS fortune to fortunes-o
  
  MFC 199025:
  Sort fortune

Modified:
  stable/7/games/fortune/datfiles/fortunes
  stable/7/games/fortune/datfiles/fortunes-o.real
  stable/7/games/fortune/datfiles/fortunes.sp.ok
  stable/7/games/fortune/datfiles/gerrold.limerick   (contents, props changed)
  stable/7/games/fortune/datfiles/limerick
Directory Properties:
  stable/7/games/fortune/   (props changed)
  stable/7/games/fortune/datfiles/   (props changed)
  stable/7/games/fortune/datfiles/freebsd-tips   (props changed)

Modified: stable/7/games/fortune/datfiles/fortunes
==============================================================================
--- stable/7/games/fortune/datfiles/fortunes	Sat Nov  7 22:27:34 2009	(r199026)
+++ stable/7/games/fortune/datfiles/fortunes	Sat Nov  7 22:40:13 2009	(r199027)
@@ -69,6 +69,17 @@ either.  If you need some help, give us 
 
 		-- CommUNIXque 1:1, ASCAR Business Systems
 %
+			   1/2
+	12 + 144 + 20 + 3*4                    2
+	----------------------  +  5 * 11  =  9  +  0
+		  7
+
+A dozen, a gross and a score,
+Plus three times the square root of four,
+	Divided by seven,
+	Plus five times eleven,
+Equals nine squared plus zero, no more!
+%
 			-- Gifts for Children --
 
 This is easy.  You never have to figure out what to get for children,
@@ -674,17 +685,6 @@ Liza Minnelli.
 %
 	... with liberty and justice for all who can afford it.
 %
-			   1/2
-	12 + 144 + 20 + 3*4                    2
-	----------------------  +  5 * 11  =  9  +  0
-		  7
-
-A dozen, a gross and a score,
-Plus three times the square root of four,
-	Divided by seven,
-	Plus five times eleven,
-Equals nine squared plus zero, no more!
-%
 	7,140	pounds on the Sun
 	   97	pounds on Mercury or Mars
 	  255	pounds on Earth
@@ -2605,7 +2605,7 @@ man.  Mud-as-man alone could speak.
 	"Certainly," said man.
 	"Then I leave it to you to think of one for all of this," said God.
 	And He went away.
-		-- Kurt Vonnegut, Between Time and Timbuktu"
+		-- Kurt Vonnegut, "Between Time and Timbuktu"
 %
 	In the beginning there was data.  The data was without form and
 null, and darkness was upon the face of the console; and the Spirit of
@@ -10544,6 +10544,10 @@ Another day, another dollar.
 		   upon Hinckley's acquittal for shooting President Ronald
 		   Reagan.
 %
+Another flaw in the human character is that everybody wants to build
+and nobody wants to do maintenance.
+		-- Kurt Vonnegut, "Hocus Pocus"
+%
 Another good night not to sleep in a eucalyptus tree.
 %
 Another megabytes the dust.
@@ -11478,6 +11482,14 @@ As you will see, I told them, in no unce
 %
 As Zeus said to Narcissus, "Watch yourself."
 %
+Ascend to the high mountain pass,
+Cross the shallow side of the wide ocean.
+Do not give up to the great distance:
+It's by going that you will reach your aim.
+Be not discouraged by human frailty:
+You will overcome it if you try to.
+		-- Chinggis (Genghis) Khan 
+%
 ASCII:
 	The control code for all beginning programmers and those who would
 	become computer literate.  Etymologically, the term has come down as
@@ -13301,6 +13313,10 @@ were not hard, and money not scarce?
 Can anything be sadder than work left unfinished?
 Yes, work never begun.
 %
+"Can you be more stupid than aggravating the judge AND your lawyer?
+No? Oh yes you can: You can aggravate the whole kernel community."
+		-- Alexander Lyamin (about Hans Reisers murder trial)
+%
 Can you buy friendship?  You not only can, you must.  It's the
 only way to obtain friends.  Everything worthwhile has a price.
 		-- Robert J. Ringer
@@ -14234,6 +14250,12 @@ Computers are useless.  They can only gi
 Computers can figure out all kinds of problems, except the things in
 the world that just don't add up.
 %
+Computers can't cruise.  Meandering is a foreign concept to them.
+The computer assumes that all behavior is in pursuit of an ultimate
+goal.  Whenever a motorist changes his or her mind and veers off
+course, the GPS lady issues that snippy announcement: "Recalculating!"
+		-- Joel Achenbach (www.slate.com, 20 Jun 2008)
+%
 Computers don't actually think.
 	You just think they think.
 		(We think.)
@@ -15974,6 +15996,9 @@ Don't marry for money; you can borrow it
 %
 Don't mind him; politicians always sound like that.
 %
+Don't patch bad code -- rewrite it.
+		-- "The Elements of Programming Style", Kernighan and Plauger
+%
 Don't plan any hasty moves.
 You'll be evicted soon anyway.
 %
@@ -18095,7 +18120,7 @@ tail on me, go ahead.  They'd be very bo
 		   commenting on rumors of womanizing.
 %
 Food for thought is no substitute for the real thing.
-		-- Walt Kelly, "Putluck Pogo"
+		-- Walt Kelly, "Potluck Pogo"
 %
 Foolproof Operation:
 	No provision for adjustment.
@@ -19475,20 +19500,6 @@ engaging a suitable stereotype protagoni
 president, political party, etc.) to consummate the act of social
 schizophrenia in mass genocide.
 %
-From dusk till dawn
-I gathered people and their crown
-Conquered the hearts of
-Not too few
-United the heads of
-Now too humble.
-When weaken your mind
-Don?t get weakened
-When tired of thinking
-Don?t get tired
-My sons and descendants
-Don?t get exhausted in mind and thought and but get experienced.
-		-- Chinggis (Genghis) Khan
-%
 From Italian tourist guide:
 
 	"Non stop trains to Roma Termini Station leave from 7.38
@@ -22722,6 +22733,10 @@ steer clear of me at parties.  Often, as
 they don't even invite me.
 		-- Dave Barry
 %
+I asked a teacher what the opposite of a miracle was and she, without
+thinking, I assume, said it was an act of God.
+			-- Terry Prachett (Daily Mail 21 june 2008)
+%
 I asked the engineer who designed the communication terminal's keyboards
 why these were not manufactured in a central facility, in view of the
 small number needed [1 per month] in his factory.  He explained that this
@@ -23934,6 +23949,9 @@ I like myself, but I won't say I'm as ha
 that kidnaped Europa.
 		-- Marcus Tullius Cicero
 %
+I like paying taxes.  With them I buy civilization.
+		-- Oliver Wendell Holmes
+%
 I like to believe that people in the long run are going to do more to
 promote peace than our governments.  Indeed, I think that people want
 peace so much that one of these days governments had better get out of
@@ -25207,7 +25225,8 @@ them scream.
 		-- Sylvestre Matuschka, "the Hungarian Train Wreck Freak",
 		   escaped prison 1937, not heard from since
 %
-Iam
+I
+am
 not
 very
 happy
@@ -26017,16 +26036,6 @@ If Karl, instead of writing a lot about 
 had made a lot of Capital, it would have been much better.
 		-- Karl Marx's Mother
 %
-If Khaan behaves as serfs
-Lose entire states and all estates.
-If serfs behave as Khaan
-He will regret for his head.
-In time of friendship and harmony
-Befriend as closely
-In time of conflict with enemies
-Be falcon of advance and attacks
-		-- Chinggis (Genghis) Khan
-%
 If life gives you lemons, make lemonade.
 %
 If life is a stage, I want some better lighting.
@@ -26576,6 +26585,9 @@ theirs, then you clearly don't understan
 %
 If you can lead it to water and force it to drink, it isn't a horse.
 %
+If you can not say it, you can not whistle it, either.
+		-- Wittgenstein
+%
 If you can read this, you're too close.
 %
 If you can survive death, you can probably survive anything.
@@ -27145,6 +27157,15 @@ I guess you do have a problem.
 %
 If your life was a horse, you'd have to shoot it.
 %
+If your mind grows weak,
+Don't yield to the weakness.
+Even if tired of thought,
+Never stop thinking.
+My sons and descendants,
+Don't get exhausted in reason--
+But become experienced.
+		-- Chinggis (Genghis) Khan
+%
 If your mother knew what you're doing,
 she'd probably hang her head and cry.
 %
@@ -28096,6 +28117,10 @@ _s_e_e the high-water mark -- the pla
 rolled back.
 		-- Hunter S. Thompson, "Fear and Loathing in Las Vegas"
 %
+"In the age of the internet attaching a famous name to your personal
+opinion to give more weight to it is a very valid strategy."
+		-- Benjamin Franklin
+%
 In the beginning there was nothing.  And the Lord said "Let There Be Light!"
 And still there was nothing, but at least now you could see it.
 %
@@ -28245,6 +28270,12 @@ different kinds of weather inside of 24 
 %
 In the stairway of life, you'd best take the elevator.
 %
+In the time of peace and harmony
+Be a kind-hearted friend.
+In the time of conflict with enemies
+Be a falcon of advance and attack.
+		-- Chinggis (Genghis) Khan
+%
 In the Top 40, half the songs are secret messages to the teen world to drop
 out, turn on, and groove with the chemicals and light shows at discotheques.
 		-- Art Linkletter
@@ -29420,15 +29451,6 @@ they'll come out for it.
 		-- Red Skelton, surveying the funeral of Hollywood
 		   mogul Harry Cohn
 %
-
-It ruins mind
-It exhausts wealth
-When it reaches to the tongue
-It is like a mosquito
-When it relives from tongue
-It is like an elephant.
-		-- Boorchi (first of 9 knights of Chinggis (Genghis) Khan)
-%
 It runs like _x, where _x is something unsavory.
 		-- Prof. Romas Aleliunas, CS 435
 %
@@ -31219,11 +31241,10 @@ for Loeb, George came back to the fold, 
 around his neck.
 		-- Dave Barry
 %
-
-Let my petty body exhausted,
-But not my state nature.
-Let my whole body exhausted
-But not my entire state
+Let my own body be exhausted,
+But not the wealth of my state.
+Let my mortal body vanish,
+But not the power of my state.
 		-- Chinggis (Genghis) Khan
 %
 Let no guilty man escape.
@@ -31238,7 +31259,7 @@ Let sleeping dogs lie.
 		-- Charles Dickens
 %
 Let the machine do the dirty work.
-		-- "Elements of Programming Style", Kernighan and Ritchie
+		-- "The Elements of Programming Style", Kernighan and Plauger
 %
 Let the meek inherit the earth -- they have it coming to them.
 		-- James Thurber
@@ -33047,6 +33068,10 @@ versions of songs from The Wizard of Oz.
 %
 May a Misguided Platypus lay its Eggs in your Jockey Shorts
 %
+May all your Emus lay soft boiled eggs, and may all your
+Kangaroos be born with iPods already fitted.
+		-- Aussie New Years wish, found on hasselbladinfo.com
+%
 May all your PUSHes be POPped.
 %
 May Euell Gibbons eat your only copy of the manual!
@@ -34277,6 +34302,11 @@ My own dear love, he is all my world --
 	And I wish I'd never met him.
 		-- Dorothy Parker, part 1
 %
+My own feelings are perhaps best described by saying that I am
+perfectly aware that there is no Royal Road to Mathematics, in other
+words, that I have only a very small head and must live with it.
+		-- Edsger W. Dijkstra
+%
 My own life has been spent chronicling the rise and fall of human systems,
 and I am convinced that we are terribly vulnerable.  ...  We should be
 reluctant to turn back upon the frontier of this epoch. Space is indifferent
@@ -43297,14 +43327,6 @@ the "Gaslight" treatment, the "Are you t
 implication.  Advance to manipulation and humiliation.  Above all, relax
 and have a nice day.
 %
-Strive to the pass of high mountain
-Cross in the shallow side of the wide ocean
-Do not give up because of distance
-Will certainly reach if walks
-Do not discourage of human
-Shall overcome if you try
-		-- Chinggis (Genghis) Khan
-%
 Stuckness shouldn't be avoided.  It's the psychic predecessor of all
 real understanding.  An egoless acceptance of stuckness is a key to an
 understanding of all Quality, in mechanical work as in other endeavors.
@@ -43827,10 +43849,10 @@ Technological progress has merely provid
 with more efficient means for going backwards.
 		-- Aldous Huxley
 %
-Teeth for meat is in mouth
-Teeth for human is in soul.
-Win one with your body strength
-Win many with your mind strength
+Teeth for meat are in the mouth --
+Teeth for humans are in the soul.
+A strong body defeats one,
+A strong soul conquers many.
 		-- Chinggis (Genghis) Khan
 %
 Tehee quod she, and clapte the wyndow to.
@@ -45337,6 +45359,9 @@ endow them with any special qualities of
 compassion.
 		-- Saul Alinsky
 %
+The fall of the USSR proves you wrong.
+		-- Aryeh M. Friedman
+%
 The famous politician was trying to save both his faces.
 %
 The farther you go, the less you know.
@@ -49231,7 +49256,7 @@ round in the worst cars available," he s
 admit it, I tell him, `Forget it'.  If they bring a car back late we
 overlook it.  If they've had a crash and it doesn't involve another vehicle
 we might overlook that too."
-	"Where's the ashtray?" asked on Los Angeles wife, as she settled
+	"Where's the ashtray?" asked one Los Angeles wife, as she settled
 into the ripped interior.  "Honey," said her husband, "the whole car's the
 ash tray."
 		-- Stephen Pile, "The Book of Heroic Failures"
@@ -50777,6 +50802,14 @@ Things are more like they used to be tha
 Things are not always what they seem.
 		-- Phaedrus
 %
+Things Charles Darwin did not say:
+
+Finches, eh ? Seen one, seem 'em all.
+%
+Things Charles Darwin did not say:
+
+Nah, it's only a theory - I don't think it should be taught in schools.
+%
 Things equal to nothing else are equal to each other.
 %
 Things fall apart; the centre cannot hold.
@@ -52167,6 +52200,9 @@ the Thanksgiving festivities of that cit
 the affair," and of course be sadly disappointed thereby.
 		-- Sacramento Daily Union, November 29, 1861
 %
+Too many of his [Mozart's] works sound like interoffice memos.
+		-- Glenn Gould
+%
 Too many people are thinking of security instead of opportunity.
 They seem more afraid of life than death.
 		-- James F. Byrnes
@@ -53841,7 +53877,7 @@ but we always respect their good judgmen
 ...we must be wary of granting too much power to natural selection
 by viewing all basic capacities of our brain as direct adaptations.
 I do not doubt that natural selection acted in building our oversized
-brains -- and I am equally confidant that our brains became large as
+brains -- and I am equally confident that our brains became large as
 an adaptation for definite roles (probably a complex set of interacting
 functions).  But these assumptions do not lead to the notion, often
 uncritically embraced by strict Darwinians, that all major capacities
@@ -53858,7 +53894,7 @@ We must die because we have known them.
 We must finish once and for all with the neutrality of chess.  We must
 condemn once and for all the formula 'chess for the sake of chess,' like
 the formula 'art for art's sake.'  We must organize shock-brigades of
-chess-play ers, and begin the immediate realization of a Five-Year Plan
+chess-players, and begin the immediate realization of a Five-Year Plan
 for chess.
 		-- Nikolai V. Krylenko, People's Commissar for Justice
 		   (of RFSFR, later of USSR), speaking at a 1932 Congress
@@ -55469,6 +55505,12 @@ winter with slightly over half that quan
 %
 When I kill, the only thing I feel is recoil.
 %
+When I look at the horse heads and men's faces, the immense
+live torrent once raised by my will and now whirling to
+nowhere through the red sunset desert, I often wonder where
+I am in this torrent.
+		-- Chinggis (Genghis) Khan
+%
 When I said "we", officer, I was referring to
 myself, the four young ladies, and, of course, the goat.
 %
@@ -56260,6 +56302,9 @@ and perhaps weigh 1 1/2 tons.
 %
 Where am I?  Who am I?  Am I?  I
 %
+Where am I, and what am I doing in this handbasket?
+		-- Mark A. Matthews, to Wes Peters, circa 1996
+%
 Where are the calculations that go with a calculated risk?
 %
 WHERE CAN THE MATTER BE
@@ -59726,6 +59771,17 @@ You've been telling me to relax all the 
 and now you're telling me just to be myself?
 		-- The Return of the Secaucus Seven
 %
+You've decked the halls with a dozen miles' length of electric lights. 
+Your front lawn is a gleaming testament of incandescent wonder. The neighbors 
+wear sunglasses 24/7,  and orbiting satellites have officially picked up 
+and pinpointed your house as the brightest spot on earth.
+        
+You've finally put together the Christmas wonderland of your dreams... now 
+if only you could get a good picture of it.
+        
+Photographing holiday lights is no easy task. 
+		-- from an email sent by photojojo.com
+%
 You've got to have a gimmick if your band sucks.
 		-- Gary Giddens
 %

Modified: stable/7/games/fortune/datfiles/fortunes-o.real
==============================================================================
--- stable/7/games/fortune/datfiles/fortunes-o.real	Sat Nov  7 22:27:34 2009	(r199026)
+++ stable/7/games/fortune/datfiles/fortunes-o.real	Sat Nov  7 22:40:13 2009	(r199027)
@@ -755,7 +755,7 @@ see Sir Lancelot riding hard to catch up
 	"What is amiss, my friend?" asked the king.
 	"My lord," gasped Lancelot, "you have given me the wrong key!"
 %
-	"Before we get married," said the young woman to her fiancee,
+	"Before we get married," said the young woman to her fiance,
 "I want to confess some affairs that I've had in the past."
 	"But you told me all about those a few weeks ago," her young man
 replied.
@@ -1153,6 +1153,12 @@ and stuck it in my back."
 	"Gabriel's trumpet will produce you from the ass of a pig."
 		-- Al Swearingen, E. B. Farnum, _Deadwood_
 %
+	I'd say that VCS is more like the anal sex of the software
+world: Everybody talks about it, some people do it, some people enjoy
+it, but typically only vague implications about the best techniques
+are ever voiced in public.
+              -- Warner Losh, on Version Control Systems
+%
 	"I'll tell ya, Jeb," Wilbur said to his friend, "the tractor
 business ain't doin' too well.  I ain't sold one all month.
 	"You think you've got problems?" Jeb replied.  "The other day, I went

Modified: stable/7/games/fortune/datfiles/fortunes.sp.ok
==============================================================================
--- stable/7/games/fortune/datfiles/fortunes.sp.ok	Sat Nov  7 22:27:34 2009	(r199026)
+++ stable/7/games/fortune/datfiles/fortunes.sp.ok	Sat Nov  7 22:40:13 2009	(r199027)
@@ -3300,6 +3300,7 @@ postjudice
 Postnews
 Postpetroleum
 potholes
+Potluck
 potty
 Poul
 Pournelle
@@ -3376,7 +3377,6 @@ Purshottam
 PUSHes
 pushy
 pussycats
-Putluck
 Putt's
 PVLC
 PxP

Modified: stable/7/games/fortune/datfiles/gerrold.limerick
==============================================================================
--- stable/7/games/fortune/datfiles/gerrold.limerick	Sat Nov  7 22:27:34 2009	(r199026)
+++ stable/7/games/fortune/datfiles/gerrold.limerick	Sat Nov  7 22:40:13 2009	(r199027)
@@ -39,7 +39,7 @@ rights reserved, used with permission of
 I have written some limericks quite fateful,
 malicious and vicious and hateful;
 	but I've torn up the jokes
-	that will sicken most folks,
+	that would sicken most folks,
 and humanity ought to be grateful.
 
 From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all
@@ -215,7 +215,7 @@ rights reserved, used with permission of
 %
 There was a young lady quite tearful.
 Of sucking a cock, she was fearful.
-	In a moment of dreard,
+	In a moment of dread,
 	she just turned her head.
 And, boy! Did she get an earful!
 
@@ -499,7 +499,7 @@ Rick promised to gently deflower
 a maiden who lived on South Gower,
 	(The truth is, he spread
 	her legs wide on the bed,
-and finsihed her off in an hour.)
+and finished her off in an hour.)
 
 From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all
 rights reserved, used with permission of the author.
@@ -531,15 +531,6 @@ and left her all dried up and squinty.
 From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all
 rights reserved, used with permission of the author.
 %
-I have written some limericks quite fateful,
-malicious and vicious and hateful;
-	but I've torn up the jokes
-	that would sicken most folks,
-and humanity ought ot be grateful;
-
-From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all
-rights reserved, used with permission of the author.
-%
 Here's the tale of Benjamin Sneed:
 Where others were two'd he was three'd
 	and when they unmasked it,
@@ -552,7 +543,7 @@ rights reserved, used with permission of
 A maiden who had a third breast
 always kept her hand close to her chest,
 	and I promised her well
-	that I never woudl tell.
+	that I never would tell.
 (Write me privately. Name on request.)
 
 From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all
@@ -741,7 +732,7 @@ tie me up in some chains that are clinky
 Just get the straps and the slings and a shipment
 	of high-grade Vaseline,
 	and a strong trampoline,
-and allof the other equipment!"
+and all of the other equipment!"
 
 "Now, when we get all the bedsprings a-drummin',
 that's when I'll start in a-hummin',
@@ -769,7 +760,7 @@ rights reserved, used with permission of
 %
 The speed of Ed's seed is unclocked
 whenever a lady's unfrocked.
-	Tho' his spirit is willin,
+	Tho' his spirit is willin',
 	when a pussy needs fillin',
 he's a man who goes off half-cocked.
 
@@ -815,7 +806,7 @@ rights reserved, used with permission of
 A king who was mad at the time,
 decreed limerick writing a crime.
 	but late in the night
-	all the poets woudl write
+	all the poets would write
 verses without any rhyme or meter.
 
 From The War Against The Chtorr, (c) David Gerrold, 1984-2000, all

Modified: stable/7/games/fortune/datfiles/limerick
==============================================================================
--- stable/7/games/fortune/datfiles/limerick	Sat Nov  7 22:27:34 2009	(r199026)
+++ stable/7/games/fortune/datfiles/limerick	Sat Nov  7 22:40:13 2009	(r199027)
@@ -4421,7 +4421,7 @@ And secretly finger his dong.
 There was an old man of St. Bees,
 Who was stung in the arm by a wasp.
 	When asked, "Does it hurt?"
-	He relied, "No, it doesn't.
+	He replied, "No, it doesn't.
 I'm so glad that it wasn't a hornet."
 		-- W.S. Gilbert
 %

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 22:47:14 2009
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 7F290106568F;
	Sat,  7 Nov 2009 22:47:14 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6D8888FC0A;
	Sat,  7 Nov 2009 22:47:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7MlEWb065876;
	Sat, 7 Nov 2009 22:47:14 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7MlCDT065874;
	Sat, 7 Nov 2009 22:47:12 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911072247.nA7MlCDT065874@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 7 Nov 2009 22:47:12 +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: r199028 - stable/7/games/fortune/datfiles
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, 07 Nov 2009 22:47:14 -0000

Author: dougb
Date: Sat Nov  7 22:47:12 2009
New Revision: 199028
URL: http://svn.freebsd.org/changeset/base/199028

Log:
  Manually remove a duplicate fortune that I cannot find the commit log for

Modified:
  stable/7/games/fortune/datfiles/fortunes

Modified: stable/7/games/fortune/datfiles/fortunes
==============================================================================
--- stable/7/games/fortune/datfiles/fortunes	Sat Nov  7 22:40:13 2009	(r199027)
+++ stable/7/games/fortune/datfiles/fortunes	Sat Nov  7 22:47:12 2009	(r199028)
@@ -23567,9 +23567,6 @@ but I can't prove it.
 I have a very firm grasp on reality!  I can reach out and strangle it
 any time!
 %
-I have a very small mind and must live with it.
-		-- Edsger W. Dijkstra
-%
 I have a very strange feeling about this...
 		-- Luke Skywalker
 %

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 22:55:08 2009
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 B33221065676;
	Sat,  7 Nov 2009 22:55:08 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3])
	by mx1.freebsd.org (Postfix) with ESMTP id 623548FC0C;
	Sat,  7 Nov 2009 22:55:08 +0000 (UTC)
Received: from localhost (amavis.fra.cksoft.de [192.168.74.71])
	by mail.cksoft.de (Postfix) with ESMTP id 0237641C711;
	Sat,  7 Nov 2009 23:55:07 +0100 (CET)
X-Virus-Scanned: amavisd-new at cksoft.de
Received: from mail.cksoft.de ([195.88.108.3])
	by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new,
	port 10024)
	with ESMTP id ON1JVvPpEZTE; Sat,  7 Nov 2009 23:55:06 +0100 (CET)
Received: by mail.cksoft.de (Postfix, from userid 66)
	id 508A741C710; Sat,  7 Nov 2009 23:55:06 +0100 (CET)
Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net
	[10.111.66.10])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.int.zabbadoz.net (Postfix) with ESMTP id 545634448E6;
	Sat,  7 Nov 2009 22:51:06 +0000 (UTC)
Date: Sat, 7 Nov 2009 22:51:06 +0000 (UTC)
From: "Bjoern A. Zeeb" 
X-X-Sender: bz@maildrop.int.zabbadoz.net
To: Doug Barton 
In-Reply-To: <200911072227.nA7MRYpK065428@svn.freebsd.org>
Message-ID: <20091107225012.T37440@maildrop.int.zabbadoz.net>
References: <200911072227.nA7MRYpK065428@svn.freebsd.org>
X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r199026 - stable/8/games/fortune/datfiles
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, 07 Nov 2009 22:55:08 -0000

On Sat, 7 Nov 2009, Doug Barton wrote:

> Author: dougb
> Date: Sat Nov  7 22:27:34 2009
> New Revision: 199026
> URL: http://svn.freebsd.org/changeset/base/199026
>
> Log:
>  MFC r199023:
>  Move VCS fortune to fortunes-o
>
>  MFC 199025:
>  Sort fortune

Even for things like fortune files we usually do not do insta-MFCs; is
there any reason this needed to be done?


-- 
Bjoern A. Zeeb         It will not break if you know what you are doing.

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 22:59:04 2009
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 D6FCE106568D;
	Sat,  7 Nov 2009 22:59:04 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C5C4D8FC08;
	Sat,  7 Nov 2009 22:59:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7Mx446066170;
	Sat, 7 Nov 2009 22:59:04 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7Mx4wY066168;
	Sat, 7 Nov 2009 22:59:04 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911072259.nA7Mx4wY066168@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 7 Nov 2009 22:59:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199029 - stable/8/etc
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, 07 Nov 2009 22:59:04 -0000

Author: dougb
Date: Sat Nov  7 22:59:04 2009
New Revision: 199029
URL: http://svn.freebsd.org/changeset/base/199029

Log:
  MFC r198162:
  
  Allow $name_program to override $command in a more robust way that
  will not cause the value to be null if $command is not set.

Modified:
  stable/8/etc/rc.subr
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/rc.subr
==============================================================================
--- stable/8/etc/rc.subr	Sat Nov  7 22:47:12 2009	(r199028)
+++ stable/8/etc/rc.subr	Sat Nov  7 22:59:04 2009	(r199029)
@@ -588,7 +588,7 @@ run_rc_command()
 	esac
 
 	eval _override_command=\$${name}_program
-	command=${command:+${_override_command:-$command}}
+	command=${_override_command:-$command}
 
 	_keywords="start stop restart rcvar $extra_commands"
 	rc_pid=

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 23:19:37 2009
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 98590106568F;
	Sat,  7 Nov 2009 23:19:37 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6D51D8FC13;
	Sat,  7 Nov 2009 23:19:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7NJb2I066695;
	Sat, 7 Nov 2009 23:19:37 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7NJbU7066694;
	Sat, 7 Nov 2009 23:19:37 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911072319.nA7NJbU7066694@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 7 Nov 2009 23:19: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: r199030 - stable/7/etc
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, 07 Nov 2009 23:19:37 -0000

Author: dougb
Date: Sat Nov  7 23:19:36 2009
New Revision: 199030
URL: http://svn.freebsd.org/changeset/base/199030

Log:
  Pull mergeinfo for r194088 and r194107 up from termcap.small into etc/

Modified:
Directory Properties:
  stable/7/etc/   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 23:24:18 2009
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 2C256106566B;
	Sat,  7 Nov 2009 23:24:18 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 00BB68FC17;
	Sat,  7 Nov 2009 23:24:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7NOH9s066844;
	Sat, 7 Nov 2009 23:24:17 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7NOHeX066843;
	Sat, 7 Nov 2009 23:24:17 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911072324.nA7NOHeX066843@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 7 Nov 2009 23:24:17 +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: r199031 - stable/7/etc
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, 07 Nov 2009 23:24:18 -0000

Author: dougb
Date: Sat Nov  7 23:24:17 2009
New Revision: 199031
URL: http://svn.freebsd.org/changeset/base/199031

Log:
  Forcibly remove the svn:mergeinfo on this file now that it's been
  pulled up into etc/

Modified:
Directory Properties:
  stable/7/etc/termcap.small   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Sat Nov  7 23:37:29 2009
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 C5749106566B;
	Sat,  7 Nov 2009 23:37:29 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B40A68FC0C;
	Sat,  7 Nov 2009 23:37:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7NbT25067124;
	Sat, 7 Nov 2009 23:37:29 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA7NbTE0067122;
	Sat, 7 Nov 2009 23:37:29 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200911072337.nA7NbTE0067122@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 7 Nov 2009 23:37: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: r199032 - stable/7/etc
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, 07 Nov 2009 23:37:29 -0000

Author: dougb
Date: Sat Nov  7 23:37:29 2009
New Revision: 199032
URL: http://svn.freebsd.org/changeset/base/199032

Log:
  MFC r198162:
  
  Allow $name_program to override $command in a more robust way that
  will not cause the value to be null if $command is not set.

Modified:
  stable/7/etc/rc.subr
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/rc.subr
==============================================================================
--- stable/7/etc/rc.subr	Sat Nov  7 23:24:17 2009	(r199031)
+++ stable/7/etc/rc.subr	Sat Nov  7 23:37:29 2009	(r199032)
@@ -565,7 +565,7 @@ run_rc_command()
 	esac
 
 	eval _override_command=\$${name}_program
-	command=${command:+${_override_command:-$command}}
+	command=${_override_command:-$command}
 
 	_keywords="start stop restart rcvar $extra_commands"
 	rc_pid=