From owner-svn-src-stable-7@FreeBSD.ORG Sun Jan 16 10:47:36 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 3C3C11065672; Sun, 16 Jan 2011 10:47:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD2B8FC15; Sun, 16 Jan 2011 10:47:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0GAlaId060823; Sun, 16 Jan 2011 10:47:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0GAlatu060821; Sun, 16 Jan 2011 10:47:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201101161047.p0GAlatu060821@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 16 Jan 2011 10:47:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217471 - stable/7/lib/csu/i386-elf 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, 16 Jan 2011 10:47:36 -0000 Author: kib Date: Sun Jan 16 10:47:35 2011 New Revision: 217471 URL: http://svn.freebsd.org/changeset/base/217471 Log: MFC r217383: The (%esp & 0xf) == 0 should be true before the call instruction is executed, for the properly aligned stack. Modified: stable/7/lib/csu/i386-elf/crt1_s.S Directory Properties: stable/7/lib/csu/ (props changed) Modified: stable/7/lib/csu/i386-elf/crt1_s.S ============================================================================== --- stable/7/lib/csu/i386-elf/crt1_s.S Sun Jan 16 10:41:47 2011 (r217470) +++ stable/7/lib/csu/i386-elf/crt1_s.S Sun Jan 16 10:47:35 2011 (r217471) @@ -35,6 +35,7 @@ _start: xorl %ebp,%ebp movl %esp,%ebp andl $0xfffffff0,%esp # align stack leal 8(%ebp),%eax + subl $4,%esp pushl %eax # argv pushl 4(%ebp) # argc pushl %edx # rtld cleanup From owner-svn-src-stable-7@FreeBSD.ORG Mon Jan 17 15:12:38 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 04E3F1065675; Mon, 17 Jan 2011 15:12:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6E9C8FC14; Mon, 17 Jan 2011 15:12:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0HFCbNP004056; Mon, 17 Jan 2011 15:12:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0HFCbCE004054; Mon, 17 Jan 2011 15:12:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201101171512.p0HFCbCE004054@svn.freebsd.org> From: Marius Strobl Date: Mon, 17 Jan 2011 15:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217503 - stable/7/sys/dev/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: Mon, 17 Jan 2011 15:12:38 -0000 Author: marius Date: Mon Jan 17 15:12:37 2011 New Revision: 217503 URL: http://svn.freebsd.org/changeset/base/217503 Log: MFC: r217415 - Allow IFM_FLAG0 to be set indicating that auto-negotiation with manual configuration, which is used to work around issues with certain setups (see r161237) by default, should not be triggered as it may in turn cause harm in some edge cases. - Even after masking the media with IFM_GMASK the result may have bits besides the duplex ones set so just comparing it with IFM_FDX may lead to false negatives. - Announce PAUSE support also for manually selected 1000BASE-T, but for all manually selected media types only in full-duplex mode. Announce asymmetric PAUSE support only for manually selected 1000BASE-T. - Simplify setting the manual configuration bits to only once after we have figured them all out. This also means we no longer unnecessarily update the hardware along the road. - Remove a stale comment. Reviewed by: yongari (plus additional testing) Modified: stable/7/sys/dev/mii/rgephy.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/mii/rgephy.c ============================================================================== --- stable/7/sys/dev/mii/rgephy.c Mon Jan 17 15:12:29 2011 (r217502) +++ stable/7/sys/dev/mii/rgephy.c Mon Jan 17 15:12:37 2011 (r217503) @@ -146,6 +146,13 @@ rgephy_attach(device_t dev) mii_phy_add_media(sc); printf("\n"); #undef ADD + /* + * Allow IFM_FLAG0 to be set indicating that auto-negotiation with + * manual configuration, which is used to work around issues with + * certain setups by default, should not be triggered as it may in + * turn cause harm in some edge cases. + */ + mii->mii_media.ifm_mask |= IFM_FLAG0; rgephy_reset(sc); MIIBUS_MEDIAINIT(sc->mii_dev); @@ -201,37 +208,38 @@ rgephy_service(struct mii_softc *sc, str speed = RGEPHY_S10; anar |= RGEPHY_ANAR_10_FD | RGEPHY_ANAR_10; setit: - rgephy_loop(sc); - if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) { + if ((ife->ifm_media & IFM_FLOW) != 0 && + (mii->mii_media.ifm_media & IFM_FLAG0) != 0) + return (EINVAL); + + if ((ife->ifm_media & IFM_FDX) != 0) { speed |= RGEPHY_BMCR_FDX; gig = RGEPHY_1000CTL_AFD; anar &= ~(RGEPHY_ANAR_TX | RGEPHY_ANAR_10); + if ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= + RGEPHY_ANAR_PC | RGEPHY_ANAR_ASP; } else { gig = RGEPHY_1000CTL_AHD; anar &= ~(RGEPHY_ANAR_TX_FD | RGEPHY_ANAR_10_FD); } - - if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T) { - PHY_WRITE(sc, RGEPHY_MII_1000CTL, 0); - PHY_WRITE(sc, RGEPHY_MII_ANAR, anar); - PHY_WRITE(sc, RGEPHY_MII_BMCR, speed | - RGEPHY_BMCR_AUTOEN | - RGEPHY_BMCR_STARTNEG); - break; + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { + gig |= RGEPHY_1000CTL_MSE; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= RGEPHY_1000CTL_MSC; + } else { + gig = 0; + anar &= ~RGEPHY_ANAR_ASP; } - - if ((ife->ifm_media & IFM_FLOW) != 0 || - (sc->mii_flags & MIIF_FORCEPAUSE) != 0) - anar |= RGEPHY_ANAR_PC | RGEPHY_ANAR_ASP; - - gig |= RGEPHY_1000CTL_MSE; - if ((ife->ifm_media & IFM_ETH_MASTER) != 0) - gig |= RGEPHY_1000CTL_MSC; + if ((mii->mii_media.ifm_media & IFM_FLAG0) == 0) + speed |= + RGEPHY_BMCR_AUTOEN | RGEPHY_BMCR_STARTNEG; + rgephy_loop(sc); PHY_WRITE(sc, RGEPHY_MII_1000CTL, gig); PHY_WRITE(sc, RGEPHY_MII_ANAR, anar); - PHY_WRITE(sc, RGEPHY_MII_BMCR, speed | - RGEPHY_BMCR_AUTOEN | RGEPHY_BMCR_STARTNEG); + PHY_WRITE(sc, RGEPHY_MII_BMCR, speed); break; case IFM_NONE: PHY_WRITE(sc, MII_BMCR, BMCR_ISO | BMCR_PDOWN); @@ -258,8 +266,7 @@ setit: /* * Check to see if we have link. If we do, we don't - * need to restart the autonegotiation process. Read - * the BMSR twice in case it's latched. + * need to restart the autonegotiation process. */ if (rsc->mii_revision >= 2) { /* RTL8211B(L) */ From owner-svn-src-stable-7@FreeBSD.ORG Tue Jan 18 11:51:52 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 21956106578F; Tue, 18 Jan 2011 11:51:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 084C68FC0C; Tue, 18 Jan 2011 11:51:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0IBpp0g037123; Tue, 18 Jan 2011 11:51:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0IBppjZ037114; Tue, 18 Jan 2011 11:51:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201101181151.p0IBppjZ037114@svn.freebsd.org> From: Marius Strobl Date: Tue, 18 Jan 2011 11:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217534 - 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: Tue, 18 Jan 2011 11:51:52 -0000 Author: marius Date: Tue Jan 18 11:51:51 2011 New Revision: 217534 URL: http://svn.freebsd.org/changeset/base/217534 Log: MFC: r217464, r217468, r217475 Add a manual page for rgephy(4) and reference it as appropriate. The motivation for having rgephy.4 is to document the special media option added in r217415 (MFC'ed to stable/7 in r217503). Added: stable/7/share/man/man4/rgephy.4 - copied, changed from r217464, head/share/man/man4/rgephy.4 Modified: stable/7/share/man/man4/Makefile stable/7/share/man/man4/axe.4 stable/7/share/man/man4/miibus.4 stable/7/share/man/man4/nfe.4 stable/7/share/man/man4/nve.4 stable/7/share/man/man4/re.4 stable/7/share/man/man4/sge.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Tue Jan 18 11:51:48 2011 (r217533) +++ stable/7/share/man/man4/Makefile Tue Jan 18 11:51:51 2011 (r217534) @@ -291,6 +291,7 @@ MAN= aac.4 \ random.4 \ rc.4 \ re.4 \ + rgephy.4 \ rl.4 \ rndtest.4 \ route.4 \ Modified: stable/7/share/man/man4/axe.4 ============================================================================== --- stable/7/share/man/man4/axe.4 Tue Jan 18 11:51:48 2011 (r217533) +++ stable/7/share/man/man4/axe.4 Tue Jan 18 11:51:51 2011 (r217534) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 20, 2008 +.Dd January 16, 2011 .Dt AXE 4 .Os .Sh NAME @@ -196,6 +196,7 @@ The driver failed to allocate an mbuf fo .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr rgephy 4 , .Xr ifconfig 8 .Rs .%T "ASIX AX88172 AX88178 and AX88772 data sheets" Modified: stable/7/share/man/man4/miibus.4 ============================================================================== --- stable/7/share/man/man4/miibus.4 Tue Jan 18 11:51:48 2011 (r217533) +++ stable/7/share/man/man4/miibus.4 Tue Jan 18 11:51:51 2011 (r217534) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2010 +.Dd January 15, 2011 .Dt MIIBUS 4 .Os .Sh NAME @@ -157,6 +157,7 @@ but as a result are not well behaved new .Xr nve 4 , .Xr pcn 4 , .Xr re 4 , +.Xr rgephy 4 , .Xr rl 4 , .Xr rue 4 , .Xr sf 4 , Modified: stable/7/share/man/man4/nfe.4 ============================================================================== --- stable/7/share/man/man4/nfe.4 Tue Jan 18 11:51:48 2011 (r217533) +++ stable/7/share/man/man4/nfe.4 Tue Jan 18 11:51:51 2011 (r217534) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 2, 2008 +.Dd January, 2011 .Dt NFE 4 .Os .Sh NAME @@ -174,6 +174,7 @@ before a change takes effect. .Xr netintro 4 , .Xr pci 4 , .Xr polling 4 , +.Xr rgephy 4 , .Xr sysctl 8 , .Xr ifconfig 8 .Sh HISTORY Modified: stable/7/share/man/man4/nve.4 ============================================================================== --- stable/7/share/man/man4/nve.4 Tue Jan 18 11:51:48 2011 (r217533) +++ stable/7/share/man/man4/nve.4 Tue Jan 18 11:51:51 2011 (r217534) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 8, 2007 +.Dd January 16, 2011 .Dt NVE 4 .Os .Sh NAME @@ -124,6 +124,7 @@ bandwidth show that the card is actually .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr rgephy 4 , .Xr ifconfig 8 .Sh HISTORY The Modified: stable/7/share/man/man4/re.4 ============================================================================== --- stable/7/share/man/man4/re.4 Tue Jan 18 11:51:48 2011 (r217533) +++ stable/7/share/man/man4/re.4 Tue Jan 18 11:51:51 2011 (r217534) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 2, 2010 +.Dd January, 2011 .Dt RE 4 .Os .Sh NAME @@ -213,6 +213,7 @@ the network connection (cable). .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , +.Xr rgephy 4 , .Xr vlan 4 , .Xr ifconfig 8 .Rs Copied and modified: stable/7/share/man/man4/rgephy.4 (from r217464, head/share/man/man4/rgephy.4) ============================================================================== --- head/share/man/man4/rgephy.4 Sat Jan 15 22:07:08 2011 (r217464, copy source) +++ stable/7/share/man/man4/rgephy.4 Tue Jan 18 11:51:51 2011 (r217534) @@ -69,7 +69,7 @@ the .Nm driver by default also triggers an autonegotiation advertising the selected media. -This is done in order work around hardware issues in certain scenarios. +This is done in order to work around hardware issues in certain scenarios. It is believed that this behavior does not cause harm in general but in fact can have an adverse effect in edge cases. In order to manually set the media type and options without also triggering Modified: stable/7/share/man/man4/sge.4 ============================================================================== --- stable/7/share/man/man4/sge.4 Tue Jan 18 11:51:48 2011 (r217533) +++ stable/7/share/man/man4/sge.4 Tue Jan 18 11:51:51 2011 (r217534) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 10, 2010 +.Dd January 16, 2011 .Dt SGE 4 .Os .Sh NAME @@ -105,6 +105,7 @@ SiS191 Fast/Gigabit Ethernet controller .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , +.Xr rgephy 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY From owner-svn-src-stable-7@FreeBSD.ORG Tue Jan 18 22:19:55 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 B6F64106566C; Tue, 18 Jan 2011 22:19:55 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A53A08FC0A; Tue, 18 Jan 2011 22:19:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0IMJthm054000; Tue, 18 Jan 2011 22:19:55 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0IMJt9D053996; Tue, 18 Jan 2011 22:19:55 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201101182219.p0IMJt9D053996@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 18 Jan 2011 22:19: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: r217562 - in stable/7/secure/lib: libcrypto libssl 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: Tue, 18 Jan 2011 22:19:55 -0000 Author: simon Date: Tue Jan 18 22:19:55 2011 New Revision: 217562 URL: http://svn.freebsd.org/changeset/base/217562 Log: Decrease the libcrypto and libssl shared object version numbers from 6 to 5. They were accidentally bumped in r215997 (on 2010-11-28) with the merge of OpenSSL 0.9.8p, but unfortunately this was not caught until now. Also add compat links for libcrypto.so.6 / libssl.so.6 (pointing to their .5 counterparts) in case any users have compiled any third party during the time stable/7 (and releng/7.4) were broken. This is deemed the last poor of bad options. Had the number bump not been reverted binary packages for stable/7 would not have worked on the still supported 7.3 and 7.1 releases. Discussed with: re, portmgr Approved by: re (kensmith - in principle) Pointyhat to: simon Modified: stable/7/secure/lib/libcrypto/Makefile stable/7/secure/lib/libssl/Makefile Modified: stable/7/secure/lib/libcrypto/Makefile ============================================================================== --- stable/7/secure/lib/libcrypto/Makefile Tue Jan 18 21:57:02 2011 (r217561) +++ stable/7/secure/lib/libcrypto/Makefile Tue Jan 18 22:19:55 2011 (r217562) @@ -6,7 +6,9 @@ SUBDIR= engines .include LIB= crypto -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 5 + +SYMLINKS= lib${LIB}.so.5 ${SHLIBDIR}/lib${LIB}.so.6 NO_LINT= Modified: stable/7/secure/lib/libssl/Makefile ============================================================================== --- stable/7/secure/lib/libssl/Makefile Tue Jan 18 21:57:02 2011 (r217561) +++ stable/7/secure/lib/libssl/Makefile Tue Jan 18 22:19:55 2011 (r217562) @@ -1,7 +1,9 @@ # $FreeBSD$ LIB= ssl -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 5 + +SYMLINKS= lib${LIB}.so.5 ${SHLIBDIR}/lib${LIB}.so.6 NO_LINT= From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 13:23:51 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 735531065670; Wed, 19 Jan 2011 13:23:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 427088FC16; Wed, 19 Jan 2011 13:23:51 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C982846B7F; Wed, 19 Jan 2011 08:23:50 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 05F2E8A01D; Wed, 19 Jan 2011 08:23:50 -0500 (EST) From: John Baldwin To: "Simon L. Nielsen" Date: Wed, 19 Jan 2011 08:07:46 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101182219.p0IMJt9D053996@svn.freebsd.org> In-Reply-To: <201101182219.p0IMJt9D053996@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201101190807.46537.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 19 Jan 2011 08:23:50 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r217562 - in stable/7/secure/lib: libcrypto libssl 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, 19 Jan 2011 13:23:51 -0000 On Tuesday, January 18, 2011 5:19:55 pm Simon L. Nielsen wrote: > Author: simon > Date: Tue Jan 18 22:19:55 2011 > New Revision: 217562 > URL: http://svn.freebsd.org/changeset/base/217562 > > Log: > Decrease the libcrypto and libssl shared object version numbers from 6 > to 5. They were accidentally bumped in r215997 (on 2010-11-28) with the > merge of OpenSSL 0.9.8p, but unfortunately this was not caught until > now. > > Also add compat links for libcrypto.so.6 / libssl.so.6 (pointing to > their .5 counterparts) in case any users have compiled any third party > during the time stable/7 (and releng/7.4) were broken. > > This is deemed the last poor of bad options. Had the number bump not > been reverted binary packages for stable/7 would not have worked on the > still supported 7.3 and 7.1 releases. Erm, shouldn't the packages for 7-stable be built against the 7.0 ABI instead (and I thought this change was already made)? We've only supported backwards compat, not forwards compat. -- John Baldwin From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 13:30: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 E7DCA10656AE; Wed, 19 Jan 2011 13:30:17 +0000 (UTC) (envelope-from erwin@mail.droso.net) Received: from mail.droso.net (grizzly.droso.net [IPv6:2a01:4f8:130:7021::5]) by mx1.freebsd.org (Postfix) with ESMTP id A6CEC8FC1C; Wed, 19 Jan 2011 13:30:17 +0000 (UTC) Received: by mail.droso.net (Postfix, from userid 1001) id 7FD363C663; Wed, 19 Jan 2011 14:30:16 +0100 (CET) Date: Wed, 19 Jan 2011 14:30:16 +0100 From: Erwin Lansing To: John Baldwin Message-ID: <20110119133016.GP67325@droso.net> References: <201101182219.p0IMJt9D053996@svn.freebsd.org> <201101190807.46537.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RTi+10T5cI4L/4/E" Content-Disposition: inline In-Reply-To: <201101190807.46537.jhb@freebsd.org> X-Operating-System: FreeBSD/amd64 8.1-RELEASE User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, "Simon L. Nielsen" Subject: Re: svn commit: r217562 - in stable/7/secure/lib: libcrypto libssl 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, 19 Jan 2011 13:30:18 -0000 --RTi+10T5cI4L/4/E Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 19, 2011 at 08:07:46AM -0500, John Baldwin wrote: > On Tuesday, January 18, 2011 5:19:55 pm Simon L. Nielsen wrote: > > Author: simon > > Date: Tue Jan 18 22:19:55 2011 > > New Revision: 217562 > > URL: http://svn.freebsd.org/changeset/base/217562 > >=20 > > Log: > > Decrease the libcrypto and libssl shared object version numbers from 6 > > to 5. They were accidentally bumped in r215997 (on 2010-11-28) with t= he > > merge of OpenSSL 0.9.8p, but unfortunately this was not caught until > > now. > > =20 > > Also add compat links for libcrypto.so.6 / libssl.so.6 (pointing to > > their .5 counterparts) in case any users have compiled any third party > > during the time stable/7 (and releng/7.4) were broken. > > =20 > > This is deemed the last poor of bad options. Had the number bump not > > been reverted binary packages for stable/7 would not have worked on t= he > > still supported 7.3 and 7.1 releases. >=20 > Erm, shouldn't the packages for 7-stable be built against the 7.0 ABI ins= tead=20 > (and I thought this change was already made)? We've only supported backw= ards=20 > compat, not forwards compat. >=20 Oldest supported by the security officer, currently 7.1-RELEASE-p16 to be exact, but yes. Those are built against libcrypto.so.5, which of course won't work on 7.4 with libcrypto.so.6, hence the above rollback with an added symlink for those people that already built binaries themselves against libcrypto.so.6. -erwin --=20 Erwin Lansing http://droso.org Prediction is very difficult especially about the future erwin@FreeBSD.org --RTi+10T5cI4L/4/E Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFNNudoqy9aWxUlaZARAo5jAKD+AltMRDOdGqw0zrR0mxLO1DTsNQCdGjyv B50t/jvDIQWO4VL/uOVYAlg= =rGhE -----END PGP SIGNATURE----- --RTi+10T5cI4L/4/E-- From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 14:47:52 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 B83D9106566C; Wed, 19 Jan 2011 14:47:52 +0000 (UTC) (envelope-from kensmith@buffalo.edu) Received: from localmailC.acsu.buffalo.edu (localmailC.acsu.buffalo.edu [128.205.5.204]) by mx1.freebsd.org (Postfix) with ESMTP id 47A088FC19; Wed, 19 Jan 2011 14:47:52 +0000 (UTC) Received: from localmailC.acsu.buffalo.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 415E221CF3; Wed, 19 Jan 2011 09:19:03 -0500 (EST) Received: from localmailC.acsu.buffalo.edu (localhost [127.0.0.1]) by localmailC.acsu.buffalo.edu (Postfix) with ESMTP id 665FE218C3; Wed, 19 Jan 2011 09:19:02 -0500 (EST) Received: from mweb1.acsu.buffalo.edu (mweb1.acsu.buffalo.edu [128.205.5.238]) by localmailC.acsu.buffalo.edu (Prefixe) with ESMTP id 584D921928; Wed, 19 Jan 2011 09:19:02 -0500 (EST) Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76]) by mweb1.acsu.buffalo.edu (Postfix) with ESMTP id 375CD5B003B; Wed, 19 Jan 2011 09:19:02 -0500 (EST) From: Ken Smith To: Erwin Lansing In-Reply-To: <20110119133016.GP67325@droso.net> References: <201101182219.p0IMJt9D053996@svn.freebsd.org> <201101190807.46537.jhb@freebsd.org> <20110119133016.GP67325@droso.net> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-wMFTjbLQ5I5M3hVenQWQ" Date: Wed, 19 Jan 2011 09:18:52 -0500 Message-ID: <1295446732.93258.5.camel@bauer.cse.buffalo.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port X-PM-EL-Spam-Prob: : 8% Cc: src-committers@freebsd.org, John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, "Simon L. Nielsen" , svn-src-stable-7@freebsd.org Subject: Re: svn commit: r217562 - in stable/7/secure/lib: libcrypto libssl 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, 19 Jan 2011 14:47:52 -0000 --=-wMFTjbLQ5I5M3hVenQWQ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Wed, 2011-01-19 at 14:30 +0100, Erwin Lansing wrote: > ... hence the above rollback > with an added symlink for those people that already built binaries > themselves against libcrypto.so.6. We have had mistakes show up briefly on stable/* branches in the past. I stand by the view that stable/* branches are development branches where this sort of thing can periodically happen so people running production systems on stable/* branches may need to live with doing a little cleanup if/when this sort of thing happens. But in this case it had been in stable/7 for a while *and* it appeared in a releng/* branch that we've been asking people to test for us as part of the 7.4-RELEASE process. So in this case I asked we try the symlink thing to see if that can lessen the impact on people who have been helping with the tests (given up to now I haven't been providing packages on the ISOs that increases the odds testers have been compiling stuff...). --=20 Ken Smith - From there to here, from here to | kensmith@buffalo.edu there, funny things are everywhere. | - Theodor Geisel | --=-wMFTjbLQ5I5M3hVenQWQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEABECAAYFAk028sIACgkQ/G14VSmup/bmVQCfVgHLQCRq59Gb7mK86lrHja6S H4kAniiIfyisxCXlON3mydztiQSoTISg =6aQG -----END PGP SIGNATURE----- --=-wMFTjbLQ5I5M3hVenQWQ-- From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 15:12:39 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 0517D1065693; Wed, 19 Jan 2011 15:12:39 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD8AC8FC08; Wed, 19 Jan 2011 15:12:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0JFCcQB079966; Wed, 19 Jan 2011 15:12:38 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0JFCc5W079964; Wed, 19 Jan 2011 15:12:38 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201101191512.p0JFCc5W079964@svn.freebsd.org> From: Giorgos Keramidas Date: Wed, 19 Jan 2011 15:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217579 - stable/7/share/man/man7 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, 19 Jan 2011 15:12:39 -0000 Author: keramida (doc committer) Date: Wed Jan 19 15:12:38 2011 New Revision: 217579 URL: http://svn.freebsd.org/changeset/base/217579 Log: MFC -r 186783 from /head Document the NO_XXX options supported by our Makefile.inc1. Noticed by: simon Reviewed by: imp Modified: stable/7/share/man/man7/build.7 Directory Properties: stable/7/share/man/man7/ (props changed) Modified: stable/7/share/man/man7/build.7 ============================================================================== --- stable/7/share/man/man7/build.7 Wed Jan 19 12:19:25 2011 (r217578) +++ stable/7/share/man/man7/build.7 Wed Jan 19 15:12:38 2011 (r217579) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2006 +.Dd January 5, 2009 .Dt BUILD 7 .Os .Sh NAME @@ -370,6 +370,69 @@ defaults to the current machine architec .El .Pp Builds under directory +.Pa /usr/src +are also influenced by defining one or more the following symbols, +using the +.Fl D +option of +.Xr make 1 : +.Bl -tag -width ".Va -DNO_KERNELDEPEND" +.It Va NO_CLEANDIR +If set, the build targets that clean parts of the object tree use the +equivalent of +.Dq make clean +instead of +.Dq make cleandir . +.It Va NO_CLEAN +If set, no object tree files are cleaned at all. +Setting +.Va NO_CLEAN +implies +.Va NO_KERNELCLEAN , +so when +.Va NO_CLEAN +is set no kernel objects are cleaned either. +.It Va NO_CTF +If set, the build process does not run the DTrace CTF conversion tools +on built objects. +.It Va NO_SHARE +If set, the build does not descend into the +.Pa /usr/src/share +subdirectory (i.e. manpages, locale data files, timezone data files and +other +.Pa /usr/src/share +files will not be rebuild from their sources). +.It Va NO_KERNELCLEAN +If set, the build process does not run +.Dq make clean +as part of the +.Cm buildkernel +target. +.It Va NO_KERNELCONFIG +If set, the build process does not run +.Xr config 8 +as part of the +.Cm buildkernel +target. +.It Va NO_KERNELDEPEND +If set, the build process does not run +.Dq make depend +as part of the +.Cm buildkernel +target. +.It Va NO_DOCUPDATE +If set, the update process does not update the source of the +.Fx +documentation as part of the +.Dq make update +target. +.It Va NO_PORTSUPDATE +If set, the update process does not update the Ports tree as part of the +.Dq make update +target. +.El +.Pp +Builds under directory .Pa /usr/doc are influenced by the following .Xr make 1 From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 15:26:05 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 817531065679; Wed, 19 Jan 2011 15:26:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 51B318FC17; Wed, 19 Jan 2011 15:26:05 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 085CE46B89; Wed, 19 Jan 2011 10:26:05 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 22C368A009; Wed, 19 Jan 2011 10:26:04 -0500 (EST) From: John Baldwin To: Erwin Lansing Date: Wed, 19 Jan 2011 10:19:17 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101182219.p0IMJt9D053996@svn.freebsd.org> <201101190807.46537.jhb@freebsd.org> <20110119133016.GP67325@droso.net> In-Reply-To: <20110119133016.GP67325@droso.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201101191019.17335.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 19 Jan 2011 10:26:04 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, "Simon L. Nielsen" Subject: Re: svn commit: r217562 - in stable/7/secure/lib: libcrypto libssl 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, 19 Jan 2011 15:26:05 -0000 On Wednesday, January 19, 2011 8:30:16 am Erwin Lansing wrote: > On Wed, Jan 19, 2011 at 08:07:46AM -0500, John Baldwin wrote: > > On Tuesday, January 18, 2011 5:19:55 pm Simon L. Nielsen wrote: > > > Author: simon > > > Date: Tue Jan 18 22:19:55 2011 > > > New Revision: 217562 > > > URL: http://svn.freebsd.org/changeset/base/217562 > > > > > > Log: > > > Decrease the libcrypto and libssl shared object version numbers from 6 > > > to 5. They were accidentally bumped in r215997 (on 2010-11-28) with the > > > merge of OpenSSL 0.9.8p, but unfortunately this was not caught until > > > now. > > > > > > Also add compat links for libcrypto.so.6 / libssl.so.6 (pointing to > > > their .5 counterparts) in case any users have compiled any third party > > > during the time stable/7 (and releng/7.4) were broken. > > > > > > This is deemed the last poor of bad options. Had the number bump not > > > been reverted binary packages for stable/7 would not have worked on the > > > still supported 7.3 and 7.1 releases. > > > > Erm, shouldn't the packages for 7-stable be built against the 7.0 ABI instead > > (and I thought this change was already made)? We've only supported backwards > > compat, not forwards compat. > > > Oldest supported by the security officer, currently 7.1-RELEASE-p16 to > be exact, but yes. Those are built against libcrypto.so.5, which of > course won't work on 7.4 with libcrypto.so.6, hence the above rollback > with an added symlink for those people that already built binaries > themselves against libcrypto.so.6. Ah, as there is no so.5 on a clean 7.4 system. Nevermind me then. The symlinks are certainly fine regardless, my only question was about the base the packages were being built against. -- John Baldwin From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 15:43:23 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 8381B106564A; Wed, 19 Jan 2011 15:43:23 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 721DF8FC19; Wed, 19 Jan 2011 15:43:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0JFhNSi080704; Wed, 19 Jan 2011 15:43:23 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0JFhNeC080702; Wed, 19 Jan 2011 15:43:23 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201101191543.p0JFhNeC080702@svn.freebsd.org> From: Giorgos Keramidas Date: Wed, 19 Jan 2011 15:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217580 - stable/7/lib/libc/stdlib 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, 19 Jan 2011 15:43:23 -0000 Author: keramida (doc committer) Date: Wed Jan 19 15:43:23 2011 New Revision: 217580 URL: http://svn.freebsd.org/changeset/base/217580 Log: MFC -r188305 and r189207 from /head : r188305 --> : Fix language on atol(3) manpage. Add a COMPATIBILITY section : stating that in FreeBSD the atol() and atoll() functions affect : errno in the same way as strtol() and stroll(). : : PR: docs/126487 : Submitted by: edwin : Reviewed by: trhodes, gabor : MFC after: 1 week : r189207 --> : "-isoC-99" should be spelled without 'c'. Modified: stable/7/lib/libc/stdlib/atol.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/stdlib/atol.3 ============================================================================== --- stable/7/lib/libc/stdlib/atol.3 Wed Jan 19 15:12:38 2011 (r217579) +++ stable/7/lib/libc/stdlib/atol.3 Wed Jan 19 15:43:23 2011 (r217580) @@ -32,7 +32,7 @@ .\" @(#)atol.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 28, 2001 +.Dd February 1, 2009 .Dt ATOL 3 .Os .Sh NAME @@ -78,13 +78,42 @@ representation. It is equivalent to: .Pp .Dl "strtoll(nptr, (char **)NULL, 10);" +.Sh COMPATIBILITY +The +.Fx +implementations of the +.Fn atol +and +.Fn atoll +functions are thin wrappers around +.Fn strtol +and +.Fn stroll +respectively, so these functions will affect the value of +.Va errno +in the same way that the +.Fn strtol +and +.Fn stroll +functions are able to. +This behavior of +.Fn atol +and +.Fn atoll +is not required by +.St -isoC +or +.St -isoC-99 , +but it is allowed by all of +.St -isoC , St -isoC-99 +and +.St -p1003.1-2001 . .Sh ERRORS The functions .Fn atol and .Fn atoll -need not -affect the value of +may affect the value of .Va errno on an error. .Sh SEE ALSO From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 21:19:23 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 BDE95106566B; Wed, 19 Jan 2011 21:19:23 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1B328FC15; Wed, 19 Jan 2011 21:19:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0JLJNDg089415; Wed, 19 Jan 2011 21:19:23 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0JLJN99089411; Wed, 19 Jan 2011 21:19:23 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201101192119.p0JLJN99089411@svn.freebsd.org> From: Giorgos Keramidas Date: Wed, 19 Jan 2011 21:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217600 - stable/7/tools/regression/acct 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, 19 Jan 2011 21:19:24 -0000 Author: keramida (doc committer) Date: Wed Jan 19 21:19:23 2011 New Revision: 217600 URL: http://svn.freebsd.org/changeset/base/217600 Log: MFC r217064 - sort & fix includes, remove -include from CFLAGS of acct tests - Sort the includes of pack.c, moving sys/*.h files near the top. - Add a couple of missing #include lines, and remove the need for custom -include options in the CFLAGS of the test Makefile. - Remove the ad-hoc ’all’ target, but keep its ’regress’ bits for testing. - Convert the ad-hoc ’clean’ target to proper CLEANFILES stuff, so that the normal bsd.prog.mk machinery can clean up. - Use ‘make -V .OBJDIR’ to detect the place where ’pack’ lives, so that regress.t works both with and without ’make obj’. Modified: stable/7/tools/regression/acct/Makefile stable/7/tools/regression/acct/pack.c stable/7/tools/regression/acct/regress.t Directory Properties: stable/7/tools/regression/acct/ (props changed) Modified: stable/7/tools/regression/acct/Makefile ============================================================================== --- stable/7/tools/regression/acct/Makefile Wed Jan 19 21:09:39 2011 (r217599) +++ stable/7/tools/regression/acct/Makefile Wed Jan 19 21:19:23 2011 (r217600) @@ -1,22 +1,22 @@ # # $FreeBSD$ # -# "make" will compile what is needed and run the regression tests. +# "make" will compile the acct test programs # + PROG= pack +SRCS= pack.c NO_MAN= +CFLAGS+= -I${.OBJDIR} -all: regress - -pack: pack.c convert.c +pack.o: convert.c +CLEANFILES+= convert.c convert.c: ../../../sys/kern/kern_acct.c - sed -n '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' $? >$@ + sed -n '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' $? | \ + sed -e 's/log(/syslog(/' >$@ regress: pack regress.t - ./regress.t - -clean: - rm -f $(PROG) convert.c + sh ${.CURDIR}/regress.t .include Modified: stable/7/tools/regression/acct/pack.c ============================================================================== --- stable/7/tools/regression/acct/pack.c Wed Jan 19 21:09:39 2011 (r217599) +++ stable/7/tools/regression/acct/pack.c Wed Jan 19 21:19:23 2011 (r217600) @@ -25,15 +25,18 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include +#include #include #include +#include #include #include - -#include -#include +#include +#include #define KASSERT(val, msg) assert(val) Modified: stable/7/tools/regression/acct/regress.t ============================================================================== --- stable/7/tools/regression/acct/regress.t Wed Jan 19 21:09:39 2011 (r217599) +++ stable/7/tools/regression/acct/regress.t Wed Jan 19 21:19:23 2011 (r217600) @@ -3,7 +3,12 @@ # $FreeBSD$ # -DIR=`dirname $0` +if test -z "${DIR}" ; then + DIR=$( make -V .OBJDIR ) +fi +if test -z "${DIR}" ; then + DIR=$( dirname $0 ) +fi check() { From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 21:28:21 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 A01791065670; Wed, 19 Jan 2011 21:28:21 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EB178FC14; Wed, 19 Jan 2011 21:28:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0JLSLpB089706; Wed, 19 Jan 2011 21:28:21 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0JLSLhr089704; Wed, 19 Jan 2011 21:28:21 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201101192128.p0JLSLhr089704@svn.freebsd.org> From: Giorgos Keramidas Date: Wed, 19 Jan 2011 21:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217602 - stable/7/share/man/man7 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, 19 Jan 2011 21:28:21 -0000 Author: keramida (doc committer) Date: Wed Jan 19 21:28:21 2011 New Revision: 217602 URL: http://svn.freebsd.org/changeset/base/217602 Log: MFC r205978 from /head Document DEBUG_FLAGS in a more visible place, in the build(7) manpage Noticed by: Alexander Best Reviewed by: jhb Modified: stable/7/share/man/man7/build.7 Directory Properties: stable/7/share/man/man7/ (props changed) Modified: stable/7/share/man/man7/build.7 ============================================================================== --- stable/7/share/man/man7/build.7 Wed Jan 19 21:28:00 2011 (r217601) +++ stable/7/share/man/man7/build.7 Wed Jan 19 21:28:21 2011 (r217602) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2009 +.Dd March 31, 2010 .Dt BUILD 7 .Os .Sh NAME @@ -311,6 +311,20 @@ should be set as with .Sh ENVIRONMENT Variables that influence all builds include: .Bl -tag -width ".Va MAKEOBJDIRPREFIX" +.It Va DEBUG_FLAGS +Defines a set of debugging flags that will be used to build all userland +binaries under +.Pa /usr/src . +When +.Va DEBUG_FLAGS +is defined, the +.Cm install +and +.Cm installworld +targets install binaries from the current +.Va MAKEOBJDIRPREFIX +without stripping, +so that debugging information is retained in the installed binaries. .It Va DESTDIR The directory hierarchy prefix where built objects will be installed. If not set, From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 21:35:49 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 3F5C61065673; Wed, 19 Jan 2011 21:35:49 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DED98FC1D; Wed, 19 Jan 2011 21:35: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 p0JLZnNm090019; Wed, 19 Jan 2011 21:35:49 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0JLZncd090017; Wed, 19 Jan 2011 21:35:49 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201101192135.p0JLZncd090017@svn.freebsd.org> From: Giorgos Keramidas Date: Wed, 19 Jan 2011 21:35: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: r217605 - 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: Wed, 19 Jan 2011 21:35:49 -0000 Author: keramida (doc committer) Date: Wed Jan 19 21:35:48 2011 New Revision: 217605 URL: http://svn.freebsd.org/changeset/base/217605 Log: MFC r199985 from /head Describe what setpgid(2) does when pgid=0. The text has been copied from NetBSD’s manpage, and it also matches the behavior described by the Open Group’s online copy of setpgid.2 at http://www.opengroup.org/onlinepubs/009695399/functions/setpgid.html Obtained from: NetBSD Submitted by: Petros Barbayiannis Modified: stable/7/lib/libc/sys/setpgid.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sys/setpgid.2 ============================================================================== --- stable/7/lib/libc/sys/setpgid.2 Wed Jan 19 21:35:48 2011 (r217604) +++ stable/7/lib/libc/sys/setpgid.2 Wed Jan 19 21:35:48 2011 (r217605) @@ -54,6 +54,11 @@ to the specified If .Fa pid is zero, then the call applies to the current process. +If +.Fa pgrp +is zero, then the process id of the process specified by +.Fa pid +is used instead. .Pp If the affected process is not the invoking process, then it must be a child of the invoking process, it must not have performed an From owner-svn-src-stable-7@FreeBSD.ORG Wed Jan 19 21:49:42 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 CFE5D1065694; Wed, 19 Jan 2011 21:49:42 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE8EC8FC15; Wed, 19 Jan 2011 21:49:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0JLnglu090559; Wed, 19 Jan 2011 21:49:42 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0JLngJF090557; Wed, 19 Jan 2011 21:49:42 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201101192149.p0JLngJF090557@svn.freebsd.org> From: Giorgos Keramidas Date: Wed, 19 Jan 2011 21:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217609 - stable/7/share/man/man5 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, 19 Jan 2011 21:49:42 -0000 Author: keramida (doc committer) Date: Wed Jan 19 21:49:42 2011 New Revision: 217609 URL: http://svn.freebsd.org/changeset/base/217609 Log: MFC r217481 and r217606 from /head r217481... Fix the mount example of xfs(5) filesystems by including the read-only option. We only support ro mounts for xfs, so it’s nice if the examples we show in the manpage are easy to copy/paste. PR: docs/149106 Submitted by: amdmi3 r217606... Bump .Dd date of manpage for r217481 Modified: stable/7/share/man/man5/xfs.5 Directory Properties: stable/7/share/man/man5/ (props changed) Modified: stable/7/share/man/man5/xfs.5 ============================================================================== --- stable/7/share/man/man5/xfs.5 Wed Jan 19 21:49:21 2011 (r217608) +++ stable/7/share/man/man5/xfs.5 Wed Jan 19 21:49:42 2011 (r217609) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2007 +.Dd January 16, 2011 .Dt XFS 5 .Os .Sh NAME @@ -53,7 +53,7 @@ To mount a volume located on .Pa /dev/ad1s1 : .Pp -.Dl "mount -t xfs /dev/ad1s1 /mnt" +.Dl "mount -t xfs -o ro /dev/ad1s1 /mnt" .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , From owner-svn-src-stable-7@FreeBSD.ORG Thu Jan 20 21:25: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 1B9151065697; Thu, 20 Jan 2011 21:25:17 +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 0A3748FC20; Thu, 20 Jan 2011 21:25:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0KLPGHo028521; Thu, 20 Jan 2011 21:25:16 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0KLPGfh028519; Thu, 20 Jan 2011 21:25:16 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101202125.p0KLPGfh028519@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 20 Jan 2011 21:25: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: r217661 - stable/7/sys/dev/bktr 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: Thu, 20 Jan 2011 21:25:17 -0000 Author: yongari Date: Thu Jan 20 21:25:16 2011 New Revision: 217661 URL: http://svn.freebsd.org/changeset/base/217661 Log: MFC r192784,192805: Free the memory correctly in the error case PR: misc/154152 Modified: stable/7/sys/dev/bktr/bktr_os.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/bktr/bktr_os.c ============================================================================== --- stable/7/sys/dev/bktr/bktr_os.c Thu Jan 20 21:11:45 2011 (r217660) +++ stable/7/sys/dev/bktr/bktr_os.c Thu Jan 20 21:25:16 2011 (r217661) @@ -470,7 +470,7 @@ fail: if (bktr->res_irq) bus_release_resource(dev, SYS_RES_IRQ, bktr->irq_rid, bktr->res_irq); if (bktr->res_mem) - bus_release_resource(dev, SYS_RES_IRQ, bktr->mem_rid, bktr->res_mem); + bus_release_resource(dev, SYS_RES_MEMORY, bktr->mem_rid, bktr->res_mem); return error; } From owner-svn-src-stable-7@FreeBSD.ORG Fri Jan 21 00:35: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 59793106566B; Fri, 21 Jan 2011 00:35:34 +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 46EB38FC0A; Fri, 21 Jan 2011 00:35: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 p0L0ZY7l033121; Fri, 21 Jan 2011 00:35:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0L0ZYIT033119; Fri, 21 Jan 2011 00:35:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101210035.p0L0ZYIT033119@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 21 Jan 2011 00:35: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: r217669 - stable/7/sys/dev/sis 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, 21 Jan 2011 00:35:34 -0000 Author: yongari Date: Fri Jan 21 00:35:34 2011 New Revision: 217669 URL: http://svn.freebsd.org/changeset/base/217669 Log: MFC r217548: Rework RX filter programming by providing separate handler for DP8381[56] and SiS 900/7016 controllers. After r212119, sis(4) no longer reinitializes controller if ALLMULTI/PROMISC was changed. However, RX filter handling code assumed some bits of the RX filter is programmed by driver initialization. This caused ALLMULTI/PROMISC configuration is ignored under certain conditions. Fix that issue by reprogramming all bits of RX filter register. While I'm here follow recommended RX filter programming steps recommended by National DP8381[56] data sheet(RX filter should be is disabled before programming). Reported by: Paul Schenkeveld < freebsd () psconsult dot nl > Tested by: Paul Schenkeveld < freebsd () psconsult dot nl > Modified: stable/7/sys/dev/sis/if_sis.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/sis/if_sis.c ============================================================================== --- stable/7/sys/dev/sis/if_sis.c Fri Jan 21 00:33:10 2011 (r217668) +++ stable/7/sys/dev/sis/if_sis.c Fri Jan 21 00:35:34 2011 (r217669) @@ -149,6 +149,9 @@ static int sis_ioctl(struct ifnet *, u_l static int sis_newbuf(struct sis_softc *, struct sis_rxdesc *); static int sis_resume(device_t); static void sis_rxeof(struct sis_softc *); +static void sis_rxfilter(struct sis_softc *); +static void sis_rxfilter_ns(struct sis_softc *); +static void sis_rxfilter_sis(struct sis_softc *); static void sis_start(struct ifnet *); static void sis_startl(struct ifnet *); static void sis_stop(struct sis_softc *); @@ -808,80 +811,117 @@ sis_mchash(struct sis_softc *sc, const u } static void -sis_setmulti_ns(struct sis_softc *sc) +sis_rxfilter(struct sis_softc *sc) +{ + + SIS_LOCK_ASSERT(sc); + + if (sc->sis_type == SIS_TYPE_83815) + sis_rxfilter_ns(sc); + else + sis_rxfilter_sis(sc); +} + +static void +sis_rxfilter_ns(struct sis_softc *sc) { struct ifnet *ifp; struct ifmultiaddr *ifma; - uint32_t h = 0, i, filtsave; + uint32_t h, i, filter; int bit, index; ifp = sc->sis_ifp; - - if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { - SIS_CLRBIT(sc, SIS_RXFILT_CTL, NS_RXFILTCTL_MCHASH); - SIS_SETBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_ALLMULTI); - return; + filter = CSR_READ_4(sc, SIS_RXFILT_CTL); + if (filter & SIS_RXFILTCTL_ENABLE) { + /* + * Filter should be disabled to program other bits. + */ + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter & ~SIS_RXFILTCTL_ENABLE); + CSR_READ_4(sc, SIS_RXFILT_CTL); } + filter &= ~(NS_RXFILTCTL_ARP | NS_RXFILTCTL_PERFECT | + NS_RXFILTCTL_MCHASH | SIS_RXFILTCTL_ALLPHYS | SIS_RXFILTCTL_BROAD | + SIS_RXFILTCTL_ALLMULTI); + if (ifp->if_flags & IFF_BROADCAST) + filter |= SIS_RXFILTCTL_BROAD; /* - * We have to explicitly enable the multicast hash table - * on the NatSemi chip if we want to use it, which we do. + * For the NatSemi chip, we have to explicitly enable the + * reception of ARP frames, as well as turn on the 'perfect + * match' filter where we store the station address, otherwise + * we won't receive unicasts meant for this host. */ - SIS_SETBIT(sc, SIS_RXFILT_CTL, NS_RXFILTCTL_MCHASH); - SIS_CLRBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_ALLMULTI); + filter |= NS_RXFILTCTL_ARP | NS_RXFILTCTL_PERFECT; - filtsave = CSR_READ_4(sc, SIS_RXFILT_CTL); + if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { + filter |= SIS_RXFILTCTL_ALLMULTI; + if (ifp->if_flags & IFF_PROMISC) + filter |= SIS_RXFILTCTL_ALLPHYS; + } else { + /* + * We have to explicitly enable the multicast hash table + * on the NatSemi chip if we want to use it, which we do. + */ + filter |= NS_RXFILTCTL_MCHASH; - /* first, zot all the existing hash bits */ - for (i = 0; i < 32; i++) { - CSR_WRITE_4(sc, SIS_RXFILT_CTL, NS_FILTADDR_FMEM_LO + (i*2)); - CSR_WRITE_4(sc, SIS_RXFILT_DATA, 0); - } + /* first, zot all the existing hash bits */ + for (i = 0; i < 32; i++) { + CSR_WRITE_4(sc, SIS_RXFILT_CTL, NS_FILTADDR_FMEM_LO + + (i * 2)); + CSR_WRITE_4(sc, SIS_RXFILT_DATA, 0); + } - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - h = sis_mchash(sc, - LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); - index = h >> 3; - bit = h & 0x1F; - CSR_WRITE_4(sc, SIS_RXFILT_CTL, NS_FILTADDR_FMEM_LO + index); - if (bit > 0xF) - bit -= 0x10; - SIS_SETBIT(sc, SIS_RXFILT_DATA, (1 << bit)); + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + h = sis_mchash(sc, + LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); + index = h >> 3; + bit = h & 0x1F; + CSR_WRITE_4(sc, SIS_RXFILT_CTL, NS_FILTADDR_FMEM_LO + + index); + if (bit > 0xF) + bit -= 0x10; + SIS_SETBIT(sc, SIS_RXFILT_DATA, (1 << bit)); + } + IF_ADDR_UNLOCK(ifp); } - IF_ADDR_UNLOCK(ifp); - CSR_WRITE_4(sc, SIS_RXFILT_CTL, filtsave); + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter); + CSR_READ_4(sc, SIS_RXFILT_CTL); } static void -sis_setmulti_sis(struct sis_softc *sc) +sis_rxfilter_sis(struct sis_softc *sc) { struct ifnet *ifp; struct ifmultiaddr *ifma; - uint32_t h, i, n, ctl; + uint32_t filter, h, i, n; uint16_t hashes[16]; ifp = sc->sis_ifp; /* hash table size */ - if (sc->sis_rev >= SIS_REV_635 || - sc->sis_rev == SIS_REV_900B) + if (sc->sis_rev >= SIS_REV_635 || sc->sis_rev == SIS_REV_900B) n = 16; else n = 8; - ctl = CSR_READ_4(sc, SIS_RXFILT_CTL) & SIS_RXFILTCTL_ENABLE; - + filter = CSR_READ_4(sc, SIS_RXFILT_CTL); + if (filter & SIS_RXFILTCTL_ENABLE) { + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter & ~SIS_RXFILT_CTL); + CSR_READ_4(sc, SIS_RXFILT_CTL); + } + filter &= ~(SIS_RXFILTCTL_ALLPHYS | SIS_RXFILTCTL_BROAD | + SIS_RXFILTCTL_ALLMULTI); if (ifp->if_flags & IFF_BROADCAST) - ctl |= SIS_RXFILTCTL_BROAD; + filter |= SIS_RXFILTCTL_BROAD; - if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { - ctl |= SIS_RXFILTCTL_ALLMULTI; + if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { + filter |= SIS_RXFILTCTL_ALLMULTI; if (ifp->if_flags & IFF_PROMISC) - ctl |= SIS_RXFILTCTL_BROAD|SIS_RXFILTCTL_ALLPHYS; + filter |= SIS_RXFILTCTL_ALLPHYS; for (i = 0; i < n; i++) hashes[i] = ~0; } else { @@ -899,7 +939,7 @@ sis_setmulti_sis(struct sis_softc *sc) } IF_ADDR_UNLOCK(ifp); if (i > n) { - ctl |= SIS_RXFILTCTL_ALLMULTI; + filter |= SIS_RXFILTCTL_ALLMULTI; for (i = 0; i < n; i++) hashes[i] = ~0; } @@ -910,7 +950,8 @@ sis_setmulti_sis(struct sis_softc *sc) CSR_WRITE_4(sc, SIS_RXFILT_DATA, hashes[i]); } - CSR_WRITE_4(sc, SIS_RXFILT_CTL, ctl); + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter); + CSR_READ_4(sc, SIS_RXFILT_CTL); } static void @@ -2102,41 +2143,7 @@ sis_initl(struct sis_softc *sc) CSR_WRITE_4(sc, NS_PHY_PAGE, 0); } - /* - * For the NatSemi chip, we have to explicitly enable the - * reception of ARP frames, as well as turn on the 'perfect - * match' filter where we store the station address, otherwise - * we won't receive unicasts meant for this host. - */ - if (sc->sis_type == SIS_TYPE_83815) { - SIS_SETBIT(sc, SIS_RXFILT_CTL, NS_RXFILTCTL_ARP); - SIS_SETBIT(sc, SIS_RXFILT_CTL, NS_RXFILTCTL_PERFECT); - } - - /* If we want promiscuous mode, set the allframes bit. */ - if (ifp->if_flags & IFF_PROMISC) { - SIS_SETBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_ALLPHYS); - } else { - SIS_CLRBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_ALLPHYS); - } - - /* - * Set the capture broadcast bit to capture broadcast frames. - */ - if (ifp->if_flags & IFF_BROADCAST) { - SIS_SETBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_BROAD); - } else { - SIS_CLRBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_BROAD); - } - - /* - * Load the multicast filter. - */ - if (sc->sis_type == SIS_TYPE_83815) - sis_setmulti_ns(sc); - else - sis_setmulti_sis(sc); - + sis_rxfilter(sc); /* Turn the receive filter on */ SIS_SETBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_ENABLE); @@ -2250,27 +2257,19 @@ sis_ioctl(struct ifnet *ifp, u_long comm if (ifp->if_flags & IFF_UP) { if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 && ((ifp->if_flags ^ sc->sis_if_flags) & - (IFF_PROMISC | IFF_ALLMULTI)) != 0) { - if (sc->sis_type == SIS_TYPE_83815) - sis_setmulti_ns(sc); - else - sis_setmulti_sis(sc); - } else + (IFF_PROMISC | IFF_ALLMULTI)) != 0) + sis_rxfilter(sc); + else sis_initl(sc); - } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) sis_stop(sc); - } sc->sis_if_flags = ifp->if_flags; SIS_UNLOCK(sc); - error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: SIS_LOCK(sc); - if (sc->sis_type == SIS_TYPE_83815) - sis_setmulti_ns(sc); - else - sis_setmulti_sis(sc); + sis_rxfilter(sc); SIS_UNLOCK(sc); break; case SIOCGIFMEDIA: From owner-svn-src-stable-7@FreeBSD.ORG Fri Jan 21 00:40:51 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 8C7A81065697; Fri, 21 Jan 2011 00:40:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A9CD8FC12; Fri, 21 Jan 2011 00:40:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0L0epdx033324; Fri, 21 Jan 2011 00:40:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0L0epFZ033320; Fri, 21 Jan 2011 00:40:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201101210040.p0L0epFZ033320@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 Jan 2011 00:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217671 - stable/7/sys/dev/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, 21 Jan 2011 00:40:51 -0000 Author: marius Date: Fri Jan 21 00:40:51 2011 New Revision: 217671 URL: http://svn.freebsd.org/changeset/base/217671 Log: MFC: r217412 - Masking IFM_GMASK when also masking IFM_FDX is redundant and just complicates the code. - Don't let atphy_setmedia() announce PAUSE support for half-duplex when MIIF_FORCEPAUSE is set. - Simplify e1000phy_service() and ip1000phy_service() to only set the manual configuration bits once after we have figured them all out. For ip1000phy_service() this also means we no longer unnecessarily update the hardware along the road. Modified: stable/7/sys/dev/mii/atphy.c stable/7/sys/dev/mii/e1000phy.c stable/7/sys/dev/mii/ip1000phy.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/mii/atphy.c ============================================================================== --- stable/7/sys/dev/mii/atphy.c Fri Jan 21 00:40:25 2011 (r217670) +++ stable/7/sys/dev/mii/atphy.c Fri Jan 21 00:40:51 2011 (r217671) @@ -187,9 +187,9 @@ atphy_service(struct mii_softc *sc, stru } anar = atphy_anar(ife); - if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { + if ((ife->ifm_media & IFM_FDX) != 0) { bmcr |= BMCR_FDX; - if (((ife->ifm_media & IFM_GMASK) & IFM_FLOW) != 0 || + if ((ife->ifm_media & IFM_FLOW) != 0 || (sc->mii_flags & MIIF_FORCEPAUSE) != 0) anar |= ANAR_PAUSE_TOWARDS; } @@ -371,7 +371,7 @@ atphy_anar(struct ifmedia_entry *ife) return (0); } - if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { + if ((ife->ifm_media & IFM_FDX) != 0) { if (IFM_SUBTYPE(ife->ifm_media) == IFM_100_TX) anar |= ANAR_TX_FD; else @@ -387,13 +387,13 @@ atphy_setmedia(struct mii_softc *sc, int uint16_t anar; anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; - if (((IFM_SUBTYPE(media) == IFM_AUTO || - ((media & IFM_GMASK) & IFM_FDX) != 0) && - ((media & IFM_GMASK) & IFM_FLOW) != 0) || - (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + if ((IFM_SUBTYPE(media) == IFM_AUTO || (media & IFM_FDX) != 0) && + ((media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0)) anar |= ANAR_PAUSE_TOWARDS; PHY_WRITE(sc, MII_ANAR, anar); - if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) + if ((sc->mii_extcapabilities & + (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) PHY_WRITE(sc, MII_100T2CR, GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX); PHY_WRITE(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG); Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Fri Jan 21 00:40:25 2011 (r217670) +++ stable/7/sys/dev/mii/e1000phy.c Fri Jan 21 00:40:51 2011 (r217671) @@ -358,7 +358,7 @@ e1000phy_service(struct mii_softc *sc, s return (EINVAL); } - if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { + if ((ife->ifm_media & IFM_FDX) != 0) { speed |= E1000_CR_FULL_DUPLEX; gig = E1000_1GCR_1000T_FD; } else @@ -373,10 +373,10 @@ e1000phy_service(struct mii_softc *sc, s if ((ife->ifm_media & IFM_ETH_MASTER) != 0 || (mii->mii_ifp->if_flags & IFF_LINK0) != 0) gig |= E1000_1GCR_MS_VALUE; - PHY_WRITE(sc, E1000_1GCR, gig); } else if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) - PHY_WRITE(sc, E1000_1GCR, 0); + gig = 0; + PHY_WRITE(sc, E1000_1GCR, gig); PHY_WRITE(sc, E1000_AR, E1000_AR_SELECTOR_FIELD); PHY_WRITE(sc, E1000_CR, speed | E1000_CR_RESET); done: Modified: stable/7/sys/dev/mii/ip1000phy.c ============================================================================== --- stable/7/sys/dev/mii/ip1000phy.c Fri Jan 21 00:40:25 2011 (r217670) +++ stable/7/sys/dev/mii/ip1000phy.c Fri Jan 21 00:40:51 2011 (r217671) @@ -186,23 +186,22 @@ ip1000phy_service(struct mii_softc *sc, return (EINVAL); } - if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { + if ((ife->ifm_media & IFM_FDX) != 0) { speed |= IP1000PHY_BMCR_FDX; gig = IP1000PHY_1000CR_1000T_FDX; } else gig = IP1000PHY_1000CR_1000T; - PHY_WRITE(sc, IP1000PHY_MII_1000CR, 0); - PHY_WRITE(sc, IP1000PHY_MII_BMCR, speed); - - if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T) - break; - - gig |= IP1000PHY_1000CR_MASTER | IP1000PHY_1000CR_MANUAL; - if ((ife->ifm_media & IFM_ETH_MASTER) != 0 || - (mii->mii_ifp->if_flags & IFF_LINK0) != 0) - gig |= IP1000PHY_1000CR_MMASTER; + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { + gig |= + IP1000PHY_1000CR_MASTER | IP1000PHY_1000CR_MANUAL; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0 || + (mii->mii_ifp->if_flags & IFF_LINK0) != 0) + gig |= IP1000PHY_1000CR_MMASTER; + } else + gig = 0; PHY_WRITE(sc, IP1000PHY_MII_1000CR, gig); + PHY_WRITE(sc, IP1000PHY_MII_BMCR, speed); done: break; From owner-svn-src-stable-7@FreeBSD.ORG Fri Jan 21 00:48:09 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 2E2A31065791; Fri, 21 Jan 2011 00:48:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C9178FC18; Fri, 21 Jan 2011 00:48:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0L0m9lq033585; Fri, 21 Jan 2011 00:48:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0L0m8bL033581; Fri, 21 Jan 2011 00:48:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201101210048.p0L0m8bL033581@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 Jan 2011 00:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217673 - stable/7/sys/dev/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, 21 Jan 2011 00:48:09 -0000 Author: marius Date: Fri Jan 21 00:48:08 2011 New Revision: 217673 URL: http://svn.freebsd.org/changeset/base/217673 Log: MFC: r217413 - Even after masking the media with IFM_GMASK the result may have bits besides the duplex ones set so just comparing it with IFM_FDX may lead to false negatives. - Simplify ciphy_service() to only set the manual configuration bits once after we have figured them all out. This also means we no longer unnecessarily update the hardware along the road. Modified: stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/ciphy.c stable/7/sys/dev/mii/xmphy.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/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Fri Jan 21 00:48:04 2011 (r217672) +++ stable/7/sys/dev/mii/brgphy.c Fri Jan 21 00:48:08 2011 (r217673) @@ -452,7 +452,7 @@ brgphy_setmedia(struct mii_softc *sc, in break; } - if ((media & IFM_GMASK) == IFM_FDX) { + if ((media & IFM_FDX) != 0) { bmcr |= BRGPHY_BMCR_FDX; gig = BRGPHY_1000CTL_AFD; } else { Modified: stable/7/sys/dev/mii/ciphy.c ============================================================================== --- stable/7/sys/dev/mii/ciphy.c Fri Jan 21 00:48:04 2011 (r217672) +++ stable/7/sys/dev/mii/ciphy.c Fri Jan 21 00:48:08 2011 (r217673) @@ -89,8 +89,8 @@ static const struct mii_phydesc ciphys[] MII_PHY_DESC(CICADA, CS8201), MII_PHY_DESC(CICADA, CS8201A), MII_PHY_DESC(CICADA, CS8201B), - MII_PHY_DESC(CICADA, VSC8211), MII_PHY_DESC(CICADA, CS8204), + MII_PHY_DESC(CICADA, VSC8211), MII_PHY_DESC(CICADA, CS8244), MII_PHY_DESC(VITESSE, VSC8601), MII_PHY_END @@ -176,27 +176,24 @@ ciphy_service(struct mii_softc *sc, stru case IFM_10_T: speed = CIPHY_S10; setit: - if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) { + if ((ife->ifm_media & IFM_FDX) != 0) { speed |= CIPHY_BMCR_FDX; gig = CIPHY_1000CTL_AFD; - } else { + } else gig = CIPHY_1000CTL_AHD; - } - PHY_WRITE(sc, CIPHY_MII_1000CTL, 0); + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { + gig |= CIPHY_1000CTL_MSE; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0 || + (mii->mii_ifp->if_flags & IFF_LINK0) != 0) + gig |= CIPHY_1000CTL_MSC; + speed |= + CIPHY_BMCR_AUTOEN | CIPHY_BMCR_STARTNEG; + } else + gig = 0; + PHY_WRITE(sc, CIPHY_MII_1000CTL, gig); PHY_WRITE(sc, CIPHY_MII_BMCR, speed); PHY_WRITE(sc, CIPHY_MII_ANAR, CIPHY_SEL_TYPE); - - if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T) - break; - - gig |= CIPHY_1000CTL_MSE; - if ((ife->ifm_media & IFM_ETH_MASTER) != 0 || - (mii->mii_ifp->if_flags & IFF_LINK0) != 0) - gig |= CIPHY_1000CTL_MSC; - PHY_WRITE(sc, CIPHY_MII_1000CTL, gig); - PHY_WRITE(sc, CIPHY_MII_BMCR, - speed | CIPHY_BMCR_AUTOEN | CIPHY_BMCR_STARTNEG); break; case IFM_NONE: PHY_WRITE(sc, MII_BMCR, BMCR_ISO | BMCR_PDOWN); Modified: stable/7/sys/dev/mii/xmphy.c ============================================================================== --- stable/7/sys/dev/mii/xmphy.c Fri Jan 21 00:48:04 2011 (r217672) +++ stable/7/sys/dev/mii/xmphy.c Fri Jan 21 00:48:08 2011 (r217673) @@ -171,7 +171,7 @@ xmphy_service(struct mii_softc *sc, stru break; case IFM_1000_SX: mii_phy_reset(sc); - if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) { + if ((ife->ifm_media & IFM_FDX) != 0) { PHY_WRITE(sc, XMPHY_MII_ANAR, XMPHY_ANAR_FDX); PHY_WRITE(sc, XMPHY_MII_BMCR, XMPHY_BMCR_FDX); } else { From owner-svn-src-stable-7@FreeBSD.ORG Fri Jan 21 00:50: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 1E7C7106566B; Fri, 21 Jan 2011 00:50:35 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6E218FC13; Fri, 21 Jan 2011 00:50: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 p0L0oYbG033737; Fri, 21 Jan 2011 00:50:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0L0oY7O033734; Fri, 21 Jan 2011 00:50:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201101210050.p0L0oY7O033734@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 Jan 2011 00:50: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: r217675 - stable/7/sys/dev/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, 21 Jan 2011 00:50:35 -0000 Author: marius Date: Fri Jan 21 00:50:34 2011 New Revision: 217675 URL: http://svn.freebsd.org/changeset/base/217675 Log: MFC: r217414 - Don't announce PAUSE support for half-duplex when MIIF_FORCEPAUSE is set. - Let mii_phy_auto() also announce PAUSE support for 10baseT-FDX. Modified: stable/7/sys/dev/mii/jmphy.c stable/7/sys/dev/mii/mii_physubr.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/mii/jmphy.c ============================================================================== --- stable/7/sys/dev/mii/jmphy.c Fri Jan 21 00:50:34 2011 (r217674) +++ stable/7/sys/dev/mii/jmphy.c Fri Jan 21 00:50:34 2011 (r217675) @@ -334,10 +334,10 @@ jmphy_setmedia(struct mii_softc *sc, str bmcr |= BMCR_LOOP; anar = jmphy_anar(ife); - if (((IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO || + if ((IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO || (ife->ifm_media & IFM_FDX) != 0) && - (ife->ifm_media & IFM_FLOW) != 0) || - (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0)) anar |= ANAR_PAUSE_TOWARDS; if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0) { Modified: stable/7/sys/dev/mii/mii_physubr.c ============================================================================== --- stable/7/sys/dev/mii/mii_physubr.c Fri Jan 21 00:50:34 2011 (r217674) +++ stable/7/sys/dev/mii/mii_physubr.c Fri Jan 21 00:50:34 2011 (r217675) @@ -135,8 +135,9 @@ mii_phy_setmedia(struct mii_softc *sc) gtcr |= GTCR_ADV_MS; } - if ((ife->ifm_media & IFM_GMASK) == (IFM_FDX | IFM_FLOW) || - (sc->mii_flags & MIIF_FORCEPAUSE) != 0) { + if ((ife->ifm_media & IFM_FDX) != 0 && + ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0)) { if ((sc->mii_flags & MIIF_IS_1000X) != 0) anar |= ANAR_X_PAUSE_TOWARDS; else { @@ -184,7 +185,8 @@ mii_phy_auto(struct mii_softc *sc) ANAR_CSMA; if ((ife->ifm_media & IFM_FLOW) != 0 || (sc->mii_flags & MIIF_FORCEPAUSE) != 0) { - if ((sc->mii_capabilities & BMSR_100TXFDX) != 0) + if ((sc->mii_capabilities & + (BMSR_10TFDX | BMSR_100TXFDX)) != 0) anar |= ANAR_FC; /* XXX Only 1000BASE-T has PAUSE_ASYM? */ if (((sc->mii_flags & MIIF_HAVE_GTCR) != 0) && From owner-svn-src-stable-7@FreeBSD.ORG Fri Jan 21 00:53:37 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 D8F2210657C3; Fri, 21 Jan 2011 00:53:37 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C73178FC1C; Fri, 21 Jan 2011 00:53:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0L0rbua033901; Fri, 21 Jan 2011 00:53:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0L0rbs9033898; Fri, 21 Jan 2011 00:53:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201101210053.p0L0rbs9033898@svn.freebsd.org> From: Marius Strobl Date: Fri, 21 Jan 2011 00:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217677 - stable/7/sys/dev/dc 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, 21 Jan 2011 00:53:38 -0000 Author: marius Date: Fri Jan 21 00:53:37 2011 New Revision: 217677 URL: http://svn.freebsd.org/changeset/base/217677 Log: MFC: r217417 - Even after masking the media with IFM_GMASK the result may have bits besides the duplex ones set so just comparing it with IFM_FDX may lead to false negatives. - Just let the default case handle all unsupported media types. - In pnphy_status() don't unnecessarily read a register twice. - Remove unnused macros. Modified: stable/7/sys/dev/dc/dcphy.c stable/7/sys/dev/dc/pnphy.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/dc/dcphy.c ============================================================================== --- stable/7/sys/dev/dc/dcphy.c Fri Jan 21 00:53:32 2011 (r217676) +++ stable/7/sys/dev/dc/dcphy.c Fri Jan 21 00:53:37 2011 (r217677) @@ -222,17 +222,12 @@ dcphy_service(struct mii_softc *sc, stru /*dcphy_reset(sc);*/ (void) dcphy_auto(sc); break; - case IFM_100_T4: - /* - * XXX Not supported as a manual setting right now. - */ - return (EINVAL); case IFM_100_TX: dcphy_reset(sc); DC_CLRBIT(dc_sc, DC_10BTCTRL, DC_TCTL_AUTONEGENBL); mode |= DC_NETCFG_PORTSEL | DC_NETCFG_PCS | DC_NETCFG_SCRAMBLER; - if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) + if ((ife->ifm_media & IFM_FDX) != 0) mode |= DC_NETCFG_FULLDUPLEX; else mode &= ~DC_NETCFG_FULLDUPLEX; @@ -241,7 +236,7 @@ dcphy_service(struct mii_softc *sc, stru case IFM_10_T: DC_CLRBIT(dc_sc, DC_SIARESET, DC_SIA_RESET); DC_CLRBIT(dc_sc, DC_10BTCTRL, 0xFFFF); - if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) + if ((ife->ifm_media & IFM_FDX) != 0) DC_SETBIT(dc_sc, DC_10BTCTRL, 0x7F3D); else DC_SETBIT(dc_sc, DC_10BTCTRL, 0x7F3F); @@ -249,7 +244,7 @@ dcphy_service(struct mii_softc *sc, stru DC_CLRBIT(dc_sc, DC_10BTCTRL, DC_TCTL_AUTONEGENBL); mode &= ~DC_NETCFG_PORTSEL; mode |= DC_NETCFG_SPEEDSEL; - if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) + if ((ife->ifm_media & IFM_FDX) != 0) mode |= DC_NETCFG_FULLDUPLEX; else mode &= ~DC_NETCFG_FULLDUPLEX; Modified: stable/7/sys/dev/dc/pnphy.c ============================================================================== --- stable/7/sys/dev/dc/pnphy.c Fri Jan 21 00:53:32 2011 (r217676) +++ stable/7/sys/dev/dc/pnphy.c Fri Jan 21 00:53:37 2011 (r217677) @@ -66,14 +66,6 @@ __FBSDID("$FreeBSD$"); #include "miibus_if.h" -#define DC_SETBIT(sc, reg, x) \ - CSR_WRITE_4(sc, reg, \ - CSR_READ_4(sc, reg) | x) - -#define DC_CLRBIT(sc, reg, x) \ - CSR_WRITE_4(sc, reg, \ - CSR_READ_4(sc, reg) & ~x) - static int pnphy_probe(device_t); static int pnphy_attach(device_t); @@ -170,23 +162,19 @@ pnphy_service(struct mii_softc *sc, stru if ((mii->mii_ifp->if_flags & IFF_UP) == 0) break; + /* + * Note that auto-negotiation is broken on this chip. + */ switch (IFM_SUBTYPE(ife->ifm_media)) { - case IFM_AUTO: - /* NWAY is busted on this chip */ - case IFM_100_T4: - /* - * XXX Not supported as a manual setting right now. - */ - return (EINVAL); case IFM_100_TX: mii->mii_media_active = IFM_ETHER | IFM_100_TX; - if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) + if ((ife->ifm_media & IFM_FDX) != 0) mii->mii_media_active |= IFM_FDX; MIIBUS_STATCHG(sc->mii_dev); return (0); case IFM_10_T: mii->mii_media_active = IFM_ETHER | IFM_10_T; - if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) + if ((ife->ifm_media & IFM_FDX) != 0) mii->mii_media_active |= IFM_FDX; MIIBUS_STATCHG(sc->mii_dev); return (0); @@ -226,15 +214,14 @@ pnphy_status(struct mii_softc *sc) mii->mii_media_active = IFM_ETHER; reg = CSR_READ_4(dc_sc, DC_ISR); - if (!(reg & DC_ISR_LINKFAIL)) mii->mii_media_status |= IFM_ACTIVE; - - if (CSR_READ_4(dc_sc, DC_NETCFG) & DC_NETCFG_SPEEDSEL) + reg = CSR_READ_4(dc_sc, DC_NETCFG); + if (reg & DC_NETCFG_SPEEDSEL) mii->mii_media_active |= IFM_10_T; else mii->mii_media_active |= IFM_100_TX; - if (CSR_READ_4(dc_sc, DC_NETCFG) & DC_NETCFG_FULLDUPLEX) + if (reg & DC_NETCFG_FULLDUPLEX) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; From owner-svn-src-stable-7@FreeBSD.ORG Fri Jan 21 18:32:30 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 5B1C4106564A; Fri, 21 Jan 2011 18:32:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 498F38FC21; Fri, 21 Jan 2011 18:32:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0LIWUIN063504; Fri, 21 Jan 2011 18:32:30 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0LIWUOj063501; Fri, 21 Jan 2011 18:32:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201101211832.p0LIWUOj063501@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 21 Jan 2011 18:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217701 - in stable/7/sys/amd64: ia32 linux32 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, 21 Jan 2011 18:32:30 -0000 Author: jkim Date: Fri Jan 21 18:32:29 2011 New Revision: 217701 URL: http://svn.freebsd.org/changeset/base/217701 Log: MFC: r217424 Remove redundant, bogus, and even harmful uses of setting TS bit in CR0. It is done from fpstate_drop() when it is really necessary. Modified: stable/7/sys/amd64/ia32/ia32_signal.c stable/7/sys/amd64/linux32/linux32_sysvec.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/amd64/ia32/ia32_signal.c ============================================================================== --- stable/7/sys/amd64/ia32/ia32_signal.c Fri Jan 21 18:31:57 2011 (r217700) +++ stable/7/sys/amd64/ia32/ia32_signal.c Fri Jan 21 18:32:29 2011 (r217701) @@ -736,7 +736,6 @@ ia32_setregs(td, entry, stack, ps_string regs->tf_ss = _udatasel; regs->tf_cs = _ucode32sel; regs->tf_rbx = ps_strings; - load_cr0(rcr0() | CR0_MP | CR0_TS); fpstate_drop(td); /* Return via doreti so that we can change to a different %cs */ Modified: stable/7/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_sysvec.c Fri Jan 21 18:31:57 2011 (r217700) +++ stable/7/sys/amd64/linux32/linux32_sysvec.c Fri Jan 21 18:32:29 2011 (r217701) @@ -860,7 +860,7 @@ exec_linux_setregs(td, entry, stack, ps_ regs->tf_ss = _udatasel; regs->tf_cs = _ucode32sel; regs->tf_rbx = ps_strings; - load_cr0(rcr0() | CR0_MP | CR0_TS); + fpstate_drop(td); /* Return via doreti so that we can change to a different %cs */ From owner-svn-src-stable-7@FreeBSD.ORG Sat Jan 22 20:00: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 1AB92106566B; Sat, 22 Jan 2011 20:00:25 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0953F8FC08; Sat, 22 Jan 2011 20:00: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 p0MK0OKg002827; Sat, 22 Jan 2011 20:00:24 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0MK0OOC002825; Sat, 22 Jan 2011 20:00:24 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201101222000.p0MK0OOC002825@svn.freebsd.org> From: Jack F Vogel Date: Sat, 22 Jan 2011 20:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217723 - stable/7/sys/dev/e1000 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, 22 Jan 2011 20:00:25 -0000 Author: jfv Date: Sat Jan 22 20:00:24 2011 New Revision: 217723 URL: http://svn.freebsd.org/changeset/base/217723 Log: MFC rev 217295 Modified: stable/7/sys/dev/e1000/if_em.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/e1000/if_em.c ============================================================================== --- stable/7/sys/dev/e1000/if_em.c Sat Jan 22 19:25:49 2011 (r217722) +++ stable/7/sys/dev/e1000/if_em.c Sat Jan 22 20:00:24 2011 (r217723) @@ -90,7 +90,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.1.8"; +char em_driver_version[] = "7.1.9"; /********************************************************************* * PCI Device ID Table @@ -1788,14 +1788,23 @@ em_xmit(struct tx_ring *txr, struct mbuf error = bus_dmamap_load_mbuf_sg(txr->txtag, map, *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); - if (error) { + if (error == ENOMEM) { + adapter->no_tx_dma_setup++; + return (error); + } else if (error != 0) { adapter->no_tx_dma_setup++; m_freem(*m_headp); *m_headp = NULL; return (error); } + + } else if (error == ENOMEM) { + adapter->no_tx_dma_setup++; + return (error); } else if (error != 0) { adapter->no_tx_dma_setup++; + m_freem(*m_headp); + *m_headp = NULL; return (error); } @@ -2077,7 +2086,6 @@ hung: txr->me, txr->tx_avail, txr->next_to_clean); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; adapter->watchdog_events++; - EM_TX_UNLOCK(txr); em_init_locked(adapter); } From owner-svn-src-stable-7@FreeBSD.ORG Sat Jan 22 20:01: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 8B7DC106566B; Sat, 22 Jan 2011 20:01:46 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A3038FC1E; Sat, 22 Jan 2011 20:01: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 p0MK1kCP002909; Sat, 22 Jan 2011 20:01:46 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0MK1kTg002907; Sat, 22 Jan 2011 20:01:46 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201101222001.p0MK1kTg002907@svn.freebsd.org> From: Jack F Vogel Date: Sat, 22 Jan 2011 20:01: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: r217724 - stable/7/sys/dev/e1000 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, 22 Jan 2011 20:01:46 -0000 Author: jfv Date: Sat Jan 22 20:01:46 2011 New Revision: 217724 URL: http://svn.freebsd.org/changeset/base/217724 Log: MFC rev 217591 Modified: stable/7/sys/dev/e1000/if_em.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/e1000/if_em.c ============================================================================== --- stable/7/sys/dev/e1000/if_em.c Sat Jan 22 20:00:24 2011 (r217723) +++ stable/7/sys/dev/e1000/if_em.c Sat Jan 22 20:01:46 2011 (r217724) @@ -1699,12 +1699,12 @@ em_xmit(struct tx_ring *txr, struct mbuf } ip = (struct ip *)(mtod(m_head, char *) + ip_off); poff = ip_off + (ip->ip_hl << 2); - m_head = m_pullup(m_head, poff + sizeof(struct tcphdr)); - if (m_head == NULL) { - *m_headp = NULL; - return (ENOBUFS); - } if (do_tso) { + m_head = m_pullup(m_head, poff + sizeof(struct tcphdr)); + if (m_head == NULL) { + *m_headp = NULL; + return (ENOBUFS); + } tp = (struct tcphdr *)(mtod(m_head, char *) + poff); /* * TSO workaround: @@ -1728,6 +1728,11 @@ em_xmit(struct tx_ring *txr, struct mbuf tp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(IPPROTO_TCP)); } else if (m_head->m_pkthdr.csum_flags & CSUM_TCP) { + m_head = m_pullup(m_head, poff + sizeof(struct tcphdr)); + if (m_head == NULL) { + *m_headp = NULL; + return (ENOBUFS); + } tp = (struct tcphdr *)(mtod(m_head, char *) + poff); m_head = m_pullup(m_head, poff + (tp->th_off << 2)); if (m_head == NULL) {