From owner-svn-src-stable-8@FreeBSD.ORG Sun Aug 1 01:06:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 091791065673; Sun, 1 Aug 2010 01:06:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB3F38FC15; Sun, 1 Aug 2010 01:06: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 o7116HST048006; Sun, 1 Aug 2010 01:06:17 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7116HO6048004; Sun, 1 Aug 2010 01:06:17 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201008010106.o7116HO6048004@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 Aug 2010 01:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210706 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 01:06:18 -0000 Author: rmacklem Date: Sun Aug 1 01:06:17 2010 New Revision: 210706 URL: http://svn.freebsd.org/changeset/base/210706 Log: MFC: r210032 For the experimental NFSv4 client, do not use cached attributes that were invalidated even when a delegation for the file is held. Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clsubs.c Sat Jul 31 23:15:51 2010 (r210705) +++ stable/8/sys/fs/nfsclient/nfs_clsubs.c Sun Aug 1 01:06:17 2010 (r210706) @@ -230,7 +230,7 @@ ncl_getattrcache(struct vnode *vp, struc #endif if ((time_second - np->n_attrstamp) >= timeo && - mustflush != 0) { + (mustflush != 0 || np->n_attrstamp == 0)) { newnfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); #ifdef NFS_ACDEBUG From owner-svn-src-stable-8@FreeBSD.ORG Sun Aug 1 02:11:13 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29A031065670; Sun, 1 Aug 2010 02:11:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1A3B8FC0A; Sun, 1 Aug 2010 02:11:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o712BCYp062461; Sun, 1 Aug 2010 02:11:12 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o712BCww062459; Sun, 1 Aug 2010 02:11:12 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201008010211.o712BCww062459@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 Aug 2010 02:11:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210711 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 02:11:13 -0000 Author: rmacklem Date: Sun Aug 1 02:11:12 2010 New Revision: 210711 URL: http://svn.freebsd.org/changeset/base/210711 Log: MFC: r210034 For the experimental NFSv4 client, make sure that attributes that predate the issue of a delegation are not cached once the delegation is held. This is necessary, since cached attributes remain valid while the delegation is held. Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Sun Aug 1 01:39:06 2010 (r210710) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Sun Aug 1 02:11:12 2010 (r210711) @@ -270,6 +270,14 @@ else printf(" fhl=0\n"); #else NFSLOCKNODE(np); np->n_flag &= ~NDELEGMOD; + /* + * Invalidate the attribute cache, so that + * attributes that pre-date the issue of a + * delegation are not cached, since the + * cached attributes will remain valid while + * the delegation is held. + */ + NFSINVALATTRCACHE(np); NFSUNLOCKNODE(np); #endif (void) nfscl_deleg(nmp->nm_mountp, @@ -1731,6 +1739,12 @@ nfsrpc_create(vnode_t dvp, char *name, i error = nfsrpc_createv4(dvp, name, namelen, vap, cverf, fmode, owp, &dp, cred, p, dnap, nnap, nfhpp, attrflagp, dattrflagp, dstuff, &unlocked); + /* + * There is no need to invalidate cached attributes here, + * since new post-delegation issue attributes are always + * returned by nfsrpc_createv4() and these will update the + * attribute cache. + */ if (dp != NULL) (void) nfscl_deleg(nmp->nm_mountp, owp->nfsow_clp, (*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, &dp); From owner-svn-src-stable-8@FreeBSD.ORG Sun Aug 1 08:47:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08AFB106566B; Sun, 1 Aug 2010 08:47:34 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D132D8FC0C; Sun, 1 Aug 2010 08:47:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o718lXtH049016; Sun, 1 Aug 2010 08:47:33 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o718lXXk049014; Sun, 1 Aug 2010 08:47:33 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201008010847.o718lXXk049014@svn.freebsd.org> From: Martin Matuska Date: Sun, 1 Aug 2010 08:47:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210715 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 08:47:34 -0000 Author: mm Date: Sun Aug 1 08:47:33 2010 New Revision: 210715 URL: http://svn.freebsd.org/changeset/base/210715 Log: MFC r210457: Consider snapshots as descendants via zfs allow -d OpenSolaris onnv changeset: 9847:2f3ba86e857a Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6809340) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c Sun Aug 1 08:06:59 2010 (r210714) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c Sun Aug 1 08:47:33 2010 (r210715) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -66,8 +66,6 @@ * The ZAP OBJ is referred to as the jump object. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -540,7 +538,7 @@ dsl_deleg_access(const char *dsname, con dsl_pool_t *dp; void *cookie; int error; - char checkflag = ZFS_DELEG_LOCAL; + char checkflag; objset_t *mos; avl_tree_t permsets; perm_set_t *setnode; @@ -563,6 +561,16 @@ dsl_deleg_access(const char *dsname, con return (EPERM); } + if (dsl_dataset_is_snapshot(ds)) { + /* + * Snapshots are treated as descendents only, + * local permissions do not apply. + */ + checkflag = ZFS_DELEG_DESCENDENT; + } else { + checkflag = ZFS_DELEG_LOCAL; + } + avl_create(&permsets, perm_set_compare, sizeof (perm_set_t), offsetof(perm_set_t, p_node)); From owner-svn-src-stable-8@FreeBSD.ORG Sun Aug 1 09:08:34 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01110106566B; Sun, 1 Aug 2010 09:08:34 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2EC78FC18; Sun, 1 Aug 2010 09:08:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7198Xn7053784; Sun, 1 Aug 2010 09:08:33 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7198XH0053776; Sun, 1 Aug 2010 09:08:33 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201008010908.o7198XH0053776@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 1 Aug 2010 09:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210719 - stable/8/share/zoneinfo X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 09:08:34 -0000 Author: edwin Date: Sun Aug 1 09:08:33 2010 New Revision: 210719 URL: http://svn.freebsd.org/changeset/base/210719 Log: MFC of 210718, tzdata2010k: - Daylight Saving Time will not be used in Egypt during Ramadan. - Proper names for Pacific/Pohnpei and Pacific/Chuuk - Fix historical information for Finland for 1981 and 1982 - No leap-second for December 2010. - Fix historical information for Ontario (Canada) Modified: stable/8/share/zoneinfo/africa stable/8/share/zoneinfo/australasia stable/8/share/zoneinfo/backward stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/leapseconds stable/8/share/zoneinfo/northamerica stable/8/share/zoneinfo/zone.tab Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/africa ============================================================================== --- stable/8/share/zoneinfo/africa Sun Aug 1 09:03:10 2010 (r210718) +++ stable/8/share/zoneinfo/africa Sun Aug 1 09:08:33 2010 (r210719) @@ -1,5 +1,5 @@ #
-# @(#)africa	8.26
+# @(#)africa	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -294,8 +294,25 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s
 # and can be found by searching for "winter" in their search engine
 # (at least today).
 
+# From Alexander Krivenyshev (2010-07-20):
+# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# decided that Daylight Saving Time will not be used in Egypt during
+# Ramadan.
+#
+# Arabic translation:
+# "Clocks to go back during Ramadan--and then forward again"
+# 
+# http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
+# 
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
+Rule	Egypt	2010	only	-	Aug	10	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	9	0:00s	1:00	S
 Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/8/share/zoneinfo/australasia
==============================================================================
--- stable/8/share/zoneinfo/australasia	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/australasia	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.17
+# @(#)australasia	8.18
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -346,10 +346,10 @@ Zone Pacific/Kwajalein	11:09:20 -	LMT	19
 
 # Micronesia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Pacific/Truk	10:07:08 -	LMT	1901
-			10:00	-	TRUT			# Truk Time
-Zone Pacific/Ponape	10:32:52 -	LMT	1901		# Kolonia
-			11:00	-	PONT			# Ponape Time
+Zone Pacific/Chuuk	10:07:08 -	LMT	1901
+			10:00	-	CHUT			# Chuuk Time
+Zone Pacific/Pohnpei	10:32:52 -	LMT	1901		# Kolonia
+			11:00	-	PONT			# Pohnpei Time
 Zone Pacific/Kosrae	10:51:56 -	LMT	1901
 			11:00	-	KOST	1969 Oct	# Kosrae Time
 			12:00	-	KOST	1999

Modified: stable/8/share/zoneinfo/backward
==============================================================================
--- stable/8/share/zoneinfo/backward	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/backward	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.8
+# @(#)backward	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -90,7 +90,9 @@ Link	Pacific/Chatham		NZ-CHAT
 Link	America/Denver		Navajo
 Link	Asia/Shanghai		PRC
 Link	Pacific/Pago_Pago	Pacific/Samoa
-Link	Pacific/Truk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Yap
+Link	Pacific/Chuuk		Pacific/Truk
+Link	Pacific/Pohnpei		Pacific/Ponape
 Link	Europe/Warsaw		Poland
 Link	Europe/Lisbon		Portugal
 Link	Asia/Taipei		ROC

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/europe	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.26
+# @(#)europe	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1013,22 +1013,47 @@ Zone	Europe/Tallinn	1:39:00	-	LMT	1880
 			2:00	EU	EE%sT
 
 # Finland
-#
+
 # From Hannu Strang (1994-09-25 06:03:37 UTC):
 # Well, here in Helsinki we're just changing from summer time to regular one,
 # and it's supposed to change at 4am...
+
+# From Janne Snabb (2010-0715):
 #
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger say Finland has switched at 02:00 standard time
-# since 1981.  Go with Strang instead.
+# I noticed that the Finland data is not accurate for years 1981 and 1982.
+# During these two first trial years the DST adjustment was made one hour
+# earlier than in forthcoming years. Starting 1983 the adjustment was made
+# according to the central European standards.
+#
+# This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac
+# Office of University of Helsinki, ISBN 952-10-3221-9, available online (in
+# Finnish) at
+#
+# 
+# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
+# 
 #
+# Page 105 (56 in PDF version) has a handy table of all past daylight savings
+# transitions. It is easy enough to interpret without Finnish skills.
+#
+# This is also confirmed by Finnish Broadcasting Company's archive at:
+#
+# 
+# http://www.yle.fi/elavaarkisto/?s=s&g=1&ag=5&t=&a=3401
+# 
+#
+# The news clip from 1981 says that "the time between 2 and 3 o'clock does not
+# exist tonight."
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Finland	1942	only	-	Apr	3	0:00	1:00	S
 Rule	Finland	1942	only	-	Oct	3	0:00	0	-
+Rule	Finland	1981	1982	-	Mar	lastSun	2:00	1:00	S
+Rule	Finland	1981	1982	-	Sep	lastSun	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Helsinki	1:39:52 -	LMT	1878 May 31
 			1:39:52	-	HMT	1921 May    # Helsinki Mean Time
-			2:00	Finland	EE%sT	1981 Mar 29 2:00
+			2:00	Finland	EE%sT	1983
 			2:00	EU	EE%sT
 
 # Aaland Is

Modified: stable/8/share/zoneinfo/leapseconds
==============================================================================
--- stable/8/share/zoneinfo/leapseconds	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/leapseconds	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)leapseconds	8.9
+# @(#)leapseconds	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -60,9 +60,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 # FAX       : 33 (0) 1 40 51 22 91
 # Internet  : services.iers@obspm.fr
 #
-# Paris, 4 July 2009
+# Paris, 14 July 2010
 #
-# Bulletin C 38
+# Bulletin C 40
 #
 # To authorities responsible
 # for the measurement and
@@ -70,9 +70,9 @@ Leap	2008	Dec	31	23:59:60	+	S
 #
 # INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of December 2009.
+# NO positive leap second will be introduced at the end of December 2010.
 # The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :		
+# International Atomic Time TAI is :
 #
 # from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
@@ -82,6 +82,6 @@ Leap	2008	Dec	31	23:59:60	+	S
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Director			
+# Director
 # Earth Orientation Center of IERS
 # Observatoire de Paris, France

Modified: stable/8/share/zoneinfo/northamerica
==============================================================================
--- stable/8/share/zoneinfo/northamerica	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/northamerica	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.31
+# @(#)northamerica	8.34
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1324,6 +1324,83 @@ Zone America/Montreal	-4:54:16 -	LMT	188
 # entry since our cutoff date of 1970, so we can move
 # America/Coral_Harbour to the 'backward' file.
 
+# From Mark Brader (2010-03-06):
+#
+# Currently the database has:
+#
+# # Ontario
+#
+# # From Paul Eggert (2006-07-09):
+# # Shanks & Pottenger write that since 1970 most of Ontario has been like
+# # Toronto.
+# # Thunder Bay skipped DST in 1973.
+# # Many smaller locales did not observe peacetime DST until 1974;
+# # Nipigon (EST) and Rainy River (CST) are the largest that we know of.
+#
+# In the (Toronto) Globe and Mail for Saturday, 1955-09-24, in the bottom
+# right corner of page 1, it says that Toronto will return to standard
+# time at 2 am Sunday morning (which agrees with the database), and that:
+#
+#     The one-hour setback will go into effect throughout most of Ontario,
+#     except in areas like Windsor which remains on standard time all year.
+#
+# Windsor is, of course, a lot larger than Nipigon.
+#
+# I only came across this incidentally.  I don't know if Windsor began
+# observing DST when Detroit did, or in 1974, or on some other date.
+#
+# By the way, the article continues by noting that:
+#
+#     Some cities in the United States have pushed the deadline back
+#     three weeks and will change over from daylight saving in October.
+
+# From Arthur David Olson (2010-07-17):
+#
+# "Standard Time and Time Zones in Canada" appeared in
+# The Journal of The Royal Astronomical Society of Canada,
+# volume 26, number 2 (February 1932) and, as of 2010-07-17,
+# was available at
+# 
+# http://adsabs.harvard.edu/full/1932JRASC..26...49S
+# 
+#
+# It includes the text below (starting on page 57):
+#
+#   A list of the places in Canada using daylight saving time would
+# require yearly revision. From information kindly furnished by
+# the provincial governments and by the postmasters in many cities
+# and towns, it is found that the following places used daylight sav-
+# ing in 1930. The information for the province of Quebec is definite,
+# for the other provinces only approximate:
+#
+# 	Province	Daylight saving time used
+# Prince Edward Island	Not used.
+# Nova Scotia		In Halifax only.
+# New Brunswick		In St. John only.
+# Quebec		In the following places:
+# 			Montreal	Lachine
+# 			Quebec		Mont-Royal
+# 			Levis		Iberville
+# 			St. Lambert	Cap de la Madeleine
+# 			Verdun		Loretteville
+# 			Westmount	Richmond
+# 			Outremont	St. Jerome
+# 			Longueuil	Greenfield Park
+# 			Arvida		Waterloo
+# 			Chambly-Canton	Beaulieu
+# 			Melbourne	La Tuque
+# 			St. Theophile	Buckingham
+# Ontario		Used generally in the cities and towns along
+# 			the southerly part of the province. Not
+# 			used in the northwesterlhy part.
+# Manitoba		Not used.
+# Saskatchewan		In Regina only.
+# Alberta		Not used.
+# British Columbia	Not used.
+#
+#   With some exceptions, the use of daylight saving may be said to be limited
+# to those cities and towns lying between Quebec city and Windsor, Ont.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Toronto	1919	only	-	Mar	30	23:30	1:00	D
 Rule	Toronto	1919	only	-	Oct	26	0:00	0	S
@@ -2147,7 +2224,7 @@ Zone America/Bahia_Banderas	-7:01:00 -	L
 			-6:00	-	CST	1942 Apr 24
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
-			-7:00	Mexico	M%sT	2010 Apr 4
+			-7:00	Mexico	M%sT	2010 Apr 4 2:00
 			-6:00	Mexico	C%sT
 
 # Baja California (near US border)

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Sun Aug  1 09:03:10 2010	(r210718)
+++ stable/8/share/zoneinfo/zone.tab	Sun Aug  1 09:08:33 2010	(r210719)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.36
+# @(#)zone.tab	8.37
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -177,8 +177,8 @@ ET	+0902+03842	Africa/Addis_Ababa
 FI	+6010+02458	Europe/Helsinki
 FJ	-1808+17825	Pacific/Fiji
 FK	-5142-05751	Atlantic/Stanley
-FM	+0725+15147	Pacific/Truk	Truk (Chuuk) and Yap
-FM	+0658+15813	Pacific/Ponape	Ponape (Pohnpei)
+FM	+0725+15147	Pacific/Chuuk	Chuuk (Truk) and Yap
+FM	+0658+15813	Pacific/Pohnpei	Pohnpei (Ponape)
 FM	+0519+16259	Pacific/Kosrae	Kosrae
 FO	+6201-00646	Atlantic/Faroe
 FR	+4852+00220	Europe/Paris

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Aug  1 11:06:14 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1CC82106564A;
	Sun,  1 Aug 2010 11:06:14 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0B13E8FC12;
	Sun,  1 Aug 2010 11:06:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71B6D1o082927;
	Sun, 1 Aug 2010 11:06:13 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71B6DFE082925;
	Sun, 1 Aug 2010 11:06:13 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008011106.o71B6DFE082925@svn.freebsd.org>
From: Benedict Reuschling 
Date: Sun, 1 Aug 2010 11:06:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210726 - stable/8/sbin/geom/class/part
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 01 Aug 2010 11:06:14 -0000

Author: bcr (doc committer)
Date: Sun Aug  1 11:06:13 2010
New Revision: 210726
URL: http://svn.freebsd.org/changeset/base/210726

Log:
  MFC r210544:
  
  Small typo fix: s/ommited/omitted
  
  PR:             docs/148977
  Submitted by:   Warren Block (wblock at wonkity dot com)

Modified:
  stable/8/sbin/geom/class/part/gpart.8
Directory Properties:
  stable/8/sbin/geom/class/part/   (props changed)

Modified: stable/8/sbin/geom/class/part/gpart.8
==============================================================================
--- stable/8/sbin/geom/class/part/gpart.8	Sun Aug  1 10:38:19 2010	(r210725)
+++ stable/8/sbin/geom/class/part/gpart.8	Sun Aug  1 11:06:13 2010	(r210726)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 23, 2010
+.Dd July 27, 2010
 .Dt GPART 8
 .Os
 .Sh NAME
@@ -363,7 +363,7 @@ numbers and can be given by the 
 option.
 If
 .Fl s
-option is ommited then new size is automatically calculated
+option is omitted then new size is automatically calculated
 to maximum available from given geom
 .Ar geom .
 .Pp

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Aug  1 11:09:15 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B3B4106566B;
	Sun,  1 Aug 2010 11:09:15 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3964B8FC08;
	Sun,  1 Aug 2010 11:09:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71B9F0R083621;
	Sun, 1 Aug 2010 11:09:15 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71B9FM8083619;
	Sun, 1 Aug 2010 11:09:15 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008011109.o71B9FM8083619@svn.freebsd.org>
From: Benedict Reuschling 
Date: Sun, 1 Aug 2010 11:09:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210727 - stable/8/bin/setfacl
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 01 Aug 2010 11:09:15 -0000

Author: bcr (doc committer)
Date: Sun Aug  1 11:09:14 2010
New Revision: 210727
URL: http://svn.freebsd.org/changeset/base/210727

Log:
  MFC r210546:
  
  Typo fix: s/ommited/omitted

Modified:
  stable/8/bin/setfacl/setfacl.1
Directory Properties:
  stable/8/bin/setfacl/   (props changed)

Modified: stable/8/bin/setfacl/setfacl.1
==============================================================================
--- stable/8/bin/setfacl/setfacl.1	Sun Aug  1 11:06:13 2010	(r210726)
+++ stable/8/bin/setfacl/setfacl.1	Sun Aug  1 11:09:14 2010	(r210727)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 13, 2010
+.Dd July 27, 2010
 .Dt SETFACL 1
 .Os
 .Sh NAME
@@ -299,7 +299,7 @@ one of 
 .Dq Li group@ ,
 or
 .Dq Li everyone@ ,
-this field is ommited altogether, including the trailing comma.
+this field is omitted altogether, including the trailing comma.
 .It Ar "access permissions"
 Access permissions may be specified in either short or long form.
 Short and long forms may not be mixed.

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Aug  1 11:12:42 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E364D106566B;
	Sun,  1 Aug 2010 11:12:42 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D1B968FC17;
	Sun,  1 Aug 2010 11:12: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 o71BCgg6084476;
	Sun, 1 Aug 2010 11:12:42 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71BCgJH084474;
	Sun, 1 Aug 2010 11:12:42 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008011112.o71BCgJH084474@svn.freebsd.org>
From: Benedict Reuschling 
Date: Sun, 1 Aug 2010 11:12:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210728 - stable/8/share/examples/etc
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 01 Aug 2010 11:12:43 -0000

Author: bcr (doc committer)
Date: Sun Aug  1 11:12:42 2010
New Revision: 210728
URL: http://svn.freebsd.org/changeset/base/210728

Log:
  MFC r210482:
  
  Add an example to encourage people to have a look at either
  make(1) or /usr/ports/ports-mgmt/portconf for port-specific
  variables/options to compile a port.
  
  PR:                 docs/145655
  Submitted by:       Armin Pirkovitsch (armin at frozen dash zone dot org)
  Discussed with:     dougb

Modified:
  stable/8/share/examples/etc/make.conf
Directory Properties:
  stable/8/share/examples/etc/   (props changed)

Modified: stable/8/share/examples/etc/make.conf
==============================================================================
--- stable/8/share/examples/etc/make.conf	Sun Aug  1 11:09:14 2010	(r210727)
+++ stable/8/share/examples/etc/make.conf	Sun Aug  1 11:12:42 2010	(r210728)
@@ -270,3 +270,14 @@
 # /etc/mail/Makefile.  Defaults to 0640.
 #
 #SENDMAIL_MAP_PERMS=
