From owner-svn-src-stable-7@FreeBSD.ORG Sun Jan 30 21:00:57 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1AF0106566B; Sun, 30 Jan 2011 21:00:57 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0F888FC12; Sun, 30 Jan 2011 21:00: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 p0UL0veP085663; Sun, 30 Jan 2011 21:00:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0UL0vAP085661; Sun, 30 Jan 2011 21:00:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201101302100.p0UL0vAP085661@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 30 Jan 2011 21:00: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: r218104 - stable/7/lib/libc/sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 21:00:58 -0000 Author: jilles Date: Sun Jan 30 21:00:57 2011 New Revision: 218104 URL: http://svn.freebsd.org/changeset/base/218104 Log: MFC r217704: getgroups(2): Remove and refer to sysconf(3). Because {NGROUPS_MAX} may become variable, its value should be obtained using sysconf(3). In head, r217704 removed mention of ; this was not mentioned in stable/7. Modified: stable/7/lib/libc/sys/getgroups.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sys/getgroups.2 ============================================================================== --- stable/7/lib/libc/sys/getgroups.2 Sun Jan 30 20:38:26 2011 (r218103) +++ stable/7/lib/libc/sys/getgroups.2 Sun Jan 30 21:00:57 2011 (r218104) @@ -28,7 +28,7 @@ .\" @(#)getgroups.2 8.2 (Berkeley) 4/16/94 .\" $FreeBSD$ .\" -.Dd March 5, 1999 +.Dd January 21, 2011 .Dt GETGROUPS 2 .Os .Sh NAME @@ -37,7 +37,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In unistd.h .Ft int .Fn getgroups "int gidsetlen" "gid_t *gidset" @@ -66,6 +65,12 @@ is zero, returns the number of supplementary group IDs associated with the calling process without modifying the array pointed to by .Fa gidset . +.Pp +The value of +.Dv {NGROUPS_MAX} +should be obtained using +.Xr sysconf 3 +to avoid hard-coding it into the executable. .Sh RETURN VALUES A successful call returns the number of groups in the group set. A value of -1 indicates that an error occurred, and the error @@ -88,7 +93,8 @@ an invalid address. .El .Sh SEE ALSO .Xr setgroups 2 , -.Xr initgroups 3 +.Xr initgroups 3 , +.Xr sysconf 3 .Sh STANDARDS The .Fn getgroups From owner-svn-src-stable-7@FreeBSD.ORG Sun Jan 30 23:16:50 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6F6B1065670; Sun, 30 Jan 2011 23:16:49 +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 D62A68FC15; Sun, 30 Jan 2011 23:16: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 p0UNGnGH088965; Sun, 30 Jan 2011 23:16:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0UNGnNK088960; Sun, 30 Jan 2011 23:16:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101302316.p0UNGnNK088960@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 30 Jan 2011 23:16: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: r218108 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 23:16:50 -0000 Author: yongari Date: Sun Jan 30 23:16:49 2011 New Revision: 218108 URL: http://svn.freebsd.org/changeset/base/218108 Log: MFC r216576,216578-216581,217974: r216576,217974: ae(4), igb(4) and ixgbe(4) supports altq(4). r216578: Add .Xr to altq(4). r216579,216581: igb(4), ixgbe(4), mxge(4) and nxge(4) support VLAN hardware tag insertion/stripping. et(4) and fwe(4) support VLAN oversized frames. r216580: Add ae(4) to the list of drivers use the miibus interface. Modified: stable/7/share/man/man4/altq.4 stable/7/share/man/man4/ixgbe.4 stable/7/share/man/man4/miibus.4 stable/7/share/man/man4/vlan.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/altq.4 ============================================================================== --- stable/7/share/man/man4/altq.4 Sun Jan 30 23:15:45 2011 (r218107) +++ stable/7/share/man/man4/altq.4 Sun Jan 30 23:16:49 2011 (r218108) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2010 +.Dd December 19, 2010 .Dt ALTQ 4 .Os .Sh NAME @@ -115,6 +115,7 @@ The driver modifications described in are required to use a certain network card with .Nm . They have been applied to the following hardware drivers: +.Xr ae 4 , .Xr age 4 , .Xr alc 4 , .Xr ale 4 , @@ -135,8 +136,10 @@ They have been applied to the following .Xr fxp 4 , .Xr gem 4 , .Xr hme 4 , +.Xr igb 4 , .Xr ipw 4 , .Xr iwi 4 , +.Xr ixgbe 4 , .Xr jme 4 , .Xr le 4 , .Xr msk 4 , Modified: stable/7/share/man/man4/ixgbe.4 ============================================================================== --- stable/7/share/man/man4/ixgbe.4 Sun Jan 30 23:15:45 2011 (r218107) +++ stable/7/share/man/man4/ixgbe.4 Sun Jan 30 23:16:49 2011 (r218108) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 11, 2008 +.Dd December 19, 2010 .Dt IXGBE 4 .Os .Sh NAME @@ -107,6 +107,7 @@ with a supported adapter, email the spec issue to .Aq freebsdnic@mailbox.intel.com . .Sh SEE ALSO +.Xr altq 4 , .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , Modified: stable/7/share/man/man4/miibus.4 ============================================================================== --- stable/7/share/man/man4/miibus.4 Sun Jan 30 23:15:45 2011 (r218107) +++ stable/7/share/man/man4/miibus.4 Sun Jan 30 23:16:49 2011 (r218108) @@ -45,6 +45,8 @@ The following network device drivers use interface: .Pp .Bl -tag -compact -width ".Xr fxp 4" +.It Xr ae 4 +Attansic/Atheros L2 Fast Ethernet .It Xr age 4 Attansic/Atheros L1 Gigabit Ethernet .It Xr alc 4 @@ -132,6 +134,7 @@ and .Nx , but as a result are not well behaved newbus device drivers. .Sh SEE ALSO +.Xr ae 4 , .Xr age 4 , .Xr alc 4 , .Xr ale 4 , Modified: stable/7/share/man/man4/vlan.4 ============================================================================== --- stable/7/share/man/man4/vlan.4 Sun Jan 30 23:15:45 2011 (r218107) +++ stable/7/share/man/man4/vlan.4 Sun Jan 30 23:16:49 2011 (r218108) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2010 +.Dd December 19, 2010 .Dt VLAN 4 .Os .Sh NAME @@ -129,9 +129,13 @@ in the hardware is limited to the follow .Xr bge 4 , .Xr cxgb 4 , .Xr em 4 , +.Xr igb 4 , .Xr ixgb 4 , +.Xr ixgbe 4 , .Xr jme 4 , .Xr msk 4 , +.Xr mxge 4 , +.Xr nxge 4 , .Xr nge 4 , .Xr re 4 , .Xr sge 4 , @@ -164,6 +168,7 @@ natively: .Xr bfe 4 , .Xr cas 4 , .Xr dc 4 , +.Xr et 4 , .Xr fwe 4 , .Xr fxp 4 , .Xr gem 4 , From owner-svn-src-stable-7@FreeBSD.ORG Sun Jan 30 23:18:56 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16A85106566C; Sun, 30 Jan 2011 23:18:56 +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 065148FC1C; Sun, 30 Jan 2011 23:18: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 p0UNItxK089107; Sun, 30 Jan 2011 23:18:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0UNItfV089105; Sun, 30 Jan 2011 23:18:55 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101302318.p0UNItfV089105@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 30 Jan 2011 23:18:55 +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: r218110 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 23:18:56 -0000 Author: yongari Date: Sun Jan 30 23:18:55 2011 New Revision: 218110 URL: http://svn.freebsd.org/changeset/base/218110 Log: MFC r216596: Document limitation of station address reprogramming. Modified: stable/7/share/man/man4/jme.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/jme.4 ============================================================================== --- stable/7/share/man/man4/jme.4 Sun Jan 30 23:18:25 2011 (r218109) +++ stable/7/share/man/man4/jme.4 Sun Jan 30 23:18:55 2011 (r218110) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2010 +.Dd December 20, 2010 .Dt JME 4 .Os .Sh NAME @@ -166,3 +166,15 @@ driver was written by .Aq yongari@FreeBSD.org . It first appeared in .Fx 7.1 . +.Sh CAVEATS +The +.Nm +driver tries to avoid unnecessary station address reprogramming for +controllers that use eFuse to store station address. +The number of times that eFuse can be safely reprogrammed is 16 at +most. +In addition, there is no way to restore factory default station +address once station address is reprogrammed via eFuse. +It is highly recommended not to reprogram station address and +it is responsibility of administrator to store original station +address into a safe place when station address should be changed. From owner-svn-src-stable-7@FreeBSD.ORG Sun Jan 30 23:29:46 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B8A9106566C; Sun, 30 Jan 2011 23:29:46 +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 4B2268FC1D; Sun, 30 Jan 2011 23: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 p0UNTk1w089446; Sun, 30 Jan 2011 23:29:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0UNTk8R089444; Sun, 30 Jan 2011 23:29:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101302329.p0UNTk8R089444@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 30 Jan 2011 23: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: r218112 - stable/7/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 23:29:46 -0000 Author: yongari Date: Sun Jan 30 23:29:45 2011 New Revision: 218112 URL: http://svn.freebsd.org/changeset/base/218112 Log: MFC r216766: Add device id for RDC M3010 which is found on Vortex86 SoC. Reviewed by: mav Modified: stable/7/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hdac.c Sun Jan 30 23:23:05 2011 (r218111) +++ stable/7/sys/dev/sound/pci/hda/hdac.c Sun Jan 30 23:29:45 2011 (r218112) @@ -192,6 +192,10 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_ATI_RV740 HDA_MODEL_CONSTRUCT(ATI, 0xaa48) #define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff) +/* RDC */ +#define RDC_VENDORID 0x17f3 +#define HDA_RDC_M3010 HDA_MODEL_CONSTRUCT(RDC, 0x3010) + /* VIA */ #define VIA_VENDORID 0x1106 #define HDA_VIA_VT82XX HDA_MODEL_CONSTRUCT(VIA, 0x3288) @@ -527,6 +531,7 @@ static const struct { { HDA_ATI_RV730, "ATI RV730", 0 }, { HDA_ATI_RV740, "ATI RV740", 0 }, { HDA_ATI_RV770, "ATI RV770", 0 }, + { HDA_RDC_M3010, "RDC M3010", 0 }, { HDA_VIA_VT82XX, "VIA VT8251/8237A",0 }, { HDA_SIS_966, "SiS 966", 0 }, { HDA_ULI_M5461, "ULI M5461", 0 }, From owner-svn-src-stable-7@FreeBSD.ORG Mon Jan 31 00:29:11 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1481106564A; Mon, 31 Jan 2011 00:29:11 +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 912C28FC1A; Mon, 31 Jan 2011 00:29:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0V0TBse091810; Mon, 31 Jan 2011 00:29:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0V0TBnU091808; Mon, 31 Jan 2011 00:29:11 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101310029.p0V0TBnU091808@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 31 Jan 2011 00:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218116 - stable/7/sys/dev/alc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2011 00:29:11 -0000 Author: yongari Date: Mon Jan 31 00:29:11 2011 New Revision: 218116 URL: http://svn.freebsd.org/changeset/base/218116 Log: MFC r218038: Fix logic error. Due to the bug, it incorrectly checked TXQ status which in turn can leave TXQ active. Submitted by: Brad ( brad <> comstyle dot com ) Modified: stable/7/sys/dev/alc/if_alc.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/alc/if_alc.c ============================================================================== --- stable/7/sys/dev/alc/if_alc.c Mon Jan 31 00:27:34 2011 (r218115) +++ stable/7/sys/dev/alc/if_alc.c Mon Jan 31 00:29:11 2011 (r218116) @@ -3558,7 +3558,7 @@ alc_stop_queue(struct alc_softc *sc) } /* Disable TxQ. */ reg = CSR_READ_4(sc, ALC_TXQ_CFG); - if ((reg & TXQ_CFG_ENB) == 0) { + if ((reg & TXQ_CFG_ENB) != 0) { reg &= ~TXQ_CFG_ENB; CSR_WRITE_4(sc, ALC_TXQ_CFG, reg); } From owner-svn-src-stable-7@FreeBSD.ORG Mon Jan 31 09:30:25 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC2501065679; Mon, 31 Jan 2011 09:30:25 +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 DB5578FC08; Mon, 31 Jan 2011 09:30: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 p0V9UPip016443; Mon, 31 Jan 2011 09:30:25 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0V9UPeN016440; Mon, 31 Jan 2011 09:30:25 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201101310930.p0V9UPeN016440@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 31 Jan 2011 09:30: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: r218124 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2011 09:30:26 -0000 Author: edwin Date: Mon Jan 31 09:30:25 2011 New Revision: 218124 URL: http://svn.freebsd.org/changeset/base/218124 Log: MFC of 218122, tzdata2011a: - Cleanup rules for Australia/South_Australia (nothing changed) - Add historical information for Honolulu. Modified: stable/7/share/zoneinfo/australasia stable/7/share/zoneinfo/northamerica Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/australasia ============================================================================== --- stable/7/share/zoneinfo/australasia Mon Jan 31 09:29:51 2011 (r218123) +++ stable/7/share/zoneinfo/australasia Mon Jan 31 09:30:25 2011 (r218124) @@ -1,5 +1,5 @@ #
-# @(#)australasia	8.20
+# @(#)australasia	8.22
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -84,14 +84,13 @@ Rule	AS	1986	only	-	Oct	19	2:00s	1:00	-
 Rule	AS	1987	2007	-	Oct	lastSun	2:00s	1:00	-
 Rule	AS	1972	only	-	Feb	27	2:00s	0	-
 Rule	AS	1973	1985	-	Mar	Sun>=1	2:00s	0	-
-Rule	AS	1986	1989	-	Mar	Sun>=15	2:00s	0	-
-Rule	AS	1990	only	-	Mar	Sun>=18	2:00s	0	-
-Rule	AS	1991	only	-	Mar	Sun>=1	2:00s	0	-
-Rule	AS	1992	only	-	Mar	Sun>=18	2:00s	0	-
-Rule	AS	1993	only	-	Mar	Sun>=1	2:00s	0	-
-Rule	AS	1994	only	-	Mar	Sun>=18	2:00s	0	-
+Rule	AS	1986	1990	-	Mar	Sun>=15	2:00s	0	-
+Rule	AS	1991	only	-	Mar	3	2:00s	0	-
+Rule	AS	1992	only	-	Mar	22	2:00s	0	-
+Rule	AS	1993	only	-	Mar	7	2:00s	0	-
+Rule	AS	1994	only	-	Mar	20	2:00s	0	-
 Rule	AS	1995	2005	-	Mar	lastSun	2:00s	0	-
