From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 23 18:24:55 2011 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 9F12C1065677; Sun, 23 Oct 2011 18:24:55 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F04C8FC15; Sun, 23 Oct 2011 18:24:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9NIOt5N050273; Sun, 23 Oct 2011 18:24:55 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NIOtYp050271; Sun, 23 Oct 2011 18:24:55 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110231824.p9NIOtYp050271@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Oct 2011 18:24: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: r226668 - stable/8/sys/dev/iicbus 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, 23 Oct 2011 18:24:55 -0000 Author: brueffer Date: Sun Oct 23 18:24:55 2011 New Revision: 226668 URL: http://svn.freebsd.org/changeset/base/226668 Log: MFC: r226398, r226442 Move the allocation of usrbufs down a few lines to avoid leaking it in case of an error. Modified: stable/8/sys/dev/iicbus/iic.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) Modified: stable/8/sys/dev/iicbus/iic.c ============================================================================== --- stable/8/sys/dev/iicbus/iic.c Sun Oct 23 18:20:51 2011 (r226667) +++ stable/8/sys/dev/iicbus/iic.c Sun Oct 23 18:24:55 2011 (r226668) @@ -346,11 +346,11 @@ iicioctl(struct cdev *dev, u_long cmd, c case I2CRDWR: buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); if (error) break; /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); for (i = 0; i < d->nmsgs; i++) { m = &((struct iic_msg *)buf)[i]; usrbufs[i] = m->buf; From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 23 18:37:57 2011 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 77E941065680; Sun, 23 Oct 2011 18:37:57 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 674548FC13; Sun, 23 Oct 2011 18:37:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9NIbve7050852; Sun, 23 Oct 2011 18:37:57 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NIbvo3050850; Sun, 23 Oct 2011 18:37:57 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110231837.p9NIbvo3050850@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Oct 2011 18:37: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: r226671 - stable/8/sys/dev/siba 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, 23 Oct 2011 18:37:57 -0000 Author: brueffer Date: Sun Oct 23 18:37:57 2011 New Revision: 226671 URL: http://svn.freebsd.org/changeset/base/226671 Log: MFC: r226406 Properly free resources in case of an error. Modified: stable/8/sys/dev/siba/siba_bwn.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) Modified: stable/8/sys/dev/siba/siba_bwn.c ============================================================================== --- stable/8/sys/dev/siba/siba_bwn.c Sun Oct 23 18:31:24 2011 (r226670) +++ stable/8/sys/dev/siba/siba_bwn.c Sun Oct 23 18:37:57 2011 (r226671) @@ -208,6 +208,7 @@ siba_bwn_suspend(device_t dev) if (error) { for (j = 0; j < i; j++) DEVICE_RESUME(devlistp[j]); + free(devlistp, M_TEMP); return (error); } } From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 25 21:58:30 2011 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 37FC2106566B; Tue, 25 Oct 2011 21:58:30 +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 258488FC08; Tue, 25 Oct 2011 21:58:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9PLwU1f018243; Tue, 25 Oct 2011 21:58:30 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PLwT5Q018235; Tue, 25 Oct 2011 21:58:29 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201110252158.p9PLwT5Q018235@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 25 Oct 2011 21:58: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: r226753 - 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: Tue, 25 Oct 2011 21:58:30 -0000 Author: edwin Date: Tue Oct 25 21:58:29 2011 New Revision: 226753 URL: http://svn.freebsd.org/changeset/base/226753 Log: MFC of 226752, tzdata2011m Europe: - Pridnestrovian Moldavian Republic (PMR, also known as "Pridnestrovie") has abolished seasonal clock change (no transition to the Winter Time). - The recent change to the Ukranian time zone (Europe/Kiev) to introduce permanent daylight saving time (similar to Russia) was reverted. South America: - Bahia: The President signed a decree that includes Bahia in summer time. zone.tab: - Add Europe/Tiraspol Pridnestrovie Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/australasia stable/8/share/zoneinfo/backward stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/northamerica stable/8/share/zoneinfo/southamerica stable/8/share/zoneinfo/zone.tab Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/asia ============================================================================== --- stable/8/share/zoneinfo/asia Tue Oct 25 21:53:43 2011 (r226752) +++ stable/8/share/zoneinfo/asia Tue Oct 25 21:58:29 2011 (r226753) @@ -1,4 +1,4 @@ -# @(#)asia 8.68 +# @(#)asia 8.69 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. Modified: stable/8/share/zoneinfo/australasia ============================================================================== --- stable/8/share/zoneinfo/australasia Tue Oct 25 21:53:43 2011 (r226752) +++ stable/8/share/zoneinfo/australasia Tue Oct 25 21:58:29 2011 (r226753) @@ -1,5 +1,5 @@ #
-# @(#)australasia	8.27
+# @(#)australasia	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/8/share/zoneinfo/backward
==============================================================================
--- stable/8/share/zoneinfo/backward	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/backward	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.9
+# @(#)backward	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -67,7 +67,6 @@ Link	America/Havana		Cuba
 Link	Africa/Cairo		Egypt
 Link	Europe/Dublin		Eire
 Link	Europe/London		Europe/Belfast
-Link	Europe/Chisinau		Europe/Tiraspol
 Link	Europe/London		GB
 Link	Europe/London		GB-Eire
 Link	Etc/GMT			GMT+0

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/europe	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.38
+# @(#)europe	8.39
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1655,6 +1655,29 @@ Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov
 # But [two people] separately reported via
 # Jesper Norgaard that as of 2001-01-24 Tiraspol was like Chisinau.
 # The Tiraspol entry has therefore been removed for now.
+#
+# From Alexander Krivenyshev (2011-10-17):
+# Pridnestrovian Moldavian Republic (PMR, also known as
+# "Pridnestrovie") has abolished seasonal clock change (no transition
+# to the Winter Time).
+#
+# News (in Russian):
+# 
+# http://www.kyivpost.ua/russia/news/pridnestrove-otkazalos-ot-perehoda-na-zimnee-vremya-30954.html
+# 
+#
+# 
+# http://www.allmoldova.com/moldova-news/1249064116.html
+# 
+#
+# The substance of this change (reinstatement of the Tiraspol entry)
+# is from a patch from Petr Machata (2011-10-17)
+#
+# From Tim Parenti (2011-10-19)
+# In addition, being situated at +4651+2938 would give Tiraspol
+# a pre-1880 LMT offset of 1:58:32.
+#
+# (which agrees with the earlier entry that had been removed)
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Chisinau	1:55:20 -	LMT	1880
@@ -1671,6 +1694,21 @@ Zone	Europe/Chisinau	1:55:20 -	LMT	1880
 # See Romania commentary for the guessed 1997 transition to EU rules.
 			2:00	EU	EE%sT
 
+Zone	Europe/Tiraspol	1:58:32 -	LMT	1880
+			1:55	-	CMT	1918 Feb 15 # Chisinau MT
+			1:44:24	-	BMT	1931 Jul 24 # Bucharest MT
+			2:00	Romania	EE%sT	1940 Aug 15
+			2:00	1:00	EEST	1941 Jul 17
+			1:00	C-Eur	CE%sT	1944 Aug 24
+			3:00	Russia	MSK/MSD	1990
+			3:00	-	MSK	1990 May 6
+			2:00	-	EET	1991
+			2:00	Russia	EE%sT	1992
+			2:00	E-Eur	EE%sT	1997
+# See Romania commentary for the guessed 1997 transition to EU rules.
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
+
 # Monaco
 # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
 # more precise 0:09:21.
@@ -2651,6 +2689,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # 
 # http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
 # 
+#
+# From Philip Pizzey (2011-10-18):
+# Today my Ukrainian colleagues have informed me that the
+# Ukrainian parliament have decided that they will go to winter
+# time this year after all.
+#
+# From Udo Schwedt (2011-10-18):
+# As far as I understand, the recent change to the Ukranian time zone 
+# (Europe/Kiev) to introduce permanent daylight saving time (similar
+# to Russia) was reverted today:
+#
+# 
+# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
+# 
+#
+# Also reported by Alexander Bokovoy (2011-10-18) who also noted:
+# The law documents themselves are at
+#
+# 
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+# 
+
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
@@ -2665,8 +2725,7 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2680,8 +2739,7 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2694,8 +2752,7 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2720,8 +2777,7 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 
 ###############################################################################
 

Modified: stable/8/share/zoneinfo/northamerica
==============================================================================
--- stable/8/share/zoneinfo/northamerica	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/northamerica	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.49
+# @(#)northamerica	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/8/share/zoneinfo/southamerica
==============================================================================
--- stable/8/share/zoneinfo/southamerica	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/southamerica	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.50
+# @(#)southamerica	8.52
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -818,6 +818,19 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # oficial agency about time in Brazil, and she confirmed that the old rule is
 # still in force.
 
+# From Guilherme Bernardes Rodrigues (2011-10-14)
+# It's official, the President signed a decree that includes Bahia in summer
+# time.
+#	 [ and in a second message (same day): ]
+# I found the decree.
+#
+# DECRETO No- 7.584, DE 13 DE OUTUBRO DE 2011
+# Link :
+# 
+# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6
+# 
+
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
 # Decree 21,896 (1932-01-10)
@@ -1054,10 +1067,8 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 # of America/Salvador.
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
-			-3:00	-	BRT
-# as noted above, not yet in operation.
-#			-3:00	-	BRT	2011 Oct 16
-#			-3:00	Brazil	BR%sT
+			-3:00	-	BRT	2011 Oct 16
+			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/zone.tab	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.49
+# @(#)zone.tab	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -258,6 +258,7 @@ LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
 MD	+4700+02850	Europe/Chisinau
+MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot
 MG	-1855+04731	Indian/Antananarivo

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Oct 25 23:19:57 2011
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 A6EC41065678;
	Tue, 25 Oct 2011 23:19:57 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7C5F08FC13;
	Tue, 25 Oct 2011 23:19:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9PNJvFi021276;
	Tue, 25 Oct 2011 23:19:57 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNJv5J021272;
	Tue, 25 Oct 2011 23:19:57 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110252319.p9PNJv5J021272@svn.freebsd.org>
From: Alan Cox 
Date: Tue, 25 Oct 2011 23: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: r226763 - in stable/8/sys: sys vm
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, 25 Oct 2011 23:19:57 -0000

Author: alc
Date: Tue Oct 25 23:19:57 2011
New Revision: 226763
URL: http://svn.freebsd.org/changeset/base/226763

Log:
  MFC r211937
    Add the MAP_PREFAULT_READ option to mmap(2).

Modified:
  stable/8/sys/sys/mman.h
  stable/8/sys/sys/param.h
  stable/8/sys/vm/vm_mmap.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)

Modified: stable/8/sys/sys/mman.h
==============================================================================
--- stable/8/sys/sys/mman.h	Tue Oct 25 23:17:53 2011	(r226762)
+++ stable/8/sys/sys/mman.h	Tue Oct 25 23:19:57 2011	(r226763)
@@ -87,6 +87,7 @@
  * Extended flags
  */
 #define	MAP_NOCORE	 0x00020000 /* dont include these pages in a coredump */
+#define	MAP_PREFAULT_READ 0x00040000 /* prefault mapping for reading */
 #endif /* __BSD_VISIBLE */
 
 #if __POSIX_VISIBLE >= 199309

Modified: stable/8/sys/sys/param.h
==============================================================================
--- stable/8/sys/sys/param.h	Tue Oct 25 23:17:53 2011	(r226762)
+++ stable/8/sys/sys/param.h	Tue Oct 25 23:19:57 2011	(r226763)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 802512	/* Master, propagated to newvers */
+#define __FreeBSD_version 802513	/* Master, propagated to newvers */
 
 #ifdef _KERNEL
 #define	P_OSREL_SIGWAIT		700000

Modified: stable/8/sys/vm/vm_mmap.c
==============================================================================
--- stable/8/sys/vm/vm_mmap.c	Tue Oct 25 23:17:53 2011	(r226762)
+++ stable/8/sys/vm/vm_mmap.c	Tue Oct 25 23:19:57 2011	(r226763)
@@ -1388,9 +1388,10 @@ vm_mmap(vm_map_t map, vm_offset_t *addr,
 		 */
 		if (handle == 0)
 			foff = 0;
-	} else {
+	} else if (flags & MAP_PREFAULT_READ)
+		docow = MAP_PREFAULT;
+	else
 		docow = MAP_PREFAULT_PARTIAL;
-	}
 
 	if ((flags & (MAP_ANON|MAP_SHARED)) == 0)
 		docow |= MAP_COPY_ON_WRITE;

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Oct 25 23:29:36 2011
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 A1CA41065673;
	Tue, 25 Oct 2011 23:29:36 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 908E58FC15;
	Tue, 25 Oct 2011 23:29:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9PNTagR021715;
	Tue, 25 Oct 2011 23:29:36 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNTaEf021713;
	Tue, 25 Oct 2011 23:29:36 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110252329.p9PNTaEf021713@svn.freebsd.org>
From: Alan Cox 
Date: Tue, 25 Oct 2011 23:29: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: r226766 - stable/8/lib/libc/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, 25 Oct 2011 23:29:36 -0000

Author: alc
Date: Tue Oct 25 23:29:36 2011
New Revision: 226766
URL: http://svn.freebsd.org/changeset/base/226766

Log:
  MFC r211937
    Add the MAP_PREFAULT_READ option to mmap(2).

Modified:
  stable/8/lib/libc/sys/mmap.2
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)

Modified: stable/8/lib/libc/sys/mmap.2
==============================================================================
--- stable/8/lib/libc/sys/mmap.2	Tue Oct 25 23:28:16 2011	(r226765)
+++ stable/8/lib/libc/sys/mmap.2	Tue Oct 25 23:29:36 2011	(r226766)
@@ -28,7 +28,7 @@
 .\"	@(#)mmap.2	8.4 (Berkeley) 5/11/95
 .\" $FreeBSD$
 .\"
-.Dd July 26, 2009
+.Dd August 28, 2010
 .Dt MMAP 2
 .Os
 .Sh NAME