+#
+#
+# It is also possible to set variables in make.conf which will only be
+# used when compiling a specific port.  For more details see make(1).
+#
+#.if ${.CURDIR:M*/irc/irssi-devel*}
+#WITH_DEBUG=YES
+#.endif
+#
+# Another approach is to use /usr/ports/ports-mgmt/portconf which has
+# its own config file for port specific options.

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Aug  1 12:05:27 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E57831065680;
	Sun,  1 Aug 2010 12:05:27 +0000 (UTC)
	(envelope-from bschmidt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D345D8FC18;
	Sun,  1 Aug 2010 12:05:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71C5Rkc096013;
	Sun, 1 Aug 2010 12:05:27 GMT (envelope-from bschmidt@svn.freebsd.org)
Received: (from bschmidt@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71C5RsW096011;
	Sun, 1 Aug 2010 12:05:27 GMT (envelope-from bschmidt@svn.freebsd.org)
Message-Id: <201008011205.o71C5RsW096011@svn.freebsd.org>
From: Bernhard Schmidt 
Date: Sun, 1 Aug 2010 12:05:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210729 - stable/8/sys/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 01 Aug 2010 12:05:28 -0000

Author: bschmidt
Date: Sun Aug  1 12:05:27 2010
New Revision: 210729
URL: http://svn.freebsd.org/changeset/base/210729

Log:
  MFC r206426:
  Building wlan_amrr is now mandatory.

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

Modified: stable/8/sys/conf/files
==============================================================================
--- stable/8/sys/conf/files	Sun Aug  1 11:12:42 2010	(r210728)
+++ stable/8/sys/conf/files	Sun Aug  1 12:05:27 2010	(r210729)
@@ -2367,7 +2367,7 @@ net80211/ieee80211_action.c	optional wla
 net80211/ieee80211_ageq.c	optional wlan
 net80211/ieee80211_adhoc.c	optional wlan
 net80211/ieee80211_ageq.c	optional wlan
-net80211/ieee80211_amrr.c	optional wlan wlan_amrr
+net80211/ieee80211_amrr.c	optional wlan | wlan_amrr
 net80211/ieee80211_crypto.c	optional wlan
 net80211/ieee80211_crypto_ccmp.c optional wlan wlan_ccmp
 net80211/ieee80211_crypto_none.c optional wlan

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Aug  1 14:14:49 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0EEB81065678;
	Sun,  1 Aug 2010 14:14:49 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F04118FC13;
	Sun,  1 Aug 2010 14:14:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71EEmOb024429;
	Sun, 1 Aug 2010 14:14:48 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71EEmus024426;
	Sun, 1 Aug 2010 14:14:48 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201008011414.o71EEmus024426@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sun, 1 Aug 2010 14:14:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210732 - in stable/8: bin/sh
	tools/regression/bin/sh/parser
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 01 Aug 2010 14:14:49 -0000

Author: jilles
Date: Sun Aug  1 14:14:48 2010
New Revision: 210732
URL: http://svn.freebsd.org/changeset/base/210732

Log:
  MFC r210221: sh: Allow a bg command consisting solely of redirections.
  
  Example:
    
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D1BD2106566C;
	Sun,  1 Aug 2010 15:34:29 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BF7D18FC0A;
	Sun,  1 Aug 2010 15:34:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71FYTIL041945;
	Sun, 1 Aug 2010 15:34:29 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71FYTuT041943;
	Sun, 1 Aug 2010 15:34:29 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008011534.o71FYTuT041943@svn.freebsd.org>
From: Rick Macklem 
Date: Sun, 1 Aug 2010 15:34:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210733 - stable/8/sys/fs/nfsserver
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 01 Aug 2010 15:34:29 -0000

Author: rmacklem
Date: Sun Aug  1 15:34:29 2010
New Revision: 210733
URL: http://svn.freebsd.org/changeset/base/210733

Log:
  MFC: r210102
  This patch fixes a bug in the experimental NFSv4 server where it
  released a reference count on nfsv4rootfs_lock erroneously when
  administrative revocation of state was done.

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

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 14:14:48 2010	(r210732)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 15:34:29 2010	(r210733)
@@ -542,7 +542,6 @@ nfsrv_adminrevoke(struct nfsd_clid *revo
 	 * file.
 	 */
 	NFSLOCKV4ROOTMUTEX();
-	nfsv4_relref(&nfsv4rootfs_lock);
 	do {
 		igotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL,
 		    NFSV4ROOTLOCKMUTEXPTR);

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Aug  1 15:55:50 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 23C491065677;
	Sun,  1 Aug 2010 15:55:50 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 07ED28FC17;
	Sun,  1 Aug 2010 15:55:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71Ftnxd046658;
	Sun, 1 Aug 2010 15:55:49 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71FtnAQ046656;
	Sun, 1 Aug 2010 15:55:49 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008011555.o71FtnAQ046656@svn.freebsd.org>
From: Rick Macklem 
Date: Sun, 1 Aug 2010 15:55:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210735 - stable/8/sys/fs/nfsserver
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 01 Aug 2010 15:55:50 -0000

Author: rmacklem
Date: Sun Aug  1 15:55:49 2010
New Revision: 210735
URL: http://svn.freebsd.org/changeset/base/210735

Log:
  MFC: r210154
  Delete comments related to soft clock interrupts that don't apply
  to the FreeBSD port of the experimental NFSv4 server.

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

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 15:41:00 2010	(r210734)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 15:55:49 2010	(r210735)
@@ -1015,7 +1015,6 @@ nfsrv_freedeleg(struct nfsstate *stp)
 
 /*
  * This function frees an open owner and all associated opens.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p)
@@ -1161,7 +1160,6 @@ nfsrv_freeallnfslocks(struct nfsstate *s
 
 /*
  * Free an nfslock structure.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_freenfslock(struct nfslock *lop)
@@ -1178,7 +1176,6 @@ nfsrv_freenfslock(struct nfslock *lop)
 
 /*
  * This function frees an nfslockfile structure.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_freenfslockfile(struct nfslockfile *lfp)
@@ -1358,11 +1355,6 @@ tryagain:
 		}
 	}
 
-	/*
-	 * Since the code is manipulating lists that are also
-	 * manipulated by nfsrv_servertimer(), soft clock interrupts
-	 * must be masked off.
-	 */
 	if (specialid == 0) {
 	    if (new_stp->ls_flags & NFSLCK_TEST) {
 		/*
@@ -1971,9 +1963,6 @@ tryagain:
 	NFSLOCKSTATE();
 	/*
 	 * Get the nfsclient structure.
-	 * Since the code is manipulating lists that are also
-	 * manipulated by nfsrv_servertimer(), soft clock interrupts
-	 * must be masked off.
 	 */
 	error = nfsrv_getclient(clientid, CLOPS_RENEW, &clp,
 	    (nfsquad_t)((u_quad_t)0), NULL, p);
@@ -3176,7 +3165,6 @@ nfsrv_getlockfile(u_short flags, struct 
  * This function adds a nfslock lock structure to the list for the associated
  * nfsstate and nfslockfile structures. It will be inserted after the
  * entry pointed at by insert_lop.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop,
@@ -3228,7 +3216,6 @@ nfsrv_insertlock(struct nfslock *new_lop
  * are NFSLCK_READ or NFSLCK_WRITE and non-overlapping (aka POSIX style).
  * It always adds new_lop to the list and sometimes uses the one pointed
  * at by other_lopp.
- * Must be called with soft clock interrupts disabled.
  */
 static void
 nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp,

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Aug  1 23:36:39 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95FDE1065673;
	Sun,  1 Aug 2010 23:36:39 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A51B8FC1C;
	Sun,  1 Aug 2010 23:36:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71Nadv2047726;
	Sun, 1 Aug 2010 23:36:39 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71NadvJ047724;
	Sun, 1 Aug 2010 23:36:39 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008012336.o71NadvJ047724@svn.freebsd.org>
From: Rick Macklem 
Date: Sun, 1 Aug 2010 23:36:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210739 - stable/8/sys/fs/nfsserver
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 01 Aug 2010 23:36:39 -0000

Author: rmacklem
Date: Sun Aug  1 23:36:39 2010
New Revision: 210739
URL: http://svn.freebsd.org/changeset/base/210739

Log:
  MFC: r210178
  Patch the experimental NFSv4 server so that it acquires a reference
  count on nfsv4rootfs_lock when dumping state, since these functions
  are not called by nfsd threads. Without this reference count, it
  is possible for an nfsd thread to acquire an exclusive lock on
  nfsv4rootfs_lock while the dump is in progress and then change the
  lists, potentially causing a crash.

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

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 22:39:07 2010	(r210738)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c	Sun Aug  1 23:36:39 2010	(r210739)
@@ -600,6 +600,13 @@ nfsrv_dumpclients(struct nfsd_dumpclient
 	struct nfsclient *clp;
 	int i = 0, cnt = 0;
 
+	/*
+	 * First, get a reference on the nfsv4rootfs_lock so that an
+	 * exclusive lock cannot be acquired while dumping the clients.
+	 */
+	NFSLOCKV4ROOTMUTEX();
+	nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR);
+	NFSUNLOCKV4ROOTMUTEX();
 	NFSLOCKSTATE();
 	/*
 	 * Rattle through the client lists until done.
@@ -616,6 +623,9 @@ nfsrv_dumpclients(struct nfsd_dumpclient
 	if (cnt < maxcnt)
 	    dumpp[cnt].ndcl_clid.nclid_idlen = 0;
 	NFSUNLOCKSTATE();
+	NFSLOCKV4ROOTMUTEX();
+	nfsv4_relref(&nfsv4rootfs_lock);
+	NFSUNLOCKV4ROOTMUTEX();
 }
 
 /*
@@ -691,12 +701,22 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_
 	fhandle_t nfh;
 
 	ret = nfsrv_getlockfh(vp, 0, NULL, &nfh, p);
+	/*
+	 * First, get a reference on the nfsv4rootfs_lock so that an
+	 * exclusive lock on it cannot be acquired while dumping the locks.
+	 */
+	NFSLOCKV4ROOTMUTEX();
+	nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR);
+	NFSUNLOCKV4ROOTMUTEX();
 	NFSLOCKSTATE();
 	if (!ret)
 		ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh, 0);
 	if (ret) {
 		ldumpp[0].ndlck_clid.nclid_idlen = 0;
 		NFSUNLOCKSTATE();
+		NFSLOCKV4ROOTMUTEX();
+		nfsv4_relref(&nfsv4rootfs_lock);
+		NFSUNLOCKV4ROOTMUTEX();
 		return;
 	}
 
@@ -797,6 +817,9 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_
 	if (cnt < maxcnt)
 		ldumpp[cnt].ndlck_clid.nclid_idlen = 0;
 	NFSUNLOCKSTATE();
+	NFSLOCKV4ROOTMUTEX();
+	nfsv4_relref(&nfsv4rootfs_lock);
+	NFSUNLOCKV4ROOTMUTEX();
 }
 
 /*

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Aug  1 23:58:27 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 25284106566B;
	Sun,  1 Aug 2010 23:58:27 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 13CD08FC12;
	Sun,  1 Aug 2010 23:58:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o71NwQ2C052449;
	Sun, 1 Aug 2010 23:58:26 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o71NwQFL052445;
	Sun, 1 Aug 2010 23:58:26 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008012358.o71NwQFL052445@svn.freebsd.org>
From: Rick Macklem 
Date: Sun, 1 Aug 2010 23:58:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210740 - in stable/8/sys/fs: nfs nfsclient
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 01 Aug 2010 23:58:27 -0000

Author: rmacklem
Date: Sun Aug  1 23:58:26 2010
New Revision: 210740
URL: http://svn.freebsd.org/changeset/base/210740

Log:
  MFC: r210201
  Change the nfscl_mustflush() function in the experimental NFSv4
  client to return a boolean_t in order to make it more compatible
  with style(9).

Modified:
  stable/8/sys/fs/nfs/nfs_var.h
  stable/8/sys/fs/nfsclient/nfs_clstate.c
  stable/8/sys/fs/nfsclient/nfs_clsubs.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfs/nfs_var.h
==============================================================================
--- stable/8/sys/fs/nfs/nfs_var.h	Sun Aug  1 23:36:39 2010	(r210739)
+++ stable/8/sys/fs/nfs/nfs_var.h	Sun Aug  1 23:58:26 2010	(r210740)
@@ -469,7 +469,7 @@ void nfscl_docb(struct nfsrv_descript *,
 void nfscl_releasealllocks(struct nfsclclient *, vnode_t, NFSPROC_T *);
 int nfscl_lockt(vnode_t, struct nfsclclient *, u_int64_t,
     u_int64_t, struct flock *, NFSPROC_T *);
-int nfscl_mustflush(vnode_t);
+boolean_t nfscl_mustflush(vnode_t);
 int nfscl_nodeleg(vnode_t, int);
 int nfscl_removedeleg(vnode_t, NFSPROC_T *, nfsv4stateid_t *);
 int nfscl_getref(struct nfsmount *);

Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clstate.c	Sun Aug  1 23:36:39 2010	(r210739)
+++ stable/8/sys/fs/nfsclient/nfs_clstate.c	Sun Aug  1 23:58:26 2010	(r210740)
@@ -3735,7 +3735,7 @@ nfscl_tryclose(struct nfsclopen *op, str
  * to the server. This might be a big performance win in some environments.
  * (Not useful until the client does caching on local stable storage.)
  */
-APPLESTATIC int
+APPLESTATIC boolean_t
 nfscl_mustflush(vnode_t vp)
 {
 	struct nfsclclient *clp;
@@ -3746,12 +3746,12 @@ nfscl_mustflush(vnode_t vp)
 	np = VTONFS(vp);
 	nmp = VFSTONFS(vnode_mount(vp));
 	if (!NFSHASNFSV4(nmp))
-		return (1);
+		return (TRUE);
 	NFSLOCKCLSTATE();
 	clp = nfscl_findcl(nmp);
 	if (clp == NULL) {
 		NFSUNLOCKCLSTATE();
-		return (1);
+		return (TRUE);
 	}
 	dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len);
 	if (dp != NULL && (dp->nfsdl_flags & (NFSCLDL_WRITE | NFSCLDL_RECALL))
@@ -3759,10 +3759,10 @@ nfscl_mustflush(vnode_t vp)
 	    (dp->nfsdl_sizelimit >= np->n_size ||
 	     !NFSHASSTRICT3530(nmp))) {
 		NFSUNLOCKCLSTATE();
-		return (0);
+		return (FALSE);
 	}
 	NFSUNLOCKCLSTATE();
-	return (1);
+	return (TRUE);
 }
 
 /*

Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clsubs.c	Sun Aug  1 23:36:39 2010	(r210739)
+++ stable/8/sys/fs/nfsclient/nfs_clsubs.c	Sun Aug  1 23:58:26 2010	(r210740)
@@ -188,7 +188,8 @@ ncl_getattrcache(struct vnode *vp, struc
 	struct nfsnode *np;
 	struct vattr *vap;
 	struct nfsmount *nmp;
-	int timeo, mustflush;
+	int timeo;
+	boolean_t mustflush;
 	
 	np = VTONFS(vp);
 	vap = &np->n_vattr.na_vattr;
@@ -230,7 +231,7 @@ ncl_getattrcache(struct vnode *vp, struc
 #endif
 
 	if ((time_second - np->n_attrstamp) >= timeo &&
-	    (mustflush != 0 || np->n_attrstamp == 0)) {
+	    (mustflush || np->n_attrstamp == 0)) {
 		newnfsstats.attrcache_misses++;
 		mtx_unlock(&np->n_mtx);
 #ifdef NFS_ACDEBUG

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 00:37:34 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B6AD1065676;
	Mon,  2 Aug 2010 00:37:34 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3A4D68FC14;
	Mon,  2 Aug 2010 00:37: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 o720bYLY061843;
	Mon, 2 Aug 2010 00:37:34 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o720bYBb061840;
	Mon, 2 Aug 2010 00:37:34 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008020037.o720bYBb061840@svn.freebsd.org>
From: Rick Macklem 
Date: Mon, 2 Aug 2010 00:37:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210741 - stable/8/sys/fs/nfsclient
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 00:37:34 -0000

Author: rmacklem
Date: Mon Aug  2 00:37:33 2010
New Revision: 210741
URL: http://svn.freebsd.org/changeset/base/210741

Log:
  MFC: r210227
  Add a call to nfscl_mustflush() in nfs_close() of the experimental
  NFSv4 client, so that attributes are not acquired from the server
  when a delegation for the file is held. This can reduce the number
  of Getattr Ops significantly.

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

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sun Aug  1 23:58:26 2010	(r210740)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Mon Aug  2 00:37:33 2010	(r210741)
@@ -726,7 +726,7 @@ nfs_close(struct vop_close_args *ap)
 		/*
 		 * Get attributes so "change" is up to date.
 		 */
-		if (!error) {
+		if (error == 0 && nfscl_mustflush(vp)) {
 			ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva,
 			    NULL);
 			if (!ret) {

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 08:35:18 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 24D52106564A;
	Mon,  2 Aug 2010 08:35:17 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EC7D28FC1B;
	Mon,  2 Aug 2010 08:35:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o728ZGb0066918;
	Mon, 2 Aug 2010 08:35:16 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o728ZGVl066914;
	Mon, 2 Aug 2010 08:35:16 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201008020835.o728ZGVl066914@svn.freebsd.org>
From: Xin LI 
Date: Mon, 2 Aug 2010 08:35:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210743 - stable/8/sys/dev/et
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 08:35:18 -0000

Author: delphij
Date: Mon Aug  2 08:35:16 2010
New Revision: 210743
URL: http://svn.freebsd.org/changeset/base/210743

Log:
  MFC r210661:
  
  Change copyright holder to author.  We prefer using a real legal
  entity for copyright holders.
  
  Approved by:	sephe

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

Modified: stable/8/sys/dev/et/if_et.c
==============================================================================
--- stable/8/sys/dev/et/if_et.c	Mon Aug  2 08:31:31 2010	(r210742)
+++ stable/8/sys/dev/et/if_et.c	Mon Aug  2 08:35:16 2010	(r210743)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2007 Sepherosa Ziehau.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 

Modified: stable/8/sys/dev/et/if_etreg.h
==============================================================================
--- stable/8/sys/dev/et/if_etreg.h	Mon Aug  2 08:31:31 2010	(r210742)
+++ stable/8/sys/dev/et/if_etreg.h	Mon Aug  2 08:35:16 2010	(r210743)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2007 Sepherosa Ziehau.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 

Modified: stable/8/sys/dev/et/if_etvar.h
==============================================================================
--- stable/8/sys/dev/et/if_etvar.h	Mon Aug  2 08:31:31 2010	(r210742)
+++ stable/8/sys/dev/et/if_etvar.h	Mon Aug  2 08:35:16 2010	(r210743)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2007 Sepherosa Ziehau.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Sepherosa Ziehau 

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 09:03:32 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 19293106566B;
	Mon,  2 Aug 2010 09:03:32 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E0E688FC1A;
	Mon,  2 Aug 2010 09:03:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7293VRN073069;
	Mon, 2 Aug 2010 09:03:31 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7293VQq073067;
	Mon, 2 Aug 2010 09:03:31 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201008020903.o7293VQq073067@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Mon, 2 Aug 2010 09:03:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210744 - stable/8/sbin/bsdlabel
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 09:03:32 -0000

Author: jh
Date: Mon Aug  2 09:03:31 2010
New Revision: 210744
URL: http://svn.freebsd.org/changeset/base/210744

Log:
  MFC r209614:
  
  - Don't assign the return value from read(2) to a variable of type
    int.
  - Use errx(3) instead of err(3) to print the error message on short
    reads in readlabel(). errno won't be set on short reads which can
    easily occur here due to the fixed size read request.
  
  PR:		144307

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

Modified: stable/8/sbin/bsdlabel/bsdlabel.c
==============================================================================
--- stable/8/sbin/bsdlabel/bsdlabel.c	Mon Aug  2 08:35:16 2010	(r210743)
+++ stable/8/sbin/bsdlabel/bsdlabel.c	Mon Aug  2 09:03:31 2010	(r210744)
@@ -347,7 +347,7 @@ makelabel(const char *type, struct diskl
 static void
 readboot(void)
 {
-	int fd, i;
+	int fd;
 	struct stat st;
 	uint64_t *p;
 
@@ -358,8 +358,7 @@ readboot(void)
 		err(1, "cannot open %s", xxboot);
 	fstat(fd, &st);
 	if (alphacksum && st.st_size <= BBSIZE - 512) {
-		i = read(fd, bootarea + 512, st.st_size);
-		if (i != st.st_size)
+		if (read(fd, bootarea + 512, st.st_size) != st.st_size)
 			err(1, "read error %s", xxboot);
 
 		/*
@@ -372,8 +371,7 @@ readboot(void)
 		p[62] = 0;
 		return;
 	} else if ((!alphacksum) && st.st_size <= BBSIZE) {
-		i = read(fd, bootarea, st.st_size);
-		if (i != st.st_size)
+		if (read(fd, bootarea, st.st_size) != st.st_size)
 			err(1, "read error %s", xxboot);
 		return;
 	}
@@ -479,6 +477,7 @@ get_file_parms(int f)
 static int
 readlabel(int flag)
 {
+	ssize_t nbytes;
 	uint32_t lba;
 	int f, i;
 	int error;
@@ -498,8 +497,11 @@ readlabel(int flag)
 		errx(1,
 		    "disks with more than 2^32-1 sectors are not supported");
 	(void)lseek(f, (off_t)0, SEEK_SET);
-	if (read(f, bootarea, BBSIZE) != BBSIZE)
+	nbytes = read(f, bootarea, BBSIZE);
+	if (nbytes == -1)
 		err(4, "%s read", specname);
+	if (nbytes != BBSIZE)
+		errx(4, "couldn't read %d bytes from %s", BBSIZE, specname);
 	close (f);
 	error = bsd_disklabel_le_dec(
 	    bootarea + (labeloffset + labelsoffset * secsize),

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 09:13:10 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 13CF51065674;
	Mon,  2 Aug 2010 09:13:10 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 01B108FC1B;
	Mon,  2 Aug 2010 09:13:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o729D9CC075210;
	Mon, 2 Aug 2010 09:13:09 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o729D9Ob075208;
	Mon, 2 Aug 2010 09:13:09 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201008020913.o729D9Ob075208@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Mon, 2 Aug 2010 09:13:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210745 - stable/8/lib/libc/stdlib
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 09:13:10 -0000

Author: jh
Date: Mon Aug  2 09:13:09 2010
New Revision: 210745
URL: http://svn.freebsd.org/changeset/base/210745

Log:
  MFC r204636:
  
  In reallocf(3), free the memory only when size != 0. Otherwise, when the
  System V compatibility option (malloc "V" flag) is in effect a zero sized
  reallocf() could cause a double free.
  
  PR:		bin/141753

Modified:
  stable/8/lib/libc/stdlib/reallocf.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/stdlib/reallocf.c
==============================================================================
--- stable/8/lib/libc/stdlib/reallocf.c	Mon Aug  2 09:03:31 2010	(r210744)
+++ stable/8/lib/libc/stdlib/reallocf.c	Mon Aug  2 09:13:09 2010	(r210745)
@@ -35,7 +35,14 @@ reallocf(void *ptr, size_t size)
 	void *nptr;
 
 	nptr = realloc(ptr, size);
-	if (!nptr && ptr)
+
+	/*
+	 * When the System V compatibility option (malloc "V" flag) is
+	 * in effect, realloc(ptr, 0) frees the memory and returns NULL.
+	 * So, to avoid double free, call free() only when size != 0.
+	 * realloc(ptr, 0) can't fail when ptr != NULL.
+	 */
+	if (!nptr && ptr && size != 0)
 		free(ptr);
 	return (nptr);
 }

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 09:17:55 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E48BB106564A;
	Mon,  2 Aug 2010 09:17:54 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from fallbackmx09.syd.optusnet.com.au
	(fallbackmx09.syd.optusnet.com.au [211.29.132.242])
	by mx1.freebsd.org (Postfix) with ESMTP id 78E758FC27;
	Mon,  2 Aug 2010 09:17:53 +0000 (UTC)
Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au
	[211.29.132.187])
	by fallbackmx09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o727H0jY026107; Mon, 2 Aug 2010 17:17:00 +1000
Received: from besplex.bde.org (c122-106-147-41.carlnfd1.nsw.optusnet.com.au
	[122.106.147.41])
	by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o727Gsu4030897
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Mon, 2 Aug 2010 17:16:55 +1000
Date: Mon, 2 Aug 2010 17:16:54 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Rick Macklem 
In-Reply-To: <201008012358.o71NwQFL052445@svn.freebsd.org>
Message-ID: <20100802163746.L800@besplex.bde.org>
References: <201008012358.o71NwQFL052445@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r210740 - in stable/8/sys/fs: nfs nfsclient
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 09:17:55 -0000

On Sun, 1 Aug 2010, Rick Macklem wrote:

> Log:
>  MFC: r210201
>  Change the nfscl_mustflush() function in the experimental NFSv4
>  client to return a boolean_t in order to make it more compatible
>  with style(9).

Er, this makes it less compatible.  style(9) doesn't mention any of
boolean_t, TRUE or FALSE, and it doesn't dream of the C99 
or its true, false, bool, _Bool or __bool_true_and_false_are_defined.
I believe the former are Mach style, which is foreign to BSD style
and was used mainly in the Mach-derived in BSD, especially before I
moved the typedef for boolean_t from a vm header to  in
1995.

In Lite2 kern/*.c, there is a whole 1 use of TRUE and that is for a
vm call; there are 3 uses of FALSE, all for vm calls; there are no
uses of boolean_t although this was wrong for non-prototyped functions
since some vm functions take or return a boolean_t.  E.g., kmem_malloc()
was passed an uncast plain int where a boolean_t is required, so the
behaviour was undefined unless boolean_t was int (which it was and still
is in the kernel) or there was a prototype in scope (which there should
have been by 1993, but the system pretended to support K&R compilers).

In Lite2 vm/*.c, there are 64 uses of TRUE, 80 of FALSE and 85 of
boolean_t (49 more boolean_t's in *.h).  Now the counts are 10%
smaller despite vm being 2.2 times larger.  I guess this is due to
stronger adherence to style rules in Mach.

In Lite2 nfs/*.c, there are 27 uses of TRUE, 41 of FALSE and none of
boolean_t.

So booleans in nfs are nfs(rmacklem) style except for the newfangled
boolean_t (which is now > 10 years out of date with standard type)
but not BSD style :-).

Bruce

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 10:31:39 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CC4D51065674;
	Mon,  2 Aug 2010 10:31:39 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B9FD88FC0C;
	Mon,  2 Aug 2010 10:31:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72AVdx8094114;
	Mon, 2 Aug 2010 10:31:39 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72AVdTI094112;
	Mon, 2 Aug 2010 10:31:39 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021031.o72AVdTI094112@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 10:31:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210748 - stable/8/sbin/geom/class/sched
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 10:31:39 -0000

Author: uqs
Date: Mon Aug  2 10:31:39 2010
New Revision: 210748
URL: http://svn.freebsd.org/changeset/base/210748

Log:
  MFC r209350, r210645: mdoc fixes, HISTORY fixes
  
  - remove stray argument [1]
  - remove stray whitespace
  - use canonical wording for the HISTORY section
  - gsched(8) was first released with FreeBSD 8.1

Modified:
  stable/8/sbin/geom/class/sched/gsched.8   (contents, props changed)

Modified: stable/8/sbin/geom/class/sched/gsched.8
==============================================================================
--- stable/8/sbin/geom/class/sched/gsched.8	Mon Aug  2 10:30:49 2010	(r210747)
+++ stable/8/sbin/geom/class/sched/gsched.8	Mon Aug  2 10:31:39 2010	(r210748)
@@ -94,10 +94,9 @@ on an already existing provider.
 .Pp
 A subsequent 'destroy' will remove the newly created geom and
 hook the provider back to the original geom.
-.Ar algorithm
 .It Cm configure
 Configure existing scheduling provider.  It supports the same options
-as the 
+as the
 .Nm create
 command.
 .It Cm destroy
@@ -157,7 +156,8 @@ geom sched destroy -v ad0.sched.
 .Sh HISTORY
 The
 .Nm
-utility appeared in April 2010.
+utility first appeared in
+.Fx 8.1 .
 .Sh AUTHORS
 .An Fabio Checconi Aq fabio@FreeBSD.org
 .An Luigi Rizzo Aq luigi@FreeBSD.org

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 11:48:06 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F07FC1065678;
	Mon,  2 Aug 2010 11:48:06 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DDA3F8FC14;
	Mon,  2 Aug 2010 11:48:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72Bm6rG012628;
	Mon, 2 Aug 2010 11:48:06 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72Bm5Gh012596;
	Mon, 2 Aug 2010 11:48:05 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008021148.o72Bm5Gh012596@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Mon, 2 Aug 2010 11:48:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210751 - in stable: 7/games/fortune/datfiles
	8/games/fortune/datfiles
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 11:48:07 -0000

Author: uqs
Date: Mon Aug  2 11:48:05 2010
New Revision: 210751
URL: http://svn.freebsd.org/changeset/base/210751

Log:
  MFC r210662: Fix indention of attribution line for some recent additions.

Modified:
  stable/8/games/fortune/datfiles/fortunes
Directory Properties:
  stable/8/games/fortune/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/7/games/fortune/datfiles/fortunes
Directory Properties:
  stable/7/games/fortune/   (props changed)

Modified: stable/8/games/fortune/datfiles/fortunes
==============================================================================
--- stable/8/games/fortune/datfiles/fortunes	Mon Aug  2 10:59:23 2010	(r210750)
+++ stable/8/games/fortune/datfiles/fortunes	Mon Aug  2 11:48:05 2010	(r210751)
@@ -2110,7 +2110,7 @@ self-propagating.
 	He who receives ideas from me, receives instruction himself without
 lessening mine; as he who lights his taper at mine receives light
 without darkening me.
-	-- Thomas Jefferson on patents on ideas
+		-- Thomas Jefferson on patents on ideas
 %
 	"Heard you were moving your piano, so I came over to help."
 	"Thanks.  Got it upstairs already."
@@ -57546,11 +57546,11 @@ LII:
 		-- Norman Augustine
 %
 XML is a giant step in no direction at all.
-	-- Erik Naggum
+		-- Erik Naggum
 %
 XML is like violence: if it doesn't solve your problem, you aren't using
 enough of it.
-	-- XML guru Chris Maden
+		-- XML guru Chris Maden
 %
 X-rated movies are all alike -- the only thing
 they leave to the imagination is the plot.

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 15:55:00 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 336501065672;
	Mon,  2 Aug 2010 15:55:00 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 207898FC14;
	Mon,  2 Aug 2010 15:55:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72Ft0qQ067509;
	Mon, 2 Aug 2010 15:55:00 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72Ft0mU067507;
	Mon, 2 Aug 2010 15:55:00 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008021555.o72Ft0mU067507@svn.freebsd.org>
From: Benedict Reuschling 
Date: Mon, 2 Aug 2010 15:55:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210771 - stable/8/contrib/netcat
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 15:55:00 -0000

Author: bcr (doc committer)
Date: Mon Aug  2 15:54:59 2010
New Revision: 210771
URL: http://svn.freebsd.org/changeset/base/210771

Log:
  MFC r210511:
  
  Use "printf" instead of "echo -n" in an example because it
  should be more compatible for most shells that are out there.
  
  I contacted Philip Guenther at OpenBSD about this PR and he
  corrected the issue in their tree pretty fast.
  
  PR:                 docs/142243
  Submitted by:       Yasir (yasir27 at mail dot ru)
  Obtained from:      OpenBSD
  Discussed with:     delphij

Modified:
  stable/8/contrib/netcat/nc.1
Directory Properties:
  stable/8/contrib/netcat/   (props changed)

Modified: stable/8/contrib/netcat/nc.1
==============================================================================
--- stable/8/contrib/netcat/nc.1	Mon Aug  2 15:33:16 2010	(r210770)
+++ stable/8/contrib/netcat/nc.1	Mon Aug  2 15:54:59 2010	(r210771)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 15, 2010
+.Dd July 3, 2010
 .Dt NC 1
 .Os
 .Sh NAME
@@ -340,7 +340,7 @@ when it might be necessary to verify wha
 in response to commands issued by the client.
 For example, to retrieve the home page of a web site:
 .Bd -literal -offset indent
-$ echo -n "GET / HTTP/1.0\er\en\er\en" | nc host.example.com 80
+$ printf "GET / HTTP/1.0\er\en\er\en" | nc host.example.com 80
 .Ed
 .Pp
 Note that this also displays the headers sent by the web server.

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 19:56:07 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 566BF1065679;
	Mon,  2 Aug 2010 19:56:07 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 44F1F8FC22;
	Mon,  2 Aug 2010 19:56:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72Ju7re021473;
	Mon, 2 Aug 2010 19:56:07 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72Ju7SK021471;
	Mon, 2 Aug 2010 19:56:07 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201008021956.o72Ju7SK021471@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Mon, 2 Aug 2010 19:56:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210781 - stable/8/sys/dev/e1000
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 19:56:07 -0000

Author: gnn
Date: Mon Aug  2 19:56:07 2010
New Revision: 210781
URL: http://svn.freebsd.org/changeset/base/210781

Log:
  MFC: 210428
  
  Fix a bug in the statistics code for tracking the head and
  tail pointers of the tx and rx queues.   We needed a SYSCTL_PROC
  to correctly get the values at run time.
  
  Submitted by: Andrew Boyer aboyer at averesystems.com

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

Modified: stable/8/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/8/sys/dev/e1000/if_igb.c	Mon Aug  2 18:12:30 2010	(r210780)
+++ stable/8/sys/dev/e1000/if_igb.c	Mon Aug  2 19:56:07 2010	(r210781)
@@ -4817,6 +4817,78 @@ igb_update_stats_counters(struct adapter
 }
 
 
+/** igb_sysctl_tdh_handler - Handler function
+ *  Retrieves the TDH value from the hardware
+ */
+static int 
+igb_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct tx_ring *txr = ((struct tx_ring *)oidp->oid_arg1);
+	if (!txr) return 0;
+
+	unsigned val = E1000_READ_REG(&txr->adapter->hw, E1000_TDH(txr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/** igb_sysctl_tdt_handler - Handler function
+ *  Retrieves the TDT value from the hardware
+ */
+static int 
+igb_sysctl_tdt_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct tx_ring *txr = ((struct tx_ring *)oidp->oid_arg1);
+	if (!txr) return 0;
+
+	unsigned val = E1000_READ_REG(&txr->adapter->hw, E1000_TDT(txr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/** igb_sysctl_rdh_handler - Handler function
+ *  Retrieves the RDH value from the hardware
+ */
+static int 
+igb_sysctl_rdh_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct rx_ring *rxr = ((struct rx_ring *)oidp->oid_arg1);
+	if (!rxr) return 0;
+
+	unsigned val = E1000_READ_REG(&rxr->adapter->hw, E1000_RDH(rxr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
+/** igb_sysctl_rdt_handler - Handler function
+ *  Retrieves the RDT value from the hardware
+ */
+static int 
+igb_sysctl_rdt_handler(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+
+	struct rx_ring *rxr = ((struct rx_ring *)oidp->oid_arg1);
+	if (!rxr) return 0;
+
+	unsigned val = E1000_READ_REG(&rxr->adapter->hw, E1000_RDT(rxr->me));
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	return 0;
+}
+
 /*
  * Add sysctl variables, one per statistic, to the system.
  */
@@ -4882,12 +4954,14 @@ igb_add_hw_stats(struct adapter *adapter
 					    CTLFLAG_RD, NULL, "Queue Name");
 		queue_list = SYSCTL_CHILDREN(queue_node);
 
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_head",
-				CTLFLAG_RD, &txr->tdh, 0,
-				"Transmit Descriptor Head");
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "txd_tail",
-				CTLFLAG_RD, &txr->tdt, 0,
-				"Transmit Descriptor Tail");
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", 
+				CTLFLAG_RD, txr, sizeof(txr),
+				igb_sysctl_tdh_handler, "IU",
+ 				"Transmit Descriptor Head");
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", 
+				CTLFLAG_RD, txr, sizeof(txr),
+				igb_sysctl_tdt_handler, "IU",
+ 				"Transmit Descriptor Tail");
 		SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", 
 				CTLFLAG_RD, &txr->no_desc_avail,
 				"Queue No Descriptor Available");
@@ -4904,11 +4978,13 @@ igb_add_hw_stats(struct adapter *adapter
 					    CTLFLAG_RD, NULL, "Queue Name");
 		queue_list = SYSCTL_CHILDREN(queue_node);
 
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "rxd_head",
-				CTLFLAG_RD, &rxr->rdh, 0,
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", 
+				CTLFLAG_RD, rxr, sizeof(rxr),
+				igb_sysctl_rdh_handler, "IU",
 				"Receive Descriptor Head");
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "rxd_tail",
-				CTLFLAG_RD, &rxr->rdt, 0,
+		SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", 
+				CTLFLAG_RD, rxr, sizeof(rxr),
+				igb_sysctl_rdt_handler, "IU",
 				"Receive Descriptor Tail");
 		SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_packets",
 				CTLFLAG_RD, &rxr->rx_packets,

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Aug  2 23:57:50 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D19C91065672;
	Mon,  2 Aug 2010 23:57:50 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C07558FC12;
	Mon,  2 Aug 2010 23:57:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o72NvoYd075017;
	Mon, 2 Aug 2010 23:57:50 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o72NvogG075015;
	Mon, 2 Aug 2010 23:57:50 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008022357.o72NvogG075015@svn.freebsd.org>
From: Rick Macklem 
Date: Mon, 2 Aug 2010 23:57:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210784 - stable/8/sys/fs/nfs
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 02 Aug 2010 23:57:50 -0000

Author: rmacklem
Date: Mon Aug  2 23:57:50 2010
New Revision: 210784
URL: http://svn.freebsd.org/changeset/base/210784

Log:
  MFC: r210268
  For the experimental NFSv4 server's dumplocks operation, add the
  MPSAFE flag to cn_flags so that it doesn't panic. The panics weren't
  seen since nfsdumpstate(8) is broken for the "-l" case, so this
  was never done. I'll do a separate commit to fix nfsdumpstate(8).

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

Modified: stable/8/sys/fs/nfs/nfs_commonport.c
==============================================================================
--- stable/8/sys/fs/nfs/nfs_commonport.c	Mon Aug  2 22:26:08 2010	(r210783)
+++ stable/8/sys/fs/nfs/nfs_commonport.c	Mon Aug  2 23:57:50 2010	(r210784)
@@ -210,7 +210,8 @@ nfsrv_lookupfilename(struct nameidata *n
 {
 	int error;
 
-	NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, fname, p);
+	NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE, UIO_USERSPACE, fname,
+	    p);
 	error = namei(ndp);
 	if (!error) {
 		NDFREE(ndp, NDF_ONLY_PNBUF);

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Aug  3 03:19:57 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AFB2D106566B;
	Tue,  3 Aug 2010 03:19:57 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9D5168FC17;
	Tue,  3 Aug 2010 03:19:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o733JvTA020156;
	Tue, 3 Aug 2010 03:19:57 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o733JvsJ020155;
	Tue, 3 Aug 2010 03:19:57 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008030319.o733JvsJ020155@svn.freebsd.org>
From: Rick Macklem 
Date: Tue, 3 Aug 2010 03:19:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210787 - stable/8/usr.sbin/nfsdumpstate
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 03 Aug 2010 03:19:57 -0000

Author: rmacklem
Date: Tue Aug  3 03:19:57 2010
New Revision: 210787
URL: http://svn.freebsd.org/changeset/base/210787

Log:
  MFC: r210272
  Fix handling of the "-l" argument for nfsdumpstate(8).

Modified:
  stable/8/usr.sbin/nfsdumpstate/nfsdumpstate.c
Directory Properties:
  stable/8/usr.sbin/nfsdumpstate/   (props changed)

Modified: stable/8/usr.sbin/nfsdumpstate/nfsdumpstate.c
==============================================================================
--- stable/8/usr.sbin/nfsdumpstate/nfsdumpstate.c	Tue Aug  3 01:49:28 2010	(r210786)
+++ stable/8/usr.sbin/nfsdumpstate/nfsdumpstate.c	Tue Aug  3 03:19:57 2010	(r210787)
@@ -76,7 +76,7 @@ main(int argc, char **argv)
 		errx(1, "nfsd not loaded - self terminating");
 	openstate = 0;
 	lockfile = NULL;
-	while ((ch = getopt(argc, argv, "ol")) != -1)
+	while ((ch = getopt(argc, argv, "ol:")) != -1)
 		switch (ch) {
 		case 'o':
 			openstate = 1;

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Aug  3 15:06:31 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8E8B31065672;
	Tue,  3 Aug 2010 15:06:31 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7C6748FC21;
	Tue,  3 Aug 2010 15:06:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73F6VMN079103;
	Tue, 3 Aug 2010 15:06:31 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73F6VCa079101;
	Tue, 3 Aug 2010 15:06:31 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201008031506.o73F6VCa079101@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Tue, 3 Aug 2010 15:06:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210802 - stable/8/sys/dev/e1000
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 03 Aug 2010 15:06:31 -0000

Author: gnn
Date: Tue Aug  3 15:06:31 2010
New Revision: 210802
URL: http://svn.freebsd.org/changeset/base/210802

Log:
  MFC: 209512
  
  Make sure that all the exposed counters and variables are actually
  being updated.
  
  Pointed out by:	jfv

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

Modified: stable/8/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/8/sys/dev/e1000/if_igb.c	Tue Aug  3 15:02:41 2010	(r210801)
+++ stable/8/sys/dev/e1000/if_igb.c	Tue Aug  3 15:06:31 2010	(r210802)
@@ -4814,6 +4814,18 @@ igb_update_stats_counters(struct adapter
 	/* Tx Errors */
 	ifp->if_oerrors = adapter->stats.ecol +
 	    adapter->stats.latecol + adapter->watchdog_events;
+
+	/* Driver specific counters */
+	adapter->device_control = E1000_READ_REG(&adapter->hw, E1000_CTRL);
+	adapter->rx_control = E1000_READ_REG(&adapter->hw, E1000_RCTL);
+	adapter->int_mask = E1000_READ_REG(&adapter->hw, E1000_IMS);
+	adapter->eint_mask = E1000_READ_REG(&adapter->hw, E1000_EIMS);
+	adapter->packet_buf_alloc_tx = ((E1000_READ_REG(&adapter->hw, E1000_PBA)
+					& 0xffff0000) >> 16);
+
+	adapter->packet_buf_alloc_rx = (E1000_READ_REG(&adapter->hw, E1000_PBA) 
+					& 0xffff);
+
 }
 
 
@@ -4971,6 +4983,11 @@ igb_add_hw_stats(struct adapter *adapter
 	}
 
 	for (int i = 0; i < adapter->num_queues; i++, rxr++) {
+		snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
+		queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, 
+					    CTLFLAG_RD, NULL, "Queue Name");
+		queue_list = SYSCTL_CHILDREN(queue_node);
+
 		struct lro_ctrl *lro = &rxr->lro;
 
 		snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Aug  3 16:21:50 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 542F7106566B;
	Tue,  3 Aug 2010 16:21:50 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 272978FC13;
	Tue,  3 Aug 2010 16:21:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GLo9E096495;
	Tue, 3 Aug 2010 16:21:50 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GLouZ096491;
	Tue, 3 Aug 2010 16:21:50 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031621.o73GLouZ096491@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:21:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210813 - stable/8/usr.sbin/pmcstat
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 03 Aug 2010 16:21:50 -0000

Author: fabient
Date: Tue Aug  3 16:21:49 2010
New Revision: 210813
URL: http://svn.freebsd.org/changeset/base/210813

Log:
  MFC r208858:
  
  Fix warnings found by Coverity.
  
  Found with:   Coverity Prevent(tm)

Modified:
  stable/8/usr.sbin/pmcstat/pmcpl_calltree.c
  stable/8/usr.sbin/pmcstat/pmcstat.c
  stable/8/usr.sbin/pmcstat/pmcstat_log.c
Directory Properties:
  stable/8/usr.sbin/pmcstat/   (props changed)

Modified: stable/8/usr.sbin/pmcstat/pmcpl_calltree.c
==============================================================================
--- stable/8/usr.sbin/pmcstat/pmcpl_calltree.c	Tue Aug  3 16:21:48 2010	(r210812)
+++ stable/8/usr.sbin/pmcstat/pmcpl_calltree.c	Tue Aug  3 16:21:49 2010	(r210813)
@@ -896,10 +896,12 @@ pmcpl_ct_node_printchild(struct pmcpl_ct
 			/* Call address, line, sample. */
 			addr = ct->pct_image->pi_vaddr + ct->pct_func;
 			line = 0;
-			pmcstat_image_addr2line(ct->pct_image, addr, sourcefile,
+			if (pmcstat_image_addr2line(ct->pct_image, addr, sourcefile,
 			    sizeof(sourcefile), &line,
-			    funcname, sizeof(funcname));
-			fprintf(args.pa_graphfile, "%p %u", (void *)addr, line);
+			    funcname, sizeof(funcname)))
+				fprintf(args.pa_graphfile, "%p %u", (void *)addr, line);
+			else
+				fprintf(args.pa_graphfile, "* *");
 		}
 		else
 			fprintf(args.pa_graphfile, "* *");

Modified: stable/8/usr.sbin/pmcstat/pmcstat.c
==============================================================================
--- stable/8/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 16:21:48 2010	(r210812)
+++ stable/8/usr.sbin/pmcstat/pmcstat.c	Tue Aug  3 16:21:49 2010	(r210813)
@@ -292,7 +292,8 @@ pmcstat_find_targets(const char *spec)
 		    0, &nproc)) == NULL)
 			err(EX_OSERR, "ERROR: Cannot get process list: %s",
 			    kvm_geterr(pmcstat_kvm));
-	}
+	} else
+		nproc = 0;
 
 	if ((rv = regcomp(®, spec, REG_EXTENDED|REG_NOSUB)) != 0) {
 		regerror(rv, ®, errbuf, sizeof(errbuf));

Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- stable/8/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 16:21:48 2010	(r210812)
+++ stable/8/usr.sbin/pmcstat/pmcstat_log.c	Tue Aug  3 16:21:49 2010	(r210813)
@@ -1959,6 +1959,7 @@ pmcstat_keypress_log(void)
 	case 'q':
 		wprintw(w, "exiting...");
 		ret = 1;
+		break;
 	default:
 		if (plugins[args.pa_plugin].pl_topkeypress != NULL)
 			if (plugins[args.pa_plugin].pl_topkeypress(c, w))

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Aug  3 16:26:09 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E88A6106564A;
	Tue,  3 Aug 2010 16:26:09 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D6AD68FC2B;
	Tue,  3 Aug 2010 16:26: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 o73GQ9HF097643;
	Tue, 3 Aug 2010 16:26:09 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GQ99B097641;
	Tue, 3 Aug 2010 16:26:09 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031626.o73GQ99B097641@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:26:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210816 - stable/8/lib/libpmc
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 03 Aug 2010 16:26:10 -0000

Author: fabient
Date: Tue Aug  3 16:26:09 2010
New Revision: 210816
URL: http://svn.freebsd.org/changeset/base/210816

Log:
  MFC r208860:
  
  Fix memory leak on error.
  
  Found with:	Coverity Prevent(tm)

Modified:
  stable/8/lib/libpmc/pmclog.c
Directory Properties:
  stable/8/lib/libpmc/   (props changed)

Modified: stable/8/lib/libpmc/pmclog.c
==============================================================================
--- stable/8/lib/libpmc/pmclog.c	Tue Aug  3 16:24:52 2010	(r210815)
+++ stable/8/lib/libpmc/pmclog.c	Tue Aug  3 16:26:09 2010	(r210816)
@@ -549,8 +549,10 @@ pmclog_open(int fd)
 
 	/* allocate space for a work area */
 	if (ps->ps_fd != PMCLOG_FD_NONE) {
-		if ((ps->ps_buffer = malloc(PMCLOG_BUFFER_SIZE)) == NULL)
+		if ((ps->ps_buffer = malloc(PMCLOG_BUFFER_SIZE)) == NULL) {
+			free(ps);
 			return NULL;
+		}
 	}
 
 	return ps;

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Aug  3 16:29:55 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4EF9E1065679;
	Tue,  3 Aug 2010 16:29:55 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 330458FC12;
	Tue,  3 Aug 2010 16:29: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 o73GTtGk098617;
	Tue, 3 Aug 2010 16:29:55 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GTthW098614;
	Tue, 3 Aug 2010 16:29:55 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031629.o73GTthW098614@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:29:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210818 - in stable/8/sys: dev/hwpmc sys
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 03 Aug 2010 16:29:55 -0000

Author: fabient
Date: Tue Aug  3 16:29:54 2010
New Revision: 210818
URL: http://svn.freebsd.org/changeset/base/210818

Log:
  MFC r208861:
  
  Convert pm_runcount to int to correctly check for negative value.
  Remove uncessary check for error.
  
  Found with:	Coverity Prevent(tm)

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

Modified: stable/8/sys/dev/hwpmc/hwpmc_mod.c
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_mod.c	Tue Aug  3 16:27:13 2010	(r210817)
+++ stable/8/sys/dev/hwpmc/hwpmc_mod.c	Tue Aug  3 16:29:54 2010	(r210818)
@@ -1248,7 +1248,7 @@ pmc_process_csw_in(struct thread *td)
 			continue;
 
 		/* increment PMC runcount */
-		atomic_add_rel_32(&pm->pm_runcount, 1);
+		atomic_add_rel_int(&pm->pm_runcount, 1);
 
 		/* configure the HWPMC we are going to use. */
 		pcd = pmc_ri_to_classdep(md, ri, &adjri);
@@ -1387,7 +1387,7 @@ pmc_process_csw_out(struct thread *td)
 			pcd->pcd_stop_pmc(cpu, adjri);
 
 		/* reduce this PMC's runcount */
-		atomic_subtract_rel_32(&pm->pm_runcount, 1);
+		atomic_subtract_rel_int(&pm->pm_runcount, 1);
 
 		/*
 		 * If this PMC is associated with this process,
@@ -3252,9 +3252,6 @@ pmc_syscall_handler(struct thread *td, v
 			}
 		}
 
-		if (error)
-			break;
-
 		/*
 		 * Look for valid values for 'pm_flags'
 		 */
@@ -4045,7 +4042,7 @@ pmc_process_interrupt(int cpu, struct pm
 	    ("[pmc,%d] pm=%p runcount %d", __LINE__, (void *) pm,
 		pm->pm_runcount));
 
-	atomic_add_rel_32(&pm->pm_runcount, 1);	/* hold onto PMC */
+	atomic_add_rel_int(&pm->pm_runcount, 1);	/* hold onto PMC */
 	ps->ps_pmc = pm;
 	if ((td = curthread) && td->td_proc)
 		ps->ps_pid = td->td_proc->p_pid;
@@ -4246,7 +4243,7 @@ pmc_process_samples(int cpu)
 
 	entrydone:
 		ps->ps_nsamples = 0;	/* mark entry as free */
-		atomic_subtract_rel_32(&pm->pm_runcount, 1);
+		atomic_subtract_rel_int(&pm->pm_runcount, 1);
 
 		/* increment read pointer, modulo sample size */
 		if (++ps == psb->ps_fence)
@@ -4418,7 +4415,7 @@ pmc_process_exit(void *arg __unused, str
 				mtx_pool_unlock_spin(pmc_mtxpool, pm);
 			}
 
-			atomic_subtract_rel_32(&pm->pm_runcount,1);
+			atomic_subtract_rel_int(&pm->pm_runcount,1);
 
 			KASSERT((int) pm->pm_runcount >= 0,
 			    ("[pmc,%d] runcount is %d", __LINE__, ri));

Modified: stable/8/sys/sys/pmc.h
==============================================================================
--- stable/8/sys/sys/pmc.h	Tue Aug  3 16:27:13 2010	(r210817)
+++ stable/8/sys/sys/pmc.h	Tue Aug  3 16:29:54 2010	(r210818)
@@ -676,7 +676,7 @@ struct pmc {
 	enum pmc_event	pm_event;	/* event being measured */
 	uint32_t	pm_flags;	/* additional flags PMC_F_... */
 	struct pmc_owner *pm_owner;	/* owner thread state */
-	uint32_t	pm_runcount;	/* #cpus currently on */
+	int		pm_runcount;	/* #cpus currently on */
 	enum pmc_state	pm_state;	/* current PMC state */
 
 	/*

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Aug  3 16:35:12 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D93B31065674;
	Tue,  3 Aug 2010 16:35:12 +0000 (UTC)
	(envelope-from fabient@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C61F18FC1A;
	Tue,  3 Aug 2010 16:35:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73GZC6d099961;
	Tue, 3 Aug 2010 16:35:12 GMT (envelope-from fabient@svn.freebsd.org)
Received: (from fabient@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73GZCoS099959;
	Tue, 3 Aug 2010 16:35:12 GMT (envelope-from fabient@svn.freebsd.org)
Message-Id: <201008031635.o73GZCoS099959@svn.freebsd.org>
From: Fabien Thomas 
Date: Tue, 3 Aug 2010 16:35:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210821 - stable/8/sys/sys
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 03 Aug 2010 16:35:13 -0000

Author: fabient
Date: Tue Aug  3 16:35:12 2010
New Revision: 210821
URL: http://svn.freebsd.org/changeset/base/210821

Log:
  MFC r209196:
  Set the comment at the right place for PMC uncore classes.

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

Modified: stable/8/sys/sys/pmc.h
==============================================================================
--- stable/8/sys/sys/pmc.h	Tue Aug  3 16:31:18 2010	(r210820)
+++ stable/8/sys/sys/pmc.h	Tue Aug  3 16:35:12 2010	(r210821)
@@ -109,8 +109,8 @@ enum pmc_cputype {
 	__PMC_CLASS(P4)		/* Intel Pentium-IV counters */		\
 	__PMC_CLASS(IAF)	/* Intel Core2/Atom, fixed function */	\
 	__PMC_CLASS(IAP)	/* Intel Core...Atom, programmable */   \
-	__PMC_CLASS(UCF)	/* Intel Uncore programmable */		\
-	__PMC_CLASS(UCP)	/* Intel Uncore fixed function */
+	__PMC_CLASS(UCF)	/* Intel Uncore fixed function */	\
+	__PMC_CLASS(UCP)	/* Intel Uncore programmable */
 
 enum pmc_class {
 #undef  __PMC_CLASS

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Aug  3 17:47:27 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B491D1065674;
	Tue,  3 Aug 2010 17:47:27 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A1FC78FC0C;
	Tue,  3 Aug 2010 17:47:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73HlReV016360;
	Tue, 3 Aug 2010 17:47:27 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73HlR2M016357;
	Tue, 3 Aug 2010 17:47:27 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008031747.o73HlR2M016357@svn.freebsd.org>
From: Gavin Atkinson 
Date: Tue, 3 Aug 2010 17:47:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210824 - in stable/8/sys/dev/usb: . quirk
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 03 Aug 2010 17:47:27 -0000

Author: gavin
Date: Tue Aug  3 17:47:27 2010
New Revision: 210824
URL: http://svn.freebsd.org/changeset/base/210824

Log:
  Merge r210515,210516,210543 from head:
  
    Prevent ukbd(4) and uhid(4) from attaching when a WiSPY DBx Spectrum
    Analyzer is attached. [1]
  
    Prevent uhid(4) from attaching to the Gembird Silver Shield remote power
    plug. [2]
  
    Prevent uhid(4) from attaching to the Liebert PowerSure Personal XT UPS.
    [3]
  
  PR:		usb/134631 [1], usb/132785 [2], usb/129251 [3]
  Submitted by:	Jesse Kempf  [1]
  Submitted by:	Dirk-Willem van Gulik  [2]
  Submitted by:	Andrew D Wiles  [3]

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

Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- stable/8/sys/dev/usb/quirk/usb_quirk.c	Tue Aug  3 17:40:09 2010	(r210823)
+++ stable/8/sys/dev/usb/quirk/usb_quirk.c	Tue Aug  3 17:47:27 2010	(r210824)
@@ -111,9 +111,11 @@ static struct usb_quirk_entry usb_quirks
 	USB_QUIRK(APC, UPS, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(BELKIN, F6C550AVR, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(CYBERPOWER, 1500CAVRLCD, 0x0000, 0xffff, UQ_HID_IGNORE),
+	USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(ITUNERNET, USBLCD2X20, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE),
+	USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(MGE, UPS1, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(MGE, UPS2, 0x0000, 0xffff, UQ_HID_IGNORE),
 	USB_QUIRK(APPLE, IPHONE, 0x0000, 0xffff, UQ_HID_IGNORE),
@@ -121,10 +123,11 @@ static struct usb_quirk_entry usb_quirks
 	/* Devices which should be ignored by both ukbd and uhid */
 	USB_QUIRK(CYPRESS, WISPY1A, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
 	USB_QUIRK(METAGEEK, WISPY1B, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
+	USB_QUIRK(METAGEEK, WISPY24X, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
+	USB_QUIRK(METAGEEK2, WISPYDBX, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
 	USB_QUIRK(TENX, UAUDIO0, 0x0101, 0x0101, UQ_AUDIO_SWAP_LR),
 	/* MS keyboards do weird things */
 	USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE),
-	USB_QUIRK(METAGEEK, WISPY24X, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE),
 	/* umodem(4) device quirks */
 	USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA),
 	USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA),

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs	Tue Aug  3 17:40:09 2010	(r210823)
+++ stable/8/sys/dev/usb/usbdevs	Tue Aug  3 17:47:27 2010	(r210824)
@@ -353,6 +353,7 @@ vendor ASIAMD		0x06be	Asia Microelectron
 vendor BIZLINK		0x06c4	Bizlink International
 vendor KEYSPAN		0x06cd	Keyspan / InnoSys Inc.
 vendor AASHIMA		0x06d6	Aashima Technology
+vendor LIEBERT		0x06da	Liebert
 vendor MULTITECH	0x06e0	MultiTech
 vendor ADS		0x06e1	ADS Technologies
 vendor ALCATELM		0x06e4	Alcatel Microelectronics
@@ -653,6 +654,7 @@ vendor MPMAN		0x1cae	MpMan
 vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik
 vendor PEGATRON		0x1d4d	Pegatron
 vendor QISDA		0x1da5  Qisda
+vendor METAGEEK2	0x1dd5	MetaGeek
 vendor ALINK		0x1e0e  Alink
 vendor AIRTIES		0x1eda	AirTies
 vendor DLINK		0x2001	D-Link
@@ -1274,6 +1276,7 @@ product CYPRESS IKARILASER	0x121f	Ikari 
 product CYPRESS USBRS232	0x5500	USB-RS232 Interface
 product CYPRESS SLIM_HUB	0x6560	Slim Hub
 product CYPRESS XX6830XX	0x6830	PATA Storage Device
+product CYPRESS SILVERSHIELD	0xfd13	Gembird Silver Shield PM
 
 /* Daisy Technology products */
 product DAISY DMC		0x6901	USB MultiMedia Reader
@@ -1926,6 +1929,9 @@ product LEXAR CF_READER		0xb002	USB CF R
 /* Lexmark products */
 product LEXMARK S2450		0x0009	Optra S 2450
 
+/* Liebert products */
+product LIEBERT POWERSURE_PXT	0xffff	PowerSure Personal XT
+
 /* Linksys products */
 product LINKSYS MAUSB2		0x0105	Camedia MAUSB-2
 product LINKSYS USB10TX1	0x200c	USB10TX
@@ -2026,6 +2032,7 @@ product MERLIN V620             0x1110  
 /* MetaGeek products */
 product METAGEEK WISPY1B	0x083e	MetaGeek Wi-Spy
 product METAGEEK WISPY24X	0x083f	MetaGeek Wi-Spy 2.4x
+product METAGEEK2 WISPYDBX	0x5000	MetaGeek Wi-Spy DBx
 
 /* Metricom products */
 product METRICOM RICOCHET_GS	0x0001	Ricochet GS

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Aug  4 01:36:48 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E1965106566C;
	Wed,  4 Aug 2010 01:36:48 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CE38A8FC0C;
	Wed,  4 Aug 2010 01:36:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o741amWX021654;
	Wed, 4 Aug 2010 01:36:48 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o741amOV021651;
	Wed, 4 Aug 2010 01:36:48 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201008040136.o741amOV021651@svn.freebsd.org>
From: Xin LI 
Date: Wed, 4 Aug 2010 01:36:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210836 - stable/8/sys/dev/arcmsr
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 04 Aug 2010 01:36:49 -0000

Author: delphij
Date: Wed Aug  4 01:36:48 2010
New Revision: 210836
URL: http://svn.freebsd.org/changeset/base/210836

Log:
  MFC r210358:
  
  Apply vendor version 1.20.00.17.
  
  This version adds support for ARC1880; additionally this version fixed
  an issue where all devices on a SAS port gets offlined when any device
  failed on the port [1].
  
  Many thanks to Areca for continuing to support FreeBSD.
  
  PR:		kern/148502 [1]
  Submitted by:	Ching-Lung Huang 
  Obtained from:	Areca
  Tested by:	Rich Ercolani  [1]

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

Modified: stable/8/sys/dev/arcmsr/arcmsr.c
==============================================================================
--- stable/8/sys/dev/arcmsr/arcmsr.c	Wed Aug  4 01:34:35 2010	(r210835)
+++ stable/8/sys/dev/arcmsr/arcmsr.c	Wed Aug  4 01:36:48 2010	(r210836)
@@ -2,15 +2,15 @@
 *****************************************************************************************
 **        O.S   : FreeBSD
 **   FILE NAME  : arcmsr.c
-**        BY    : Erich Chen   
+**        BY    : Erich Chen, Ching Huang
 **   Description: SCSI RAID Device Driver for 
-**                ARECA (ARC11XX/ARC12XX/ARC13XX/ARC16XX) SATA/SAS RAID HOST Adapter
+**                ARECA (ARC11XX/ARC12XX/ARC13XX/ARC16XX/ARC188x) SATA/SAS RAID HOST Adapter
 **                ARCMSR RAID Host adapter
 **                [RAID controller:INTEL 331(PCI-X) 341(PCI-EXPRESS) chip set]
 ******************************************************************************************
 ************************************************************************
 **
-** Copyright (c) 2004-2006 ARECA Co. Ltd.
+** Copyright (c) 2004-2010 ARECA Co. Ltd.
 **        Erich Chen, Taipei Taiwan All rights reserved.
 **
 ** Redistribution and use in source and binary forms, with or without
@@ -57,6 +57,10 @@
 **     1.20.00.15   10/10/2007         Erich Chen        support new RAID adapter type ARC120x
 **     1.20.00.16   10/10/2009         Erich Chen        Bug fix for RAID adapter type ARC120x
 **                                                       bus_dmamem_alloc() with BUS_DMA_ZERO
+**     1.20.00.17   07/15/2010         Ching Huang       Added support ARC1880
+**							 report CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT when device failed,
+**							 prevent cam_periph_error removing all LUN devices of one Target id
+**							 for any one LUN device failed
 ******************************************************************************************
 * $FreeBSD$
 */
@@ -90,6 +94,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -165,6 +171,8 @@ static void arcmsr_build_srb(struct Comm
 static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, union ccb * pccb);
 static int arcmsr_resume(device_t dev);
 static int arcmsr_suspend(device_t dev);
+static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb);
+static void	arcmsr_polling_devmap(void* arg);
 /*
 **************************************************************************
 **************************************************************************
@@ -191,7 +199,6 @@ static device_method_t arcmsr_methods[]=
 	DEVMETHOD(device_shutdown,	arcmsr_shutdown),
 	DEVMETHOD(device_suspend,	arcmsr_suspend),
 	DEVMETHOD(device_resume,	arcmsr_resume),
-	
 	DEVMETHOD(bus_print_child,	bus_generic_print_child),
 	DEVMETHOD(bus_driver_added, 	bus_generic_driver_added),
 	{ 0, 0 }
@@ -215,7 +222,7 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1);
 	#ifndef D_VERSION
 		#define D_VERSION	0x20011966
 	#endif
-	static struct cdevsw arcmsr_cdevsw={
+static struct cdevsw arcmsr_cdevsw={
 	#if __FreeBSD_version > 502010
 		.d_version = D_VERSION, 
 	#endif
@@ -228,7 +235,7 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1);
 #else
 	#define ARCMSR_CDEV_MAJOR	180
 	
-	static struct cdevsw arcmsr_cdevsw = {
+static struct cdevsw arcmsr_cdevsw = {
 		arcmsr_open, 		        /* open     */
 		arcmsr_close, 		        /* close    */
 		noread, 		        /* read     */
@@ -244,7 +251,10 @@ MODULE_DEPEND(arcmsr, cam, 1, 1, 1);
 		0				/* flags    */
 	};
 #endif
-
+/*
+**************************************************************************
+**************************************************************************
+*/
 #if __FreeBSD_version < 500005
 	static int arcmsr_open(dev_t dev, int flags, int fmt, struct proc *proc)
 #else
@@ -328,18 +338,21 @@ static u_int32_t arcmsr_disable_allintr(
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			/* disable all outbound interrupt */
-			intmask_org=CHIP_REG_READ32(HBA_MessageUnit, 
-			0, outbound_intmask)|ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE; /* disable outbound message0 int */
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, outbound_intmask, intmask_org|ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE);
+			intmask_org=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intmask); /* disable outbound message0 int */
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intmask, intmask_org|ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE);
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
 			/* disable all outbound interrupt */
 			intmask_org=CHIP_REG_READ32(HBB_DOORBELL, 
 			0, iop2drv_doorbell_mask) & (~ARCMSR_IOP2DRV_MESSAGE_CMD_DONE); /* disable outbound message0 int */
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, iop2drv_doorbell_mask, 0); /* disable all interrupt */
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, 0); /* disable all interrupt */
+		}
+		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/* disable all outbound interrupt */
+			intmask_org=CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_mask)	; /* disable outbound message0 int */
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, host_int_mask, intmask_org|ARCMSR_HBCMU_ALL_INTMASKENABLE);
 		}
 		break;
 	}