-Rule	AS	2006	only	-	Apr	Sun>=1	2:00s	0	-
+Rule	AS	2006	only	-	Apr	2	2:00s	0	-
 Rule	AS	2007	only	-	Mar	lastSun	2:00s	0	-
 Rule	AS	2008	max	-	Apr	Sun>=1	2:00s	0	-
 Rule	AS	2008	max	-	Oct	Sun>=1	2:00s	1:00	-

Modified: stable/7/share/zoneinfo/northamerica
==============================================================================
--- stable/7/share/zoneinfo/northamerica	Mon Jan 31 09:29:51 2011	(r218123)
+++ stable/7/share/zoneinfo/northamerica	Mon Jan 31 09:30:25 2011	(r218124)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.34
+# %W%
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -471,20 +471,50 @@ Zone America/Adak	 12:13:21 -	LMT	1867 O
 #  three votes for and one against."
 
 # Hawaii
-#
-# From Arthur David Olson:
-# And then there's Hawaii.
-# DST was observed for one day in 1933;
-# standard time was changed by half an hour in 1947;
-# it's always standard as of 1986.
-#
-# From Paul Eggert:
-# Shanks says the 1933 experiment lasted for three weeks.  Go with Shanks.
-#
-Zone Pacific/Honolulu	-10:31:26 -	LMT	1900 Jan  1 12:00
-			-10:30	-	HST	1933 Apr 30 2:00
-			-10:30	1:00	HDT	1933 May 21 2:00
-			-10:30	US	H%sT	1947 Jun  8 2:00
+
+# From Arthur David Olson (2010-12-09):
+# "Hawaiian Time" by Robert C. Schmitt and Doak C. Cox appears on pages 207-225
+# of volume 26 of The Hawaiian Journal of History (1992). As of 2010-12-09,
+# the article is available at
+# 
+# http://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf
+# 
+# and indicates that standard time was adopted effective noon, January
+# 13, 1896 (page 218), that in "1933, the Legislature decreed daylight
+# saving for the period between the last Sunday of each April and the
+# last Sunday of each September, but less than a month later repealed the
+# act," (page 220), that year-round daylight saving time was in effect
+# from 1942-02-09 to 1945-09-30 (page 221, with no time of day given for
+# when clocks changed) and that clocks were changed by 30 minutes
+# effective the second Sunday of June, 1947 (page 219, with no time of
+# day given for when clocks changed). A footnote for the 1933 changes
+# cites Session Laws of Hawaii 1933, "Act. 90 (approved 26 Apr. 1933)
+# and Act 163 (approved 21 May 1933)."
+
+# From Arthur David Olson (2011-01-19):
+# The following is from "Laws of the Territory of Hawaii Passed by the
+# Seventeenth Legislature: Regular Session 1933," available (as of
+# 2011-01-19) at American University's Pence Law Library. Page 85: "Act
+# 90...At 2 o'clock ante meridian of the last Sunday in April of each
+# year, the standard time of this Territory shall be advanced one
+# hour...This Act shall take effect upon its approval. Approved this 26th
+# day of April, A. D. 1933. LAWRENCE M JUDD, Governor of the Territory of
+# Hawaii." Page 172:  "Act 163...Act 90 of the Session Laws of 1933 is
+# hereby repealed...This Act shall take effect upon its approval, upon
+# which date the standard time of this Territory shall be restored to
+# that existing immediately prior to the taking effect of said Act 90.
+# Approved this 21st day of May, A. D. 1933. LAWRENCE M. JUDD, Governor
+# of the Territory of Hawaii."
+#
+# Note that 1933-05-21 was a Sunday.
+# We're left to guess the time of day when Act 163 was approved; guess noon.
+
+Zone Pacific/Honolulu	-10:31:26 -	LMT	1896 Jan 13 12:00 #Schmitt&Cox
+			-10:30	-	HST	1933 Apr 30 2:00 #Laws 1933
+			-10:30	1:00	HDT	1933 May 21 12:00 #Laws 1933+12
+			-10:30	-	HST	1942 Feb 09 2:00 #Schmitt&Cox+2
+			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Fox+2
+			-10:30	US	H%sT	1947 Jun  8 2:00 #Schmitt&Fox+2
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.

From owner-svn-src-stable-7@FreeBSD.ORG  Mon Jan 31 16:20:28 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8FE84106564A;
	Mon, 31 Jan 2011 16:20:28 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7D6FE8FC08;
	Mon, 31 Jan 2011 16:20:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0VGKS8L030044;
	Mon, 31 Jan 2011 16:20:28 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0VGKSs0030042;
	Mon, 31 Jan 2011 16:20:28 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201101311620.p0VGKSs0030042@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Mon, 31 Jan 2011 16:20:28 +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: r218133 - stable/7/sbin/geom/class/journal
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 31 Jan 2011 16:20:28 -0000

Author: ae
Date: Mon Jan 31 16:20:28 2011
New Revision: 218133
URL: http://svn.freebsd.org/changeset/base/218133

Log:
  MFC r188728 by pjd:
    Document kern.geom.journal.* sysctls.
  
    PR:		docs/130548
    Submitted by:	Hywel Mallett 
  
  MFC r188729 by pjd:
    Correct the year.
  
    Reported by:	Florian Smeets 

Modified:
  stable/7/sbin/geom/class/journal/gjournal.8
Directory Properties:
  stable/7/sbin/geom/class/journal/   (props changed)

Modified: stable/7/sbin/geom/class/journal/gjournal.8
==============================================================================
--- stable/7/sbin/geom/class/journal/gjournal.8	Mon Jan 31 15:52:00 2011	(r218132)
+++ stable/7/sbin/geom/class/journal/gjournal.8	Mon Jan 31 16:20:28 2011	(r218133)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2006-2007 Pawel Jakub Dawidek 
+.\" Copyright (c) 2006-2009 Pawel Jakub Dawidek 
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 13, 2008
+.Dd February 17, 2009
 .Dt GJOURNAL 8
 .Os
 .Sh NAME
@@ -223,6 +223,106 @@ gjournal label da0s1d da0s1e && \e
     mount -o async /dev/da0s1d.journal /mnt || \e
     mount /dev/da0s1d /mnt
 .Ed
+.Sh SYSCTLS
+Gjournal adds the sysctl level kern.geom.journal.
+The string and integer information available is detailed below.
+The changeable column shows whether a process with appropriate privilege may
+change the value.
+.Bl -column "accept_immediatelyXXXXXX" integerXXX -offset indent
+.It Sy "sysctl name	Type	Changeable"
+.It "debug	integer	yes"
+.It "switch_time	integer	yes"
+.It "force_switch	integer	yes"
+.It "parallel_flushes	integer	yes"
+.It "accept_immediately	integer	yes"
+.It "parallel_copies	integer	yes"
+.It "record_entries	integer	yes"
+.It "optimize	integer	yes"
+.El
+.Pp
+.Bl -tag -width 6n
+.It Li debug
+Setting a non-zero value enables debugging at various levels.
+Debug level 1 will record actions at a journal level, relating to journal
+switches, metadata updates etc.
+Debug level 2 will record actions at a higher level, relating to the numbers of
+entries in journals, access requests etc.
+Debug level 3 will record verbose detail, including insertion of I/Os to the
+journal.
+.It Li switch_time
+The maximum number of seconds a journal is allowed to remain open before
+switching to a new journal.
+.It Li force_switch
+Force a journal switch when the journal uses more than N% of the free journal space.
+.It Li parallel_flushes
+The number of flush I/O requests to be sent in parallel when flushing the journal to the data provider.
+.It Li accept_immediately
+The maximum number of I/O requests accepted at the same time.
+.It Li parallel_copies
+The number of copy I/O requests to send in parallel.
+.It Li record_entries
+The maximum number of record entries to allow in a single journal.
+.It Li optimize
+Controls whether entries in a journal will be optimized, by combining overlapping I/Os into a single I/O, and reordering the entries in a journal. This can be disabled by setting the sysctl to 0.
+.El
+.Ss cache
+The string and integer information available for the cache level
+is detailed below.
+The changeable column shows whether a process with appropriate
+privilege may change the value.
+.Bl -column "alloc_failuresXXXXXX" integerXXX -offset indent
+.It Sy "sysctl name	Type	Changeable"
+.It "used	integer	no"
+.It "limit	integer	yes"
+.It "divisor	integer	no"
+.It "switch	integer	yes"
+.It "misses	integer	yes"
+.It "alloc_failures	integer	yes"
+.El
+.Pp
+.Bl -tag -width 6n
+.It Li used
+The number of bytes currently allocated to the cache.
+.It Li limit
+The maximum number of bytes to be allocated to the cache.
+.It Li divisor
+Sets the cache size to be used as a proportion of kmem_size. A value of 2 (the default) will cause the cache size to be set to 1/2 of the kmem_size.
+.It Li switch
+Force a journal switch when this percentage of cache has been used.
+.It Li misses
+The number of cache misses, when data has been read, but was not found in the cache.
+.It Li alloc_failures
+The number of times memory failed to be allocated to the cache because the cache limit was hit.
+.El
+.Ss stats
+The string and integer information available for the statistics level
+is detailed below.
+The changeable column shows whether a process with appropriate
+privilege may change the value.
+.Bl -column "skipped_bytesXXXXXX" integerXXX -offset indent
+.It Sy "sysctl name	Type	Changeable"
+.It "skipped_bytes	integer	yes"
+.It "combined_ios	integer	yes"
+.It "switches	integer	yes"
+.It "wait_for_copy	integer	yes"
+.It "journal_full	integer	yes"
+.It "low_mem	integer	yes"
+.El
+.Pp
+.Bl -tag -width 6n
+.It Li skipped_bytes
+The number of bytes skipped.
+.It Li combined_ios
+The number of I/Os which were combined by journal optimization.
+.It Li switches
+The number of journal switches.
+.It Li wait_for_copy
+The number of times the journal switch process had to wait for the previous journal copy to complete.
+.It Li journal_full
+The number of times the journal was almost full, forcing a journal switch.
+.It Li low_mem
+The number of times the low_mem hook was called.
+.El
 .Sh SEE ALSO
 .Xr geom 4 ,
 .Xr geom 8 ,
@@ -237,7 +337,3 @@ utility appeared in
 .Fx 7.0 .
 .Sh AUTHORS
 .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org
-.Sh BUGS
-Documentation for sysctls
-.Va kern.geom.journal.*
-is missing.

From owner-svn-src-stable-7@FreeBSD.ORG  Mon Jan 31 16:58:34 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 465ED1065670;
	Mon, 31 Jan 2011 16:58:34 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 29DB68FC18;
	Mon, 31 Jan 2011 16:58: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 p0VGwYLm032145;
	Mon, 31 Jan 2011 16:58:34 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0VGwYPn032143;
	Mon, 31 Jan 2011 16:58:34 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201101311658.p0VGwYPn032143@svn.freebsd.org>
From: Ken Smith 
Date: Mon, 31 Jan 2011 16:58: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: r218134 - stable/7/release/scripts
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 31 Jan 2011 16:58:34 -0000

Author: kensmith
Date: Mon Jan 31 16:58:33 2011
New Revision: 218134
URL: http://svn.freebsd.org/changeset/base/218134

Log:
  Update to reflect the package layout for 7.4-RELEASE.

Modified:
  stable/7/release/scripts/package-split.py

Modified: stable/7/release/scripts/package-split.py
==============================================================================
--- stable/7/release/scripts/package-split.py	Mon Jan 31 16:20:28 2011	(r218133)
+++ stable/7/release/scripts/package-split.py	Mon Jan 31 16:58:33 2011	(r218134)
@@ -27,7 +27,8 @@ else:
 # install as a distribution
 def disc1_packages():
     pkgs = ['lang/perl5.10']