@@ -207,6 +207,19 @@ implements a coherent file system buffer
 However, it may be
 used to associate dirty VM pages with file system buffers and thus cause
 them to be flushed to physical media sooner rather than later.
+.It Dv MAP_PREFAULT_READ
+Immediately update the calling process's lowest-level virtual address
+translation structures, such as its page table, so that every memory
+resident page within the region is mapped for read access.
+Ordinarily these structures are updated lazily.
+The effect of this option is to eliminate any soft faults that would
+otherwise occur on the initial read accesses to the region.
+Although this option does not preclude
+.Fa prot
+from including
+.Dv PROT_WRITE ,
+it does not eliminate soft faults on the initial write accesses to the
+region.
 .It Dv MAP_PRIVATE
 Modifications are private.
 .It Dv MAP_SHARED

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Oct 26 01:57:47 2011
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 9E01D1065686;
	Wed, 26 Oct 2011 01:57:47 +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 8CEF48FC1E;
	Wed, 26 Oct 2011 01:57:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9Q1vllI026655;
	Wed, 26 Oct 2011 01:57:47 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q1vlXb026653;
	Wed, 26 Oct 2011 01:57:47 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110260157.p9Q1vlXb026653@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 26 Oct 2011 01:57:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226772 - 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: Wed, 26 Oct 2011 01:57:47 -0000

Author: edwin
Date: Wed Oct 26 01:57:47 2011
New Revision: 226772
URL: http://svn.freebsd.org/changeset/base/226772

Log:
  MFC of r226771
  
  Fix breakage in tzsetup:
  MD      +4700+02850     Europe/Chisinau most locations

Modified:
  stable/8/share/zoneinfo/zone.tab
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Wed Oct 26 01:56:22 2011	(r226771)
+++ stable/8/share/zoneinfo/zone.tab	Wed Oct 26 01:57:47 2011	(r226772)
@@ -257,7 +257,7 @@ LV	+5657+02406	Europe/Riga
 LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
-MD	+4700+02850	Europe/Chisinau
+MD	+4700+02850	Europe/Chisinau	most locations
 MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Oct 26 04:38:24 2011
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 30BB1106564A;
	Wed, 26 Oct 2011 04:38:24 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 20EAF8FC1B;
	Wed, 26 Oct 2011 04:38:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9Q4cOAP032388;
	Wed, 26 Oct 2011 04:38:24 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q4cNaK032385;
	Wed, 26 Oct 2011 04:38:23 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110260438.p9Q4cNaK032385@svn.freebsd.org>
From: Alan Cox 
Date: Wed, 26 Oct 2011 04:38: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: r226783 - in stable/8: lib/libc/sys 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: Wed, 26 Oct 2011 04:38:24 -0000

Author: alc
Date: Wed Oct 26 04:38:23 2011
New Revision: 226783
URL: http://svn.freebsd.org/changeset/base/226783

Log:
  MFC r198973
    Add MAP_ANONYMOUS.

Modified:
  stable/8/lib/libc/sys/mmap.2
  stable/8/sys/sys/mman.h
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  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)

Modified: stable/8/lib/libc/sys/mmap.2
==============================================================================
--- stable/8/lib/libc/sys/mmap.2	Wed Oct 26 03:48:49 2011	(r226782)
+++ stable/8/lib/libc/sys/mmap.2	Wed Oct 26 04:38:23 2011	(r226783)
@@ -108,6 +108,10 @@ The
 argument must be 0.
 .\".It Dv MAP_FILE
 .\"Mapped from a regular file or character-special device memory.
+.It Dv MAP_ANONYMOUS
+This flag is identical to
+.Dv MAP_ANON
+and is provided for compatibility.
 .It Dv MAP_FIXED
 Do not permit the system to select a different address than the one
 specified.

Modified: stable/8/sys/sys/mman.h
==============================================================================
--- stable/8/sys/sys/mman.h	Wed Oct 26 03:48:49 2011	(r226782)
+++ stable/8/sys/sys/mman.h	Wed Oct 26 04:38:23 2011	(r226783)
@@ -82,6 +82,9 @@
  */
 #define	MAP_FILE	 0x0000	/* map from file (default) */
 #define	MAP_ANON	 0x1000	/* allocated from memory, swap space */
+#ifndef _KERNEL
+#define	MAP_ANONYMOUS	 MAP_ANON /* For compatibility. */
+#endif /* !_KERNEL */
 
 /*
  * Extended flags

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Oct 26 08:41:41 2011
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 82C88106564A;
	Wed, 26 Oct 2011 08:41:41 +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 67CB68FC14;
	Wed, 26 Oct 2011 08:41:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9Q8ffsf040469;
	Wed, 26 Oct 2011 08:41:41 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q8ffxh040463;
	Wed, 26 Oct 2011 08:41:41 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201110260841.p9Q8ffxh040463@svn.freebsd.org>
From: Martin Matuska 
Date: Wed, 26 Oct 2011 08:41:41 +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: r226787 - in stable/8: etc/defaults etc/rc.d
	share/man/man5
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, 26 Oct 2011 08:41:41 -0000

Author: mm
Date: Wed Oct 26 08:41:41 2011
New Revision: 226787
URL: http://svn.freebsd.org/changeset/base/226787

Log:
  MFC r226654, r226657, r226658:
  
  MFC r226654 [1]:
  Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp.
  Make sure that static ARP and NDP bindings are set before NETWORKING.
  
  As static_ndp is based on static_arp, pass copyright to the project with
  permission of the original author (delphij@).
  
  MFC r226657 [2]:
  Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@
  as the project itself is no legal entity
  
  MFC r226658 [3]:
  Add information about static_ndp_pairs to rc.conf(5) manual page
  
  Reviewed by:	Xin Li  [1]
  Reported by:	Joe Dahl  [2]
  Submitted by:	Sergey Kandaurov  [3]

Added:
  stable/8/etc/rc.d/static_ndp
     - copied, changed from r226654, head/etc/rc.d/static_ndp
Modified:
  stable/8/etc/defaults/rc.conf
  stable/8/etc/rc.d/Makefile
  stable/8/etc/rc.d/NETWORKING
  stable/8/share/man/man5/rc.conf.5
Directory Properties:
  stable/8/etc/   (props changed)
  stable/8/share/man/man5/   (props changed)

Modified: stable/8/etc/defaults/rc.conf
==============================================================================
--- stable/8/etc/defaults/rc.conf	Wed Oct 26 08:34:00 2011	(r226786)
+++ stable/8/etc/defaults/rc.conf	Wed Oct 26 08:41:41 2011	(r226787)
@@ -379,6 +379,7 @@ bsnmpd_flags=""			# Flags for bsnmpd.
 ### Network routing options: ###
 defaultrouter="NO"		# Set to default gateway (or NO).
 static_arp_pairs=""		# Set to static ARP list (or leave empty).
+static_ndp_pairs=""		# Set to static NDP list (or leave empty).
 static_routes=""		# Set to static route list (or leave empty).
 natm_static_routes=""		# Set to static route list for NATM (or leave empty).
 gateway_enable="NO"		# Set to YES if this host will be a gateway.

Modified: stable/8/etc/rc.d/Makefile
==============================================================================
--- stable/8/etc/rc.d/Makefile	Wed Oct 26 08:34:00 2011	(r226786)
+++ stable/8/etc/rc.d/Makefile	Wed Oct 26 08:41:41 2011	(r226787)
@@ -32,7 +32,7 @@ FILES=	DAEMON FILESYSTEMS LOGIN NETWORKI
 	random rarpd resolv rfcomm_pppd_server root \
 	route6d routed routing rpcbind rtadvd rtsold rwho \
 	savecore sdpd securelevel sendmail \
-	serial sppp statd static_arp swap1 \
+	serial sppp statd static_arp static_ndp swap1 \
 	syscons sysctl syslogd \
 	timed tmp \
 	ugidfw \

Modified: stable/8/etc/rc.d/NETWORKING
==============================================================================
--- stable/8/etc/rc.d/NETWORKING	Wed Oct 26 08:34:00 2011	(r226786)
+++ stable/8/etc/rc.d/NETWORKING	Wed Oct 26 08:41:41 2011	(r226787)
@@ -6,6 +6,7 @@
 # PROVIDE: NETWORKING NETWORK
 # REQUIRE: netif netoptions routing network_ipv6 ppp ipfw
 # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv
+# REQUIRE: static_arp static_ndp
 
 #	This is a dummy dependency, for services which require networking
 #	to be operational before starting.

Copied and modified: stable/8/etc/rc.d/static_ndp (from r226654, head/etc/rc.d/static_ndp)
==============================================================================
--- head/etc/rc.d/static_ndp	Sun Oct 23 09:08:42 2011	(r226654, copy source)
+++ stable/8/etc/rc.d/static_ndp	Wed Oct 26 08:41:41 2011	(r226787)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2011  The FreeBSD Project
+# Copyright (c) 2011  Xin Li 
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without

Modified: stable/8/share/man/man5/rc.conf.5
==============================================================================
--- stable/8/share/man/man5/rc.conf.5	Wed Oct 26 08:34:00 2011	(r226786)
+++ stable/8/share/man/man5/rc.conf.5	Wed Oct 26 08:41:41 2011	(r226787)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 19, 2011
+.Dd October 23, 2011
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -2312,6 +2312,22 @@ For example
 static_arp_pairs="gw"
 static_arp_gw="192.168.1.1 00:01:02:03:04:05"
 .Ed
+.It Va static_ndp_pairs
+.Pq Vt str
+Set to the list of static NDP pairs that are to be added at system
+boot time.
+For each whitespace separated
+.Ar element
+in the value, a
+.Va static_ndp_ Ns Aq Ar element
+variable is assumed to exist whose contents will later be passed to a
+.Dq Nm ndp Cm -s
+operation.
+For example
+.Bd -literal
+static_ndp_pairs="gw"
+static_ndp_gw="2001:db8:3::1 00:01:02:03:04:05"
+.Ed
 .It Va static_routes
 .Pq Vt str
 Set to the list of static routes that are to be added at system

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Oct 26 20:06:28 2011
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 11BA9106564A;
	Wed, 26 Oct 2011 20:06:28 +0000 (UTC)
	(envelope-from cperciva@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 00D9E8FC15;
	Wed, 26 Oct 2011 20:06:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9QK6RCr065534;
	Wed, 26 Oct 2011 20:06:27 GMT
	(envelope-from cperciva@svn.freebsd.org)
Received: (from cperciva@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QK6RkZ065532;
	Wed, 26 Oct 2011 20:06:27 GMT
	(envelope-from cperciva@svn.freebsd.org)
Message-Id: <201110262006.p9QK6RkZ065532@svn.freebsd.org>
From: Colin Percival 
Date: Wed, 26 Oct 2011 20:06: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: r226812 - stable/8/usr.sbin/freebsd-update
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, 26 Oct 2011 20:06:28 -0000

Author: cperciva
Date: Wed Oct 26 20:06:27 2011
New Revision: 226812
URL: http://svn.freebsd.org/changeset/base/226812

Log:
  MFC r226650: Make freebsd-update work with FreeBSD 9.0.  (In particular,
  this will simplify upgrading from 8.3-RELEASE to 9.x.)

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

Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/8/usr.sbin/freebsd-update/freebsd-update.sh	Wed Oct 26 20:01:43 2011	(r226811)
+++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh	Wed Oct 26 20:06:27 2011	(r226812)
@@ -1185,7 +1185,7 @@ fetch_metadata_sanity () {
 	# Some aliases to save space later: ${P} is a character which can
 	# appear in a path; ${M} is the four numeric metadata fields; and
 	# ${H} is a sha256 hash.
-	P="[-+./:=_[[:alnum:]]"
+	P="[-+./:=%@_[[:alnum:]]"
 	M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+"
 	H="[0-9a-f]{64}"
 

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Oct 27 14:11:19 2011
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 B3C4C1065676;
	Thu, 27 Oct 2011 14:11:19 +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 A2EEA8FC16;
	Thu, 27 Oct 2011 14:11:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9REBJcG010137;
	Thu, 27 Oct 2011 14:11:19 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9REBJQQ010134;
	Thu, 27 Oct 2011 14:11:19 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201110271411.p9REBJQQ010134@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 27 Oct 2011 14:11: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: r226838 - stable/8/contrib/csup
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, 27 Oct 2011 14:11:19 -0000

Author: kib
Date: Thu Oct 27 14:11:19 2011
New Revision: 226838
URL: http://svn.freebsd.org/changeset/base/226838

Log:
  MFC r225979:
  Update the comment.
  
  MFC r225980:
  Handle the situation where fixups_close() has been called but more fixups
  are still available on the queue.

Modified:
  stable/8/contrib/csup/fixups.c
  stable/8/contrib/csup/updater.c
Directory Properties:
  stable/8/contrib/csup/   (props changed)

Modified: stable/8/contrib/csup/fixups.c
==============================================================================
--- stable/8/contrib/csup/fixups.c	Thu Oct 27 14:07:57 2011	(r226837)
+++ stable/8/contrib/csup/fixups.c	Thu Oct 27 14:11:19 2011	(r226838)
@@ -141,7 +141,7 @@ fixups_get(struct fixups *f)
 	fixups_lock(f);
 	while (f->size == 0 && !f->closed)
 		pthread_cond_wait(&f->cond, &f->lock);
-	if (f->closed) {
+	if (f->closed && f->size == 0) {
 		fixups_unlock(f);
 		return (NULL);
 	}

Modified: stable/8/contrib/csup/updater.c
==============================================================================
--- stable/8/contrib/csup/updater.c	Thu Oct 27 14:07:57 2011	(r226837)
+++ stable/8/contrib/csup/updater.c	Thu Oct 27 14:11:19 2011	(r226838)
@@ -238,7 +238,7 @@ updater(void *arg)
 
 	/*
 	 * Make sure to close the fixups even in case of an error,
-	 * so that the lister thread doesn't block indefinitely.
+	 * so that the detailer thread doesn't block indefinitely.
 	 */
 	fixups_close(up->config->fixups);
 	if (!error)

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Oct 27 16:47:09 2011
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 B83211065673;
	Thu, 27 Oct 2011 16:47:09 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8DCBC8FC0A;
	Thu, 27 Oct 2011 16:47:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9RGl9Kk015641;
	Thu, 27 Oct 2011 16:47:09 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RGl9uS015639;
	Thu, 27 Oct 2011 16:47:09 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110271647.p9RGl9uS015639@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 27 Oct 2011 16:47: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: r226844 - stable/8/sys/dev/dc
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, 27 Oct 2011 16:47:09 -0000