@@ -356,19 +369,25 @@ static void arcmsr_enable_allintr( struc
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			/* enable outbound Post Queue, outbound doorbell Interrupt */
-			mask=~(ARCMSR_MU_OUTBOUND_POSTQUEUE_INTMASKENABLE|ARCMSR_MU_OUTBOUND_DOORBELL_INTMASKENABLE);
+			mask=~(ARCMSR_MU_OUTBOUND_POSTQUEUE_INTMASKENABLE|ARCMSR_MU_OUTBOUND_DOORBELL_INTMASKENABLE|ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE);
 			CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intmask, intmask_org & mask);
 			acb->outbound_int_enable = ~(intmask_org & mask) & 0x000000ff;
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
-			/* disable ARCMSR_IOP2DRV_MESSAGE_CMD_DONE */
-			mask=(ARCMSR_IOP2DRV_DATA_WRITE_OK|ARCMSR_IOP2DRV_DATA_READ_OK|ARCMSR_IOP2DRV_CDB_DONE);
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, iop2drv_doorbell_mask, intmask_org | mask); /*1=interrupt enable, 0=interrupt disable*/
+			/* enable ARCMSR_IOP2DRV_MESSAGE_CMD_DONE */
+			mask=(ARCMSR_IOP2DRV_DATA_WRITE_OK|ARCMSR_IOP2DRV_DATA_READ_OK|ARCMSR_IOP2DRV_CDB_DONE|ARCMSR_IOP2DRV_MESSAGE_CMD_DONE);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, intmask_org | mask); /*1=interrupt enable, 0=interrupt disable*/
 			acb->outbound_int_enable = (intmask_org | mask) & 0x0000000f;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/* enable outbound Post Queue, outbound doorbell Interrupt */
+			mask=~(ARCMSR_HBCMU_UTILITY_A_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_DOORBELL_ISR_MASK | ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR_MASK);
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, host_int_mask, intmask_org & mask);
+			acb->outbound_int_enable= ~(intmask_org & mask) & 0x0000000f;
+		}
+		break;
 	}
 	return;
 }
@@ -383,10 +402,8 @@ static u_int8_t arcmsr_hba_wait_msgint_r
 	
 	do {
 		for(Index=0; Index < 100; Index++) {
-			if(CHIP_REG_READ32(HBA_MessageUnit, 
-				0, outbound_intstatus) & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
-				CHIP_REG_WRITE32(HBA_MessageUnit, 
-				0, outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);/*clear interrupt*/
+			if(CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
+				CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);/*clear interrupt*/
 				return TRUE;
 			}
 			UDELAY(10000);
@@ -405,12 +422,29 @@ static u_int8_t arcmsr_hbb_wait_msgint_r
 	
 	do {
 		for(Index=0; Index < 100; Index++) {
-			if(CHIP_REG_READ32(HBB_DOORBELL, 
-				0, iop2drv_doorbell) & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
-				CHIP_REG_WRITE32(HBB_DOORBELL, 
-				0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);/*clear interrupt*/
-				CHIP_REG_WRITE32(HBB_DOORBELL, 
-				0, drv2iop_doorbell, ARCMSR_DRV2IOP_END_OF_INTERRUPT);
+			if(CHIP_REG_READ32(HBB_DOORBELL, 0, iop2drv_doorbell) & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
+				CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);/*clear interrupt*/
+				CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_END_OF_INTERRUPT);
+				return TRUE;
+			}
+			UDELAY(10000);
+		}/*max 1 seconds*/
+	}while(Retries++ < 20);/*max 20 sec*/
+	return FALSE;
+}
+/*
+**********************************************************************
+**********************************************************************
+*/
+static u_int8_t arcmsr_hbc_wait_msgint_ready(struct AdapterControlBlock *acb)
+{
+	u_int32_t Index;
+	u_int8_t Retries=0x00;
+	
+	do {
+		for(Index=0; Index < 100; Index++) {
+			if(CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell) & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
+				CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR);/*clear interrupt*/
 				return TRUE;
 			}
 			UDELAY(10000);
@@ -426,8 +460,7 @@ static void arcmsr_flush_hba_cache(struc
 {
 	int retry_count=30;/* enlarge wait flush adapter cache time: 10 minute */
 	
-	CHIP_REG_WRITE32(HBA_MessageUnit, 
-	0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
+	CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
 	do {
 		if(arcmsr_hba_wait_msgint_ready(acb)) {
 			break;
@@ -460,6 +493,25 @@ static void arcmsr_flush_hbb_cache(struc
 ************************************************************************
 ************************************************************************
 */
+static void arcmsr_flush_hbc_cache(struct AdapterControlBlock *acb)
+{
+	int retry_count=30;/* enlarge wait flush adapter cache time: 10 minute */
+	
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
+	do {
+		if(arcmsr_hbc_wait_msgint_ready(acb)) {
+			break;
+		} else {
+			retry_count--;
+		}
+	}while(retry_count!=0);
+	return;
+}
+/*
+************************************************************************
+************************************************************************
+*/
 static void arcmsr_flush_adapter_cache(struct AdapterControlBlock *acb)
 {
 	switch (acb->adapter_type) {
@@ -471,6 +523,10 @@ static void arcmsr_flush_adapter_cache(s
 			arcmsr_flush_hbb_cache(acb);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			arcmsr_flush_hbc_cache(acb);
+		}
+		break;
 	}
 	return;
 }
@@ -482,10 +538,10 @@ static int arcmsr_suspend(device_t dev)
 {
 	struct AdapterControlBlock	*acb = device_get_softc(dev);
 	
-	/* disable all outbound interrupt */
-	arcmsr_disable_allintr(acb);
 	/* flush controller */
 	arcmsr_iop_parking(acb);
+	/* disable all outbound interrupt */
+	arcmsr_disable_allintr(acb);
 	return(0);
 }
 /*
@@ -515,12 +571,10 @@ static void arcmsr_async(void *cb_arg, u
 	case AC_LOST_DEVICE:
 		target_id=xpt_path_target_id(path);
 		target_lun=xpt_path_lun_id(path);
-		if((target_id > ARCMSR_MAX_TARGETID) 
-		|| (target_lun > ARCMSR_MAX_TARGETLUN)) {
+		if((target_id > ARCMSR_MAX_TARGETID) || (target_lun > ARCMSR_MAX_TARGETLUN)) {
 			break;
 		}
-		printf("%s:scsi id%d lun%d device lost \n"
-			, device_get_name(acb->pci_dev), target_id, target_lun);
+		printf("%s:scsi id=%d lun=%d device lost \n", device_get_name(acb->pci_dev), target_id, target_lun);
 		break;
 	default:
 		break;
@@ -589,8 +643,7 @@ static void arcmsr_abort_hba_allcmd(stru
 {
 	CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_ABORT_CMD);
 	if(!arcmsr_hba_wait_msgint_ready(acb)) {
-		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n"
-			, acb->pci_unit);
+		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
 	}
 	return;
 }
@@ -602,8 +655,20 @@ static void arcmsr_abort_hbb_allcmd(stru
 {
 	CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_MESSAGE_ABORT_CMD);
 	if(!arcmsr_hbb_wait_msgint_ready(acb)) {
-		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n"
-			, acb->pci_unit);
+		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
+	}
+	return;
+}
+/*
+*********************************************************************
+*********************************************************************
+*/
+static void arcmsr_abort_hbc_allcmd(struct AdapterControlBlock *acb)
+{
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_ABORT_CMD);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
+	if(!arcmsr_hbc_wait_msgint_ready(acb)) {
+		printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit);
 	}
 	return;
 }
@@ -622,6 +687,10 @@ static void arcmsr_abort_allcmd(struct A
 			arcmsr_abort_hbb_allcmd(acb);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			arcmsr_abort_hbc_allcmd(acb);
+		}
+		break;
 	}
 	return;
 }
@@ -629,14 +698,13 @@ static void arcmsr_abort_allcmd(struct A
 **************************************************************************
 **************************************************************************
 */
-static void arcmsr_report_srb_state(struct AdapterControlBlock *acb, 
-	struct CommandControlBlock *srb, u_int32_t flag_srb)
+static void arcmsr_report_srb_state(struct AdapterControlBlock *acb, struct CommandControlBlock *srb, u_int16_t error)
 {
 	int target, lun;
 	
 	target=srb->pccb->ccb_h.target_id;
 	lun=srb->pccb->ccb_h.target_lun;
-	if((flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR)==0) {
+	if(error == FALSE) {
 		if(acb->devstate[target][lun]==ARECA_RAID_GONE) {
 			acb->devstate[target][lun]=ARECA_RAID_GOOD;
 		}
@@ -646,12 +714,10 @@ static void arcmsr_report_srb_state(stru
 		switch(srb->arcmsr_cdb.DeviceStatus) {
 		case ARCMSR_DEV_SELECT_TIMEOUT: {
 				if(acb->devstate[target][lun]==ARECA_RAID_GOOD) {
-					printf( "arcmsr%d: select timeout"
-						", raid volume was kicked out \n"
-						, acb->pci_unit);
+					printf( "arcmsr%d: Target=%x, Lun=%x, selection timeout, raid volume was lost\n", acb->pci_unit, target, lun);
 				}
 				acb->devstate[target][lun]=ARECA_RAID_GONE;
-				srb->pccb->ccb_h.status |= CAM_SEL_TIMEOUT;
+				srb->pccb->ccb_h.status |= CAM_DEV_NOT_THERE;
 				arcmsr_srb_complete(srb, 1);
 			}
 			break;
@@ -669,11 +735,8 @@ static void arcmsr_report_srb_state(stru
 			}
 			break;
 		default:
-			printf("arcmsr%d: scsi id=%d lun=%d"
-				"isr get command error done,"
-				"but got unknow DeviceStatus=0x%x \n"
-				, acb->pci_unit, target, lun 
-				,srb->arcmsr_cdb.DeviceStatus);
+			printf("arcmsr%d: scsi id=%d lun=%d isr got command error done,but got unknow DeviceStatus=0x%x \n"
+					, acb->pci_unit, target, lun ,srb->arcmsr_cdb.DeviceStatus);
 			acb->devstate[target][lun]=ARECA_RAID_GONE;
 			srb->pccb->ccb_h.status |= CAM_UNCOR_PARITY;
 			/*unknow error or crc error just for retry*/
@@ -687,29 +750,34 @@ static void arcmsr_report_srb_state(stru
 **************************************************************************
 **************************************************************************
 */
-static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t flag_srb)
+static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t flag_srb, u_int16_t error)
 {
 	struct CommandControlBlock *srb;
 	
 	/* check if command done with no error*/
-	srb=(struct CommandControlBlock *)
-		(acb->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/
+	switch (acb->adapter_type) {
+	case ACB_ADAPTER_TYPE_C:
+		srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb & 0xFFFFFFF0));/*frame must be 32 bytes aligned*/
+		break;
+	case ACB_ADAPTER_TYPE_A:
+	case ACB_ADAPTER_TYPE_B:
+	default:
+		srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb << 5));/*frame must be 32 bytes aligned*/
+		break;
+	}
 	if((srb->acb!=acb) || (srb->startdone!=ARCMSR_SRB_START)) {
 		if(srb->startdone==ARCMSR_SRB_ABORTED) {
-			printf("arcmsr%d: srb='%p' isr got aborted command \n"
-				, acb->pci_unit, srb);
+			printf("arcmsr%d: srb='%p' isr got aborted command \n", acb->pci_unit, srb);
 			srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
 			arcmsr_srb_complete(srb, 1);
 			return;
 		}
 		printf("arcmsr%d: isr get an illegal srb command done"
-			"acb='%p' srb='%p' srbacb='%p' startdone=0x%x"
-			"srboutstandingcount=%d \n",
-			acb->pci_unit, acb, srb, srb->acb,
-			srb->startdone, acb->srboutstandingcount);
+			"acb='%p' srb='%p' srbacb='%p' startdone=0x%xsrboutstandingcount=%d \n",
+			acb->pci_unit, acb, srb, srb->acb,srb->startdone, acb->srboutstandingcount);
 		return;
 	}
-	arcmsr_report_srb_state(acb, srb, flag_srb);
+	arcmsr_report_srb_state(acb, srb, error);
 	return;
 }
 /*
@@ -720,20 +788,18 @@ static void arcmsr_done4abort_postqueue(
 {
 	int i=0;
 	u_int32_t flag_srb;
+	u_int16_t error;
 	
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			u_int32_t outbound_intstatus;
 	
 			/*clear and abort all outbound posted Q*/
-			outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 
-			0, outbound_intstatus) & acb->outbound_int_enable;
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
-			while(((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 
-				0, outbound_queueport)) != 0xFFFFFFFF) 
-				&& (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
-				arcmsr_drain_donequeue(acb, flag_srb);
+			outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
+			while(((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_queueport)) != 0xFFFFFFFF) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
+                error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+				arcmsr_drain_donequeue(acb, flag_srb, error);
 			}
 		}
 		break;
@@ -741,13 +807,12 @@ static void arcmsr_done4abort_postqueue(
 			struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
 	
 			/*clear all outbound posted Q*/
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, iop2drv_doorbell, 
-			ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */
 			for(i=0; i < ARCMSR_MAX_HBB_POSTQUEUE; i++) {
 				if((flag_srb=phbbmu->done_qbuffer[i])!=0) {
 					phbbmu->done_qbuffer[i]=0;
-					arcmsr_drain_donequeue(acb, flag_srb);
+                	error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+					arcmsr_drain_donequeue(acb, flag_srb, error);
 				}
 				phbbmu->post_qbuffer[i]=0;
 			}/*drain reply FIFO*/
@@ -755,6 +820,15 @@ static void arcmsr_done4abort_postqueue(
 			phbbmu->postq_index=0;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+	
+			while((CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) {
+				flag_srb=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
+                error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
+				arcmsr_drain_donequeue(acb, flag_srb, error);
+			}
+		}
+		break;
 	}
 	return;
 }
@@ -873,7 +947,10 @@ static void arcmsr_build_srb(struct Comm
 		if( arccdbsize > 256) {
 			arcmsr_cdb->Flags|=ARCMSR_CDB_FLAG_SGL_BSIZE;
 		}
+	} else {
+		arcmsr_cdb->DataLength = 0;
 	}
+    srb->arc_cdb_size=arccdbsize;
 	return;
 }
 /*
@@ -885,19 +962,16 @@ static void arcmsr_post_srb(struct Adapt
 	u_int32_t cdb_shifted_phyaddr=(u_int32_t) srb->cdb_shifted_phyaddr;
 	struct ARCMSR_CDB * arcmsr_cdb=(struct ARCMSR_CDB *)&srb->arcmsr_cdb;
 	
-	bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, 
-	(srb->srb_flags & SRB_FLAG_WRITE) ? BUS_DMASYNC_POSTWRITE:BUS_DMASYNC_POSTREAD);
+	bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, (srb->srb_flags & SRB_FLAG_WRITE) ? BUS_DMASYNC_POSTWRITE:BUS_DMASYNC_POSTREAD);
 	atomic_add_int(&acb->srboutstandingcount, 1);
 	srb->startdone=ARCMSR_SRB_START;
+
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			if(arcmsr_cdb->Flags & ARCMSR_CDB_FLAG_SGL_BSIZE) {
-				CHIP_REG_WRITE32(HBA_MessageUnit, 
-				0, inbound_queueport, 
-				cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE);
+				CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE);
 			} else {
-				CHIP_REG_WRITE32(HBA_MessageUnit, 
-				0, inbound_queueport, cdb_shifted_phyaddr);
+				CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_queueport, cdb_shifted_phyaddr);
 			}
 		}
 		break;
@@ -909,17 +983,32 @@ static void arcmsr_post_srb(struct Adapt
 			ending_index=((index+1)%ARCMSR_MAX_HBB_POSTQUEUE);
 			phbbmu->post_qbuffer[ending_index]=0;
 			if(arcmsr_cdb->Flags & ARCMSR_CDB_FLAG_SGL_BSIZE) {
-				phbbmu->post_qbuffer[index]=
-					cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE;
+				phbbmu->post_qbuffer[index]= cdb_shifted_phyaddr|ARCMSR_SRBPOST_FLAG_SGL_BSIZE;
 			} else {
-				phbbmu->post_qbuffer[index]=
-					cdb_shifted_phyaddr;
+				phbbmu->post_qbuffer[index]= cdb_shifted_phyaddr;
 			}
 			index++;
 			index %= ARCMSR_MAX_HBB_POSTQUEUE;     /*if last index number set it to 0 */
 			phbbmu->postq_index=index;
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, drv2iop_doorbell, ARCMSR_DRV2IOP_CDB_POSTED);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_CDB_POSTED);
+		}
+		break;
+    case ACB_ADAPTER_TYPE_C:
+        {
+            u_int32_t ccb_post_stamp, arc_cdb_size, cdb_phyaddr_hi32;
+
+            arc_cdb_size=(srb->arc_cdb_size>0x300)?0x300:srb->arc_cdb_size;
+            ccb_post_stamp=(cdb_shifted_phyaddr | ((arc_cdb_size-1) >> 6) | 1);
+			cdb_phyaddr_hi32 = acb->srb_phyaddr.B.phyadd_high;
+            if(cdb_phyaddr_hi32)
+            {
+			    CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_high, cdb_phyaddr_hi32);
+			    CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp);
+            }
+            else
+            {
+			    CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp);
+            }
 		}
 		break;
 	}
@@ -946,6 +1035,12 @@ static struct QBUFFER * arcmsr_get_iop_r
 			qbuffer=(struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_rbuffer;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			struct HBC_MessageUnit *phbcmu=(struct HBC_MessageUnit *)acb->pmu;
+	
+			qbuffer=(struct QBUFFER *)&phbcmu->message_rbuffer;
+		}
+		break;
 	}
 	return(qbuffer);
 }
@@ -970,6 +1065,12 @@ static struct QBUFFER * arcmsr_get_iop_w
 			qbuffer=(struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_wbuffer;
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			struct HBC_MessageUnit *phbcmu=(struct HBC_MessageUnit *)acb->pmu;
+	
+			qbuffer=(struct QBUFFER *)&phbcmu->message_wbuffer;
+		}
+		break;
 	}
 	return(qbuffer);
 }
@@ -982,16 +1083,18 @@ static void arcmsr_iop_message_read(stru
 	switch (acb->adapter_type) {
 	case ACB_ADAPTER_TYPE_A: {
 			/* let IOP know data has been read */
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_READ_OK);
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_READ_OK);
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
 			/* let IOP know data has been read */
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_READ_OK);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_READ_OK);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/* let IOP know data has been read */
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_READ_OK);
+		}
 	}
 	return;
 }
@@ -1007,8 +1110,7 @@ static void arcmsr_iop_message_wrote(str
 			** push inbound doorbell tell iop, driver data write ok 
 			** and wait reply on next hwinterrupt for next Qbuffer post
 			*/
-			CHIP_REG_WRITE32(HBA_MessageUnit, 
-			0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK);
+			CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_doorbell, ARCMSR_INBOUND_DRIVER_DATA_WRITE_OK);
 		}
 		break;
 	case ACB_ADAPTER_TYPE_B: {
@@ -1016,8 +1118,15 @@ static void arcmsr_iop_message_wrote(str
 			** push inbound doorbell tell iop, driver data write ok 
 			** and wait reply on next hwinterrupt for next Qbuffer post
 			*/
-			CHIP_REG_WRITE32(HBB_DOORBELL, 
-			0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_WRITE_OK);
+			CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_WRITE_OK);
+		}
+		break;
+	case ACB_ADAPTER_TYPE_C: {
+			/*
+			** push inbound doorbell tell iop, driver data write ok 
+			** and wait reply on next hwinterrupt for next Qbuffer post
+			*/
+			CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_WRITE_OK);
 		}
 		break;
 	}