-    pkgs.extend(['x11/xorg',
+    if arch == 'amd64' or arch == 'i386':
+	pkgs.extend(['x11/xorg',
 		 'x11-drivers/xorg-drivers',
 		 'x11-fonts/xorg-fonts',
 		 'x11-servers/xorg-nestserver',
@@ -47,48 +48,36 @@ def disc2_packages():
 		'x11/kde-lite']
     else:
 	pkgs = ['x11/gnome2',
-		'x11/kdelibs4',
-		'games/kdegames4']
+            	'archivers/unzip',
+            	'devel/gmake',
+            	'editors/emacs',
+            	'editors/vim-lite',
+            	'editors/xemacs',
+            	'emulators/mtools',
+            	'graphics/png',
+            	'graphics/xv',
+            	'irc/xchat',
+            	'lang/php5',
+            	'mail/alpine',
+            	'mail/exim',
+            	'mail/fetchmail',
+            	'mail/mutt',
+            	'mail/popd',
+            	'mail/xfmail',
+            	'mail/postfix',
+            	'misc/compat5x',
+            	'net/samba35']
     return pkgs
 
 def disc3_packages():
     pkgs = ['x11/kde4',
-	    'x11-wm/afterstep',
-            'x11-wm/windowmaker',
-            'x11-wm/fvwm2',
-            # "Nice to have"
-            'archivers/unzip',
-            'astro/xearth',                 
-            'devel/gmake',
-            'editors/emacs',
-            'editors/vim-lite',
-            'editors/xemacs',
-            'emulators/mtools',
-            'graphics/png',
-            'graphics/xv',
-            'irc/xchat',
-            'lang/php5',
-            'mail/alpine',
-            'mail/exim',
-            'mail/fetchmail',
-            'mail/mutt',
-            'mail/popd',
-            'mail/xfmail',
-            'mail/postfix',
-            'misc/compat5x',
             'misc/compat6x',
             'net/cvsup-without-gui',
             'net/rsync',
             'net/mpd5',
-            'net/samba3',
-            'news/slrn',
-            'news/tin',
+            'ports-mgmt/portaudit',
             'ports-mgmt/portmaster',
             'ports-mgmt/portupgrade',
-            'print/a2ps-letter',
-            'print/ghostscript7-nox11',
-            'print/gv',
-            'print/psutils-letter',
             'shells/bash',
             'shells/pdksh',
             'shells/zsh',
@@ -99,9 +88,7 @@ def disc3_packages():
             'www/apache22',
             'www/links',
             'www/lynx',
-            'x11/rxvt',
-            # Formerly on disc3
-            'ports-mgmt/portaudit']
+            'x11/rxvt']
     if arch == 'amd64' or arch == 'i386':
         pkgs.extend(['www/opera'])
     if arch == 'i386':

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Feb  2 18:44:03 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2807C1065672;
	Wed,  2 Feb 2011 18:44:03 +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 140FC8FC1A;
	Wed,  2 Feb 2011 18:44: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 p12Ii3AM018308;
	Wed, 2 Feb 2011 18:44:03 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p12Ii2nl018297;
	Wed, 2 Feb 2011 18:44:02 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201102021844.p12Ii2nl018297@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 2 Feb 2011 18:44:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r218199 - in stable/7/sys/dev: ae age alc ale nfe
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 02 Feb 2011 18:44:03 -0000

Author: yongari
Date: Wed Feb  2 18:44:02 2011
New Revision: 218199
URL: http://svn.freebsd.org/changeset/base/218199

Log:
  MFC r216925,217331,217349,217542:
  r216925:
    Add a 'locked' variant of the foo_start() routine and call it directly
    from interrupt handlers and watchdog routines instead of queueing a task
    to call foo_start().
  
  r217331:
    Make sure to invoke unlocked foo_start since the taskqueue does not
    hold a driver lock. This should fix a regression introduced in
    r216925.
  
  r217349:
    Forgot to remove unlock of the driver lock from age_start_locked() when
    converting it to a locked variant.
  
  r217542:
    Fix some bugs in my last set of changes to ale(4):
    - Remove extra unlock from end of ale_start_locked().
    - Expand scope of locking in interrupt handler.
    - Move ether_ifdetach() earlier and retire now-unneeded DETACH flag.
  
    Tested by:	Aryeh Friedman

Modified:
  stable/7/sys/dev/ae/if_ae.c
  stable/7/sys/dev/ae/if_aevar.h
  stable/7/sys/dev/age/if_age.c
  stable/7/sys/dev/age/if_agevar.h
  stable/7/sys/dev/alc/if_alc.c
  stable/7/sys/dev/alc/if_alcvar.h
  stable/7/sys/dev/ale/if_ale.c
  stable/7/sys/dev/ale/if_alevar.h
  stable/7/sys/dev/nfe/if_nfe.c
  stable/7/sys/dev/nfe/if_nfevar.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/ae/if_ae.c
==============================================================================
--- stable/7/sys/dev/ae/if_ae.c	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/ae/if_ae.c	Wed Feb  2 18:44:02 2011	(r218199)
@@ -124,10 +124,10 @@ static int	ae_resume(device_t dev);
 static unsigned int	ae_tx_avail_size(ae_softc_t *sc);
 static int	ae_encap(ae_softc_t *sc, struct mbuf **m_head);
 static void	ae_start(struct ifnet *ifp);
+static void	ae_start_locked(struct ifnet *ifp);
 static void	ae_link_task(void *arg, int pending);
 static void	ae_stop_rxmac(ae_softc_t *sc);
 static void	ae_stop_txmac(ae_softc_t *sc);
-static void	ae_tx_task(void *arg, int pending);
 static void	ae_mac_config(ae_softc_t *sc);
 static int	ae_intr(void *arg);
 static void	ae_int_task(void *arg, int pending);
@@ -402,7 +402,6 @@ ae_attach(device_t dev)
 	/*
 	 * Create and run all helper tasks.
 	 */
-	TASK_INIT(&sc->tx_task, 1, ae_tx_task, ifp);
 	sc->tq = taskqueue_create_fast("ae_taskq", M_WAITOK,
             taskqueue_thread_enqueue, &sc->tq);
 	if (sc->tq == NULL) {
@@ -763,7 +762,6 @@ ae_detach(device_t dev)
 		AE_UNLOCK(sc);
 		callout_drain(&sc->tick_ch);
 		taskqueue_drain(sc->tq, &sc->int_task);
-		taskqueue_drain(sc->tq, &sc->tx_task);
 		taskqueue_drain(taskqueue_swi, &sc->link_task);
 		ether_ifdetach(ifp);
 	}
@@ -1518,23 +1516,32 @@ static void
 ae_start(struct ifnet *ifp)
 {
 	ae_softc_t *sc;
+
+	sc = ifp->if_softc;
+	AE_LOCK(sc);
+	ae_start_locked(ifp);
+	AE_UNLOCK(sc);
+}
+
+static void
+ae_start_locked(struct ifnet *ifp)
+{
+	ae_softc_t *sc;
 	unsigned int count;
 	struct mbuf *m0;
 	int error;
 
 	sc = ifp->if_softc;
 	KASSERT(sc != NULL, ("[ae, %d]: sc is NULL", __LINE__));
-	AE_LOCK(sc);
+	AE_LOCK_ASSERT(sc);
 
 #ifdef AE_DEBUG
 	if_printf(ifp, "Start called.\n");
 #endif
 
 	if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
-	    IFF_DRV_RUNNING || (sc->flags & AE_FLAG_LINK) == 0) {
-		AE_UNLOCK(sc);
+	    IFF_DRV_RUNNING || (sc->flags & AE_FLAG_LINK) == 0)
 		return;
-	}
 
 	count = 0;
 	while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
@@ -1570,7 +1577,6 @@ ae_start(struct ifnet *ifp)
 		if_printf(ifp, "Tx pos now is %d.\n", sc->txd_cur);
 #endif
 	}
-	AE_UNLOCK(sc);
 }
 
 static void
@@ -1704,15 +1710,6 @@ ae_stop_txmac(ae_softc_t *sc)
 }
 
 static void
-ae_tx_task(void *arg, int pending)
-{
-	struct ifnet *ifp;
-
-	ifp = (struct ifnet *)arg;
-	ae_start(ifp);
-}
-
-static void
 ae_mac_config(ae_softc_t *sc)
 {
 	struct mii_data *mii;
@@ -1869,7 +1866,7 @@ ae_tx_intr(ae_softc_t *sc)
 	
 	if ((sc->flags & AE_FLAG_TXAVAIL) != 0) {
 		if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-			taskqueue_enqueue(sc->tq, &sc->tx_task);
+			ae_start_locked(ifp);
 	}
 
 	/*
@@ -1997,7 +1994,7 @@ ae_watchdog(ae_softc_t *sc)
 	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	ae_init_locked(sc);
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-		taskqueue_enqueue(sc->tq, &sc->tx_task);
+		ae_start_locked(ifp);
 }
 
 static void

Modified: stable/7/sys/dev/ae/if_aevar.h
==============================================================================
--- stable/7/sys/dev/ae/if_aevar.h	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/ae/if_aevar.h	Wed Feb  2 18:44:02 2011	(r218199)
@@ -119,7 +119,6 @@ typedef struct ae_softc	{
 
 	/* Tasks. */
 	struct task		int_task;
-	struct task		tx_task;
 	struct task		link_task;
 	struct taskqueue	*tq;
 	

Modified: stable/7/sys/dev/age/if_age.c
==============================================================================
--- stable/7/sys/dev/age/if_age.c	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/age/if_age.c	Wed Feb  2 18:44:02 2011	(r218199)
@@ -118,8 +118,8 @@ static void age_setwol(struct age_softc 
 static int age_suspend(device_t);
 static int age_resume(device_t);
 static int age_encap(struct age_softc *, struct mbuf **);
-static void age_tx_task(void *, int);
 static void age_start(struct ifnet *);
+static void age_start_locked(struct ifnet *);
 static void age_watchdog(struct age_softc *);
 static int age_ioctl(struct ifnet *, u_long, caddr_t);
 static void age_mac_config(struct age_softc *);
@@ -636,7 +636,6 @@ age_attach(device_t dev)
 	ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
 
 	/* Create local taskq. */
-	TASK_INIT(&sc->age_tx_task, 1, age_tx_task, ifp);
 	sc->age_tq = taskqueue_create_fast("age_taskq", M_WAITOK,
 	    taskqueue_thread_enqueue, &sc->age_tq);
 	if (sc->age_tq == NULL) {
@@ -693,7 +692,6 @@ age_detach(device_t dev)
 		AGE_UNLOCK(sc);
 		callout_drain(&sc->age_tick_ch);
 		taskqueue_drain(sc->age_tq, &sc->age_int_task);
-		taskqueue_drain(sc->age_tq, &sc->age_tx_task);
 		taskqueue_drain(taskqueue_swi, &sc->age_link_task);
 		ether_ifdetach(ifp);
 	}
@@ -1706,16 +1704,18 @@ age_encap(struct age_softc *sc, struct m
 }
 
 static void
-age_tx_task(void *arg, int pending)
+age_start(struct ifnet *ifp)
 {
-	struct ifnet *ifp;
+        struct age_softc *sc;
 
-	ifp = (struct ifnet *)arg;
-	age_start(ifp);
+	sc = ifp->if_softc;
+	AGE_LOCK(sc);
+	age_start_locked(ifp);
+	AGE_UNLOCK(sc);
 }
 
 static void
-age_start(struct ifnet *ifp)
+age_start_locked(struct ifnet *ifp)
 {
         struct age_softc *sc;
         struct mbuf *m_head;
@@ -1723,13 +1723,11 @@ age_start(struct ifnet *ifp)
 
 	sc = ifp->if_softc;
 
-	AGE_LOCK(sc);
+	AGE_LOCK_ASSERT(sc);
 
 	if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
-	    IFF_DRV_RUNNING || (sc->age_flags & AGE_FLAG_LINK) == 0) {
-		AGE_UNLOCK(sc);
+	    IFF_DRV_RUNNING || (sc->age_flags & AGE_FLAG_LINK) == 0)
 		return;
-	}
 
 	for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd); ) {
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
@@ -1762,8 +1760,6 @@ age_start(struct ifnet *ifp)
 		/* Set a timeout in case the chip goes out to lunch. */
 		sc->age_watchdog_timer = AGE_TX_TIMEOUT;
 	}
-
-	AGE_UNLOCK(sc);
 }
 
 static void
@@ -1788,7 +1784,7 @@ age_watchdog(struct age_softc *sc)
 		if_printf(sc->age_ifp,
 		    "watchdog timeout (missed Tx interrupts) -- recovering\n");
 		if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-			taskqueue_enqueue(sc->age_tq, &sc->age_tx_task);
+			age_start_locked(ifp);
 		return;
 	}
 	if_printf(sc->age_ifp, "watchdog timeout\n");
@@ -1796,7 +1792,7 @@ age_watchdog(struct age_softc *sc)
 	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	age_init_locked(sc);
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-		taskqueue_enqueue(sc->age_tq, &sc->age_tx_task);
+		age_start_locked(ifp);
 }
 
 static int
@@ -2172,7 +2168,7 @@ age_int_task(void *arg, int pending)
 			age_init_locked(sc);
 		}
 		if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-			taskqueue_enqueue(sc->age_tq, &sc->age_tx_task);
+			age_start_locked(ifp);
 		if ((status & INTR_SMB) != 0)
 			age_stats_update(sc);
 	}

Modified: stable/7/sys/dev/age/if_agevar.h
==============================================================================
--- stable/7/sys/dev/age/if_agevar.h	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/age/if_agevar.h	Wed Feb  2 18:44:02 2011	(r218199)
@@ -222,7 +222,6 @@ struct age_softc {
 	int			age_tpd_cons;
 
 	struct task		age_int_task;
-	struct task		age_tx_task;
 	struct task		age_link_task;
 	struct taskqueue	*age_tq;
 	struct mtx		age_mtx;

Modified: stable/7/sys/dev/alc/if_alc.c
==============================================================================
--- stable/7/sys/dev/alc/if_alc.c	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/alc/if_alc.c	Wed Feb  2 18:44:02 2011	(r218199)
@@ -159,6 +159,7 @@ static void	alc_setlinkspeed(struct alc_
 static void	alc_setwol(struct alc_softc *);
 static int	alc_shutdown(device_t);
 static void	alc_start(struct ifnet *);
+static void	alc_start_locked(struct ifnet *);
 static void	alc_start_queue(struct alc_softc *);
 static void	alc_stats_clear(struct alc_softc *);
 static void	alc_stats_update(struct alc_softc *);
@@ -168,7 +169,6 @@ static void	alc_stop_queue(struct alc_so
 static int	alc_suspend(device_t);
 static void	alc_sysctl_node(struct alc_softc *);
 static void	alc_tick(void *);
-static void	alc_tx_task(void *, int);
 static void	alc_txeof(struct alc_softc *);
 static void	alc_watchdog(struct alc_softc *);
 static int	sysctl_int_range(SYSCTL_HANDLER_ARGS, int, int);
@@ -1002,7 +1002,6 @@ alc_attach(device_t dev)
 	ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
 
 	/* Create local taskq. */
-	TASK_INIT(&sc->alc_tx_task, 1, alc_tx_task, ifp);
 	sc->alc_tq = taskqueue_create_fast("alc_taskq", M_WAITOK,
 	    taskqueue_thread_enqueue, &sc->alc_tq);
 	if (sc->alc_tq == NULL) {
@@ -1059,7 +1058,6 @@ alc_detach(device_t dev)
 		ALC_UNLOCK(sc);
 		callout_drain(&sc->alc_tick_ch);
 		taskqueue_drain(sc->alc_tq, &sc->alc_int_task);
-		taskqueue_drain(sc->alc_tq, &sc->alc_tx_task);
 		ether_ifdetach(ifp);
 	}
 
@@ -2237,16 +2235,18 @@ alc_encap(struct alc_softc *sc, struct m
 }
 
 static void
-alc_tx_task(void *arg, int pending)
+alc_start(struct ifnet *ifp)
 {
-	struct ifnet *ifp;
+	struct alc_softc *sc;
 
-	ifp = (struct ifnet *)arg;
-	alc_start(ifp);
+	sc = ifp->if_softc;
+	ALC_LOCK(sc);
+	alc_start_locked(ifp);
+	ALC_UNLOCK(sc);
 }
 
 static void
-alc_start(struct ifnet *ifp)
+alc_start_locked(struct ifnet *ifp)
 {
 	struct alc_softc *sc;
 	struct mbuf *m_head;
@@ -2254,17 +2254,15 @@ alc_start(struct ifnet *ifp)
 
 	sc = ifp->if_softc;
 
-	ALC_LOCK(sc);
+	ALC_LOCK_ASSERT(sc);
 
 	/* Reclaim transmitted frames. */
 	if (sc->alc_cdata.alc_tx_cnt >= ALC_TX_DESC_HIWAT)
 		alc_txeof(sc);
 
 	if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
-	    IFF_DRV_RUNNING || (sc->alc_flags & ALC_FLAG_LINK) == 0) {
-		ALC_UNLOCK(sc);
+	    IFF_DRV_RUNNING || (sc->alc_flags & ALC_FLAG_LINK) == 0)
 		return;
-	}
 
 	for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd); ) {
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
@@ -2303,8 +2301,6 @@ alc_start(struct ifnet *ifp)
 		/* Set a timeout in case the chip goes out to lunch. */
 		sc->alc_watchdog_timer = ALC_TX_TIMEOUT;
 	}
-
-	ALC_UNLOCK(sc);
 }
 
 static void