Author: yongari
Date: Thu Oct 27 16:47:09 2011
New Revision: 226844
URL: http://svn.freebsd.org/changeset/base/226844

Log:
  MFC r226695-226696:
  r226695:
    Fix a regression introduced in r218832. For TX status check, driver
    should use a TX list DMA tag.
  
  r226696:
    Add missing bus_dmamap_sync() in setup frame transmit.

Modified:
  stable/8/sys/dev/dc/if_dc.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)

Modified: stable/8/sys/dev/dc/if_dc.c
==============================================================================
--- stable/8/sys/dev/dc/if_dc.c	Thu Oct 27 16:39:17 2011	(r226843)
+++ stable/8/sys/dev/dc/if_dc.c	Thu Oct 27 16:47:09 2011	(r226844)
@@ -1136,6 +1136,8 @@ dc_setfilt_21143(struct dc_softc *sc)
 	sp[41] = DC_SP_MAC(eaddr[2]);
 
 	sframe->dc_status = htole32(DC_TXSTAT_OWN);
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+	    BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF);
 
@@ -1342,6 +1344,8 @@ dc_setfilt_xircom(struct dc_softc *sc)
 	DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON);
 	DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON);
 	sframe->dc_status = htole32(DC_TXSTAT_OWN);
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+	    BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF);
 
@@ -2970,7 +2974,7 @@ dc_txeof(struct dc_softc *sc)
 	 * Go through our tx list and free mbufs for those
 	 * frames that have been transmitted.
 	 */
-	bus_dmamap_sync(sc->dc_rx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
 	    BUS_DMASYNC_POSTWRITE);
 	setup = 0;
 	for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod;

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Oct 28 03:58:33 2011
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 917FD106564A;
	Fri, 28 Oct 2011 03:58:33 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 80AB58FC12;
	Fri, 28 Oct 2011 03:58:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9S3wXsO040657;
	Fri, 28 Oct 2011 03:58:33 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9S3wXYm040655;
	Fri, 28 Oct 2011 03:58:33 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110280358.p9S3wXYm040655@svn.freebsd.org>
From: Qing Li 
Date: Fri, 28 Oct 2011 03:58: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: r226877 - stable/8/sys/netinet
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, 28 Oct 2011 03:58:33 -0000

Author: qingli
Date: Fri Oct 28 03:58:33 2011
New Revision: 226877
URL: http://svn.freebsd.org/changeset/base/226877

Log:
  MFC 226713
  
  Exclude host routes when checking for prefix coverage on multiple
  interfaces. A host route has a NULL mask so check for that condition.
  I have also been told by developers who customize the packet output
  path with direct manipulation of the route entry (or the outgoing
  interface to be specific). This patch checks for the route mask
  explicitly to make sure custom code will not panic.
  
  PR:		kern/161805

Modified:
  stable/8/sys/netinet/in.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)

Modified: stable/8/sys/netinet/in.c
==============================================================================
--- stable/8/sys/netinet/in.c	Fri Oct 28 03:42:41 2011	(r226876)
+++ stable/8/sys/netinet/in.c	Fri Oct 28 03:58:33 2011	(r226877)
@@ -1449,12 +1449,21 @@ in_lltable_rtcheck(struct ifnet *ifp, u_
 	 * on one interface and the corresponding outgoing packet leaves
 	 * another interface.
 	 */
-	if (rt->rt_ifp != ifp) {
+	if (!(rt->rt_flags & RTF_HOST) && rt->rt_ifp != ifp) {
 		const char *sa, *mask, *addr, *lim;
 		int len;
 
-		sa = (const char *)rt_key(rt);
 		mask = (const char *)rt_mask(rt);
+		/*
+		 * Just being extra cautious to avoid some custom
+		 * code getting into trouble.
+		 */
+		if (mask == NULL) {
+			RTFREE_LOCKED(rt);
+			return (EINVAL);
+		}
+
+		sa = (const char *)rt_key(rt);
 		addr = (const char *)l3addr;
 		len = ((const struct sockaddr_in *)l3addr)->sin_len;
 		lim = addr + len;

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Oct 28 04:04:22 2011
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 29F951065675;
	Fri, 28 Oct 2011 04:04:22 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 194C48FC0C;
	Fri, 28 Oct 2011 04:04:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9S44Ljl040932;
	Fri, 28 Oct 2011 04:04:21 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9S44L19040930;
	Fri, 28 Oct 2011 04:04:21 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110280404.p9S44L19040930@svn.freebsd.org>
From: Qing Li 
Date: Fri, 28 Oct 2011 04:04:21 +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: r226878 - 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, 28 Oct 2011 04:04:22 -0000

Author: qingli
Date: Fri Oct 28 04:04:21 2011
New Revision: 226878
URL: http://svn.freebsd.org/changeset/base/226878

Log:
  MFC 226451
  
  The IPv6 code was influx at the time of r196865 due to the L2/L3
  separation rewrite changes. r196865 was committed to fix a scope
  violation problem in the following test scenario:
  
    box-1# ifconfig em0 inet6 2001:db8:1:: prefixlen 64 anycast
    box-1# ifconfig em1 inet6 2001:db8:2::1 prefixlen 64
  
    box-2# ifconfig re0 inet6 2001:db8:1::6 prefixlen 64
  
    em0 and re0 are on the same link.
  
    box-2# ping6 2001:db8:1::
    PING6(56=40+8+8 bytes) 2001:db8:1::6 --> 2001:db8:1::
  
  the ICMPv6 response should have a source address of em1, which
  is 2001:db8:2::1, not the link-local address of em0.
  
  That code is no longer necessary and breaks the IPv6-Ready logo
  testing, so revert it now.
  
  Reviewed by:	hrs

Modified:
  stable/8/sys/netinet6/icmp6.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)

Modified: stable/8/sys/netinet6/icmp6.c
==============================================================================
--- stable/8/sys/netinet6/icmp6.c	Fri Oct 28 03:58:33 2011	(r226877)
+++ stable/8/sys/netinet6/icmp6.c	Fri Oct 28 04:04:21 2011	(r226878)
@@ -2161,10 +2161,6 @@ icmp6_reflect(struct mbuf *m, size_t off
 		}
 	}
 
-	if ((srcp != NULL) && 
-	    (in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src)))
-		srcp = NULL;
-
 	if (srcp == NULL) {
 		int e;
 		struct sockaddr_in6 sin6;

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Oct 29 06:28:19 2011
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 45BAD106564A;
	Sat, 29 Oct 2011 06:28:19 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3545E8FC19;
	Sat, 29 Oct 2011 06:28:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9T6SJqs097650;
	Sat, 29 Oct 2011 06:28:19 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9T6SJOO097648;
	Sat, 29 Oct 2011 06:28:19 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201110290628.p9T6SJOO097648@svn.freebsd.org>
From: Attilio Rao 
Date: Sat, 29 Oct 2011 06:28: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: r226897 - stable/8/sys/vm
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, 29 Oct 2011 06:28:19 -0000

Author: attilio
Date: Sat Oct 29 06:28:18 2011
New Revision: 226897
URL: http://svn.freebsd.org/changeset/base/226897

Log:
  MFC r226642:
  Include a missing opt_vm.h which doesn't let VM_NRESERVLEVEL switching
  correct utilization.

Modified:
  stable/8/sys/vm/vm_phys.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)

Modified: stable/8/sys/vm/vm_phys.c
==============================================================================
--- stable/8/sys/vm/vm_phys.c	Sat Oct 29 06:26:49 2011	(r226896)
+++ stable/8/sys/vm/vm_phys.c	Sat Oct 29 06:28:18 2011	(r226897)
@@ -33,6 +33,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_ddb.h"
+#include "opt_vm.h"
 
 #include 
 #include 

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Oct 29 23:27:32 2011
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 857B1106564A;
	Sat, 29 Oct 2011 23:27:32 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A56C8FC0C;
	Sat, 29 Oct 2011 23:27:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9TNRWtC037419;
	Sat, 29 Oct 2011 23:27:32 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNRWRX037416;
	Sat, 29 Oct 2011 23:27:32 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292327.p9TNRWRX037416@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:27:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226911 - in stable/8/sys/dev: esp sym
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, 29 Oct 2011 23:27:32 -0000

Author: marius
Date: Sat Oct 29 23:27:32 2011
New Revision: 226911
URL: http://svn.freebsd.org/changeset/base/226911

Log:
  MFC: r226095
  
  Merge from r225950:
  
  Set the sense residual properly.
  
  Reviewed by:	ken

Modified:
  stable/8/sys/dev/esp/ncr53c9x.c
  stable/8/sys/dev/sym/sym_hipd.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)

Modified: stable/8/sys/dev/esp/ncr53c9x.c
==============================================================================
--- stable/8/sys/dev/esp/ncr53c9x.c	Sat Oct 29 22:06:53 2011	(r226910)
+++ stable/8/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:27:32 2011	(r226911)
@@ -1367,7 +1367,8 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ss->byte2 = ccb->ccb_h.target_lun << SCSI_CMD_LUN_SHIFT;
 	ss->length = sizeof(struct scsi_sense_data);
 	ecb->clen = sizeof(*ss);
-	ecb->daddr = (char *)&ecb->ccb->csio.sense_data;
+	memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
+	ecb->daddr = (char *)&ccb->csio.sense_data;
 	ecb->dleft = sizeof(struct scsi_sense_data);
 	ecb->flags |= ECB_SENSE;
 	ecb->timeout = NCR_SENSE_TIMEOUT;
@@ -1397,7 +1398,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 	union ccb *ccb = ecb->ccb;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	int lun;
+	int lun, sense_returned;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1426,6 +1427,13 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 			ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
 			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR |
 			    CAM_AUTOSNS_VALID;