@@ -1064,7 +1173,7 @@ static void arcmsr_stop_hba_bgrb(struct 
 	CHIP_REG_WRITE32(HBA_MessageUnit, 
 	0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB);
 	if(!arcmsr_hba_wait_msgint_ready(acb)) {
-		printf("arcmsr%d: wait 'stop adapter rebulid' timeout \n"
+		printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n"
 			, acb->pci_unit);
 	}
 	return;
@@ -1079,7 +1188,7 @@ static void arcmsr_stop_hbb_bgrb(struct 
 	CHIP_REG_WRITE32(HBB_DOORBELL, 
 	0, drv2iop_doorbell, ARCMSR_MESSAGE_STOP_BGRB);
 	if(!arcmsr_hbb_wait_msgint_ready(acb)) {
-		printf( "arcmsr%d: wait 'stop adapter rebulid' timeout \n"
+		printf( "arcmsr%d: wait 'stop adapter background rebulid' timeout \n"
 			, acb->pci_unit);
 	}
 	return;
@@ -1088,6 +1197,20 @@ static void arcmsr_stop_hbb_bgrb(struct 
 ************************************************************************
 ************************************************************************
 */
+static void arcmsr_stop_hbc_bgrb(struct AdapterControlBlock *acb)
+{
+	acb->acb_flags &=~ACB_F_MSG_START_BGRB;
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell,ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE);
+	if(!arcmsr_hbc_wait_msgint_ready(acb)) {
+		printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n", acb->pci_unit);
+	}
+	return;
+}
+/*
+************************************************************************
+************************************************************************
+*/
 static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb)
 {
 	switch (acb->adapter_type) {
@@ -1099,6 +1222,10 @@ static void arcmsr_stop_adapter_bgrb(str
 			arcmsr_stop_hbb_bgrb(acb);
 		}
 		break;
+	case ACB_ADAPTER_TYPE_C: {
+			arcmsr_stop_hbc_bgrb(acb);
+		}
+		break;
 	}
 	return;
 }
@@ -1121,18 +1248,6 @@ static void arcmsr_poll(struct cam_sim *
 	return;
 }
 /*
-**********************************************************************
-**********************************************************************
-*/
-static void arcmsr_intr_handler(void *arg)
-{
-	struct AdapterControlBlock *acb=(struct AdapterControlBlock *)arg;
-	
-	ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
-	arcmsr_interrupt(acb);
-	ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
-}
-/*
 **************************************************************************
 **************************************************************************
 */
@@ -1210,6 +1325,187 @@ static void arcmsr_iop2drv_data_read_han
 	}
 	return;
 }
+
+static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb)
+{
+/*
+	if (ccb->ccb_h.status != CAM_REQ_CMP)
+		printf("arcmsr_rescanLun_cb: Rescan Target=%x, lun=%x, failure status=%x\n",ccb->ccb_h.target_id,ccb->ccb_h.target_lun,ccb->ccb_h.status);
+	else
+		printf("arcmsr_rescanLun_cb: Rescan lun successfully!\n");
+*/
+	xpt_free_path(ccb->ccb_h.path);
+	xpt_free_ccb(ccb);
+}
+
+static void	arcmsr_rescan_lun(struct AdapterControlBlock *acb, int target, int lun)
+{
+	struct cam_path     *path;
+	union ccb           *ccb;
+
+	if ((ccb = (union ccb *)xpt_alloc_ccb_nowait()) == NULL)
+ 		return;
+	if (xpt_create_path(&path, xpt_periph, cam_sim_path(acb->psim), target, lun) != CAM_REQ_CMP)
+	{
+		xpt_free_ccb(ccb);
+		return;
+	}
+/*	printf("arcmsr_rescan_lun: Rescan Target=%x, Lun=%x\n", target, lun); */
+	bzero(ccb, sizeof(union ccb));
+	xpt_setup_ccb(&ccb->ccb_h, path, 5);
+	ccb->ccb_h.func_code = XPT_SCAN_LUN;
+	ccb->ccb_h.cbfcnp = arcmsr_rescanLun_cb;
+	ccb->crcn.flags = CAM_FLAG_NONE;
+	xpt_action(ccb);
+	return;
+}
+
+
+static void arcmsr_abort_dr_ccbs(struct AdapterControlBlock *acb, int target, int lun)
+{
+   	struct CommandControlBlock *srb;
+	u_int32_t intmask_org;
+   	int i;
+
+	ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock);
+	/* disable all outbound interrupts */
+	intmask_org = arcmsr_disable_allintr(acb);
+	for (i = 0; i < ARCMSR_MAX_FREESRB_NUM; i++)
+	{
+		srb = acb->psrb_pool[i];
+		if (srb->startdone == ARCMSR_SRB_START)
+		{
+           	if((target == srb->pccb->ccb_h.target_id) && (lun == srb->pccb->ccb_h.target_lun))
+            {
+		    	srb->startdone = ARCMSR_SRB_ABORTED;
+				srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
+		    	arcmsr_srb_complete(srb, 1);
+       		}
+		}
+	}
+	/* enable outbound Post Queue, outbound doorbell Interrupt */
+	arcmsr_enable_allintr(acb, intmask_org);
+	ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock);
+}
+
+
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_dr_handle(struct AdapterControlBlock *acb) {
+	u_int32_t	devicemap;
+	u_int32_t	target, lun;
+    u_int32_t	deviceMapCurrent[4]={0};
+    u_int8_t	*pDevMap;
+
+	switch (acb->adapter_type) {
+	case ACB_ADAPTER_TYPE_A:
+			devicemap = offsetof(struct HBA_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+			for (target= 0; target < 4; target++) 
+			{
+            	deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0],  devicemap);
+            	devicemap += 4;
+			}
+			break;
+
+	case ACB_ADAPTER_TYPE_B:
+			devicemap = offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+			for (target= 0; target < 4; target++) 
+			{
+            	deviceMapCurrent[target]=bus_space_read_4(acb->btag[1], acb->bhandle[1],  devicemap);
+            	devicemap += 4;
+			}
+			break;
+
+	case ACB_ADAPTER_TYPE_C:
+			devicemap = offsetof(struct HBC_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]);
+			for (target= 0; target < 4; target++) 
+			{
+            	deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0],  devicemap);
+            	devicemap += 4;
+			}
+			break;
+	}
+		if(acb->acb_flags & ACB_F_BUS_HANG_ON)
+		{
+			acb->acb_flags &= ~ACB_F_BUS_HANG_ON;
+		}
+		/* 
+		** adapter posted CONFIG message 
+		** copy the new map, note if there are differences with the current map
+		*/
+		pDevMap = (u_int8_t	*)&deviceMapCurrent[0];
+		for (target= 0; target < ARCMSR_MAX_TARGETID - 1; target++) 
+		{
+			if (*pDevMap != acb->device_map[target])
+			{
+                u_int8_t difference, bit_check;
+
+                difference= *pDevMap ^ acb->device_map[target];
+                for(lun=0; lun < ARCMSR_MAX_TARGETLUN; lun++)
+                {
+                    bit_check=(1 << lun);						/*check bit from 0....31*/
+                    if(difference & bit_check)
+                    {
+                        if(acb->device_map[target] & bit_check)
+                        {/* unit departed */
+							printf("arcmsr_dr_handle: Target=%x, lun=%x, GONE!!!\n",target,lun);
+ 							arcmsr_abort_dr_ccbs(acb, target, lun);
+                        	arcmsr_rescan_lun(acb, target, lun);
+        					acb->devstate[target][lun] = ARECA_RAID_GONE;
+                        }
+                        else
+                        {/* unit arrived */
+							printf("arcmsr_dr_handle: Target=%x, lun=%x, ARRIVING!!!\n",target,lun);
+                        	arcmsr_rescan_lun(acb, target, lun);
+        					acb->devstate[target][lun] = ARECA_RAID_GOOD;
+                        }
+                    }
+                }
+/*				printf("arcmsr_dr_handle: acb->device_map[%x]=0x%x, deviceMapCurrent[%x]=%x\n",target,acb->device_map[target],target,*pDevMap); */
+				acb->device_map[target]= *pDevMap;
+			}
+			pDevMap++;
+		}
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hba_message_isr(struct AdapterControlBlock *acb) {
+	u_int32_t outbound_message;
+
+	CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, ARCMSR_MU_OUTBOUND_MESSAGE0_INT);
+	outbound_message = CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[0]);
+	if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+		arcmsr_dr_handle( acb );
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbb_message_isr(struct AdapterControlBlock *acb) {
+	u_int32_t outbound_message;
+
+	/* clear interrupts */
+	CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);
+	outbound_message = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[0]);
+	if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+		arcmsr_dr_handle( acb );
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbc_message_isr(struct AdapterControlBlock *acb) {
+	u_int32_t outbound_message;
+
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR);
+	outbound_message = CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[0]);
+	if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG)
+		arcmsr_dr_handle( acb );
+}
 /*
 **************************************************************************
 **************************************************************************
@@ -1241,9 +1537,38 @@ static void arcmsr_hba_doorbell_isr(stru
 **************************************************************************
 **************************************************************************
 */
+static void arcmsr_hbc_doorbell_isr(struct AdapterControlBlock *acb)
+{
+	u_int32_t outbound_doorbell;
+	
+	/*
+	*******************************************************************
+	**  Maybe here we need to check wrqbuffer_lock is lock or not
+	**  DOORBELL: din! don! 
+	**  check if there are any mail need to pack from firmware
+	*******************************************************************
+	*/
+	outbound_doorbell=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell);
+	CHIP_REG_WRITE32(HBC_MessageUnit, 0, outbound_doorbell_clear, outbound_doorbell); /* clear doorbell interrupt */
+	if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_DATA_WRITE_OK) {
+		arcmsr_iop2drv_data_wrote_handle(acb);
+	}
+	if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_DATA_READ_OK) {
+		arcmsr_iop2drv_data_read_handle(acb);
+	}
+	if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
+		arcmsr_hbc_message_isr(acb);    /* messenger of "driver to iop commands" */
+	}
+	return;
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
 static void arcmsr_hba_postqueue_isr(struct AdapterControlBlock *acb)
 {
 	u_int32_t flag_srb;
+	u_int16_t error;
 	
 	/*
 	*****************************************************************************
@@ -1255,7 +1580,8 @@ static void arcmsr_hba_postqueue_isr(str
 	while((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 
 		0, outbound_queueport)) != 0xFFFFFFFF) {
 		/* check if command done with no error*/
-		arcmsr_drain_donequeue(acb, flag_srb);
+        error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+		arcmsr_drain_donequeue(acb, flag_srb, error);
 	}	/*drain reply FIFO*/
 	return;
 }
@@ -1268,6 +1594,7 @@ static void arcmsr_hbb_postqueue_isr(str
 	struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu;
 	u_int32_t flag_srb;
 	int index;
+	u_int16_t error;
 	
 	/*
 	*****************************************************************************
@@ -1283,7 +1610,38 @@ static void arcmsr_hbb_postqueue_isr(str
 		index %= ARCMSR_MAX_HBB_POSTQUEUE;     /*if last index number set it to 0 */
 		phbbmu->doneq_index=index;
 		/* check if command done with no error*/
-		arcmsr_drain_donequeue(acb, flag_srb);
+        error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE;
+		arcmsr_drain_donequeue(acb, flag_srb, error);
+	}	/*drain reply FIFO*/
+	return;
+}
+/*
+**************************************************************************
+**************************************************************************
+*/
+static void arcmsr_hbc_postqueue_isr(struct AdapterControlBlock *acb)
+{
+	u_int32_t flag_srb,throttling=0;
+	u_int16_t error;
+	
+	/*
+	*****************************************************************************
+	**               areca cdb command done
+	*****************************************************************************
+	*/
+	bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
+		
+	while(CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) {
+		
+		flag_srb=CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low);
+		/* check if command done with no error*/
+        error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1)?TRUE:FALSE;
+		arcmsr_drain_donequeue(acb, flag_srb, error);
+        if(throttling==ARCMSR_HBC_ISR_THROTTLING_LEVEL) {
+            CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell,ARCMSR_HBCMU_DRV2IOP_POSTQUEUE_THROTTLING);
+            break;
+        }
+        throttling++;
 	}	/*drain reply FIFO*/
 	return;
 }
@@ -1299,14 +1657,12 @@ static void arcmsr_handle_hba_isr( struc
 	**   check outbound intstatus 
 	*********************************************
 	*/
-	outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 
-	0, outbound_intstatus) & acb->outbound_int_enable;
+	outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable;
 	if(!outbound_intstatus) {
 		/*it must be share irq*/
 		return;
 	}
-	CHIP_REG_WRITE32(HBA_MessageUnit, 
-	0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
+	CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/
 	/* MU doorbell interrupts*/
 	if(outbound_intstatus & ARCMSR_MU_OUTBOUND_DOORBELL_INT) {
 		arcmsr_hba_doorbell_isr(acb);
@@ -1315,6 +1671,9 @@ static void arcmsr_handle_hba_isr( struc
 	if(outbound_intstatus & ARCMSR_MU_OUTBOUND_POSTQUEUE_INT) {
 		arcmsr_hba_postqueue_isr(acb);
 	}
+	if(outbound_intstatus & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
+		arcmsr_hba_message_isr(acb);
+	}
 	return;
 }
 /*
@@ -1348,6 +1707,36 @@ static void arcmsr_handle_hbb_isr( struc
 	if(outbound_doorbell & ARCMSR_IOP2DRV_CDB_DONE) {

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

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Aug  4 10:24:38 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 62FFD106566C;
	Wed,  4 Aug 2010 10:24:38 +0000 (UTC)
	(envelope-from tijl@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 348ED8FC12;
	Wed,  4 Aug 2010 10:24: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 o74AOcwO039281;
	Wed, 4 Aug 2010 10:24:38 GMT (envelope-from tijl@svn.freebsd.org)
Received: (from tijl@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74AOcU1039278;
	Wed, 4 Aug 2010 10:24:38 GMT (envelope-from tijl@svn.freebsd.org)
Message-Id: <201008041024.o74AOcU1039278@svn.freebsd.org>
From: Tijl Coosemans 
Date: Wed, 4 Aug 2010 10:24:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210841 - in stable/8/sys/dev/usb: . quirk
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 04 Aug 2010 10:24:38 -0000

Author: tijl
Date: Wed Aug  4 10:24:37 2010
New Revision: 210841
URL: http://svn.freebsd.org/changeset/base/210841

Log:
  MFC r210576:
  
  Add quirk for Apacer HT202 USB 2.0 Flash Drive.
  
  PR:		usb/107243
  Approved by:	kib (mentor)

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

Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- stable/8/sys/dev/usb/quirk/usb_quirk.c	Wed Aug  4 09:56:43 2010	(r210840)
+++ stable/8/sys/dev/usb/quirk/usb_quirk.c	Wed Aug  4 10:24:37 2010	(r210841)
@@ -161,6 +161,8 @@ static struct usb_quirk_entry usb_quirks
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
 	USB_QUIRK(ALCOR, TRANSCEND, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
+	USB_QUIRK(APACER, HT202, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY,
+	    UQ_MSC_NO_SYNC_CACHE),
 	USB_QUIRK(ASAHIOPTICAL, OPTIO230, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),
 	USB_QUIRK(ASAHIOPTICAL, OPTIO330, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs	Wed Aug  4 09:56:43 2010	(r210840)
+++ stable/8/sys/dev/usb/usbdevs	Wed Aug  4 10:24:37 2010	(r210841)
@@ -929,6 +929,9 @@ product APC UPS			0x0002	Uninterruptible
 product AMBIT WLAN		0x0302	WLAN
 product AMBIT NTL_250		0x6098	NTL 250 cable modem
 
+/* Apacer products */
+product APACER HT202		0xb113	USB 2.0 Flash Drive
+
 /* American Power Conversion products */
 product APC UPS			0x0002	Uninterruptible Power Supply
 

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 08:57:53 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F06D61065675;
	Thu,  5 Aug 2010 08:57:53 +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 DD3EE8FC0C;
	Thu,  5 Aug 2010 08:57:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o758vrDA040724;
	Thu, 5 Aug 2010 08:57:53 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o758vrSU040718;
	Thu, 5 Aug 2010 08:57:53 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201008050857.o758vrSU040718@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 5 Aug 2010 08:57:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210855 - in stable/8/sys: amd64/amd64 amd64/include
	ia64/include kern powerpc/include
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 08:57:54 -0000

Author: kib
Date: Thu Aug  5 08:57:53 2010
New Revision: 210855
URL: http://svn.freebsd.org/changeset/base/210855

Log:
  MFC r210369:
  When compat32 binary asks for the value of hw.machine_arch, report the
  name of 32bit sibling architecture instead of the host one.

Modified:
  stable/8/sys/amd64/amd64/identcpu.c
  stable/8/sys/amd64/include/param.h
  stable/8/sys/ia64/include/param.h
  stable/8/sys/kern/kern_mib.c
  stable/8/sys/powerpc/include/param.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/amd64/identcpu.c
==============================================================================
--- stable/8/sys/amd64/amd64/identcpu.c	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/amd64/amd64/identcpu.c	Thu Aug  5 08:57:53 2010	(r210855)
@@ -76,8 +76,30 @@ static void print_via_padlock_info(void)
 
 int	cpu_class;
 char machine[] = "amd64";
-SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, 
-    machine, 0, "Machine class");
+
+#ifdef SCTL_MASK32
+extern int adaptive_machine_arch;
+#endif
+
+static int
+sysctl_hw_machine(SYSCTL_HANDLER_ARGS)
+{
+#ifdef SCTL_MASK32
+	static const char machine32[] = "i386";
+#endif
+	int error;
+
+#ifdef SCTL_MASK32
+	if ((req->flags & SCTL_MASK32) != 0 && adaptive_machine_arch)
+		error = SYSCTL_OUT(req, machine32, sizeof(machine32));
+	else
+#endif
+		error = SYSCTL_OUT(req, machine, sizeof(machine));
+	return (error);
+
+}
+SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD,
+    NULL, 0, sysctl_hw_machine, "A", "Machine class");
 
 static char cpu_model[128];
 SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, 

Modified: stable/8/sys/amd64/include/param.h
==============================================================================
--- stable/8/sys/amd64/include/param.h	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/amd64/include/param.h	Thu Aug  5 08:57:53 2010	(r210855)
@@ -69,6 +69,9 @@
 #ifndef MACHINE_ARCH
 #define	MACHINE_ARCH	"amd64"
 #endif
+#ifndef MACHINE_ARCH32
+#define	MACHINE_ARCH32	"i386"
+#endif
 
 #if defined(SMP) || defined(KLD_MODULE)
 #define MAXCPU		32

Modified: stable/8/sys/ia64/include/param.h
==============================================================================
--- stable/8/sys/ia64/include/param.h	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/ia64/include/param.h	Thu Aug  5 08:57:53 2010	(r210855)
@@ -68,6 +68,9 @@
 #ifndef MACHINE_ARCH
 #define	MACHINE_ARCH	"ia64"
 #endif
+#ifndef MACHINE_ARCH32
+#define	MACHINE_ARCH32	"i386"
+#endif
 
 #if defined(SMP) || defined(KLD_MODULE)
 #define	MAXCPU		32

Modified: stable/8/sys/kern/kern_mib.c
==============================================================================
--- stable/8/sys/kern/kern_mib.c	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/kern/kern_mib.c	Thu Aug  5 08:57:53 2010	(r210855)
@@ -232,9 +232,31 @@ sysctl_hw_pagesizes(SYSCTL_HANDLER_ARGS)
 SYSCTL_PROC(_hw, OID_AUTO, pagesizes, CTLTYPE_ULONG | CTLFLAG_RD,
     NULL, 0, sysctl_hw_pagesizes, "LU", "Supported page sizes");
 
-static char	machine_arch[] = MACHINE_ARCH;
-SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD,
-    machine_arch, 0, "System architecture");
+#ifdef SCTL_MASK32
+int adaptive_machine_arch = 1;
+SYSCTL_INT(_debug, OID_AUTO, adaptive_machine_arch, CTLFLAG_RW,
+    &adaptive_machine_arch, 1,
+    "Adapt reported machine architecture to the ABI of the binary");
+#endif
+
+static int
+sysctl_hw_machine_arch(SYSCTL_HANDLER_ARGS)
+{
+	int error;
+	static const char machine_arch[] = MACHINE_ARCH;
+#ifdef SCTL_MASK32
+	static const char machine_arch32[] = MACHINE_ARCH32;
+
+	if ((req->flags & SCTL_MASK32) != 0 && adaptive_machine_arch)
+		error = SYSCTL_OUT(req, machine_arch32, sizeof(machine_arch32));
+	else
+#endif
+		error = SYSCTL_OUT(req, machine_arch, sizeof(machine_arch));
+	return (error);
+
+}
+SYSCTL_PROC(_hw, HW_MACHINE_ARCH, machine_arch, CTLTYPE_STRING | CTLFLAG_RD,
+    NULL, 0, sysctl_hw_machine_arch, "A", "System architecture");
 
 static int
 sysctl_hostname(SYSCTL_HANDLER_ARGS)

Modified: stable/8/sys/powerpc/include/param.h
==============================================================================
--- stable/8/sys/powerpc/include/param.h	Thu Aug  5 04:59:54 2010	(r210854)
+++ stable/8/sys/powerpc/include/param.h	Thu Aug  5 08:57:53 2010	(r210855)
@@ -69,6 +69,11 @@
 #define	MACHINE_ARCH	"powerpc"
 #endif
 #define	MID_MACHINE	MID_POWERPC
+#ifdef __powerpc64__
+#ifndef	MACHINE_ARCH32
+#define	MACHINE_ARCH32	"powerpc"
+#endif
+#endif
 
 #if defined(SMP) || defined(KLD_MODULE)
 #define	MAXCPU		2

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 10:45:28 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F173F106564A;
	Thu,  5 Aug 2010 10:45:27 +0000 (UTC) (envelope-from bcr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DEF698FC1A;
	Thu,  5 Aug 2010 10:45:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75AjR9q066456;
	Thu, 5 Aug 2010 10:45:27 GMT (envelope-from bcr@svn.freebsd.org)
Received: (from bcr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75AjRwG066453;
	Thu, 5 Aug 2010 10:45:27 GMT (envelope-from bcr@svn.freebsd.org)
Message-Id: <201008051045.o75AjRwG066453@svn.freebsd.org>
From: Benedict Reuschling 
Date: Thu, 5 Aug 2010 10:45:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210856 - in stable/8/sys/cam: . scsi
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 10:45:28 -0000

Author: bcr (doc committer)
Date: Thu Aug  5 10:45:27 2010
New Revision: 210856
URL: http://svn.freebsd.org/changeset/base/210856

Log:
  MFC r210779:
  
  Fix two (very common) occurrences of s/sytem/system in comments.
  
  Approved by:    mav
  MFC after:      3 days

Modified:
  stable/8/sys/cam/cam.c
  stable/8/sys/cam/scsi/scsi_target.c
Directory Properties:
  stable/8/sys/cam/   (props changed)

Modified: stable/8/sys/cam/cam.c
==============================================================================
--- stable/8/sys/cam/cam.c	Thu Aug  5 08:57:53 2010	(r210855)
+++ stable/8/sys/cam/cam.c	Thu Aug  5 10:45:27 2010	(r210856)
@@ -59,7 +59,7 @@ const struct cam_status_entry cam_status
 	{ CAM_REQ_ABORTED,	 "CCB request aborted by the host"	     },
 	{ CAM_UA_ABORT,		 "Unable to abort CCB request"		     },
 	{ CAM_REQ_CMP_ERR,	 "CCB request completed with an error"	     },
-	{ CAM_BUSY,		 "CAM subsytem is busy"			     },
+	{ CAM_BUSY,		 "CAM subsystem is busy"		     },
 	{ CAM_REQ_INVALID,	 "CCB request was invalid"		     },
 	{ CAM_PATH_INVALID,	 "Supplied Path ID is invalid"		     },
 	{ CAM_DEV_NOT_THERE,	 "Device Not Present"			     },

Modified: stable/8/sys/cam/scsi/scsi_target.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_target.c	Thu Aug  5 08:57:53 2010	(r210855)
+++ stable/8/sys/cam/scsi/scsi_target.c	Thu Aug  5 10:45:27 2010	(r210856)
@@ -1138,7 +1138,7 @@ targcamstatus(cam_status status)
 		return (EINVAL);
 	case CAM_RESRC_UNAVAIL:	/* Resource Unavailable */
 		return (ENOMEM);
-	case CAM_BUSY:		/* CAM subsytem is busy */
+	case CAM_BUSY:		/* CAM subsystem is busy */
 	case CAM_UA_ABORT:	/* Unable to abort CCB request */
 		return (EBUSY);
 	default:

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 17:08:24 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2775F1065672;
	Thu,  5 Aug 2010 17:08:24 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 14C478FC14;
	Thu,  5 Aug 2010 17:08:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75H8NID051446;
	Thu, 5 Aug 2010 17:08:23 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75H8NBj051442;
	Thu, 5 Aug 2010 17:08:23 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201008051708.o75H8NBj051442@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Thu, 5 Aug 2010 17:08:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210867 - stable/8/lib/libc/posix1e
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 17:08:24 -0000

Author: trasz
Date: Thu Aug  5 17:08:23 2010
New Revision: 210867
URL: http://svn.freebsd.org/changeset/base/210867

Log:
  MFC r209736:
  
  Fix acl_from_text(3) - and, therefore, setfacl(1) - for user and group
  names names starting with a digit.

Modified:
  stable/8/lib/libc/posix1e/acl_from_text.c
  stable/8/lib/libc/posix1e/acl_from_text_nfs4.c
  stable/8/lib/libc/posix1e/acl_support.h
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/posix1e/acl_from_text.c
==============================================================================
--- stable/8/lib/libc/posix1e/acl_from_text.c	Thu Aug  5 16:52:13 2010	(r210866)
+++ stable/8/lib/libc/posix1e/acl_from_text.c	Thu Aug  5 17:08:23 2010	(r210867)
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
 
 #include "acl_support.h"
 
-static int _posix1e_acl_name_to_id(acl_tag_t tag, char *name, uid_t *id);
 static acl_tag_t acl_string_to_tag(char *tag, char *qualifier);
 
 int _nfs4_acl_entry_from_text(acl_t aclp, char *entry);
@@ -148,8 +147,7 @@ _posix1e_acl_entry_from_text(acl_t aclp,
 
 		case ACL_USER:
 		case ACL_GROUP:
-			error = _posix1e_acl_name_to_id(t, qualifier,
-					&id);
+			error = _acl_name_to_id(t, qualifier, &id);
 			if (error == -1)
 				return (-1);
 			break;
@@ -275,8 +273,8 @@ error_label:
  * XXX currently doesn't deal correctly with a numeric uid being passed
  * instead of a username.  What is correct behavior here?  Check chown.
  */
-static int
-_posix1e_acl_name_to_id(acl_tag_t tag, char *name, uid_t *id)
+int
+_acl_name_to_id(acl_tag_t tag, char *name, uid_t *id)
 {
 	struct group	*g;
 	struct passwd	*p;

Modified: stable/8/lib/libc/posix1e/acl_from_text_nfs4.c
==============================================================================
--- stable/8/lib/libc/posix1e/acl_from_text_nfs4.c	Thu Aug  5 16:52:13 2010	(r210866)
+++ stable/8/lib/libc/posix1e/acl_from_text_nfs4.c	Thu Aug  5 17:08:23 2010	(r210867)
@@ -79,16 +79,14 @@ parse_tag(const char *str, acl_entry_t e
 /*
  * Parse the qualifier field of ACL entry passed as "str".
  * If user or group name cannot be resolved, then the variable
- * referenced by "need_qualifier" is set to 1.
+ * referenced by "need_qualifier" is set to 1; it will be checked
+ * later to figure out whether the appended_id is required.
  */
 static int
 parse_qualifier(char *str, acl_entry_t entry, int *need_qualifier)
 {
 	int qualifier_length, error;
-	id_t id;
-	char *end;
-	struct passwd *pwd;
-	struct group *grp;
+	uid_t id;
 	acl_tag_t tag;
 
 	assert(need_qualifier != NULL);
@@ -101,44 +99,17 @@ parse_qualifier(char *str, acl_entry_t e
 		return (-1);
 	}
 
-	/* XXX: Can we assume that valid username never begins with a digit? */
-	if (isdigit(str[0])) {
-		id = strtod(str, &end);
-
-		if (end - str != qualifier_length) {
-			warnx("malformed ACL: trailing characters "
-			    "after numerical id");
-			return (-1);
-		}
-
-		return (acl_set_qualifier(entry, &id));
-	}
-
 	error = acl_get_tag_type(entry, &tag);
 	if (error)
 		return (error);
 
-	assert(tag == ACL_USER || tag == ACL_GROUP);
-
-	if (tag == ACL_USER) {
-		/* XXX: Thread-unsafe. */
-		pwd = getpwnam(str);
-		if (pwd == NULL) {
-			*need_qualifier = 1;
-			return (0);
-		}
-
-		return (acl_set_qualifier(entry, &(pwd->pw_uid)));
-	}
-
-	/* XXX: Thread-unsafe. */
-	grp = getgrnam(str);
-	if (grp == NULL) {
+	error = _acl_name_to_id(tag, str, &id);
+	if (error) {
 		*need_qualifier = 1;
 		return (0);
 	}
 
-	return (acl_set_qualifier(entry, &(grp->gr_gid)));
+	return (acl_set_qualifier(entry, &id));
 }
 
 static int

Modified: stable/8/lib/libc/posix1e/acl_support.h
==============================================================================
--- stable/8/lib/libc/posix1e/acl_support.h	Thu Aug  5 16:52:13 2010	(r210866)
+++ stable/8/lib/libc/posix1e/acl_support.h	Thu Aug  5 17:08:23 2010	(r210867)
@@ -61,5 +61,6 @@ int	_posix1e_acl_add_entry(acl_t acl, ac
 	    acl_perm_t perm);
 char	*string_skip_whitespace(char *string);
 void	string_trim_trailing_whitespace(char *string);
+int	_acl_name_to_id(acl_tag_t tag, char *name, uid_t *id);
 
 #endif

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 19:11:14 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 12CB71065672;
	Thu,  5 Aug 2010 19:11:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0068F8FC0A;
	Thu,  5 Aug 2010 19:11:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JBDkP079545;
	Thu, 5 Aug 2010 19:11:13 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JBDMa079543;
	Thu, 5 Aug 2010 19:11:13 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051911.o75JBDMa079543@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 19:11:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210884 - stable/8/sys/fs/nfsclient
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 19:11:14 -0000

Author: jhb
Date: Thu Aug  5 19:11:13 2010
New Revision: 210884
URL: http://svn.freebsd.org/changeset/base/210884

Log:
  MFC 210135:
  Move attribute cache flushes from VOP_OPEN() to VOP_LOOKUP() to provide
  more graceful recovery for stale filehandles and eliminate the need for
  conditionally clearing the attribute cache in the !NMODIFIED case in
  VOP_OPEN().

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

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Thu Aug  5 19:08:54 2010	(r210883)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Thu Aug  5 19:11:13 2010	(r210884)
@@ -516,9 +516,11 @@ nfs_open(struct vop_open_args *ap)
 					(void) nfsrpc_close(vp, 0, ap->a_td);
 				return (error);
 			}
+			mtx_lock(&np->n_mtx);
 			np->n_attrstamp = 0;
 			if (vp->v_type == VDIR)
 				np->n_direofoffset = 0;
+			mtx_unlock(&np->n_mtx);
 			error = VOP_GETATTR(vp, &vattr, ap->a_cred);
 			if (error) {
 				if (NFS_ISV4(vp))
@@ -531,14 +533,6 @@ nfs_open(struct vop_open_args *ap)
 				np->n_change = vattr.va_filerev;
 			mtx_unlock(&np->n_mtx);
 		} else {
-			struct thread *td = curthread;
-	
-			if (np->n_ac_ts_syscalls != td->td_syscalls ||
-			    np->n_ac_ts_tid != td->td_tid || 
-			    td->td_proc == NULL ||
-			    np->n_ac_ts_pid != td->td_proc->p_pid) {
-				np->n_attrstamp = 0;
-			}
 			mtx_unlock(&np->n_mtx);						
 			error = VOP_GETATTR(vp, &vattr, ap->a_cred);
 			if (error) {
@@ -998,7 +992,7 @@ nfs_lookup(struct vop_lookup_args *ap)
 	int flags = cnp->cn_flags;
 	struct vnode *newvp;
 	struct nfsmount *nmp;
-	struct nfsnode *np;
+	struct nfsnode *np, *newnp;
 	int error = 0, attrflag, dattrflag, ltype;
 	struct thread *td = cnp->cn_thread;
 	struct nfsfh *nfhp;
@@ -1034,11 +1028,27 @@ nfs_lookup(struct vop_lookup_args *ap)
 		 * change time of the file matches our cached copy.
 		 * Otherwise, we discard the cache entry and fallback
 		 * to doing a lookup RPC.
+		 *
+		 * To better handle stale file handles and attributes,
+		 * clear the attribute cache of this node if it is a
+		 * leaf component, part of an open() call, and not
+		 * locally modified before fetching the attributes.
+		 * This should allow stale file handles to be detected
+		 * here where we can fall back to a LOOKUP RPC to
+		 * recover rather than having nfs_open() detect the
+		 * stale file handle and failing open(2) with ESTALE.
 		 */
 		newvp = *vpp;
+		newnp = VTONFS(newvp);
+		if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) &&
+		    !(newnp->n_flag & NMODIFIED)) {
+			mtx_lock(&newnp->n_mtx);
+			newnp->n_attrstamp = 0;
+			mtx_unlock(&newnp->n_mtx);
+		}
 		if (nfscl_nodeleg(newvp, 0) == 0 ||
-		    (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred)
-		    && vattr.va_ctime.tv_sec == VTONFS(newvp)->n_ctime)) {
+		    (VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 &&
+		    vattr.va_ctime.tv_sec == newnp->n_ctime)) {
 			NFSINCRGLOBAL(newnfsstats.lookupcache_hits);
 			if (cnp->cn_nameiop != LOOKUP &&
 			    (flags & ISLASTCN))
@@ -1224,6 +1234,18 @@ nfs_lookup(struct vop_lookup_args *ap)
 		if (attrflag)
 			(void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
 			    0, 1);
+		else if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) &&
+		    !(np->n_flag & NMODIFIED)) {			
+			/*
+			 * Flush the attribute cache when opening a
+			 * leaf node to ensure that fresh attributes
+			 * are fetched in nfs_open() since we did not
+			 * fetch attributes from the LOOKUP reply.
+			 */
+			mtx_lock(&np->n_mtx);
+			np->n_attrstamp = 0;
+			mtx_unlock(&np->n_mtx);
+		}
 	}
 	if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN))
 		cnp->cn_flags |= SAVENAME;

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 19:40:49 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1B1B91065677;
	Thu,  5 Aug 2010 19:40:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0846A8FC26;
	Thu,  5 Aug 2010 19:40: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 o75JemNL086243;
	Thu, 5 Aug 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JemTt086238;
	Thu, 5 Aug 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051940.o75JemTt086238@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 19:40:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210888 - in stable/8/sys: fs/nfsclient nfsclient
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 19:40:49 -0000

Author: jhb
Date: Thu Aug  5 19:40:48 2010
New Revision: 210888
URL: http://svn.freebsd.org/changeset/base/210888