@@ -2330,7 +2326,7 @@ alc_watchdog(struct alc_softc *sc)
 	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	alc_init_locked(sc);
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-		taskqueue_enqueue(sc->alc_tq, &sc->alc_tx_task);
+		alc_start_locked(ifp);
 }
 
 static int
@@ -2710,7 +2706,7 @@ alc_int_task(void *arg, int pending)
 		}
 		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 &&
 		    !IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-			taskqueue_enqueue(sc->alc_tq, &sc->alc_tx_task);
+			alc_start(ifp);
 	}
 
 	if (more == EAGAIN ||

Modified: stable/7/sys/dev/alc/if_alcvar.h
==============================================================================
--- stable/7/sys/dev/alc/if_alcvar.h	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/alc/if_alcvar.h	Wed Feb  2 18:44:02 2011	(r218199)
@@ -246,7 +246,6 @@ struct alc_softc {
 	int			alc_buf_size;
 
 	struct task		alc_int_task;
-	struct task		alc_tx_task;
 	struct taskqueue	*alc_tq;
 	struct mtx		alc_mtx;
 };

Modified: stable/7/sys/dev/ale/if_ale.c
==============================================================================
--- stable/7/sys/dev/ale/if_ale.c	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/ale/if_ale.c	Wed Feb  2 18:44:02 2011	(r218199)
@@ -136,6 +136,7 @@ static void	ale_setlinkspeed(struct ale_
 static void	ale_setwol(struct ale_softc *);
 static int	ale_shutdown(device_t);
 static void	ale_start(struct ifnet *);
+static void	ale_start_locked(struct ifnet *);
 static void	ale_stats_clear(struct ale_softc *);
 static void	ale_stats_update(struct ale_softc *);
 static void	ale_stop(struct ale_softc *);
@@ -143,7 +144,6 @@ static void	ale_stop_mac(struct ale_soft
 static int	ale_suspend(device_t);
 static void	ale_sysctl_node(struct ale_softc *);
 static void	ale_tick(void *);
-static void	ale_tx_task(void *, int);
 static void	ale_txeof(struct ale_softc *);
 static void	ale_watchdog(struct ale_softc *);
 static int	sysctl_int_range(SYSCTL_HANDLER_ARGS, int, int);
@@ -625,7 +625,6 @@ ale_attach(device_t dev)
 	ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
 
 	/* Create local taskq. */
-	TASK_INIT(&sc->ale_tx_task, 1, ale_tx_task, ifp);
 	sc->ale_tq = taskqueue_create_fast("ale_taskq", M_WAITOK,
 	    taskqueue_thread_enqueue, &sc->ale_tq);
 	if (sc->ale_tq == NULL) {
@@ -676,15 +675,13 @@ ale_detach(device_t dev)
 
 	ifp = sc->ale_ifp;
 	if (device_is_attached(dev)) {
+		ether_ifdetach(ifp);
 		ALE_LOCK(sc);
-		sc->ale_flags |= ALE_FLAG_DETACH;
 		ale_stop(sc);
 		ALE_UNLOCK(sc);
 		callout_drain(&sc->ale_tick_ch);
 		taskqueue_drain(sc->ale_tq, &sc->ale_int_task);
-		taskqueue_drain(sc->ale_tq, &sc->ale_tx_task);
 		taskqueue_drain(taskqueue_swi, &sc->ale_link_task);
-		ether_ifdetach(ifp);
 	}
 
 	if (sc->ale_tq != NULL) {
@@ -1845,16 +1842,18 @@ ale_encap(struct ale_softc *sc, struct m
 }
 
 static void
-ale_tx_task(void *arg, int pending)
+ale_start(struct ifnet *ifp)
 {
-	struct ifnet *ifp;
+        struct ale_softc *sc;
 
-	ifp = (struct ifnet *)arg;
-	ale_start(ifp);
+	sc = ifp->if_softc;
+	ALE_LOCK(sc);
+	ale_start_locked(ifp);
+	ALE_UNLOCK(sc);
 }
 
 static void
-ale_start(struct ifnet *ifp)
+ale_start_locked(struct ifnet *ifp)
 {
         struct ale_softc *sc;
         struct mbuf *m_head;
@@ -1862,17 +1861,15 @@ ale_start(struct ifnet *ifp)
 
 	sc = ifp->if_softc;
 
-	ALE_LOCK(sc);
+	ALE_LOCK_ASSERT(sc);
 
 	/* Reclaim transmitted frames. */
 	if (sc->ale_cdata.ale_tx_cnt >= ALE_TX_DESC_HIWAT)
 		ale_txeof(sc);
 
 	if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
-	    IFF_DRV_RUNNING || (sc->ale_flags & ALE_FLAG_LINK) == 0) {
-		ALE_UNLOCK(sc);
+	    IFF_DRV_RUNNING || (sc->ale_flags & ALE_FLAG_LINK) == 0)
 		return;
-	}
 
 	for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd); ) {
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
@@ -1906,8 +1903,6 @@ ale_start(struct ifnet *ifp)
 		/* Set a timeout in case the chip goes out to lunch. */
 		sc->ale_watchdog_timer = ALE_TX_TIMEOUT;
 	}
-
-	ALE_UNLOCK(sc);
 }
 
 static void
@@ -1933,7 +1928,7 @@ ale_watchdog(struct ale_softc *sc)
 	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	ale_init_locked(sc);
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-		taskqueue_enqueue(sc->ale_tq, &sc->ale_tx_task);
+		ale_start_locked(ifp);
 }
 
 static int
@@ -1971,8 +1966,7 @@ ale_ioctl(struct ifnet *ifp, u_long cmd,
 				    & (IFF_PROMISC | IFF_ALLMULTI)) != 0)
 					ale_rxfilter(sc);
 			} else {
-				if ((sc->ale_flags & ALE_FLAG_DETACH) == 0)
-					ale_init_locked(sc);
+				ale_init_locked(sc);
 			}
 		} else {
 			if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
@@ -2283,6 +2277,7 @@ ale_int_task(void *arg, int pending)
 	sc = (struct ale_softc *)arg;
 
 	status = CSR_READ_4(sc, ALE_INTR_STATUS);
+	ALE_LOCK(sc);
 	if (sc->ale_morework != 0)
 		status |= INTR_RX_PKT;
 	if ((status & ALE_INTRS) == 0)
@@ -2298,7 +2293,6 @@ ale_int_task(void *arg, int pending)
 		if (more == EAGAIN)
 			sc->ale_morework = 1;
 		else if (more == EIO) {
-			ALE_LOCK(sc);
 			sc->ale_stats.reset_brk_seq++;
 			ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 			ale_init_locked(sc);
@@ -2313,23 +2307,25 @@ ale_int_task(void *arg, int pending)
 			if ((status & INTR_DMA_WR_TO_RST) != 0)
 				device_printf(sc->ale_dev,
 				    "DMA write error! -- resetting\n");
-			ALE_LOCK(sc);
 			ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 			ale_init_locked(sc);
 			ALE_UNLOCK(sc);
 			return;
 		}
 		if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-			taskqueue_enqueue(sc->ale_tq, &sc->ale_tx_task);
+			ale_start_locked(ifp);
 	}
 
 	if (more == EAGAIN ||
 	    (CSR_READ_4(sc, ALE_INTR_STATUS) & ALE_INTRS) != 0) {
+		ALE_UNLOCK(sc);
 		taskqueue_enqueue(sc->ale_tq, &sc->ale_int_task);
 		return;
 	}
 
 done:
+	ALE_UNLOCK(sc);
+
 	/* Re-enable interrupts. */
 	CSR_WRITE_4(sc, ALE_INTR_STATUS, 0x7FFFFFFF);
 }
@@ -2586,7 +2582,9 @@ ale_rxeof(struct ale_softc *sc, int coun
 		}
 
 		/* Pass it to upper layer. */
+		ALE_UNLOCK(sc);
 		(*ifp->if_input)(ifp, m);
+		ALE_LOCK(sc);
 
 		ale_rx_update_page(sc, &rx_page, length, &prod);
 	}

Modified: stable/7/sys/dev/ale/if_alevar.h
==============================================================================
--- stable/7/sys/dev/ale/if_alevar.h	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/ale/if_alevar.h	Wed Feb  2 18:44:02 2011	(r218199)
@@ -206,7 +206,6 @@ struct ale_softc {
 #define	ALE_FLAG_RXCSUM_BUG	0x0080
 #define	ALE_FLAG_TXCSUM_BUG	0x0100
 #define	ALE_FLAG_TXCMB_BUG	0x0200
-#define	ALE_FLAG_DETACH		0x4000
 #define	ALE_FLAG_LINK		0x8000
 
 	struct callout		ale_tick_ch;
@@ -222,7 +221,6 @@ struct ale_softc {
 	int			ale_pagesize;
 
 	struct task		ale_int_task;
-	struct task		ale_tx_task;
 	struct task		ale_link_task;
 	struct taskqueue	*ale_tq;
 	struct mtx		ale_mtx;

Modified: stable/7/sys/dev/nfe/if_nfe.c
==============================================================================
--- stable/7/sys/dev/nfe/if_nfe.c	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/nfe/if_nfe.c	Wed Feb  2 18:44:02 2011	(r218199)
@@ -99,8 +99,8 @@ static int  nfe_jrxeof(struct nfe_softc 
 static void nfe_txeof(struct nfe_softc *);
 static int  nfe_encap(struct nfe_softc *, struct mbuf **);
 static void nfe_setmulti(struct nfe_softc *);
-static void nfe_tx_task(void *, int);
 static void nfe_start(struct ifnet *);
+static void nfe_start_locked(struct ifnet *);
 static void nfe_watchdog(struct ifnet *);
 static void nfe_init(void *);
 static void nfe_init_locked(void *);
@@ -553,7 +553,6 @@ nfe_attach(device_t dev)
 		error = ENOSPC;
 		goto fail;
 	}
-	TASK_INIT(&sc->nfe_tx_task, 1, nfe_tx_task, ifp);
 
 	/*
 	 * Allocate Tx and Rx rings.
@@ -679,7 +678,6 @@ nfe_detach(device_t dev)
 		ifp->if_flags &= ~IFF_UP;
 		NFE_UNLOCK(sc);
 		callout_drain(&sc->nfe_stat_ch);
-		taskqueue_drain(taskqueue_fast, &sc->nfe_tx_task);
 		ether_ifdetach(ifp);
 	}
 
@@ -1630,7 +1628,7 @@ nfe_poll(struct ifnet *ifp, enum poll_cm
 		nfe_rxeof(sc, count);
 	nfe_txeof(sc);
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-		taskqueue_enqueue_fast(sc->nfe_tq, &sc->nfe_tx_task);
+		nfe_start_locked(ifp);
 
 	if (cmd == POLL_AND_CHECK_STATUS) {
 		if ((r = NFE_READ(sc, sc->nfe_irq_status)) == 0) {
@@ -1897,7 +1895,7 @@ nfe_int_task(void *arg, int pending)
 	nfe_txeof(sc);
 
 	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-		taskqueue_enqueue_fast(sc->nfe_tq, &sc->nfe_tx_task);
+		nfe_start_locked(ifp);
 
 	NFE_UNLOCK(sc);
 
@@ -2585,29 +2583,27 @@ done:
 
 
 static void
-nfe_tx_task(void *arg, int pending)
+nfe_start(struct ifnet *ifp)
 {
-	struct ifnet *ifp;
+	struct nfe_softc *sc = ifp->if_softc;
 
-	ifp = (struct ifnet *)arg;
-	nfe_start(ifp);
+	NFE_LOCK(sc);
+	nfe_start_locked(ifp);
+	NFE_UNLOCK(sc);
 }
 
-
 static void
-nfe_start(struct ifnet *ifp)
+nfe_start_locked(struct ifnet *ifp)
 {
 	struct nfe_softc *sc = ifp->if_softc;
 	struct mbuf *m0;
 	int enq;
 
-	NFE_LOCK(sc);
+	NFE_LOCK_ASSERT(sc);
 
 	if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
-	    IFF_DRV_RUNNING || sc->nfe_link == 0) {
-		NFE_UNLOCK(sc);
+	    IFF_DRV_RUNNING || sc->nfe_link == 0)
 		return;
-	}
 
 	for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd);) {
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m0);
@@ -2637,8 +2633,6 @@ nfe_start(struct ifnet *ifp)
 		 */
 		sc->nfe_watchdog_timer = 5;
 	}
-
-	NFE_UNLOCK(sc);
 }
 
 
@@ -2656,7 +2650,7 @@ nfe_watchdog(struct ifnet *ifp)
 		if_printf(ifp, "watchdog timeout (missed Tx interrupts) "
 		    "-- recovering\n");
 		if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-			taskqueue_enqueue_fast(sc->nfe_tq, &sc->nfe_tx_task);
+			nfe_start_locked(ifp);
 		return;
 	}
 	/* Check if we've lost start Tx command. */

Modified: stable/7/sys/dev/nfe/if_nfevar.h
==============================================================================
--- stable/7/sys/dev/nfe/if_nfevar.h	Wed Feb  2 18:42:53 2011	(r218198)
+++ stable/7/sys/dev/nfe/if_nfevar.h	Wed Feb  2 18:44:02 2011	(r218199)
@@ -139,7 +139,6 @@ struct nfe_softc {
 	struct nfe_hw_stats	nfe_stats;
 	struct taskqueue	*nfe_tq;
 	struct task		nfe_int_task;
-	struct task		nfe_tx_task;
 	int			nfe_link;
 	int			nfe_suspended;
 	int			nfe_framesize;

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 10:22:19 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 770B31065673;
	Fri,  4 Feb 2011 10:22:19 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 66A098FC17;
	Fri,  4 Feb 2011 10:22: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 p14AMJUa077558;
	Fri, 4 Feb 2011 10:22:19 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14AMJ8C077556;
	Fri, 4 Feb 2011 10:22:19 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201102041022.p14AMJ8C077556@svn.freebsd.org>
From: Bruce Cran 
Date: Fri, 4 Feb 2011 10:22: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: r218261 - stable/7/sys/vm
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 10:22:19 -0000

Author: brucec
Date: Fri Feb  4 10:22:19 2011
New Revision: 218261
URL: http://svn.freebsd.org/changeset/base/218261

Log:
  MFC r216873:
  
  There can be more than 0x20000000 swap meta blocks allocated if a swap-backed
  md(4) device is used. Don't panic when deallocating such a device is swap
  has been used.
  
  PR:	kern/133170

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

Modified: stable/7/sys/vm/swap_pager.c
==============================================================================
--- stable/7/sys/vm/swap_pager.c	Fri Feb  4 10:21:16 2011	(r218260)
+++ stable/7/sys/vm/swap_pager.c	Fri Feb  4 10:22:19 2011	(r218261)
@@ -1528,8 +1528,6 @@ swap_pager_isswapped(vm_object_t object,
 			}
 		}
 		index += SWAP_META_PAGES;