+			sense_returned = sizeof(ccb->csio.sense_data) -
+			    ecb->dleft;
+			if (sense_returned < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    sense_returned;
+			else
+				ccb->csio.sense_resid = 0;
 		} else if (ecb->stat == SCSI_STATUS_CHECK_COND) {
 			if ((ecb->flags & ECB_SENSE) != 0)
 				ccb->ccb_h.status = CAM_AUTOSENSE_FAIL;

Modified: stable/8/sys/dev/sym/sym_hipd.c
==============================================================================
--- stable/8/sys/dev/sym/sym_hipd.c	Sat Oct 29 22:06:53 2011	(r226910)
+++ stable/8/sys/dev/sym/sym_hipd.c	Sat Oct 29 23:27:32 2011	(r226911)
@@ -7154,7 +7154,7 @@ static void sym_complete_error (hcb_p np
 {
 	struct ccb_scsiio *csio;
 	u_int cam_status;
-	int i;
+	int i, sense_returned;
 
 	SYM_LOCK_ASSERT(MA_OWNED);
 
@@ -7214,11 +7214,15 @@ static void sym_complete_error (hcb_p np
 			 *  Bounce back the sense data to user and
 			 *  fix the residual.
 			 */
-			bzero(&csio->sense_data, csio->sense_len);
+			bzero(&csio->sense_data, sizeof(csio->sense_data));
+			sense_returned = SYM_SNS_BBUF_LEN - csio->sense_resid;
+			if (sense_returned < csio->sense_len)
+				csio->sense_resid = csio->sense_len -
+				    sense_returned;
+			else
+				csio->sense_resid = 0;
 			bcopy(cp->sns_bbuf, &csio->sense_data,
-			      MIN(csio->sense_len, SYM_SNS_BBUF_LEN));
-			csio->sense_resid += csio->sense_len;
-			csio->sense_resid -= SYM_SNS_BBUF_LEN;
+			    MIN(csio->sense_len, sense_returned));
 #if 0
 			/*
 			 *  If the device reports a UNIT ATTENTION condition

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Oct 29 23:44:30 2011
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 5F928106566B;
	Sat, 29 Oct 2011 23:44:30 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4CE468FC08;
	Sat, 29 Oct 2011 23:44:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9TNiUc1038103;
	Sat, 29 Oct 2011 23:44:30 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNiUfu038092;
	Sat, 29 Oct 2011 23:44:30 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292344.p9TNiUfu038092@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:44:30 +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: r226913 - stable/8/sys/dev/aac
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, 29 Oct 2011 23:44:30 -0000

Author: marius
Date: Sat Oct 29 23:44:29 2011
New Revision: 226913
URL: http://svn.freebsd.org/changeset/base/226913

Log:
  MFC: r206534
  
  Whitespace cleanup, in advance of next sync with Adaptec's driver.  No
  functional change.

Modified:
  stable/8/sys/dev/aac/aac.c
  stable/8/sys/dev/aac/aac_cam.c
  stable/8/sys/dev/aac/aac_debug.c
  stable/8/sys/dev/aac/aac_disk.c
  stable/8/sys/dev/aac/aac_pci.c
  stable/8/sys/dev/aac/aacreg.h
  stable/8/sys/dev/aac/aacvar.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)

Modified: stable/8/sys/dev/aac/aac.c
==============================================================================
--- stable/8/sys/dev/aac/aac.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -2004,7 +2004,7 @@ aac_setup_intr(struct aac_softc *sc)
 	}
 	if (sc->flags & AAC_FLAGS_NEW_COMM) {
 		if (bus_setup_intr(sc->aac_dev, sc->aac_irq,
-				   INTR_MPSAFE|INTR_TYPE_BIO, NULL, 
+				   INTR_MPSAFE|INTR_TYPE_BIO, NULL,
 				   aac_new_intr, sc, &sc->aac_intr)) {
 			device_printf(sc->aac_dev, "can't set up interrupt\n");
 			return (EINVAL);

Modified: stable/8/sys/dev/aac/aac_cam.c
==============================================================================
--- stable/8/sys/dev/aac/aac_cam.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac_cam.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -443,7 +443,7 @@ aac_cam_action(struct cam_sim *sim, unio
 			    srb->cdb_len);
 
 		/* Set command */
-		fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ? 
+		fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ?
 			ScsiPortCommandU64 : ScsiPortCommand;
 
 		/* Map the s/g list. XXX 32bit addresses only! */
@@ -560,7 +560,7 @@ aac_cam_complete(struct aac_command *cm)
 
 				scsi_sense_len = sizeof(struct scsi_sense_data);
 				bzero(&ccb->csio.sense_data, scsi_sense_len);
-				sense_len = (srbr->sense_len > 
+				sense_len = (srbr->sense_len >
 				    scsi_sense_len) ? scsi_sense_len :
 				    srbr->sense_len;
 				bcopy(&srbr->sense[0], &ccb->csio.sense_data,

Modified: stable/8/sys/dev/aac/aac_debug.c
==============================================================================
--- stable/8/sys/dev/aac/aac_debug.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac_debug.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -62,62 +62,62 @@ aac_print_queues(struct aac_softc *sc)
 	device_printf(sc->aac_dev, "FIB queue header at %p  queues at %p\n",
 	    &sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][0],
 	    &sc->aac_queues->qt_HostNormCmdQueue[0]);
-	device_printf(sc->aac_dev, "HOST_NORM_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_NORM_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_NORM_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "HOST_HIGH_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_HIGH_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_HIGH_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_NORM_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_NORM_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_NORM_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_HIGH_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_HIGH_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_HIGH_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_NORM_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_HIGH_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_NORM_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_HIGH_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "AACQ_FREE      %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_FREE      %d/%d\n",
 	    sc->aac_qstat[AACQ_FREE].q_length, sc->aac_qstat[AACQ_FREE].q_max);
-	device_printf(sc->aac_dev, "AACQ_BIO       %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_BIO       %d/%d\n",
 	    sc->aac_qstat[AACQ_BIO].q_length, sc->aac_qstat[AACQ_BIO].q_max);
-	device_printf(sc->aac_dev, "AACQ_READY     %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_READY     %d/%d\n",
 	    sc->aac_qstat[AACQ_READY].q_length,
 	    sc->aac_qstat[AACQ_READY].q_max);
-	device_printf(sc->aac_dev, "AACQ_BUSY      %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_BUSY      %d/%d\n",
 	    sc->aac_qstat[AACQ_BUSY].q_length, sc->aac_qstat[AACQ_BUSY].q_max);
 }
 
@@ -225,8 +225,8 @@ aac_print_fib(struct aac_softc *sc, stru
 
 		if (br->Command == VM_CtBlockRead) {
 			device_printf(sc->aac_dev,
-				      "  BlockRead: container %d  0x%x/%d\n", 
-				      br->ContainerId, br->BlockNumber, 
+				      "  BlockRead: container %d  0x%x/%d\n",
+				      br->ContainerId, br->BlockNumber,
 				      br->ByteCount);
 			sg = &br->SgMap;
 		}
@@ -234,7 +234,7 @@ aac_print_fib(struct aac_softc *sc, stru
 			device_printf(sc->aac_dev,
 				      "  BlockWrite: container %d  0x%x/%d "
 				      "(%s)\n", bw->ContainerId,
-				      bw->BlockNumber, bw->ByteCount, 
+				      bw->BlockNumber, bw->ByteCount,
 				      bw->Stable == CSTABLE ? "stable" :
 				      "unstable");
 			sg = &bw->SgMap;
@@ -267,7 +267,7 @@ aac_print_aif(struct aac_softc *sc, stru
 		device_printf(sc->aac_dev, "EventNotify(%d)\n", aif->seqNumber);
 		switch(aif->data.EN.type) {
 		case AifEnGeneric:		/* Generic notification */
-			device_printf(sc->aac_dev, "(Generic) %.*s\n", 
+			device_printf(sc->aac_dev, "(Generic) %.*s\n",
 				  (int)sizeof(aif->data.EN.data.EG),
 				  aif->data.EN.data.EG.text);
 			break;
@@ -281,21 +281,21 @@ aac_print_aif(struct aac_softc *sc, stru
 		case AifEnContainerChange:	/* Adapter specific container
 						 * configuration change */
 			device_printf(sc->aac_dev, "(ContainerChange) "
-				      "container %d,%d\n", 
-				      aif->data.EN.data.ECC.container[0], 
+				      "container %d,%d\n",
+				      aif->data.EN.data.ECC.container[0],
 				      aif->data.EN.data.ECC.container[1]);
 			break;
 		case AifEnDeviceFailure:	/* SCSI device failed */
 			device_printf(sc->aac_dev, "(DeviceFailure) "
-				      "handle %d\n", 
+				      "handle %d\n",
 				      aif->data.EN.data.EDF.deviceHandle);
 			break;
 		case AifEnMirrorFailover:	/* Mirror failover started */
 			device_printf(sc->aac_dev, "(MirrorFailover) "
 				      "container %d failed, "
 				      "migrating from slice %d to %d\n",
-				      aif->data.EN.data.EMF.container, 
-				      aif->data.EN.data.EMF.failedSlice, 
+				      aif->data.EN.data.EMF.container,
+				      aif->data.EN.data.EMF.failedSlice,
 				      aif->data.EN.data.EMF.creatingSlice);
 			break;
 		case AifEnContainerEvent:	/* Significant container
@@ -325,7 +325,7 @@ aac_print_aif(struct aac_softc *sc, stru
 			device_printf(sc->aac_dev, "(EnclosureManagement) "
 				      "EMPID %d unit %d "
 				      "event %d\n", aif->data.EN.data.EEE.empID,
-				      aif->data.EN.data.EEE.unitID, 
+				      aif->data.EN.data.EEE.unitID,
 				      aif->data.EN.data.EEE.eventType);
 			break;
 		case AifEnBatteryEvent:		/* Significant NV battery
@@ -348,14 +348,14 @@ aac_print_aif(struct aac_softc *sc, stru
 			device_printf(sc->aac_dev, "(BatteryNeedsRecond)\n");
 			break;
 		case AifEnClusterEvent:		/* Some cluster event */
-			device_printf(sc->aac_dev, "(ClusterEvent) event %d\n", 
+			device_printf(sc->aac_dev, "(ClusterEvent) event %d\n",
 				      aif->data.EN.data.ECLE.eventType);
 			break;
 		case AifEnDiskSetEvent:		/* A disk set event occured. */
 			device_printf(sc->aac_dev, "(DiskSetEvent) event %d "
 				      "diskset %jd creator %jd\n",
-				      aif->data.EN.data.EDS.eventType, 
-				      (intmax_t)aif->data.EN.data.EDS.DsNum, 
+				      aif->data.EN.data.EDS.eventType,
+				      (intmax_t)aif->data.EN.data.EDS.DsNum,
 				      (intmax_t)aif->data.EN.data.EDS.CreatorId);
 			break;
 		case AifDenMorphComplete: 	/* A morph operation
@@ -392,7 +392,7 @@ aac_print_aif(struct aac_softc *sc, stru
 		}		
 	
 		device_printf(sc->aac_dev, "JobProgress (%d) - %s (%d, %d)\n",
-			      aif->seqNumber, status, 
+			      aif->seqNumber, status,
 			      aif->data.PR[0].currentTick,
 			      aif->data.PR[0].finalTick);
 		switch(aif->data.PR[0].jd.type) {
@@ -418,12 +418,12 @@ aac_print_aif(struct aac_softc *sc, stru
 			break;
 		case AifJobCtrZero:		/* Container clear operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerZero) container %d\n", 
+				      "(ContainerZero) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 			break;
 		case AifJobCtrCopy:		/* Container copy operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerCopy) container %d to %d\n", 
+				      "(ContainerCopy) container %d to %d\n",
 				      aif->data.PR[0].jd.client.container.src,
 				      aif->data.PR[0].jd.client.container.dst);
 			break;
@@ -456,12 +456,12 @@ aac_print_aif(struct aac_softc *sc, stru
 		case AifJobCtrScrubRaid5:	/* Container Scrub Raid5
 						 * operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerScrubRaid5) container %d\n", 
+				      "(ContainerScrubRaid5) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 			break;
 		case AifJobCtrMorph:		/* Container morph operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerMorph) container %d\n", 
+				      "(ContainerMorph) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 				      /* XXX two containers? */
 			break;
@@ -476,13 +476,13 @@ aac_print_aif(struct aac_softc *sc, stru
 		case AifJobCtrRebuildMirror:	/* Container Rebuild Mirror
 						 * operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerRebuildMirror) container " 
+				      "(ContainerRebuildMirror) container "
 				      "%d\n",
 				      aif->data.PR[0].jd.client.container.src);
 			break;
 		case AifJobCtrCrazyCache:	/* crazy cache */
 			device_printf(sc->aac_dev,
-				      "(ContainerCrazyCache) container %d\n", 
+				      "(ContainerCrazyCache) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 				      /* XXX two containers? */
 			break;

Modified: stable/8/sys/dev/aac/aac_disk.c
==============================================================================
--- stable/8/sys/dev/aac/aac_disk.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac_disk.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -87,7 +87,7 @@ DRIVER_MODULE(aacd, aac, aac_disk_driver
 /*
  * Handle open from generic layer.
  *
- * This is called by the diskslice code on first open in order to get the 
+ * This is called by the diskslice code on first open in order to get the
  * basic device geometry paramters.
  */
 static int

Modified: stable/8/sys/dev/aac/aac_pci.c
==============================================================================
--- stable/8/sys/dev/aac/aac_pci.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac_pci.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -353,7 +353,7 @@ aac_pci_attach(device_t dev)
 	/* assume failure is 'not configured' */
 	error = ENXIO;
 
-	/* 
+	/*
 	 * Verify that the adapter is correctly set up in PCI space.
 	 */
 	command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2);
@@ -401,7 +401,7 @@ aac_pci_attach(device_t dev)
 
 	/*
 	 * Allocate the parent bus DMA tag appropriate for our PCI interface.
-	 * 
+	 *
 	 * Note that some of these controllers are 64-bit capable.
 	 */
 	if (bus_dma_tag_create(NULL, 			/* parent */
@@ -419,7 +419,7 @@ aac_pci_attach(device_t dev)
 		goto out;
 	}
 
-	/* 
+	/*
 	 * Detect the hardware interface version, set up the bus interface
 	 * indirection.
 	 */

Modified: stable/8/sys/dev/aac/aacreg.h
==============================================================================
--- stable/8/sys/dev/aac/aacreg.h	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aacreg.h	Sat Oct 29 23:44:29 2011	(r226913)
@@ -220,20 +220,20 @@ typedef enum {
 	IsAdapterPaused =		704,
 	SendHostTime =			705,
 	RequestSupplementAdapterInfo =	706,	/* Supp. Info for set in UCC
-						 * use only if supported 
+						 * use only if supported
 						 * (RequestAdapterInfo first) */
 	LastMiscCommand =		707,
-  
-	OnLineDiagnostic =		800,      
-	FduAdapterTest =		801, 
+
+	OnLineDiagnostic =		800,
+	FduAdapterTest =		801,
 	RequestCompatibilityId =	802,
 	AdapterEnvironmentInfo =	803,	/* temp. sensors */
 	NvsramEventLog =		900,
 	ResetNvsramEventLogPointers =	901,
 	EnableEventLog =		902,
 	DisableEventLog =		903,
-	EncryptedKeyTransportFIB=	904,    
-	KeyableFeaturesFIB=		905     
+	EncryptedKeyTransportFIB=	904,
+	KeyableFeaturesFIB=		905
 } AAC_FibCommands;
 
 /*
@@ -283,7 +283,7 @@ typedef enum {
 #define AAC_ERROR_FIB_DEALLOCATION_FAILED	0x08
 
 /*
- * Adapter Init Structure: this is passed to the adapter with the 
+ * Adapter Init Structure: this is passed to the adapter with the
  * AAC_MONKER_INITSTRUCT command to point it at our control structures.
  */
 struct aac_adapter_init {
@@ -331,14 +331,14 @@ typedef enum {
 	CT_MORPH,
 	CT_PASSTHRU,
 	CT_RAID4,
-	CT_RAID10,                  /* stripe of mirror */
-	CT_RAID00,                  /* stripe of stripe */
-	CT_VOLUME_OF_MIRRORS,       /* volume of mirror */
-	CT_PSEUDO_RAID3,            /* really raid4 */
-	CT_RAID50,		    /* stripe of raid5 */
-	CT_RAID5D,		    /* raid5 distributed hot-sparing */
+	CT_RAID10,		/* stripe of mirror */
+	CT_RAID00,		/* stripe of stripe */
+	CT_VOLUME_OF_MIRRORS,	/* volume of mirror */
+	CT_PSEUDO_RAID3,	/* really raid4 */
+	CT_RAID50,		/* stripe of raid5 */
+	CT_RAID5D,		/* raid5 distributed hot-sparing */
 	CT_RAID5D0,
-	CT_RAID1E,		    /* extended raid1 mirroring */
+	CT_RAID1E,		/* extended raid1 mirroring */
 	CT_RAID6,
 	CT_RAID60,
 } AAC_FSAVolType;
@@ -347,23 +347,23 @@ typedef enum {
  * Host-addressable object types
  */
 typedef enum {
-	FT_REG = 1,     /* regular file */
-	FT_DIR,         /* directory */
-	FT_BLK,         /* "block" device - reserved */
-	FT_CHR,         /* "character special" device - reserved */
-	FT_LNK,         /* symbolic link */
-	FT_SOCK,        /* socket */
-	FT_FIFO,        /* fifo */
-	FT_FILESYS,     /* ADAPTEC's "FSA"(tm) filesystem */
-	FT_DRIVE,       /* physical disk - addressable in scsi by b/t/l */
-	FT_SLICE,       /* virtual disk - raw volume - slice */
-	FT_PARTITION,   /* FSA partition - carved out of a slice - building
+	FT_REG = 1,	/* regular file */
+	FT_DIR,		/* directory */
+	FT_BLK,		/* "block" device - reserved */
+	FT_CHR,		/* "character special" device - reserved */
+	FT_LNK,		/* symbolic link */
+	FT_SOCK,	/* socket */
+	FT_FIFO,	/* fifo */
+	FT_FILESYS,	/* ADAPTEC's "FSA"(tm) filesystem */
+	FT_DRIVE,	/* physical disk - addressable in scsi by b/t/l */
+	FT_SLICE,	/* virtual disk - raw volume - slice */
+	FT_PARTITION,	/* FSA partition - carved out of a slice - building
 			 * block for containers */
-	FT_VOLUME,      /* Container - Volume Set */
-	FT_STRIPE,      /* Container - Stripe Set */
-	FT_MIRROR,      /* Container - Mirror Set */
-	FT_RAID5,       /* Container - Raid 5 Set */
-	FT_DATABASE     /* Storage object with "foreign" content manager */
+	FT_VOLUME,	/* Container - Volume Set */
+	FT_STRIPE,	/* Container - Stripe Set */
+	FT_MIRROR,	/* Container - Mirror Set */
+	FT_RAID5,	/* Container - Raid 5 Set */
+	FT_DATABASE	/* Storage object with "foreign" content manager */
 } AAC_FType;
 
 /*
@@ -469,7 +469,7 @@ typedef enum {
 	CPU_MIPS,
 	CPU_XSCALE,
 	CPU__last
-} AAC_CpuType;  
+} AAC_CpuType;
 
 typedef enum {
 	CPUI960_JX = 1,
@@ -546,7 +546,7 @@ typedef enum {
  * XXX the aac-2622 with no battery present reports PLATFORM_BAT_OPT_PRESENT
  */
 typedef enum
-{ 
+{
 	PLATFORM_BAT_REQ_PRESENT = 1,	/* BATTERY REQUIRED AND PRESENT */
 	PLATFORM_BAT_REQ_NOTPRESENT,	/* BATTERY REQUIRED AND NOT PRESENT */
 	PLATFORM_BAT_OPT_PRESENT,	/* BATTERY OPTIONAL AND PRESENT */
@@ -554,9 +554,9 @@ typedef enum
 	PLATFORM_BAT_NOT_SUPPORTED	/* BATTERY NOT SUPPORTED */
 } AAC_BatteryPlatform;
 
-/* 
+/*
  * options supported by this board
- * there has to be a one to one mapping of these defines and the ones in 
+ * there has to be a one to one mapping of these defines and the ones in
  * fsaapi.h, search for FSA_SUPPORT_SNAPSHOT
  */
 #define AAC_SUPPORTED_SNAPSHOT		0x01
@@ -579,24 +579,24 @@ typedef enum
 #define AAC_SUPPORTED_64BIT_ARRAYSIZE	0x40000
 #define AAC_SUPPORTED_HEAT_SENSOR	0x80000
 
-/* 
+/*
  * Structure used to respond to a RequestAdapterInfo fib.
  */
 struct aac_adapter_info {
-	AAC_Platform		PlatformBase;    /* adapter type */
+	AAC_Platform		PlatformBase;	 /* adapter type */
 	AAC_CpuType		CpuArchitecture; /* adapter CPU type */
-	AAC_CpuSubType		CpuVariant;      /* adapter CPU subtype */
-	u_int32_t		ClockSpeed;      /* adapter CPU clockspeed */
-	u_int32_t		ExecutionMem;    /* adapter Execution Memory
+	AAC_CpuSubType		CpuVariant;	 /* adapter CPU subtype */
+	u_int32_t		ClockSpeed;	 /* adapter CPU clockspeed */
+	u_int32_t		ExecutionMem;	 /* adapter Execution Memory
 						  * size */
-	u_int32_t		BufferMem;       /* adapter Data Memory */
-	u_int32_t		TotalMem;        /* adapter Total Memory */
+	u_int32_t		BufferMem;	 /* adapter Data Memory */
+	u_int32_t		TotalMem;	 /* adapter Total Memory */
 	struct FsaRevision	KernelRevision;  /* adapter Kernel Software
 						  * Revision */
 	struct FsaRevision	MonitorRevision; /* adapter Monitor/Diagnostic
 						  * Software Revision */
 	struct FsaRevision	HardwareRevision;/* TBD */
-	struct FsaRevision	BIOSRevision;    /* adapter BIOS Revision */
+	struct FsaRevision	BIOSRevision;	 /* adapter BIOS Revision */
 	u_int32_t		ClusteringEnabled;
 	u_int32_t		ClusterChannelMask;
 	u_int64_t		SerialNumber;
@@ -606,7 +606,7 @@ struct aac_adapter_info {
 	AAC_OemFlavor	OemVariant;
 } __packed;
 
-/* 
+/*
  * Structure used to respond to a RequestSupplementAdapterInfo fib.
  */
 struct vpd_info {
@@ -694,7 +694,7 @@ struct aac_supplement_adapter_info {
 #define AAC_KERNEL_PANIC	0x00000100
 
 /*
- * Data types relating to control and monitoring of the NVRAM/WriteCache 
+ * Data types relating to control and monitoring of the NVRAM/WriteCache
  * subsystem.
  */
 
@@ -869,7 +869,7 @@ typedef enum {
 	AifEnGeneric = 1,		/* Generic notification */
 	AifEnTaskComplete,		/* Task has completed */
 	AifEnConfigChange,		/* Adapter config change occurred */
-	AifEnContainerChange,		/* Adapter specific container 
+	AifEnContainerChange,		/* Adapter specific container
 					 * configuration change */
 	AifEnDeviceFailure,		/* SCSI device failed */
 	AifEnMirrorFailover,		/* Mirror failover started */
@@ -883,7 +883,7 @@ typedef enum {
 	AifEnBatteryEvent,		/* Significant NV battery event */
 	AifEnAddContainer,		/* A new container was created. */
 	AifEnDeleteContainer,		/* A container was deleted. */
-	AifEnSMARTEvent, 	       	/* SMART Event */
+	AifEnSMARTEvent,		/* SMART Event */
 	AifEnBatteryNeedsRecond,	/* The battery needs reconditioning */
 	AifEnClusterEvent,		/* Some cluster event */
 	AifEnDiskSetEvent,		/* A disk set event occured. */
@@ -985,7 +985,7 @@ struct aac_AifEventNotify {
 /*
  * Adapter Initiated FIB command structures. Start with the adapter
  * initiated FIBs that really come from the adapter, and get responded
- * to by the host. 
+ * to by the host.
  */
 #define AAC_AIF_REPORT_MAX_SIZE 64
 
@@ -1140,7 +1140,7 @@ typedef enum _VM_COMMANDS {
 	VM_CtHostRead64,
 	VM_CtHostWrite64,
 	VM_DrvErrTblLog,	/* drive error table/log type of command */
-	VM_NameServe64		 
+	VM_NameServe64
 } AAC_VMCommand;
 
 /*
@@ -1546,7 +1546,7 @@ enum {
 /*
  * The adapter can request the host print a message by setting the
  * DB_PRINTF flag in DOORBELL0.  The driver responds by collecting the
- * message from the printf buffer, clearing the DB_PRINTF flag in 
+ * message from the printf buffer, clearing the DB_PRINTF flag in
  * DOORBELL0 and setting it in DOORBELL1.
  * (ODBR and IDBR respectively for the i960Rx adapters)
  */

Modified: stable/8/sys/dev/aac/aacvar.h
==============================================================================
--- stable/8/sys/dev/aac/aacvar.h	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aacvar.h	Sat Oct 29 23:44:29 2011	(r226913)
@@ -56,7 +56,7 @@
  */
 
 /*
- * The firmware interface allows for a 16-bit s/g list length.  We limit 
+ * The firmware interface allows for a 16-bit s/g list length.  We limit
  * ourselves to a reasonable maximum and ensure alignment.
  */
 #define AAC_MAXSGENTRIES	64	/* max S/G entries, limit 65535 */		
@@ -78,7 +78,7 @@
 #define AAC_PRINTF_BUFSIZE	256
 
 /*
- * We wait this many seconds for the adapter to come ready if it is still 
+ * We wait this many seconds for the adapter to come ready if it is still
  * booting
  */
 #define AAC_BOOT_TIMEOUT	(3 * 60)
@@ -128,7 +128,7 @@ struct aac_sim
 /*
  * Per-disk structure
  */
-struct aac_disk 
+struct aac_disk
 {
 	device_t			ad_dev;
 	struct aac_softc		*ad_controller;
@@ -218,7 +218,7 @@ struct aac_common {
 				AAC_QUEUE_ALIGN];
 
 	/* buffer for text messages from the controller */
-	char		       	ac_printf[AAC_PRINTF_BUFSIZE];
+	char			ac_printf[AAC_PRINTF_BUFSIZE];
 	
 	/* fib for synchronous commands */
 	struct aac_fib		ac_sync_fib;
@@ -227,7 +227,7 @@ struct aac_common {
 /*
  * Interface operations
  */
-struct aac_interface 
+struct aac_interface
 {
 	int	(*aif_get_fwstatus)(struct aac_softc *sc);
 	void	(*aif_qnotify)(struct aac_softc *sc, int qbit);
@@ -302,7 +302,7 @@ struct aac_fib_context {
 /*
  * Per-controller structure.
  */
-struct aac_softc 
+struct aac_softc
 {
 	/* bus connections */
 	device_t		aac_dev;
@@ -348,7 +348,7 @@ struct aac_softc 
 	struct aac_command	*aac_commands;
 
 	/* command management */
-	TAILQ_HEAD(,aac_command) aac_free;	/* command structures 
+	TAILQ_HEAD(,aac_command) aac_free;	/* command structures
 						 * available for reuse */
 	TAILQ_HEAD(,aac_command) aac_ready;	/* commands on hold for
 						 * controller resources */
@@ -416,7 +416,7 @@ struct aac_softc 
 
 	struct callout	aac_daemontime;		/* clock daemon callout */
 
-	u_int32_t	aac_max_fibs;           /* max. FIB count */
+	u_int32_t	aac_max_fibs;		/* max. FIB count */
 	u_int32_t	aac_max_fibs_alloc;		/* max. alloc. per alloc_commands() */
 	u_int32_t	aac_max_fib_size;		/* max. FIB size */
 	u_int32_t	aac_sg_tablesize;		/* max. sg count from host */
@@ -450,7 +450,7 @@ extern void		aac_free(struct aac_softc *
 extern int		aac_attach(struct aac_softc *sc);
 extern int		aac_detach(device_t dev);
 extern int		aac_shutdown(device_t dev);
-extern int		aac_suspend(device_t dev); 
+extern int		aac_suspend(device_t dev);
 extern int		aac_resume(device_t dev);
 extern void		aac_new_intr(void *arg);
 extern int		aac_filter(void *arg);
@@ -564,7 +564,7 @@ aac_dequeue_ ## name (struct aac_softc *
 	if ((cm = TAILQ_FIRST(&sc->aac_ ## name)) != NULL) {		\
 		if ((cm->cm_flags & AAC_ON_ ## index) == 0) {		\
 			printf("command %p not in queue, flags = %#x, "	\
-		       	       "bit = %#x\n", cm, cm->cm_flags,		\
+			       "bit = %#x\n", cm, cm->cm_flags,		\
 			       AAC_ON_ ## index);			\
 			panic("command not in queue");			\
 		}							\

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Oct 29 23:51:21 2011
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 A095A106566B;
	Sat, 29 Oct 2011 23:51:21 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8E5348FC19;
	Sat, 29 Oct 2011 23:51:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9TNpLFX038399;
	Sat, 29 Oct 2011 23:51:21 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNpLG6038394;
	Sat, 29 Oct 2011 23:51:21 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292351.p9TNpLG6038394@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:51:21 +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: r226915 - in stable/8/sys/dev: aac asr hptiop mfi
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, 29 Oct 2011 23:51:21 -0000

Author: marius
Date: Sat Oct 29 23:51:21 2011
New Revision: 226915
URL: http://svn.freebsd.org/changeset/base/226915

Log:
  MFC: r226350
  
  Merge from r225950:
  
  Set the sense residual properly.
  
  Reviewed by:	ken

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

Modified: stable/8/sys/dev/aac/aac_cam.c
==============================================================================
--- stable/8/sys/dev/aac/aac_cam.c	Sat Oct 29 23:44:30 2011	(r226914)
+++ stable/8/sys/dev/aac/aac_cam.c	Sat Oct 29 23:51:21 2011	(r226915)
@@ -532,6 +532,7 @@ aac_cam_complete(struct aac_command *cm)
 	union	ccb *ccb;
 	struct 	aac_srb_response *srbr;
 	struct	aac_softc *sc;
+	int	sense_returned;
 
 	sc = cm->cm_sc;
 	fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "");
@@ -556,16 +557,17 @@ aac_cam_complete(struct aac_command *cm)
 
 			/* Take care of autosense */
 			if (srbr->sense_len) {
-				int sense_len, scsi_sense_len;
-
-				scsi_sense_len = sizeof(struct scsi_sense_data);
-				bzero(&ccb->csio.sense_data, scsi_sense_len);
-				sense_len = (srbr->sense_len >
-				    scsi_sense_len) ? scsi_sense_len :
-				    srbr->sense_len;
+				sense_returned = srbr->sense_len;
+				if (sense_returned < ccb->csio.sense_len)
+					ccb->csio.sense_resid =
+					   ccb->csio.sense_len -
+					   sense_returned;
+					else
+					    ccb->csio.sense_resid = 0;
+				bzero(&ccb->csio.sense_data,
+				    sizeof(struct scsi_sense_data));
 				bcopy(&srbr->sense[0], &ccb->csio.sense_data,
-				    srbr->sense_len);
-				ccb->csio.sense_len = sense_len;
+				    min(ccb->csio.sense_len, sense_returned));
 				ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
 				// scsi_sense_print(&ccb->csio);
 			}

Modified: stable/8/sys/dev/asr/asr.c
==============================================================================
--- stable/8/sys/dev/asr/asr.c	Sat Oct 29 23:44:30 2011	(r226914)
+++ stable/8/sys/dev/asr/asr.c	Sat Oct 29 23:51:21 2011	(r226915)
@@ -3071,6 +3071,14 @@ asr_intr(Asr_softc_t *sc)
 				 && (size > ccb->csio.sense_len)) {
 					size = ccb->csio.sense_len;
 				}
+				if (size < ccb->csio.sense_len) {
+					ccb->csio.sense_resid =
+					    ccb->csio.sense_len - size;
+				} else {
+					ccb->csio.sense_resid = 0;
+				}
+				bzero(&(ccb->csio.sense_data),
+				    sizeof(ccb->csio.sense_data));
 				bcopy(Reply->SenseData,
 				      &(ccb->csio.sense_data), size);
 			}
@@ -3566,6 +3574,12 @@ ASR_queue_i(Asr_softc_t	*sc, PI2O_MESSAG
 		if (size > sizeof(ccb->csio.sense_data)) {
 			size = sizeof(ccb->csio.sense_data);
 		}
+		if (size < ccb->csio.sense_len) {
+			ccb->csio.sense_resid = ccb->csio.sense_len - size;
+		} else {
+			ccb->csio.sense_resid = 0;
+		}
+		bzero(&(ccb->csio.sense_data), sizeof(ccb->csio.sense_data));
 		bcopy(&(ccb->csio.sense_data), Reply_Ptr->SenseData, size);
 		I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_setAutoSenseTransferCount(
 		    Reply_Ptr, size);

Modified: stable/8/sys/dev/hptiop/hptiop.c
==============================================================================
--- stable/8/sys/dev/hptiop/hptiop.c	Sat Oct 29 23:44:30 2011	(r226914)
+++ stable/8/sys/dev/hptiop/hptiop.c	Sat Oct 29 23:51:21 2011	(r226915)
@@ -424,6 +424,13 @@ srb_complete:
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (dxfer < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    dxfer;
+			else
+				ccb->csio.sense_resid = 0;
 			if (srb->srb_flag & HPT_SRB_FLAG_HIGH_MEM_ACESS) {/*iop*/
 				bus_space_read_region_1(hba->bar0t, hba->bar0h,
 					index + offsetof(struct hpt_iop_request_scsi_command,
@@ -573,6 +580,13 @@ static void hptiop_request_callback_mv(s
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (req->dataxfer_length < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    req->dataxfer_length;
+			else
+				ccb->csio.sense_resid = 0;
 			memcpy(&ccb->csio.sense_data, &req->sg_list, 
 				MIN(req->dataxfer_length, sizeof(ccb->csio.sense_data)));
 			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;

Modified: stable/8/sys/dev/mfi/mfi_cam.c
==============================================================================
--- stable/8/sys/dev/mfi/mfi_cam.c	Sat Oct 29 23:44:30 2011	(r226914)
+++ stable/8/sys/dev/mfi/mfi_cam.c	Sat Oct 29 23:51:21 2011	(r226915)
@@ -357,7 +357,13 @@ mfip_done(struct mfi_command *cm)
 
 		ccbh->status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID;
 		csio->scsi_status = pt->header.scsi_status;
-		sense_len = min(pt->header.sense_len, sizeof(struct scsi_sense_data));
+		if (pt->header.sense_len < csio->sense_len)
+			csio->sense_resid = csio->sense_len -
+			    pt->header.sense_len;
+		else
+			csio->sense_resid = 0;
+		sense_len = min(pt->header.sense_len,
+		    sizeof(struct scsi_sense_data));
 		bzero(&csio->sense_data, sizeof(struct scsi_sense_data));
 		bcopy(&cm->cm_sense->data[0], &csio->sense_data, sense_len);
 		break;

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Oct 29 23:53:58 2011
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 B573D1065673;
	Sat, 29 Oct 2011 23:53:58 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A26E88FC14;
	Sat, 29 Oct 2011 23:53:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9TNrwnY038653;
	Sat, 29 Oct 2011 23:53:58 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNrwJC038648;
	Sat, 29 Oct 2011 23:53:58 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292353.p9TNrwJC038648@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:53:58 +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: r226919 - in stable/8/sys: dev/esp sparc64/sbus
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, 29 Oct 2011 23:53:58 -0000

Author: marius
Date: Sat Oct 29 23:53:58 2011
New Revision: 226919
URL: http://svn.freebsd.org/changeset/base/226919

Log:
  MFC: r226381
  
  Merge from NetBSD:
  - Remove clause 3 and 4 from TNF licenses.
  - Fix memset usage.
  - Various cleanup.
  - Kill caddr_t.

Modified:
  stable/8/sys/dev/esp/esp_sbus.c
  stable/8/sys/dev/esp/ncr53c9x.c
  stable/8/sys/dev/esp/ncr53c9xreg.h
  stable/8/sys/dev/esp/ncr53c9xvar.h
  stable/8/sys/sparc64/sbus/lsi64854.c
  stable/8/sys/sparc64/sbus/lsi64854var.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)

Modified: stable/8/sys/dev/esp/esp_sbus.c
==============================================================================
--- stable/8/sys/dev/esp/esp_sbus.c	Sat Oct 29 23:53:58 2011	(r226918)
+++ stable/8/sys/dev/esp/esp_sbus.c	Sat Oct 29 23:53:58 2011	(r226919)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: esp_sbus.c,v 1.31 2005/02/27 00:27:48 perry Exp $	*/
+/*	$NetBSD: esp_sbus.c,v 1.51 2009/09/17 16:28:12 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -44,13 +44,6 @@
  * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -158,12 +151,12 @@ MODULE_DEPEND(esp, sbus, 1, 1, 1);
 /*
  * Functions and the switch for the MI code
  */
-static u_char	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
-static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v);
+static uint8_t	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
+static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v);
 static int	esp_dma_isintr(struct ncr53c9x_softc *sc);
 static void	esp_dma_reset(struct ncr53c9x_softc *sc);
 static int	esp_dma_intr(struct ncr53c9x_softc *sc);
-static int	esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr,
+static int	esp_dma_setup(struct ncr53c9x_softc *sc, void **addr,
 		    size_t *len, int datain, size_t *dmasize);
 static void	esp_dma_go(struct ncr53c9x_softc *sc);
 static void	esp_dma_stop(struct ncr53c9x_softc *sc);
@@ -172,7 +165,7 @@ static int	espattach(struct esp_softc *e
 		    const struct ncr53c9x_glue *gluep);
 static int	espdetach(struct esp_softc *esc);
 
-static const struct ncr53c9x_glue esp_sbus_glue = {
+static const struct ncr53c9x_glue const esp_sbus_glue = {
 	esp_read_reg,
 	esp_write_reg,
 	esp_dma_isintr,
@@ -718,9 +711,9 @@ espdetach(struct esp_softc *esc)
 static int esp_sbus_debug = 0;
 
 static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__read_regnames [] = {
+	const char *r_name;
+	int r_flag;
+} const esp__read_regnames [] = {
 	{ "TCL", 0},			/* 0/00 */
 	{ "TCM", 0},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -739,10 +732,10 @@ static const struct {
 	{ "TCX", 1},			/* f/3c */
 };
 
-static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__write_regnames[] = {
+static const const struct {
+	const char *r_name;
+	int r_flag;
+} const esp__write_regnames[] = {
 	{ "TCL", 1},			/* 0/00 */
 	{ "TCM", 1},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -762,11 +755,11 @@ static const struct {
 };
 #endif
 
-static u_char
+static uint8_t
 esp_read_reg(struct ncr53c9x_softc *sc, int reg)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
-	u_char v;
+	uint8_t v;
 
 	v = bus_read_1(esc->sc_res, reg * 4);
 
@@ -780,7 +773,7 @@ esp_read_reg(struct ncr53c9x_softc *sc, 
 }
 
 static void
-esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v)
+esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 
@@ -818,8 +811,8 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 }
 
 static int
-esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
-	      int datain, size_t *dmasize)
+esp_dma_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len,
+    int datain, size_t *dmasize)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 

Modified: stable/8/sys/dev/esp/ncr53c9x.c
==============================================================================
--- stable/8/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:53:58 2011	(r226918)
+++ stable/8/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:53:58 2011	(r226919)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: ncr53c9x.c,v 1.125 2007/01/09 12:53:12 itohy Exp $	*/
+/*	$NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -43,13 +43,6 @@
  * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *        This product includes software developed by the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -133,7 +126,7 @@ __FBSDID("$FreeBSD$");
 MODULE_DEPEND(esp, cam, 1, 1, 1);
 
 #ifdef NCR53C9X_DEBUG
-static int ncr53c9x_debug =
+int ncr53c9x_debug =
     NCR_SHOWMISC /* | NCR_SHOWPHASE | NCR_SHOWTRAC | NCR_SHOWCMDS */;
 #endif
 
@@ -167,7 +160,7 @@ static void	ncr53c9x_sched(struct ncr53c
 static void	ncr53c9x_select(struct ncr53c9x_softc *sc,
 		    struct ncr53c9x_ecb *ecb);
 static void	ncr53c9x_watch(void *arg);
-static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p,
+static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p,
 		    int len);
 
 static struct ncr53c9x_ecb	*ncr53c9x_get_ecb(struct ncr53c9x_softc *sc);
@@ -187,13 +180,11 @@ static inline int	ncr53c9x_stp2cpb(struc
 		NCR_WRITE_REG((sc), NCR_TCL, (size));			\
 		NCR_WRITE_REG((sc), NCR_TCM, (size) >> 8);		\
 		if ((sc->sc_cfg2 & NCRCFG2_FE) ||			\
-		    (sc->sc_rev == NCR_VARIANT_FAS366)) {		\
+		    (sc->sc_rev == NCR_VARIANT_FAS366))			\
 			NCR_WRITE_REG((sc), NCR_TCH, (size) >> 16);	\
-		}							\
-		if (sc->sc_rev == NCR_VARIANT_FAS366) {			\
+		if (sc->sc_rev == NCR_VARIANT_FAS366)			\
 			NCR_WRITE_REG(sc, NCR_RCH, 0);			\
-		}							\
-} while (0)
+} while (/* CONSTCOND */0)
 
 #ifndef mstohz
 #define	mstohz(ms) \
@@ -551,11 +542,10 @@ ncr53c9x_reset(struct ncr53c9x_softc *sc
 		NCR_WRITE_REG(sc, NCR_AMDCFG4, sc->sc_cfg4);
 
 #if 0
-	device_printf(sc->sc_dev, "ncr53c9x_reset: revision %d\n",
-	    sc->sc_rev);
-	device_printf(sc->sc_dev, "ncr53c9x_reset: cfg1 0x%x, cfg2 0x%x, "
-	    "cfg3 0x%x, ccf 0x%x, timeout 0x%x\n",
-	    sc->sc_cfg1, sc->sc_cfg2, sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
+	device_printf(sc->sc_dev, "%s: revision %d\n", __func__, sc->sc_rev);
+	device_printf(sc->sc_dev, "%s: cfg1 0x%x, cfg2 0x%x, cfg3 0x%x, ccf "
+	    "0x%x, timeout 0x%x\n", __func__, sc->sc_cfg1, sc->sc_cfg2,
+	    sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
 #endif
 }
 
@@ -573,7 +563,8 @@ ncr53c9x_clear(struct ncr53c9x_softc *sc
 	/* Cancel any active commands. */
 	sc->sc_state = NCR_CLEANING;
 	sc->sc_msgify = 0;
-	if ((ecb = sc->sc_nexus) != NULL) {
+	ecb = sc->sc_nexus;
+	if (ecb != NULL) {
 		ecb->ccb->ccb_h.status = result;
 		ncr53c9x_done(sc, ecb);
 	}
@@ -597,7 +588,8 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 
 	/* Cancel outstanding disconnected commands on each LUN. */
 	LIST_FOREACH(li, &sc->sc_tinfo[target].luns, link) {
-		if ((ecb = li->untagged) != NULL) {
+		ecb = li->untagged;
+		if (ecb != NULL) {
 			li->untagged = NULL;
 			/*
 			 * XXX should we terminate a command
@@ -607,12 +599,14 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 			ecb->ccb->ccb_h.status = result;
 			ncr53c9x_done(sc, ecb);
 		}
-		for (i = 0; i < NCR_TAG_DEPTH; i++)
-			if ((ecb = li->queued[i])) {
+		for (i = 0; i < NCR_TAG_DEPTH; i++) {
+			ecb = li->queued[i];
+			if (ecb != NULL) {
 				li->queued[i] = NULL;
 				ecb->ccb->ccb_h.status = result;
 				ncr53c9x_done(sc, ecb);
 			}
+		}
 		li->used = 0;
 	}
 }
@@ -635,7 +629,7 @@ ncr53c9x_init(struct ncr53c9x_softc *sc,
 
 		TAILQ_INIT(&sc->ready_list);
 		sc->sc_nexus = NULL;
-		memset(sc->sc_tinfo, 0, sizeof(sc->sc_tinfo));
+		memset(sc->sc_tinfo, 0, sizeof(*sc->sc_tinfo));
 		for (r = 0; r < sc->sc_ntarg; r++) {
 			LIST_INIT(&sc->sc_tinfo[r].luns);
 		}
@@ -751,7 +745,7 @@ ncr53c9x_stp2cpb(struct ncr53c9x_softc *
 static inline void
 ncr53c9x_setsync(struct ncr53c9x_softc *sc, struct ncr53c9x_tinfo *ti)
 {
-	u_char cfg3, syncoff, synctp;
+	uint8_t cfg3, syncoff, synctp;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -810,7 +804,7 @@ static void
 ncr53c9x_select(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
 {
 	struct ncr53c9x_tinfo *ti;
-	u_char *cmd;
+	uint8_t *cmd;
 	size_t dmasize;
 	int clen, selatn3, selatns;
 	int lun = ecb->ccb->ccb_h.target_lun;
@@ -818,8 +812,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_select(t%d,l%d,cmd:%x,tag:%x,%x)] ",
-	    target, lun, ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
+	NCR_TRACE(("[%s(t%d,l%d,cmd:%x,tag:%x,%x)] ", __func__, target, lun,
+	    ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
 
 	ti = &sc->sc_tinfo[target];
 	sc->sc_state = NCR_SELECTING;
@@ -838,9 +832,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		NCRCMD(sc, NCRCMD_FLUSH);
 		NCR_WRITE_REG(sc, NCR_SELID, target | NCR_BUSID_HMEXC32 |
 		    NCR_BUSID_HMEENCID);
-	} else {
+	} else
 		NCR_WRITE_REG(sc, NCR_SELID, target);
-	}
 
 	/*
 	 * If we are requesting sense, force a renegotiation if we are
@@ -873,7 +866,7 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		selatns = 1;
 	}
 
-	cmd = (u_char *)&ecb->cmd.cmd;
+	cmd = (uint8_t *)&ecb->cmd.cmd;
 
 	if (selatn3) {
 		/* We'll use tags with SELATN3. */
@@ -954,7 +947,7 @@ ncr53c9x_get_ecb(struct ncr53c9x_softc *
 	ecb = TAILQ_FIRST(&sc->free_list);
 	if (ecb) {
 		if (ecb->flags != 0)
-			panic("ecb flags not cleared\n");
+			panic("%s: ecb flags not cleared", __func__);
 		TAILQ_REMOVE(&sc->free_list, ecb, free_links);
 		ecb->flags = ECB_ALLOC;
 		bzero(&ecb->ccb, sizeof(struct ncr53c9x_ecb) -
@@ -990,7 +983,7 @@ ncr53c9x_action(struct cam_sim *sim, uni
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_action %d]", ccb->ccb_h.func_code));
+	NCR_TRACE(("[%s %d]", __func__, ccb->ccb_h.func_code));
 
 	switch (ccb->ccb_h.func_code) {
 	case XPT_RESET_BUS:
@@ -1196,7 +1189,7 @@ ncr53c9x_poll(struct cam_sim *sim)
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_poll] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (NCRDMA_ISINTR(sc))
 		ncr53c9x_intr1(sc);
@@ -1260,10 +1253,10 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_sched] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (sc->sc_state != NCR_IDLE)
-		panic("ncr53c9x_sched: not IDLE (state=%d)", sc->sc_state);
+		panic("%s: not IDLE (state=%d)", __func__, sc->sc_state);
 
 	/*
 	 * Find first ecb in ready queue that is for a target/lunit
@@ -1288,10 +1281,9 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 		li = TINFO_LUN(ti, lun);
 		if (li == NULL) {
 			/* Initialize LUN info and add to list. */
-			if ((li = malloc(sizeof(*li),
-			    M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) {
+			li = malloc(sizeof(*li), M_DEVBUF, M_NOWAIT | M_ZERO);
+			if (li == NULL)
 				continue;
-			}
 			li->lun = lun;
 
 			LIST_INSERT_HEAD(&ti->luns, li, link);
@@ -1338,7 +1330,7 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 			ncr53c9x_select(sc, ecb);
 			break;
 		} else {
-			NCR_TRACE(("%d:%d busy\n",
+			NCR_TRACE(("[%s %d:%d busy] \n", __func__,
 			    ecb->ccb->ccb_h.target_id,
 			    ecb->ccb->ccb_h.target_lun));
 		}
@@ -1356,7 +1348,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("requesting sense "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	lun = ccb->ccb_h.target_lun;
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
@@ -1368,7 +1360,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ss->length = sizeof(struct scsi_sense_data);
 	ecb->clen = sizeof(*ss);
 	memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
-	ecb->daddr = (char *)&ccb->csio.sense_data;
+	ecb->daddr = (uint8_t *)&ccb->csio.sense_data;
 	ecb->dleft = sizeof(struct scsi_sense_data);
 	ecb->flags |= ECB_SENSE;
 	ecb->timeout = NCR_SENSE_TIMEOUT;
@@ -1379,9 +1371,9 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ncr53c9x_dequeue(sc, ecb);
 	li->untagged = ecb;	/* Must be executed first to fix C/A. */
 	li->busy = 2;
-	if (ecb == sc->sc_nexus) {
+	if (ecb == sc->sc_nexus)
 		ncr53c9x_select(sc, ecb);
-	} else {
+	else {
 		TAILQ_INSERT_HEAD(&sc->ready_list, ecb, chain);
 		ecb->flags |= ECB_READY;
 		if (sc->sc_state == NCR_IDLE)
@@ -1402,7 +1394,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_done(status:%x)] ", ccb->ccb_h.status));
+	NCR_TRACE(("[%s(status:%x)] ", __func__, ccb->ccb_h.status));
 
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
 	lun = ccb->ccb_h.target_lun;
@@ -1457,7 +1449,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		if (ccb->csio.resid != 0)
 			printf("resid=%d ", ccb->csio.resid);
 		if ((ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0)
@@ -1510,7 +1502,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	li = TINFO_LUN(ti, lun);
 #ifdef DIAGNOSTIC
 	if (li == NULL || li->lun != lun)
-		panic("ncr53c9x_dequeue: lun %qx for ecb %p does not exist",
+		panic("%s: lun %qx for ecb %p does not exist", __func__,
 		    (long long)lun, ecb);
 #endif
 	if (li->untagged == ecb) {
@@ -1521,9 +1513,9 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 #ifdef DIAGNOSTIC
 		if (li->queued[ecb->tag[1]] != NULL &&
 		    (li->queued[ecb->tag[1]] != ecb))
-			panic("ncr53c9x_dequeue: slot %d for lun %qx has %p "
-			    "instead of ecb %p\n", ecb->tag[1],
-			    (long long)lun, li->queued[ecb->tag[1]], ecb);
+			panic("%s: slot %d for lun %qx has %p instead of ecb "
+			    "%p", __func__, ecb->tag[1], (long long)lun,
+			    li->queued[ecb->tag[1]], ecb);
 #endif
 		li->queued[ecb->tag[1]] = NULL;
 		li->used--;
@@ -1550,7 +1542,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	NCRCMD(sc, NCRCMD_SETATN);					\
 	sc->sc_flags |= NCR_ATN;					\
 	sc->sc_msgpriq |= (m);						\
-} while (0)
+} while (/* CONSTCOND */0)
 
 static void
 ncr53c9x_flushfifo(struct ncr53c9x_softc *sc)
@@ -1558,7 +1550,7 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[flushfifo] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	NCRCMD(sc, NCRCMD_FLUSH);
 
@@ -1570,8 +1562,8 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 static int
 ncr53c9x_rdfifo(struct ncr53c9x_softc *sc, int how)
 {
-	u_char *ibuf;
 	int i, n;
+	uint8_t *ibuf;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1586,7 +1578,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 		break;
 
 	default:
-		panic("ncr53c9x_rdfifo: bad flag");
+		panic("%s: bad flag", __func__);
 		/* NOTREACHED */
 	}
 
@@ -1611,10 +1603,9 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 
 			ncr53c9x_flushfifo(sc);
 		}
-	} else {
+	} else
 		for (i = 0; i < n; i++)
 			ibuf[i] = NCR_READ_REG(sc, NCR_FIFO);
-	}
 
 	sc->sc_imlen += i;
 
@@ -1622,7 +1613,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 #ifdef NCR53C9X_DEBUG
 	NCR_TRACE(("\n[rdfifo %s (%d):",
 	    (how == NCR_RDFIFO_START) ? "start" : "cont", (int)sc->sc_imlen));
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		for (i = 0; i < sc->sc_imlen; i++)
 			printf(" %02x", sc->sc_imess[i]);
 		printf("]\n");
@@ -1633,7 +1624,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 }
 
 static void
-ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p, int len)
+ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p, int len)
 {
 	int i;
 
@@ -1641,7 +1632,7 @@ ncr53c9x_wrfifo(struct ncr53c9x_softc *s
 
 #ifdef NCR53C9X_DEBUG
 	NCR_MSGS(("[wrfifo(%d):", len));
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		for (i = 0; i < len; i++)
 			printf(" %02x", p[i]);
 		printf("]\n");
@@ -1663,13 +1654,13 @@ ncr53c9x_reselect(struct ncr53c9x_softc 
 	struct ncr53c9x_ecb *ecb = NULL;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char lun, selid, target;
+	uint8_t lun, selid, target;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	if (sc->sc_rev == NCR_VARIANT_FAS366) {
+	if (sc->sc_rev == NCR_VARIANT_FAS366)
 		target = sc->sc_selid;
-	} else {
+	else {
 		/*
 		 * The SCSI chip made a snapshot of the data bus
 		 * while the reselection was being negotiated.
@@ -1751,7 +1742,7 @@ abort:
 #define	MSG_IS2BYTE(m)		(((m) & 0xf0) == 0x20)
 
 static inline int
-__verify_msg_format(u_char *p, int len)
+__verify_msg_format(uint8_t *p, int len)
 {
 
 	if (len == 1 && MSG_IS1BYTE(p[0]))
@@ -1777,12 +1768,12 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc
 	struct ncr53c9x_ecb *ecb;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char *pb;
+	uint8_t *pb;
 	int lun, plen;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgin(curmsglen:%ld)] ", (long)sc->sc_imlen));
+	NCR_TRACE(("[%s(curmsglen:%ld)] ", __func__, (long)sc->sc_imlen));
 
 	if (sc->sc_imlen == 0) {
 		device_printf(sc->sc_dev, "msgin: no msg byte available\n");
@@ -2068,19 +2059,19 @@ gotit:
 			    sc->sc_imess[0]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify,
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify,
 		    sc->sc_imess[0], sc->sc_imess[1]);
 		break;
 
 	case NCR_RESELECTED:
-		if (MSG_ISIDENTIFY(sc->sc_imess[1])) {
+		if (MSG_ISIDENTIFY(sc->sc_imess[1]))
 			sc->sc_msgify = sc->sc_imess[1];
-		} else {
+		else {
 			device_printf(sc->sc_dev, "reselect without IDENTIFY;"
 			    " MSG %x; sending DEVICE RESET\n", sc->sc_imess[1]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
 		break;
 
 	default:
@@ -2124,8 +2115,8 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgout(priq:%x, prevphase:%x)]",
-	    sc->sc_msgpriq, sc->sc_prevphase));
+	NCR_TRACE(("[%s(priq:%x, prevphase:%x)]", __func__, sc->sc_msgpriq,
+	    sc->sc_prevphase));
 
 	/*
 	 * XXX - the NCR_ATN flag is not in sync with the actual ATN
@@ -2138,7 +2129,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase != MESSAGE_OUT_PHASE) {
 		new:
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 			sc->sc_msgoutq = 0;
 			sc->sc_omlen = 0;
 		}
@@ -2146,10 +2139,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase == MESSAGE_OUT_PHASE) {
 			ncr53c9x_sched_msgout(sc->sc_msgoutq);
 			goto new;
-		} else {
+		} else
 			device_printf(sc->sc_dev, "at line %d: unexpected "
 			    "MESSAGE OUT phase\n", __LINE__);
-		}
 	}
 
 	if (sc->sc_omlen == 0) {
@@ -2181,20 +2173,18 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 			break;
 
 		case SEND_IDENTIFY:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] =
 			    MSG_IDENTIFY(ecb->ccb->ccb_h.target_lun, 0);
 			break;
 
 		case SEND_TAG:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] = ecb->tag[0];
 			sc->sc_omess[1] = ecb->tag[1];
@@ -2249,7 +2239,7 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		NCR_MSGS(("sc_omlen; i++)
 			NCR_MSGS((" %02x", sc->sc_omess[i]));
@@ -2310,7 +2300,7 @@ ncr53c9x_intr1(struct ncr53c9x_softc *sc
 	struct timeval cur, wait;
 	size_t size;
 	int i, nfifo;
-	u_char msg;
+	uint8_t msg;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -2385,7 +2375,7 @@ again:
 				 * while we were trying to select
 				 * another target.
 				 */
-#ifdef DEBUG
+#ifdef NCR53C9X_DEBUG
 				device_printf(sc->sc_dev, "ESP100 work-around "
 				    "activated\n");
 #endif
@@ -2492,7 +2482,9 @@ again:
 		    sc->sc_espintr,sc->sc_espstat,sc->sc_espstep));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * This command must (apparently) be issued within
@@ -2734,7 +2726,7 @@ again:
 				if (sc->sc_state == NCR_IDLE &&
 				    sc->sc_espstep == 0)
 					return;
-				panic("ncr53c9x: no nexus");
+				panic("%s: no nexus", __func__);
 			}
 
 			ti = &sc->sc_tinfo[ecb->ccb->ccb_h.target_id];
@@ -2812,8 +2804,8 @@ again:
 					if (sc->sc_cmdlen == 0)
 						/* Hope for the best... */
 						break;
-				} else if ((NCR_READ_REG(sc, NCR_FFLAG)
-				    & NCRFIFO_FF) == 0) {
+				} else if ((NCR_READ_REG(sc, NCR_FFLAG) &
+				    NCRFIFO_FF) == 0) {
 					/* Hope for the best... */
 					break;
 				}
@@ -2872,7 +2864,7 @@ again:
 			/* "Initiate Command Complete Steps" in progress */
 			sc->sc_flags &= ~NCR_ICCS;
 
-			if (!(sc->sc_espintr & NCRINTR_DONE)) {
+			if ((sc->sc_espintr & NCRINTR_DONE) == 0) {
 				device_printf(sc->sc_dev, "ICCS: "
 				    ": [intr %x, stat %x, step %x]\n",
 				    sc->sc_espintr, sc->sc_espstat,
@@ -2912,9 +2904,8 @@ again:
 	 * Driver is now in state NCR_CONNECTED, i.e. we
 	 * have a current command working the SCSI bus.
 	 */
-	if (sc->sc_state != NCR_CONNECTED || ecb == NULL) {
-		panic("ncr53c9x: no nexus");
-	}
+	if (sc->sc_state != NCR_CONNECTED || ecb == NULL)
+		panic("%s: no nexus", __func__);
 
 	switch (sc->sc_phase) {
 	case MESSAGE_OUT_PHASE:
@@ -2928,7 +2919,7 @@ msgin:
 		NCR_PHASE(("MESSAGE_IN_PHASE "));
 		if ((sc->sc_espintr & NCRINTR_BS) != 0) {
 			if ((sc->sc_rev != NCR_VARIANT_FAS366) ||
-			    !(sc->sc_espstat2 & NCRFAS_STAT2_EMPTY)) {
+			    (sc->sc_espstat2 & NCRFAS_STAT2_EMPTY) == 0) {
 				NCRCMD(sc, NCRCMD_FLUSH);
 			}
 			sc->sc_flags |= NCR_WAITI;
@@ -2945,11 +2936,10 @@ msgin:
 			    (sc->sc_prevphase == sc->sc_phase) ?
 			    NCR_RDFIFO_CONTINUE : NCR_RDFIFO_START);
 			ncr53c9x_msgin(sc);
-		} else {
+		} else
 			device_printf(sc->sc_dev, "MSGIN: weird bits: "
 			    "[intr %x, stat %x, step %x]\n",
 			    sc->sc_espintr, sc->sc_espstat, sc->sc_espstep);
-		}
 		sc->sc_prevphase = MESSAGE_IN_PHASE;
 		goto shortcut;	/* i.e. expect data to be ready */
 
@@ -2966,7 +2956,9 @@ msgin:
 		    ecb->cmd.cmd.opcode, ecb->clen));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1);*/
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * If we have more messages to send, e.g. WDTR or SDTR
@@ -2981,7 +2973,7 @@ msgin:
 			/* Setup DMA transfer for command. */
 			size = ecb->clen;
 			sc->sc_cmdlen = size;
-			sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd;
+			sc->sc_cmdp = (void *)&ecb->cmd.cmd;
 			NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen,
 			    0, &size);
 			/* Program the SCSI counter. */
@@ -2994,7 +2986,8 @@ msgin:
 			NCRCMD(sc, NCRCMD_TRANS | NCRCMD_DMA);
 			NCRDMA_GO(sc);
 		} else {
-			ncr53c9x_wrfifo(sc, (u_char *)&ecb->cmd.cmd, ecb->clen);
+			ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd,
+			    ecb->clen);
 			NCRCMD(sc, NCRCMD_TRANS);
 		}
 		sc->sc_prevphase = COMMAND_PHASE;
@@ -3175,7 +3168,7 @@ ncr53c9x_callout(void *arg)
 static void
 ncr53c9x_watch(void *arg)
 {
-	struct ncr53c9x_softc *sc = (struct ncr53c9x_softc *)arg;
+	struct ncr53c9x_softc *sc = arg;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
 	time_t old;

Modified: stable/8/sys/dev/esp/ncr53c9xreg.h
==============================================================================
--- stable/8/sys/dev/esp/ncr53c9xreg.h	Sat Oct 29 23:53:58 2011	(r226918)
+++ stable/8/sys/dev/esp/ncr53c9xreg.h	Sat Oct 29 23:53:58 2011	(r226919)
@@ -1,4 +1,4 @@
-/*	$NetBSD: ncr53c9xreg.h,v 1.14 2005/02/27 00:27:02 perry Exp $	*/
+/*	$NetBSD: ncr53c9xreg.h,v 1.16 2009/09/07 13:31:44 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1994 Peter Galbavy.  All rights reserved.
@@ -43,84 +43,84 @@
 #define	NCR_FIFO	0x02		/* RW - FIFO data		*/
 
 #define	NCR_CMD		0x03		/* RW - Command (2 deep)	*/
-#define  NCRCMD_DMA	0x80		/*	DMA Bit			*/
-#define  NCRCMD_NOP	0x00		/*	No Operation		*/
-#define  NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
-#define  NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
-#define  NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
-#define  NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
-#define  NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
-#define  NCRCMD_SELATN	0x42		/*	Select with ATN		*/
-#define  NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
-#define  NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
-#define  NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
-#define  NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
-#define  NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
-#define  NCRCMD_SNDMSG	0x20		/*	Send Message		*/
-#define  NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
-#define  NCRCMD_SNDDATA	0x22		/*	Send Data		*/
-#define  NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
-#define  NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
-#define  NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
-#define  NCRCMD_DISC	0x27		/*	Disconnect		*/
-#define  NCRCMD_RECMSG	0x28		/*	Receive Message		*/
-#define  NCRCMD_RECCMD	0x29		/*	Receive Command 	*/
-#define  NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
-#define  NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
-#define  NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
-#define  NCRCMD_TRANS	0x10		/*	Transfer Information	*/
-#define  NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq 	*/
-#define  NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
-#define  NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
-#define  NCRCMD_SETATN	0x1a		/*	Set ATN			*/
-#define  NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
+#define	 NCRCMD_DMA	0x80		/*	DMA Bit			*/
+#define	 NCRCMD_NOP	0x00		/*	No Operation		*/
+#define	 NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
+#define	 NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
+#define	 NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
+#define	 NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
+#define	 NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
+#define	 NCRCMD_SELATN	0x42		/*	Select with ATN		*/
+#define	 NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
+#define	 NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
+#define	 NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
+#define	 NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
+#define	 NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
+#define	 NCRCMD_SNDMSG	0x20		/*	Send Message		*/
+#define	 NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
+#define	 NCRCMD_SNDDATA	0x22		/*	Send Data		*/
+#define	 NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
+#define	 NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
+#define	 NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
+#define	 NCRCMD_DISC	0x27		/*	Disconnect		*/
+#define	 NCRCMD_RECMSG	0x28		/*	Receive Message		*/
+#define	 NCRCMD_RECCMD	0x29		/*	Receive Command		*/
+#define	 NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
+#define	 NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
+#define	 NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
+#define	 NCRCMD_TRANS	0x10		/*	Transfer Information	*/
+#define	 NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq	*/
+#define	 NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
+#define	 NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
+#define	 NCRCMD_SETATN	0x1a		/*	Set ATN			*/
+#define	 NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
 
 #define	NCR_STAT	0x04		/* RO - Status			*/
-#define  NCRSTAT_INT	0x80		/*	Interrupt		*/
-#define  NCRSTAT_GE	0x40		/*	Gross Error		*/
-#define  NCRSTAT_PE	0x20		/*	Parity Error		*/
-#define  NCRSTAT_TC	0x10		/*	Terminal Count		*/
-#define  NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
-#define  NCRSTAT_PHASE	0x07		/*	Phase bits		*/
+#define	 NCRSTAT_INT	0x80		/*	Interrupt		*/
+#define	 NCRSTAT_GE	0x40		/*	Gross Error		*/
+#define	 NCRSTAT_PE	0x20		/*	Parity Error		*/
+#define	 NCRSTAT_TC	0x10		/*	Terminal Count		*/
+#define	 NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
+#define	 NCRSTAT_PHASE	0x07		/*	Phase bits		*/
 
 #define	NCR_SELID	0x04		/* WO - Select/Reselect Bus ID	*/
-#define  NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
-#define  NCR_BUSID_HMEENCID	0x10 	/*	HME encode reselection ID */
+#define	 NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
+#define	 NCR_BUSID_HMEENCID	0x10	/*	HME encode reselection ID */
 
 #define	NCR_INTR	0x05		/* RO - Interrupt		*/
-#define  NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
-#define  NCRINTR_ILL	0x40		/*	Illegal Command		*/
-#define  NCRINTR_DIS	0x20		/*	Disconnect		*/
-#define  NCRINTR_BS	0x10		/*	Bus Service		*/
-#define  NCRINTR_FC	0x08		/*	Function Complete	*/
-#define  NCRINTR_RESEL	0x04		/*	Reselected		*/
-#define  NCRINTR_SELATN	0x02		/*	Select with ATN		*/
-#define  NCRINTR_SEL	0x01		/*	Selected		*/
+#define	 NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
+#define	 NCRINTR_ILL	0x40		/*	Illegal Command		*/
+#define	 NCRINTR_DIS	0x20		/*	Disconnect		*/
+#define	 NCRINTR_BS	0x10		/*	Bus Service		*/
+#define	 NCRINTR_FC	0x08		/*	Function Complete	*/
+#define	 NCRINTR_RESEL	0x04		/*	Reselected		*/
+#define	 NCRINTR_SELATN	0x02		/*	Select with ATN		*/
+#define	 NCRINTR_SEL	0x01		/*	Selected		*/
 
 #define	NCR_TIMEOUT	0x05		/* WO - Select/Reselect Timeout */
 
 #define	NCR_STEP	0x06		/* RO - Sequence Step		*/
-#define  NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
-#define  NCRSTEP_DONE	0x04		/*	command went out	*/
+#define	 NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
+#define	 NCRSTEP_DONE	0x04		/*	command went out	*/
 
 #define	NCR_SYNCTP	0x06		/* WO - Synch Transfer Period	*/
 					/*	Default 5 (53C9X)	*/
 
 #define	NCR_FFLAG	0x07		/* RO - FIFO Flags		*/
-#define  NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
-#define  NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
+#define	 NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
+#define	 NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
 
 #define	NCR_SYNCOFF	0x07		/* WO - Synch Offset		*/
 					/*	0 = ASYNC		*/
 					/*	1 - 15 = SYNC bytes	*/
 
 #define	NCR_CFG1	0x08		/* RW - Configuration #1	*/
-#define  NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
-#define  NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
-#define  NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
-#define  NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
-#define  NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
-#define  NCRCFG1_BUSID	0x07		/*	Bus ID			*/
+#define	 NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
+#define	 NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
+#define	 NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
+#define	 NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
+#define	 NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
+#define	 NCRCFG1_BUSID	0x07		/*	Bus ID			*/
 
 #define	NCR_CCF		0x09		/* WO -	Clock Conversion Factor	*/
 					/*	0 = 35.01 - 40MHz	*/
@@ -136,24 +136,24 @@
 
 #define	NCR_CFG2	0x0b		/* RW - Configuration #2	*/
 #define	 NCRCFG2_RSVD	0xa0		/*	reserved		*/
-#define  NCRCFG2_FE	0x40		/* 	Features Enable		*/
-#define  NCRCFG2_DREQ	0x10		/* 	DREQ High Impedance	*/
-#define  NCRCFG2_SCSI2	0x08		/* 	SCSI-2 Enable		*/
-#define  NCRCFG2_BPA	0x04		/* 	Target Bad Parity Abort	*/
-#define  NCRCFG2_RPE	0x02		/* 	Register Parity Error	*/
-#define  NCRCFG2_DPE	0x01		/* 	DMA Parity Error	*/
+#define	 NCRCFG2_FE	0x40		/*	Features Enable		*/
+#define	 NCRCFG2_DREQ	0x10		/*	DREQ High Impedance	*/
+#define	 NCRCFG2_SCSI2	0x08		/*	SCSI-2 Enable		*/
+#define	 NCRCFG2_BPA	0x04		/*	Target Bad Parity Abort	*/
+#define	 NCRCFG2_RPE	0x02		/*	Register Parity Error	*/
+#define	 NCRCFG2_DPE	0x01		/*	DMA Parity Error	*/
 
-#define  NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
+#define	 NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
 #define	 NCRCFG2_HME32  0x80		/*	HME 32 extended		*/
 
 /* Config #3 only on 53C9X */
 #define	NCR_CFG3	0x0c		/* RW - Configuration #3	*/
 #define	 NCRCFG3_RSVD	0xe0		/*	reserved		*/
-#define  NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
-#define  NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
-#define  NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
-#define  NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
-#define  NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
+#define	 NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
+#define	 NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
+#define	 NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
+#define	 NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
+#define	 NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
 
 /*
  * For some unknown reason, the ESP406/FAS408 looks like every
@@ -164,35 +164,35 @@
 
 /* Config #3 different on ESP406/FAS408 */
 #define	NCR_ESPCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
 #define	 NCRESPCFG3_SRESB	0x08	/*	Save Residual Byte	*/
-#define  NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
+#define	 NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
 #define	 NCRESPCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
 #define	 NCRESPCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 also different on NCR53CF9x/FAS100A/FAS216/FAS236 */
 #define	NCR_F9XCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
-#define  NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
-#define  NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
-#define  NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
-#define  NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
+#define	 NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
+#define	 NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
+#define	 NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
+#define	 NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 on FAS366 */
-#define  NCRFASCFG3_OBAUTO    	0x80    /*	auto push odd-byte to DMA */
-#define  NCRFASCFG3_EWIDE     	0x40    /* 	Enable Wide-SCSI     */
-#define  NCRFASCFG3_IDBIT3	0x20	/* 	Bit 3 of HME SCSI-ID */
-#define	 NCRFASCFG3_IDRESCHK	0x10	/* 	ID message checking */
-#define	 NCRFASCFG3_QUENB	0x08	/* 	3-byte msg support */
-#define	 NCRFASCFG3_CDB10	0x04	/* 	group 2 scsi-2 support */
-#define	 NCRFASCFG3_FASTSCSI	0x02	/* 	10 MB/S fast scsi mode */
-#define	 NCRFASCFG3_FASTCLK	0x01	/* 	fast clock mode */
+#define	 NCRFASCFG3_OBAUTO	0x80    /*	auto push odd-byte to DMA */
+#define	 NCRFASCFG3_EWIDE	0x40    /*	Enable Wide-SCSI     */
+#define	 NCRFASCFG3_IDBIT3	0x20	/*	Bit 3 of HME SCSI-ID */
+#define	 NCRFASCFG3_IDRESCHK	0x10	/*	ID message checking */
+#define	 NCRFASCFG3_QUENB	0x08	/*	3-byte msg support */
+#define	 NCRFASCFG3_CDB10	0x04	/*	group 2 scsi-2 support */
+#define	 NCRFASCFG3_FASTSCSI	0x02	/*	10 MB/S fast scsi mode */
+#define	 NCRFASCFG3_FASTCLK	0x01	/*	fast clock mode */
 
 /* Config #4 only on ESP406/FAS408 */
 #define	NCR_CFG4	0x0d		/* RW - Configuration #4	*/
@@ -208,8 +208,8 @@
 */
 

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