Log:
  MFC 210136:
  Retire the NFS access cache timestamp structure.  It was used in VOP_OPEN()
  to avoid sending multiple ACCESS/GETATTR RPCs during a single open()
  between VOP_LOOKUP() and VOP_OPEN().  Now we always send the RPC in
  VOP_LOOKUP() and not VOP_OPEN() in the cases that multiple RPCs could be
  sent.
  
  To preserve the ABI I have left the structure in place, but renamed it
  to 'n_unused' and just removed the code that updates it.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clport.c
  stable/8/sys/fs/nfsclient/nfsnode.h
  stable/8/sys/nfsclient/nfs_subs.c
  stable/8/sys/nfsclient/nfsnode.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clport.c	Thu Aug  5 19:30:57 2010	(r210887)
+++ stable/8/sys/fs/nfsclient/nfs_clport.c	Thu Aug  5 19:40:48 2010	(r210888)
@@ -340,7 +340,6 @@ nfscl_loadattrcache(struct vnode **vpp, 
 	struct nfsnode *np;
 	struct nfsmount *nmp;
 	struct timespec mtime_save;
-	struct thread *td = curthread;
 
 	/*
 	 * If v_type == VNON it is a new node, so fill in the v_type,
@@ -386,14 +385,6 @@ nfscl_loadattrcache(struct vnode **vpp, 
 	else
 		vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
 	np->n_attrstamp = time_second;
-	/* Timestamp the NFS otw getattr fetch */
-	if (td->td_proc) {
-		np->n_ac_ts_tid = td->td_tid;
-		np->n_ac_ts_pid = td->td_proc->p_pid;
-		np->n_ac_ts_syscalls = td->td_syscalls;
-	} else
-		bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp));
-	
 	if (vap->va_size != np->n_size) {
 		if (vap->va_type == VREG) {
 			if (dontshrink && vap->va_size < np->n_size) {

Modified: stable/8/sys/fs/nfsclient/nfsnode.h
==============================================================================
--- stable/8/sys/fs/nfsclient/nfsnode.h	Thu Aug  5 19:30:57 2010	(r210887)
+++ stable/8/sys/fs/nfsclient/nfsnode.h	Thu Aug  5 19:40:48 2010	(r210888)
@@ -68,10 +68,6 @@ struct nfsdmap {
 #define	ndm_cookies	ndm_un1.ndmu3_cookies
 #define	ndm4_cookies	ndm_un1.ndmu4_cookies
 
-#define	n_ac_ts_tid		n_ac_ts.nfs_ac_ts_tid
-#define	n_ac_ts_pid		n_ac_ts.nfs_ac_ts_pid
-#define	n_ac_ts_syscalls	n_ac_ts.nfs_ac_ts_syscalls
-
 struct nfs_attrcache_timestamp {
 	lwpid_t		nfs_ac_ts_tid;
 	pid_t		nfs_ac_ts_pid;
@@ -132,7 +128,7 @@ struct nfsnode {
 	u_int32_t		n_flag;		/* Flag for locking.. */
 	int			n_directio_opens;
 	int                     n_directio_asyncwr;
-	struct nfs_attrcache_timestamp n_ac_ts;
+	struct nfs_attrcache_timestamp n_unused;
 	u_int64_t		 n_change;	/* old Change attribute */
 	struct nfsv4node	*n_v4;		/* extra V4 stuff */
 };

Modified: stable/8/sys/nfsclient/nfs_subs.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_subs.c	Thu Aug  5 19:30:57 2010	(r210887)
+++ stable/8/sys/nfsclient/nfs_subs.c	Thu Aug  5 19:40:48 2010	(r210888)
@@ -470,7 +470,6 @@ nfs_loadattrcache(struct vnode **vpp, st
 	u_short vmode;
 	struct timespec mtime, mtime_save;
 	int v3 = NFS_ISV3(vp);
-	struct thread *td = curthread;
 	int error = 0;
 
 	md = *mdp;
@@ -574,14 +573,6 @@ nfs_loadattrcache(struct vnode **vpp, st
 		vap->va_filerev = 0;
 	}
 	np->n_attrstamp = time_second;
-	/* Timestamp the NFS otw getattr fetch */
-	if (td->td_proc) {
-		np->n_ac_ts_tid = td->td_tid;
-		np->n_ac_ts_pid = td->td_proc->p_pid;
-		np->n_ac_ts_syscalls = td->td_syscalls;
-	} else
-		bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp));
-	
 	if (vap->va_size != np->n_size) {
 		if (vap->va_type == VREG) {
 			if (dontshrink && vap->va_size < np->n_size) {

Modified: stable/8/sys/nfsclient/nfsnode.h
==============================================================================
--- stable/8/sys/nfsclient/nfsnode.h	Thu Aug  5 19:30:57 2010	(r210887)
+++ stable/8/sys/nfsclient/nfsnode.h	Thu Aug  5 19:40:48 2010	(r210888)
@@ -74,10 +74,6 @@ struct nfsdmap {
 #define ndm_cookies	ndm_un1.ndmu3_cookies
 #define ndm4_cookies	ndm_un1.ndmu4_cookies
 
-#define n_ac_ts_tid		n_ac_ts.nfs_ac_ts_tid
-#define n_ac_ts_pid		n_ac_ts.nfs_ac_ts_pid
-#define n_ac_ts_syscalls	n_ac_ts.nfs_ac_ts_syscalls
-
 struct nfs_attrcache_timestamp {
 	lwpid_t		nfs_ac_ts_tid;
 	pid_t		nfs_ac_ts_pid;
@@ -140,7 +136,7 @@ struct nfsnode {
 	uint32_t		n_namelen;
 	int			n_directio_opens;
 	int                     n_directio_asyncwr;
-	struct nfs_attrcache_timestamp n_ac_ts;
+	struct nfs_attrcache_timestamp n_unused;
 };
 
 #define n_atim		n_un1.nf_atim

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 19:43:19 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5777B1065670;
	Thu,  5 Aug 2010 19:43:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 456C38FC14;
	Thu,  5 Aug 2010 19:43:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75JhJSc086984;
	Thu, 5 Aug 2010 19:43:19 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JhJ0T086982;
	Thu, 5 Aug 2010 19:43:19 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008051943.o75JhJ0T086982@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 19:43:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210890 - stable/8/sys/dev/ipmi
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 19:43:19 -0000

Author: jhb
Date: Thu Aug  5 19:43:19 2010
New Revision: 210890
URL: http://svn.freebsd.org/changeset/base/210890

Log:
  MFC 210604:
  Fix test for double-nul characters that terminate the string table at
  the end of each SMBIOS/DMI structure.

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

Modified: stable/8/sys/dev/ipmi/ipmi_smbios.c
==============================================================================
--- stable/8/sys/dev/ipmi/ipmi_smbios.c	Thu Aug  5 19:41:43 2010	(r210889)
+++ stable/8/sys/dev/ipmi/ipmi_smbios.c	Thu Aug  5 19:43:19 2010	(r210890)
@@ -189,7 +189,7 @@ smbios_walk_table(uint8_t *p, int entrie
 		 * formatted area of this structure.
 		 */
 		p += s->length;
-		while (p[0] != 0 && p[1] != 0)
+		while (!(p[0] == 0 && p[1] == 0))
 			p++;
 
 		/*

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 20:02:59 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 961A71065673;
	Thu,  5 Aug 2010 20:02:59 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 82CF18FC12;
	Thu,  5 Aug 2010 20:02:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75K2xvW091593;
	Thu, 5 Aug 2010 20:02:59 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75K2xV2091590;
	Thu, 5 Aug 2010 20:02:59 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201008052002.o75K2xV2091590@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Thu, 5 Aug 2010 20:02:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210893 - stable/8/sys/dev/hwpmc
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 20:02:59 -0000

Author: gnn
Date: Thu Aug  5 20:02:59 2010
New Revision: 210893
URL: http://svn.freebsd.org/changeset/base/210893

Log:
  MFC: 210621
  
  Make sure that we clear the correct bits when we turn off
  a PMC.  It was possible that we could have turned a bit on but
  never cleared it.
  
  Extend the calls to rdmsr() to all necessary functions, not
  just those which previously caused a panic.
  
  Pointed out by: jhb@

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

Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_core.c	Thu Aug  5 19:54:57 2010	(r210892)
+++ stable/8/sys/dev/hwpmc/hwpmc_core.c	Thu Aug  5 20:02:59 2010	(r210893)
@@ -168,13 +168,13 @@ core_pcpu_fini(struct pmc_mdep *md, int 
 	core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri;
 
 	for (n = 0; n < npmc; n++) {
-		msr = rdmsr(IAP_EVSEL0 + n);
-		wrmsr(IAP_EVSEL0 + n, msr & ~IAP_EVSEL_MASK);
+		msr = rdmsr(IAP_EVSEL0 + n) & ~IAP_EVSEL_MASK;
+		wrmsr(IAP_EVSEL0 + n, msr);
 	}
 
 	if (core_cputype != PMC_CPU_INTEL_CORE) {
-		msr = rdmsr(IAF_CTRL);
-		wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK);
+		msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
+		wrmsr(IAF_CTRL, msr);
 		npmc += md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF].pcd_num;
 	}
 
@@ -392,13 +392,13 @@ iaf_start_pmc(int cpu, int ri)
 
 	iafc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl;
 
- 	msr = rdmsr(IAF_CTRL);
+ 	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
  	wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK));
 
 	do {
 		iafc->pc_resync = 0;
 		iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET));
- 		msr = rdmsr(IA_GLOBAL_CTRL);
+ 		msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK;
  		wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & 
  					     IAF_GLOBAL_CTRL_MASK));
 	} while (iafc->pc_resync != 0);
@@ -434,13 +434,13 @@ iaf_stop_pmc(int cpu, int ri)
 	iafc->pc_iafctrl &= ~fc;
 
 	PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl);
- 	msr = rdmsr(IAF_CTRL);
+ 	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
  	wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK));
 
 	do {
 		iafc->pc_resync = 0;
 		iafc->pc_globalctrl &= ~(1ULL << (ri + IAF_OFFSET));
- 		msr = rdmsr(IA_GLOBAL_CTRL);
+ 		msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK;
  		wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl &
  					     IAF_GLOBAL_CTRL_MASK));
 	} while (iafc->pc_resync != 0);
@@ -473,10 +473,14 @@ iaf_write_pmc(int cpu, int ri, pmc_value
 	if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm)))
 		v = iaf_reload_count_to_perfctr_value(v);
 
-	msr = rdmsr(IAF_CTRL);
-	wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK);
+	/* Turn off fixed counters */
+	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
+	wrmsr(IAF_CTRL, msr); 
+
 	wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1));
-	msr = rdmsr(IAF_CTRL);
+
+	/* Turn on fixed counters */
+	msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK;
 	wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK));
 
 	PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx "
@@ -1910,15 +1914,17 @@ iap_stop_pmc(int cpu, int ri)
 
 	PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri);
 
-	msr = rdmsr(IAP_EVSEL0 + ri);
-	wrmsr(IAP_EVSEL0 + ri, msr & IAP_EVSEL_MASK);	/* stop hw */
+	msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK;
+	wrmsr(IAP_EVSEL0 + ri, msr);	/* stop hw */
 
 	if (core_cputype == PMC_CPU_INTEL_CORE)
 		return (0);
 
+	msr = 0;
 	do {
 		cc->pc_resync = 0;
 		cc->pc_globalctrl &= ~(1ULL << ri);
+		msr = rdmsr(IA_GLOBAL_CTRL) & ~IA_GLOBAL_CTRL_MASK;
 		wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl);
 	} while (cc->pc_resync != 0);
 
@@ -2004,7 +2010,7 @@ core_intr(int cpu, struct trapframe *tf)
 	struct pmc *pm;
 	struct core_cpu *cc;
 	int error, found_interrupt, ri;
-	uint64_t msr = 0;
+	uint64_t msr;
 
 	PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf,
 	    TRAPF_USERMODE(tf));
@@ -2036,15 +2042,15 @@ core_intr(int cpu, struct trapframe *tf)
 		 * Stop the counter, reload it but only restart it if
 		 * the PMC is not stalled.
 		 */
-		msr = rdmsr(IAP_EVSEL0 + ri);
-		wrmsr(IAP_EVSEL0 + ri, msr & ~IAP_EVSEL_MASK);
+		msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK;
+		wrmsr(IAP_EVSEL0 + ri, msr);
 		wrmsr(IAP_PMC0 + ri, v);
 
 		if (error)
 			continue;
 
-		wrmsr(IAP_EVSEL0 + ri,
-		    pm->pm_md.pm_iap.pm_iap_evsel | IAP_EN);
+		wrmsr(IAP_EVSEL0 + ri, msr | (pm->pm_md.pm_iap.pm_iap_evsel | 
+					      IAP_EN));
 	}
 
 	if (found_interrupt)
@@ -2060,7 +2066,7 @@ static int
 core2_intr(int cpu, struct trapframe *tf)
 {
 	int error, found_interrupt, n;
-	uint64_t flag, intrstatus, intrenable;
+	uint64_t flag, intrstatus, intrenable, msr;
 	struct pmc *pm;
 	struct core_cpu *cc;
 	pmc_value_t v;
@@ -2091,7 +2097,8 @@ core2_intr(int cpu, struct trapframe *tf
 	/*
 	 * Stop PMCs and clear overflow status bits.
 	 */
-	wrmsr(IA_GLOBAL_CTRL, 0);
+	msr = rdmsr(IA_GLOBAL_CTRL) & ~IA_GLOBAL_CTRL_MASK;
+	wrmsr(IA_GLOBAL_CTRL, msr);
 	wrmsr(IA_GLOBAL_OVF_CTRL, intrenable |
 	    IA_GLOBAL_STATUS_FLAG_OVFBUF |
 	    IA_GLOBAL_STATUS_FLAG_CONDCHG);
@@ -2162,7 +2169,7 @@ core2_intr(int cpu, struct trapframe *tf
 
 	cc->pc_globalctrl |= intrenable;
 
-	wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl);
+	wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl & IA_GLOBAL_CTRL_MASK);
 
 	PMCDBG(MDP,INT, 1, "cpu=%d fixedctrl=%jx globalctrl=%jx status=%jx "
 	    "ovf=%jx", cpu, (uintmax_t) rdmsr(IAF_CTRL),

Modified: stable/8/sys/dev/hwpmc/hwpmc_core.h
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_core.h	Thu Aug  5 19:54:57 2010	(r210892)
+++ stable/8/sys/dev/hwpmc/hwpmc_core.h	Thu Aug  5 20:02:59 2010	(r210893)
@@ -144,6 +144,12 @@ struct pmc_md_iap_op_pmcallocate {
 /* The mask is only for the fixed porttion of the register. */
 #define	IAF_GLOBAL_CTRL_MASK			0x0000000700000000
 
+/* The mask is only for the programmable porttion of the register. */
+#define IAP_GLOBAL_CTRL_MASK			0x00000000ffffffff
+
+/* The mask is for both the fixed and programmable porttions of the register. */
+#define IA_GLOBAL_CTRL_MASK			0x00000007ffffffff
+
 #define	IA_GLOBAL_OVF_CTRL			0x390
 
 #define	IA_GLOBAL_STATUS_FLAG_CONDCHG		(1ULL << 63)

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 20:39:53 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F26831065678;
	Thu,  5 Aug 2010 20:39:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C5E3D8FC18;
	Thu,  5 Aug 2010 20:39: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 o75KdqK8099841;
	Thu, 5 Aug 2010 20:39:52 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75KdqAs099839;
	Thu, 5 Aug 2010 20:39:52 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052039.o75KdqAs099839@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 20:39:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210894 - stable/8/sys/dev/cxgb
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 20:39:53 -0000

Author: jhb
Date: Thu Aug  5 20:39:52 2010
New Revision: 210894
URL: http://svn.freebsd.org/changeset/base/210894

Log:
  MFC 210505:
  - Change the warning about PCI-e links narrower than x8 to only apply to
    10G cards.  1G cards are x4 only.
  - Use constants from pcireg.h for reading the current link width.
  - Use pci_set_max_read_req() rather than implementing it by hand.

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

Modified: stable/8/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- stable/8/sys/dev/cxgb/cxgb_main.c	Thu Aug  5 20:02:59 2010	(r210893)
+++ stable/8/sys/dev/cxgb/cxgb_main.c	Thu Aug  5 20:39:52 2010	(r210894)
@@ -454,20 +454,18 @@ cxgb_controller_attach(device_t dev)
 
 	/* find the PCIe link width and set max read request to 4KB*/
 	if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
-		uint16_t lnk, pectl;
-		lnk = pci_read_config(dev, reg + 0x12, 2);
-		sc->link_width = (lnk >> 4) & 0x3f;
-		
-		pectl = pci_read_config(dev, reg + 0x8, 2);
-		pectl = (pectl & ~0x7000) | (5 << 12);
-		pci_write_config(dev, reg + 0x8, pectl, 2);
-	}
+		uint16_t lnk;
+
+		lnk = pci_read_config(dev, reg + PCIR_EXPRESS_LINK_STA, 2);
+		sc->link_width = (lnk & PCIM_LINK_STA_WIDTH) >> 4;
+		if (sc->link_width < 8 &&
+		    (ai->caps & SUPPORTED_10000baseT_Full)) {
+			device_printf(sc->dev,
+			    "PCIe x%d Link, expect reduced performance\n",
+			    sc->link_width);
+		}
 
-	if (sc->link_width != 0 && sc->link_width <= 4 &&
-	    (ai->nports0 + ai->nports1) <= 2) {
-		device_printf(sc->dev,
-		    "PCIe x%d Link, expect reduced performance\n",
-		    sc->link_width);
+		pci_set_max_read_req(dev, 4096);
 	}
 
 	touch_bars(dev);

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 21:01:16 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 355DA106566C;
	Thu,  5 Aug 2010 21:01:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 221A68FC12;
	Thu,  5 Aug 2010 21:01:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75L1GLM004882;
	Thu, 5 Aug 2010 21:01:16 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75L1F9n004877;
	Thu, 5 Aug 2010 21:01:15 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052101.o75L1F9n004877@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 21:01:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210898 - in stable/8/sys: amd64/amd64 amd64/include
	i386/i386 i386/include
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 21:01:16 -0000

Author: jhb
Date: Thu Aug  5 21:01:15 2010
New Revision: 210898
URL: http://svn.freebsd.org/changeset/base/210898

Log:
  MFC 210577: The corrected error count field is dependent on CMCI, not TES.

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

Modified: stable/8/sys/amd64/amd64/mca.c
==============================================================================
--- stable/8/sys/amd64/amd64/mca.c	Thu Aug  5 20:49:47 2010	(r210897)
+++ stable/8/sys/amd64/amd64/mca.c	Thu Aug  5 21:01:15 2010	(r210898)
@@ -245,7 +245,7 @@ mca_log(const struct mca_record *rec)
 		printf("UNCOR ");
 	else {
 		printf("COR ");
-		if (rec->mr_mcg_cap & MCG_CAP_TES_P)
+		if (rec->mr_mcg_cap & MCG_CAP_CMCI_P)
 			printf("(%lld) ", ((long long)rec->mr_status &
 			    MC_STATUS_COR_COUNT) >> 38);
 	}

Modified: stable/8/sys/amd64/include/specialreg.h
==============================================================================
--- stable/8/sys/amd64/include/specialreg.h	Thu Aug  5 20:49:47 2010	(r210897)
+++ stable/8/sys/amd64/include/specialreg.h	Thu Aug  5 21:01:15 2010	(r210898)
@@ -372,10 +372,10 @@
 #define	MC_STATUS_MCA_ERROR	0x000000000000ffff
 #define	MC_STATUS_MODEL_ERROR	0x00000000ffff0000
 #define	MC_STATUS_OTHER_INFO	0x01ffffff00000000
-#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_CMCI_P */
 #define	MC_STATUS_TES_STATUS	0x0060000000000000	/* If MCG_CAP_TES_P */
-#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_CMCI_P */
-#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_CMCI_P */
+#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_TES_P */
 #define	MC_STATUS_PCC		0x0200000000000000
 #define	MC_STATUS_ADDRV		0x0400000000000000
 #define	MC_STATUS_MISCV		0x0800000000000000

Modified: stable/8/sys/i386/i386/mca.c
==============================================================================
--- stable/8/sys/i386/i386/mca.c	Thu Aug  5 20:49:47 2010	(r210897)
+++ stable/8/sys/i386/i386/mca.c	Thu Aug  5 21:01:15 2010	(r210898)
@@ -252,7 +252,7 @@ mca_log(const struct mca_record *rec)
 		printf("UNCOR ");
 	else {
 		printf("COR ");
-		if (rec->mr_mcg_cap & MCG_CAP_TES_P)
+		if (rec->mr_mcg_cap & MCG_CAP_CMCI_P)
 			printf("(%lld) ", ((long long)rec->mr_status &
 			    MC_STATUS_COR_COUNT) >> 38);
 	}

Modified: stable/8/sys/i386/include/specialreg.h
==============================================================================
--- stable/8/sys/i386/include/specialreg.h	Thu Aug  5 20:49:47 2010	(r210897)
+++ stable/8/sys/i386/include/specialreg.h	Thu Aug  5 21:01:15 2010	(r210898)
@@ -441,10 +441,10 @@
 #define	MC_STATUS_MCA_ERROR	0x000000000000ffff
 #define	MC_STATUS_MODEL_ERROR	0x00000000ffff0000
 #define	MC_STATUS_OTHER_INFO	0x01ffffff00000000
-#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_COR_COUNT	0x001fffc000000000	/* If MCG_CAP_CMCI_P */
 #define	MC_STATUS_TES_STATUS	0x0060000000000000	/* If MCG_CAP_TES_P */
-#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_CMCI_P */
-#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_CMCI_P */
+#define	MC_STATUS_AR		0x0080000000000000	/* If MCG_CAP_TES_P */
+#define	MC_STATUS_S		0x0100000000000000	/* If MCG_CAP_TES_P */
 #define	MC_STATUS_PCC		0x0200000000000000
 #define	MC_STATUS_ADDRV		0x0400000000000000
 #define	MC_STATUS_MISCV		0x0800000000000000

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Aug  5 22:01:14 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95464106567D;
	Thu,  5 Aug 2010 22:01:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 68D2B8FC08;
	Thu,  5 Aug 2010 22:01:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75M1EE0018253;
	Thu, 5 Aug 2010 22:01:14 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75M1EgF018249;
	Thu, 5 Aug 2010 22:01:14 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201008052201.o75M1EgF018249@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 5 Aug 2010 22:01:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210901 - in stable/8/sys: amd64/include i386/include
	ia64/include
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 05 Aug 2010 22:01:14 -0000

Author: jhb
Date: Thu Aug  5 22:01:14 2010
New Revision: 210901
URL: http://svn.freebsd.org/changeset/base/210901

Log:
  MFC 210623:
  Mark the __curthread() functions as __pure2 and remove the volatile keyword
  from the inline assembly.  This allows the compiler to cache invocations of
  curthread since it's value does not change within a thread context.

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

Modified: stable/8/sys/amd64/include/pcpu.h
==============================================================================
--- stable/8/sys/amd64/include/pcpu.h	Thu Aug  5 21:31:29 2010	(r210900)
+++ stable/8/sys/amd64/include/pcpu.h	Thu Aug  5 22:01:14 2010	(r210901)
@@ -216,12 +216,12 @@ extern struct pcpu *pcpup;
 #define	PCPU_PTR(member)	__PCPU_PTR(pc_ ## member)
 #define	PCPU_SET(member, val)	__PCPU_SET(pc_ ## member, val)
 
-static __inline struct thread *
+static __inline __pure2 struct thread *
 __curthread(void)
 {
 	struct thread *td;
 
-	__asm __volatile("movq %%gs:0,%0" : "=r" (td));
+	__asm("movq %%gs:0,%0" : "=r" (td));
 	return (td);
 }
 #define	curthread		(__curthread())

Modified: stable/8/sys/i386/include/pcpu.h
==============================================================================
--- stable/8/sys/i386/include/pcpu.h	Thu Aug  5 21:31:29 2010	(r210900)
+++ stable/8/sys/i386/include/pcpu.h	Thu Aug  5 22:01:14 2010	(r210901)
@@ -223,12 +223,12 @@ extern struct pcpu *pcpup;
 #define	PCPU_PTR(member)	__PCPU_PTR(pc_ ## member)
 #define	PCPU_SET(member, val)	__PCPU_SET(pc_ ## member, val)
 
-static __inline struct thread *
+static __inline __pure2 struct thread *
 __curthread(void)
 {
 	struct thread *td;
 
-	__asm __volatile("movl %%fs:0,%0" : "=r" (td));
+	__asm("movl %%fs:0,%0" : "=r" (td));
 	return (td);
 }
 #define	curthread		(__curthread())

Modified: stable/8/sys/ia64/include/pcpu.h
==============================================================================
--- stable/8/sys/ia64/include/pcpu.h	Thu Aug  5 21:31:29 2010	(r210900)
+++ stable/8/sys/ia64/include/pcpu.h	Thu Aug  5 22:01:14 2010	(r210901)
@@ -70,12 +70,12 @@ struct pcpu;
 
 register struct pcpu *pcpup __asm__("r13");
 
-static __inline struct thread *
+static __inline __pure2 struct thread *
 __curthread(void)
 {
 	struct thread *td;
 
-	__asm __volatile("ld8.acq %0=[r13]" : "=r"(td));
+	__asm("ld8.acq %0=[r13]" : "=r"(td));
 	return (td);
 }
 #define	curthread	(__curthread())

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Aug  6 08:17:44 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 77C031065672;
	Fri,  6 Aug 2010 08:17:44 +0000 (UTC)
	(envelope-from brian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 655D58FC21;
	Fri,  6 Aug 2010 08:17:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o768HihH055935;
	Fri, 6 Aug 2010 08:17:44 GMT (envelope-from brian@svn.freebsd.org)
Received: (from brian@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o768HiTu055933;
	Fri, 6 Aug 2010 08:17:44 GMT (envelope-from brian@svn.freebsd.org)
Message-Id: <201008060817.o768HiTu055933@svn.freebsd.org>
From: Brian Somers 
Date: Fri, 6 Aug 2010 08:17:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210915 - stable/8/sbin/dhclient
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 06 Aug 2010 08:17:44 -0000

Author: brian
Date: Fri Aug  6 08:17:44 2010
New Revision: 210915
URL: http://svn.freebsd.org/changeset/base/210915

Log:
  MFC r209756:
      Log dhclient's reason for exiting and change the 10 second
      ignore-routing-messages dhclient-script timeout to be effective
      from script completion rather than from script start time.
  
      Ignore RTM_DELADDR and RTM_NEWADDR messages when the message
      contains no interface address (which should not happen) rather than
      exiting.

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

Modified: stable/8/sbin/dhclient/dhclient.c
==============================================================================
--- stable/8/sbin/dhclient/dhclient.c	Fri Aug  6 07:32:33 2010	(r210914)
+++ stable/8/sbin/dhclient/dhclient.c	Fri Aug  6 08:17:44 2010	(r210915)
@@ -126,7 +126,7 @@ int		 fork_privchld(int, int);
 	    ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
 #define	ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
 
-time_t	scripttime;
+static time_t	scripttime;
 
 int
 findproto(char *cp, int n)
@@ -204,7 +204,7 @@ disassoc(void *arg)
 void
 routehandler(struct protocol *p)
 {
-	char msg[2048];
+	char msg[2048], *addr;
 	struct rt_msghdr *rtm;
 	struct if_msghdr *ifm;
 	struct ifa_msghdr *ifam;
@@ -224,13 +224,6 @@ routehandler(struct protocol *p)
 
 	switch (rtm->rtm_type) {
 	case RTM_NEWADDR:
-		/*
-		 * XXX: If someone other than us adds our address,
-		 * we should assume they are taking over from us,
-		 * delete the lease record, and exit without modifying
-		 * the interface.
-		 */
-		break;
 	case RTM_DELADDR:
 		ifam = (struct ifa_msghdr *)rtm;
 
@@ -243,7 +236,7 @@ routehandler(struct protocol *p)
 
 		sa = get_ifa((char *)(ifam + 1), ifam->ifam_addrs);
 		if (sa == NULL)
-			goto die;
+			break;
 
 		if ((a.len = sizeof(struct in_addr)) > sizeof(a.iabuf))
 			error("king bula sez: len mismatch");
@@ -255,21 +248,42 @@ routehandler(struct protocol *p)
 			if (addr_eq(a, l->address))
 				break;
 
-		if (l == NULL)	/* deleted addr is not the one we set */
+		if (l == NULL)	/* added/deleted addr is not the one we set */
 			break;
-		goto die;
+
+		addr = inet_ntoa(((struct sockaddr_in *)sa)->sin_addr);
+		if (rtm->rtm_type == RTM_NEWADDR)  {
+			/*
+			 * XXX: If someone other than us adds our address,
+			 * should we assume they are taking over from us,
+			 * delete the lease record, and exit without modifying
+			 * the interface?
+			 */
+			warning("My address (%s) was re-added", addr);
+		} else {
+			warning("My address (%s) was deleted, dhclient exiting",
+			    addr);
+			goto die;
+		}
+		break;
 	case RTM_IFINFO:
 		ifm = (struct if_msghdr *)rtm;
 		if (ifm->ifm_index != ifi->index)
 			break;
-		if ((rtm->rtm_flags & RTF_UP) == 0)
+		if ((rtm->rtm_flags & RTF_UP) == 0) {
+			warning("Interface %s is down, dhclient exiting",
+			    ifi->name);
 			goto die;
+		}
 		break;
 	case RTM_IFANNOUNCE:
 		ifan = (struct if_announcemsghdr *)rtm;
 		if (ifan->ifan_what == IFAN_DEPARTURE &&
-		    ifan->ifan_index == ifi->index)
+		    ifan->ifan_index == ifi->index) {
+			warning("Interface %s is gone, dhclient exiting",
+			    ifi->name);
 			goto die;
+		}
 		break;
 	case RTM_IEEE80211:
 		ifan = (struct if_announcemsghdr *)rtm;
@@ -2110,8 +2124,6 @@ script_go(void)
 	struct buf	*buf;
 	int		 ret;
 
-	scripttime = time(NULL);
-
 	hdr.code = IMSG_SCRIPT_GO;
 	hdr.len = sizeof(struct imsg_hdr);
 
@@ -2132,6 +2144,8 @@ script_go(void)
 		error("received corrupted message");
 	buf_read(privfd, &ret, sizeof(ret));
 
+	scripttime = time(NULL);
+
 	return (ret);
 }
 

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Aug  6 08:59:54 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AA9271065673;
	Fri,  6 Aug 2010 08:59:54 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 989228FC22;
	Fri,  6 Aug 2010 08:59:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o768xscU065428;
	Fri, 6 Aug 2010 08:59:54 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o768xs7k065426;
	Fri, 6 Aug 2010 08:59:54 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008060859.o768xs7k065426@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 6 Aug 2010 08:59:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210917 - stable/8/games/pom
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 06 Aug 2010 08:59:54 -0000

Author: uqs
Date: Fri Aug  6 08:59:54 2010
New Revision: 210917
URL: http://svn.freebsd.org/changeset/base/210917

Log:
  MFC r210637: Fix typo in pom(6) manpage
  
  PR:		docs/148825
  Submitted by:	Anatoly Borodin

Modified:
  stable/8/games/pom/pom.6
Directory Properties:
  stable/8/games/pom/   (props changed)

Modified: stable/8/games/pom/pom.6
==============================================================================
--- stable/8/games/pom/pom.6	Fri Aug  6 08:21:03 2010	(r210916)
+++ stable/8/games/pom/pom.6	Fri Aug  6 08:59:54 2010	(r210917)
@@ -57,7 +57,7 @@ option to print just the phase as a perc
 Use the arguments
 .Fl d
 and
-.Fl o
+.Fl t
 to specify a specific date and time for which the phase of the moon
 has to be calculated.
 If

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Aug  6 09:08:19 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 064811065674;
	Fri,  6 Aug 2010 09:08:19 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E64418FC22;
	Fri,  6 Aug 2010 09:08:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7698Ij0067413;
	Fri, 6 Aug 2010 09:08:18 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7698IaK067406;
	Fri, 6 Aug 2010 09:08:18 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201008060908.o7698IaK067406@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 6 Aug 2010 09:08:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210919 - in stable/8: lib/libc/sys share/man/man4
	tools/debugscripts usr.bin/ar usr.sbin/sysinstall/help
	usr.sbin/ugidfw
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 06 Aug 2010 09:08:19 -0000

Author: uqs
Date: Fri Aug  6 09:08:18 2010
New Revision: 210919
URL: http://svn.freebsd.org/changeset/base/210919

Log:
  MFC r210641: Fix a couple of typos.
  
  PR:		docs/148891
  Submitted by:	olgeni

Modified:
  stable/8/lib/libc/sys/sctp_peeloff.2
  stable/8/share/man/man4/isp.4
  stable/8/tools/debugscripts/README
  stable/8/usr.bin/ar/ar.1
  stable/8/usr.sbin/sysinstall/help/options.hlp
  stable/8/usr.sbin/ugidfw/ugidfw.8
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)
  stable/8/share/man/   (props changed)
  stable/8/share/man/man1/   (props changed)
  stable/8/share/man/man3/   (props changed)
  stable/8/share/man/man4/   (props changed)
  stable/8/share/man/man5/   (props changed)
  stable/8/share/man/man7/   (props changed)
  stable/8/share/man/man8/   (props changed)
  stable/8/share/man/man9/   (props changed)
  stable/8/tools/debugscripts/   (props changed)
  stable/8/usr.bin/ar/   (props changed)
  stable/8/usr.sbin/sysinstall/   (props changed)
  stable/8/usr.sbin/ugidfw/   (props changed)

Modified: stable/8/lib/libc/sys/sctp_peeloff.2
==============================================================================
--- stable/8/lib/libc/sys/sctp_peeloff.2	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/lib/libc/sys/sctp_peeloff.2	Fri Aug  6 09:08:18 2010	(r210919)
@@ -50,7 +50,7 @@ The
 .Fn sctp_peeloff
 system call attempts detach the association specified by
 .Fa id
-into its own seperate socket.
+into its own separate socket.
 .Pp
 .Sh RETURN VALUES
 The call returns -1 on failure and the new socket descriptor

Modified: stable/8/share/man/man4/isp.4
==============================================================================
--- stable/8/share/man/man4/isp.4	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/share/man/man4/isp.4	Fri Aug  6 09:08:18 2010	(r210919)
@@ -207,7 +207,7 @@ for the values.
 This value says how long to wait in seconds after loop has gone down before
 giving up and expiring all of the devices that were visible.
 The default is 300 seconds (5 minutes).
-A seperate (nonadjustable) timeout is used when
+A separate (nonadjustable) timeout is used when
 booting to not stop booting on lack of FC connectivity.
 .It Va dev.isp.N.gone_device_time
 This value says how long to wait for devices to reappear if they (temporarily)

Modified: stable/8/tools/debugscripts/README
==============================================================================
--- stable/8/tools/debugscripts/README	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/tools/debugscripts/README	Fri Aug  6 09:08:18 2010	(r210919)
@@ -15,7 +15,7 @@ perform kernel debugging, you would do:
 
 
 This directory also contains a kgdb script that given a crash dump number
-automaticly extract the path to the kernel source, run gdb to extract
+automatically extract the path to the kernel source, run gdb to extract
 information about kernel modules loaded, and then rerun gdb loading the
 necessary symbols for the modules.  You need to make sure you build the
-modules w/ debugging symbols seperately to get things to work.
+modules w/ debugging symbols separately to get things to work.

Modified: stable/8/usr.bin/ar/ar.1
==============================================================================
--- stable/8/usr.bin/ar/ar.1	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/usr.bin/ar/ar.1	Fri Aug  6 09:08:18 2010	(r210919)
@@ -293,7 +293,7 @@ or
 options,
 .Nm
 gives a file-by-file description of the archive modification being
-performed, which consists of three white-space seperated fields:
+performed, which consists of three white-space separated fields:
 the option letter, a dash
 .Dq "-" ,
 and the file name.

Modified: stable/8/usr.sbin/sysinstall/help/options.hlp
==============================================================================
--- stable/8/usr.sbin/sysinstall/help/options.hlp	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/usr.sbin/sysinstall/help/options.hlp	Fri Aug  6 09:08:18 2010	(r210919)
@@ -152,7 +152,7 @@ Package Temp:  Where package temporary f
 
    Some packages, like emacs, can use a LOT of temporary space - up to
    20 or 30MB.  If you are going to configure a small / directory and no
-   seperate /var (and hence a small /var/tmp), then you may wish to set
+   separate /var (and hence a small /var/tmp), then you may wish to set
    this to point at another location (say, /usr/tmp).
 
 

Modified: stable/8/usr.sbin/ugidfw/ugidfw.8
==============================================================================
--- stable/8/usr.sbin/ugidfw/ugidfw.8	Fri Aug  6 09:06:55 2010	(r210918)
+++ stable/8/usr.sbin/ugidfw/ugidfw.8	Fri Aug  6 09:08:18 2010	(r210919)
@@ -223,8 +223,7 @@ The subject can be required to have a pa
 .Ar uid
 and/or
 .Ar gid .
-A range of uids/gids can be specified,
-seperated by a colon.
+A range of uids/gids can be specified, separated by a colon.
 The subject can be required to be in a particular jail with the
 .Ar jailid .
 .It Xo
@@ -274,9 +273,9 @@ Objects can be required to be owned by t
 .Ar uid
 and/or
 .Ar gid .
-A range of uids/gids can be specified, seperated by a colon.
+A range of uids/gids can be specified, separated by a colon.
 The object can be required to be in a particular filesystem by
-specifing the filesystem using
+specifying the filesystem using
 .Cm filesys .
 Note,
 if the filesystem is unmounted and remounted,

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Aug  6 11:49:52 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 98682106566B;
	Fri,  6 Aug 2010 11:49:52 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6BDB48FC17;
	Fri,  6 Aug 2010 11:49: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 o76BnqhK005589;
	Fri, 6 Aug 2010 11:49:52 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Bnqcr005586;
	Fri, 6 Aug 2010 11:49:52 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201008061149.o76Bnqcr005586@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Fri, 6 Aug 2010 11:49:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210928 - in stable/8/sys: netinet netinet6
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 06 Aug 2010 11:49:52 -0000

Author: bz
Date: Fri Aug  6 11:49:52 2010
New Revision: 210928
URL: http://svn.freebsd.org/changeset/base/210928

Log:
  MFC r210703:
  
    Document the mandatory argument to the arptimer() and
    nd6_llinfo_timer() functions with a KASSERT().
    Note: there is no need to return after panic.
  
    In the legacy IP case, only assign the arg after the check,
    in the IPv6 case, remove the extra checks for the table and
    interface as they have to be there unless we freed and forgot
    to cancel the timer.  It doesn't matter anyway as we would
    panic on the NULL pointer deref immediately and the bug is
    elsewhere.
    This unifies the code of both address families to some extend.
  
    Reviewed by:  rwatson

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

Modified: stable/8/sys/netinet/if_ether.c
==============================================================================
--- stable/8/sys/netinet/if_ether.c	Fri Aug  6 10:34:48 2010	(r210927)
+++ stable/8/sys/netinet/if_ether.c	Fri Aug  6 11:49:52 2010	(r210928)
@@ -163,12 +163,10 @@ static void
 arptimer(void *arg)
 {
 	struct ifnet *ifp;
-	struct llentry   *lle = (struct llentry *)arg;
+	struct llentry   *lle;
 
-	if (lle == NULL) {
-		panic("%s: NULL entry!\n", __func__);
-		return;
-	}
+	KASSERT(arg != NULL, ("%s: arg NULL", __func__));
+	lle = (struct llentry *)arg;
 	ifp = lle->lle_tbl->llt_ifp;
 	CURVNET_SET(ifp->if_vnet);
 	IF_AFDATA_LOCK(ifp);

Modified: stable/8/sys/netinet6/nd6.c
==============================================================================
--- stable/8/sys/netinet6/nd6.c	Fri Aug  6 10:34:48 2010	(r210927)
+++ stable/8/sys/netinet6/nd6.c	Fri Aug  6 11:49:52 2010	(r210928)
@@ -441,14 +441,9 @@ nd6_llinfo_timer(void *arg)
 	struct ifnet *ifp;
 	struct nd_ifinfo *ndi = NULL;
 
+	KASSERT(arg != NULL, ("%s: arg NULL", __func__));
 	ln = (struct llentry *)arg;
-	if (ln == NULL) {
-		panic("%s: NULL entry!\n", __func__);
-		return;
-	}
-
-	if ((ifp = ((ln->lle_tbl != NULL) ? ln->lle_tbl->llt_ifp : NULL)) == NULL)
-		panic("ln ifp == NULL");
+	ifp = ln->lle_tbl->llt_ifp;
 
 	CURVNET_SET(ifp->if_vnet);
 

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Aug  6 11:58:27 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AE50E1065678;
	Fri,  6 Aug 2010 11:58:27 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 81C018FC1A;
	Fri,  6 Aug 2010 11:58:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76BwRM6007632;
	Fri, 6 Aug 2010 11:58:27 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76BwRVl007630;
	Fri, 6 Aug 2010 11:58:27 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201008061158.o76BwRVl007630@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Fri, 6 Aug 2010 11:58:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210929 - stable/8/sys/netinet6
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 06 Aug 2010 11:58:27 -0000

Author: bz
Date: Fri Aug  6 11:58:27 2010
New Revision: 210929
URL: http://svn.freebsd.org/changeset/base/210929

Log:
  MFC r210350:
  
    Since r186119 IP6 input counters for octets and packets were not
    working anymore.  In addition more checks and operations were missing.
  
    In case lla_lookup results in a match, get the ifaddr to update the
    statistics counters, and check that the address is neither tentative,
    duplicate or otherwise invalid before accepting the packet.  If ok,
    record the address information in the mbuf.  [ as is done in case
    lla_lookup does not return a result and we go through the FIB ].
  
    Reported by:  remko
    Tested by:    remko

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

Modified: stable/8/sys/netinet6/ip6_input.c
==============================================================================
--- stable/8/sys/netinet6/ip6_input.c	Fri Aug  6 11:49:52 2010	(r210928)
+++ stable/8/sys/netinet6/ip6_input.c	Fri Aug  6 11:58:27 2010	(r210929)
@@ -489,10 +489,54 @@ passin:
 	     (struct sockaddr *)&dst6);
 	IF_AFDATA_UNLOCK(ifp);
 	if ((lle != NULL) && (lle->la_flags & LLE_IFADDR)) {
-		ours = 1;
-		deliverifp = ifp;
+		struct ifaddr *ifa;
+		struct in6_ifaddr *ia6;
+		int bad;
+
+		bad = 1;
+#define	sa_equal(a1, a2)						\
+	(bcmp((a1), (a2), ((a1))->sin6_len) == 0)
+		IF_ADDR_LOCK(ifp);
+		TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
+			if (ifa->ifa_addr->sa_family != dst6.sin6_family)
+				continue;
+			if (sa_equal(&dst6, ifa->ifa_addr))
+				break;
+		}
+		KASSERT(ifa != NULL, ("%s: ifa not found for lle %p",
+		    __func__, lle));
+#undef sa_equal
+
+		ia6 = (struct in6_ifaddr *)ifa;
+		if (!(ia6->ia6_flags & IN6_IFF_NOTREADY)) {
+			/* Count the packet in the ip address stats */
+			ia6->ia_ifa.if_ipackets++;
+			ia6->ia_ifa.if_ibytes += m->m_pkthdr.len;
+
+			/*
+			 * record address information into m_tag.
+			 */
+			(void)ip6_setdstifaddr(m, ia6);
+
+			bad = 0;
+		} else {
+			char ip6bufs[INET6_ADDRSTRLEN];
+			char ip6bufd[INET6_ADDRSTRLEN];
+			/* address is not ready, so discard the packet. */
+			nd6log((LOG_INFO,
+			    "ip6_input: packet to an unready address %s->%s\n",
+			    ip6_sprintf(ip6bufs, &ip6->ip6_src),
+			    ip6_sprintf(ip6bufd, &ip6->ip6_dst)));
+		}
+		IF_ADDR_UNLOCK(ifp);
 		LLE_RUNLOCK(lle);
-		goto hbhcheck;
+		if (bad)
+			goto bad;
+		else {
+			ours = 1;
+			deliverifp = ifp;
+			goto hbhcheck;
+		}
 	}
 	if (lle != NULL)
 		LLE_RUNLOCK(lle);

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Aug  6 18:55:49 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D37351065672;
	Fri,  6 Aug 2010 18:55:49 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C18988FC18;
	Fri,  6 Aug 2010 18:55: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 o76ItndO001702;
	Fri, 6 Aug 2010 18:55:49 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76Itnlh001700;
	Fri, 6 Aug 2010 18:55:49 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008061855.o76Itnlh001700@svn.freebsd.org>
From: Bruce Cran 
Date: Fri, 6 Aug 2010 18:55:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210948 - stable/8/lib/libc/net
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 06 Aug 2010 18:55:49 -0000

Author: brucec
Date: Fri Aug  6 18:55:49 2010
New Revision: 210948
URL: http://svn.freebsd.org/changeset/base/210948

Log:
  MFC r209058:
  
  sctp_recvmsg returns the number of bytes received, not sent.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/lib/libc/net/sctp_recvmsg.3
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/net/sctp_recvmsg.3
==============================================================================
--- stable/8/lib/libc/net/sctp_recvmsg.3	Fri Aug  6 18:46:27 2010	(r210947)
+++ stable/8/lib/libc/net/sctp_recvmsg.3	Fri Aug  6 18:55:49 2010	(r210948)
@@ -238,7 +238,7 @@ The
 field is not used by 
 .Fn sctp_recvmsg .
 .Sh RETURN VALUES
-The call returns the number of characters sent, or -1
+The call returns the number of bytes received, or -1
 if an error occurred.
 .Sh ERRORS
 The

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Aug  6 20:18:27 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD000106577C;
	Fri,  6 Aug 2010 20:18:27 +0000 (UTC)
	(envelope-from emax@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 99C228FC0C;
	Fri,  6 Aug 2010 20:18:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o76KIRs2020626;
	Fri, 6 Aug 2010 20:18:27 GMT (envelope-from emax@svn.freebsd.org)
Received: (from emax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o76KIR3U020624;
	Fri, 6 Aug 2010 20:18:27 GMT (envelope-from emax@svn.freebsd.org)
Message-Id: <201008062018.o76KIR3U020624@svn.freebsd.org>
From: Maksim Yevmenkin 
Date: Fri, 6 Aug 2010 20:18:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210960 - stable/8/sys/netgraph/bluetooth/l2cap
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 06 Aug 2010 20:18:27 -0000

Author: emax
Date: Fri Aug  6 20:18:27 2010
New Revision: 210960
URL: http://svn.freebsd.org/changeset/base/210960

Log:
  MFC r210783. Fix typo
  
  PR:		kern/140590

Modified:
  stable/8/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
==============================================================================
--- stable/8/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h	Fri Aug  6 20:18:16 2010	(r210959)
+++ stable/8/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h	Fri Aug  6 20:18:27 2010	(r210960)
@@ -379,7 +379,7 @@ do {									\
 		break;							\
 									\
 	c = mtod((_m), struct _info_rsp *);				\
-	c->hdr.code = NG_L2CAP_INFO_REQ;				\
+	c->hdr.code = NG_L2CAP_INFO_RSP;				\
 	c->hdr.ident = (_ident);					\
 	c->hdr.length = sizeof(c->param);				\
 									\

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 01:05:02 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E335A1065673;
	Sat,  7 Aug 2010 01:05:02 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CDDD58FC15;
	Sat,  7 Aug 2010 01:05:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77152Og085174;
	Sat, 7 Aug 2010 01:05:02 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o771527L085159;
	Sat, 7 Aug 2010 01:05:02 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201008070105.o771527L085159@svn.freebsd.org>
From: Rick Macklem 
Date: Sat, 7 Aug 2010 01:05:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210985 - in stable/8: sys/conf sys/fs/nfsclient
	sys/modules sys/modules/nfscl sys/modules/nfsclient
	sys/modules/nfslock sys/nfs sys/nfsclient usr.sbin/rpc.lockd
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 01:05:03 -0000

Author: rmacklem
Date: Sat Aug  7 01:05:02 2010
New Revision: 210985
URL: http://svn.freebsd.org/changeset/base/210985

Log:
  MFC: r210455, r210456
  Move sys/nfsclient/nfs_lock.c into sys/nfs and build it as a separate
  module that can be used by both the regular and experimental nfs
  clients. This fixes the problem reported by jh@ where /dev/nfslock
  would be registered twice when both nfs clients were used.
  I also defined the size of the lm_fh field to be the correct value,
  as it should be the maximum size of an NFSv3 file handle.
  Also fix the include path for nfs_lock.h for usr.sbin/rpc.lockd/kern.c.

Added:
  stable/8/sys/modules/nfslock/
     - copied from r210455, head/sys/modules/nfslock/
  stable/8/sys/nfs/nfs_lock.c
     - copied unchanged from r210455, head/sys/nfs/nfs_lock.c
  stable/8/sys/nfs/nfs_lock.h
     - copied unchanged from r210455, head/sys/nfs/nfs_lock.h
Deleted:
  stable/8/sys/fs/nfsclient/nfs_cllock.c
  stable/8/sys/fs/nfsclient/nfs_lock.h
  stable/8/sys/nfsclient/nfs_lock.c
  stable/8/sys/nfsclient/nfs_lock.h
Modified:
  stable/8/sys/conf/files
  stable/8/sys/fs/nfsclient/nfs_clnfsiod.c
  stable/8/sys/fs/nfsclient/nfs_clport.c
  stable/8/sys/fs/nfsclient/nfs_clsubs.c
  stable/8/sys/fs/nfsclient/nfs_clvnops.c
  stable/8/sys/modules/Makefile
  stable/8/sys/modules/nfscl/Makefile
  stable/8/sys/modules/nfsclient/Makefile
  stable/8/sys/nfsclient/nfs_nfsiod.c
  stable/8/sys/nfsclient/nfs_vfsops.c
  stable/8/sys/nfsclient/nfs_vnops.c
  stable/8/usr.sbin/rpc.lockd/kern.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/usr.sbin/rpc.lockd/   (props changed)

Modified: stable/8/sys/conf/files
==============================================================================
--- stable/8/sys/conf/files	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/conf/files	Sat Aug  7 01:05:02 2010	(r210985)
@@ -1871,7 +1871,6 @@ fs/nfsclient/nfs_clrpcops.c	optional nfs
 fs/nfsclient/nfs_clvnops.c	optional nfscl
 fs/nfsclient/nfs_clnode.c	optional nfscl
 fs/nfsclient/nfs_clvfsops.c	optional nfscl
-fs/nfsclient/nfs_cllock.c	optional nfscl
 fs/nfsclient/nfs_clport.c	optional nfscl
 fs/nfsclient/nfs_clbio.c	optional nfscl
 fs/nfsclient/nfs_clnfsiod.c	optional nfscl
@@ -2637,6 +2636,7 @@ netsmb/smb_subr.c		optional netsmb
 netsmb/smb_trantcp.c		optional netsmb
 netsmb/smb_usr.c		optional netsmb
 nfs/nfs_common.c		optional nfsclient | nfsserver
+nfs/nfs_lock.c			optional nfsclient | nfscl
 nfsclient/bootp_subr.c		optional bootp nfsclient
 nfsclient/krpc_subr.c		optional bootp nfsclient
 nfsclient/nfs_bio.c		optional nfsclient
@@ -2647,7 +2647,6 @@ nfsclient/nfs_subs.c		optional nfsclient
 nfsclient/nfs_nfsiod.c		optional nfsclient
 nfsclient/nfs_vfsops.c		optional nfsclient
 nfsclient/nfs_vnops.c		optional nfsclient
-nfsclient/nfs_lock.c		optional nfsclient
 nfsserver/nfs_fha.c		optional nfsserver
 nfsserver/nfs_serv.c		optional nfsserver
 nfsserver/nfs_srvkrpc.c		optional nfsserver

Modified: stable/8/sys/fs/nfsclient/nfs_clnfsiod.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clnfsiod.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/fs/nfsclient/nfs_clnfsiod.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 extern struct mtx ncl_iod_mutex;
 

Modified: stable/8/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clport.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/fs/nfsclient/nfs_clport.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -1268,4 +1268,5 @@ MODULE_VERSION(nfscl, 1);
 MODULE_DEPEND(nfscl, nfscommon, 1, 1, 1);
 MODULE_DEPEND(nfscl, krpc, 1, 1, 1);
 MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1);
+MODULE_DEPEND(nfscl, nfslock, 1, 1, 1);
 

Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clsubs.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/fs/nfsclient/nfs_clsubs.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -67,24 +67,24 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-
 #include 
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
 #include 
 
+#include 
+
 /* Defs */
 #define	TRUE	1
 #define	FALSE	0
 
 extern struct nfsstats newnfsstats;
 MALLOC_DECLARE(M_NEWNFSREQ);
-vop_advlock_t	*ncl_advlock_p = ncl_dolock;
+vop_advlock_t	*ncl_advlock_p = nfs_dolock;
 
 /*
  * Ifdef for FreeBSD-current merged buffer cache. It is unfortunate that these

Modified: stable/8/sys/modules/Makefile
==============================================================================
--- stable/8/sys/modules/Makefile	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/modules/Makefile	Sat Aug  7 01:05:02 2010	(r210985)
@@ -201,6 +201,7 @@ SUBDIR=	${_3dfx} \
 	nfsclient \
 	nfscommon \
 	nfsd \
+	nfslock \
 	nfslockd \
 	nfsserver \
 	nfssvc \

Modified: stable/8/sys/modules/nfscl/Makefile
==============================================================================
--- stable/8/sys/modules/nfscl/Makefile	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/modules/nfscl/Makefile	Sat Aug  7 01:05:02 2010	(r210985)
@@ -9,7 +9,6 @@ SRCS=	vnode_if.h \
 	nfs_clcomsubs.c \
 	nfs_clport.c \
 	nfs_clbio.c \
-	nfs_cllock.c \
 	nfs_clnfsiod.c \
 	nfs_clnode.c \
 	nfs_clsubs.c \

Modified: stable/8/sys/modules/nfsclient/Makefile
==============================================================================
--- stable/8/sys/modules/nfsclient/Makefile	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/modules/nfsclient/Makefile	Sat Aug  7 01:05:02 2010	(r210985)
@@ -4,7 +4,7 @@
 
 KMOD=	nfsclient
 SRCS=	vnode_if.h \
-	nfs_bio.c nfs_lock.c nfs_node.c nfs_subs.c nfs_nfsiod.c \
+	nfs_bio.c nfs_node.c nfs_subs.c nfs_nfsiod.c \
 	nfs_vfsops.c nfs_vnops.c nfs_krpc.c \
 	opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h
 SRCS+=	opt_inet6.h opt_kdtrace.h opt_kgssapi.h

Copied: stable/8/sys/nfs/nfs_lock.c (from r210455, head/sys/nfs/nfs_lock.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/sys/nfs/nfs_lock.c	Sat Aug  7 01:05:02 2010	(r210985, copy of r210455, head/sys/nfs/nfs_lock.c)
@@ -0,0 +1,396 @@
+/*-
+ * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Berkeley Software Design Inc's name may not be used to endorse or
+ *    promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *      from BSDI nfs_lock.c,v 2.4 1998/12/14 23:49:56 jch Exp
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 		/* for hz */
+#include 
+#include 
+#include 
+#include 		/* for hz */ /* Must come after sys/malloc.h */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+extern void (*nlminfo_release_p)(struct proc *p);
+
+MALLOC_DEFINE(M_NFSLOCK, "nfsclient_lock", "NFS lock request");
+MALLOC_DEFINE(M_NLMINFO, "nfsclient_nlminfo", "NFS lock process structure");
+
+static int nfslockdans(struct thread *td, struct lockd_ans *ansp);
+static void nlminfo_release(struct proc *p);
+/*
+ * --------------------------------------------------------------------
+ * A miniature device driver which the userland uses to talk to us.
+ *
+ */
+
+static struct cdev *nfslock_dev;
+static struct mtx nfslock_mtx;
+static int nfslock_isopen;
+static TAILQ_HEAD(,__lock_msg)	nfslock_list;
+
+static int
+nfslock_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
+{
+	int error;
+
+	error = priv_check(td, PRIV_NFS_LOCKD);
+	if (error)
+		return (error);
+
+	mtx_lock(&nfslock_mtx);
+	if (!nfslock_isopen) {
+		error = 0;
+		nfslock_isopen = 1;
+	} else {
+		error = EOPNOTSUPP;
+	}
+	mtx_unlock(&nfslock_mtx);
+		
+	return (error);
+}
+
+static int
+nfslock_close(struct cdev *dev, int fflag, int devtype, struct thread *td)
+{
+	struct __lock_msg *lm;
+
+	mtx_lock(&nfslock_mtx);
+	nfslock_isopen = 0;
+	while (!TAILQ_EMPTY(&nfslock_list)) {
+		lm = TAILQ_FIRST(&nfslock_list);
+		/* XXX: answer request */
+		TAILQ_REMOVE(&nfslock_list, lm, lm_link);
+		free(lm, M_NFSLOCK);
+	}
+	mtx_unlock(&nfslock_mtx);
+	return (0);
+}
+
+static int
+nfslock_read(struct cdev *dev, struct uio *uio, int ioflag)
+{
+	int error;
+	struct __lock_msg *lm;
+
+	if (uio->uio_resid != sizeof *lm)
+		return (EOPNOTSUPP);
+	lm = NULL;
+	error = 0;
+	mtx_lock(&nfslock_mtx);
+	while (TAILQ_EMPTY(&nfslock_list)) {
+		error = msleep(&nfslock_list, &nfslock_mtx, PSOCK | PCATCH,
+		    "nfslockd", 0);
+		if (error)
+			break;
+	}
+	if (!error) {
+		lm = TAILQ_FIRST(&nfslock_list);
+		TAILQ_REMOVE(&nfslock_list, lm, lm_link);
+	}
+	mtx_unlock(&nfslock_mtx);
+	if (!error) {
+		error = uiomove(lm, sizeof *lm, uio);
+		free(lm, M_NFSLOCK);
+	}
+	return (error);
+}
+
+static int
+nfslock_write(struct cdev *dev, struct uio *uio, int ioflag)
+{
+	struct lockd_ans la;
+	int error;
+
+	if (uio->uio_resid != sizeof la)
+		return (EOPNOTSUPP);
+	error = uiomove(&la, sizeof la, uio);
+	if (!error)
+		error = nfslockdans(curthread, &la);
+	return (error);
+}
+
+static int
+nfslock_send(struct __lock_msg *lm)
+{
+	struct __lock_msg *lm2;
+	int error;
+
+	error = 0;
+	lm2 = malloc(sizeof *lm2, M_NFSLOCK, M_WAITOK);
+	mtx_lock(&nfslock_mtx);
+	if (nfslock_isopen) {
+		memcpy(lm2, lm, sizeof *lm2);
+		TAILQ_INSERT_TAIL(&nfslock_list, lm2, lm_link);
+		wakeup(&nfslock_list);
+	} else {
+		error = EOPNOTSUPP;
+	}
+	mtx_unlock(&nfslock_mtx);
+	if (error)
+		free(lm2, M_NFSLOCK);
+	return (error);
+}
+
+static struct cdevsw nfslock_cdevsw = {
+	.d_version =	D_VERSION,
+	.d_open =	nfslock_open,
+	.d_close =	nfslock_close,
+	.d_read =	nfslock_read,
+	.d_write =	nfslock_write,
+	.d_name =	"nfslock"
+};
+
+static int
+nfslock_modevent(module_t mod __unused, int type, void *data __unused)
+{
+
+	switch (type) {
+	case MOD_LOAD:
+		if (bootverbose)
+			printf("nfslock: pseudo-device\n");
+		mtx_init(&nfslock_mtx, "nfslock", NULL, MTX_DEF);
+		TAILQ_INIT(&nfslock_list);
+		nlminfo_release_p = nlminfo_release;
+		nfslock_dev = make_dev(&nfslock_cdevsw, 0,
+		    UID_ROOT, GID_KMEM, 0600, _PATH_NFSLCKDEV);
+		return (0);
+	default:
+		return (EOPNOTSUPP);
+	}
+}
+
+DEV_MODULE(nfslock, nfslock_modevent, NULL);
+MODULE_VERSION(nfslock, 1);
+
+
+/*
+ * XXX
+ * We have to let the process know if the call succeeded.  I'm using an extra
+ * field in the p_nlminfo field in the proc structure, as it is already for
+ * lockd stuff.
+ */
+
+/*
+ * nfs_advlock --
+ *      NFS advisory byte-level locks.
+ *
+ * The vnode shall be (shared) locked on the entry, it is
+ * unconditionally unlocked after.
+ */
+int
+nfs_dolock(struct vop_advlock_args *ap)
+{
+	LOCKD_MSG msg;
+	struct thread *td;
+	struct vnode *vp;
+	int error;
+	struct flock *fl;
+	struct proc *p;
+
+	td = curthread;
+	p = td->td_proc;
+
+	vp = ap->a_vp;
+	fl = ap->a_fl;
+
+	ASSERT_VOP_LOCKED(vp, "nfs_dolock");
+
+	bcopy(VFSTONFS(vp->v_mount)->nm_nam, &msg.lm_addr,
+		min(sizeof msg.lm_addr, VFSTONFS(vp->v_mount)->nm_nam->sa_len));
+	msg.lm_fh_len = NFS_ISV3(vp) ? VTONFS(vp)->n_fhsize : NFSX_V2FH;
+	bcopy(VTONFS(vp)->n_fhp, msg.lm_fh, msg.lm_fh_len);
+	msg.lm_nfsv3 = NFS_ISV3(vp);
+	VOP_UNLOCK(vp, 0);
+
+	/*
+	 * the NLM protocol doesn't allow the server to return an error
+	 * on ranges, so we do it.
+	 */
+	if (fl->l_whence != SEEK_END) {
+		if ((fl->l_whence != SEEK_CUR && fl->l_whence != SEEK_SET) ||
+		    fl->l_start < 0 ||
+		    (fl->l_len < 0 &&
+		     (fl->l_start == 0 || fl->l_start + fl->l_len < 0)))
+			return (EINVAL);
+		if (fl->l_len > 0 &&
+			 (fl->l_len - 1 > OFF_MAX - fl->l_start))
+			return (EOVERFLOW);
+	}
+
+	/*
+	 * Fill in the information structure.
+	 */
+	msg.lm_version = LOCKD_MSG_VERSION;
+	msg.lm_msg_ident.pid = p->p_pid;
+
+	mtx_lock(&Giant);
+	/*
+	 * if there is no nfsowner table yet, allocate one.
+	 */
+	if (p->p_nlminfo == NULL) {
+		p->p_nlminfo = malloc(sizeof(struct nlminfo),
+		    M_NLMINFO, M_WAITOK | M_ZERO);
+		p->p_nlminfo->pid_start = p->p_stats->p_start;
+		timevaladd(&p->p_nlminfo->pid_start, &boottime);
+	}
+	msg.lm_msg_ident.pid_start = p->p_nlminfo->pid_start;
+	msg.lm_msg_ident.msg_seq = ++(p->p_nlminfo->msg_seq);
+
+	msg.lm_fl = *fl;
+	msg.lm_wait = ap->a_flags & F_WAIT;
+	msg.lm_getlk = ap->a_op == F_GETLK;
+	cru2x(td->td_ucred, &msg.lm_cred);
+
+	for (;;) {
+		error = nfslock_send(&msg);
+		if (error)
+			goto out;
+
+		/* Unlocks succeed immediately.  */
+		if (fl->l_type == F_UNLCK)
+			goto out;
+
+		/*
+		 * Retry after 20 seconds if we haven't gotten a response yet.
+		 * This number was picked out of thin air... but is longer
+		 * then even a reasonably loaded system should take (at least
+		 * on a local network).  XXX Probably should use a back-off
+		 * scheme.
+		 *
+		 * XXX: No PCATCH here since we currently have no useful
+		 * way to signal to the userland rpc.lockd that the request
+		 * has been aborted.  Once the rpc.lockd implementation
+		 * can handle aborts, and we report them properly,
+		 * PCATCH can be put back.  In the mean time, if we did
+		 * permit aborting, the lock attempt would "get lost"
+		 * and the lock would get stuck in the locked state.
+		 */
+		error = tsleep(p->p_nlminfo, PUSER, "lockd", 20*hz);
+		if (error != 0) {
+			if (error == EWOULDBLOCK) {
+				/*
+				 * We timed out, so we rewrite the request
+				 * to the fifo.
+				 */
+				continue;
+			}
+
+			break;
+		}
+
+		if (msg.lm_getlk && p->p_nlminfo->retcode == 0) {
+			if (p->p_nlminfo->set_getlk_pid) {
+				fl->l_sysid = 0; /* XXX */
+				fl->l_pid = p->p_nlminfo->getlk_pid;
+			} else {
+				fl->l_type = F_UNLCK;
+			}
+		}
+		error = p->p_nlminfo->retcode;
+		break;
+	}
+ out:
+	mtx_unlock(&Giant);
+	return (error);
+}
+
+/*
+ * nfslockdans --
+ *      NFS advisory byte-level locks answer from the lock daemon.
+ */
+static int
+nfslockdans(struct thread *td, struct lockd_ans *ansp)
+{
+	struct proc *targetp;
+
+	/* the version should match, or we're out of sync */
+	if (ansp->la_vers != LOCKD_ANS_VERSION)
+		return (EINVAL);
+
+	/* Find the process, set its return errno and wake it up. */
+	if ((targetp = pfind(ansp->la_msg_ident.pid)) == NULL)
+		return (ESRCH);
+
+	/* verify the pid hasn't been reused (if we can), and it isn't waiting
+	 * for an answer from a more recent request.  We return an EPIPE if
+	 * the match fails, because we've already used ESRCH above, and this
+	 * is sort of like writing on a pipe after the reader has closed it.
+	 */
+	if (targetp->p_nlminfo == NULL ||
+	    ((ansp->la_msg_ident.msg_seq != -1) &&
+	      (timevalcmp(&targetp->p_nlminfo->pid_start,
+			&ansp->la_msg_ident.pid_start, !=) ||
+	       targetp->p_nlminfo->msg_seq != ansp->la_msg_ident.msg_seq))) {
+		PROC_UNLOCK(targetp);
+		return (EPIPE);
+	}
+
+	targetp->p_nlminfo->retcode = ansp->la_errno;
+	targetp->p_nlminfo->set_getlk_pid = ansp->la_set_getlk_pid;
+	targetp->p_nlminfo->getlk_pid = ansp->la_getlk_pid;
+
+	wakeup(targetp->p_nlminfo);
+
+	PROC_UNLOCK(targetp);
+	return (0);
+}
+
+/*
+ * Free nlminfo attached to process.
+ */
+void        
+nlminfo_release(struct proc *p)
+{  
+	free(p->p_nlminfo, M_NLMINFO);
+	p->p_nlminfo = NULL;
+}

Copied: stable/8/sys/nfs/nfs_lock.h (from r210455, head/sys/nfs/nfs_lock.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/sys/nfs/nfs_lock.h	Sat Aug  7 01:05:02 2010	(r210985, copy of r210455, head/sys/nfs/nfs_lock.h)
@@ -0,0 +1,90 @@
+/*-
+ * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Berkeley Software Design Inc's name may not be used to endorse or
+ *    promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *      from nfs_lock.h,v 2.2 1998/04/28 19:38:41 don Exp
+ * $FreeBSD$
+ */
+
+/*
+ * lockd uses the nfssvc system call to get the unique kernel services it needs.
+ * It passes in a request structure with a version number at the start.
+ * This prevents libc from needing to change if the information passed
+ * between lockd and the kernel needs to change.
+ *
+ * If a structure changes, you must bump the version number.
+ */
+
+/*
+ * The fifo where the kernel writes requests for locks on remote NFS files,
+ * and where lockd reads these requests.
+ *
+ */
+#define	_PATH_NFSLCKDEV	"nfslock"
+
+/*
+ * This structure is used to uniquely identify the process which originated
+ * a particular message to lockd.  A sequence number is used to differentiate
+ * multiple messages from the same process.  A process start time is used to
+ * detect the unlikely, but possible, event of the recycling of a pid.
+ */
+struct lockd_msg_ident {
+	pid_t		pid;            /* The process ID. */
+	struct timeval	pid_start;	/* Start time of process id */
+	int		msg_seq;	/* Sequence number of message */
+};
+
+#define LOCKD_MSG_VERSION	3
+
+/*
+ * The structure that the kernel hands us for each lock request.
+ */
+typedef struct __lock_msg {
+	TAILQ_ENTRY(__lock_msg)	lm_link;	/* internal linkage */
+	int			lm_version;	/* which version is this */
+	struct lockd_msg_ident	lm_msg_ident;	/* originator of the message */
+	struct flock		lm_fl;             /* The lock request. */
+	int			lm_wait;           /* The F_WAIT flag. */
+	int			lm_getlk;		/* is this a F_GETLK request */
+	struct sockaddr_storage lm_addr;		/* The address. */
+	int			lm_nfsv3;		/* If NFS version 3. */
+	size_t			lm_fh_len;		/* The file handle length. */
+	struct xucred		lm_cred;		/* user cred for lock req */
+	u_int8_t		lm_fh[NFSX_V3FHMAX];/* The file handle. */
+} LOCKD_MSG;
+
+#define LOCKD_ANS_VERSION	1
+
+struct lockd_ans {
+	int		la_vers;
+	struct lockd_msg_ident	la_msg_ident;	/* originator of the message */
+	int		la_errno;
+	int		la_set_getlk_pid;		/* use returned pid */
+	int		la_getlk_pid;		/* returned pid for F_GETLK */
+};
+
+#ifdef _KERNEL
+int	nfs_dolock(struct vop_advlock_args *ap);
+#endif

Modified: stable/8/sys/nfsclient/nfs_nfsiod.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_nfsiod.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/nfsclient/nfs_nfsiod.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 
 static MALLOC_DEFINE(M_NFSSVC, "nfsclient_srvsock", "Nfs server structure");
 

Modified: stable/8/sys/nfsclient/nfs_vfsops.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_vfsops.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/nfsclient/nfs_vfsops.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -148,6 +148,7 @@ MODULE_DEPEND(nfs, krpc, 1, 1, 1);
 MODULE_DEPEND(nfs, kgssapi, 1, 1, 1);
 #endif
 MODULE_DEPEND(nfs, nfs_common, 1, 1, 1);
+MODULE_DEPEND(nfs, nfslock, 1, 1, 1);
 
 static struct nfs_rpcops nfs_rpcops = {
 	nfs_readrpc,

Modified: stable/8/sys/nfsclient/nfs_vnops.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_vnops.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/sys/nfsclient/nfs_vnops.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 

Modified: stable/8/usr.sbin/rpc.lockd/kern.c
==============================================================================
--- stable/8/usr.sbin/rpc.lockd/kern.c	Fri Aug  6 23:58:54 2010	(r210984)
+++ stable/8/usr.sbin/rpc.lockd/kern.c	Sat Aug  7 01:05:02 2010	(r210985)
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
 
 #include "nlm_prot.h"
 #include 
-#include 
+#include 
 
 #include "lockd.h"
 #include "lockd_lock.h"

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 10:51:02 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5399E1065675;
	Sat,  7 Aug 2010 10:51:02 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 373538FC15;
	Sat,  7 Aug 2010 10:51:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77Ap21G016707;
	Sat, 7 Aug 2010 10:51:02 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77Ap2dT016703;
	Sat, 7 Aug 2010 10:51:02 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071051.o77Ap2dT016703@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 10:51:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211000 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 10:51:02 -0000

Author: brucec
Date: Sat Aug  7 10:51:01 2010
New Revision: 211000
URL: http://svn.freebsd.org/changeset/base/211000

Log:
  MFC r209235, r210381 (bug fix for r209235):
  
  * Allow partial MB/GB values to be entered in the slice and label editors.
  * Don't strdup the name when calling deviceRegister because the string is
  copied within new_device.
  * Use a subtype of 165, not 3, when creating a slice in noninteractive
  mode.
  
  PR: bin/135333
  PR: bin/66350
  Approved by:	rrs (mentor)

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

Modified: stable/8/usr.sbin/sysinstall/devices.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/devices.c	Sat Aug  7 10:23:54 2010	(r210999)
+++ stable/8/usr.sbin/sysinstall/devices.c	Sat Aug  7 10:51:01 2010	(r211000)
@@ -295,6 +295,8 @@ deviceGetAll(void)
 
     msgNotify("Probing devices, please wait (this can take a while)...");
     /* First go for the network interfaces.  Stolen shamelessly from ifconfig! */
+    memset(&ifc, 0, sizeof(ifc));
+    memset(buffer, 0, INTERFACE_MAX * sizeof(struct ifreq));
     ifc.ifc_len = sizeof(buffer);
     ifc.ifc_buf = buffer;
 
@@ -371,7 +373,7 @@ skipif:
 
 		    if (fd >= 0) close(fd);
 		    snprintf(n, sizeof n, device_names[i].name, j);
-		    deviceRegister(strdup(n), device_names[i].description, strdup(try),
+		    deviceRegister(n, device_names[i].description, strdup(try),
 					 DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM,
 					 mediaShutdownCDROM, NULL);
 		    if (isDebug())
@@ -390,7 +392,7 @@ skipif:
 
 		    close(fd);
 		    snprintf(n, sizeof n, device_names[i].name, j);
-		    deviceRegister(strdup(n), device_names[i].description, strdup(try),
+		    deviceRegister(n, device_names[i].description, strdup(try),
 				   DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy,
 				   mediaShutdownFloppy, NULL);
 		    if (isDebug())
@@ -405,7 +407,7 @@ skipif:
 
 			close(fd);
 			snprintf(n, sizeof(n), device_names[i].name, j);
-			deviceRegister(strdup(n), device_names[i].description,
+			deviceRegister(n, device_names[i].description,
 			    strdup(try), DEVICE_TYPE_USB, TRUE, mediaInitUSB,
 			    mediaGetUSB, mediaShutdownUSB, NULL);
 

Modified: stable/8/usr.sbin/sysinstall/disks.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/disks.c	Sat Aug  7 10:23:54 2010	(r210999)
+++ stable/8/usr.sbin/sysinstall/disks.c	Sat Aug  7 10:51:01 2010	(r211000)
@@ -443,6 +443,7 @@ diskPartition(Device *dev)
 	    else {
 		char *val, tmp[20], name[16], *cp;
 		daddr_t size;
+		long double dsize;
 		int subtype;
 		chunk_e partitiontype;
 #ifdef PC98
@@ -457,11 +458,20 @@ diskPartition(Device *dev)
 		snprintf(tmp, 20, "%jd", (intmax_t)chunk_info[current_chunk]->size);
 		val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n"
 				  "or append a trailing `M' for megabytes (e.g. 20M).");
-		if (val && (size = strtoimax(val, &cp, 0)) > 0) {
+		if (val && (dsize = strtold(val, &cp)) > 0 && dsize < UINT32_MAX) {
 		    if (*cp && toupper(*cp) == 'M')
-			size *= ONE_MEG;
+			size = (daddr_t) (dsize * ONE_MEG);
 		    else if (*cp && toupper(*cp) == 'G')
-			size *= ONE_GIG;
+			size = (daddr_t) (dsize * ONE_GIG);
+		    else
+			size = (daddr_t) dsize;
+
+		    if (size < ONE_MEG) {
+			msgConfirm("The minimum slice size is 1MB");
+			break;
+		    }
+
+
 		    sprintf(tmp, "%d", SUBTYPE_FREEBSD);
 		    val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
 			"Pressing Enter will choose the default, a native FreeBSD\n"
@@ -915,7 +925,8 @@ diskPartitionNonInteractive(Device *dev)
 {
     char *cp;
     int i, all_disk = 0;
-    daddr_t sz;
+    daddr_t size;
+    long double dsize;
 #ifdef PC98
     u_char *bootipl;
     size_t bootipl_size;
@@ -959,7 +970,7 @@ diskPartitionNonInteractive(Device *dev)
 		/* If a chunk is at least 10MB in size, use it. */
 		if (chunk_info[i]->type == unused && chunk_info[i]->size > (10 * ONE_MEG)) {
 		    Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size,
-				 freebsd, 3,
+				 freebsd, SUBTYPE_FREEBSD,
 				 (chunk_info[i]->flags & CHUNK_ALIGN),
 				 "FreeBSD");
 		    variable_set2(DISK_PARTITIONED, "yes", 0);
@@ -983,16 +994,19 @@ diskPartitionNonInteractive(Device *dev)
 
 	    All_FreeBSD(d, all_disk = TRUE);
 	}
-	else if ((sz = strtoimax(cp, &cp, 0))) {
-	    /* Look for sz bytes free */
+	else if ((dsize = strtold(cp, &cp))) {
 	    if (*cp && toupper(*cp) == 'M')
-		sz *= ONE_MEG;
+		size *= (daddr_t) (dsize * ONE_MEG);
 	    else if (*cp && toupper(*cp) == 'G')
-		sz *= ONE_GIG;
+		size = (daddr_t) (dsize * ONE_GIG);
+	    else
+		size = (daddr_t) dsize;
+
+	    /* Look for size bytes free */
 	    for (i = 0; chunk_info[i]; i++) {
 		/* If a chunk is at least sz MB, use it. */
-		if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
-		    Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3,
+		if (chunk_info[i]->type == unused && chunk_info[i]->size >= size) {
+		    Create_Chunk(d, chunk_info[i]->offset, size, freebsd, SUBTYPE_FREEBSD,
 				 (chunk_info[i]->flags & CHUNK_ALIGN),
 				 "FreeBSD");
 		    variable_set2(DISK_PARTITIONED, "yes", 0);
@@ -1001,7 +1015,7 @@ diskPartitionNonInteractive(Device *dev)
 	    }
 	    if (!chunk_info[i]) {
 		    msgConfirm("Unable to find %jd free blocks on this disk!",
-			(intmax_t)sz);
+			(intmax_t)size);
 		return;
 	    }
 	}

Modified: stable/8/usr.sbin/sysinstall/label.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 10:23:54 2010	(r210999)
+++ stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 10:51:01 2010	(r211000)
@@ -999,6 +999,7 @@ diskLabel(Device *dev)
 	    else {
 		char *val;
 		daddr_t size;
+		long double dsize;
 		struct chunk *tmp;
 		char osize[80];
 		u_long flags = 0;
@@ -1019,22 +1020,27 @@ diskLabel(Device *dev)
 #endif
 				  "%jd blocks (%jdMB) are free.",
 				  (intmax_t)sz, (intmax_t)sz / ONE_MEG);
-		if (!val || (size = strtoimax(val, &cp, 0)) <= 0) {
+		if (!val || (dsize = strtold(val, &cp)) <= 0) {
 		    clear_wins();
 		    break;
 		}
 
 		if (*cp) {
 		    if (toupper(*cp) == 'M')
-			size *= ONE_MEG;
+			size = (daddr_t) (dsize * ONE_MEG);
 		    else if (toupper(*cp) == 'G')
-			size *= ONE_GIG;
+			size = (daddr_t) (dsize * ONE_GIG);
 #ifndef __ia64__
 		    else if (toupper(*cp) == 'C')
-			size *= (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
+			size = (daddr_t) dsize * (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
 #endif
+		    else
+			size = (daddr_t) dsize;
+		} else {
+			size = (daddr_t) dsize;
 		}
-		if (size <= FS_MIN_SIZE) {
+
+		if (size < FS_MIN_SIZE) {
 		    msgConfirm("The minimum filesystem size is %dMB", FS_MIN_SIZE / ONE_MEG);
 		    clear_wins();
 		    break;

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 12:18:37 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 35AD51065670;
	Sat,  7 Aug 2010 12:18:37 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 09D318FC12;
	Sat,  7 Aug 2010 12:18: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 o77CIads036478;
	Sat, 7 Aug 2010 12:18:36 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77CIavd036475;
	Sat, 7 Aug 2010 12:18:36 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071218.o77CIavd036475@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:18:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211007 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 12:18:37 -0000

Author: brucec
Date: Sat Aug  7 12:18:36 2010
New Revision: 211007
URL: http://svn.freebsd.org/changeset/base/211007

Log:
  MFC r209764:
  
  Increase the default and minimum partition sizes.
  Bump / to 1GB, /var to 4GB and /tmp to 1GB.
  
  A 512MB root partition is now too small to hold two kernels, so to
  prevent installkernel failing 1GB is a better default. Likewise,
  applications are storing more data in /var so 4GB is more reasonable
  on a modern machine.
  
  The previous minimum partition sizes were too small to hold a minimal
  installation, and have been adjusted accordingly.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/label.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/label.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 11:57:13 2010	(r211006)
+++ stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 12:18:36 2010	(r211007)
@@ -62,9 +62,9 @@
  * Minimum partition sizes
  */
 #if defined(__ia64__) || defined(__sparc64__) || defined(__amd64__)
-#define ROOT_MIN_SIZE			128
+#define ROOT_MIN_SIZE			280
 #else
-#define ROOT_MIN_SIZE			118
+#define ROOT_MIN_SIZE			180
 #endif
 #define SWAP_MIN_SIZE			32
 #define USR_MIN_SIZE			160
@@ -82,10 +82,10 @@
  * for this configuration we scale things relative to the NOM vs DEFAULT
  * sizes.  If the disk is larger then /home will get any remaining space.
  */
-#define ROOT_DEFAULT_SIZE		512
+#define ROOT_DEFAULT_SIZE		1024
 #define USR_DEFAULT_SIZE		8192
-#define VAR_DEFAULT_SIZE		1024
-#define TMP_DEFAULT_SIZE		512
+#define VAR_DEFAULT_SIZE		4096
+#define TMP_DEFAULT_SIZE		1024
 #define HOME_DEFAULT_SIZE		USR_DEFAULT_SIZE
 
 /*
@@ -93,9 +93,9 @@
  * when we have insufficient disk space.  If this isn't sufficient we scale
  * down using the MIN sizes instead.
  */
-#define ROOT_NOMINAL_SIZE		256
+#define ROOT_NOMINAL_SIZE		512
 #define USR_NOMINAL_SIZE		1536
-#define VAR_NOMINAL_SIZE		128
+#define VAR_NOMINAL_SIZE		512
 #define TMP_NOMINAL_SIZE		128
 #define HOME_NOMINAL_SIZE		USR_NOMINAL_SIZE
 

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 12:41:12 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CEA031065673;
	Sat,  7 Aug 2010 12:41:12 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BCE738FC12;
	Sat,  7 Aug 2010 12:41:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77CfCKu041657;
	Sat, 7 Aug 2010 12:41:12 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77CfCdX041655;
	Sat, 7 Aug 2010 12:41:12 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071241.o77CfCdX041655@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:41:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211009 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 12:41:12 -0000

Author: brucec
Date: Sat Aug  7 12:41:12 2010
New Revision: 211009
URL: http://svn.freebsd.org/changeset/base/211009

Log:
  MFC r209467:
  
  When installing on a machine which doesn't have a VGA card installed, enable
  a getty on the serial port so that it's possible to login when the system is
  rebooted.
  
  PR: bin/23098
  Submitted by: Doug Ambrisko 
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/install.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/install.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 12:21:29 2010	(r211008)
+++ stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 12:41:12 2010	(r211009)
@@ -875,6 +875,9 @@ installConfigure(void)
 int
 installFixupBase(dialogMenuItem *self)
 {
+    FILE *orig, *new;
+    char buf[1024];
+    char *pos;
     FILE *fp;
 #ifdef __ia64__
     const char *efi_mntpt;
@@ -891,6 +894,32 @@ installFixupBase(dialogMenuItem *self)
 	    fclose(fp);
 	}
 #endif
+
+	/* Fixup /etc/ttys to start a getty on the serial port.
+	  This way after a serial installation you can login via
+	  the serial port */
+
+	if (!OnVTY){
+	    if (((orig=fopen("/etc/ttys","r")) != NULL) &&
+		((new=fopen("/etc/ttys.tmp","w")) != NULL)) {
+		while (fgets(buf,sizeof(buf),orig)){
+		    if (strstr(buf,"ttyu0")){
+			if ((pos=strstr(buf,"off"))){
+			    *pos++='o';
+			    *pos++='n';
+			    *pos++=' ';
+			}
+		    }
+		    fputs(buf,new);
+		}
+		fclose(orig);
+		fclose(new);
+
+		rename("/etc/ttys.tmp","/etc/ttys");
+		unlink("/etc/ttys.tmp");
+	    }
+	}
+
 	
 	/* BOGON #2: We leave /etc in a bad state */
 	chmod("/etc", 0755);

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 12:51:45 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 00A41106564A;
	Sat,  7 Aug 2010 12:51:45 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E2A8F8FC1F;
	Sat,  7 Aug 2010 12:51:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77Cpifc044108;
	Sat, 7 Aug 2010 12:51:44 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77Cpiwo044105;
	Sat, 7 Aug 2010 12:51:44 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071251.o77Cpiwo044105@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:51:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211011 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 12:51:45 -0000

Author: brucec
Date: Sat Aug  7 12:51:44 2010
New Revision: 211011
URL: http://svn.freebsd.org/changeset/base/211011

Log:
  MFC r209468:
  
  Make it easier to cancel a failing installation by only attempting to
  extract distributions once. If a distribution fails to fetch/extract
  and the user doesn't want to retry, abort the installation.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/dist.c
  stable/8/usr.sbin/sysinstall/install.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/dist.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/dist.c	Sat Aug  7 12:46:49 2010	(r211010)
+++ stable/8/usr.sbin/sysinstall/dist.c	Sat Aug  7 12:51:44 2010	(r211011)
@@ -613,7 +613,7 @@ getinfo:
 	    if (fp == NULL)
 		msgConfirm("Failed to find %s on this media.  Reinitializing media.", fname);
 	    else
-		msgConfirm("Failed to retreive piece file %s.\n"
+		msgConfirm("Failed to retrieve piece file %s.\n"
 			   "%s: Reinitializing media.",
 			   fname, !intr ? "I/O error" : "User interrupt");
 	    DEVICE_SHUTDOWN(mediaDevice);
@@ -709,6 +709,7 @@ distExtract(char *parent, Distribution *
     char *path, *dist;
     WINDOW *w = savescr();
     struct sigaction old, new;
+    int canceled = 0;
 
     status = TRUE;
     if (isDebug())
@@ -723,7 +724,7 @@ distExtract(char *parent, Distribution *
     sigaction(SIGINT, &new, &old);
 
     /* Loop through to see if we're in our parent's plans */
-    for (i = 0; me[i].my_name; i++) {
+    for (i = 0; me[i].my_name && canceled == 0; i++) {
 	dist = me[i].my_name;
 	path = parent ? parent : dist;
 
@@ -758,8 +759,11 @@ distExtract(char *parent, Distribution *
 		    status = msgYesNo("Unable to transfer the %s distribution from\n%s.\n\n"
 			              "Do you want to try to retrieve it again?",
 				      me[i].my_name, mediaDevice->name);
-		    if (!status)
+		    if (status == 0)
 			--i;
+		    else
+			canceled = 1;	
+
 		    status = FALSE;
 		}
 	    }
@@ -773,6 +777,7 @@ distExtract(char *parent, Distribution *
 	if (status)
 	    *(me[i].my_mask) &= ~(me[i].my_bit);
     }
+
     sigaction(SIGINT, &old, NULL);	/* Restore signal handler */
     restorescr(w);
     return status;
@@ -865,8 +870,9 @@ printSelected(char *buf, int selected, D
 int
 distExtractAll(dialogMenuItem *self)
 {
-    int old_dists, old_kernel, retries = 0, status = DITEM_SUCCESS;
+    int old_dists, old_kernel, status = DITEM_SUCCESS;
     char buf[512];
+    int extract_status = TRUE;
     WINDOW *w;
 
     /* paranoia */
@@ -886,9 +892,7 @@ distExtractAll(dialogMenuItem *self)
     w = savescr();
     msgNotify("Attempting to install all selected distributions..");
 
-    /* Try for 3 times around the loop, then give up. */
-    while (Dists && ++retries < 3)
-	distExtract(NULL, DistTable);
+    extract_status = distExtract(NULL, DistTable);
 
     dialog_clear_norefresh();
     /* Only do base fixup if base dist was successfully extracted */
@@ -915,5 +919,9 @@ distExtractAll(dialogMenuItem *self)
 	}
     }
     restorescr(w);
+
+    if (extract_status == FALSE)
+	status = DITEM_FAILURE;
+
     return status;
 }

Modified: stable/8/usr.sbin/sysinstall/install.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 12:46:49 2010	(r211010)
+++ stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 12:51:44 2010	(r211011)
@@ -676,8 +676,7 @@ nodisks:
 	msgConfirm("Installation completed with some errors.  You may wish to\n"
 		   "scroll through the debugging messages on VTY1 with the\n"
 		   "scroll-lock feature.  You can also choose \"No\" at the next\n"
-		   "prompt and go back into the installation menus to retry\n"
-		   "whichever operations have failed.");
+		   "prompt and reboot and try the installation again.");
 	return i;
 
     }
@@ -853,6 +852,9 @@ try_media:
     /* Now go get it all */
     i = distExtractAll(self);
 
+    if (i == FALSE)
+	    return FALSE;
+
     /* When running as init, *now* it's safe to grab the rc.foo vars */
     installEnvironment();
 

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 12:58:02 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2D9DD1065673;
	Sat,  7 Aug 2010 12:58:02 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C0038FC1E;
	Sat,  7 Aug 2010 12:58:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77Cw2OA045771;
	Sat, 7 Aug 2010 12:58:02 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77Cw1Y1045769;
	Sat, 7 Aug 2010 12:58:02 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071258.o77Cw1Y1045769@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 12:58:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211013 - stable/8/usr.sbin/boot0cfg
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 12:58:02 -0000

Author: brucec
Date: Sat Aug  7 12:58:01 2010
New Revision: 211013
URL: http://svn.freebsd.org/changeset/base/211013

Log:
  MFC r209469:
  
  If a device can't be opened, don't keep going but display the error
  returned from open() and quit.
  
  PR: bin/81035
  Submitted by: Peter Schuller 
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/boot0cfg/boot0cfg.c
Directory Properties:
  stable/8/usr.sbin/boot0cfg/   (props changed)

Modified: stable/8/usr.sbin/boot0cfg/boot0cfg.c
==============================================================================
--- stable/8/usr.sbin/boot0cfg/boot0cfg.c	Sat Aug  7 12:54:12 2010	(r211012)
+++ stable/8/usr.sbin/boot0cfg/boot0cfg.c	Sat Aug  7 12:58:01 2010	(r211013)
@@ -356,6 +356,8 @@ write_mbr(const char *fname, int flags, 
 	if (n != mbr_size)
 	   errx(1, "%s: short write", fname);
 	return;
+    } else {
+	    err(1, "write_mbr: %s", fname);
     }
 
     /*

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 13:25:47 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E133F106564A;
	Sat,  7 Aug 2010 13:25:46 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CA59F8FC15;
	Sat,  7 Aug 2010 13:25: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 o77DPkE1052155;
	Sat, 7 Aug 2010 13:25:46 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DPkSR052153;
	Sat, 7 Aug 2010 13:25:46 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071325.o77DPkSR052153@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:25:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211015 - stable/8/sys/boot/forth
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 13:25:47 -0000

Author: brucec
Date: Sat Aug  7 13:25:46 2010
New Revision: 211015
URL: http://svn.freebsd.org/changeset/base/211015

Log:
  MFC r209466:
  
  Add some more modules to loader.conf. Remove if_awi since support for it
  was removed 2 years ago.
  
  PR: conf/147126
  PR: conf/116071
  Approved by: rrs (mentor)

Modified:
  stable/8/sys/boot/forth/loader.conf
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/boot/forth/loader.conf
==============================================================================
--- stable/8/sys/boot/forth/loader.conf	Sat Aug  7 13:02:26 2010	(r211014)
+++ stable/8/sys/boot/forth/loader.conf	Sat Aug  7 13:25:46 2010	(r211015)
@@ -119,6 +119,35 @@ module_path="/boot/modules"	# Set the mo
 
 
 ##############################################################
+### ATA modules ##############################################
+##############################################################
+
+ataahci_load="NO"		# AHCI SATA
+ataacard_load="NO"		# ACARD
+ataacerlabs_load="NO"		# Acer Labs Inc. (ALI)
+ataadaptec_load="NO"		# Adaptec
+ataamd_load="NO"		# American Micro Devices (AMD)
+ataati_load="NO"		# ATI
+atacenatek_load="NO"		# Cenatek
+atacypress_load="NO"		# Cypress
+atacyrix_load="NO"		# Cyrix
+atahighpoint_load="NO"		# HighPoint
+ataintel_load="NO"		# Intel
+ataite_load="NO"		# Integrated Technology Inc. (ITE)
+atajmicron_load="NO"		# JMicron
+atamarvell_load="NO"		# Marvell
+atamicron_load="NO"		# Micron
+atanational_load="NO"		# National
+atanetcell_load="NO"		# NetCell
+atanvidia_load="NO"		# nVidia
+atapromise_load="NO"		# Promise
+ataserverworks_load="NO"	# ServerWorks
+atasiliconimage_load="NO"	# Silicon Image Inc. (SiI) (formerly CMD)
+atasis_load="NO"		# Silicon Integrated Systems Corp.(SiS)
+atavia_load="NO"		# VIA Technologies Inc.
+
+
+##############################################################
 ###  Filesystem and related modules  #########################
 ##############################################################
 
@@ -133,6 +162,7 @@ msdosfs_load="NO"		# FAT-12/16/32
 nfsclient_load="NO"		# NFS client
 nfsserver_load="NO"		# NFS server
 ntfs_load="NO"			# NTFS
+ntfs_iconv_load="NO"		# NTFS iconv character support
 nullfs_load="NO"		# Null filesystem
 portalfs_load="NO"		# Portal filesystem
 procfs_load="NO"		# Process filesystem
@@ -164,6 +194,18 @@ geom_vinum_load="NO"		# Concatenated/mir
 
 
 ##############################################################
+###  FireWire modules  #######################################
+##############################################################
+
+firewire_load="NO"              # IEEE1394 High-performance Serial Bus
+fwe_load="NO"                   # Ethernet emulation driver for FireWire
+fwip_load="NO"                  # IP over FireWire driver
+fwohci_load="NO"                # OHCI FireWire chipset device driver
+sbp_load="NO"                   # SBP-2 Mass Storage Devices driver
+sbp_targ_load="NO"		# SBP-2 Target mode
+
+
+##############################################################
 ###  Screen saver modules  ###################################
 ##############################################################
 
@@ -216,16 +258,17 @@ if_ale_load="NO"		# Atheros AR8121/AR811
 if_an_load="NO"			# Aironet 4500/4800 802.11 wireless NICs
 if_ath_load="NO"		# Atheros IEEE 802.11 wireless NICs
 if_aue_load="NO"		# ADMtek AN986 Pegasus USB Ethernet
-if_awi_load="NO"		# AMD PCnetMobile IEEE 802.11 wireless NICs
 if_axe_load="NO"		# ASIX Electronics AX88172 USB Ethernet
 if_bce_load="NO"		# Broadcom NetXtreme II Gigabit Ethernet
 if_bfe_load="NO"		# Broadcom BCM4401
 if_bge_load="NO"		# Broadcom BCM570x PCI Gigabit Ethernet
+if_bwi_load="NO"		# Broadcom BCM53xx IEEE 802.11b/g wireness NICs
 if_bwn_load="NO"		# Broadcom BCM43xx IEEE 802.11 wireless NICs
 if_cas_load="NO"		# Sun Cassini/Cassini+ and NS DP83065 Saturn
 if_cm_load="NO"			# SMC (90c26, 90c56, 90c66)
 if_cs_load="NO"			# Crystal Semiconductor CS8920
 if_cue_load="NO"		# CATC USB-EL1210A USB Ethernet
+if_cxgb_load="NO"		# Chelsio T3 10 Gigabit Ethernet
 if_dc_load="NO"			# DEC/Intel 21143 and various workalikes
 if_de_load="NO"			# DEC DC21x4x Ethernet
 if_ed_load="NO"			# National Semiconductor DS8390/WD83C690
@@ -235,16 +278,19 @@ if_en_load="NO"			# Midway-based ATM int
 if_ep_load="NO"			# 3Com Etherlink III (3c5x9)
 if_et_load="NO"			# Agere ET1310 10/100/Gigabit Ethernet
 if_ex_load="NO"			# Intel EtherExpress Pro/10 Ethernet
+if_fatm_load="NO"		# Fore PCA200E ATM
 if_fe_load="NO"			# Fujitsu MB86960A/MB86965A based Ethernet
 				# adapters
 if_fxp_load="NO"		# Intel EtherExpress PRO/100B (82557, 82558)
 if_gem_load="NO"		# Sun GEM/Sun ERI/Apple GMAC
+if_hatm_load="NO"		# Fore/Marconi HE155 and HE622
 if_hme_load="NO"		# Sun Microelectronics STP2002-STQ Ethernet
 if_ie_load="NO"			# Intel 82586
 if_igb_load="NO"		# Intel(R) PRO/1000 Gigabit Ethernet
 if_ipw_load="NO"		# Intel PRO/Wireless 2100 wireless
 if_iwi_load="NO"		# Intel PRO/Wireless 2200BG/2225BG/2915ABG
 				# wireless
+if_iwn_load="NO"		# Intel Wireless WiFi Link 802.11n wireless
 if_ixgb_load="NO"		# Intel PRO/10Gb Ethernet
 if_ixgbe_load="NO"		# Intel PRO/10Gb Ethernet PCI Express
 if_jme_load="NO"		# JMicron JMC250 Gigabit/JMC260 Fast Ethernet
@@ -260,11 +306,14 @@ if_nfe_load="NO"		# NVIDIA nForce MCP Ne
 if_nge_load="NO"		# National Semiconductor PCI Gigabit Ethernet
 if_nve_load="NO"		# NVIDIA nForce MCP Networking Adapter
 if_nxge_load="NO"		# Neterion Xframe 10Gb Ethernet
+if_patm_load="NO"		# IDT77252 ATM
 if_pcn_load="NO"		# AMD PCnet PCI
 if_ral_load="NO"		# Ralink Technology wireless
 if_re_load="NO"			# RealTek 8139C+/8169/8169S/8110S
 if_rl_load="NO"			# RealTek 8129/8139
 if_rue_load="NO"		# RealTek RTL8150 USB to Fast Ethernet
+if_rum_load="NO"		# Ralink Technology USB 802.11a/b/g wireless
+if_run_load="NO"		# Ralink Technology USB 802.11a/g/n wireless
 if_sbni_load="NO"		# Granch SBNI12 leased line adapters
 if_sf_load="NO"			# Adaptec Duralink PCI (AIC-6915 "starfire")
 if_sge_load="NO"		# Silicon Integrated Systems SiS 190/191
@@ -290,6 +339,7 @@ if_wi_load="NO"			# WaveLAN/IEEE 802.11 
 if_wpi_load="NO"		# Intel 3945ABG Wireless LAN IEEE 802.11
 if_xe_load="NO"			# Xircom CreditCard PCMCIA
 if_xl_load="NO"			# 3Com Etherlink XL (3c900, 3c905, 3c905B)
+utopia_load="NO"		# ATM PHY driver
 
 ##############################################################
 ###  Netgraph modules  #######################################
@@ -376,18 +426,27 @@ snd_driver_load="NO"		# All sound driver
 usb_load="NO"			# USB subsystem
 udbp_load="NO"			# USB double bulk pipe host 2 host cables
 ugen_load="NO"			# USB generic device, if all else fails ...
+ucycom_load="NO"		# Cyprus USB serial adapters
 ufm_load="NO"			# Fm Radio
 uhid_load="NO"			# Human Interface Devices
 ukbd_load="NO"			# Keyboard
 ulpt_load="NO"			# Printer
 ums_load="NO"			# Mouse
 umass_load="NO"			# Mass Storage Devices
+umct_load="NO"			# Magic Control Technology USB-RS232
 umodem_load="NO"		# Modems
+uplcom_load="NO"		# Prolific USB serial adapters
+urio_load="NO"			# Rio MP3 players
+uvisor_load="NO"		# PalmOS based PDAs
 if_aue_load="NO"		# ADMtek USB ethernet
 if_axe_load="NO"		# ASIX Electronics AX88172 USB ethernet
+if_cdce_load="NO"		# Ethernet over USB (CDC)
 if_cue_load="NO"		# CATC USB ethernet
 if_kue_load="NO"		# Kawasaki LSI USB ethernet
+if_rae_load="NO"		# Realtek RTL8150 USB adapter.
 if_rum_load="NO"		# Ralink USB 802.11 wireless adapter
+if_uath_load="NO"		# Atheros AR5523 wireless adapter
+if_run_load="NO"		# Ralink USB 802.11 wireless adapter
 if_ural_load="NO"		# Ralink RT2500USB 802.11 wireless adapter
 if_zyd_load="NO"		# ZyDAS ZD1211(B) USB 802.11 wireless adapter
 snd_uaudio_load="NO"		# USB audio
@@ -396,15 +455,22 @@ snd_uaudio_load="NO"		# USB audio
 ###  Other modules  ##########################################
 ##############################################################
 
+aio_load="NO"			# Asynchronous I/O
 bktr_load="NO"			# Brooktree Bt848/Bt878 TV/Video Capture Card
 ispfw_load="NO"			# Qlogic ISP Firmware
 agp_load="NO"			# agp module
 accf_data_load="NO"		# Wait for data accept filter
 accf_dns_load="NO"		# Wait for full DNS request accept filter
 accf_http_load="NO"		# Wait for full HTTP request accept filter
+ppi_load="NO"			# Interface to ppbus parallel 'geek' port
+pps_load="NO"			# Pulse per second devices
+puc_load="NO"			# PCI "Universal" Communications driver
 random_load="NO"		# Random device
 speaker_load="NO"		# AT speaker module
 coretemp_load="NO"		# Intel Core CPU temperature monitor
+vkbd_load="NO"			# Virtual AT keyboard interface
+vpd_load="NO"			# Vital Product Data kernel interface
+vpo_load="NO"			# Parallel to SCSI interface driver
 amdtemp_load="NO"		# AMD K8/K10/K11 temperature monitor
 
 ##############################################################

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 13:31:50 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 83BF01065673;
	Sat,  7 Aug 2010 13:31:50 +0000 (UTC)
	(envelope-from nagilum@nagilum.org)
Received: from moutng.kundenserver.de (moutng.kundenserver.de
	[212.227.126.187])
	by mx1.freebsd.org (Postfix) with ESMTP id 2DD3E8FC1C;
	Sat,  7 Aug 2010 13:31:49 +0000 (UTC)
Received: from cakebox.homeunix.net (p508129FC.dip0.t-ipconnect.de
	[80.129.41.252])
	by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis)
	id 0M9eFb-1OnWk22uI3-00CTuK; Sat, 07 Aug 2010 15:19:13 +0200
Received: from cakebox.homeunix.net (localhost [127.0.0.1])
	by cakebox.homeunix.net (Postfix) with ESMTP id 8F6CB67842;
	Sat,  7 Aug 2010 15:19:01 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on cakebox.tis
X-Spam-Level: 
X-Spam-Status: No, score=-2.9 required=3.7 tests=ALL_TRUSTED,BAYES_00
	autolearn=ham version=3.3.1
Received: by cakebox.homeunix.net (Postfix, from userid 80)
	id 319816783A; Sat,  7 Aug 2010 15:18:59 +0200 (CEST)
Received: from p508129FC.dip0.t-ipconnect.de (p508129FC.dip0.t-ipconnect.de
	[80.129.41.252]) by cakebox.homeunix.net (Horde Framework) with HTTP;
	Sat, 07 Aug 2010 15:18:58 +0200
Message-ID: <20100807151858.18405yjtkz4ijzks@cakebox.homeunix.net>
Date: Sat, 07 Aug 2010 15:18:58 +0200
From: Nagilum 
To: Bruce Cran 
References: <201008071218.o77CIavd036475@svn.freebsd.org>
In-Reply-To: <201008071218.o77CIavd036475@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=ISO-8859-2;
 DelSp="Yes";
 format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4)
X-Provags-ID: V02:K0:Hr4KfChEtOmd873WCu1FeHRiGD15GMybSgU5aF4X5k9
	TwzlfRQpanLmnpCgym+vEWWE4SqNT1QDxYIVTi40AsHmvOD/EJ
	I5F+tB78NoCheUH9vqHobg+pQ+/QfQkgCrPJRYP1ez0fAK37k5
	bKlQcl7CpaDiXgxv39dURKOYzdpgE4DOPBREBR9zbWPEnMphvq
	ZJ/UvufFpVQzrxdYc+sz+C1/cVlyKxVN/QfNxwv3kc=
Cc: svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r211007 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 13:31:50 -0000

I'm not so sure about the minsize for /
/boot is not too unlikely to end up on a separate partition (ie. if  
the BIOS has trouble accessing / or the system was set up with ZFS as  
rootfs before zfsloader) and the rest would fit just fine in 128MB:

1.0M    bin
1.9M    etc
6.8M    lib
482K    libexec
4.2M    rescue
4.9M    sbin

root@cakebox / > uname -a
FreeBSD cakebox.tis 8.1-STABLE FreeBSD 8.1-STABLE #0: Fri Jul 30  
11:27:47 CEST 2010      
root@cakebox.tis:/usr/obj/export/src/sys/net5501  i386

But maybe it's just me..

----- Message from brucec@FreeBSD.org ---------
     Date: Sat, 7 Aug 2010 12:18:36 +0000 (UTC)
     From: Bruce Cran 
  Subject: svn commit: r211007 - stable/8/usr.sbin/sysinstall
       To: src-committers@freebsd.org, svn-src-all@freebsd.org,  
svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org


> Author: brucec
> Date: Sat Aug  7 12:18:36 2010
> New Revision: 211007
> URL: http://svn.freebsd.org/changeset/base/211007
>
> Log:
>   MFC r209764:
>
>   Increase the default and minimum partition sizes.
>   Bump / to 1GB, /var to 4GB and /tmp to 1GB.
>
>   A 512MB root partition is now too small to hold two kernels, so to
>   prevent installkernel failing 1GB is a better default. Likewise,
>   applications are storing more data in /var so 4GB is more reasonable
>   on a modern machine.
>
>   The previous minimum partition sizes were too small to hold a minimal
>   installation, and have been adjusted accordingly.
>
>   Approved by: rrs (mentor)
>
> Modified:
>   stable/8/usr.sbin/sysinstall/label.c
> Directory Properties:
>   stable/8/usr.sbin/sysinstall/   (props changed)
>
> Modified: stable/8/usr.sbin/sysinstall/label.c
> ==============================================================================
> --- stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 11:57:13 2010	(r211006)
> +++ stable/8/usr.sbin/sysinstall/label.c	Sat Aug  7 12:18:36 2010	(r211007)
> @@ -62,9 +62,9 @@
>   * Minimum partition sizes
>   */
>  #if defined(__ia64__) || defined(__sparc64__) || defined(__amd64__)
> -#define ROOT_MIN_SIZE			128
> +#define ROOT_MIN_SIZE			280
>  #else
> -#define ROOT_MIN_SIZE			118
> +#define ROOT_MIN_SIZE			180
>  #endif
>  #define SWAP_MIN_SIZE			32
>  #define USR_MIN_SIZE			160
> @@ -82,10 +82,10 @@
>   * for this configuration we scale things relative to the NOM vs DEFAULT
>   * sizes.  If the disk is larger then /home will get any remaining space.
>   */
> -#define ROOT_DEFAULT_SIZE		512
> +#define ROOT_DEFAULT_SIZE		1024
>  #define USR_DEFAULT_SIZE		8192
> -#define VAR_DEFAULT_SIZE		1024
> -#define TMP_DEFAULT_SIZE		512
> +#define VAR_DEFAULT_SIZE		4096
> +#define TMP_DEFAULT_SIZE		1024
>  #define HOME_DEFAULT_SIZE		USR_DEFAULT_SIZE
>
>  /*
> @@ -93,9 +93,9 @@
>   * when we have insufficient disk space.  If this isn't sufficient we scale
>   * down using the MIN sizes instead.
>   */
> -#define ROOT_NOMINAL_SIZE		256
> +#define ROOT_NOMINAL_SIZE		512
>  #define USR_NOMINAL_SIZE		1536
> -#define VAR_NOMINAL_SIZE		128
> +#define VAR_NOMINAL_SIZE		512
>  #define TMP_NOMINAL_SIZE		128
>  #define HOME_NOMINAL_SIZE		USR_NOMINAL_SIZE
>
> _______________________________________________
> svn-src-stable-8@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-stable-8
> To unsubscribe, send any mail to "svn-src-stable-8-unsubscribe@freebsd.org"
>


----- End message from brucec@FreeBSD.org -----



========================================================================
#    _  __          _ __     http://www.nagilum.org/ \n icq://69646724 #
#   / |/ /__ ____ _(_) /_ ____ _  nagilum@nagilum.org \n +491776461165 #
#  /    / _ `/ _ `/ / / // /  ' \  Amiga (68k/PPC): AOS/NetBSD/Linux   #
# /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/   Mac (PPC): MacOS-X / NetBSD /Linux #
#           /___/     x86: FreeBSD/Linux/Solaris/Win2k  ARM9: EPOC EV6 #
========================================================================


----------------------------------------------------------------
cakebox.homeunix.net - all the machine one needs..

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 13:34:52 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ABFA9106566C;
	Sat,  7 Aug 2010 13:34:52 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9A4448FC14;
	Sat,  7 Aug 2010 13:34: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 o77DYqFU054298;
	Sat, 7 Aug 2010 13:34:52 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DYqjL054294;
	Sat, 7 Aug 2010 13:34:52 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071334.o77DYqjL054294@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:34:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211017 - stable/8/lib/libc/net
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 13:34:52 -0000

Author: brucec
Date: Sat Aug  7 13:34:52 2010
New Revision: 211017
URL: http://svn.freebsd.org/changeset/base/211017

Log:
  MFC r209684:
  
  Use ISO C99 integer types instead of the BSD-specific u_int*_t.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/lib/libc/net/sctp_recvmsg.3
  stable/8/lib/libc/net/sctp_send.3
  stable/8/lib/libc/net/sctp_sys_calls.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/net/sctp_recvmsg.3
==============================================================================
--- stable/8/lib/libc/net/sctp_recvmsg.3	Sat Aug  7 13:26:08 2010	(r211016)
+++ stable/8/lib/libc/net/sctp_recvmsg.3	Sat Aug  7 13:34:52 2010	(r211017)
@@ -146,14 +146,14 @@ The 
 argument is defined as follows.
 .Bd -literal
 struct sctp_sndrcvinfo {
-	u_int16_t sinfo_stream;  /* Stream arriving on */
-	u_int16_t sinfo_ssn;     /* Stream Sequence Number */
-	u_int16_t sinfo_flags;   /* Flags on the incoming message */
-	u_int32_t sinfo_ppid;    /* The ppid field */
-	u_int32_t sinfo_context; /* context field */
-	u_int32_t sinfo_timetolive; /* not used by sctp_recvmsg */
-	u_int32_t sinfo_tsn;        /* The transport sequence number */
-	u_int32_t sinfo_cumtsn;     /* The cumulative acknowledgment point  */
+	uint16_t sinfo_stream;  /* Stream arriving on */
+	uint16_t sinfo_ssn;     /* Stream Sequence Number */
+	uint16_t sinfo_flags;   /* Flags on the incoming message */
+	uint32_t sinfo_ppid;    /* The ppid field */
+	uint32_t sinfo_context; /* context field */
+	uint32_t sinfo_timetolive; /* not used by sctp_recvmsg */
+	uint32_t sinfo_tsn;        /* The transport sequence number */
+	uint32_t sinfo_cumtsn;     /* The cumulative acknowledgment point  */
 	sctp_assoc_t sinfo_assoc_id; /* The association id of the peer */
 };
 .Ed

Modified: stable/8/lib/libc/net/sctp_send.3
==============================================================================
--- stable/8/lib/libc/net/sctp_send.3	Sat Aug  7 13:26:08 2010	(r211016)
+++ stable/8/lib/libc/net/sctp_send.3	Sat Aug  7 13:34:52 2010	(r211017)
@@ -94,14 +94,14 @@ structure is used to control various SCT
 and has the following format:
 .Bd -literal
 struct sctp_sndrcvinfo {
-	u_int16_t sinfo_stream;  /* Stream sending to */
-	u_int16_t sinfo_ssn;     /* valid for recv only */
-	u_int16_t sinfo_flags;   /* flags to control sending */
-	u_int32_t sinfo_ppid;    /* ppid field */
-	u_int32_t sinfo_context; /* context field */
-	u_int32_t sinfo_timetolive; /* timetolive for PR-SCTP */
-	u_int32_t sinfo_tsn;        /* valid for recv only */
-	u_int32_t sinfo_cumtsn;     /* valid for recv only */
+	uint16_t sinfo_stream;  /* Stream sending to */
+	uint16_t sinfo_ssn;     /* valid for recv only */
+	uint16_t sinfo_flags;   /* flags to control sending */
+	uint32_t sinfo_ppid;    /* ppid field */
+	uint32_t sinfo_context; /* context field */
+	uint32_t sinfo_timetolive; /* timetolive for PR-SCTP */
+	uint32_t sinfo_tsn;        /* valid for recv only */
+	uint32_t sinfo_cumtsn;     /* valid for recv only */
 	sctp_assoc_t sinfo_assoc_id; /* The association id */
 };
 .Ed

Modified: stable/8/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- stable/8/lib/libc/net/sctp_sys_calls.c	Sat Aug  7 13:26:08 2010	(r211016)
+++ stable/8/lib/libc/net/sctp_sys_calls.c	Sat Aug  7 13:34:52 2010	(r211017)
@@ -49,9 +49,9 @@ __FBSDID("$FreeBSD$");
 
 #ifndef IN6_IS_ADDR_V4MAPPED
 #define IN6_IS_ADDR_V4MAPPED(a)		      \
-	((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) &&	\
-	 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) &&	\
-	 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
+	((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) &&	\
+	 (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) &&	\
+	 (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
 #endif
 
 
@@ -533,11 +533,11 @@ sctp_sendmsg(int s,
     size_t len,
     const struct sockaddr *to,
     socklen_t tolen,
-    u_int32_t ppid,
-    u_int32_t flags,
-    u_int16_t stream_no,
-    u_int32_t timetolive,
-    u_int32_t context)
+    uint32_t ppid,
+    uint32_t flags,
+    uint16_t stream_no,
+    uint32_t timetolive,
+    uint32_t context)
 {
 #ifdef SYS_sctp_generic_sendmsg
 	struct sctp_sndrcvinfo sinfo;
@@ -814,11 +814,11 @@ sctp_sendmsgx(int sd,
     size_t len,
     struct sockaddr *addrs,
     int addrcnt,
-    u_int32_t ppid,
-    u_int32_t flags,
-    u_int16_t stream_no,
-    u_int32_t timetolive,
-    u_int32_t context)
+    uint32_t ppid,
+    uint32_t flags,
+    uint16_t stream_no,
+    uint32_t timetolive,
+    uint32_t context)
 {
 	struct sctp_sndrcvinfo sinfo;
 

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 13:36:55 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E54531065670;
	Sat,  7 Aug 2010 13:36:55 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D3E728FC17;
	Sat,  7 Aug 2010 13:36: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 o77DatoX054787;
	Sat, 7 Aug 2010 13:36:55 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DatHk054785;
	Sat, 7 Aug 2010 13:36:55 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071336.o77DatHk054785@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:36:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211018 - stable/8/lib/libc/net
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 13:36:56 -0000

Author: brucec
Date: Sat Aug  7 13:36:55 2010
New Revision: 211018
URL: http://svn.freebsd.org/changeset/base/211018

Log:
  MFC r209709:
  
  Increment 'sa' at the end of the loop; otherwise, only the first
  address ever gets checked.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/lib/libc/net/sctp_sys_calls.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/locale/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/sys/   (props changed)

Modified: stable/8/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- stable/8/lib/libc/net/sctp_sys_calls.c	Sat Aug  7 13:34:52 2010	(r211017)
+++ stable/8/lib/libc/net/sctp_sys_calls.c	Sat Aug  7 13:36:55 2010	(r211018)
@@ -304,7 +304,7 @@ sctp_bindx(int sd, struct sockaddr *addr
 			goto out_error;
 		}
 
-
+		sa = (struct sockaddr *)((caddr_t)sa + sz);
 	}
 	sa = addrs;
 	/*

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 13:40:00 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3FA31106564A;
	Sat,  7 Aug 2010 13:40:00 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 13CA98FC1C;
	Sat,  7 Aug 2010 13:40:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77DdxQS055550;
	Sat, 7 Aug 2010 13:39:59 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DdxhP055548;
	Sat, 7 Aug 2010 13:39:59 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071339.o77DdxhP055548@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:39:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211019 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 13:40:00 -0000

Author: brucec
Date: Sat Aug  7 13:39:59 2010
New Revision: 211019
URL: http://svn.freebsd.org/changeset/base/211019

Log:
  MFC r209748:
  
  Simplify the wording of the console configuration dialogs since we now
  only have a single video console driver.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/menus.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/menus.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/menus.c	Sat Aug  7 13:36:55 2010	(r211018)
+++ stable/8/usr.sbin/sysinstall/menus.c	Sat Aug  7 13:39:59 2010	(r211019)
@@ -1840,9 +1840,8 @@ DMenu MenuNTP = {
 DMenu MenuSyscons = {
     DMENU_NORMAL_TYPE,
     "System Console Configuration",
-    "The default system console driver for FreeBSD (syscons) has a\n"
-    "number of configuration options which may be set according to\n"
-    "your preference.\n\n"
+    "The system console driver for FreeBSD has a number of configuration\n"
+    "options which may be set according to your preference.\n\n"
     "When you are done setting configuration options, select Cancel.",
     "Configure your system console settings",
     NULL,
@@ -1866,9 +1865,9 @@ DMenu MenuSyscons = {
 DMenu MenuSysconsKeymap = {
     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
     "System Console Keymap",
-    "The default system console driver for FreeBSD (syscons) defaults\n"
-    "to a standard \"PC-98x1\" keyboard map.  Users may wish to choose\n"
-    "one of the other keymaps below.\n"
+    "The system console driver for FreeBSD defaults to a standard\n"
+    "\"PC-98x1\" keyboard map.  Users may wish to choose one of the\n"
+    "other keymaps below.\n"
     "Note that sysinstall itself only uses the part of the keyboard map\n"
     "which is required to generate the ANSI character subset, but your\n"
     "choice of keymap will also be saved for later (fuller) use.",
@@ -1882,10 +1881,10 @@ DMenu MenuSysconsKeymap = {
 DMenu MenuSysconsKeymap = {
     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
     "System Console Keymap",
-    "The default system console driver for FreeBSD (syscons) defaults\n"
-    "to a standard \"American\" keyboard map.  Users in other countries\n"
-    "(or with different keyboard preferences) may wish to choose one of\n"
-    "the other keymaps below.\n"
+    "The system console driver for FreeBSD defaults to a standard\n"
+    "\"American\" keyboard map.  Users in other countries (or with\n"
+    "different keyboard preferences) may wish to choose one of the\n"
+    "other keymaps below.\n"
     "Note that sysinstall itself only uses the part of the keyboard map\n"
     "which is required to generate the ANSI character subset, but your\n"
     "choice of keymap will also be saved for later (fuller) use.",

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 13:42:55 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1E219106564A;
	Sat,  7 Aug 2010 13:42:55 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0B1CD8FC13;
	Sat,  7 Aug 2010 13:42: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 o77DgspG056254;
	Sat, 7 Aug 2010 13:42:54 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77DgsVx056249;
	Sat, 7 Aug 2010 13:42:54 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201008071342.o77DgsVx056249@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 7 Aug 2010 13:42:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211020 - stable/8/usr.sbin/sysinstall
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 13:42:55 -0000

Author: brucec
Date: Sat Aug  7 13:42:54 2010
New Revision: 211020
URL: http://svn.freebsd.org/changeset/base/211020

Log:
  MFC r210175:
  
  FreeBSD 8 doesn't support kernel PPP or SLIP; remove code for configuring
  and installing via such devices from sysinstall.
  
  Approved by: rrs (mentor)

Modified:
  stable/8/usr.sbin/sysinstall/devices.c
  stable/8/usr.sbin/sysinstall/install.c
  stable/8/usr.sbin/sysinstall/menus.c
  stable/8/usr.sbin/sysinstall/network.c
Directory Properties:
  stable/8/usr.sbin/sysinstall/   (props changed)

Modified: stable/8/usr.sbin/sysinstall/devices.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/devices.c	Sat Aug  7 13:39:59 2010	(r211019)
+++ stable/8/usr.sbin/sysinstall/devices.c	Sat Aug  7 13:42:54 2010	(r211020)
@@ -321,14 +321,6 @@ deviceGetAll(void)
 	if (!strncmp(ifptr->ifr_name, "lo", 2))
 	    goto loopend;
 
-	/* If we have a slip device, don't register it */
-	if (!strncmp(ifptr->ifr_name, "sl", 2)) {
-	    goto loopend;
-	}
-	/* And the same for ppp */
-	if (!strncmp(ifptr->ifr_name, "tun", 3) || !strncmp(ifptr->ifr_name, "ppp", 3)) {
-	    goto loopend;
-	}
 	/* Try and find its description */
 	for (i = 0, descr = NULL; device_names[i].name; i++) {
 	    int len = strlen(device_names[i].name);
@@ -416,29 +408,6 @@ skipif:
 		}
 		break;
 
-	    case DEVICE_TYPE_NETWORK:
-		fd = deviceTry(device_names[i], try, j);
-		/* The only network devices that you can open this way are serial ones */
-		if (fd >= 0) {
-		    char *newdesc, *cp;
-
-		    close(fd);
-		    cp = device_names[i].description;
-		    /* Serial devices get a slip and ppp device each, if supported */
-		    newdesc = safe_malloc(strlen(cp) + 40);
-		    sprintf(newdesc, cp, "SLIP interface", try, j + 1);
-		    deviceRegister("sl0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork,
-				   NULL, mediaShutdownNetwork, NULL);
-		    msgDebug("Add mapping for %s to sl0\n", try);
-		    newdesc = safe_malloc(strlen(cp) + 50);
-		    sprintf(newdesc, cp, "PPP interface", try, j + 1);
-		    deviceRegister("ppp0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork,
-				   NULL, mediaShutdownNetwork, NULL);
-		    if (isDebug())
-			msgDebug("Add mapping for %s to ppp0\n", try);
-		}
-		break;
-
 	    default:
 		break;
 	    }

Modified: stable/8/usr.sbin/sysinstall/install.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 13:39:59 2010	(r211019)
+++ stable/8/usr.sbin/sysinstall/install.c	Sat Aug  7 13:42:54 2010	(r211020)
@@ -690,7 +690,7 @@ nodisks:
 		   "may do so by typing: /usr/sbin/sysinstall.");
     }
     if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) {
-	if (!msgYesNo("Would you like to configure any Ethernet or SLIP/PPP network devices?")) {
+	if (!msgYesNo("Would you like to configure any Ethernet network devices?")) {
 	    Device *tmp = tcpDeviceSelect();
 
 	    if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))

Modified: stable/8/usr.sbin/sysinstall/menus.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/menus.c	Sat Aug  7 13:39:59 2010	(r211019)
+++ stable/8/usr.sbin/sysinstall/menus.c	Sat Aug  7 13:42:54 2010	(r211020)
@@ -882,13 +882,8 @@ DMenu MenuMediaFTP = {
 DMenu MenuNetworkDevice = {
     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
     "Network interface information required",
-    "If you are using PPP over a serial device, as opposed to a direct\n"
-    "ethernet connection, then you may first need to dial your Internet\n"
-    "Service Provider using the ppp utility we provide for that purpose.\n"
-    "If you're using SLIP over a serial device then the expectation is\n"
-    "that you have a HARDWIRED connection.\n\n"
-    "You can also install over a parallel port using a special \"laplink\"\n"
-    "cable to another machine running FreeBSD.",
+    "Please select the ethernet device to configure.\n\n"
+    "",
     "Press F1 to read network configuration manual",
     "network_device",
     { { NULL } },

Modified: stable/8/usr.sbin/sysinstall/network.c
==============================================================================
--- stable/8/usr.sbin/sysinstall/network.c	Sat Aug  7 13:39:59 2010	(r211019)
+++ stable/8/usr.sbin/sysinstall/network.c	Sat Aug  7 13:42:54 2010	(r211020)
@@ -45,9 +45,6 @@
 #include 
 
 static Boolean	networkInitialized;
-static pid_t	startPPP(Device *devp);
-
-static pid_t	pppPID;
 
 Boolean
 mediaInitNetwork(Device *dev)
@@ -73,56 +70,6 @@ mediaInitNetwork(Device *dev)
     w = savescr();
     dialog_clear_norefresh();
 
-    /* Old PPP process lying around? */
-    if (pppPID) {
-	msgConfirm("Killing previous PPP process %d.", pppPID);
-	kill(pppPID, SIGTERM);
-	pppPID = 0;
-    }
-    if (!strncmp("ppp", dev->name, 3)) {	/* PPP? */
-	if (!(pppPID = startPPP(dev))) {
-	    msgConfirm("Unable to start PPP!  This installation method cannot be used.");
-	    return FALSE;
-	}
-	networkInitialized = TRUE;
-	return TRUE;
-    }
-    else if (!strncmp("sl", dev->name, 2)) {	/* SLIP? */
-	char *val;
-	char attach[256];
-
-	/* Cheesy slip attach */
-	snprintf(attach, 256, "slattach -a -h -l -s 9600 %s", dev->devname);
-	val = msgGetInput(attach,
-			  "Warning:  SLIP is rather poorly supported in this revision\n"
-			  "of the installation due to the lack of a dialing utility.\n"
-			  "If you can use PPP for this instead then you're much better\n"
-			  "off doing so, otherwise SLIP works fairly well for *hardwired*\n"
-			  "links.  Please edit the following slattach command for\n"
-			  "correctness (default here is: VJ compression, Hardware flow-\n"
-			  "control, ignore carrier and 9600 baud data rate).  When you're\n"
-			  "ready, press [ENTER] to execute it.");
-	if (!val) {
-	    msgConfirm("slattach command was empty.  Try again!");
-	    restorescr(w);
-	    return FALSE;
-	}
-	else
-	    SAFE_STRCPY(attach, val);
-	/*
-	 * Doing this with vsystem() is actually bogus since we should be storing the pid of slattach
-	 * for later killing.  It's just too convenient to call vsystem(), however, rather than
-	 * constructing a proper argument for exec() so we punt on doing slip right for now.
-	 */
-	if (vsystem("%s", attach)) {
-	    msgConfirm("slattach returned a bad status!  Please verify that\n"
-		       "the command is correct and try this operation again.");
-	    restorescr(w);
-	    return FALSE;
-	}
-	restorescr(w);
-    }
-
     snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name);
     cp = variable_get(ifconfig);
     if (cp) {
@@ -181,9 +128,7 @@ mediaShutdownNetwork(Device *dev)
     if (!RunningAsInit || !networkInitialized)
 	return;
 
-    msgDebug("Shutdown called for network device %s\n", dev->name);
-    /* Not a serial device? */
-    if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) {
+	msgDebug("Shutdown called for network device %s\n", dev->name);
 	int i;
 	char ifconfig[255];
 
@@ -200,172 +145,5 @@ mediaShutdownNetwork(Device *dev)
 	    msgDebug("Deleting default route.\n");
 	    vsystem("route -n delete default");
 	}
-    }
-    else if (pppPID) {
-	msgConfirm("Killing previous PPP process %d.", pppPID);
-	kill(pppPID, SIGTERM);
-	pppPID = 0;
-    }
-    networkInitialized = FALSE;
 }
 
-/* Start PPP on the 3rd screen */
-static pid_t
-startPPP(Device *devp)
-{
-    int fd2, pulse;
-    FILE *fp;
-    char *val;
-    pid_t pid = 0;
-    char myaddr[16], provider[16], speed[16], authname[32], authkey[16];
-    char phone[16];
-    WINDOW *w = savescr();
-    
-    /* These are needed to make ppp work */
-    Mkdir("/var/log");
-    Mkdir("/var/run");
-    Mkdir("/var/spool/lock");
-    Mkdir("/etc/ppp");
-
-    dialog_clear_norefresh();
-    if (!variable_get(VAR_SERIAL_SPEED))
-	variable_set2(VAR_SERIAL_SPEED, "115200", 0);
-    /* Get any important user values */
-    val = variable_get_value(VAR_SERIAL_SPEED,
-		      "Enter the baud rate for your modem - this can be higher than the actual\n"
-		      "maximum data rate since most modems can talk at one speed to the\n"
-		      "computer and at another speed to the remote end.\n\n"
-		      "If you're not sure what to put here, just select the default.", 0);
-    SAFE_STRCPY(speed, (val && *val) ? val : "115200");
-
-    val = variable_get(VAR_GATEWAY);
-    SAFE_STRCPY(provider, (val && *val) ? val : "0");
-
-    dialog_clear_norefresh();
-    val = msgGetInput(provider, "Enter the IP address of your service provider or 0 if you\n"
-		      "don't know it and would prefer to negotiate it dynamically.");
-    SAFE_STRCPY(provider, (val && *val) ? val : "0");
-
-    if (devp->private && ((DevInfo *)devp->private)->ipaddr[0])
-	SAFE_STRCPY(myaddr, ((DevInfo *)devp->private)->ipaddr);
-    else
-	strcpy(myaddr, "0");
-
-    if (!Fake)
-	fp = fopen("/etc/ppp/ppp.linkup", "w");
-    else
-	fp = fopen("/dev/stderr", "w");
-    if (fp != NULL) {
-	fprintf(fp, "MYADDR:\n");
-	fprintf(fp, " delete ALL\n");
-        fprintf(fp, " add 0 0 HISADDR\n");
-	fchmod(fileno(fp), 0755);
-	fclose(fp);
-    }
-    if (!Fake)
-	fd2 = open("/etc/ppp/ppp.secret", O_CREAT);
-    else
-	fd2 = -1;
-    if (fd2 != -1) {
-	fchmod(fd2, 0700);
-	close(fd2);
-    }
-    if (!Fake)
-	fp = fopen("/etc/ppp/ppp.conf", "a");
-    else
-	fp = fopen("/dev/stderr", "w");
-    if (!fp) {
-	msgConfirm("Couldn't open /etc/ppp/ppp.conf file!  This isn't going to work");
-	restorescr(w);
-	return 0;
-    }
-    authname[0] = '\0';
-    pulse = 0;
-    dialog_clear_norefresh();
-    if (!dialog_yesno("", "Does your ISP support PAP or CHAP ppp logins?", -1, -1)) {
-	val = msgGetInput(NULL, "Enter the name you use to login to your provider.");
-	SAFE_STRCPY(authname, val);
-	dialog_clear_norefresh();
-	val = msgGetInput(NULL, "Enter the password you use to login to your provider.");
-	SAFE_STRCPY(authkey, val);
-	dialog_clear_norefresh();
-	val = msgGetInput(NULL, "Enter the your provider's login phone number.");
-	SAFE_STRCPY(phone, val);
-	dialog_clear_norefresh();
-	pulse = dialog_yesno("", "Does your telephone line support tone dialing?", -1, -1);
-    }
-    fprintf(fp, "\ninstall:\n");
-    fprintf(fp, " set speed %s\n", speed);
-    fprintf(fp, " set device %s\n", devp->devname);
-    fprintf(fp, " set ifaddr %s %s 255.255.255.0 0.0.0.0\n", myaddr, provider);
-    fprintf(fp, " add! default HISADDR\n");
-    fprintf(fp, " set timeout 0\n");
-    fprintf(fp, " enable dns\n");
-    fprintf(fp, " set log local phase\n");
-    if(authname[0] != '\0'){
-	fprintf(fp, " set dial \"ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 5 \\\"\\\" AT OK-AT-OK ATE1Q0 OK \\\\dATD%c\\\\T TIMEOUT 40 CONNECT\"\n", pulse ? 'P' : 'T');
-	fprintf(fp, " set login\n");
-	fprintf(fp, " set authname %s\n", authname);
-	fprintf(fp, " set authkey %s\n", authkey);
-	fprintf(fp, " set phone %s\n", phone);
-    }
-    if (fchmod(fileno(fp), 0600) != 0)
-	msgConfirm("Warning: Failed to fix permissions on /etc/ppp/ppp.conf !");
-    fclose(fp);
-
-    /* Make the ppp config persistent */
-    variable_set2(VAR_PPP_ENABLE, "YES", 0);
-    variable_set2(VAR_PPP_PROFILE, "install", 0);
-
-    if (!Fake && !file_readable("/dev/tun0")) {
-	msgConfirm("Warning:  No /dev/tun0 device.  PPP will not work!");
-	restorescr(w);
-	return 0;
-    }
-
-    if (isDebug())
-	msgDebug("About to start PPP on device %s @ %s baud.  Provider = %s\n", devp->devname, speed, provider);
-
-    if (!Fake && !(pid = fork())) {
-	int i, fd;
-	struct termios foo;
-	extern int login_tty(int);
-
-	for (i = getdtablesize(); i >= 0; i--)
-	    close(i);
-
-	/* We're going over to VTY2 */
-	fd = open("/dev/ttyv2", O_RDWR);
-	ioctl(0, TIOCSCTTY, &fd);
-	dup2(0, 1);
-	dup2(0, 2);
-	DebugFD = 2;
-	if (login_tty(fd) == -1)
-	    msgDebug("ppp: Can't set the controlling terminal.\n");
-	signal(SIGTTOU, SIG_IGN);
-	if (tcgetattr(fd, &foo) != -1) {
-	    foo.c_cc[VERASE] = '\010';
-	    if (tcsetattr(fd, TCSANOW, &foo) == -1)
-		msgDebug("ppp: Unable to set the erase character.\n");
-	}
-	else
-	    msgDebug("ppp: Unable to get the terminal attributes!\n");
-	execlp("ppp", "ppp", "install", (char *)NULL);
-	msgDebug("PPP process failed to exec!\n");
-	exit(1);
-    }
-    else {
-	dialog_clear_norefresh();
-	msgConfirm("NOTICE: The PPP command is now started on VTY3 (type ALT-F3 to\n"
-           "interact with it, ALT-F1 to switch back here). If you are using\n"
-           "a PAP or CHAP login simply enter \"dial\", otherwise you'll need\n"
-           "to use the \"term\" command which starts a terminal emulator\n"
-           "which you can use to talk to your modem and dial the service\n"
-           "provider.  Once you're connected, come back to this screen and\n"
-           "press return.\n\n"
-           "DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n"
-           "ESTABLISHED!");
-    }
-    restorescr(w);
-    return pid;
-}

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 19:02:00 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4A0491065672;
	Sat,  7 Aug 2010 19:02:00 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 19B4A8FC0A;
	Sat,  7 Aug 2010 19:02:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77J207E027885;
	Sat, 7 Aug 2010 19:02:00 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77J1xPC027883;
	Sat, 7 Aug 2010 19:01:59 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008071901.o77J1xPC027883@svn.freebsd.org>
From: Gavin Atkinson 
Date: Sat, 7 Aug 2010 19:01:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211032 - stable/8/sys/dev/usb
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 19:02:00 -0000

Author: gavin
Date: Sat Aug  7 19:01:59 2010
New Revision: 211032
URL: http://svn.freebsd.org/changeset/base/211032

Log:
  Merge r210575 from head:
  
    Provide descriptions for three vendors and four devices in usbdevs.  Use
    the official vendor listed for 0x076b, rather than Omnikey, as in the PR.
  
  PR:		usb/123351
  Submitted by:	Marcin Cieslak 

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

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs	Sat Aug  7 18:30:10 2010	(r211031)
+++ stable/8/sys/dev/usb/usbdevs	Sat Aug  7 19:01:59 2010	(r211032)
@@ -373,6 +373,7 @@ vendor AUREAL		0x0755	Aureal Semiconduct
 vendor MIDIMAN		0x0763	Midiman
 vendor CYBERPOWER	0x0764	Cyber Power Systems, Inc.
 vendor SURECOM		0x0769	Surecom Technology
+vendor HIDGLOBAL	0x076b	HID Global
 vendor LINKSYS2		0x077b	Linksys
 vendor GRIFFIN		0x077d	Griffin Technology
 vendor SANDISK		0x0781	SanDisk
@@ -437,6 +438,7 @@ vendor BURRBROWN	0x08bb	Burr-Brown Japan
 vendor 2WIRE		0x08c8	2Wire
 vendor AIPTEK		0x08ca	AIPTEK International
 vendor SMARTBRIDGES	0x08d1	SmartBridges
+vendor FUJITSUSIEMENS	0x08d4	Fujitsu-Siemens
 vendor BILLIONTON	0x08dd	Billionton Systems
 vendor EXTENDED		0x08e9	Extended Systems
 vendor MSYSTEMS		0x08ec	M-Systems
@@ -512,6 +514,7 @@ vendor FSC		0x0bf8	Fujitsu Siemens Compu
 vendor AGATE		0x0c08	Agate Technologies
 vendor DMI		0x0c0b	DMI
 vendor CHICONY2		0x0c45	Chicony
+vendor REINERSCT	0x0c4b	Reiner-SCT
 vendor SEALEVEL		0x0c52	Sealevel System
 vendor LUWEN		0x0c76	Luwen
 vendor KYOCERA2		0x0c88	Kyocera Wireless Corp.
@@ -1548,6 +1551,9 @@ product FUJIPHOTO MASS0100	0x0100	Mass S
 /* Fujitsu protducts */
 product FUJITSU AH_F401U	0x105b	AH-F401U Air H device
 
+/* Fujitsu-Siemens protducts */
+product FUJITSUSIEMENS SCR	0x0009	Fujitsu-Siemens SCR USB Reader
+
 /* Garmin products */
 product GARMIN IQUE_3600	0x0004	iQue 3600
 
@@ -1642,6 +1648,10 @@ product HAWKING HWUN2		0x0009	HWUN2
 product HAWKING RT3070		0x000b	RT3070
 product HAWKING UF100		0x400c	10/100 USB Ethernet
 
+/* HID Global GmbH products */
+product HIDGLOBAL CM2020	0x0596	Omnikey Cardman 2020
+product HIDGLOBAL CM6020	0x1784	Omnikey Cardman 6020
+
 /* Hitachi, Ltd. products */
 product HITACHI DVDCAM_DZ_MV100A	0x0004	DVD-CAM DZ-MV100A Camcorder
 product HITACHI DVDCAM_USB	0x001e	DVDCAM USB HS Interface
@@ -2598,6 +2608,9 @@ product RICOH VGPVCC2_3		0x1834	VGP-VCC2
 product RICOH VGPVCC7		0x183a	VGP-VCC7 Camera
 product RICOH VGPVCC8		0x183b	VGP-VCC8 Camera
 
+/* Reiner-SCT products */
+product REINERSCT CYBERJACK_ECOM	0x0100	e-com cyberJack
+
 /* Roland products */
 product ROLAND UM1		0x0009	UM-1 MIDI I/F
 product ROLAND UM880N		0x0014	EDIROL UM-880 MIDI I/F (native)

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Aug  7 19:08:40 2010
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4EAC3106564A;
	Sat,  7 Aug 2010 19:08:40 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 224C18FC12;
	Sat,  7 Aug 2010 19:08:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o77J8eAs029408;
	Sat, 7 Aug 2010 19:08:40 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o77J8eNJ029405;
	Sat, 7 Aug 2010 19:08:40 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201008071908.o77J8eNJ029405@svn.freebsd.org>
From: Gavin Atkinson 
Date: Sat, 7 Aug 2010 19:08:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r211033 - in stable/8/sys/dev/usb: . serial
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 07 Aug 2010 19:08:40 -0000

Author: gavin
Date: Sat Aug  7 19:08:39 2010
New Revision: 211033
URL: http://svn.freebsd.org/changeset/base/211033

Log:
  Merge r210534 from head:
  
    Add support for the Longcheer WM66 USB HSDPA Modem to u3g(4)
  
  PR:		usb/129945
  Submitted by:	Antonio Hilario 
  Committed from:	Bugathon #7

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

Modified: stable/8/sys/dev/usb/serial/u3g.c
==============================================================================
--- stable/8/sys/dev/usb/serial/u3g.c	Sat Aug  7 19:01:59 2010	(r211032)
+++ stable/8/sys/dev/usb/serial/u3g.c	Sat Aug  7 19:08:39 2010	(r211033)
@@ -285,6 +285,7 @@ static const struct usb_device_id u3g_de
 	U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI),
 	U3G_DEV(KYOCERA2, CDMA_MSM_K, 0),
 	U3G_DEV(KYOCERA2, KPC680, 0),
+	U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI),
 	U3G_DEV(MERLIN, V620, 0),
 	U3G_DEV(NOVATEL, E725, 0),
 	U3G_DEV(NOVATEL, ES620, 0),

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs	Sat Aug  7 19:01:59 2010	(r211032)
+++ stable/8/sys/dev/usb/usbdevs	Sat Aug  7 19:08:39 2010	(r211033)
@@ -653,6 +653,7 @@ vendor STELERA		0x1a8d	Stelera Wireless
 vendor OVISLINK		0x1b75	OvisLink
 vendor TCTMOBILE	0x1bbb  TCT Mobile
 vendor TELIT		0x1bc7  Telit
+vendor LONGCHEER	0x1c9e	Longcheer Holdings, Ltd.
 vendor MPMAN		0x1cae	MpMan
 vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik
 vendor PEGATRON		0x1d4d	Pegatron
@@ -1996,6 +1997,9 @@ product LOGITEC RT2870_1	0x0162	RT2870
 product LOGITEC RT2870_2	0x0163	RT2870
 product LOGITEC RT2870_3	0x0164	RT2870
 
+/* Longcheer Holdings, Ltd. products */
+product LONGCHEER WM66		0x6061	Longcheer WM66 HSDPA USB modem
+
 /* Lucent products */
 product LUCENT EVALKIT		0x1001	USS-720 evaluation kit