-		if (index > 0x20000000)
-			panic("swap_pager_isswapped: failed to locate all swap meta blocks");
 	}
 	mtx_unlock(&swhash_mtx);
 	return (0);
@@ -1844,8 +1842,6 @@ swp_pager_meta_free_all(vm_object_t obje
 		}
 		mtx_unlock(&swhash_mtx);
 		index += SWAP_META_PAGES;
-		if (index > 0x20000000)
-			panic("swp_pager_meta_free_all: failed to locate all swap meta blocks");
 	}
 }
 

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 13:40:03 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 259D31065784;
	Fri,  4 Feb 2011 13:40:03 +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 E7F048FC1A;
	Fri,  4 Feb 2011 13:40: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 p14De29J084683;
	Fri, 4 Feb 2011 13:40:02 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14De2KL084681;
	Fri, 4 Feb 2011 13:40:02 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201102041340.p14De2KL084681@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 4 Feb 2011 13:40:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r218268 - stable/7/sys/conf
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 13:40:03 -0000

Author: jhb
Date: Fri Feb  4 13:40:02 2011
New Revision: 218268
URL: http://svn.freebsd.org/changeset/base/218268

Log:
  MFC 200605:
  Add entries to NOTES for the modular phy support so that these options are
  documented.

Modified:
  stable/7/sys/conf/NOTES
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/conf/NOTES
==============================================================================
--- stable/7/sys/conf/NOTES	Fri Feb  4 13:39:43 2011	(r218267)
+++ stable/7/sys/conf/NOTES	Fri Feb  4 13:40:02 2011	(r218268)
@@ -1711,14 +1711,45 @@ device		puc
 #
 # Network interfaces:
 #
-# MII bus support is required for some PCI 10/100 ethernet NICs,
+# MII bus support is required for many PCI Ethernet NICs,
 # namely those which use MII-compliant transceivers or implement
-# transceiver control interfaces that operate like an MII. Adding
+# transceiver control interfaces that operate like an MII.  Adding
 # "device miibus" to the kernel config pulls in support for
 # the generic miibus API and all of the PHY drivers, including a
 # generic one for PHYs that aren't specifically handled by an
-# individual driver.
-device		miibus
+# individual driver.  Support for specific PHYs may be built by adding
+# "device mii" then adding the appropriate PHY driver.
+device  	miibus		# MII support including all PHYs
+device  	mii		# Minimal MII support
+
+device  	acphy		# Altima Communications AC101
+device  	amphy		# AMD AM79c873 / Davicom DM910{1,2}
+device  	atphy		# Attansic/Atheros F1
+device  	bmtphy		# Broadcom BCM5201/BCM5202 and 3Com 3c905C
+device  	brgphy		# Broadcom BCM54xx/57xx 1000baseTX
+device  	ciphy		# Cicada/Vitesse CS/VSC8xxx
+device  	e1000phy	# Marvell 88E1000 1000/100/10-BT
+device  	exphy		# 3Com internal PHY
+device  	gentbi		# Generic 10-bit 1000BASE-{LX,SX} fiber ifaces
+device  	icsphy		# ICS ICS1889-1893
+device  	inphy		# Intel 82553/82555
+device  	ip1000phy	# IC Plus IP1000A/IP1001
+device  	jmphy		# JMicron JMP211/JMP202
+device  	lxtphy		# Level One LXT-970
+device  	mlphy		# Micro Linear 6692
+device  	nsgphy		# NatSemi DP8361/DP83865/DP83891
+device  	nsphy		# NatSemi DP83840A
+device  	nsphyter	# NatSemi DP83843/DP83815
+device  	pnaphy		# HomePNA
+device  	qsphy		# Quality Semiconductor QS6612
+device  	rgephy		# RealTek 8169S/8110S/8211B/8211C
+device  	rlphy		# RealTek 8139
+device  	rlswitch	# RealTek 8305
+device  	ruephy		# RealTek RTL8150
+device  	tdkphy		# TDK 89Q2120
+device  	tlphy		# Texas Instruments ThunderLAN
+device  	truephy		# LSI TruePHY
+device		xmphy		# XaQti XMAC II
 
 # ae:   Support for gigabit ethernet adapters based on the Attansic/Atheros
 #       L2 PCI-Express FastEthernet controllers.

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 14:25:40 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3B2EF106564A;
	Fri,  4 Feb 2011 14:25: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 293318FC17;
	Fri,  4 Feb 2011 14:25: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 p14EPejV087025;
	Fri, 4 Feb 2011 14:25:40 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14EPeLY087023;
	Fri, 4 Feb 2011 14:25:40 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201102041425.p14EPeLY087023@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 4 Feb 2011 14:25:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r218274 - stable/7/contrib/top
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 14:25:40 -0000

Author: jhb
Date: Fri Feb  4 14:25:39 2011
New Revision: 218274
URL: http://svn.freebsd.org/changeset/base/218274

Log:
  MFC 218171:
  Output an appropriate amount of padding to line up per-CPU state columns
  rather than using a terminal sequence to move the cursor when drawing the
  initial screen.

Modified:
  stable/7/contrib/top/display.c
Directory Properties:
  stable/7/contrib/top/   (props changed)

Modified: stable/7/contrib/top/display.c
==============================================================================
--- stable/7/contrib/top/display.c	Fri Feb  4 14:20:27 2011	(r218273)
+++ stable/7/contrib/top/display.c	Fri Feb  4 14:25:39 2011	(r218274)
@@ -447,12 +447,14 @@ for (cpu = 0; cpu < num_cpus; cpu++) {
     /* print tag and bump lastline */
     if (num_cpus == 1)
 	printf("\nCPU: ");
-    else
-	printf("\nCPU %d: ", cpu);
+    else {
+	value = printf("\nCPU %d: ", cpu);
+	while (value++ <= cpustates_column)
+		printf(" ");
+    }
     lastline++;
 
     /* now walk thru the names and print the line */
-    Move_to(cpustates_column, y_cpustates + cpu);
     while ((thisname = *names++) != NULL)
     {
 	if (*thisname != '\0')
@@ -532,7 +534,7 @@ z_cpustates()
     register char **names;
     register char *thisname;
     register int *lp;
-    int cpu;
+    int cpu, value;
 
 for (cpu = 0; cpu < num_cpus; cpu++) {
     names = cpustate_names;
@@ -540,11 +542,13 @@ for (cpu = 0; cpu < num_cpus; cpu++) {
     /* show tag and bump lastline */
     if (num_cpus == 1)
 	printf("\nCPU: ");
-    else
-	printf("\nCPU %d: ", cpu);
+    else {
+	value = printf("\nCPU %d: ", cpu);
+	while (value++ <= cpustates_column)
+		printf(" ");
+    }
     lastline++;
 
-    Move_to(cpustates_column, y_cpustates + cpu);
     while ((thisname = *names++) != NULL)
     {
 	if (*thisname != '\0')

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 14:44:59 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6E0571065670;
	Fri,  4 Feb 2011 14:44: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 5C23D8FC16;
	Fri,  4 Feb 2011 14:44: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 p14EixXI087712;
	Fri, 4 Feb 2011 14:44:59 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14EixJP087709;
	Fri, 4 Feb 2011 14:44:59 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201102041444.p14EixJP087709@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 4 Feb 2011 14:44: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: r218277 - in stable/7/sys: kern sys
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 14:44:59 -0000

Author: jhb
Date: Fri Feb  4 14:44:59 2011
New Revision: 218277
URL: http://svn.freebsd.org/changeset/base/218277

Log:
  MFC 217075:
  Retire PCONFIG and leave the priority of thread0 alone when waiting for
  interrupt config hooks to execute.
  
  To preserve the KBI, I did not renumber priorities but simply removed
  PCONFIG.

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

Modified: stable/7/sys/kern/subr_autoconf.c
==============================================================================
--- stable/7/sys/kern/subr_autoconf.c	Fri Feb  4 14:44:42 2011	(r218276)
+++ stable/7/sys/kern/subr_autoconf.c	Fri Feb  4 14:44:59 2011	(r218277)
@@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy)
 	warned = 0;
 	while (!TAILQ_EMPTY(&intr_config_hook_list)) {
 		if (msleep(&intr_config_hook_list, &intr_config_hook_lock,
-		    PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) ==
+		    0, "conifhk", WARNING_INTERVAL_SECS * hz) ==
 		    EWOULDBLOCK) {
 			mtx_unlock(&intr_config_hook_lock);
 			warned++;

Modified: stable/7/sys/sys/priority.h
==============================================================================
--- stable/7/sys/sys/priority.h	Fri Feb  4 14:44:42 2011	(r218276)
+++ stable/7/sys/sys/priority.h	Fri Feb  4 14:44:59 2011	(r218277)
@@ -105,7 +105,6 @@
 #define	PZERO			(PRI_MIN_KERN + 20)
 #define	PSOCK			(PRI_MIN_KERN + 24)
 #define	PWAIT			(PRI_MIN_KERN + 28)
-#define	PCONFIG			(PRI_MIN_KERN + 32)
 #define	PLOCK			(PRI_MIN_KERN + 36)
 #define	PPAUSE			(PRI_MIN_KERN + 40)
 

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 16:32:35 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 633E21065670;
	Fri,  4 Feb 2011 16:32:35 +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 4807E8FC20;
	Fri,  4 Feb 2011 16:32: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 p14GWZXJ090616;
	Fri, 4 Feb 2011 16:32:35 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14GWZMo090613;
	Fri, 4 Feb 2011 16:32:35 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201102041632.p14GWZMo090613@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 4 Feb 2011 16:32: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: r218284 - in stable/7/sys: kern sys
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 16:32:35 -0000

Author: jhb
Date: Fri Feb  4 16:32:34 2011
New Revision: 218284
URL: http://svn.freebsd.org/changeset/base/218284

Log:
  MFC 217292:
  - Retire some unused ithread priorities: PI_TTYHIGH, PI_TAPE, and
    PI_DISKLOW.  While here, rename PI_TTYLOW to PI_TTY.
  - Add a macro PI_SWI() that takes a SWI_* constant as an argument and
    returns the suitable thread priority.
  
  To preserve the KBI, I did not renumber priorities but simply removed
  unused ones.

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

Modified: stable/7/sys/kern/kern_intr.c
==============================================================================
--- stable/7/sys/kern/kern_intr.c	Fri Feb  4 16:30:13 2011	(r218283)
+++ stable/7/sys/kern/kern_intr.c	Fri Feb  4 16:32:34 2011	(r218284)
@@ -128,22 +128,18 @@ intr_priority(enum intr_type flags)
 	    INTR_TYPE_CAM | INTR_TYPE_MISC | INTR_TYPE_CLK | INTR_TYPE_AV);
 	switch (flags) {
 	case INTR_TYPE_TTY:
-		pri = PI_TTYLOW;
+		pri = PI_TTY;
 		break;
 	case INTR_TYPE_BIO:
-		/*
-		 * XXX We need to refine this.  BSD/OS distinguishes
-		 * between tape and disk priorities.
-		 */
 		pri = PI_DISK;
 		break;
 	case INTR_TYPE_NET:
 		pri = PI_NET;
 		break;
 	case INTR_TYPE_CAM:
-		pri = PI_DISK;          /* XXX or PI_CAM? */
+		pri = PI_DISK;
 		break;
-	case INTR_TYPE_AV:		/* Audio/video */
+	case INTR_TYPE_AV:
 		pri = PI_AV;
 		break;
 	case INTR_TYPE_CLK:
@@ -1051,7 +1047,7 @@ swi_add(struct intr_event **eventp, cons
 			*eventp = ie;
 	}
 	return (intr_event_add_handler(ie, name, NULL, handler, arg,
-		    (pri * RQ_PPQ) + PI_SOFT, flags, cookiep));
+		    PI_SWI(pri), flags, cookiep));
 		    /* XXKSE.. think of a better way to get separate queues */
 }
 
@@ -1594,18 +1590,13 @@ db_dump_intrhand(struct intr_handler *ih
 	case PI_AV:
 		db_printf("AV  ");
 		break;
-	case PI_TTYHIGH:
-	case PI_TTYLOW:
+	case PI_TTY:
 		db_printf("TTY ");
 		break;
-	case PI_TAPE:
-		db_printf("TAPE");
-		break;
 	case PI_NET:
 		db_printf("NET ");
 		break;
 	case PI_DISK:
-	case PI_DISKLOW:
 		db_printf("DISK");
 		break;
 	case PI_DULL:

Modified: stable/7/sys/sys/priority.h
==============================================================================
--- stable/7/sys/sys/priority.h	Fri Feb  4 16:30:13 2011	(r218283)
+++ stable/7/sys/sys/priority.h	Fri Feb  4 16:32:34 2011	(r218284)
@@ -85,14 +85,12 @@
 
 #define	PI_REALTIME		(PRI_MIN_ITHD + 0)
 #define	PI_AV			(PRI_MIN_ITHD + 4)
-#define	PI_TTYHIGH		(PRI_MIN_ITHD + 8)
-#define	PI_TAPE			(PRI_MIN_ITHD + 12)
 #define	PI_NET			(PRI_MIN_ITHD + 16)
 #define	PI_DISK			(PRI_MIN_ITHD + 20)
-#define	PI_TTYLOW		(PRI_MIN_ITHD + 24)
-#define	PI_DISKLOW		(PRI_MIN_ITHD + 28)
+#define	PI_TTY			(PRI_MIN_ITHD + 24)
 #define	PI_DULL			(PRI_MIN_ITHD + 32)
 #define	PI_SOFT			(PRI_MIN_ITHD + 36)
+#define	PI_SWI(x)		(PI_SOFT + (x) * RQ_PPQ)
 
 #define	PRI_MIN_KERN		(64)
 #define	PRI_MAX_KERN		(PRI_MIN_REALTIME - 1)

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 17:11:54 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F7E8106566C;
	Fri,  4 Feb 2011 17:11: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 1DD388FC19;
	Fri,  4 Feb 2011 17:11: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 p14HBsFU091805;
	Fri, 4 Feb 2011 17:11:54 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14HBr1d091803;
	Fri, 4 Feb 2011 17:11:53 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201102041711.p14HBr1d091803@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 4 Feb 2011 17:11: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: r218287 - stable/7/sys/kern
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 17:11:54 -0000

Author: jhb
Date: Fri Feb  4 17:11:53 2011
New Revision: 218287
URL: http://svn.freebsd.org/changeset/base/218287

Log:
  MFC 217351:
  Introduce two new helper macros to define the priority ranges used for
  interactive timeshare threads (PRI_*_INTERACTIVE) and non-interactive
  timeshare threads (PRI_*_BATCH) and use these instead of PRI_*_REALTIME
  and PRI_*_TIMESHARE.  No functional change.

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

Modified: stable/7/sys/kern/sched_ule.c
==============================================================================
--- stable/7/sys/kern/sched_ule.c	Fri Feb  4 17:11:37 2011	(r218286)
+++ stable/7/sys/kern/sched_ule.c	Fri Feb  4 17:11:53 2011	(r218287)
@@ -119,6 +119,15 @@ static struct td_sched td_sched0;
     CPU_ISSET((cpu), &(td)->td_cpuset->cs_mask)
 
 /*
+ * Priority ranges used for interactive and non-interactive timeshare
+ * threads.  Interactive threads use realtime priorities.
+ */
+#define	PRI_MIN_INTERACT	PRI_MIN_REALTIME
+#define	PRI_MAX_INTERACT	PRI_MAX_REALTIME
+#define	PRI_MIN_BATCH		PRI_MIN_TIMESHARE
+#define	PRI_MAX_BATCH		PRI_MAX_TIMESHARE
+
+/*
  * Cpu percentage computation macros and defines.
  *
  * SCHED_TICK_SECS:	Number of seconds to average the cpu usage across.
@@ -149,8 +158,8 @@ static struct td_sched td_sched0;
  */
 #define	SCHED_PRI_NRESV		(PRIO_MAX - PRIO_MIN)
 #define	SCHED_PRI_NHALF		(SCHED_PRI_NRESV / 2)
-#define	SCHED_PRI_MIN		(PRI_MIN_TIMESHARE + SCHED_PRI_NHALF)
-#define	SCHED_PRI_MAX		(PRI_MAX_TIMESHARE - SCHED_PRI_NHALF)
+#define	SCHED_PRI_MIN		(PRI_MIN_BATCH + SCHED_PRI_NHALF)
+#define	SCHED_PRI_MAX		(PRI_MAX_BATCH - SCHED_PRI_NHALF)
 #define	SCHED_PRI_RANGE		(SCHED_PRI_MAX - SCHED_PRI_MIN + 1)
 #define	SCHED_PRI_TICKS(ts)						\
     (SCHED_TICK_HZ((ts)) /						\
@@ -385,7 +394,7 @@ tdq_print(int cpu)
 #endif
 }
 
-#define	TS_RQ_PPQ	(((PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE) + 1) / RQ_NQS)
+#define	TS_RQ_PPQ	(((PRI_MAX_BATCH - PRI_MIN_BATCH) + 1) / RQ_NQS)
 /*
  * Add a thread to the actual run-queue.  Keeps transferable counts up to
  * date with what is actually on the run-queue.  Selects the correct
@@ -407,14 +416,14 @@ tdq_runq_add(struct tdq *tdq, struct td_
 		u_char pri;
 
 		pri = ts->ts_thread->td_priority;
-		KASSERT(pri <= PRI_MAX_TIMESHARE && pri >= PRI_MIN_TIMESHARE,
+		KASSERT(pri <= PRI_MAX_BATCH && pri >= PRI_MIN_BATCH,
 			("Invalid priority %d on timeshare runq", pri));
 		/*
 		 * This queue contains only priorities between MIN and MAX
 		 * realtime.  Use the whole queue to represent these values.
 		 */
 		if ((flags & (SRQ_BORROWING|SRQ_PREEMPTED)) == 0) {
-			pri = (pri - PRI_MIN_TIMESHARE) / TS_RQ_PPQ;
+			pri = (pri - PRI_MIN_BATCH) / TS_RQ_PPQ;
 			pri = (pri + tdq->tdq_idx) % RQ_NQS;
 			/*
 			 * This effectively shortens the queue by one so we
@@ -845,10 +854,10 @@ tdq_notify(struct td_sched *ts)
 	if (cpri > PRI_MIN_IDLE)
 		goto sendipi;
 	/*
-	 * If we're realtime or better and there is timeshare or worse running
-	 * send an IPI.
+	 * If we're interactive or better and there is non-interactive
+	 * or worse running send an IPI.
 	 */
-	if (pri < PRI_MAX_REALTIME && cpri > PRI_MAX_REALTIME)
+	if (pri <= PRI_MAX_INTERACT && cpri > PRI_MAX_INTERACT)
 		goto sendipi;
 	/*
 	 * Otherwise only IPI if we exceed the threshold.
@@ -1177,7 +1186,7 @@ tdq_choose(struct tdq *tdq)
 		return (ts);
 	ts = runq_choose_from(&tdq->tdq_timeshare, tdq->tdq_ridx);
 	if (ts != NULL) {
-		KASSERT(ts->ts_thread->td_priority >= PRI_MIN_TIMESHARE,
+		KASSERT(ts->ts_thread->td_priority >= PRI_MIN_BATCH,
 		    ("tdq_choose: Invalid priority on timeshare queue %d",
 		    ts->ts_thread->td_priority));
 		return (ts);
@@ -1477,10 +1486,10 @@ sched_priority(struct thread *td)
 	 */
 	score = imax(0, sched_interact_score(td) + td->td_proc->p_nice);
 	if (score < sched_interact) {
-		pri = PRI_MIN_REALTIME;
-		pri += ((PRI_MAX_REALTIME - PRI_MIN_REALTIME + 1) /
+		pri = PRI_MIN_INTERACT;
+		pri += ((PRI_MAX_INTERACT - PRI_MIN_INTERACT + 1) /
 		    sched_interact) * score;
-		KASSERT(pri >= PRI_MIN_REALTIME && pri <= PRI_MAX_REALTIME,
+		KASSERT(pri >= PRI_MIN_INTERACT && pri <= PRI_MAX_INTERACT,
 		    ("sched_priority: invalid interactive priority %d score %d",
 		    pri, score));
 	} else {
@@ -1488,7 +1497,7 @@ sched_priority(struct thread *td)
 		if (td->td_sched->ts_ticks)
 			pri += SCHED_PRI_TICKS(td->td_sched);
 		pri += SCHED_PRI_NICE(td->td_proc->p_nice);
-		KASSERT(pri >= PRI_MIN_TIMESHARE && pri <= PRI_MAX_TIMESHARE,
+		KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH,
 		    ("sched_priority: invalid priority %d: nice %d, " 
 		    "ticks %d ftick %d ltick %d tick pri %d",
 		    pri, td->td_proc->p_nice, td->td_sched->ts_ticks,
@@ -2395,9 +2404,9 @@ tdq_add(struct tdq *tdq, struct thread *
 	/*
 	 * Pick the run queue based on priority.
 	 */
-	if (td->td_priority <= PRI_MAX_REALTIME)
+	if (td->td_priority < PRI_MIN_BATCH)
 		ts->ts_runq = &tdq->tdq_realtime;
-	else if (td->td_priority <= PRI_MAX_TIMESHARE)
+	else if (td->td_priority <= PRI_MAX_BATCH)
 		ts->ts_runq = &tdq->tdq_timeshare;
 	else
 		ts->ts_runq = &tdq->tdq_idle;

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 19:27:59 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F17B11065670;
	Fri,  4 Feb 2011 19:27:59 +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 E09068FC13;
	Fri,  4 Feb 2011 19:27: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 p14JRx4R095101;
	Fri, 4 Feb 2011 19:27:59 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14JRx4W095099;
	Fri, 4 Feb 2011 19:27:59 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201102041927.p14JRx4W095099@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 4 Feb 2011 19:27: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: r218292 - stable/7/include
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 19:28:00 -0000

Author: ed
Date: Fri Feb  4 19:27:59 2011
New Revision: 218292
URL: http://svn.freebsd.org/changeset/base/218292

Log:
  MFC r217207:
  
    Add missing __dead2 to __assert().
  
    __assert() is called when an assertion fails. After printing an error
    message, it will call abort(). abort() never returns, hence it has the
    __dead2 attribute. Also add this attribute to __assert().

Modified:
  stable/7/include/assert.h
Directory Properties:
  stable/7/include/   (props changed)

Modified: stable/7/include/assert.h
==============================================================================
--- stable/7/include/assert.h	Fri Feb  4 19:27:49 2011	(r218291)
+++ stable/7/include/assert.h	Fri Feb  4 19:27:59 2011	(r218292)
@@ -60,5 +60,5 @@
 #endif /* NDEBUG */
 
 __BEGIN_DECLS
-void __assert(const char *, const char *, int, const char *);
+void __assert(const char *, const char *, int, const char *) __dead2;
 __END_DECLS

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 20:27:50 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 888EE106566B;
	Fri,  4 Feb 2011 20:27:50 +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 75B7B8FC13;
	Fri,  4 Feb 2011 20:27: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 p14KRo8k096856;
	Fri, 4 Feb 2011 20:27:50 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14KRor1096849;
	Fri, 4 Feb 2011 20:27:50 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201102042027.p14KRor1096849@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 4 Feb 2011 20:27:50 +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: r218295 - in stable/7/sys: conf dev/mii modules/mii
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 20:27:50 -0000

Author: yongari
Date: Fri Feb  4 20:27:50 2011
New Revision: 218295
URL: http://svn.freebsd.org/changeset/base/218295

Log:
  MFC r216828:
    Add RDC Semiconductor R6040 10/100 PHY driver.

Added:
  stable/7/sys/dev/mii/rdcphy.c
     - copied unchanged from r216828, head/sys/dev/mii/rdcphy.c
  stable/7/sys/dev/mii/rdcphyreg.h
     - copied unchanged from r216828, head/sys/dev/mii/rdcphyreg.h
Modified:
  stable/7/sys/conf/NOTES
  stable/7/sys/conf/files
  stable/7/sys/dev/mii/miidevs
  stable/7/sys/modules/mii/Makefile
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/conf/NOTES
==============================================================================
--- stable/7/sys/conf/NOTES	Fri Feb  4 20:12:45 2011	(r218294)
+++ stable/7/sys/conf/NOTES	Fri Feb  4 20:27:50 2011	(r218295)
@@ -1742,6 +1742,7 @@ device  	nsphy		# NatSemi DP83840A
 device  	nsphyter	# NatSemi DP83843/DP83815
 device  	pnaphy		# HomePNA
 device  	qsphy		# Quality Semiconductor QS6612
+device  	rdcphy		# RDC Semiconductor R6040
 device  	rgephy		# RealTek 8169S/8110S/8211B/8211C
 device  	rlphy		# RealTek 8139
 device  	rlswitch	# RealTek 8305

Modified: stable/7/sys/conf/files
==============================================================================
--- stable/7/sys/conf/files	Fri Feb  4 20:12:45 2011	(r218294)
+++ stable/7/sys/conf/files	Fri Feb  4 20:27:50 2011	(r218295)
@@ -974,6 +974,7 @@ dev/mii/nsphy.c			optional miibus | nsph
 dev/mii/nsphyter.c		optional miibus | nsphyter
 dev/mii/pnaphy.c		optional miibus | pnaphy
 dev/mii/qsphy.c			optional miibus | qsphy
+dev/mii/rdcphy.c		optional miibus | rdcphy
 dev/mii/rgephy.c		optional miibus | rgephy
 dev/mii/rlphy.c			optional miibus | rlphy
 dev/mii/rlswitch.c		optional rlswitch

Modified: stable/7/sys/dev/mii/miidevs
==============================================================================
--- stable/7/sys/dev/mii/miidevs	Fri Feb  4 20:12:45 2011	(r218294)
+++ stable/7/sys/dev/mii/miidevs	Fri Feb  4 20:27:50 2011	(r218295)
@@ -58,6 +58,7 @@ oui JMICRON			0x001b8c	JMicron Technolog
 oui LEVEL1			0x00207b	Level 1
 oui NATSEMI			0x080017	National Semiconductor
 oui QUALSEMI			0x006051	Quality Semiconductor
+oui RDC				0x000bb4	RDC Semiconductor
 oui REALTEK			0x000020	RealTek Semicondctor
 oui SEEQ			0x00a07d	Seeq
 oui SIS				0x00e006	Silicon Integrated Systems
@@ -207,6 +208,9 @@ model NATSEMI DP83865		0x0007 DP83865 10
 /* Quality Semiconductor PHYs */
 model QUALSEMI QS6612		0x0000 QS6612 10/100 media interface
 
+/* RDC Semiconductor PHYs */
+model RDC R6040			0x0003 R6040 10/100 media interface
+
 /* RealTek Semiconductor PHYs */
 model REALTEK RTL8201L		0x0020 RTL8201L 10/100 media interface
 model xxREALTEK RTL8305SC	0x0005 RTL8305SC 10/100 802.1q switch

Copied: stable/7/sys/dev/mii/rdcphy.c (from r216828, head/sys/dev/mii/rdcphy.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/7/sys/dev/mii/rdcphy.c	Fri Feb  4 20:27:50 2011	(r218295, copy of r216828, head/sys/dev/mii/rdcphy.c)
@@ -0,0 +1,267 @@
+/*-
+ * Copyright (c) 2010, Pyun YongHyeon 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice unmodified, 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$");
+
+/*
+ * Driver for the RDC Semiconductor R6040 10/100 PHY.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include "miidevs.h"
+
+#include 
+
+#include "miibus_if.h"
+
+static device_probe_t	rdcphy_probe;
+static device_attach_t	rdcphy_attach;
+
+struct rdcphy_softc {
+	struct mii_softc mii_sc;
+	int mii_model;
+	int mii_link_tick;
+#define	RDCPHY_MANNEG_TICK	3
+};
+
+static device_method_t rdcphy_methods[] = {
+	/* device interface */
+	DEVMETHOD(device_probe,		rdcphy_probe),
+	DEVMETHOD(device_attach,	rdcphy_attach),
+	DEVMETHOD(device_detach,	mii_phy_detach),
+	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
+	KOBJMETHOD_END
+};
+
+static devclass_t rdcphy_devclass;
+
+static driver_t rdcphy_driver = {
+	"rdcphy",
+	rdcphy_methods,
+	sizeof(struct rdcphy_softc)
+};
+
+DRIVER_MODULE(rdcphy, miibus, rdcphy_driver, rdcphy_devclass, 0, 0);
+
+static int	rdcphy_service(struct mii_softc *, struct mii_data *, int);
+static void	rdcphy_status(struct mii_softc *);
+
+static const struct mii_phydesc rdcphys[] = {
+	MII_PHY_DESC(RDC, R6040),
+	MII_PHY_END
+};
+
+static int
+rdcphy_probe(device_t dev)
+{
+
+	return (mii_phy_dev_probe(dev, rdcphys, BUS_PROBE_DEFAULT));
+}
+
+static int
+rdcphy_attach(device_t dev)
+{
+	struct rdcphy_softc *rsc;
+	struct mii_softc *sc;
+	struct mii_attach_args *ma;
+	struct mii_data *mii;
+
+	rsc = device_get_softc(dev);
+	sc = &rsc->mii_sc;
+	ma = device_get_ivars(dev);
+	sc->mii_dev = device_get_parent(dev);
+	mii = ma->mii_data;
+	LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
+
+	sc->mii_flags = miibus_get_flags(dev);
+	sc->mii_inst = mii->mii_instance++;
+	sc->mii_phy = ma->mii_phyno;
+	sc->mii_service = rdcphy_service;
+	sc->mii_pdata = mii;
+
+	rsc->mii_model = MII_MODEL(ma->mii_id2);
+	if (bootverbose)
+		device_printf(dev, "OUI 0x%06x, model 0x%04x, rev. %d\n",
+		    MII_OUI(ma->mii_id1, ma->mii_id2), MII_MODEL(ma->mii_id2),
+		    MII_REV(ma->mii_id2));
+
+	mii_phy_reset(sc);
+
+	sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
+	if (sc->mii_capabilities & BMSR_EXTSTAT)
+		sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
+	device_printf(dev, " ");
+	mii_phy_add_media(sc);
+	printf("\n");
+
+	MIIBUS_MEDIAINIT(sc->mii_dev);
+	return (0);
+}
+
+static int
+rdcphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
+{
+	struct rdcphy_softc *rsc;
+	struct ifmedia_entry *ife;
+
+	rsc = (struct rdcphy_softc *)sc;
+	ife = mii->mii_media.ifm_cur;
+
+	switch (cmd) {
+	case MII_POLLSTAT:
+		break;
+
+	case MII_MEDIACHG:
+		/*
+		 * If the interface is not up, don't do anything.
+		 */
+		if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
+			break;
+
+		mii_phy_setmedia(sc);
+		switch (IFM_SUBTYPE(ife->ifm_media)) {
+		case IFM_100_TX:
+		case IFM_10_T:
+			/*
+			 * Report fake lost link event to parent
+			 * driver.  This will stop MAC of parent
+			 * driver and make it possible to reconfigure
+			 * MAC after completion of link establishment.
+			 * Note, the parent MAC seems to require
+			 * restarting MAC when underlying any PHY
+			 * configuration was changed even if the
+			 * resolved speed/duplex was not changed at
+			 * all.
+			 */
+			mii->mii_media_status = 0;
+			mii->mii_media_active = IFM_ETHER | IFM_NONE;
+			rsc->mii_link_tick = RDCPHY_MANNEG_TICK;
+			/* Immediately report link down. */
+			mii_phy_update(sc, MII_MEDIACHG);
+			return (0);
+		default:
+			break;
+		}
+		break;
+
+	case MII_TICK:
+		if (mii_phy_tick(sc) == EJUSTRETURN)
+			return (0);
+		if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) {
+			/*
+			 * It seems the PHY hardware does not correctly
+			 * report link status changes when manual link
+			 * configuration is in progress.  It is also
+			 * possible for the PHY to complete establishing
+			 * a link within one second such that mii(4)
+			 * did not notice the link change.  To workaround
+			 * the issue, emulate lost link event and wait
+			 * for 3 seconds when manual link configuration
+			 * is in progress.  3 seconds would be long
+			 * enough to absorb transient link flips.
+			 */
+			if (rsc->mii_link_tick > 0) {
+				rsc->mii_link_tick--;
+				return (0);
+			}
+		}
+		break;
+	}
+
+	/* Update the media status. */
+	rdcphy_status(sc);
+
+	/* Callback if something changed. */
+	mii_phy_update(sc, cmd);
+	return (0);
+}
+
+static void
+rdcphy_status(struct mii_softc *sc)
+{
+	struct mii_data *mii;
+	struct ifmedia_entry *ife;
+	int bmsr, bmcr, physts;
+
+	mii = sc->mii_pdata;
+	ife = mii->mii_media.ifm_cur;
+
+	mii->mii_media_status = IFM_AVALID;
+	mii->mii_media_active = IFM_ETHER;
+
+	bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR);
+	physts = PHY_READ(sc, MII_RDCPHY_STATUS);
+
+	if ((physts & STATUS_LINK_UP) != 0)
+		mii->mii_media_status |= IFM_ACTIVE;
+
+	bmcr = PHY_READ(sc, MII_BMCR);
+	if ((bmcr & BMCR_ISO) != 0) {
+		mii->mii_media_active |= IFM_NONE;
+		mii->mii_media_status = 0;
+		return;
+	}
+
+	if ((bmcr & BMCR_LOOP) != 0)
+		mii->mii_media_active |= IFM_LOOP;
+
+	if ((bmcr & BMCR_AUTOEN) != 0) {
+		if ((bmsr & BMSR_ACOMP) == 0) {
+			/* Erg, still trying, I guess... */
+			mii->mii_media_active |= IFM_NONE;
+			return;
+		}
+	}
+
+	switch (physts & STATUS_SPEED_MASK) {
+	case STATUS_SPEED_100:
+		mii->mii_media_active |= IFM_100_TX;
+		break;
+	case STATUS_SPEED_10:
+		mii->mii_media_active |= IFM_10_T;
+		break;
+	default:
+		mii->mii_media_active |= IFM_NONE;
+		return;
+	}
+	if ((physts & STATUS_FULL_DUPLEX) != 0)
+		mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc);
+	else
+		mii->mii_media_active |= IFM_HDX;
+}

Copied: stable/7/sys/dev/mii/rdcphyreg.h (from r216828, head/sys/dev/mii/rdcphyreg.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/7/sys/dev/mii/rdcphyreg.h	Fri Feb  4 20:27:50 2011	(r218295, copy of r216828, head/sys/dev/mii/rdcphyreg.h)
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 2010, Pyun YongHyeon 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice unmodified, this list of conditions, and the following
+ *    disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _DEV_MII_RDCPHYREG_H_
+#define	_DEV_MII_RDCPHYREG_H_
+
+#define	MII_RDCPHY_DEBUG	0x11
+#define	DEBUG_JABBER_DIS	0x0040
+#define	DEBUG_LOOP_BACK_10MBPS	0x0400
+
+#define	MII_RDCPHY_CTRL		0x14
+#define	CTRL_SQE_ENB		0x0100
+#define	CTRL_NEG_POLARITY	0x0400
+#define	CTRL_AUTO_POLARITY	0x0800
+#define	CTRL_MDIXSEL_RX		0x2000
+#define	CTRL_MDIXSEL_TX		0x4000
+#define	CTRL_AUTO_MDIX_DIS	0x8000
+
+#define	MII_RDCPHY_CTRL2	0x15
+#define	CTRL2_LED_DUPLEX	0x0000
+#define	CTRL2_LED_DUPLEX_COL	0x0008
+#define	CTRL2_LED_ACT		0x0010
+#define	CTRL2_LED_SPEED_ACT	0x0018
+#define	CTRL2_LED_BLK_100MBPS_DIS	0x0020
+#define	CTRL2_LED_BLK_10MBPS_DIS	0x0040
+#define	CTRL2_LED_BLK_LINK_ACT_DIS	0x0080
+#define	CTRL2_SDT_THRESH_MASK	0x3E00
+#define	CTRL2_TIMING_ERR_SEL	0x4000
+#define	CTRL2_LED_BLK_80MS	0x8000
+#define	CTRL2_LED_BLK_160MS	0x0000
+#define	CTRL2_LED_MASK		0x0018
+
+#define	MII_RDCPHY_STATUS	0x16
+#define	STATUS_AUTO_MDIX_RX	0x0200
+#define	STATUS_AUTO_MDIX_TX	0x0400
+#define	STATUS_NEG_POLARITY	0x0800
+#define	STATUS_FULL_DUPLEX	0x1000
+#define	STATUS_SPEED_10		0x0000
+#define	STATUS_SPEED_100	0x2000
+#define	STATUS_SPEED_MASK	0x6000
+#define	STATUS_LINK_UP		0x8000
+
+/* Analog test register 2 */
+#define	MII_RDCPHY_TEST2	0x1A
+#define	TEST2_PWR_DOWN		0x0200
+
+#endif /* _DEV_MII_RDCPHYREG_H_ */

Modified: stable/7/sys/modules/mii/Makefile
==============================================================================
--- stable/7/sys/modules/mii/Makefile	Fri Feb  4 20:12:45 2011	(r218294)
+++ stable/7/sys/modules/mii/Makefile	Fri Feb  4 20:27:50 2011	(r218295)
@@ -7,8 +7,8 @@ SRCS=	acphy.c amphy.c atphy.c bmtphy.c b
 SRCS+=	e1000phy.c exphy.c gentbi.c icsphy.c inphy.c ip1000phy.c jmphy.c
 SRCS+=	lxtphy.c miibus_if.c miibus_if.h mii.c miidevs.h mii_physubr.c
 SRCS+=	mlphy.c nsgphy.c nsphy.c nsphyter.c pci_if.h pnaphy.c qsphy.c
-SRCS+=	rgephy.c rlphy.c ruephy.c tdkphy.c tlphy.c truephy.c ukphy.c
-SRCS+=	ukphy_subr.c
+SRCS+=	rdcphy.c rgephy.c rlphy.c ruephy.c tdkphy.c tlphy.c truephy.c
+SRCS+=	ukphy.c ukphy_subr.c
 SRCS+=	xmphy.c
 
 EXPORT_SYMS=	mii_attach	\

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 20:47:46 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EB9F6106564A;
	Fri,  4 Feb 2011 20:47:46 +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 CF4258FC0A;
	Fri,  4 Feb 2011 20:47: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 p14Klkeu097516;
	Fri, 4 Feb 2011 20:47:46 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14KlkIJ097509;
	Fri, 4 Feb 2011 20:47:46 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201102042047.p14KlkIJ097509@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 4 Feb 2011 20:47: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: r218297 - in stable/7/sys: boot/forth conf dev/vte
	i386/conf modules modules/vte
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 20:47:47 -0000

Author: yongari
Date: Fri Feb  4 20:47:46 2011
New Revision: 218297
URL: http://svn.freebsd.org/changeset/base/218297

Log:
  MFC r216829,216833:
  rr216829:
    Add driver for DM&P Vortex86 RDC R6040 Fast Ethernet.
    The controller is commonly found on DM&P Vortex86 x86 SoC.  The
    driver supports all hardware features except flow control.  The
    flow control was intentionally disabled due to silicon bug.
  
    DM&P Electronics, Inc. provided all necessary information including
    sample board to write driver and answered many questions I had.
    Many thanks for their support of FreeBSD.
  
    H/W donated by:	DM&P Electronics, Inc.
  
  r216833:
    Remove debugging leftovers.

Added:
  stable/7/sys/dev/vte/
     - copied from r216829, head/sys/dev/vte/
  stable/7/sys/modules/vte/
     - copied from r216829, head/sys/modules/vte/
Modified:
  stable/7/sys/boot/forth/loader.conf
  stable/7/sys/conf/NOTES
  stable/7/sys/conf/files
  stable/7/sys/dev/vte/if_vte.c
  stable/7/sys/i386/conf/GENERIC
  stable/7/sys/modules/Makefile
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/boot/forth/loader.conf
==============================================================================
--- stable/7/sys/boot/forth/loader.conf	Fri Feb  4 20:32:52 2011	(r218296)
+++ stable/7/sys/boot/forth/loader.conf	Fri Feb  4 20:47:46 2011	(r218297)
@@ -274,6 +274,7 @@ if_tl_load="NO"			# Texas Instruments TN
 if_tx_load="NO"			# SMC 83c17x Fast Ethernet
 if_txp_load="NO"		# 3Com 3XP Typhoon/Sidewinder (3CR990)
 if_vge_load="NO"		# VIA VT6122 PCI Gigabit Ethernet
+if_vte_load="NO"		# DM&P Vortex86 RDC R6040 Fast Ethernet
 if_udav_load="NO"		# Davicom DM9601 USB Ethernet
 if_vr_load="NO"			# VIA Rhine I and Rhine II
 if_vx_load="NO"			# 3Com 3C590 family

Modified: stable/7/sys/conf/NOTES
==============================================================================
--- stable/7/sys/conf/NOTES	Fri Feb  4 20:32:52 2011	(r218296)
+++ stable/7/sys/conf/NOTES	Fri Feb  4 20:47:46 2011	(r218297)
@@ -1866,6 +1866,7 @@ device		xmphy		# XaQti XMAC II
 #       Technologies VT3043 `Rhine I' and VT86C100A `Rhine II' chips,
 #       including the D-Link DFE530TX (see 'rl' for DFE530TX+), the Hawking
 #       Technologies PN102TX, and the AOpen/Acer ALN-320.
+# vte:  DM&P Vortex86 RDC R6040 Fast Ethernet
 # vx:   3Com 3C590 and 3C595
 # wb:   Support for fast ethernet adapters based on the Winbond W89C840F chip.
 #       Note: this is not the same as the Winbond W89C940F, which is a
@@ -1941,6 +1942,7 @@ device		ti		# Alteon Networks Tigon I/II
 device		tl		# Texas Instruments ThunderLAN
 device		tx		# SMC EtherPower II (83c170 ``EPIC'')
 device		vr		# VIA Rhine, Rhine II
+device		vte		# DM&P Vortex86 RDC R6040 Fast Ethernet
 device		wb		# Winbond W89C840F
 device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')
 

Modified: stable/7/sys/conf/files
==============================================================================
--- stable/7/sys/conf/files	Fri Feb  4 20:32:52 2011	(r218296)
+++ stable/7/sys/conf/files	Fri Feb  4 20:47:46 2011	(r218297)
@@ -1344,6 +1344,7 @@ dev/utopia/utopia.c		optional utopia
 dev/vge/if_vge.c		optional vge
 dev/vkbd/vkbd.c			optional vkbd
 dev/vr/if_vr.c			optional vr pci
+dev/vte/if_vte.c		optional vte pci
 dev/vx/if_vx.c			optional vx
 dev/vx/if_vx_eisa.c		optional vx eisa
 dev/vx/if_vx_pci.c		optional vx pci

Modified: stable/7/sys/dev/vte/if_vte.c
==============================================================================
--- head/sys/dev/vte/if_vte.c	Fri Dec 31 00:21:41 2010	(r216829)
+++ stable/7/sys/dev/vte/if_vte.c	Fri Feb  4 20:47:46 2011	(r218297)
@@ -66,13 +66,8 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#if 0
-#include "if_vtereg.h"
-#include "if_vtevar.h"
-#else
 #include 
 #include 
-#endif
 
 /* "device miibus" required.  See GENERIC if you get errors here. */
 #include "miibus_if.h"

Modified: stable/7/sys/i386/conf/GENERIC
==============================================================================
--- stable/7/sys/i386/conf/GENERIC	Fri Feb  4 20:32:52 2011	(r218296)
+++ stable/7/sys/i386/conf/GENERIC	Fri Feb  4 20:47:46 2011	(r218297)
@@ -234,6 +234,7 @@ device		tl		# Texas Instruments ThunderL
 device		tx		# SMC EtherPower II (83c170 ``EPIC'')
 device		vge		# VIA VT612x gigabit Ethernet
 device		vr		# VIA Rhine, Rhine II
+device		vte		# DM&P Vortex86 RDC R6040 Fast Ethernet
 device		wb		# Winbond W89C840F
 device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')
 

Modified: stable/7/sys/modules/Makefile
==============================================================================
--- stable/7/sys/modules/Makefile	Fri Feb  4 20:32:52 2011	(r218296)
+++ stable/7/sys/modules/Makefile	Fri Feb  4 20:47:46 2011	(r218297)
@@ -323,6 +323,7 @@ SUBDIR=	${_3dfx} \
 	vkbd \
 	${_vpo} \
 	vr \
+	vte \
 	vx \
 	wb \
 	${_wi} \

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 20:48:53 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E23E0106564A;
	Fri,  4 Feb 2011 20:48:53 +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 BB5D68FC0C;
	Fri,  4 Feb 2011 20:48: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 p14Kmr3v097576;
	Fri, 4 Feb 2011 20:48:53 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14Kmrpl097574;
	Fri, 4 Feb 2011 20:48:53 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201102042048.p14Kmrpl097574@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 4 Feb 2011 20:48: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: r218298 - stable/7/sys/dev/vte
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 20:48:54 -0000

Author: yongari
Date: Fri Feb  4 20:48:53 2011
New Revision: 218298
URL: http://svn.freebsd.org/changeset/base/218298

Log:
  Make vte(4) work on stable/7. This is direct commit to stable/7
  since if_maddr_rlock/if_maddr_runlock is not available in stable/7.

Modified:
  stable/7/sys/dev/vte/if_vte.c

Modified: stable/7/sys/dev/vte/if_vte.c
==============================================================================
--- stable/7/sys/dev/vte/if_vte.c	Fri Feb  4 20:47:46 2011	(r218297)
+++ stable/7/sys/dev/vte/if_vte.c	Fri Feb  4 20:48:53 2011	(r218298)
@@ -1979,7 +1979,7 @@ vte_rxfilter(struct vte_softc *sc)
 	}
 
 	nperf = 0;
-	if_maddr_rlock(ifp);
+	IF_ADDR_LOCK(ifp);
 	TAILQ_FOREACH(ifma, &sc->vte_ifp->if_multiaddrs, ifma_link) {
 		if (ifma->ifma_addr->sa_family != AF_LINK)
 			continue;
@@ -2000,7 +2000,7 @@ vte_rxfilter(struct vte_softc *sc)
 		    ifma->ifma_addr), ETHER_ADDR_LEN);
 		mchash[crc >> 30] |= 1 << ((crc >> 26) & 0x0F);
 	}
-	if_maddr_runlock(ifp);
+	IF_ADDR_UNLOCK(ifp);
 	if (mchash[0] != 0 || mchash[1] != 0 || mchash[2] != 0 ||
 	    mchash[3] != 0)
 		mcr |= MCR0_MULTICAST;

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 20:52:14 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 53A8B106566B;
	Fri,  4 Feb 2011 20:52:14 +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 428AE8FC17;
	Fri,  4 Feb 2011 20:52: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 p14KqEgA097748;
	Fri, 4 Feb 2011 20:52:14 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14KqELh097746;
	Fri, 4 Feb 2011 20:52:14 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201102042052.p14KqELh097746@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 4 Feb 2011 20:52: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: r218300 - stable/7/usr.sbin/sysinstall
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 20:52:14 -0000

Author: yongari
Date: Fri Feb  4 20:52:13 2011
New Revision: 218300
URL: http://svn.freebsd.org/changeset/base/218300

Log:
  MFC r216830:
    Add vte(4) to the list of supported network interface.

Modified:
  stable/7/usr.sbin/sysinstall/devices.c
Directory Properties:
  stable/7/usr.sbin/sysinstall/   (props changed)

Modified: stable/7/usr.sbin/sysinstall/devices.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/devices.c	Fri Feb  4 20:51:18 2011	(r218299)
+++ stable/7/usr.sbin/sysinstall/devices.c	Fri Feb  4 20:52:13 2011	(r218300)
@@ -157,6 +157,7 @@ static struct _devname {
     NETWORK("tl",	"Texas Instruments ThunderLAN PCI Ethernet card"),
     NETWORK("vge",	"VIA VT612x PCI Gigabit Ethernet card"),
     NETWORK("vr",	"VIA VT3043/VT86C100A Rhine PCI Ethernet card"),
+    NETWORK("vte",	"DM&P Vortex86 RDC R6040 Fast Ethernet"),
     NETWORK("vlan",	"IEEE 802.1Q VLAN network interface"),
     NETWORK("vx",	"3COM 3c590 / 3c595 Ethernet card"),
     NETWORK("wb",	"Winbond W89C840F PCI Ethernet card"),

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Feb  4 20:59:45 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C41CA106566B;
	Fri,  4 Feb 2011 20:59:45 +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 A7DAF8FC0C;
	Fri,  4 Feb 2011 20:59: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 p14Kxj5P098050;
	Fri, 4 Feb 2011 20:59:45 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14KxjlD098044;
	Fri, 4 Feb 2011 20:59:45 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201102042059.p14KxjlD098044@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 4 Feb 2011 20:59:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r218302 - stable/7/share/man/man4
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 04 Feb 2011 20:59:46 -0000

Author: yongari
Date: Fri Feb  4 20:59:45 2011
New Revision: 218302
URL: http://svn.freebsd.org/changeset/base/218302

Log:
  MFC r216831,216858:
  r216831:
    Add vte(4) man page and hook up vte(4) to the build.
    Also add Xr to appropriate man pages.
  
  r216858:
    Remove duplicated "perfect"

Added:
  stable/7/share/man/man4/vte.4
     - copied, changed from r216831, head/share/man/man4/vte.4
Modified:
  stable/7/share/man/man4/Makefile
  stable/7/share/man/man4/altq.4
  stable/7/share/man/man4/miibus.4
  stable/7/share/man/man4/vlan.4
Directory Properties:
  stable/7/share/man/man4/   (props changed)

Modified: stable/7/share/man/man4/Makefile
==============================================================================
--- stable/7/share/man/man4/Makefile	Fri Feb  4 20:57:37 2011	(r218301)
+++ stable/7/share/man/man4/Makefile	Fri Feb  4 20:59:45 2011	(r218302)
@@ -424,6 +424,7 @@ MAN=	aac.4 \
 	vlan.4 \
 	vpo.4 \
 	vr.4 \
+	vte.4 \
 	watchdog.4 \
 	wb.4 \
 	wi.4 \

Modified: stable/7/share/man/man4/altq.4
==============================================================================
--- stable/7/share/man/man4/altq.4	Fri Feb  4 20:57:37 2011	(r218301)
+++ stable/7/share/man/man4/altq.4	Fri Feb  4 20:59:45 2011	(r218302)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 19, 2010
+.Dd December 30, 2010
 .Dt ALTQ 4
 .Os
 .Sh NAME
@@ -164,6 +164,7 @@ They have been applied to the following 
 .Xr ural 4 ,
 .Xr vge 4 ,
 .Xr vr 4 ,
+.Xr vte 4 ,
 .Xr wi 4 ,
 and
 .Xr xl 4 .

Modified: stable/7/share/man/man4/miibus.4
==============================================================================
--- stable/7/share/man/man4/miibus.4	Fri Feb  4 20:57:37 2011	(r218301)
+++ stable/7/share/man/man4/miibus.4	Fri Feb  4 20:59:45 2011	(r218302)
@@ -119,6 +119,8 @@ Davicom DM9601 USB Ethernet
 VIA VT612x PCI Gigabit Ethernet
 .It Xr vr 4
 VIA Rhine, Rhine II
+.It Xr vte 4
+DM&P Vortex86 RDC R6040 Fast Ethernet
 .It Xr wb 4
 Winbond W89C840F
 .It Xr xl 4
@@ -174,6 +176,7 @@ but as a result are not well behaved new
 .Xr udav 4 ,
 .Xr vge 4 ,
 .Xr vr 4 ,
+.Xr vte 4 ,
 .Xr wb 4 ,
 .Xr xl 4
 .Sh STANDARDS

Modified: stable/7/share/man/man4/vlan.4
==============================================================================
--- stable/7/share/man/man4/vlan.4	Fri Feb  4 20:57:37 2011	(r218301)
+++ stable/7/share/man/man4/vlan.4	Fri Feb  4 20:59:45 2011	(r218302)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 19, 2010
+.Dd December 30, 2010
 .Dt VLAN 4
 .Os
 .Sh NAME
@@ -184,6 +184,7 @@ natively:
 .Xr tl 4 ,
 .Xr tx 4 ,
 .Xr vr 4 ,
+.Xr vte 4 ,
 and
 .Xr xl 4 .
 .Pp

Copied and modified: stable/7/share/man/man4/vte.4 (from r216831, head/share/man/man4/vte.4)
==============================================================================
--- head/share/man/man4/vte.4	Fri Dec 31 00:46:30 2010	(r216831, copy source)
+++ stable/7/share/man/man4/vte.4	Fri Feb  4 20:59:45 2011	(r218302)
@@ -58,7 +58,7 @@ hash filter, VLAN over-size frame and fo
 The
 .Nm
 device driver uses three station addresses out of four as perfect
-perfect multicast filter.
+multicast filter.
 .Pp
 The
 .Nm

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Feb  5 06:26:17 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1B451106566B;
	Sat,  5 Feb 2011 06:26:17 +0000 (UTC)
	(envelope-from gordon@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E21DA8FC1D;
	Sat,  5 Feb 2011 06:26: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 p156QG0H017159;
	Sat, 5 Feb 2011 06:26:16 GMT (envelope-from gordon@svn.freebsd.org)
Received: (from gordon@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p156QGZ8017157;
	Sat, 5 Feb 2011 06:26:16 GMT (envelope-from gordon@svn.freebsd.org)
Message-Id: <201102050626.p156QGZ8017157@svn.freebsd.org>
From: Gordon Tetlow 
Date: Sat, 5 Feb 2011 06:26:16 +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: r218313 - stable/7/usr.sbin/freebsd-update
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 05 Feb 2011 06:26:17 -0000

Author: gordon
Date: Sat Feb  5 06:26:16 2011
New Revision: 218313
URL: http://svn.freebsd.org/changeset/base/218313

Log:
  MFC r217767:
  Honor $PAGER instead of always calling more.
  
  Approved by:	colin@

Modified:
  stable/7/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/7/usr.sbin/freebsd-update/   (props changed)

Modified: stable/7/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/7/usr.sbin/freebsd-update/freebsd-update.sh	Sat Feb  5 06:25:21 2011	(r218312)
+++ stable/7/usr.sbin/freebsd-update/freebsd-update.sh	Sat Feb  5 06:26:16 2011	(r218313)
@@ -1785,7 +1785,7 @@ fetch_create_manifest () {
 		echo -n "been downloaded because the files have been "
 		echo "modified locally:"
 		cat modifiedfiles
-	fi | more
+	fi | $PAGER
 	rm modifiedfiles
 
 	# If no files will be updated, tell the user and exit
@@ -1815,7 +1815,7 @@ fetch_create_manifest () {
 		echo -n "The following files will be removed "
 		echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:"
 		cat files.removed
-	fi | more
+	fi | $PAGER
 	rm files.removed
 
 	# Report added files, if any
@@ -1824,7 +1824,7 @@ fetch_create_manifest () {
 		echo -n "The following files will be added "
 		echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:"
 		cat files.added
-	fi | more
+	fi | $PAGER
 	rm files.added
 
 	# Report updated files, if any
@@ -1834,7 +1834,7 @@ fetch_create_manifest () {
 		echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:"
 
 		cat files.updated
-	fi | more
+	fi | $PAGER
 	rm files.updated
 
 	# Create a directory for the install manifest.
@@ -3022,6 +3022,11 @@ cmd_IDS () {
 # Make sure we find utilities from the base system
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin:${PATH}
 
+# Set a pager if the user doesn't
+if [ -z "$PAGER" ]; then
+	PAGER=/usr/bin/more
+fi
+
 # Set LC_ALL in order to avoid problems with character ranges like [A-Z].
 export LC_ALL=C
 

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Feb  5 15:13:19 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 18AA2106564A;
	Sat,  5 Feb 2011 15:13:19 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 06D738FC14;
	Sat,  5 Feb 2011 15:13: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 p15FDIr6031791;
	Sat, 5 Feb 2011 15:13:18 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p15FDIJD031789;
	Sat, 5 Feb 2011 15:13:18 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201102051513.p15FDIJD031789@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sat, 5 Feb 2011 15:13: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: r218328 - stable/7/bin/sh
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 05 Feb 2011 15:13:19 -0000

Author: jilles
Date: Sat Feb  5 15:13:18 2011
New Revision: 218328
URL: http://svn.freebsd.org/changeset/base/218328

Log:
  MFC r217847: sh: Clean up some old comments:
  * There is no plan for an alternative to the command "set".
  * Attempting to unset a readonly variable has not raised an error for quite
    a while, so the order of unsetting a variable and a function with the same
    name does not matter.

Modified:
  stable/7/bin/sh/var.c
Directory Properties:
  stable/7/bin/sh/   (props changed)

Modified: stable/7/bin/sh/var.c
==============================================================================
--- stable/7/bin/sh/var.c	Sat Feb  5 15:10:27 2011	(r218327)
+++ stable/7/bin/sh/var.c	Sat Feb  5 15:13:18 2011	(r218328)
@@ -523,9 +523,8 @@ var_compare(const void *a, const void *b
 
 
 /*
- * Command to list all variables which are set.  Currently this command
- * is invoked from the set command when the set command is called without
- * any variables.
+ * Command to list all variables which are set.  This is invoked from the
+ * set command when it is called without any options or operands.
  */
 
 int
@@ -760,9 +759,7 @@ setvarcmd(int argc, char **argv)
 
 
 /*
- * The unset builtin command.  We unset the function before we unset the
- * variable to allow a function to be unset when there is a readonly variable
- * with the same name.
+ * The unset builtin command.
  */
 
 int