From owner-svn-src-stable-8@FreeBSD.ORG Sun Mar 25 02:19:02 2012 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 BCFF01065678; Sun, 25 Mar 2012 02:19:02 +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 A5C9D8FC20; Sun, 25 Mar 2012 02:19:02 +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 q2P2J2Fw059268; Sun, 25 Mar 2012 02:19:02 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2P2J2Bv059259; Sun, 25 Mar 2012 02:19:02 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201203250219.q2P2J2Bv059259@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 25 Mar 2012 02:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233448 - stable/8/share/zoneinfo X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2012 02:19:02 -0000 Author: edwin Date: Sun Mar 25 02:19:02 2012 New Revision: 233448 URL: http://svn.freebsd.org/changeset/base/233448 Log: MFC of r233445, tzdata2012a - Updates to various locations in Antarctica. - Armenia will abolish DST this year. - Not only Samoa has moved to UTC+14, also Fakaofo did. - There will be a leap second in 30 June 2012. - Historical updates of 1918 to Canada, Winn, Regina, Edm, Vanc, Creston. - Chili stays on DST until 28 April 2012 - The Falkland islands will stay on DST this year. Modified: stable/8/share/zoneinfo/antarctica stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/australasia stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/leapseconds 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/antarctica ============================================================================== --- stable/8/share/zoneinfo/antarctica Sun Mar 25 02:18:22 2012 (r233447) +++ stable/8/share/zoneinfo/antarctica Sun Mar 25 02:19:02 2012 (r233448) @@ -1,5 +1,5 @@ #
-# @(#)antarctica	8.9
+# @(#)antarctica	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -42,8 +42,19 @@ Rule	ChileAQ	1997	only	-	Mar	30	3:00u	0	
 Rule	ChileAQ	1998	only	-	Mar	Sun>=9	3:00u	0	-
 Rule	ChileAQ	1998	only	-	Sep	27	4:00u	1:00	S
 Rule	ChileAQ	1999	only	-	Apr	 4	3:00u	0	-
-Rule	ChileAQ	1999	max	-	Oct	Sun>=9	4:00u	1:00	S
-Rule	ChileAQ	2000	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	ChileAQ	1999	2010	-	Oct	Sun>=9	4:00u	1:00	S
+Rule	ChileAQ	2000	2007	-	Mar	Sun>=9	3:00u	0	-
+# N.B.: the end of March 29 in Chile is March 30 in Universal time,
+# which is used below in specifying the transition.
+Rule	ChileAQ	2008	only	-	Mar	30	3:00u	0	-
+Rule	ChileAQ	2009	only	-	Mar	Sun>=9	3:00u	0	-
+Rule	ChileAQ	2010	only	-	Apr	Sun>=1	3:00u	0	-
+Rule	ChileAQ	2011	only	-	May	Sun>=2	3:00u	0	-
+Rule	ChileAQ	2011	only	-	Aug	Sun>=16	4:00u	1:00	S
+Rule	ChileAQ	2012	only	-	Apr	Sun>=23	3:00u	0	-
+Rule	ChileAQ	2012	only	-	Sep	Sun>=2	4:00u	1:00	S
+Rule	ChileAQ	2013	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	ChileAQ	2013	max	-	Oct	Sun>=9	4:00u	1:00	S
 
 # These rules are stolen from the `australasia' file.
 Rule	AusAQ	1917	only	-	Jan	 1	0:01	1:00	-
@@ -142,12 +153,16 @@ Zone Antarctica/Casey	0	-	zzz	1969
 						# Western (Aus) Standard Time
 			11:00	-	CAST	2010 Mar 5 2:00
 						# Casey Time
+			8:00	-	WST	2011 Oct 28 2:00
+			11:00	-	CAST	2012 Feb 21 17:00u
 			8:00	-	WST
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
 			7:00	-	DAVT	2009 Oct 18 2:00
 			5:00	-	DAVT	2010 Mar 10 20:00u
+			7:00	-	DAVT	2011 Oct 28 2:00
+			5:00	-	DAVT	2012 Feb 21 20:00u
 			7:00	-	DAVT
 Zone Antarctica/Mawson	0	-	zzz	1954 Feb 13
 			6:00	-	MAWT	2009 Oct 18 2:00

Modified: stable/8/share/zoneinfo/asia
==============================================================================
--- stable/8/share/zoneinfo/asia	Sun Mar 25 02:18:22 2012	(r233447)
+++ stable/8/share/zoneinfo/asia	Sun Mar 25 02:19:02 2012	(r233448)
@@ -1,4 +1,4 @@
-# @(#)asia	8.69
+# @(#)asia	8.70
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -77,10 +77,6 @@ Rule RussiaAsia	1993	max	-	Mar	lastSun	 
 Rule RussiaAsia	1993	1995	-	Sep	lastSun	 2:00s	0	-
 Rule RussiaAsia	1996	max	-	Oct	lastSun	 2:00s	0	-
 
-# From Arthur David Olson (2011-06-15):
-# While Russia abandoned DST in 2011, Armenia may choose to
-# follow Russia's "old" rules.
-
 # Afghanistan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Kabul	4:36:48 -	LMT	1890
@@ -97,6 +93,21 @@ Zone	Asia/Kabul	4:36:48 -	LMT	1890
 # in 1996, though it did use DST in 1995.  IATA SSIM (1991/1998) reports that
 # Armenia switched from 3:00 to 4:00 in 1998 and observed DST after 1991,
 # but started switching at 3:00s in 1998.
+
+# From Arthur David Olson (2011-06-15):
+# While Russia abandoned DST in 2011, Armenia may choose to
+# follow Russia's "old" rules.
+
+# From Alexander Krivenyshev (2012-02-10):
+# According to News Armenia, on Feb 9, 2012,
+# http://newsarmenia.ru/society/20120209/42609695.html
+# 
+# The Armenia National Assembly adopted final reading of Amendments to the
+# Law "On procedure of calculation time on the territory of the Republic of
+# Armenia" according to which Armenia [is] abolishing Daylight Saving Time.
+# or
+# (brief)
+# http://www.worldtimezone.com/dst_news/dst_news_armenia03.html
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Yerevan	2:58:00 -	LMT	1924 May  2
 			3:00	-	YERT	1957 Mar    # Yerevan Time
@@ -104,7 +115,8 @@ Zone	Asia/Yerevan	2:58:00 -	LMT	1924 May
 			3:00	1:00	YERST	1991 Sep 23 # independence
 			3:00 RussiaAsia	AM%sT	1995 Sep 24 2:00s
 			4:00	-	AMT	1997
-			4:00 RussiaAsia	AM%sT
+			4:00 RussiaAsia	AM%sT	2012 Mar 25 2:00s
+			4:00	-	AMT
 
 # Azerbaijan
 # From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23):

Modified: stable/8/share/zoneinfo/australasia
==============================================================================
--- stable/8/share/zoneinfo/australasia	Sun Mar 25 02:18:22 2012	(r233447)
+++ stable/8/share/zoneinfo/australasia	Sun Mar 25 02:19:02 2012	(r233448)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.29
+# @(#)australasia	8.30
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -616,6 +616,11 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # Dateline Change skip Friday 30th Dec 2011
 # Thursday 29th December 2011	23:59:59 Hours
 # Saturday 31st December 2011	00:00:00 Hours
+#
+# Clarification by Tim Parenti (2012-01-03):
+# Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012
+# seasons, there is not yet any indication that this trend will continue on
+# a regular basis. For now, we have explicitly listed the transitions below.
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
@@ -633,9 +638,28 @@ Zone Pacific/Guadalcanal 10:39:48 -	LMT	
 			11:00	-	SBT	# Solomon Is Time
 
 # Tokelau Is
+#
+# From Gwillim Law (2011-12-29)
+# A correspondent informed me that Tokelau, like Samoa, will be skipping
+# December 31 this year, thereby changing its time zone from UTC-10 to
+# UTC+14. When I tried to verify this statement, I found a confirming
+# article in Time magazine online
+# 
+# (http://www.time.com/time/world/article/0,8599,2103243,00.html).
+# 
+#
+# From Jonathan Leffler (2011-12-29)
+# Information from the BBC to the same effect:
+# 
+# http://www.bbc.co.uk/news/world-asia-16351377
+# 
+#
+# Patch supplied by Tim Parenti (2011-12-29)
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fakaofo	-11:24:56 -	LMT	1901
-			-10:00	-	TKT	# Tokelau Time
+			-10:00	-	TKT 2011 Dec 30	# Tokelau Time
+			14:00	-	TKT
 
 # Tonga
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Sun Mar 25 02:18:22 2012	(r233447)
+++ stable/8/share/zoneinfo/europe	Sun Mar 25 02:19:02 2012	(r233448)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.40
+# @(#)europe	8.41
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -211,9 +211,15 @@
 # the history of summer time legislation in the United Kingdom.
 # Since 1998 Joseph S. Myers has been updating
 # and extending this list, which can be found in
-# 
+# http://student.cusu.cam.ac.uk/~jsm28/british-time/
+# 
 # History of legal time in Britain
 # 
+# Rob Crowther (2012-01-04) reports that that URL no longer
+# exists, and the article can now be found at:
+# 
+# http://www.polyomino.org.uk/british-time/
+# 
 
 # From Joseph S. Myers (1998-01-06):
 #
@@ -1151,10 +1157,10 @@ Rule	France	1940	only	-	Feb	25	 2:00	1:0
 # write that they were used in Monaco and in many French locations.
 # Le Corre writes that the upper limit of the free zone was Arneguy, Orthez,
 # Mont-de-Marsan, Bazas, Langon, Lamotte-Montravel, Marouil, La
-# Rochefoucault, Champagne-Mouton, La Roche-Posay, La Haye-Decartes,
+# Rochefoucault, Champagne-Mouton, La Roche-Posay, La Haye-Descartes,
 # Loches, Montrichard, Vierzon, Bourges, Moulins, Digoin,
 # Paray-le-Monial, Montceau-les-Mines, Chalons-sur-Saone, Arbois,
-# Dole, Morez, St-Claude, and Collognes (Haute-Savioe).
+# Dole, Morez, St-Claude, and Collonges (Haute-Savoie).
 Rule	France	1941	only	-	May	 5	 0:00	2:00	M # Midsummer
 # Shanks & Pottenger say this transition occurred at Oct 6 1:00,
 # but go with Denis Excoffier (1997-12-12),

Modified: stable/8/share/zoneinfo/leapseconds
==============================================================================
--- stable/8/share/zoneinfo/leapseconds	Sun Mar 25 02:18:22 2012	(r233447)
+++ stable/8/share/zoneinfo/leapseconds	Sun Mar 25 02:19:02 2012	(r233448)
@@ -1,5 +1,5 @@
 # 
-# @(#)leapseconds	8.11
+# @(#)leapseconds	8.13
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -48,40 +48,54 @@ Leap	1997	Jun	30	23:59:60	+	S
 Leap	1998	Dec	31	23:59:60	+	S
 Leap	2005	Dec	31	23:59:60	+	S
 Leap	2008	Dec	31	23:59:60	+	S
+Leap	2012	Jun	30	23:59:60	+	S
 
 # INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
 #
 # SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
 #
+#
 # SERVICE DE LA ROTATION TERRESTRE
 # OBSERVATOIRE DE PARIS
 # 61, Av. de l'Observatoire 75014 PARIS (France)
-# Tel.      : 33 (0) 1 40 51 22 29
+# Tel.      : 33 (0) 1 40 51 22 26
 # FAX       : 33 (0) 1 40 51 22 91
-# Internet  : services.iers@obspm.fr
+# e-mail    : (E-Mail Removed)
+# http://hpiers.obspm.fr/eop-pc
+#
+# Paris, 5 January 2012
 #
-# Paris, 2 February 2011
 #
-# Bulletin C 41
+# Bulletin C 43
 #
 # To authorities responsible
 # for the measurement and
 # distribution of time
 #
-# INFORMATION ON UTC - TAI
 #
-# NO positive leap second will be introduced at the end of June 2011.
-# The difference between Coordinated Universal Time UTC and the
-# International Atomic Time TAI is :		
+# UTC TIME STEP
+# on the 1st of July 2012
+#
 #
-# from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
+# A positive leap second will be introduced at the end of June 2012.
+# The sequence of dates of the UTC second markers will be:		
+# 		
+#                          2012 June 30,     23h 59m 59s
+#                          2012 June 30,     23h 59m 60s
+#                          2012 July  1,      0h  0m  0s
+#
+# The difference between UTC and the International Atomic Time TAI is:
+#
+# from 2009 January 1, 0h UTC, to 2012 July 1  0h UTC  : UTC-TAI = - 34s
+# from 2012 July 1,    0h UTC, until further notice    : UTC-TAI = - 35s
 #
 # Leap seconds can be introduced in UTC at the end of the months of December
-# or June,  depending on the evolution of UT1-TAI. Bulletin C is mailed every
-# six months, either to announce a time step in UTC, or to confirm that there
+# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
+# six months, either to announce a time step in UTC or to confirm that there
 # will be no time step at the next possible date.
 #
+#
 # Daniel GAMBIS
-# Head			
-# Earth Orientation Center of the IERS
+# Head		
+# Earth Orientation Center of IERS
 # Observatoire de Paris, France

Modified: stable/8/share/zoneinfo/northamerica
==============================================================================
--- stable/8/share/zoneinfo/northamerica	Sun Mar 25 02:18:22 2012	(r233447)
+++ stable/8/share/zoneinfo/northamerica	Sun Mar 25 02:19:02 2012	(r233448)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.51
+# @(#)northamerica	8.52
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1120,9 +1120,26 @@ Zone America/Menominee	-5:50:27 -	LMT	18
 # For now, assume all of DST-observing Canada will fall into line with the
 # new US DST rules,
 
+# From Chris Walton (2011-12-01)
+# In the first of Tammy Hardwick's articles
+# 
+# http://www.ilovecreston.com/?p=articles&t=spec&ar=260
+# 
+# she quotes the Friday November 1/1918 edition of the Creston Review.
+# The quote includes these two statements:
+# 'Sunday the CPR went back to the old system of time...'
+# '... The daylight saving scheme was dropped all over Canada at the same time,'
+# These statements refer to a transition from daylight time to standard time
+# that occurred nationally on Sunday October 27/1918.  This transition was
+# also documented in the Saturday October 26/1918 edition of the Toronto Star.
+
+# In light of that evidence, we alter the date from the earlier believed
+# Oct 31, to Oct 27, 1918 (and Sunday is a more likely transition day
+# than Thursday) in all Canadian rulesets.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Canada	1918	only	-	Apr	14	2:00	1:00	D
-Rule	Canada	1918	only	-	Oct	31	2:00	0	S
+Rule	Canada	1918	only	-	Oct	27	2:00	0	S
 Rule	Canada	1942	only	-	Feb	 9	2:00	1:00	W # War
 Rule	Canada	1945	only	-	Aug	14	23:00u	1:00	P # Peace
 Rule	Canada	1945	only	-	Sep	30	2:00	0	S
@@ -1645,7 +1662,7 @@ Zone America/Atikokan	-6:06:28 -	LMT	189
 Rule	Winn	1916	only	-	Apr	23	0:00	1:00	D
 Rule	Winn	1916	only	-	Sep	17	0:00	0	S
 Rule	Winn	1918	only	-	Apr	14	2:00	1:00	D
-Rule	Winn	1918	only	-	Oct	31	2:00	0	S
+Rule	Winn	1918	only	-	Oct	27	2:00	0	S
 Rule	Winn	1937	only	-	May	16	2:00	1:00	D
 Rule	Winn	1937	only	-	Sep	26	2:00	0	S
 Rule	Winn	1942	only	-	Feb	 9	2:00	1:00	W # War
@@ -1728,7 +1745,7 @@ Zone America/Winnipeg	-6:28:36 -	LMT	188
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Regina	1918	only	-	Apr	14	2:00	1:00	D
-Rule	Regina	1918	only	-	Oct	31	2:00	0	S
+Rule	Regina	1918	only	-	Oct	27	2:00	0	S
 Rule	Regina	1930	1934	-	May	Sun>=1	0:00	1:00	D
 Rule	Regina	1930	1934	-	Oct	Sun>=1	0:00	0	S
 Rule	Regina	1937	1941	-	Apr	Sun>=8	0:00	1:00	D
@@ -1765,7 +1782,7 @@ Zone America/Swift_Current -7:11:20 -	LM
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Edm	1918	1919	-	Apr	Sun>=8	2:00	1:00	D
-Rule	Edm	1918	only	-	Oct	31	2:00	0	S
+Rule	Edm	1918	only	-	Oct	27	2:00	0	S
 Rule	Edm	1919	only	-	May	27	2:00	0	S
 Rule	Edm	1920	1923	-	Apr	lastSun	2:00	1:00	D
 Rule	Edm	1920	only	-	Oct	lastSun	2:00	0	S
@@ -1795,9 +1812,68 @@ Zone America/Edmonton	-7:33:52 -	LMT	190
 # Dawson Creek uses MST.  Much of east BC is like Edmonton.
 # Matthews and Vincent (1998) write that Creston is like Dawson Creek.
 
+# It seems though that (re: Creston) is not entirely correct:
+
+# From Chris Walton (2011-12-01):
+# There are two areas within the Canadian province of British Columbia
+# that do not currently observe daylight saving:
+# a) The Creston Valley (includes the town of Creston and surrounding area)
+# b) The eastern half of the Peace River Regional District
+# (includes the cities of Dawson Creek and Fort St. John)
+
+# Earlier this year I stumbled across a detailed article about the time
+# keeping history of Creston; it was written by Tammy Hardwick who is the
+# manager of the Creston & District Museum. The article was written in May 2009.
+# 
+# http://www.ilovecreston.com/?p=articles&t=spec&ar=260
+# 
+# According to the article, Creston has not changed its clocks since June 1918.
+# i.e. Creston has been stuck on UTC-7 for 93 years.
+# Dawson Creek, on the other hand, changed its clocks as recently as April 1972.
+
+# Unfortunately the exact date for the time change in June 1918 remains
+# unknown and will be difficult to ascertain.  I e-mailed Tammy a few months
+# ago to ask if Sunday June 2 was a reasonable guess.  She said it was just
+# as plausible as any other date (in June).  She also said that after writing the
+# article she had discovered another time change in 1916; this is the subject
+# of another article which she wrote in October 2010.
+# 
+# http://www.creston.museum.bc.ca/index.php?module=comments&uop=view_comment&cm+id=56
+# 
+
+# Here is a summary of the three clock change events in Creston's history:
+# 1. 1884 or 1885: adoption of Mountain Standard Time (GMT-7)
+# Exact date unknown
+# 2. Oct 1916: switch to Pacific Standard Time (GMT-8) 
+# Exact date in October unknown;  Sunday October 1 is a reasonable guess.
+# 3. June 1918: switch to Pacific Daylight Time (GMT-7)
+# Exact date in June unknown; Sunday June 2 is a reasonable guess.
+# note#1:
+# On Oct 27/1918 when daylight saving ended in the rest of Canada,
+# Creston did not change its clocks.
+# note#2:
+# During WWII when the Federal Government legislated a mandatory clock change,
+# Creston did not oblige.
+# note#3:
+# There is no guarantee that Creston will remain on Mountain Standard Time
+# (UTC-7) forever.
+# The subject was debated at least once this year by the town Council.
+# 
+# http://www.bclocalnews.com/kootenay_rockies/crestonvalleyadvance/news/116760809.html
+# 
+
+# During a period WWII, summer time (Daylight saying) was mandatory in Canada.
+# In Creston, that was handled by shifting the area to PST (-8:00) then applying
+# summer time to cause the offset to be -7:00, the same as it had been before
+# the change.  It can be argued that the timezone abbreviation during this
+# period should be PDT rather than MST, but that doesn't seem important enough
+# (to anyone) to further complicate the rules.
+
+# The transition dates (and times) are guesses.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Vanc	1918	only	-	Apr	14	2:00	1:00	D
-Rule	Vanc	1918	only	-	Oct	31	2:00	0	S
+Rule	Vanc	1918	only	-	Oct	27	2:00	0	S
 Rule	Vanc	1942	only	-	Feb	 9	2:00	1:00	W # War
 Rule	Vanc	1945	only	-	Aug	14	23:00u	1:00	P # Peace
 Rule	Vanc	1945	only	-	Sep	30	2:00	0	S
@@ -1813,7 +1889,10 @@ Zone America/Dawson_Creek -8:00:56 -	LMT
 			-8:00	Canada	P%sT	1947
 			-8:00	Vanc	P%sT	1972 Aug 30 2:00
 			-7:00	-	MST
-
+Zone America/Creston	-7:46:04 -	LMT	1884
+			-7:00	-	MST	1916 Oct 1
+			-8:00	-	PST	1918 Jun 2
+			-7:00	-	MST
 
 # Northwest Territories, Nunavut, Yukon
 

Modified: stable/8/share/zoneinfo/southamerica
==============================================================================
--- stable/8/share/zoneinfo/southamerica	Sun Mar 25 02:18:22 2012	(r233447)
+++ stable/8/share/zoneinfo/southamerica	Sun Mar 25 02:19:02 2012	(r233448)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.52
+# @(#)southamerica	8.53
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1218,6 +1218,28 @@ Zone America/Rio_Branco	-4:31:12 -	LMT	1
 # August, not in October as they have since 1968. This is a pilot plan
 # which will be reevaluated in 2012.
 
+# From Mauricio Parada (2012-02-22), translated by Glenn Eychaner (2012-02-23):
+# As stated in the website of the Chilean Energy Ministry
+# http://www.minenergia.cl/ministerio/noticias/generales/gobierno-anuncia-fechas-de-cambio-de.html
+# The Chilean Government has decided to postpone the entrance into winter time
+# (to leave DST) from March 11 2012 to April 28th 2012. The decision has not
+# been yet formalized but it will within the next days.
+# Quote from the website communication:
+#
+# 6. For the year 2012, the dates of entry into winter time will be as follows:
+# a. Saturday April 28, 2012, clocks should go back 60 minutes; that is, at
+# 23:59:59, instead of passing to 0:00, the time should be adjusted to be 23:00
+# of the same day.
+# b. Saturday, September 1, 2012, clocks should go forward 60 minutes; that is,
+# at 23:59:59, instead of passing to 0:00, the time should be adjusted to be
+# 01:00 on September 2.
+#
+# Note that...this is yet another "temporary" change that will be reevaluated
+# AGAIN in 2013.
+
+# NOTE: ChileAQ rules for Antarctic bases are stored separately in the
+# 'antarctica' file.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Chile	1927	1932	-	Sep	 1	0:00	1:00	S
 Rule	Chile	1928	1932	-	Apr	 1	0:00	0	-
@@ -1248,8 +1270,6 @@ Rule	Chile	1998	only	-	Mar	Sun>=9	3:00u	
 Rule	Chile	1998	only	-	Sep	27	4:00u	1:00	S
 Rule	Chile	1999	only	-	Apr	 4	3:00u	0	-
 Rule	Chile	1999	2010	-	Oct	Sun>=9	4:00u	1:00	S
-Rule	Chile	2011	only	-	Aug	Sun>=16	4:00u	1:00	S
-Rule	Chile	2012	max	-	Oct	Sun>=9	4:00u	1:00	S
 Rule	Chile	2000	2007	-	Mar	Sun>=9	3:00u	0	-
 # N.B.: the end of March 29 in Chile is March 30 in Universal time,
 # which is used below in specifying the transition.
@@ -1257,7 +1277,11 @@ Rule	Chile	2008	only	-	Mar	30	3:00u	0	-
 Rule	Chile	2009	only	-	Mar	Sun>=9	3:00u	0	-
 Rule	Chile	2010	only	-	Apr	Sun>=1	3:00u	0	-
 Rule	Chile	2011	only	-	May	Sun>=2	3:00u	0	-
-Rule	Chile	2012	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2011	only	-	Aug	Sun>=16	4:00u	1:00	S
+Rule	Chile	2012	only	-	Apr	Sun>=23	3:00u	0	-
+Rule	Chile	2012	only	-	Sep	Sun>=2	4:00u	1:00	S
+Rule	Chile	2013	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2013	max	-	Oct	Sun>=9	4:00u	1:00	S
 # IATA SSIM anomalies: (1992-02) says 1992-03-14;
 # (1996-09) says 1998-03-08.  Ignore these.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1403,6 +1427,21 @@ Zone Pacific/Galapagos	-5:58:24 -	LMT	19
 # will not revert to local mean time, but clocks will remain on Summer
 # time (UTC/GMT - 3 hours) throughout the whole of 2011.  Any long term
 # change to local time following the trial period will be notified.
+#
+# From Andrew Newman (2012-02-24)
+# A letter from Justin McPhee, Chief Executive,
+# Cable & Wireless Falkland Islands (dated 2012-02-22)
+# states...
+#   The current Atlantic/Stanley entry under South America expects the
+#   clocks to go back to standard Falklands Time (FKT) on the 15th April.
+#   The database entry states that in 2011 Stanley was staying on fixed
+#   summer time on a trial basis only.  FIG need to contact IANA and/or
+#   the maintainers of the database to inform them we're adopting
+#   the same policy this year and suggest recommendations for future years.
+#
+# For now we will assume permanent summer time for the Falklands
+# until advised differently (to apply for 2012 and beyond, after the 2011
+# experiment was apparently successful.)
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Falk	1937	1938	-	Sep	lastSun	0:00	1:00	S
 Rule	Falk	1938	1942	-	Mar	Sun>=19	0:00	0	-
@@ -1415,14 +1454,14 @@ Rule	Falk	1984	only	-	Sep	16	0:00	1:00	S
 Rule	Falk	1985	2000	-	Sep	Sun>=9	0:00	1:00	S
 Rule	Falk	1986	2000	-	Apr	Sun>=16	0:00	0	-
 Rule	Falk	2001	2010	-	Apr	Sun>=15	2:00	0	-
-Rule	Falk	2012	max	-	Apr	Sun>=15	2:00	0	-
-Rule	Falk	2001	max	-	Sep	Sun>=1	2:00	1:00	S
+Rule	Falk	2001	2010	-	Sep	Sun>=1	2:00	1:00	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Atlantic/Stanley	-3:51:24 -	LMT	1890
 			-3:51:24 -	SMT	1912 Mar 12  # Stanley Mean Time
 			-4:00	Falk	FK%sT	1983 May     # Falkland Is Time
 			-3:00	Falk	FK%sT	1985 Sep 15
-			-4:00	Falk	FK%sT
+			-4:00	Falk	FK%sT	2010 Sep 5 02:00
+			-3:00	-	FKST
 
 # French Guiana
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Sun Mar 25 02:18:22 2012	(r233447)
+++ stable/8/share/zoneinfo/zone.tab	Sun Mar 25 02:19:02 2012	(r233448)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.52
+# @(#)zone.tab	8.54
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -131,6 +131,7 @@ CA	+5333-11328	America/Edmonton	Mountain
 CA	+690650-1050310	America/Cambridge_Bay	Mountain Time - west Nunavut
 CA	+6227-11421	America/Yellowknife	Mountain Time - central Northwest Territories
 CA	+682059-1334300	America/Inuvik	Mountain Time - west Northwest Territories
+CA	+4906-11631	America/Creston		Mountain Standard Time - Creston, British Columbia
 CA	+5946-12014	America/Dawson_Creek	Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
 CA	+4916-12307	America/Vancouver	Pacific Time - west British Columbia
 CA	+6043-13503	America/Whitehorse	Pacific Time - south Yukon
@@ -333,7 +334,7 @@ RS	+4450+02030	Europe/Belgrade
 RU	+5443+02030	Europe/Kaliningrad	Moscow-01 - Kaliningrad
 RU	+5545+03735	Europe/Moscow	Moscow+00 - west Russia
 RU	+4844+04425	Europe/Volgograd	Moscow+00 - Caspian Sea
-RU	+5312+05009	Europe/Samara	Moscow - Samara, Udmurtia
+RU	+5312+05009	Europe/Samara	Moscow+00 - Samara, Udmurtia
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Mar 25 11:43:00 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2761F106566B;
	Sun, 25 Mar 2012 11:43:00 +0000 (UTC)
	(envelope-from bschmidt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 121B48FC19;
	Sun, 25 Mar 2012 11:43:00 +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 q2PBgxoD079864;
	Sun, 25 Mar 2012 11:42:59 GMT
	(envelope-from bschmidt@svn.freebsd.org)
Received: (from bschmidt@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2PBgxuv079862;
	Sun, 25 Mar 2012 11:42:59 GMT
	(envelope-from bschmidt@svn.freebsd.org)
Message-Id: <201203251142.q2PBgxuv079862@svn.freebsd.org>
From: Bernhard Schmidt 
Date: Sun, 25 Mar 2012 11:42:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233461 - stable/8/sys/dev/usb/wlan
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, 25 Mar 2012 11:43:00 -0000

Author: bschmidt
Date: Sun Mar 25 11:42:59 2012
New Revision: 233461
URL: http://svn.freebsd.org/changeset/base/233461

Log:
  MFC r233283:
  Load the firmware during init not attach, as a root filesystem might
  not yet be available. While here, also print the firmware version.
  
  Submitted by:	PseudoCylon

Modified:
  stable/8/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/usb/wlan/if_run.c
==============================================================================
--- stable/8/sys/dev/usb/wlan/if_run.c	Sun Mar 25 10:59:40 2012	(r233460)
+++ stable/8/sys/dev/usb/wlan/if_run.c	Sun Mar 25 11:42:59 2012	(r233461)
@@ -598,12 +598,6 @@ run_attach(device_t self)
 	    sc->mac_ver, sc->mac_rev, run_get_rf(sc->rf_rev),
 	    sc->ntxchains, sc->nrxchains, ether_sprintf(sc->sc_bssid));
 
-	if ((error = run_load_microcode(sc)) != 0) {
-		device_printf(sc->sc_dev, "could not load 8051 microcode\n");
-		RUN_UNLOCK(sc);
-		goto detach;
-	}
-
 	RUN_UNLOCK(sc);
 
 	ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211);
@@ -1044,8 +1038,9 @@ run_load_microcode(struct run_softc *sc)
 		error = ETIMEDOUT;
 		goto fail;
 	}
-	device_printf(sc->sc_dev, "firmware %s loaded\n",
-	    (base == fw->data) ? "RT2870" : "RT3071");
+	device_printf(sc->sc_dev, "firmware %s ver. %u.%u loaded\n",
+	    (base == fw->data) ? "RT2870" : "RT3071",
+	    *(base + 4092), *(base + 4093));
 
 fail:
 	firmware_put(fw, FIRMWARE_UNLOAD);
@@ -4598,6 +4593,11 @@ run_init_locked(struct run_softc *sc)
 
 	run_stop(sc);
 
+	if (run_load_microcode(sc) != 0) {
+		device_printf(sc->sc_dev, "could not load 8051 microcode\n");
+		goto fail;
+	}
+
 	for (ntries = 0; ntries < 100; ntries++) {
 		if (run_read(sc, RT2860_ASIC_VER_ID, &tmp) != 0)
 			goto fail;

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Mar 25 16:24:53 2012
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 CE5BF106566C;
	Sun, 25 Mar 2012 16:24:53 +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 B944B8FC15;
	Sun, 25 Mar 2012 16:24:53 +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 q2PGOrPT089894;
	Sun, 25 Mar 2012 16:24:53 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2PGOrUA089892;
	Sun, 25 Mar 2012 16:24:53 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203251624.q2PGOrUA089892@svn.freebsd.org>
From: Marius Strobl 
Date: Sun, 25 Mar 2012 16:24:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233469 - in stable/8/sys: boot/common i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sun, 25 Mar 2012 16:24:54 -0000

Author: marius
Date: Sun Mar 25 16:24:53 2012
New Revision: 233469
URL: http://svn.freebsd.org/changeset/base/233469

Log:
  MFC: r233105
  
  Declare some variables static in order to reduce the object size and
  redo r232822 (MFC'ed to stable/8 in 232963) in a less hackish way.

Modified:
  stable/8/sys/boot/common/ufsread.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/boot/common/ufsread.c
==============================================================================
--- stable/8/sys/boot/common/ufsread.c	Sun Mar 25 16:24:42 2012	(r233468)
+++ stable/8/sys/boot/common/ufsread.c	Sun Mar 25 16:24:53 2012	(r233469)
@@ -46,8 +46,6 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include 
-
 #include 
 #include 
 #include 
@@ -96,7 +94,7 @@ static uint32_t fs_off;
 static __inline uint8_t
 fsfind(const char *name, ino_t * ino)
 {
-	char buf[DEV_BSIZE];
+	static char buf[DEV_BSIZE];
 	struct direct *d;
 	char *s;
 	ssize_t n;
@@ -121,7 +119,7 @@ fsfind(const char *name, ino_t * ino)
 static ino_t
 lookup(const char *path)
 {
-	char name[MAXNAMLEN + 1];
+	static char name[MAXNAMLEN + 1];
 	const char *s;
 	ino_t ino;
 	ssize_t n;
@@ -169,18 +167,19 @@ fsread(ino_t inode, void *buf, size_t nb
 {
 #ifndef UFS2_ONLY
 	static struct ufs1_dinode dp1;
+	ufs1_daddr_t addr1;
 #endif
 #ifndef UFS1_ONLY
 	static struct ufs2_dinode dp2;
 #endif
+	static struct fs fs;
 	static ino_t inomap;
 	char *blkbuf;
 	void *indbuf;
-	struct fs fs;
 	char *s;
 	size_t n, nb, size, off, vboff;
 	ufs_lbn_t lbn;
-	ufs2_daddr_t addr, vbaddr;
+	ufs2_daddr_t addr2, vbaddr;
 	static ufs2_daddr_t blkmap, indmap;
 	u_int u;
 
@@ -251,12 +250,12 @@ fsread(ino_t inode, void *buf, size_t nb
 		lbn = lblkno(&fs, fs_off);
 		off = blkoff(&fs, fs_off);
 		if (lbn < NDADDR) {
-			addr = DIP(di_db[lbn]);
+			addr2 = DIP(di_db[lbn]);
 		} else if (lbn < NDADDR + NINDIR(&fs)) {
 			n = INDIRPERVBLK(&fs);
-			addr = DIP(di_ib[0]);
+			addr2 = DIP(di_ib[0]);
 			u = (u_int)(lbn - NDADDR) / n * DBPERVBLK;
-			vbaddr = fsbtodb(&fs, addr) + u;
+			vbaddr = fsbtodb(&fs, addr2) + u;
 			if (indmap != vbaddr) {
 				if (dskread(indbuf, vbaddr, DBPERVBLK))
 					return -1;
@@ -264,36 +263,24 @@ fsread(ino_t inode, void *buf, size_t nb
 			}
 			n = (lbn - NDADDR) & (n - 1);
 #if defined(UFS1_ONLY)
-#if BYTE_ORDER == BIG_ENDIAN
-			memcpy((char *)&addr + sizeof(addr) -
-			    sizeof(ufs1_daddr_t), (ufs1_daddr_t *)indbuf + n,
-			    sizeof(ufs1_daddr_t));
-#else
-			memcpy(&addr, (ufs1_daddr_t *)indbuf + n,
+			memcpy(&addr1, (ufs1_daddr_t *)indbuf + n,
 			    sizeof(ufs1_daddr_t));
-#endif
+			addr2 = addr1;
 #elif defined(UFS2_ONLY)
-			memcpy(&addr, (ufs2_daddr_t *)indbuf + n,
+			memcpy(&addr2, (ufs2_daddr_t *)indbuf + n,
 			    sizeof(ufs2_daddr_t));
 #else
-			if (fs.fs_magic == FS_UFS1_MAGIC)
-#if BYTE_ORDER == BIG_ENDIAN
-				memcpy((char *)&addr + sizeof(addr) -
-				    sizeof(ufs1_daddr_t),
-				    (ufs1_daddr_t *)indbuf + n,
-			    	sizeof(ufs1_daddr_t));
-#else
-				memcpy(&addr, (ufs1_daddr_t *)indbuf + n,
+			if (fs.fs_magic == FS_UFS1_MAGIC) {
+				memcpy(&addr1, (ufs1_daddr_t *)indbuf + n,
 				    sizeof(ufs1_daddr_t));
-#endif
-			else
-				memcpy(&addr, (ufs2_daddr_t *)indbuf + n,
+				addr2 = addr1;
+			} else
+				memcpy(&addr2, (ufs2_daddr_t *)indbuf + n,
 				    sizeof(ufs2_daddr_t));
 #endif
-		} else {
+		} else
 			return -1;
-		}
-		vbaddr = fsbtodb(&fs, addr) + (off >> VBLKSHIFT) * DBPERVBLK;
+		vbaddr = fsbtodb(&fs, addr2) + (off >> VBLKSHIFT) * DBPERVBLK;
 		vboff = off & VBLKMASK;
 		n = sblksize(&fs, size, lbn) - (off & ~VBLKMASK);
 		if (n > VBLKSIZE)

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Mar 25 20:07:51 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 17FD2106566C;
	Sun, 25 Mar 2012 20:07:51 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 028148FC1D;
	Sun, 25 Mar 2012 20:07:51 +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 q2PK7oAG097594;
	Sun, 25 Mar 2012 20:07:50 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2PK7ocS097592;
	Sun, 25 Mar 2012 20:07:50 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201203252007.q2PK7ocS097592@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sun, 25 Mar 2012 20:07:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233476 - stable/8/lib/libc/gen
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, 25 Mar 2012 20:07:51 -0000

Author: jilles
Date: Sun Mar 25 20:07:50 2012
New Revision: 233476
URL: http://svn.freebsd.org/changeset/base/233476

Log:
  MFC r233130: fts(3): Document cases where FTS_NOCHDIR is set implicitly.
  
  PR:		docs/166091
  Submitted by:	Matthew Story

Modified:
  stable/8/lib/libc/gen/fts.3
Directory Properties:
  stable/8/lib/libc/   (props changed)

Modified: stable/8/lib/libc/gen/fts.3
==============================================================================
--- stable/8/lib/libc/gen/fts.3	Sun Mar 25 20:03:13 2012	(r233475)
+++ stable/8/lib/libc/gen/fts.3	Sun Mar 25 20:07:50 2012	(r233476)
@@ -28,7 +28,7 @@
 .\"     @(#)fts.3	8.5 (Berkeley) 4/16/94
 .\" $FreeBSD$
 .\"
-.Dd November 25, 2009
+.Dd March 18, 2012
 .Dt FTS 3
 .Os
 .Sh NAME
@@ -798,3 +798,13 @@ functions were introduced in
 principally to provide for alternative interfaces to the
 .Nm
 functionality using different data structures.
+.Sh BUGS
+The 
+.Fn fts_open
+function will automatically set the
+.Dv FTS_NOCHDIR
+option if the 
+.Dv FTS_LOGICAL
+option is provided, or if it cannot 
+.Xr open 2
+the current directory.

From owner-svn-src-stable-8@FreeBSD.ORG  Sun Mar 25 20:09:03 2012
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 01CE61065672;
	Sun, 25 Mar 2012 20:09:03 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E06098FC23;
	Sun, 25 Mar 2012 20:09:02 +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 q2PK92cY097686;
	Sun, 25 Mar 2012 20:09:02 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2PK92fF097684;
	Sun, 25 Mar 2012 20:09:02 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201203252009.q2PK92fF097684@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sun, 25 Mar 2012 20:09:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233477 - stable/8/lib/libc/gen
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, 25 Mar 2012 20:09:03 -0000

Author: jilles
Date: Sun Mar 25 20:09:02 2012
New Revision: 233477
URL: http://svn.freebsd.org/changeset/base/233477

Log:
  MFC r233132: fts(3): Mention that FTS_NOCHDIR imposes {PATH_MAX} limits on
  the returned pathnames.
  
  With the current API (no *at functions), FTS_NOCHDIR requires that the
  fts_accpath start with the original path passed to fts_open(); therefore,
  the depth that can be reached is limited by the {PATH_MAX} constraint on
  this pathname.

Modified:
  stable/8/lib/libc/gen/fts.3
Directory Properties:
  stable/8/lib/libc/   (props changed)

Modified: stable/8/lib/libc/gen/fts.3
==============================================================================
--- stable/8/lib/libc/gen/fts.3	Sun Mar 25 20:07:50 2012	(r233476)
+++ stable/8/lib/libc/gen/fts.3	Sun Mar 25 20:09:02 2012	(r233477)
@@ -419,14 +419,17 @@ be provided to the
 .Fn fts_open
 function.
 .It Dv FTS_NOCHDIR
-As a performance optimization, the
+To allow descending to arbitrary depths
+(independent of
+.Brq Dv PATH_MAX )
+and improve performance, the
 .Nm
 functions change directories as they walk the file hierarchy.
 This has the side-effect that an application cannot rely on being
 in any particular directory during the traversal.
 The
 .Dv FTS_NOCHDIR
-option turns off this optimization, and the
+option turns off this feature, and the
 .Nm
 functions will not change the current directory.
 Note that applications should not themselves change their current directory

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Mar 26 01:16:34 2012
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 F14AC106564A;
	Mon, 26 Mar 2012 01:16:34 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DC6F38FC18;
	Mon, 26 Mar 2012 01:16:34 +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 q2Q1GYJA007507;
	Mon, 26 Mar 2012 01:16:34 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2Q1GYlt007505;
	Mon, 26 Mar 2012 01:16:34 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203260116.q2Q1GYlt007505@svn.freebsd.org>
From: Eitan Adler 
Date: Mon, 26 Mar 2012 01:16:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233482 - stable/8/lib/libc/net
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 26 Mar 2012 01:16:35 -0000

Author: eadler
Date: Mon Mar 26 01:16:34 2012
New Revision: 233482
URL: http://svn.freebsd.org/changeset/base/233482

Log:
  MFC r233138:
  	 draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007
  
  PR:		phk
  Approved by:	cperciva (implicit)

Modified:
  stable/8/lib/libc/net/getnameinfo.3
Directory Properties:
  stable/8/lib/libc/   (props changed)

Modified: stable/8/lib/libc/net/getnameinfo.3
==============================================================================
--- stable/8/lib/libc/net/getnameinfo.3	Mon Mar 26 01:15:38 2012	(r233481)
+++ stable/8/lib/libc/net/getnameinfo.3	Mon Mar 26 01:16:34 2012	(r233482)
@@ -135,7 +135,7 @@ and
 .El
 .Pp
 This implementation allows numeric IPv6 address notation with scope identifier,
-as documented in chapter 11 of draft-ietf-ipv6-scoping-arch-02.txt.
+as documented in chapter 11 of RFC 4007.
 IPv6 link-local address will appear as a string like
 .Dq Li fe80::1%ne0 .
 Refer to

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Mar 26 03:48:22 2012
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 2DFF8106564A;
	Mon, 26 Mar 2012 03:48:22 +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 182FE8FC1D;
	Mon, 26 Mar 2012 03:48: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 q2Q3mL2O012980;
	Mon, 26 Mar 2012 03:48:21 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2Q3mLVf012977;
	Mon, 26 Mar 2012 03:48:21 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201203260348.q2Q3mLVf012977@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Mon, 26 Mar 2012 03:48: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: r233487 - in stable/8/sys: dev/sf i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 26 Mar 2012 03:48:22 -0000

Author: yongari
Date: Mon Mar 26 03:48:21 2012
New Revision: 233487
URL: http://svn.freebsd.org/changeset/base/233487

Log:
  MFC r232019,232021,232025,232027,232029,232040:
  r232019:
    Give hardware chance to drain active DMA cycles.
  
  r232021:
    If there are not enough RX buffers, release partially allocated RX
    buffers.
  
  r232025:
    Introduce sf_ifmedia_upd_locked() and have driver reset PHY before
    switching to selected media.  While here, set if_drv_flags before
    switching to selected media.
  
  r232027:
    No need to reprogram hardware RX filter when driver is not running.
  
  r232029:
    Remove taskqueue based MII stat change handler.
    Driver does not need deferred link state change processing.
    While I'm here, do not report current link status if interface is
    not UP.
  
  r232040:
    Add check for IFF_DRV_RUNNING flag after serving an interrupt and
    don't give RX path more priority than TX path.
    Also remove infinite loop in interrupt handler and limit number of
    iteration to 32. This change addresses system load fluctuations
    under high network load.

Modified:
  stable/8/sys/dev/sf/if_sf.c
  stable/8/sys/dev/sf/if_sfreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/sf/if_sf.c
==============================================================================
--- stable/8/sys/dev/sf/if_sf.c	Mon Mar 26 03:45:46 2012	(r233486)
+++ stable/8/sys/dev/sf/if_sf.c	Mon Mar 26 03:48:21 2012	(r233487)
@@ -96,7 +96,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -172,6 +171,7 @@ static void sf_init_locked(struct sf_sof
 static void sf_stop(struct sf_softc *);
 static void sf_watchdog(struct sf_softc *);
 static int sf_ifmedia_upd(struct ifnet *);
+static int sf_ifmedia_upd_locked(struct ifnet *);
 static void sf_ifmedia_sts(struct ifnet *, struct ifmediareq *);
 static void sf_reset(struct sf_softc *);
 static int sf_dma_alloc(struct sf_softc *);
@@ -191,7 +191,6 @@ static uint8_t sf_read_eeprom(struct sf_
 static int sf_miibus_readreg(device_t, int, int);
 static int sf_miibus_writereg(device_t, int, int, int);
 static void sf_miibus_statchg(device_t);
-static void sf_link_task(void *, int);
 #ifdef DEVICE_POLLING
 static int sf_poll(struct ifnet *ifp, enum poll_cmd cmd, int count);
 #endif
@@ -393,30 +392,16 @@ static void
 sf_miibus_statchg(device_t dev)
 {
 	struct sf_softc		*sc;
-
-	sc = device_get_softc(dev);
-	taskqueue_enqueue(taskqueue_swi, &sc->sf_link_task);
-}
-
-static void
-sf_link_task(void *arg, int pending)
-{
-	struct sf_softc		*sc;
 	struct mii_data		*mii;
 	struct ifnet		*ifp;
 	uint32_t		val;
 
-	sc = (struct sf_softc *)arg;
-
-	SF_LOCK(sc);
-
+	sc = device_get_softc(dev);
 	mii = device_get_softc(sc->sf_miibus);
 	ifp = sc->sf_ifp;
 	if (mii == NULL || ifp == NULL ||
-	    (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
-		SF_UNLOCK(sc);
+	    (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
 		return;
-	}
 
 	if (mii->mii_media_status & IFM_ACTIVE) {
 		if (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)
@@ -453,8 +438,6 @@ sf_link_task(void *arg, int pending)
 	else
 		val &= ~SF_TIMER_TIMES_TEN;
 	csr_write_4(sc, SF_TIMER_CTL, val);
-
-	SF_UNLOCK(sc);
 }
 
 static void
@@ -523,20 +506,27 @@ static int
 sf_ifmedia_upd(struct ifnet *ifp)
 {
 	struct sf_softc		*sc;
-	struct mii_data		*mii;
-	struct mii_softc        *miisc;
 	int			error;
 
 	sc = ifp->if_softc;
 	SF_LOCK(sc);
+	error = sf_ifmedia_upd_locked(ifp);
+	SF_UNLOCK(sc);
+	return (error);
+}
+
+static int
+sf_ifmedia_upd_locked(struct ifnet *ifp)
+{
+	struct sf_softc		*sc;
+	struct mii_data		*mii;
+	struct mii_softc        *miisc;
 
+	sc = ifp->if_softc;
 	mii = device_get_softc(sc->sf_miibus);
 	LIST_FOREACH(miisc, &mii->mii_phys, mii_list)
 		mii_phy_reset(miisc);
-	error = mii_mediachg(mii);
-	SF_UNLOCK(sc);
-
-	return (error);
+	return (mii_mediachg(mii));
 }
 
 /*
@@ -550,8 +540,12 @@ sf_ifmedia_sts(struct ifnet *ifp, struct
 
 	sc = ifp->if_softc;
 	SF_LOCK(sc);
-	mii = device_get_softc(sc->sf_miibus);
+	if ((ifp->if_flags & IFF_UP) == 0) {
+		SF_UNLOCK(sc);
+		return;
+	}
 
+	mii = device_get_softc(sc->sf_miibus);
 	mii_pollstat(mii);
 	ifmr->ifm_active = mii->mii_media_active;
 	ifmr->ifm_status = mii->mii_media_status;
@@ -592,7 +586,8 @@ sf_ioctl(struct ifnet *ifp, u_long comma
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:
 		SF_LOCK(sc);
-		sf_rxfilter(sc);
+		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+			sf_rxfilter(sc);
 		SF_UNLOCK(sc);
 		break;
 	case SIOCGIFMEDIA:
@@ -744,7 +739,6 @@ sf_attach(device_t dev)
 	mtx_init(&sc->sf_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
 	    MTX_DEF);
 	callout_init_mtx(&sc->sf_co, &sc->sf_mtx, 0);
-	TASK_INIT(&sc->sf_link_task, 0, sf_link_task, sc);
 
 	/*
 	 * Map control/status registers.
@@ -946,7 +940,6 @@ sf_detach(device_t dev)
 		sf_stop(sc);
 		SF_UNLOCK(sc);
 		callout_drain(&sc->sf_co);
-		taskqueue_drain(taskqueue_swi, &sc->sf_link_task);
 		if (ifp != NULL)
 			ether_ifdetach(ifp);
 	}
@@ -1548,7 +1541,9 @@ sf_rxeof(struct sf_softc *sc)
 	 */
 	eidx = 0;
 	prog = 0;
-	for (cons = sc->sf_cdata.sf_rxc_cons; ; SF_INC(cons, SF_RX_CLIST_CNT)) {
+	for (cons = sc->sf_cdata.sf_rxc_cons;
+	    (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0;
+	    SF_INC(cons, SF_RX_CLIST_CNT)) {
 		cur_cmp = &sc->sf_rdata.sf_rx_cring[cons];
 		status = le32toh(cur_cmp->sf_rx_status1);
 		if (status == 0)
@@ -1851,6 +1846,7 @@ sf_intr(void *arg)
 	struct sf_softc		*sc;
 	struct ifnet		*ifp;
 	uint32_t		status;
+	int			cnt;
 
 	sc = (struct sf_softc *)arg;
 	SF_LOCK(sc);
@@ -1869,13 +1865,13 @@ sf_intr(void *arg)
 	if ((ifp->if_capenable & IFCAP_POLLING) != 0)
 		goto done_locked;
 #endif
-	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
-		goto done_locked;
 
 	/* Disable interrupts. */
 	csr_write_4(sc, SF_IMR, 0x00000000);
 
-	for (; (status & SF_INTRS) != 0;) {
+	for (cnt = 32; (status & SF_INTRS) != 0;) {
+		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+			break;
 		if ((status & SF_ISR_RXDQ1_DMADONE) != 0)
 			sf_rxeof(sc);
 
@@ -1910,15 +1906,19 @@ sf_intr(void *arg)
 #endif
 			}
 		}
+		if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
+			sf_start_locked(ifp);
+		if (--cnt <= 0)
+			break;
 		/* Reading the ISR register clears all interrrupts. */
 		status = csr_read_4(sc, SF_ISR);
 	}
 
-	/* Re-enable interrupts. */
-	csr_write_4(sc, SF_IMR, SF_INTRS);
+	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
+		/* Re-enable interrupts. */
+		csr_write_4(sc, SF_IMR, SF_INTRS);
+	}
 
-	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
-		sf_start_locked(ifp);
 done_locked:
 	SF_UNLOCK(sc);
 }
@@ -2010,6 +2010,7 @@ sf_init_locked(struct sf_softc *sc)
 	if (sf_init_rx_ring(sc) == ENOBUFS) {
 		device_printf(sc->sf_dev,
 		    "initialization failed: no memory for rx buffers\n");
+		sf_stop(sc);
 		return;
 	}
 
@@ -2135,12 +2136,12 @@ sf_init_locked(struct sf_softc *sc)
 	else
 		SF_CLRBIT(sc, SF_GEN_ETH_CTL, SF_ETHCTL_RXGFP_ENB);
 
-	sc->sf_link = 0;
-	mii_mediachg(mii);
-
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 
+	sc->sf_link = 0;
+	sf_ifmedia_upd_locked(ifp);
+
 	callout_reset(&sc->sf_co, hz, sf_tick, sc);
 }
 
@@ -2329,6 +2330,9 @@ sf_stop(struct sf_softc *sc)
 	/* Disable Tx/Rx egine. */
 	csr_write_4(sc, SF_GEN_ETH_CTL, 0);
 
+	/* Give hardware chance to drain active DMA cycles. */
+	DELAY(1000);
+
 	csr_write_4(sc, SF_CQ_CONSIDX, 0);
 	csr_write_4(sc, SF_CQ_PRODIDX, 0);
 	csr_write_4(sc, SF_RXDQ_ADDR_Q1, 0);

Modified: stable/8/sys/dev/sf/if_sfreg.h
==============================================================================
--- stable/8/sys/dev/sf/if_sfreg.h	Mon Mar 26 03:45:46 2012	(r233486)
+++ stable/8/sys/dev/sf/if_sfreg.h	Mon Mar 26 03:48:21 2012	(r233487)
@@ -1083,7 +1083,6 @@ struct sf_softc {
 	int			sf_if_flags;
 	struct callout		sf_co;
 	int			sf_watchdog_timer;
-	struct task		sf_link_task;
 	int			sf_link;
 	int			sf_suspended;
 	int			sf_detach;

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Mar 26 03:55:45 2012
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 BF700106566C;
	Mon, 26 Mar 2012 03:55:45 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A97EB8FC0A;
	Mon, 26 Mar 2012 03:55:45 +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 q2Q3tjcU013366;
	Mon, 26 Mar 2012 03:55:45 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2Q3tjEY013362;
	Mon, 26 Mar 2012 03:55:45 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201203260355.q2Q3tjEY013362@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Mon, 26 Mar 2012 03:55:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233490 - in stable/8/sys: dev/re i386/conf pci
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 26 Mar 2012 03:55:46 -0000

Author: yongari
Date: Mon Mar 26 03:55:45 2012
New Revision: 233490
URL: http://svn.freebsd.org/changeset/base/233490

Log:
  MFC r232145:
    Use correct Config registers for RTL8139 family. Unlike RTL8168 and
    RTL810x family , RTL8139 has different register map for Config
    registers.
  
    While here, follow the lead of re(4) in WOL configuration.
     - Disable WOL_UCAST and WOL_MCAST capabilities by default.
     - Config5 register write does not need to unlock EEPROM access
       on RTL8139 family but unlocking EEPROM access does not affect
       its operation and make it consistent with re(4).
  
    Reported by:	Matt Renzelmann  mjr <> cs dot wisc dot edu

Modified:
  stable/8/sys/dev/re/if_re.c
  stable/8/sys/pci/if_rl.c
  stable/8/sys/pci/if_rlreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/re/if_re.c
==============================================================================
--- stable/8/sys/dev/re/if_re.c	Mon Mar 26 03:54:19 2012	(r233489)
+++ stable/8/sys/dev/re/if_re.c	Mon Mar 26 03:55:45 2012	(r233490)
@@ -1473,6 +1473,22 @@ re_attach(device_t dev)
 		break;
 	}
 
+	if (sc->rl_hwrev->rl_rev == RL_HWREV_8139CPLUS) {
+		sc->rl_cfg0 = RL_8139_CFG0;
+		sc->rl_cfg1 = RL_8139_CFG1;
+		sc->rl_cfg2 = 0;
+		sc->rl_cfg3 = RL_8139_CFG3;
+		sc->rl_cfg4 = RL_8139_CFG4;
+		sc->rl_cfg5 = RL_8139_CFG5;
+	} else {
+		sc->rl_cfg0 = RL_CFG0;
+		sc->rl_cfg1 = RL_CFG1;
+		sc->rl_cfg2 = RL_CFG2;
+		sc->rl_cfg3 = RL_CFG3;
+		sc->rl_cfg4 = RL_CFG4;
+		sc->rl_cfg5 = RL_CFG5;
+	}
+
 	/* Reset the adapter. */
 	RL_LOCK(sc);
 	re_reset(sc);
@@ -1480,12 +1496,12 @@ re_attach(device_t dev)
 
 	/* Enable PME. */
 	CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
-	cfg = CSR_READ_1(sc, RL_CFG1);
+	cfg = CSR_READ_1(sc, sc->rl_cfg1);
 	cfg |= RL_CFG1_PME;
-	CSR_WRITE_1(sc, RL_CFG1, cfg);
-	cfg = CSR_READ_1(sc, RL_CFG5);
+	CSR_WRITE_1(sc, sc->rl_cfg1, cfg);
+	cfg = CSR_READ_1(sc, sc->rl_cfg5);
 	cfg &= RL_CFG5_PME_STS;
-	CSR_WRITE_1(sc, RL_CFG5, cfg);
+	CSR_WRITE_1(sc, sc->rl_cfg5, cfg);
 	CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
 
 	if ((sc->rl_flags & RL_FLAG_PAR) != 0) {
@@ -2908,32 +2924,32 @@ re_set_jumbo(struct rl_softc *sc, int ju
 
 	CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_WRITECFG);
 	if (jumbo != 0) {
-		CSR_WRITE_1(sc, RL_CFG3, CSR_READ_1(sc, RL_CFG3) |
+		CSR_WRITE_1(sc, sc->rl_cfg3, CSR_READ_1(sc, sc->rl_cfg3) |
 		    RL_CFG3_JUMBO_EN0);
 		switch (sc->rl_hwrev->rl_rev) {
 		case RL_HWREV_8168DP:
 			break;
 		case RL_HWREV_8168E:
-			CSR_WRITE_1(sc, RL_CFG4, CSR_READ_1(sc, RL_CFG4) |
-			    0x01);
+			CSR_WRITE_1(sc, sc->rl_cfg4,
+			    CSR_READ_1(sc, sc->rl_cfg4) | 0x01);
 			break;
 		default:
-			CSR_WRITE_1(sc, RL_CFG4, CSR_READ_1(sc, RL_CFG4) |
-			    RL_CFG4_JUMBO_EN1);
+			CSR_WRITE_1(sc, sc->rl_cfg4,
+			    CSR_READ_1(sc, sc->rl_cfg4) | RL_CFG4_JUMBO_EN1);
 		}
 	} else {
-		CSR_WRITE_1(sc, RL_CFG3, CSR_READ_1(sc, RL_CFG3) &
+		CSR_WRITE_1(sc, sc->rl_cfg3, CSR_READ_1(sc, sc->rl_cfg3) &
 		    ~RL_CFG3_JUMBO_EN0);
 		switch (sc->rl_hwrev->rl_rev) {
 		case RL_HWREV_8168DP:
 			break;
 		case RL_HWREV_8168E:
-			CSR_WRITE_1(sc, RL_CFG4, CSR_READ_1(sc, RL_CFG4) &
-			    ~0x01);
+			CSR_WRITE_1(sc, sc->rl_cfg4,
+			    CSR_READ_1(sc, sc->rl_cfg4) & ~0x01);
 			break;
 		default:
-			CSR_WRITE_1(sc, RL_CFG4, CSR_READ_1(sc, RL_CFG4) &
-			    ~RL_CFG4_JUMBO_EN1);
+			CSR_WRITE_1(sc, sc->rl_cfg4,
+			    CSR_READ_1(sc, sc->rl_cfg4) & ~RL_CFG4_JUMBO_EN1);
 		}
 	}
 	CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
@@ -3046,7 +3062,7 @@ re_init_locked(struct rl_softc *sc)
 	if (sc->rl_hwrev->rl_rev == RL_HWREV_8169_8110SC ||
 	    sc->rl_hwrev->rl_rev == RL_HWREV_8169_8110SCE) {
 		reg = 0x000fff00;
-		if ((CSR_READ_1(sc, RL_CFG2) & RL_CFG2_PCI66MHZ) != 0)
+		if ((CSR_READ_1(sc, sc->rl_cfg2) & RL_CFG2_PCI66MHZ) != 0)
 			reg |= 0x000000ff;
 		if (sc->rl_hwrev->rl_rev == RL_HWREV_8169_8110SCE)
 			reg |= 0x00f00000;
@@ -3211,7 +3227,8 @@ re_init_locked(struct rl_softc *sc)
 	if (sc->rl_testmode)
 		return;
 
-	CSR_WRITE_1(sc, RL_CFG1, CSR_READ_1(sc, RL_CFG1) | RL_CFG1_DRVLOAD);
+	CSR_WRITE_1(sc, sc->rl_cfg1, CSR_READ_1(sc, sc->rl_cfg1) |
+	    RL_CFG1_DRVLOAD);
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
@@ -3744,19 +3761,19 @@ re_setwol(struct rl_softc *sc)
 	CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
 
 	/* Enable PME. */
-	v = CSR_READ_1(sc, RL_CFG1);
+	v = CSR_READ_1(sc, sc->rl_cfg1);
 	v &= ~RL_CFG1_PME;
 	if ((ifp->if_capenable & IFCAP_WOL) != 0)
 		v |= RL_CFG1_PME;
-	CSR_WRITE_1(sc, RL_CFG1, v);
+	CSR_WRITE_1(sc, sc->rl_cfg1, v);
 
-	v = CSR_READ_1(sc, RL_CFG3);
+	v = CSR_READ_1(sc, sc->rl_cfg3);
 	v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC);
 	if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0)
 		v |= RL_CFG3_WOL_MAGIC;
-	CSR_WRITE_1(sc, RL_CFG3, v);
+	CSR_WRITE_1(sc, sc->rl_cfg3, v);
 
-	v = CSR_READ_1(sc, RL_CFG5);
+	v = CSR_READ_1(sc, sc->rl_cfg5);
 	v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST |
 	    RL_CFG5_WOL_LANWAKE);
 	if ((ifp->if_capenable & IFCAP_WOL_UCAST) != 0)
@@ -3765,7 +3782,7 @@ re_setwol(struct rl_softc *sc)
 		v |= RL_CFG5_WOL_MCAST | RL_CFG5_WOL_BCAST;
 	if ((ifp->if_capenable & IFCAP_WOL) != 0)
 		v |= RL_CFG5_WOL_LANWAKE;
-	CSR_WRITE_1(sc, RL_CFG5, v);
+	CSR_WRITE_1(sc, sc->rl_cfg5, v);
 
 	/* Config register write done. */
 	CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
@@ -3801,17 +3818,17 @@ re_clrwol(struct rl_softc *sc)
 	/* Enable config register write. */
 	CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
 
-	v = CSR_READ_1(sc, RL_CFG3);
+	v = CSR_READ_1(sc, sc->rl_cfg3);
 	v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC);
-	CSR_WRITE_1(sc, RL_CFG3, v);
+	CSR_WRITE_1(sc, sc->rl_cfg3, v);
 
 	/* Config register write done. */
 	CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
 
-	v = CSR_READ_1(sc, RL_CFG5);
+	v = CSR_READ_1(sc, sc->rl_cfg5);
 	v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST);
 	v &= ~RL_CFG5_WOL_LANWAKE;
-	CSR_WRITE_1(sc, RL_CFG5, v);
+	CSR_WRITE_1(sc, sc->rl_cfg5, v);
 }
 
 static void

Modified: stable/8/sys/pci/if_rl.c
==============================================================================
--- stable/8/sys/pci/if_rl.c	Mon Mar 26 03:54:19 2012	(r233489)
+++ stable/8/sys/pci/if_rl.c	Mon Mar 26 03:55:45 2012	(r233490)
@@ -717,6 +717,13 @@ rl_attach(device_t dev)
 		goto fail;
 	}
 
+	sc->rl_cfg0 = RL_8139_CFG0;
+	sc->rl_cfg1 = RL_8139_CFG1;
+	sc->rl_cfg2 = 0;
+	sc->rl_cfg3 = RL_8139_CFG3;
+	sc->rl_cfg4 = RL_8139_CFG4;
+	sc->rl_cfg5 = RL_8139_CFG5;
+
 	/*
 	 * Reset the adapter. Only take the lock here as it's needed in
 	 * order to call rl_reset().
@@ -818,6 +825,7 @@ rl_attach(device_t dev)
 		}
 	}
 	ifp->if_capenable = ifp->if_capabilities;
+	ifp->if_capenable &= ~(IFCAP_WOL_UCAST | IFCAP_WOL_MCAST);
 #ifdef DEVICE_POLLING
 	ifp->if_capabilities |= IFCAP_POLLING;
 #endif
@@ -1754,7 +1762,7 @@ rl_init_locked(struct rl_softc *sc)
 	sc->rl_flags &= ~RL_FLAG_LINK;
 	mii_mediachg(mii);
 
-	CSR_WRITE_1(sc, RL_CFG1, RL_CFG1_DRVLOAD|RL_CFG1_FULLDUPLEX);
+	CSR_WRITE_1(sc, sc->rl_cfg1, RL_CFG1_DRVLOAD|RL_CFG1_FULLDUPLEX);
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
@@ -2055,22 +2063,19 @@ rl_setwol(struct rl_softc *sc)
 	CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
 
 	/* Enable PME. */
-	v = CSR_READ_1(sc, RL_CFG1);
+	v = CSR_READ_1(sc, sc->rl_cfg1);
 	v &= ~RL_CFG1_PME;
 	if ((ifp->if_capenable & IFCAP_WOL) != 0)
 		v |= RL_CFG1_PME;
-	CSR_WRITE_1(sc, RL_CFG1, v);
+	CSR_WRITE_1(sc, sc->rl_cfg1, v);
 
-	v = CSR_READ_1(sc, RL_CFG3);
+	v = CSR_READ_1(sc, sc->rl_cfg3);
 	v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC);
 	if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0)
 		v |= RL_CFG3_WOL_MAGIC;
-	CSR_WRITE_1(sc, RL_CFG3, v);
-
-	/* Config register write done. */
-	CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
+	CSR_WRITE_1(sc, sc->rl_cfg3, v);
 
-	v = CSR_READ_1(sc, RL_CFG5);
+	v = CSR_READ_1(sc, sc->rl_cfg5);
 	v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST);
 	v &= ~RL_CFG5_WOL_LANWAKE;
 	if ((ifp->if_capenable & IFCAP_WOL_UCAST) != 0)
@@ -2079,7 +2084,11 @@ rl_setwol(struct rl_softc *sc)
 		v |= RL_CFG5_WOL_MCAST | RL_CFG5_WOL_BCAST;
 	if ((ifp->if_capenable & IFCAP_WOL) != 0)
 		v |= RL_CFG5_WOL_LANWAKE;
-	CSR_WRITE_1(sc, RL_CFG5, v);
+	CSR_WRITE_1(sc, sc->rl_cfg5, v);
+
+	/* Config register write done. */
+	CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
+
 	/* Request PME if WOL is requested. */
 	pmstat = pci_read_config(sc->rl_dev, pmc + PCIR_POWER_STATUS, 2);
 	pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE);
@@ -2101,15 +2110,15 @@ rl_clrwol(struct rl_softc *sc)
 	/* Enable config register write. */
 	CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE);
 
-	v = CSR_READ_1(sc, RL_CFG3);
+	v = CSR_READ_1(sc, sc->rl_cfg3);
 	v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC);
-	CSR_WRITE_1(sc, RL_CFG3, v);
+	CSR_WRITE_1(sc, sc->rl_cfg3, v);
 
 	/* Config register write done. */
 	CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
 
-	v = CSR_READ_1(sc, RL_CFG5);
+	v = CSR_READ_1(sc, sc->rl_cfg5);
 	v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST);
 	v &= ~RL_CFG5_WOL_LANWAKE;
-	CSR_WRITE_1(sc, RL_CFG5, v);
+	CSR_WRITE_1(sc, sc->rl_cfg5, v);
 }

Modified: stable/8/sys/pci/if_rlreg.h
==============================================================================
--- stable/8/sys/pci/if_rlreg.h	Mon Mar 26 03:54:19 2012	(r233489)
+++ stable/8/sys/pci/if_rlreg.h	Mon Mar 26 03:55:45 2012	(r233490)
@@ -74,6 +74,14 @@
 #define	RL_TIMERCNT	0x0048		/* timer count register */
 #define	RL_MISSEDPKT	0x004C		/* missed packet counter */
 #define	RL_EECMD	0x0050		/* EEPROM command register */
+
+/* RTL8139/RTL8139C+ only */
+#define	RL_8139_CFG0	0x0051		/* config register #0 */
+#define	RL_8139_CFG1	0x0052		/* config register #1 */
+#define	RL_8139_CFG3	0x0059		/* config register #3 */
+#define	RL_8139_CFG4	0x005A		/* config register #4 */
+#define	RL_8139_CFG5	0x00D8		/* config register #5 */
+
 #define	RL_CFG0		0x0051		/* config register #0 */
 #define	RL_CFG1		0x0052		/* config register #1 */
 #define	RL_CFG2		0x0053		/* config register #2 */
@@ -873,6 +881,12 @@ struct rl_softc {
 	int			rl_eewidth;
 	int			rl_expcap;
 	int			rl_txthresh;
+	bus_size_t		rl_cfg0;
+	bus_size_t		rl_cfg1;
+	bus_size_t		rl_cfg2;
+	bus_size_t		rl_cfg3;
+	bus_size_t		rl_cfg4;
+	bus_size_t		rl_cfg5;
 	struct rl_chain_data	rl_cdata;
 	struct rl_list_data	rl_ldata;
 	struct callout		rl_stat_callout;

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Mar 26 04:29:07 2012
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 1DA0C106564A;
	Mon, 26 Mar 2012 04:29:07 +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 F29478FC19;
	Mon, 26 Mar 2012 04:29:06 +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 q2Q4T67J014551;
	Mon, 26 Mar 2012 04:29:06 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2Q4T6dW014548;
	Mon, 26 Mar 2012 04:29:06 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201203260429.q2Q4T6dW014548@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Mon, 26 Mar 2012 04:29:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233493 - in stable/8/sys: dev/mii dev/re i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 26 Mar 2012 04:29:07 -0000

Author: yongari
Date: Mon Mar 26 04:29:06 2012
New Revision: 233493
URL: http://svn.freebsd.org/changeset/base/233493

Log:
  MFC r232246:
    Prefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to
    extract a link status of PHY when parent driver is re(4).
    RGEPHY_MII_SSR register does not seem to report correct PHY status
    on some integrated PHYs used with re(4).
    Unfortunately, RealTek PHYs have no additional information to
    differentiate integrated PHYs from external ones so relying on PHY
    model number is not enough to know that.  However, it seems
    RGEPHY_MII_SSR register exists for external RealTek PHYs so
    checking parent driver would be good indication to know which PHY
    was used. In other words, for non-re(4) controllers, the PHY is
    external one and its revision number is greater than or equal to 2.
    This change fixes intermittent link UP/DOWN messages reported on
    RTL8169 controller.
  
    Also, mii_attach(9) is tried after setting interface name since
    rgephy(4) have to know parent driver name.
  
    PR:	kern/165509

Modified:
  stable/8/sys/dev/mii/rgephy.c
  stable/8/sys/dev/re/if_re.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/mii/rgephy.c
==============================================================================
--- stable/8/sys/dev/mii/rgephy.c	Mon Mar 26 04:27:01 2012	(r233492)
+++ stable/8/sys/dev/mii/rgephy.c	Mon Mar 26 04:29:06 2012	(r233493)
@@ -122,6 +122,8 @@ rgephy_attach(device_t dev)
 	LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
 
 	sc->mii_flags = miibus_get_flags(dev);
+	if (strcmp(ma->mii_data->mii_ifp->if_dname, "re") == 0)
+		sc->mii_flags |= MIIF_PHYPRIV0;
 	sc->mii_inst = mii->mii_instance++;
 	sc->mii_phy = ma->mii_phyno;
 	sc->mii_service = rgephy_service;
@@ -268,7 +270,8 @@ setit:
 		 * Check to see if we have link.  If we do, we don't
 		 * need to restart the autonegotiation process.
 		 */
-		if (rsc->mii_revision >= 2) {
+		if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 &&
+		    rsc->mii_revision >= 2) {
 			/* RTL8211B(L) */
 			reg = PHY_READ(sc, RGEPHY_MII_SSR);
 			if (reg & RGEPHY_SSR_LINK) {
@@ -325,7 +328,7 @@ rgephy_status(struct mii_softc *sc)
 	mii->mii_media_active = IFM_ETHER;
 
 	rsc = (struct rgephy_softc *)sc;
-	if (rsc->mii_revision >= 2) {
+	if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && rsc->mii_revision >= 2) {
 		ssr = PHY_READ(sc, RGEPHY_MII_SSR);
 		if (ssr & RGEPHY_SSR_LINK)
 			mii->mii_media_status |= IFM_ACTIVE;
@@ -355,7 +358,7 @@ rgephy_status(struct mii_softc *sc)
 		}
 	}
 
-	if (rsc->mii_revision >= 2) {
+	if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && rsc->mii_revision >= 2) {
 		ssr = PHY_READ(sc, RGEPHY_MII_SSR);
 		switch (ssr & RGEPHY_SSR_SPD_MASK) {
 		case RGEPHY_SSR_S1000:
@@ -517,7 +520,7 @@ rgephy_reset(struct mii_softc *sc)
 	uint16_t ssr;
 
 	rsc = (struct rgephy_softc *)sc;
-	if (rsc->mii_revision == 3) {
+	if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && rsc->mii_revision == 3) {
 		/* RTL8211C(L) */
 		ssr = PHY_READ(sc, RGEPHY_MII_SSR);
 		if ((ssr & RGEPHY_SSR_ALDPS) != 0) {

Modified: stable/8/sys/dev/re/if_re.c
==============================================================================
--- stable/8/sys/dev/re/if_re.c	Mon Mar 26 04:27:01 2012	(r233492)
+++ stable/8/sys/dev/re/if_re.c	Mon Mar 26 04:29:06 2012	(r233493)
@@ -1573,19 +1573,6 @@ re_attach(device_t dev)
 		re_gmii_writereg(dev, 1, 0x0e, 0);
 	}
 
-#define	RE_PHYAD_INTERNAL	 0
-
-	/* Do MII setup. */
-	phy = RE_PHYAD_INTERNAL;
-	if (sc->rl_type == RL_8169)
-		phy = 1;
-	error = mii_attach(dev, &sc->rl_miibus, ifp, re_ifmedia_upd,
-	    re_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, MIIF_DOPAUSE);
-	if (error != 0) {
-		device_printf(dev, "attaching PHYs failed\n");
-		goto fail;
-	}
-
 	ifp->if_softc = sc;
 	if_initname(ifp, device_get_name(dev), device_get_unit(dev));
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@@ -1610,6 +1597,19 @@ re_attach(device_t dev)
 
 	TASK_INIT(&sc->rl_inttask, 0, re_int_task, sc);
 
+#define	RE_PHYAD_INTERNAL	 0
+
+	/* Do MII setup. */
+	phy = RE_PHYAD_INTERNAL;
+	if (sc->rl_type == RL_8169)
+		phy = 1;
+	error = mii_attach(dev, &sc->rl_miibus, ifp, re_ifmedia_upd,
+	    re_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, MIIF_DOPAUSE);
+	if (error != 0) {
+		device_printf(dev, "attaching PHYs failed\n");
+		goto fail;
+	}
+
 	/*
 	 * Call MI attach routine.
 	 */

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Mar 26 04:37:43 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 5C3A9106566C;
	Mon, 26 Mar 2012 04:37:43 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3D3948FC19;
	Mon, 26 Mar 2012 04:37:43 +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 q2Q4bhs9015014;
	Mon, 26 Mar 2012 04:37:43 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2Q4bhb7015011;
	Mon, 26 Mar 2012 04:37:43 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201203260437.q2Q4bhb7015011@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Mon, 26 Mar 2012 04:37:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233496 - in stable/8/sys: dev/bge i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 26 Mar 2012 04:37:43 -0000

Author: yongari
Date: Mon Mar 26 04:37:42 2012
New Revision: 233496
URL: http://svn.freebsd.org/changeset/base/233496

Log:
  MFC r232848:
    Add workaround for PCI-X BCM5704 controller that live behind
    AMD-8131 PCI-X bridge.  The bridge seems to reorder write access to
    mailbox registers such that it caused watchdog timeouts by
    out-of-order TX completions.
  
    Tested by:	Michael L. Squires  siralan dot org >

Modified:
  stable/8/sys/dev/bge/if_bge.c
  stable/8/sys/dev/bge/if_bgereg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/bge/if_bge.c
==============================================================================
--- stable/8/sys/dev/bge/if_bge.c	Mon Mar 26 04:36:22 2012	(r233495)
+++ stable/8/sys/dev/bge/if_bge.c	Mon Mar 26 04:37:42 2012	(r233496)
@@ -380,6 +380,8 @@ static void bge_dma_free(struct bge_soft
 static int bge_dma_ring_alloc(struct bge_softc *, bus_size_t, bus_size_t,
     bus_dma_tag_t *, uint8_t **, bus_dmamap_t *, bus_addr_t *, const char *);
 
+static int bge_mbox_reorder(struct bge_softc *);
+
 static int bge_get_eaddr_fw(struct bge_softc *sc, uint8_t ether_addr[]);
 static int bge_get_eaddr_mem(struct bge_softc *, uint8_t[]);
 static int bge_get_eaddr_nvram(struct bge_softc *, uint8_t[]);
@@ -635,6 +637,8 @@ bge_writembx(struct bge_softc *sc, int o
 		off += BGE_LPMBX_IRQ0_HI - BGE_MBX_IRQ0_HI;
 
 	CSR_WRITE_4(sc, off, val);
+	if ((sc->bge_flags & BGE_FLAG_MBOX_REORDER) != 0)
+		CSR_READ_4(sc, off);
 }
 
 /*
@@ -2609,10 +2613,10 @@ bge_dma_alloc(struct bge_softc *sc)
 		 * XXX
 		 * watchdog timeout issue was observed on BCM5704 which
 		 * lives behind PCI-X bridge(e.g AMD 8131 PCI-X bridge).
-		 * Limiting DMA address space to 32bits seems to address
-		 * it.
+		 * Both limiting DMA address space to 32bits and flushing
+		 * mailbox write seem to address the issue.
 		 */
-		if (sc->bge_flags & BGE_FLAG_PCIX)
+		if (sc->bge_pcixcap != 0)
 			lowaddr = BUS_SPACE_MAXADDR_32BIT;
 	}
 	error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev),
@@ -2775,6 +2779,56 @@ bge_can_use_msi(struct bge_softc *sc)
 }
 
 static int
+bge_mbox_reorder(struct bge_softc *sc)
+{
+	/* Lists of PCI bridges that are known to reorder mailbox writes. */
+	static const struct mbox_reorder {
+		const uint16_t vendor;
+		const uint16_t device;
+		const char *desc;
+	} const mbox_reorder_lists[] = {
+		{ 0x1022, 0x7450, "AMD-8131 PCI-X Bridge" },
+	};
+	devclass_t pci, pcib;
+	device_t bus, dev;
+	int count, i;
+
+	count = sizeof(mbox_reorder_lists) / sizeof(mbox_reorder_lists[0]);
+	pci = devclass_find("pci");
+	pcib = devclass_find("pcib");
+	dev = sc->bge_dev;
+	bus = device_get_parent(dev);
+	for (;;) {
+		dev = device_get_parent(bus);
+		bus = device_get_parent(dev);
+		device_printf(sc->bge_dev, "dev : %s%d, bus : %s%d\n",
+		    device_get_name(dev), device_get_unit(dev),
+		    device_get_name(bus), device_get_unit(bus));
+		if (device_get_devclass(dev) != pcib)
+			break;
+		for (i = 0; i < count; i++) {
+			device_printf(sc->bge_dev,
+			    "probing dev : %s%d, vendor : 0x%04x "
+			    "device : 0x%04x\n",
+			    device_get_name(dev), device_get_unit(dev),
+			    pci_get_vendor(dev), pci_get_device(dev));
+			if (pci_get_vendor(dev) ==
+			    mbox_reorder_lists[i].vendor &&
+			    pci_get_device(dev) ==
+			    mbox_reorder_lists[i].device) {
+				device_printf(sc->bge_dev,
+				    "enabling MBOX workaround for %s\n",
+				    mbox_reorder_lists[i].desc);
+				return (1);
+			}
+		}
+		if (device_get_devclass(bus) != pci)
+			break;
+	}
+	return (0);
+}
+
+static int
 bge_attach(device_t dev)
 {
 	struct ifnet *ifp;
@@ -3094,6 +3148,16 @@ bge_attach(device_t dev)
 	if (BGE_IS_5714_FAMILY(sc) && (sc->bge_flags & BGE_FLAG_PCIX))
 		sc->bge_flags |= BGE_FLAG_40BIT_BUG;
 	/*
+	 * Some PCI-X bridges are known to trigger write reordering to
+	 * the mailbox registers. Typical phenomena is watchdog timeouts
+	 * caused by out-of-order TX completions.  Enable workaround for
+	 * PCI-X devices that live behind these bridges.
+	 * Note, PCI-X controllers can run in PCI mode so we can't use
+	 * BGE_FLAG_PCIX flag to detect PCI-X controllers.
+	 */
+	if (sc->bge_pcixcap != 0 && bge_mbox_reorder(sc) != 0)
+		sc->bge_flags |= BGE_FLAG_MBOX_REORDER;
+	/*
 	 * Allocate the interrupt, using MSI if possible.  These devices
 	 * support 8 MSI messages, but only the first one is used in
 	 * normal operation.

Modified: stable/8/sys/dev/bge/if_bgereg.h
==============================================================================
--- stable/8/sys/dev/bge/if_bgereg.h	Mon Mar 26 04:36:22 2012	(r233495)
+++ stable/8/sys/dev/bge/if_bgereg.h	Mon Mar 26 04:37:42 2012	(r233496)
@@ -2828,6 +2828,7 @@ struct bge_softc {
 #define	BGE_FLAG_RX_ALIGNBUG	0x04000000
 #define	BGE_FLAG_SHORT_DMA_BUG	0x08000000
 #define	BGE_FLAG_4K_RDMA_BUG	0x10000000
+#define	BGE_FLAG_MBOX_REORDER	0x20000000
 	uint32_t		bge_phy_flags;
 #define	BGE_PHY_NO_WIRESPEED	0x00000001
 #define	BGE_PHY_ADC_BUG		0x00000002

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Mar 26 04:49:58 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1463C1065670;
	Mon, 26 Mar 2012 04:49:58 +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 E8FC88FC17;
	Mon, 26 Mar 2012 04:49: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 q2Q4nvve015630;
	Mon, 26 Mar 2012 04:49:57 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2Q4nv2e015627;
	Mon, 26 Mar 2012 04:49:57 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201203260449.q2Q4nv2e015627@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Mon, 26 Mar 2012 04:49: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: r233499 - in stable/8/sys: dev/bge i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 26 Mar 2012 04:49:58 -0000

Author: yongari
Date: Mon Mar 26 04:49:57 2012
New Revision: 233499
URL: http://svn.freebsd.org/changeset/base/233499

Log:
  MFC r232849-232850:
  r232849:
    Show PCI bus speed and width as well as running mode of PCI-X
    device in device attach.  This would help to narrow down issue to a
    specific controller and operating mode of the controller.
    While I'm here rename BGE_MISCCFG_BOARD_ID with
    BGE_MISCCFG_BOARD_ID_MASK.
  
  r232850:
    Make if_ierrors updated whenever any of the following counters are
    updated.
     o Number of times NIC ran out of RX buffer descriptors
     o Number of inbound packet errors
     o Number of inbound packets that were chosen to be discarded
    Previously only the discarded packet counter was used to update
    if_ierrors.  This change fixes wrong if_ierrors counter on
    BCM570[0-4] controllers.  For BCM5705 and later controllers bge(4)
    already correctly counted it.
  
    Reported by:	Eugene Grosbein  rdtc dot ru>

Modified:
  stable/8/sys/dev/bge/if_bge.c
  stable/8/sys/dev/bge/if_bgereg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/bge/if_bge.c
==============================================================================
--- stable/8/sys/dev/bge/if_bge.c	Mon Mar 26 04:47:06 2012	(r233498)
+++ stable/8/sys/dev/bge/if_bge.c	Mon Mar 26 04:49:57 2012	(r233499)
@@ -380,6 +380,7 @@ static void bge_dma_free(struct bge_soft
 static int bge_dma_ring_alloc(struct bge_softc *, bus_size_t, bus_size_t,
     bus_dma_tag_t *, uint8_t **, bus_dmamap_t *, bus_addr_t *, const char *);
 
+static void bge_devinfo(struct bge_softc *);
 static int bge_mbox_reorder(struct bge_softc *);
 
 static int bge_get_eaddr_fw(struct bge_softc *sc, uint8_t ether_addr[]);
@@ -2828,6 +2829,59 @@ bge_mbox_reorder(struct bge_softc *sc)
 	return (0);
 }
 
+static void
+bge_devinfo(struct bge_softc *sc)
+{
+	uint32_t cfg, clk;
+
+	device_printf(sc->bge_dev,
+	    "CHIP ID 0x%08x; ASIC REV 0x%02x; CHIP REV 0x%02x; ",
+	    sc->bge_chipid, sc->bge_asicrev, sc->bge_chiprev);
+	if (sc->bge_flags & BGE_FLAG_PCIE)
+		printf("PCI-E\n");
+	else if (sc->bge_flags & BGE_FLAG_PCIX) {
+		printf("PCI-X ");
+		cfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID_MASK;
+		if (cfg == BGE_MISCCFG_BOARD_ID_5704CIOBE)
+			clk = 133;
+		else {
+			clk = CSR_READ_4(sc, BGE_PCI_CLKCTL) & 0x1F;
+			switch (clk) {
+			case 0:
+				clk = 33;
+				break;
+			case 2:
+				clk = 50;
+				break;
+			case 4:
+				clk = 66;
+				break;
+			case 6:
+				clk = 100;
+				break;
+			case 7:
+				clk = 133;
+				break;
+			}
+		}
+		printf("%u MHz\n", clk);
+	} else {
+		if (sc->bge_pcixcap != 0)
+			printf("PCI on PCI-X ");
+		else
+			printf("PCI ");
+		cfg = pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4);
+		if (cfg & BGE_PCISTATE_PCI_BUSSPEED)
+			clk = 66;
+		else
+			clk = 33;
+		if (cfg & BGE_PCISTATE_32BIT_BUS)
+			printf("%u MHz; 32bit\n", clk);
+		else
+			printf("%u MHz; 64bit\n", clk);
+	}
+}
+
 static int
 bge_attach(device_t dev)
 {
@@ -3056,7 +3110,7 @@ bge_attach(device_t dev)
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5719)
 		sc->bge_flags |= BGE_FLAG_4K_RDMA_BUG;
 
-	misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID;
+	misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID_MASK;
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5705) {
 		if (misccfg == BGE_MISCCFG_BOARD_ID_5788 ||
 		    misccfg == BGE_MISCCFG_BOARD_ID_5788M)
@@ -3196,11 +3250,7 @@ bge_attach(device_t dev)
 		goto fail;
 	}
 
-	device_printf(dev,
-	    "CHIP ID 0x%08x; ASIC REV 0x%02x; CHIP REV 0x%02x; %s\n",
-	    sc->bge_chipid, sc->bge_asicrev, sc->bge_chiprev,
-	    (sc->bge_flags & BGE_FLAG_PCIX) ? "PCI-X" :
-	    ((sc->bge_flags & BGE_FLAG_PCIE) ? "PCI-E" : "PCI"));
+	bge_devinfo(sc);
 
 	BGE_LOCK_INIT(sc, device_get_nameunit(dev));
 
@@ -4464,6 +4514,12 @@ bge_stats_update(struct bge_softc *sc)
 	ifp->if_collisions += (uint32_t)(cnt - sc->bge_tx_collisions);
 	sc->bge_tx_collisions = cnt;
 
+	cnt = READ_STAT(sc, stats, nicNoMoreRxBDs.bge_addr_lo);
+	ifp->if_ierrors += (uint32_t)(cnt - sc->bge_rx_nobds);
+	sc->bge_rx_nobds = cnt;
+	cnt = READ_STAT(sc, stats, ifInErrors.bge_addr_lo);
+	ifp->if_ierrors += (uint32_t)(cnt - sc->bge_rx_inerrs);
+	sc->bge_rx_inerrs = cnt;
 	cnt = READ_STAT(sc, stats, ifInDiscards.bge_addr_lo);
 	ifp->if_ierrors += (uint32_t)(cnt - sc->bge_rx_discards);
 	sc->bge_rx_discards = cnt;

Modified: stable/8/sys/dev/bge/if_bgereg.h
==============================================================================
--- stable/8/sys/dev/bge/if_bgereg.h	Mon Mar 26 04:47:06 2012	(r233498)
+++ stable/8/sys/dev/bge/if_bgereg.h	Mon Mar 26 04:49:57 2012	(r233499)
@@ -1989,7 +1989,9 @@
 /* Misc. config register */
 #define	BGE_MISCCFG_RESET_CORE_CLOCKS	0x00000001
 #define	BGE_MISCCFG_TIMER_PRESCALER	0x000000FE
-#define	BGE_MISCCFG_BOARD_ID		0x0001E000
+#define	BGE_MISCCFG_BOARD_ID_MASK	0x0001E000
+#define	BGE_MISCCFG_BOARD_ID_5704	0x00000000
+#define	BGE_MISCCFG_BOARD_ID_5704CIOBE	0x00004000
 #define	BGE_MISCCFG_BOARD_ID_5788	0x00010000
 #define	BGE_MISCCFG_BOARD_ID_5788M	0x00018000
 #define	BGE_MISCCFG_EPHY_IDDQ		0x00200000
@@ -2869,6 +2871,8 @@ struct bge_softc {
 	int			bge_csum_features;
 	struct callout		bge_stat_ch;
 	uint32_t		bge_rx_discards;
+	uint32_t		bge_rx_inerrs;
+	uint32_t		bge_rx_nobds;
 	uint32_t		bge_tx_discards;
 	uint32_t		bge_tx_collisions;
 #ifdef DEVICE_POLLING

From owner-svn-src-stable-8@FreeBSD.ORG  Mon Mar 26 05:15:45 2012
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 117B1106566B;
	Mon, 26 Mar 2012 05:15:45 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E5F2C8FC08;
	Mon, 26 Mar 2012 05:15:44 +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 q2Q5Fibn016830;
	Mon, 26 Mar 2012 05:15:44 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2Q5FihT016828;
	Mon, 26 Mar 2012 05:15:44 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201203260515.q2Q5FihT016828@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Mon, 26 Mar 2012 05:15:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233502 - in stable/8/sys: dev/fxp i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Mon, 26 Mar 2012 05:15:45 -0000

Author: yongari
Date: Mon Mar 26 05:15:44 2012
New Revision: 233502
URL: http://svn.freebsd.org/changeset/base/233502

Log:
  MFC r232951,232953,233158:
  r232951:
    fxp(4) does not handle deferred dma map loading.  Tell
    bus_dmamap_load(9) that it should return immediately with error
    when there are insufficient mapping resources.
  
  r232953:
    Fix white space nits.
  
  r233158:
    Do not change current media when driver is already running.  If
    driver is running driver would have already completed flow control
    configuration.  This change removes unnecessary media changes in
    controller reconfiguration cases such that it does not trigger link
    reestablishment for configuration change requests like promiscuous
    mode change.
  
    Reported by:	Many
    Tested by:	Mike Tancsa  sentex dot net>

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

Modified: stable/8/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/8/sys/dev/fxp/if_fxp.c	Mon Mar 26 05:14:04 2012	(r233501)
+++ stable/8/sys/dev/fxp/if_fxp.c	Mon Mar 26 05:15:44 2012	(r233502)
@@ -236,11 +236,11 @@ static int		fxp_ioctl(struct ifnet *ifp,
 			    caddr_t data);
 static void 		fxp_watchdog(struct fxp_softc *sc);
 static void		fxp_add_rfabuf(struct fxp_softc *sc,
-    			    struct fxp_rx *rxp);
+			    struct fxp_rx *rxp);
 static void		fxp_discard_rfabuf(struct fxp_softc *sc,
-    			    struct fxp_rx *rxp);
+			    struct fxp_rx *rxp);
 static int		fxp_new_rfabuf(struct fxp_softc *sc,
-    			    struct fxp_rx *rxp);
+			    struct fxp_rx *rxp);
 static int		fxp_mc_addrs(struct fxp_softc *sc);
 static void		fxp_mc_setup(struct fxp_softc *sc);
 static uint16_t		fxp_eeprom_getword(struct fxp_softc *sc, int offset,
@@ -272,7 +272,7 @@ static int		sysctl_hw_fxp_int_delay(SYSC
 static void 		fxp_scb_wait(struct fxp_softc *sc);
 static void		fxp_scb_cmd(struct fxp_softc *sc, int cmd);
 static void		fxp_dma_wait(struct fxp_softc *sc,
-    			    volatile uint16_t *status, bus_dma_tag_t dmat,
+			    volatile uint16_t *status, bus_dma_tag_t dmat,
 			    bus_dmamap_t map);
 
 static device_method_t fxp_methods[] = {
@@ -681,7 +681,8 @@ fxp_attach(device_t dev)
 		goto fail;
 	}
 	error = bus_dmamap_load(sc->fxp_stag, sc->fxp_smap, sc->fxp_stats,
-	    sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr, 0);
+	    sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr,
+	    BUS_DMA_NOWAIT);
 	if (error) {
 		device_printf(dev, "could not load the stats DMA buffer\n");
 		goto fail;
@@ -705,7 +706,7 @@ fxp_attach(device_t dev)
 
 	error = bus_dmamap_load(sc->cbl_tag, sc->cbl_map,
 	    sc->fxp_desc.cbl_list, FXP_TXCB_SZ, fxp_dma_map_addr,
-	    &sc->fxp_desc.cbl_addr, 0);
+	    &sc->fxp_desc.cbl_addr, BUS_DMA_NOWAIT);
 	if (error) {
 		device_printf(dev, "could not load TxCB DMA buffer\n");
 		goto fail;
@@ -729,7 +730,8 @@ fxp_attach(device_t dev)
 		goto fail;
 	}
 	error = bus_dmamap_load(sc->mcs_tag, sc->mcs_map, sc->mcsp,
-	    sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr, 0);
+	    sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr,
+	    BUS_DMA_NOWAIT);
 	if (error) {
 		device_printf(dev,
 		    "can't load the multicast setup DMA buffer\n");
@@ -900,7 +902,7 @@ fxp_attach(device_t dev)
 		FXP_LOCK(sc);
 		/* Clear wakeup events. */
 		CSR_WRITE_1(sc, FXP_CSR_PMDR, CSR_READ_1(sc, FXP_CSR_PMDR));
-		fxp_init_body(sc, 1);
+		fxp_init_body(sc, 0);
 		fxp_stop(sc);
 		FXP_UNLOCK(sc);
 	}
@@ -1541,7 +1543,7 @@ fxp_encap(struct fxp_softc *sc, struct m
 		}
 		*m_head = m;
 		error = bus_dmamap_load_mbuf_sg(sc->fxp_txmtag, txp->tx_map,
-	    	    *m_head, segs, &nseg, 0);
+		    *m_head, segs, &nseg, 0);
 		if (error != 0) {
 			m_freem(*m_head);
 			*m_head = NULL;
@@ -2048,7 +2050,7 @@ fxp_update_stats(struct fxp_softc *sc)
 			 */
 			sc->rx_idle_secs++;
 		}
-		ifp->if_ierrors += 
+		ifp->if_ierrors +=
 		    le32toh(sp->rx_crc_errors) +
 		    le32toh(sp->rx_alignment_errors) +
 		    le32toh(sp->rx_rnr_errors) +
@@ -2175,7 +2177,7 @@ fxp_stop(struct fxp_softc *sc)
 	txp = sc->fxp_desc.tx_list;
 	if (txp != NULL) {
 		for (i = 0; i < FXP_NTXCB; i++) {
- 			if (txp[i].tx_mbuf != NULL) {
+			if (txp[i].tx_mbuf != NULL) {
 				bus_dmamap_sync(sc->fxp_txmtag, txp[i].tx_map,
 				    BUS_DMASYNC_POSTWRITE);
 				bus_dmamap_unload(sc->fxp_txmtag,
@@ -2808,7 +2810,7 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
 			if (((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) &&
 			    ((ifp->if_flags ^ sc->if_flags) &
 			    (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0)
-				fxp_init_body(sc, 1);
+				fxp_init_body(sc, 0);
 			else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
 				fxp_init_body(sc, 1);
 		} else {
@@ -2914,7 +2916,7 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
 			reinit++;
 		}
 		if (reinit > 0 && ifp->if_flags & IFF_UP)
-			fxp_init_body(sc, 1);
+			fxp_init_body(sc, 0);
 		FXP_UNLOCK(sc);
 		VLAN_CAPABILITIES(ifp);
 		break;

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Mar 27 00:51:54 2012
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 81F571065680;
	Tue, 27 Mar 2012 00:51:54 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6929E8FC08;
	Tue, 27 Mar 2012 00:51:54 +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 q2R0ps6Y057397;
	Tue, 27 Mar 2012 00:51:54 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2R0psTU057389;
	Tue, 27 Mar 2012 00:51:54 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203270051.q2R0psTU057389@svn.freebsd.org>
From: Eitan Adler 
Date: Tue, 27 Mar 2012 00:51:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233527 - stable/8/share/examples/cvsup
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, 27 Mar 2012 00:51:54 -0000

Author: eadler
Date: Tue Mar 27 00:51:53 2012
New Revision: 233527
URL: http://svn.freebsd.org/changeset/base/233527

Log:
  MFC r233428:
  	 - Direct users to csup instead of cvsup in the csup-file boilerplate text.
  
  Approved by:	cperciva (implicit)

Modified:
  stable/8/share/examples/cvsup/cvs-supfile
  stable/8/share/examples/cvsup/doc-supfile
  stable/8/share/examples/cvsup/gnats-supfile
  stable/8/share/examples/cvsup/ports-supfile
  stable/8/share/examples/cvsup/stable-supfile
  stable/8/share/examples/cvsup/standard-supfile
  stable/8/share/examples/cvsup/www-supfile
Directory Properties:
  stable/8/share/examples/cvsup/   (props changed)

Modified: stable/8/share/examples/cvsup/cvs-supfile
==============================================================================
--- stable/8/share/examples/cvsup/cvs-supfile	Tue Mar 27 00:51:28 2012	(r233526)
+++ stable/8/share/examples/cvsup/cvs-supfile	Tue Mar 27 00:51:53 2012	(r233527)
@@ -3,19 +3,16 @@
 # This file contains all of the "CVSup collections" that make up the
 # CVS development tree of the FreeBSD system.
 #
-# CVSup (CVS Update Protocol) allows you to download the latest CVS
+# csup (CVS Update Protocol) allows you to download the latest CVS
 # tree (or any branch of development therefrom) to your system easily
-# and efficiently (far more so than with sup, which CVSup is aimed
-# at replacing).  If you're running CVSup interactively, and are
-# currently using an X display server, you should run CVSup as follows
-# to keep your CVS tree up-to-date:
+# and efficiently
 #
-#	cvsup cvs-supfile
+# To keep your CVS tree up-to-date run:
 #
-# If not running X, or invoking cvsup from a non-interactive script, then
-# run it as follows:
+#	csup cvs-supfile
 #
-#	cvsup -g -L 2 cvs-supfile
+# Note that this only updates the tree contents and does not
+# update what is actually installed.
 #
 # You may wish to change some of the settings in this file to better
 # suit your system:
@@ -29,7 +26,7 @@
 #		with cvsup's "-h host" option.
 #
 # base=/var/db
-#		This specifies the root where CVSup will store information
+#		This specifies the root where csup will store information
 #		about the collections you have transferred to your system.
 #		A setting of "/var/db" will generate this information in
 #		/var/db/sup.  You can override the "base" setting on the

Modified: stable/8/share/examples/cvsup/doc-supfile
==============================================================================
--- stable/8/share/examples/cvsup/doc-supfile	Tue Mar 27 00:51:28 2012	(r233526)
+++ stable/8/share/examples/cvsup/doc-supfile	Tue Mar 27 00:51:53 2012	(r233527)
@@ -3,19 +3,16 @@
 # This file contains all of the "CVSup collections" that make up the
 # source of the FreeBSD doc tree
 #
-# CVSup (CVS Update Protocol) allows you to download the latest CVS
+# csup (CVS Update Protocol) allows you to download the latest CVS
 # tree (or any branch of development therefrom) to your system easily
-# and efficiently (far more so than with sup, which CVSup is aimed
-# at replacing).  If you're running CVSup interactively, and are
-# currently using an X display server, you should run CVSup as follows
-# to keep your CVS tree up-to-date:
+# and efficiently
 #
-#	cvsup doc-supfile
+# To keep your CVS tree up-to-date run:
 #
-# If not running X, or invoking cvsup from a non-interactive script, then
-# run it as follows:
+#	csup doc-supfile
 #
-#	cvsup -g -L 2 doc-supfile
+# Note that this only updates the tree contents and does not
+# update what is actually installed.
 #
 # You may wish to change some of the settings in this file to better
 # suit your system:
@@ -29,7 +26,7 @@
 #		with cvsup's "-h host" option.
 #
 # base=/var/db
-#		This specifies the root where CVSup will store information
+#		This specifies the root where csup will store information
 #		about the collections you have transferred to your system.
 #		A setting of "/var/db" will generate this information in
 #		/var/db/sup.  You can override the "base" setting on the

Modified: stable/8/share/examples/cvsup/gnats-supfile
==============================================================================
--- stable/8/share/examples/cvsup/gnats-supfile	Tue Mar 27 00:51:28 2012	(r233526)
+++ stable/8/share/examples/cvsup/gnats-supfile	Tue Mar 27 00:51:53 2012	(r233527)
@@ -3,19 +3,16 @@
 # This file contains all of the "CVSup collections" that make up the
 # FreeBSD GNATS bug report database.
 #
-# CVSup (CVS Update Protocol) allows you to download the latest CVS
+# csup (CVS Update Protocol) allows you to download the latest CVS
 # tree (or any branch of development therefrom) to your system easily
-# and efficiently (far more so than with sup, which CVSup is aimed
-# at replacing).  If you're running CVSup interactively, and are
-# currently using an X display server, you should run CVSup as follows
-# to keep your CVS tree up-to-date:
+# and efficiently
 #
-#	cvsup gnats-supfile
+# To keep your CVS tree up-to-date run:
 #
-# If not running X, or invoking cvsup from a non-interactive script, then
-# run it as follows:
+#	csup gnats-supfile
 #
-#	cvsup -g -L 2 gnats-supfile
+# Note that this only updates the tree contents and does not
+# update what is actually installed.
 #
 # You may wish to change some of the settings in this file to better
 # suit your system:
@@ -29,7 +26,7 @@
 #		with cvsup's "-h host" option.
 #
 # base=/var/db
-#		This specifies the root where CVSup will store information
+#		This specifies the root where csup will store information
 #		about the collections you have transferred to your system.
 #		A setting of "/var/db" will generate this information in
 #		/var/db/sup.  You can override the "base" setting on the

Modified: stable/8/share/examples/cvsup/ports-supfile
==============================================================================
--- stable/8/share/examples/cvsup/ports-supfile	Tue Mar 27 00:51:28 2012	(r233526)
+++ stable/8/share/examples/cvsup/ports-supfile	Tue Mar 27 00:51:53 2012	(r233527)
@@ -3,19 +3,16 @@
 # This file contains all of the "CVSup collections" that make up the
 # FreeBSD-current ports collection.
 #
-# CVSup (CVS Update Protocol) allows you to download the latest CVS
+# csup (CVS Update Protocol) allows you to download the latest CVS
 # tree (or any branch of development therefrom) to your system easily
-# and efficiently (far more so than with sup, which CVSup is aimed
-# at replacing).  If you're running CVSup interactively, and are
-# currently using an X display server, you should run CVSup as follows
-# to keep your CVS tree up-to-date:
+# and efficiently
 #
-#	cvsup ports-supfile
+# To keep your CVS tree up-to-date run:
 #
-# If not running X, or invoking cvsup from a non-interactive script, then
-# run it as follows:
+#	csup ports-supfile
 #
-#	cvsup -g -L 2 ports-supfile
+# Note that this only updates the tree contents and does not
+# update what is actually installed.
 #
 # You may wish to change some of the settings in this file to better
 # suit your system:
@@ -29,7 +26,7 @@
 #		with cvsup's "-h host" option.
 #
 # base=/var/db
-#		This specifies the root where CVSup will store information
+#		This specifies the root where csup will store information
 #		about the collections you have transferred to your system.
 #		A setting of "/var/db" will generate this information in
 #		/var/db/sup.  You can override the "base" setting on the

Modified: stable/8/share/examples/cvsup/stable-supfile
==============================================================================
--- stable/8/share/examples/cvsup/stable-supfile	Tue Mar 27 00:51:28 2012	(r233526)
+++ stable/8/share/examples/cvsup/stable-supfile	Tue Mar 27 00:51:53 2012	(r233527)
@@ -3,19 +3,16 @@
 # This file contains all of the "CVSup collections" that make up the
 # FreeBSD-stable source tree.
 #
-# CVSup (CVS Update Protocol) allows you to download the latest CVS
+# csup (CVS Update Protocol) allows you to download the latest CVS
 # tree (or any branch of development therefrom) to your system easily
-# and efficiently (far more so than with sup, which CVSup is aimed
-# at replacing).  If you're running CVSup interactively, and are
-# currently using an X display server, you should run CVSup as follows
-# to keep your CVS tree up-to-date:
+# and efficiently
 #
-#	cvsup stable-supfile
+# To keep your CVS tree up-to-date run:
 #
-# If not running X, or invoking cvsup from a non-interactive script, then
-# run it as follows:
+#	csup stable-supfile
 #
-#	cvsup -g -L 2 stable-supfile
+# Note that this only updates the tree contents and does not
+# update what is actually installed.
 #
 # You may wish to change some of the settings in this file to better
 # suit your system:
@@ -29,7 +26,7 @@
 #		with cvsup's "-h host" option.
 #
 # base=/var/db
-#		This specifies the root where CVSup will store information
+#		This specifies the root where csup will store information
 #		about the collections you have transferred to your system.
 #		A setting of "/var/db" will generate this information in
 #		/var/db/sup.  You can override the "base" setting on the

Modified: stable/8/share/examples/cvsup/standard-supfile
==============================================================================
--- stable/8/share/examples/cvsup/standard-supfile	Tue Mar 27 00:51:28 2012	(r233526)
+++ stable/8/share/examples/cvsup/standard-supfile	Tue Mar 27 00:51:53 2012	(r233527)
@@ -3,19 +3,16 @@
 # This file contains all of the "CVSup collections" that make up the
 # FreeBSD-current source tree.
 #
-# CVSup (CVS Update Protocol) allows you to download the latest CVS
+# csup (CVS Update Protocol) allows you to download the latest CVS
 # tree (or any branch of development therefrom) to your system easily
-# and efficiently (far more so than with sup, which CVSup is aimed
-# at replacing).  If you're running CVSup interactively, and are
-# currently using an X display server, you should run CVSup as follows
-# to keep your CVS tree up-to-date:
+# and efficiently
 #
-#	cvsup standard-supfile
+# To keep your CVS tree up-to-date run:
 #
-# If not running X, or invoking cvsup from a non-interactive script, then
-# run it as follows:
+#	csup standard-supfile
 #
-#	cvsup -g -L 2 standard-supfile
+# Note that this only updates the tree contents and does not
+# update what is actually installed.
 #
 # You may wish to change some of the settings in this file to better
 # suit your system:
@@ -29,7 +26,7 @@
 #		with cvsup's "-h host" option.
 #
 # base=/var/db
-#		This specifies the root where CVSup will store information
+#		This specifies the root where csup will store information
 #		about the collections you have transferred to your system.
 #		A setting of "/var/db" will generate this information in
 #		/var/db/sup.  You can override the "base" setting on the

Modified: stable/8/share/examples/cvsup/www-supfile
==============================================================================
--- stable/8/share/examples/cvsup/www-supfile	Tue Mar 27 00:51:28 2012	(r233526)
+++ stable/8/share/examples/cvsup/www-supfile	Tue Mar 27 00:51:53 2012	(r233527)
@@ -3,19 +3,16 @@
 # This file contains all of the "CVSup collections" that make up the
 # source of the FreeBSD www tree
 #
-# CVSup (CVS Update Protocol) allows you to download the latest CVS
+# csup (CVS Update Protocol) allows you to download the latest CVS
 # tree (or any branch of development therefrom) to your system easily
-# and efficiently (far more so than with sup, which CVSup is aimed
-# at replacing).  If you're running CVSup interactively, and are
-# currently using an X display server, you should run CVSup as follows
-# to keep your CVS tree up-to-date:
+# and efficiently
 #
-#	cvsup www-supfile
+# To keep your CVS tree up-to-date run:
 #
-# If not running X, or invoking cvsup from a non-interactive script, then
-# run it as follows:
+#	csup www-supfile
 #
-#	cvsup -g -L 2 www-supfile
+# Note that this only updates the tree contents and does not
+# update what is actually installed.
 #
 # You may wish to change some of the settings in this file to better
 # suit your system:
@@ -29,7 +26,7 @@
 #		with cvsup's "-h host" option.
 #
 # base=/var/db
-#		This specifies the root where CVSup will store information
+#		This specifies the root where csup will store information
 #		about the collections you have transferred to your system.
 #		A setting of "/var/db" will generate this information in
 #		/var/db/sup.  You can override the "base" setting on the

From owner-svn-src-stable-8@FreeBSD.ORG  Tue Mar 27 20:44:49 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 41825106567A
	for ;
	Tue, 27 Mar 2012 20:44:49 +0000 (UTC)
	(envelope-from pfrankymee@ymail.com)
Received: from mail.flm.ro (frontline1.mediasat.ro [193.226.85.171])
	by mx1.freebsd.org (Postfix) with ESMTP id 78B968FC14
	for ;
	Tue, 27 Mar 2012 20:44:48 +0000 (UTC)
Received: (qmail 3129 invoked by uid 512); 27 Mar 2012 23:44:44 +0300
Received: from 216.59.3.82 by mail.flm.ro (envelope-from
	, uid 508) with qmail-scanner-1.25-st-qms 
	(spamassassin: 3.2.4. perlscan: 1.25-st-qms.  
	Clear:RC:0(216.59.3.82):SA:0(4.4/5.0):. 
	Processed in 0.740877 secs); 27 Mar 2012 20:44:44 -0000
X-Spam-Status: No, hits=4.4 required=5.0
X-Spam-Level: ++++
X-Antivirus-MYDOMAIN-Mail-From: pfrankymee@ymail.com via mail.flm.ro
X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:0(216.59.3.82):SA:0(4.4/5.0):.
	Processed in 0.740877 secs Process 3017)
Received: from unknown (HELO WIN-TF1IF2F94JN) (test@flm.ro@216.59.3.82)
	by mail.flm.ro with SMTP; 27 Mar 2012 23:44:43 +0300
Message-ID: <02e972fa-40995-0e5a5725810417@win-tf1if2f94jn>
From: "Franky Meersman" 
To: svn-src-stable-8@freebsd.org
Date: Tue, 27 Mar 2012 13:43:32 -0700
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Priority: 3
Subject: Re: Important Reply.
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Franky Meersman 
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, 27 Mar 2012 20:44:49 -0000

Good day,
My name is Franky Meersman, a senior staff and an executive of a bank here in United Kingdom. I am writing to seek your indulgence and assistance. I wish to make a transfer involving an amount of money estimated at 20,000.000.00 (Twenty Million British Pounds Sterling) and I feel strongly that you will be capable of receiving this fund into your account in your country.

I am proposing to make this transfer to a designated bank account of your choice. I could not do this project alone since I am an insider in the bank. A zero account balance or a new account may be opened for this purpose. Thus, for your indulgence and support, I propose an offer of 25% of the total amount to be your compensation and commission after the transfer has been successfully concluded. reply me private (meersmanfr@ymail.com) 447045709908
Thanks and God bless.
Regards
Franky Meersman


From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar 28 00:11:58 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9620C106566C;
	Wed, 28 Mar 2012 00:11:58 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 804248FC15;
	Wed, 28 Mar 2012 00:11: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 q2S0BwXF009738;
	Wed, 28 Mar 2012 00:11:58 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2S0BwrI009736;
	Wed, 28 Mar 2012 00:11:58 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201203280011.q2S0BwrI009736@svn.freebsd.org>
From: Jung-uk Kim 
Date: Wed, 28 Mar 2012 00:11: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: r233584 - stable/8/sys/dev/acpica
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, 28 Mar 2012 00:11:58 -0000

Author: jkim
Date: Wed Mar 28 00:11:57 2012
New Revision: 233584
URL: http://svn.freebsd.org/changeset/base/233584

Log:
  MFC:	r233313
  
  Add ACPI_LV_REPAIR debug level, available since ACPICA 20091214.

Modified:
  stable/8/sys/dev/acpica/acpi.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/acpica/acpi.c
==============================================================================
--- stable/8/sys/dev/acpica/acpi.c	Wed Mar 28 00:11:06 2012	(r233583)
+++ stable/8/sys/dev/acpica/acpi.c	Wed Mar 28 00:11:57 2012	(r233584)
@@ -3381,6 +3381,7 @@ static struct debugtag dbg_level[] = {
     {"ACPI_LV_INIT",		ACPI_LV_INIT},
     {"ACPI_LV_DEBUG_OBJECT",	ACPI_LV_DEBUG_OBJECT},
     {"ACPI_LV_INFO",		ACPI_LV_INFO},
+    {"ACPI_LV_REPAIR",		ACPI_LV_REPAIR},
     {"ACPI_LV_ALL_EXCEPTIONS",	ACPI_LV_ALL_EXCEPTIONS},
 
     /* Trace verbosity level 1 [Standard Trace Level] */

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar 28 02:34:28 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D26DE1065675;
	Wed, 28 Mar 2012 02:34:28 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BBDD18FC19;
	Wed, 28 Mar 2012 02:34: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 q2S2YSlD014295;
	Wed, 28 Mar 2012 02:34:28 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2S2YSWd014293;
	Wed, 28 Mar 2012 02:34:28 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203280234.q2S2YSWd014293@svn.freebsd.org>
From: Eitan Adler 
Date: Wed, 28 Mar 2012 02:34:28 +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: r233589 - stable/8/usr.sbin/ppp
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, 28 Mar 2012 02:34:28 -0000

Author: eadler
Date: Wed Mar 28 02:34:28 2012
New Revision: 233589
URL: http://svn.freebsd.org/changeset/base/233589

Log:
  MFC r230348:
  	 - Fix warning when compiling with gcc46:
  	        error: variable 'extra_async_bytes' set but not used
  
  Approved by:	cperciva (implicit)

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

Modified: stable/8/usr.sbin/ppp/lqr.c
==============================================================================
--- stable/8/usr.sbin/ppp/lqr.c	Wed Mar 28 02:33:50 2012	(r233588)
+++ stable/8/usr.sbin/ppp/lqr.c	Wed Mar 28 02:34:28 2012	(r233589)
@@ -417,7 +417,7 @@ lqr_LayerPush(struct bundle *b __unused,
               int pri __unused, u_short *proto)
 {
   struct physical *p = link2physical(l);
-  int len, layer, extra_async_bytes;
+  int len, layer;
 
   if (!p) {
     /* Oops - can't happen :-] */
@@ -445,7 +445,6 @@ lqr_LayerPush(struct bundle *b __unused,
    * acf layers (to avoid alignment issues), so deal with this too.
    */
 
-  extra_async_bytes = 0;
   p->hdlc.lqm.ifOutUniPackets++;
   p->hdlc.lqm.ifOutOctets += len + 1;		/* plus 1 flag octet! */
   for (layer = 0; layer < l->nlayers; layer++)

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar 28 06:49:30 2012
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 381531065670;
	Wed, 28 Mar 2012 06:49:30 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 21E9F8FC0C;
	Wed, 28 Mar 2012 06:49: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 q2S6nTpn022631;
	Wed, 28 Mar 2012 06:49:29 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2S6nTus022629;
	Wed, 28 Mar 2012 06:49:29 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201203280649.q2S6nTus022629@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Wed, 28 Mar 2012 06:49: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: r233596 - stable/8/sys/kern
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, 28 Mar 2012 06:49:30 -0000

Author: ae
Date: Wed Mar 28 06:49:29 2012
New Revision: 233596
URL: http://svn.freebsd.org/changeset/base/233596

Log:
  MFC r233276:
    Acquire modules lock before call module_getname() in the KLD_DEBUG case.

Modified:
  stable/8/sys/kern/kern_linker.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/kern/kern_linker.c
==============================================================================
--- stable/8/sys/kern/kern_linker.c	Wed Mar 28 06:49:04 2012	(r233595)
+++ stable/8/sys/kern/kern_linker.c	Wed Mar 28 06:49:29 2012	(r233596)
@@ -634,8 +634,12 @@ linker_file_unload(linker_file_t file, i
 		 * Give the module a chance to veto the unload.
 		 */
 		if ((error = module_unload(mod)) != 0) {
+#ifdef KLD_DEBUG
+			MOD_SLOCK;
 			KLD_DPF(FILE, ("linker_file_unload: module %s"
 			    " failed unload\n", module_getname(mod)));
+			MOD_SUNLOCK;
+#endif
 			return (error);
 		}
 		MOD_XLOCK;

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar 28 12:41:18 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2C3771065670;
	Wed, 28 Mar 2012 12:41:18 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 167308FC1D;
	Wed, 28 Mar 2012 12:41:18 +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 q2SCfHhC036310;
	Wed, 28 Mar 2012 12:41:17 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2SCfHmN036308;
	Wed, 28 Mar 2012 12:41:17 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <201203281241.q2SCfHmN036308@svn.freebsd.org>
From: Marko Zec 
Date: Wed, 28 Mar 2012 12:41:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233603 - in stable/8/sys: i386/conf net
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 28 Mar 2012 12:41:18 -0000

Author: zec
Date: Wed Mar 28 12:41:17 2012
New Revision: 233603
URL: http://svn.freebsd.org/changeset/base/233603

Log:
  MFC 232487:
    Properly restore curvnet context when returning early from
    ether_input_internal().
  
    This change only affects options VIMAGE kernel builds.
  
    PR:           kern/165643
    Submitted by: Vijay Singh
    MFC after:    3 days

Modified:
  stable/8/sys/net/if_ethersubr.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/net/if_ethersubr.c
==============================================================================
--- stable/8/sys/net/if_ethersubr.c	Wed Mar 28 12:40:30 2012	(r233602)
+++ stable/8/sys/net/if_ethersubr.c	Wed Mar 28 12:41:17 2012	(r233603)
@@ -660,8 +660,10 @@ ether_input(struct ifnet *ifp, struct mb
 		m = (*lagg_input_p)(ifp, m);
 		if (m != NULL)
 			ifp = m->m_pkthdr.rcvif;
-		else 
+		else {
+			CURVNET_RESTORE();
 			return;
+		}
 	}
 
 	/*
@@ -680,6 +682,7 @@ ether_input(struct ifnet *ifp, struct mb
 #endif
 			ifp->if_ierrors++;
 			m_freem(m);
+			CURVNET_RESTORE();
 			return;
 		}
 

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar 28 12:46:12 2012
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 DBEE21065678;
	Wed, 28 Mar 2012 12:46:12 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C649C8FC1B;
	Wed, 28 Mar 2012 12:46:12 +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 q2SCkC9F036575;
	Wed, 28 Mar 2012 12:46:12 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2SCkCdb036573;
	Wed, 28 Mar 2012 12:46:12 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <201203281246.q2SCkCdb036573@svn.freebsd.org>
From: Marko Zec 
Date: Wed, 28 Mar 2012 12:46:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233605 - in stable/8/sys: i386/conf 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: Wed, 28 Mar 2012 12:46:13 -0000

Author: zec
Date: Wed Mar 28 12:46:12 2012
New Revision: 233605
URL: http://svn.freebsd.org/changeset/base/233605

Log:
  MFC r232517:
    Change SYSINIT priorities so that ip_mroute_modevent() is executed
    before vnet_mroute_init(), since vnet_mroute_init() depends on mfchashsize
    tunable to be set, and that is done in in ip_mroute_modevent().
    Apparently I broke that ordering with r208744 almost 2 years ago...
  
    PR:           kern/162201
    Submitted by: Stevan Markovic (mcafee.com)
    MFC after:    3 days

Modified:
  stable/8/sys/netinet/ip_mroute.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/netinet/ip_mroute.c
==============================================================================
--- stable/8/sys/netinet/ip_mroute.c	Wed Mar 28 12:45:35 2012	(r233604)
+++ stable/8/sys/netinet/ip_mroute.c	Wed Mar 28 12:46:12 2012	(r233605)
@@ -2822,7 +2822,7 @@ vnet_mroute_init(const void *unused __un
 	callout_init(&V_bw_meter_ch, CALLOUT_MPSAFE);
 }
 
-VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, vnet_mroute_init,
+VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_mroute_init,
 	NULL);
 
 static void
@@ -2945,4 +2945,4 @@ static moduledata_t ip_mroutemod = {
     0
 };
 
-DECLARE_MODULE(ip_mroute, ip_mroutemod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+DECLARE_MODULE(ip_mroute, ip_mroutemod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE);

From owner-svn-src-stable-8@FreeBSD.ORG  Wed Mar 28 16:33:08 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B2C5A1065679;
	Wed, 28 Mar 2012 16:33:08 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E1448FC1E;
	Wed, 28 Mar 2012 16:33:08 +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 q2SGX8L4044646;
	Wed, 28 Mar 2012 16:33:08 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2SGX8Yd044644;
	Wed, 28 Mar 2012 16:33:08 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201203281633.q2SGX8Yd044644@svn.freebsd.org>
From: Jung-uk Kim 
Date: Wed, 28 Mar 2012 16:33:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233614 - stable/8/share/man/man4
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, 28 Mar 2012 16:33:08 -0000

Author: jkim
Date: Wed Mar 28 16:33:08 2012
New Revision: 233614
URL: http://svn.freebsd.org/changeset/base/233614

Log:
  MFC:	r233313
  
  Add ACPI_LV_REPAIR debug level, available since ACPICA 20091214.

Modified:
  stable/8/share/man/man4/acpi.4
Directory Properties:
  stable/8/share/man/man4/   (props changed)

Modified: stable/8/share/man/man4/acpi.4
==============================================================================
--- stable/8/share/man/man4/acpi.4	Wed Mar 28 16:32:17 2012	(r233613)
+++ stable/8/share/man/man4/acpi.4	Wed Mar 28 16:33:08 2012	(r233614)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 26, 2010
+.Dd March 22, 2012
 .Dt ACPI 4
 .Os
 .Sh NAME
@@ -483,6 +483,8 @@ Initialization progress
 Stores to objects
 .It Li ACPI_LV_INFO
 General information and progress
+.It Li ACPI_LV_REPAIR
+Repair a common problem with predefined methods
 .It Li ACPI_LV_ALL_EXCEPTIONS
 All the previous levels
 .It Li ACPI_LV_PARSE

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Mar 29 01:46:31 2012
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 5BF20106564A;
	Thu, 29 Mar 2012 01:46:31 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2C0E38FC0A;
	Thu, 29 Mar 2012 01:46:31 +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 q2T1kVp1069307;
	Thu, 29 Mar 2012 01:46:31 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2T1kUGX069304;
	Thu, 29 Mar 2012 01:46:30 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203290146.q2T1kUGX069304@svn.freebsd.org>
From: Eitan Adler 
Date: Thu, 29 Mar 2012 01:46: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: r233633 - in stable/8/secure: usr.bin/ssh usr.sbin/sshd
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, 29 Mar 2012 01:46:31 -0000

Author: eadler
Date: Thu Mar 29 01:46:30 2012
New Revision: 233633
URL: http://svn.freebsd.org/changeset/base/233633

Log:
  MFC r233136, r233432:
  	Restore the ability to use a non-standard LOCALBASE to sshd
  	Add the ability to use a non-standard LOCALBASE to ssh
  
  Approved by:	cperciva (implicit)

Modified:
  stable/8/secure/usr.bin/ssh/Makefile
  stable/8/secure/usr.sbin/sshd/Makefile
Directory Properties:
  stable/8/secure/usr.bin/ssh/   (props changed)
  stable/8/secure/usr.sbin/sshd/   (props changed)

Modified: stable/8/secure/usr.bin/ssh/Makefile
==============================================================================
--- stable/8/secure/usr.bin/ssh/Makefile	Thu Mar 29 01:46:01 2012	(r233632)
+++ stable/8/secure/usr.bin/ssh/Makefile	Thu Mar 29 01:46:30 2012	(r233633)
@@ -25,22 +25,13 @@ DPADD+=	 ${LIBGSSAPI}
 LDADD+=	 -lgssapi
 .endif
 
-.if defined(X11BASE) || defined(LOCALBASE)
-# Recommended /etc/make.conf setting is X11BASE=${LOCALBASE} for x.org
-# 7.x upgrade on <= 6.2, but LOCALBASE has moved out of scope of src/
-# so we need to provide the default for users with old make.conf
-# settings.
-LOCALBASE?=	/usr/local
-
-# Users may override either LOCALBASE or X11BASE to move the location
-# of xauth
-X11BASE?=	${LOCALBASE}
-CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\"
-.endif
-
 DPADD+=	${LIBCRYPT} ${LIBCRYPTO}
 LDADD+=	-lcrypt -lcrypto
 
+.if defined(LOCALBASE)
+CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
+.endif
+
 .include 
 
 .PATH:	${SSHDIR}

Modified: stable/8/secure/usr.sbin/sshd/Makefile
==============================================================================
--- stable/8/secure/usr.sbin/sshd/Makefile	Thu Mar 29 01:46:01 2012	(r233632)
+++ stable/8/secure/usr.sbin/sshd/Makefile	Thu Mar 29 01:46:30 2012	(r233633)
@@ -38,22 +38,13 @@ DPADD+=	 ${LIBGSSAPI_KRB5} ${LIBGSSAPI} 
 LDADD+=	 -lgssapi_krb5 -lgssapi -lkrb5 -lasn1
 .endif
 
-.if defined(X11BASE)
-# Recommended /etc/make.conf setting is X11BASE=${LOCALBASE} for x.org
-# 7.x upgrade on <= 6.2, but LOCALBASE has moved out of scope of src/
-# so we need to provide the default for users with old make.conf
-# settings.
-LOCALBASE?=	/usr/local
-
-# Users may override either LOCALBASE or X11BASE to move the location
-# of xauth
-X11BASE?=	${LOCALBASE}
-CFLAGS+= -DXAUTH_PATH=\"${X11BASE}/bin/xauth\"
-.endif
-
 DPADD+=	${LIBCRYPTO} ${LIBCRYPT}
 LDADD+=	-lcrypto -lcrypt
 
+.if defined(LOCALBASE)
+CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
+.endif
+
 .include 
 
 .PATH:	${SSHDIR}

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Mar 29 02:45:51 2012
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 764191065746;
	Thu, 29 Mar 2012 02:45:51 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 60FD28FC0A;
	Thu, 29 Mar 2012 02:45:51 +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 q2T2jpDZ071986;
	Thu, 29 Mar 2012 02:45:51 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2T2jp7w071984;
	Thu, 29 Mar 2012 02:45:51 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203290245.q2T2jp7w071984@svn.freebsd.org>
From: Eitan Adler 
Date: Thu, 29 Mar 2012 02:45:51 +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: r233641 - stable/8/sbin/gvinum
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, 29 Mar 2012 02:45:51 -0000

Author: eadler
Date: Thu Mar 29 02:45:50 2012
New Revision: 233641
URL: http://svn.freebsd.org/changeset/base/233641

Log:
  MFC r227489:
  	- fix duplicate "a a" in some comments
  
  Approved by:	cperciva (implicit)

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

Modified: stable/8/sbin/gvinum/gvinum.c
==============================================================================
--- stable/8/sbin/gvinum/gvinum.c	Thu Mar 29 02:45:28 2012	(r233640)
+++ stable/8/sbin/gvinum/gvinum.c	Thu Mar 29 02:45:50 2012	(r233641)
@@ -556,7 +556,7 @@ find_pattern(char *line, char *pattern)
 	return (NULL);
 }
 
-/* Find a free name for an object given a a prefix. */
+/* Find a free name for an object given a prefix. */
 char *
 find_name(const char *prefix, int type, int namelen)
 {

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Mar 29 06:01:11 2012
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 E0D08106566B;
	Thu, 29 Mar 2012 06:01:11 +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 C98A78FC0A;
	Thu, 29 Mar 2012 06:01:11 +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 q2T61BQA078791;
	Thu, 29 Mar 2012 06:01:11 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2T61BTw078782;
	Thu, 29 Mar 2012 06:01:11 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201203290601.q2T61BTw078782@svn.freebsd.org>
From: Alan Cox 
Date: Thu, 29 Mar 2012 06:01:11 +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: r233649 - in stable/8/sys: amd64/amd64 amd64/include
	i386/conf i386/i386 i386/include kern 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: Thu, 29 Mar 2012 06:01:12 -0000

Author: alc
Date: Thu Mar 29 06:01:11 2012
New Revision: 233649
URL: http://svn.freebsd.org/changeset/base/233649

Log:
  MFC r233291
    Handle spurious page faults that may occur in no-fault sections of the
    kernel.

Modified:
  stable/8/sys/amd64/amd64/trap.c
  stable/8/sys/amd64/include/proc.h
  stable/8/sys/i386/i386/trap.c
  stable/8/sys/i386/include/proc.h
  stable/8/sys/kern/kern_subr.c
  stable/8/sys/kern/kern_sysctl.c
  stable/8/sys/sys/proc.h
  stable/8/sys/vm/vm_fault.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/amd64/amd64/trap.c
==============================================================================
--- stable/8/sys/amd64/amd64/trap.c	Thu Mar 29 05:02:12 2012	(r233648)
+++ stable/8/sys/amd64/amd64/trap.c	Thu Mar 29 06:01:11 2012	(r233649)
@@ -305,26 +305,6 @@ trap(struct trapframe *frame)
 	}
 
 	code = frame->tf_err;
-	if (type == T_PAGEFLT) {
-		/*
-		 * If we get a page fault while in a critical section, then
-		 * it is most likely a fatal kernel page fault.  The kernel
-		 * is already going to panic trying to get a sleep lock to
-		 * do the VM lookup, so just consider it a fatal trap so the
-		 * kernel can print out a useful trap message and even get
-		 * to the debugger.
-		 *
-		 * If we get a page fault while holding a non-sleepable
-		 * lock, then it is most likely a fatal kernel page fault.
-		 * If WITNESS is enabled, then it's going to whine about
-		 * bogus LORs with various VM locks, so just skip to the
-		 * fatal trap handling directly.
-		 */
-		if (td->td_critnest != 0 ||
-		    WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL,
-		    "Kernel page fault") != 0)
-			trap_fatal(frame, frame->tf_addr);
-	}
 
         if (ISPL(frame->tf_cs) == SEL_UPL) {
 		/* user trap */
@@ -657,6 +637,50 @@ trap_pfault(frame, usermode)
 	struct proc *p = td->td_proc;
 	vm_offset_t eva = frame->tf_addr;
 
+	if (__predict_false((td->td_pflags & TDP_NOFAULTING) != 0)) {
+		/*
+		 * Due to both processor errata and lazy TLB invalidation when
+		 * access restrictions are removed from virtual pages, memory
+		 * accesses that are allowed by the physical mapping layer may
+		 * nonetheless cause one spurious page fault per virtual page. 
+		 * When the thread is executing a "no faulting" section that
+		 * is bracketed by vm_fault_{disable,enable}_pagefaults(),
+		 * every page fault is treated as a spurious page fault,
+		 * unless it accesses the same virtual address as the most
+		 * recent page fault within the same "no faulting" section.
+		 */
+		if (td->td_md.md_spurflt_addr != eva ||
+		    (td->td_pflags & TDP_RESETSPUR) != 0) {
+			/*
+			 * Do nothing to the TLB.  A stale TLB entry is
+			 * flushed automatically by a page fault.
+			 */
+			td->td_md.md_spurflt_addr = eva;
+			td->td_pflags &= ~TDP_RESETSPUR;
+			return (0);
+		}
+	} else {
+		/*
+		 * If we get a page fault while in a critical section, then
+		 * it is most likely a fatal kernel page fault.  The kernel
+		 * is already going to panic trying to get a sleep lock to
+		 * do the VM lookup, so just consider it a fatal trap so the
+		 * kernel can print out a useful trap message and even get
+		 * to the debugger.
+		 *
+		 * If we get a page fault while holding a non-sleepable
+		 * lock, then it is most likely a fatal kernel page fault.
+		 * If WITNESS is enabled, then it's going to whine about
+		 * bogus LORs with various VM locks, so just skip to the
+		 * fatal trap handling directly.
+		 */
+		if (td->td_critnest != 0 ||
+		    WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL,
+		    "Kernel page fault") != 0) {
+			trap_fatal(frame, eva);
+			return (-1);
+		}
+	}
 	va = trunc_page(eva);
 	if (va >= VM_MIN_KERNEL_ADDRESS) {
 		/*

Modified: stable/8/sys/amd64/include/proc.h
==============================================================================
--- stable/8/sys/amd64/include/proc.h	Thu Mar 29 05:02:12 2012	(r233648)
+++ stable/8/sys/amd64/include/proc.h	Thu Mar 29 06:01:11 2012	(r233649)
@@ -46,6 +46,7 @@ struct proc_ldt {
 struct mdthread {
 	int	md_spinlock_count;	/* (k) */
 	register_t md_saved_flags;	/* (k) */
+	register_t md_spurflt_addr;	/* (k) Spurious page fault address. */
 };
 
 struct mdproc {

Modified: stable/8/sys/i386/i386/trap.c
==============================================================================
--- stable/8/sys/i386/i386/trap.c	Thu Mar 29 05:02:12 2012	(r233648)
+++ stable/8/sys/i386/i386/trap.c	Thu Mar 29 06:01:11 2012	(r233649)
@@ -333,28 +333,13 @@ trap(struct trapframe *frame)
 		 * For some Cyrix CPUs, %cr2 is clobbered by
 		 * interrupts.  This problem is worked around by using
 		 * an interrupt gate for the pagefault handler.  We
-		 * are finally ready to read %cr2 and then must
-		 * reenable interrupts.
-		 *
-		 * If we get a page fault while in a critical section, then
-		 * it is most likely a fatal kernel page fault.  The kernel
-		 * is already going to panic trying to get a sleep lock to
-		 * do the VM lookup, so just consider it a fatal trap so the
-		 * kernel can print out a useful trap message and even get
-		 * to the debugger.
-		 *
-		 * If we get a page fault while holding a non-sleepable
-		 * lock, then it is most likely a fatal kernel page fault.
-		 * If WITNESS is enabled, then it's going to whine about
-		 * bogus LORs with various VM locks, so just skip to the
-		 * fatal trap handling directly.
+		 * are finally ready to read %cr2 and conditionally
+		 * reenable interrupts.  If we hold a spin lock, then
+		 * we must not reenable interrupts.  This might be a
+		 * spurious page fault.
 		 */
 		eva = rcr2();
-		if (td->td_critnest != 0 ||
-		    WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL,
-		    "Kernel page fault") != 0)
-			trap_fatal(frame, eva);
-		else
+		if (td->td_md.md_spinlock_count == 0)
 			enable_intr();
 	}
 
@@ -807,6 +792,50 @@ trap_pfault(frame, usermode, eva)
 	struct thread *td = curthread;
 	struct proc *p = td->td_proc;
 
+	if (__predict_false((td->td_pflags & TDP_NOFAULTING) != 0)) {
+		/*
+		 * Due to both processor errata and lazy TLB invalidation when
+		 * access restrictions are removed from virtual pages, memory
+		 * accesses that are allowed by the physical mapping layer may
+		 * nonetheless cause one spurious page fault per virtual page. 
+		 * When the thread is executing a "no faulting" section that
+		 * is bracketed by vm_fault_{disable,enable}_pagefaults(),
+		 * every page fault is treated as a spurious page fault,
+		 * unless it accesses the same virtual address as the most
+		 * recent page fault within the same "no faulting" section.
+		 */
+		if (td->td_md.md_spurflt_addr != eva ||
+		    (td->td_pflags & TDP_RESETSPUR) != 0) {
+			/*
+			 * Do nothing to the TLB.  A stale TLB entry is
+			 * flushed automatically by a page fault.
+			 */
+			td->td_md.md_spurflt_addr = eva;
+			td->td_pflags &= ~TDP_RESETSPUR;
+			return (0);
+		}
+	} else {
+		/*
+		 * If we get a page fault while in a critical section, then
+		 * it is most likely a fatal kernel page fault.  The kernel
+		 * is already going to panic trying to get a sleep lock to
+		 * do the VM lookup, so just consider it a fatal trap so the
+		 * kernel can print out a useful trap message and even get
+		 * to the debugger.
+		 *
+		 * If we get a page fault while holding a non-sleepable
+		 * lock, then it is most likely a fatal kernel page fault.
+		 * If WITNESS is enabled, then it's going to whine about
+		 * bogus LORs with various VM locks, so just skip to the
+		 * fatal trap handling directly.
+		 */
+		if (td->td_critnest != 0 ||
+		    WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL,
+		    "Kernel page fault") != 0) {
+			trap_fatal(frame, eva);
+			return (-1);
+		}
+	}
 	va = trunc_page(eva);
 	if (va >= KERNBASE) {
 		/*

Modified: stable/8/sys/i386/include/proc.h
==============================================================================
--- stable/8/sys/i386/include/proc.h	Thu Mar 29 05:02:12 2012	(r233648)
+++ stable/8/sys/i386/include/proc.h	Thu Mar 29 06:01:11 2012	(r233649)
@@ -51,6 +51,7 @@ struct proc_ldt {
 struct mdthread {
 	int	md_spinlock_count;	/* (k) */
 	register_t md_saved_flags;	/* (k) */
+	register_t md_spurflt_addr;	/* (k) Spurious page fault address. */
 };
 
 struct mdproc {

Modified: stable/8/sys/kern/kern_subr.c
==============================================================================
--- stable/8/sys/kern/kern_subr.c	Thu Mar 29 05:02:12 2012	(r233648)
+++ stable/8/sys/kern/kern_subr.c	Thu Mar 29 06:01:11 2012	(r233649)
@@ -190,8 +190,12 @@ uiomove_faultflag(void *cp, int n, struc
 
 	/* XXX does it make a sense to set TDP_DEADLKTREAT for UIO_SYSSPACE ? */
 	newflags = TDP_DEADLKTREAT;
-	if (uio->uio_segflg == UIO_USERSPACE && nofault)
-		newflags |= TDP_NOFAULTING;
+	if (uio->uio_segflg == UIO_USERSPACE && nofault) {
+		/*
+		 * Fail if a non-spurious page fault occurs.
+		 */
+		newflags |= TDP_NOFAULTING | TDP_RESETSPUR;
+	}
 	save = curthread_pflags_set(newflags);
 
 	while (n > 0 && uio->uio_resid) {

Modified: stable/8/sys/kern/kern_sysctl.c
==============================================================================
--- stable/8/sys/kern/kern_sysctl.c	Thu Mar 29 05:02:12 2012	(r233648)
+++ stable/8/sys/kern/kern_sysctl.c	Thu Mar 29 06:01:11 2012	(r233649)
@@ -1251,8 +1251,8 @@ kernel_sysctlbyname(struct thread *td, c
 static int
 sysctl_old_user(struct sysctl_req *req, const void *p, size_t l)
 {
-	int error = 0;
 	size_t i, len, origidx;
+	int error;
 
 	origidx = req->oldidx;
 	req->oldidx += l;
@@ -1273,10 +1273,14 @@ sysctl_old_user(struct sysctl_req *req, 
 	else {
 		if (i > len - origidx)
 			i = len - origidx;
-		error = copyout(p, (char *)req->oldptr + origidx, i);
+		if (req->lock == REQ_WIRED) {
+			error = copyout_nofault(p, (char *)req->oldptr +
+			    origidx, i);
+		} else
+			error = copyout(p, (char *)req->oldptr + origidx, i);
+		if (error != 0)
+			return (error);
 	}
-	if (error)
-		return (error);
 	if (i < l)
 		return (ENOMEM);
 	return (0);

Modified: stable/8/sys/sys/proc.h
==============================================================================
--- stable/8/sys/sys/proc.h	Thu Mar 29 05:02:12 2012	(r233648)
+++ stable/8/sys/sys/proc.h	Thu Mar 29 06:01:11 2012	(r233649)
@@ -409,6 +409,7 @@ do {									\
 #define	TDP_CALLCHAIN	0x00400000 /* Capture thread's callchain */
 #define	TDP_IGNSUSP	0x00800000 /* Permission to ignore the MNTK_SUSPEND* */
 #define	TDP_AUDITREC	0x01000000 /* Audit record pending on thread */
+#define	TDP_RESETSPUR	0x04000000 /* Reset spurious page fault history. */
 
 /*
  * Reasons that the current thread can not be run yet.

Modified: stable/8/sys/vm/vm_fault.c
==============================================================================
--- stable/8/sys/vm/vm_fault.c	Thu Mar 29 05:02:12 2012	(r233648)
+++ stable/8/sys/vm/vm_fault.c	Thu Mar 29 06:01:11 2012	(r233649)
@@ -1409,11 +1409,17 @@ vm_fault_additional_pages(m, rbehind, ra
 	return i;
 }
 
+/*
+ * Block entry into the machine-independent layer's page fault handler by
+ * the calling thread.  Subsequent calls to vm_fault() by that thread will
+ * return KERN_PROTECTION_FAILURE.  Enable machine-dependent handling of
+ * spurious page faults. 
+ */
 int
 vm_fault_disable_pagefaults(void)
 {
 
-	return (curthread_pflags_set(TDP_NOFAULTING));
+	return (curthread_pflags_set(TDP_NOFAULTING | TDP_RESETSPUR));
 }
 
 void

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Mar 29 12:03:07 2012
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 60B52106566C;
	Thu, 29 Mar 2012 12:03:07 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 316538FC0C;
	Thu, 29 Mar 2012 12:03:07 +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 q2TC36C9091811;
	Thu, 29 Mar 2012 12:03:06 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2TC36Td091809;
	Thu, 29 Mar 2012 12:03:06 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201203291203.q2TC36Td091809@svn.freebsd.org>
From: Ken Smith 
Date: Thu, 29 Mar 2012 12:03:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233658 - stable/8/release/scripts
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, 29 Mar 2012 12:03:07 -0000

Author: kensmith
Date: Thu Mar 29 12:03:06 2012
New Revision: 233658
URL: http://svn.freebsd.org/changeset/base/233658

Log:
  Adjust for the set of packages that will ship with 8.3-RELEASE.  At this
  point only the English documentation package fits on disc1.  All of the
  documentation packages will be provided on the memstick images but no
  other packages.  The DVD image will have enough packages to set up a
  basic graphical workstation.
  
  Reviewed by:	portmgr, re

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

Modified: stable/8/release/scripts/package-split.py
==============================================================================
--- stable/8/release/scripts/package-split.py	Thu Mar 29 11:46:29 2012	(r233657)
+++ stable/8/release/scripts/package-split.py	Thu Mar 29 12:03:06 2012	(r233658)
@@ -23,18 +23,28 @@ if 'PKG_VERBOSE' in os.environ:
 else:
     verbose = 0
 
+if 'PKG_MEMSTICK' in os.environ:
+    doing_memstick = 1
+else:
+    doing_memstick = 0
+
 if 'PKG_DVD' in os.environ:
     doing_dvd = 1
 else:
     doing_dvd = 0
 
-# List of packages for disc1.
+# List of packages.  At this point only the English documentation fits
+# on disc1.  Add in the rest of the documentation for the memstick image.
+# And add in enough packages to make a basic graphical workstation for the
+# dvd image.
 def disc1_packages():
-    pkgs = ['misc/freebsd-doc-bn', 
+    pkgs = ['misc/freebsd-doc-en'] 
+
+    if doing_memstick or doing_dvd:
+        pkgs.extend(['misc/freebsd-doc-bn', 
 	    'misc/freebsd-doc-da',
 	    'misc/freebsd-doc-de',
 	    'misc/freebsd-doc-el',
-	    'misc/freebsd-doc-en',
 	    'misc/freebsd-doc-es',
 	    'misc/freebsd-doc-fr',
 	    'misc/freebsd-doc-hu',
@@ -48,22 +58,24 @@ def disc1_packages():
 	    'misc/freebsd-doc-sr',
 	    'misc/freebsd-doc-tr',
 	    'misc/freebsd-doc-zh_cn',
-	    'misc/freebsd-doc-zh_tw']
+	    'misc/freebsd-doc-zh_tw'])
 
     if doing_dvd:
 	pkgs.extend(['archivers/unzip',
 	    'emulators/linux_base-f10',
-	    'lang/perl5.10',
+	    'lang/perl5.12',
+	    'misc/freebsd-doc-all',
 	    'net/mpd5',
 	    'net/rsync',
-	    'ports-mgmt/p5-FreeBSD-Portindex',
 	    'ports-mgmt/portaudit',
 	    'ports-mgmt/portmaster',
-	    'ports-mgmt/portupgrade',
 	    'shells/bash',
 	    'shells/zsh',
 	    'security/sudo',
 	    'sysutils/screen',
+	    'www/firefox',
+	    'www/links',
+	    'x11-drivers/xf86-video-vmware',
 	    'x11/gnome2',
 	    'x11/kde4',
 	    'x11/xorg'])

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Mar 29 23:58:16 2012
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 EDC381065686;
	Thu, 29 Mar 2012 23:58:16 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D7A458FC0A;
	Thu, 29 Mar 2012 23:58:16 +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 q2TNwGLp015858;
	Thu, 29 Mar 2012 23:58:16 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2TNwGva015856;
	Thu, 29 Mar 2012 23:58:16 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203292358.q2TNwGva015856@svn.freebsd.org>
From: Eitan Adler 
Date: Thu, 29 Mar 2012 23:58:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233686 - stable/8/usr.sbin/pkg_install/create
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, 29 Mar 2012 23:58:17 -0000

Author: eadler
Date: Thu Mar 29 23:58:16 2012
New Revision: 233686
URL: http://svn.freebsd.org/changeset/base/233686

Log:
  MFC r231300, r231328:
  	Permit the use of relative paths for the prefix argument.
  	Remove an unnecessary cwd from created plists when -p is specified
  
  Approved by:	cperciva (implicit)

Modified:
  stable/8/usr.sbin/pkg_install/create/perform.c
Directory Properties:
  stable/8/usr.sbin/pkg_install/   (props changed)

Modified: stable/8/usr.sbin/pkg_install/create/perform.c
==============================================================================
--- stable/8/usr.sbin/pkg_install/create/perform.c	Thu Mar 29 23:57:54 2012	(r233685)
+++ stable/8/usr.sbin/pkg_install/create/perform.c	Thu Mar 29 23:58:16 2012	(r233686)
@@ -214,8 +214,12 @@ pkg_perform(char **pkgs)
     read_plist(&plist, pkg_in);
 
     /* Prefix should add an @cwd to the packing list */
-    if (Prefix)
-	add_plist_top(&plist, PLIST_CWD, Prefix);
+    if (Prefix) {
+        char resolved_prefix[PATH_MAX];
+        if (realpath(Prefix, resolved_prefix) == NULL)
+	    err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix);
+	add_plist_top(&plist, PLIST_CWD, resolved_prefix);
+    }
 
     /* Add the origin if asked, at the top */
     if (Origin)
@@ -260,7 +264,9 @@ pkg_perform(char **pkgs)
     /* mark_plist(&plist); */
 
     /* Now put the release specific items in */
-    add_plist(&plist, PLIST_CWD, ".");
+    if (!Prefix) {
+	add_plist(&plist, PLIST_CWD, ".");
+    }
     write_file(COMMENT_FNAME, Comment);
     add_plist(&plist, PLIST_IGNORE, NULL);
     add_plist(&plist, PLIST_FILE, COMMENT_FNAME);

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 30 17:38:58 2012
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 1B4F9106566C;
	Fri, 30 Mar 2012 17:38:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E05478FC1A;
	Fri, 30 Mar 2012 17:38: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 q2UHcvMO051455;
	Fri, 30 Mar 2012 17:38:57 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2UHcvqo051452;
	Fri, 30 Mar 2012 17:38:57 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201203301738.q2UHcvqo051452@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 30 Mar 2012 17:38: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: r233706 - in stable/8/sys: dev/twa i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 30 Mar 2012 17:38:58 -0000

Author: jhb
Date: Fri Mar 30 17:38:57 2012
New Revision: 233706
URL: http://svn.freebsd.org/changeset/base/233706

Log:
  MFC 232669:
  Use bus_get_dma_tag() to inherit the 4G boundary restriction from the
  parent PCI bus and remove the home-grown version in this driver.

Modified:
  stable/8/sys/dev/twa/tw_osl.h
  stable/8/sys/dev/twa/tw_osl_freebsd.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/twa/tw_osl.h
==============================================================================
--- stable/8/sys/dev/twa/tw_osl.h	Fri Mar 30 17:38:28 2012	(r233705)
+++ stable/8/sys/dev/twa/tw_osl.h	Fri Mar 30 17:38:57 2012	(r233706)
@@ -55,12 +55,6 @@
 #define TW_OSLI_MAX_NUM_IOS		(TW_OSLI_MAX_NUM_REQUESTS - 2)
 #define TW_OSLI_MAX_NUM_AENS		0x100
 
-#ifdef PAE
-#define	TW_OSLI_DMA_BOUNDARY		(1u << 31)
-#else
-#define	TW_OSLI_DMA_BOUNDARY		((bus_size_t)((uint64_t)1 << 32))
-#endif
-
 /* Possible values of req->state. */
 #define TW_OSLI_REQ_STATE_INIT		0x0	/* being initialized */
 #define TW_OSLI_REQ_STATE_BUSY		0x1	/* submitted to CL */

Modified: stable/8/sys/dev/twa/tw_osl_freebsd.c
==============================================================================
--- stable/8/sys/dev/twa/tw_osl_freebsd.c	Fri Mar 30 17:38:28 2012	(r233705)
+++ stable/8/sys/dev/twa/tw_osl_freebsd.c	Fri Mar 30 17:38:57 2012	(r233706)
@@ -562,9 +562,9 @@ tw_osli_alloc_mem(struct twa_softc *sc)
 	}
 
 	/* Create the parent dma tag. */
-	if (bus_dma_tag_create(NULL,			/* parent */
+	if (bus_dma_tag_create(bus_get_dma_tag(sc->bus_dev), /* parent */
 				sc->alignment,		/* alignment */
-				TW_OSLI_DMA_BOUNDARY,	/* boundary */
+				0,			/* boundary */
 				BUS_SPACE_MAXADDR,	/* lowaddr */
 				BUS_SPACE_MAXADDR, 	/* highaddr */
 				NULL, NULL, 		/* filter, filterarg */

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 30 23:48:16 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 66168106566B;
	Fri, 30 Mar 2012 23:48:16 +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 464FF8FC15;
	Fri, 30 Mar 2012 23:48:16 +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 q2UNmGqJ063503;
	Fri, 30 Mar 2012 23:48:16 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2UNmG6L063497;
	Fri, 30 Mar 2012 23:48:16 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203302348.q2UNmG6L063497@svn.freebsd.org>
From: Marius Strobl 
Date: Fri, 30 Mar 2012 23:48:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233714 - in stable/8: sbin/atacontrol sys/dev/ata
	sys/i386/conf usr.sbin/burncd
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, 30 Mar 2012 23:48:16 -0000

Author: marius
Date: Fri Mar 30 23:48:15 2012
New Revision: 233714
URL: http://svn.freebsd.org/changeset/base/233714

Log:
  MFC: r226179
  
  Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
  option is defined.  This sysctl can be queried by feature_present(3).
  
  Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
  If these utilities detect that ATA_CAM is enabled, then these utilities
  will error out.  These utilities are compatible with the old ATA
  driver, but are incomptible with the new ATA_CAM driver.  By erroring out,
  we give end-users an idea as to what remedies to use, and reduce the need for them
  to file PR's.  For atacontrol, camcontrol must be used instead,
  and for burncd, alternative utilties from the ports collection must be used
  such as sysutils/cdrtools.
  
  In future, maybe someone can re-write burncd to work with ATA_CAM,
  but at least for now, we give a somewhat useful error message to end users.
  
  PR:		160979
  Reviewed by:	jh, Arnaud Lacombe 
  Reported by:	Joe Barbish 

Modified:
  stable/8/sbin/atacontrol/atacontrol.8
  stable/8/sbin/atacontrol/atacontrol.c
  stable/8/sys/dev/ata/ata-all.c
  stable/8/usr.sbin/burncd/burncd.8
  stable/8/usr.sbin/burncd/burncd.c
Directory Properties:
  stable/8/sbin/atacontrol/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)
  stable/8/usr.sbin/burncd/   (props changed)

Modified: stable/8/sbin/atacontrol/atacontrol.8
==============================================================================
--- stable/8/sbin/atacontrol/atacontrol.8	Fri Mar 30 23:39:39 2012	(r233713)
+++ stable/8/sbin/atacontrol/atacontrol.8	Fri Mar 30 23:48:15 2012	(r233714)
@@ -25,12 +25,19 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 21, 2009
+.Dd October 9, 2011
 .Dt ATACONTROL 8
 .Os
 .Sh NAME
 .Nm atacontrol
 .Nd ATA device driver control program
+.Pp
+This utility was
+.Em deprecated
+in
+.Fx 9.0 .
+See
+.Sx NOTES .
 .Sh SYNOPSIS
 .Nm
 .Aq Ar command
@@ -361,11 +368,17 @@ or syslog logging on it as the disk will
 up all the time.
 .Sh SEE ALSO
 .Xr ata 4
+.Xr cam 4
+.Xr camcontrol 8
 .Sh HISTORY
 The
 .Nm
 utility first appeared in
 .Fx 4.6 .
+.Pp
+.Nm
+was deprecated in
+.Fx 9.0 .
 .Sh AUTHORS
 .An -nosplit
 The
@@ -377,3 +390,16 @@ utility was written by
 This manual page was written by
 .An S\(/oren Schmidt
 .Aq sos@FreeBSD.org .
+.Sh NOTES
+The
+.Nm
+utility was deprecated in
+.Fx 9.0 .
+When
+.Bd -ragged -offset indent
+.Cd "options ATA_CAM"
+.Ed
+.Pp
+is compiled into the kernel, then
+.Xr camcontrol 8
+must be used instead.

Modified: stable/8/sbin/atacontrol/atacontrol.c
==============================================================================
--- stable/8/sbin/atacontrol/atacontrol.c	Fri Mar 30 23:39:39 2012	(r233713)
+++ stable/8/sbin/atacontrol/atacontrol.c	Fri Mar 30 23:48:15 2012	(r233714)
@@ -378,6 +378,11 @@ main(int argc, char **argv)
 {
 	int fd, mode, channel, array;
 
+	if (feature_present("ata_cam")) {
+		errx(1, "\nATA_CAM option is enabled in kernel.\n"
+		    "Please use camcontrol instead.");
+	}
+
 	if (argc < 2)
 		usage();
 

Modified: stable/8/sys/dev/ata/ata-all.c
==============================================================================
--- stable/8/sys/dev/ata/ata-all.c	Fri Mar 30 23:39:39 2012	(r233713)
+++ stable/8/sys/dev/ata/ata-all.c	Fri Mar 30 23:48:15 2012	(r233714)
@@ -119,6 +119,9 @@ SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLA
 TUNABLE_INT("hw.ata.setmax", &ata_setmax);
 SYSCTL_INT(_hw_ata, OID_AUTO, setmax, CTLFLAG_RDTUN, &ata_setmax, 0,
 	   "ATA disk set max native address");
+#ifdef ATA_CAM
+FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver");
+#endif
 
 /*
  * newbus device interface related functions

Modified: stable/8/usr.sbin/burncd/burncd.8
==============================================================================
--- stable/8/usr.sbin/burncd/burncd.8	Fri Mar 30 23:39:39 2012	(r233713)
+++ stable/8/usr.sbin/burncd/burncd.8	Fri Mar 30 23:48:15 2012	(r233714)
@@ -27,12 +27,19 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 21, 2009
+.Dd October 9, 2011
 .Dt BURNCD 8
 .Os
 .Sh NAME
 .Nm burncd
 .Nd control the ATAPI CD-R/RW driver
+.Pp
+This utility was
+.Em deprecated
+in
+.Fx 9.0 .
+See
+.Sx NOTES .
 .Sh SYNOPSIS
 .Nm
 .Op Fl deFlmnpqtv
@@ -213,6 +220,10 @@ The
 .Nm
 utility appeared in
 .Fx 4.0 .
+.Pp
+.Nm
+was deprecated in
+.Fx 9.0 .
 .Sh AUTHORS
 The
 .Nm
@@ -222,3 +233,19 @@ Denmark
 .Aq sos@FreeBSD.org .
 .Sh BUGS
 Probably, please report when found.
+.Sh NOTES
+When
+.Bd -ragged -offset indent
+.Cd "options ATA_CAM"
+.Ed
+.Pp
+is compiled into the kernel, then
+.Xr cdrecord 1 ,
+available in the
+.Fx
+Ports Collection as part of the
+.Pa sysutils/cdrtools
+port, must be used instead.
+Refer to:
+.Pp
+http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD

Modified: stable/8/usr.sbin/burncd/burncd.c
==============================================================================
--- stable/8/usr.sbin/burncd/burncd.c	Fri Mar 30 23:39:39 2012	(r233713)
+++ stable/8/usr.sbin/burncd/burncd.c	Fri Mar 30 23:48:15 2012	(r233714)
@@ -82,6 +82,13 @@ main(int argc, char **argv)
 	int block_size = 0, block_type = 0, cdopen = 0, dvdrw = 0;
 	const char *dev, *env_speed;
 
+	if (feature_present("ata_cam")) {
+		errx(1, "\nATA_CAM option is enabled in kernel.\n"
+		    "Install the sysutils/cdrtools port and use cdrecord instead.\n\n"
+		    "Please refer to:\n"
+		    "http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD");
+	}
+
 	if ((dev = getenv("CDROM")) == NULL)
 		dev = "/dev/acd0";
 

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 30 23:50:26 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id DEE291065677;
	Fri, 30 Mar 2012 23:50:26 +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 C72428FC12;
	Fri, 30 Mar 2012 23:50:26 +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 q2UNoQk7063663;
	Fri, 30 Mar 2012 23:50:26 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2UNoQqt063656;
	Fri, 30 Mar 2012 23:50:26 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203302350.q2UNoQqt063656@svn.freebsd.org>
From: Marius Strobl 
Date: Fri, 30 Mar 2012 23:50:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233716 - in stable/8/sys: dev/ata dev/ata/chipsets
	i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 30 Mar 2012 23:50:27 -0000

Author: marius
Date: Fri Mar 30 23:50:26 2012
New Revision: 233716
URL: http://svn.freebsd.org/changeset/base/233716

Log:
  MFC: r233274
  
  Remove remnants of ATA_LOCKING uses in the ATA_CAM case and wrap it
  along with functions, SYSCTLs and tunables that are not used with
  ATA_CAM in #ifndef ATA_CAM, similar to the existing #ifdef'ed ATA_CAM
  code for the other way around. This makes it easier to understand
  which parts of ata(4) actually are used in the new world order and
  to later on remove the !ATA_CAM bits. It also makes it obvious that
  there is something fishy with the C-bus front-end as well as in the
  ATP850 support, as these used ATA_LOCKING which is defunct in the
  ATA_CAM case. When fixing the former, ATA_LOCKING probably needs to
  be brought back in some form or other.
  
  Reviewed by:	mav

Modified:
  stable/8/sys/dev/ata/ata-all.c
  stable/8/sys/dev/ata/ata-cbus.c
  stable/8/sys/dev/ata/ata-pci.c
  stable/8/sys/dev/ata/ata-pci.h
  stable/8/sys/dev/ata/ata-queue.c
  stable/8/sys/dev/ata/chipsets/ata-acard.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/ata/ata-all.c
==============================================================================
--- stable/8/sys/dev/ata/ata-all.c	Fri Mar 30 23:50:16 2012	(r233715)
+++ stable/8/sys/dev/ata/ata-all.c	Fri Mar 30 23:50:26 2012	(r233716)
@@ -78,9 +78,11 @@ static void ataaction(struct cam_sim *si
 static void atapoll(struct cam_sim *sim);
 #endif
 static void ata_conn_event(void *, int);
+#ifndef ATA_CAM
 static void bswap(int8_t *, int);
 static void btrim(int8_t *, int);
 static void bpack(int8_t *, int8_t *, int);
+#endif
 static void ata_interrupt_locked(void *data);
 #ifdef ATA_CAM
 static void ata_periodic_poll(void *data);
@@ -89,27 +91,36 @@ static void ata_periodic_poll(void *data
 /* global vars */
 MALLOC_DEFINE(M_ATA, "ata_generic", "ATA driver generic layer");
 int (*ata_raid_ioctl_func)(u_long cmd, caddr_t data) = NULL;
+#ifndef ATA_CAM
 struct intr_config_hook *ata_delayed_attach = NULL;
+#endif
 devclass_t ata_devclass;
 uma_zone_t ata_request_zone;
 uma_zone_t ata_composite_zone;
+#ifndef ATA_CAM
 int ata_wc = 1;
 int ata_setmax = 0;
+#endif
 int ata_dma_check_80pin = 1;
 
 /* local vars */
+#ifndef ATA_CAM
 static int ata_dma = 1;
 static int atapi_dma = 1;
+#endif
 
 /* sysctl vars */
 SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters");
+#ifndef ATA_CAM
 TUNABLE_INT("hw.ata.ata_dma", &ata_dma);
 SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RDTUN, &ata_dma, 0,
 	   "ATA disk DMA mode control");
+#endif
 TUNABLE_INT("hw.ata.ata_dma_check_80pin", &ata_dma_check_80pin);
 SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma_check_80pin,
 	   CTLFLAG_RW, &ata_dma_check_80pin, 1,
 	   "Check for 80pin cable before setting ATA DMA mode");
+#ifndef ATA_CAM
 TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma);
 SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RDTUN, &atapi_dma, 0,
 	   "ATAPI device DMA mode control");
@@ -119,6 +130,7 @@ SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLA
 TUNABLE_INT("hw.ata.setmax", &ata_setmax);
 SYSCTL_INT(_hw_ata, OID_AUTO, setmax, CTLFLAG_RDTUN, &ata_setmax, 0,
 	   "ATA disk set max native address");
+#endif
 #ifdef ATA_CAM
 FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver");
 #endif
@@ -185,13 +197,13 @@ ata_attach(device_t dev)
 	callout_init(&ch->poll_callout, 1);
 #endif
 
+#ifndef ATA_CAM
     /* reset the controller HW, the channel and device(s) */
     while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit)
 	pause("ataatch", 1);
-#ifndef ATA_CAM
     ATA_RESET(dev);
-#endif
     ATA_LOCKING(dev, ATA_LF_UNLOCK);
+#endif
 
     /* allocate DMA resources if DMA HW present*/
     if (ch->dma.alloc)
@@ -605,6 +617,7 @@ ata_print_cable(device_t dev, u_int8_t *
                   "DMA limited to UDMA33, %s found non-ATA66 cable\n", who);
 }
 
+#ifndef ATA_CAM
 int
 ata_check_80pin(device_t dev, int mode)
 {
@@ -622,7 +635,9 @@ ata_check_80pin(device_t dev, int mode)
     }
     return mode;
 }
+#endif
 
+#ifndef ATA_CAM
 void
 ata_setmode(device_t dev)
 {
@@ -643,6 +658,7 @@ ata_setmode(device_t dev)
 		    (error) ? "FAILURE " : "", ata_mode2str(mode));
 	atadev->mode = mode;
 }
+#endif
 
 /*
  * device related interfaces
@@ -731,6 +747,7 @@ ata_ioctl(struct cdev *dev, u_long cmd, 
 }
 #endif
 
+#ifndef ATA_CAM
 int
 ata_device_ioctl(device_t dev, u_long cmd, caddr_t data)
 {
@@ -829,6 +846,7 @@ ata_device_ioctl(device_t dev, u_long cm
 	return ENOTTY;
     }
 }
+#endif
 
 #ifndef ATA_CAM
 static void
@@ -877,6 +895,7 @@ ata_add_child(device_t parent, struct at
 }
 #endif
 
+#ifndef ATA_CAM
 int
 ata_getparam(struct ata_device *atadev, int init)
 {
@@ -982,6 +1001,7 @@ ata_getparam(struct ata_device *atadev, 
     }
     return error;
 }
+#endif
 
 #ifndef ATA_CAM
 int
@@ -1187,6 +1207,7 @@ ata_udelay(int interval)
 	pause("ataslp", interval/(1000000/hz));
 }
 
+#ifndef ATA_CAM
 char *
 ata_unit2str(struct ata_device *atadev)
 {
@@ -1199,6 +1220,7 @@ ata_unit2str(struct ata_device *atadev)
 	sprintf(str, "%s", atadev->unit == ATA_MASTER ? "master" : "slave");
     return str;
 }
+#endif
 
 const char *
 ata_mode2str(int mode)
@@ -1259,6 +1281,7 @@ ata_str2mode(const char *str)
 	return (-1);
 }
 
+#ifndef ATA_CAM
 const char *
 ata_satarev2str(int rev)
 {
@@ -1271,6 +1294,7 @@ ata_satarev2str(int rev)
 	default: return "???";
 	}
 }
+#endif
 
 int
 ata_atapi(device_t dev, int target)
@@ -1280,6 +1304,7 @@ ata_atapi(device_t dev, int target)
     return (ch->devices & (ATA_ATAPI_MASTER << target));
 }
 
+#ifndef ATA_CAM
 int
 ata_pmode(struct ata_params *ap)
 {
@@ -1303,7 +1328,9 @@ ata_pmode(struct ata_params *ap)
 	return ATA_PIO0;
     return ATA_PIO0;
 }
+#endif
 
+#ifndef ATA_CAM
 int
 ata_wmode(struct ata_params *ap)
 {
@@ -1315,7 +1342,9 @@ ata_wmode(struct ata_params *ap)
 	return ATA_WDMA0;
     return -1;
 }
+#endif
 
+#ifndef ATA_CAM
 int
 ata_umode(struct ata_params *ap)
 {
@@ -1337,7 +1366,9 @@ ata_umode(struct ata_params *ap)
     }
     return -1;
 }
+#endif
 
+#ifndef ATA_CAM
 int
 ata_limit_mode(device_t dev, int mode, int maxmode)
 {
@@ -1357,7 +1388,9 @@ ata_limit_mode(device_t dev, int mode, i
 
     return mode;
 }
+#endif
 
+#ifndef ATA_CAM
 static void
 bswap(int8_t *buf, int len)
 {
@@ -1366,7 +1399,9 @@ bswap(int8_t *buf, int len)
     while (--ptr >= (u_int16_t*)buf)
 	*ptr = ntohs(*ptr);
 }
+#endif
 
+#ifndef ATA_CAM
 static void
 btrim(int8_t *buf, int len)
 {
@@ -1378,7 +1413,9 @@ btrim(int8_t *buf, int len)
     for (ptr = buf + len - 1; ptr >= buf && *ptr == ' '; --ptr)
 	*ptr = 0;
 }
+#endif
 
+#ifndef ATA_CAM
 static void
 bpack(int8_t *src, int8_t *dst, int len)
 {
@@ -1401,6 +1438,7 @@ bpack(int8_t *src, int8_t *dst, int len)
     if (j < len)
 	dst[j] = 0x00;
 }
+#endif
 
 #ifdef ATA_CAM
 void

Modified: stable/8/sys/dev/ata/ata-cbus.c
==============================================================================
--- stable/8/sys/dev/ata/ata-cbus.c	Fri Mar 30 23:50:16 2012	(r233715)
+++ stable/8/sys/dev/ata/ata-cbus.c	Fri Mar 30 23:50:26 2012	(r233716)
@@ -339,11 +339,14 @@ static int
 ata_cbuschannel_banking(device_t dev, int flags)
 {
     struct ata_cbus_controller *ctlr = device_get_softc(device_get_parent(dev));
+#ifndef ATA_CAM
     struct ata_channel *ch = device_get_softc(dev);
+#endif
     int res;
 
     mtx_lock(&ctlr->bank_mtx);
     switch (flags) {
+#ifndef ATA_CAM
     case ATA_LF_LOCK:
 	if (ctlr->locked_bank == -1)
 	    ctlr->locked_bank = ch->unit;
@@ -368,6 +371,7 @@ ata_cbuschannel_banking(device_t dev, in
 	    }
 	}
 	break;
+#endif
 
     case ATA_LF_WHICH:
 	break;
@@ -385,8 +389,10 @@ static device_method_t ata_cbuschannel_m
     DEVMETHOD(device_suspend,   ata_cbuschannel_suspend),
     DEVMETHOD(device_resume,    ata_cbuschannel_resume),
 
+#ifndef ATA_CAM
     /* ATA methods */
     DEVMETHOD(ata_locking,      ata_cbuschannel_banking),
+#endif
     { 0, 0 }
 };
 

Modified: stable/8/sys/dev/ata/ata-pci.c
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.c	Fri Mar 30 23:50:16 2012	(r233715)
+++ stable/8/sys/dev/ata/ata-pci.c	Fri Mar 30 23:50:26 2012	(r233716)
@@ -704,6 +704,7 @@ ata_pcichannel_resume(device_t dev)
 }
 
 
+#ifndef ATA_CAM
 static int
 ata_pcichannel_locking(device_t dev, int mode)
 {
@@ -715,6 +716,7 @@ ata_pcichannel_locking(device_t dev, int
     else
 	return ch->unit;
 }
+#endif
 
 static void
 ata_pcichannel_reset(device_t dev)
@@ -771,7 +773,9 @@ static device_method_t ata_pcichannel_me
     /* ATA methods */
     DEVMETHOD(ata_setmode,      ata_pcichannel_setmode),
     DEVMETHOD(ata_getrev,       ata_pcichannel_getrev),
+#ifndef ATA_CAM
     DEVMETHOD(ata_locking,      ata_pcichannel_locking),
+#endif
     DEVMETHOD(ata_reset,        ata_pcichannel_reset),
 
     { 0, 0 }

Modified: stable/8/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.h	Fri Mar 30 23:50:16 2012	(r233715)
+++ stable/8/sys/dev/ata/ata-pci.h	Fri Mar 30 23:50:26 2012	(r233716)
@@ -62,7 +62,9 @@ struct ata_pci_controller {
     int                 (*ch_detach)(device_t);
     int                 (*ch_suspend)(device_t);
     int                 (*ch_resume)(device_t);
+#ifndef ATA_CAM
     int                 (*locking)(device_t, int);
+#endif
     void                (*reset)(device_t);
     int                 (*setmode)(device_t, int, int);
     int                 (*getrev)(device_t, int);

Modified: stable/8/sys/dev/ata/ata-queue.c
==============================================================================
--- stable/8/sys/dev/ata/ata-queue.c	Fri Mar 30 23:50:16 2012	(r233715)
+++ stable/8/sys/dev/ata/ata-queue.c	Fri Mar 30 23:50:26 2012	(r233716)
@@ -43,11 +43,14 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifndef ATA_CAM
 /* prototypes */
 static void ata_completed(void *, int);
 static void ata_sort_queue(struct ata_channel *ch, struct ata_request *request);
-static char *ata_skey2str(u_int8_t);
+static const char *ata_skey2str(u_int8_t);
+#endif
 
+#ifndef ATA_CAM
 void
 ata_queue_request(struct ata_request *request)
 {
@@ -123,7 +126,9 @@ ata_queue_request(struct ata_request *re
 	sema_destroy(&request->done);
     }
 }
+#endif
 
+#ifndef ATA_CAM
 int
 ata_controlcmd(device_t dev, u_int8_t command, u_int16_t feature,
 	       u_int64_t lba, u_int16_t count)
@@ -153,7 +158,9 @@ ata_controlcmd(device_t dev, u_int8_t co
     }
     return error;
 }
+#endif
 
+#ifndef ATA_CAM
 int
 ata_atapicmd(device_t dev, u_int8_t *ccb, caddr_t data,
 	     int count, int flags, int timeout)
@@ -176,7 +183,9 @@ ata_atapicmd(device_t dev, u_int8_t *ccb
     }
     return error;
 }
+#endif
 
+#ifndef ATA_CAM
 void
 ata_start(device_t dev)
 {
@@ -235,7 +244,9 @@ ata_start(device_t dev)
 	}
     }
 }
+#endif
 
+#ifndef ATA_CAM
 void
 ata_finish(struct ata_request *request)
 {
@@ -263,7 +274,9 @@ ata_finish(struct ata_request *request)
 	}
     }
 }
+#endif
 
+#ifndef ATA_CAM
 static void
 ata_completed(void *context, int dummy)
 {
@@ -495,6 +508,7 @@ ata_completed(void *context, int dummy)
     if (ch)
 	ata_start(ch->dev);
 }
+#endif
 
 void
 ata_timeout(struct ata_request *request)
@@ -520,8 +534,8 @@ ata_timeout(struct ata_request *request)
 	ata_cam_end_transaction(ch->dev, request);
 #endif
 	mtx_unlock(&ch->state_mtx);
-	ATA_LOCKING(ch->dev, ATA_LF_UNLOCK);
 #ifndef ATA_CAM
+	ATA_LOCKING(ch->dev, ATA_LF_UNLOCK);
 	ata_finish(request);
 #endif
     }
@@ -530,6 +544,7 @@ ata_timeout(struct ata_request *request)
     }
 }
 
+#ifndef ATA_CAM
 void
 ata_fail_requests(device_t dev)
 {
@@ -568,7 +583,9 @@ ata_fail_requests(device_t dev)
         ata_finish(request);
     }
 }
+#endif
 
+#ifndef ATA_CAM
 /*
  * Rudely drop all requests queued to the channel of specified device.
  * XXX: The requests are leaked, use only in fatal case.
@@ -586,7 +603,9 @@ ata_drop_requests(device_t dev)
     }
     mtx_unlock(&ch->queue_mtx);
 }
+#endif
 
+#ifndef ATA_CAM
 static u_int64_t
 ata_get_lba(struct ata_request *request)
 {
@@ -608,7 +627,9 @@ ata_get_lba(struct ata_request *request)
     else
 	return request->u.ata.lba;
 }
+#endif
 
+#ifndef ATA_CAM
 static void
 ata_sort_queue(struct ata_channel *ch, struct ata_request *request)
 {
@@ -661,6 +682,7 @@ ata_sort_queue(struct ata_channel *ch, s
 	ch->freezepoint = request;
     TAILQ_INSERT_AFTER(&ch->ata_queue, this, request, chain);
 }
+#endif
 
 char *
 ata_cmd2str(struct ata_request *request)
@@ -776,7 +798,8 @@ ata_cmd2str(struct ata_request *request)
     return buffer;
 }
 
-static char *
+#ifndef ATA_CAM
+static const char *
 ata_skey2str(u_int8_t skey)
 {
     switch (skey) {
@@ -799,3 +822,4 @@ ata_skey2str(u_int8_t skey)
     default: return("UNKNOWN");
     }
 }
+#endif

Modified: stable/8/sys/dev/ata/chipsets/ata-acard.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-acard.c	Fri Mar 30 23:50:16 2012	(r233715)
+++ stable/8/sys/dev/ata/chipsets/ata-acard.c	Fri Mar 30 23:50:26 2012	(r233716)
@@ -51,26 +51,29 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifndef ATA_CAM
 struct ata_serialize {
     struct mtx  locked_mtx;
     int         locked_ch;
     int         restart_ch;
 };
+#endif
 
 /* local prototypes */
 static int ata_acard_chipinit(device_t dev);
-static int ata_acard_chipdeinit(device_t dev);
 static int ata_acard_ch_attach(device_t dev);
 static int ata_acard_status(device_t dev);
 static int ata_acard_850_setmode(device_t dev, int target, int mode);
 static int ata_acard_86X_setmode(device_t dev, int target, int mode);
+#ifndef ATA_CAM
+static int ata_acard_chipdeinit(device_t dev);
 static int ata_serialize(device_t dev, int flags);
 static void ata_serialize_init(struct ata_serialize *serial);
+#endif
 
 /* misc defines */
 #define ATP_OLD		1
 
-
 /*
  * Acard chipset support functions
  */
@@ -94,7 +97,9 @@ ata_acard_probe(device_t dev)
 
     ata_set_desc(dev);
     ctlr->chipinit = ata_acard_chipinit;
+#ifndef ATA_CAM
     ctlr->chipdeinit = ata_acard_chipdeinit;
+#endif
     return (BUS_PROBE_DEFAULT);
 }
 
@@ -102,7 +107,9 @@ static int
 ata_acard_chipinit(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
+#ifndef ATA_CAM
     struct ata_serialize *serial;
+#endif
 
     if (ata_setup_interrupt(dev, ata_generic_intr))
 	return ENXIO;
@@ -111,17 +118,20 @@ ata_acard_chipinit(device_t dev)
     ctlr->ch_detach = ata_pci_ch_detach;
     if (ctlr->chip->cfg1 == ATP_OLD) {
 	ctlr->setmode = ata_acard_850_setmode;
+#ifndef ATA_CAM
 	ctlr->locking = ata_serialize;
 	serial = malloc(sizeof(struct ata_serialize),
 			      M_ATAPCI, M_WAITOK | M_ZERO);
 	ata_serialize_init(serial);
 	ctlr->chipset_data = serial;
+#endif
     }
     else
 	ctlr->setmode = ata_acard_86X_setmode;
     return 0;
 }
 
+#ifndef ATA_CAM
 static int
 ata_acard_chipdeinit(device_t dev)
 {
@@ -136,6 +146,7 @@ ata_acard_chipdeinit(device_t dev)
 	}
 	return (0);
 }
+#endif
 
 static int
 ata_acard_ch_attach(device_t dev)
@@ -228,6 +239,7 @@ ata_acard_86X_setmode(device_t dev, int 
 	return (mode);
 }
 
+#ifndef ATA_CAM
 static void
 ata_serialize_init(struct ata_serialize *serial)
 {
@@ -277,5 +289,6 @@ ata_serialize(device_t dev, int flags)
     mtx_unlock(&serial->locked_mtx);
     return res;
 }
+#endif
 
 ATA_DECLARE_DRIVER(ata_acard);

From owner-svn-src-stable-8@FreeBSD.ORG  Fri Mar 30 23:56:20 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id EE330106564A;
	Fri, 30 Mar 2012 23:56:20 +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 D5C878FC16;
	Fri, 30 Mar 2012 23:56:20 +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 q2UNuK00064005;
	Fri, 30 Mar 2012 23:56:20 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2UNuKiA063971;
	Fri, 30 Mar 2012 23:56:20 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203302356.q2UNuKiA063971@svn.freebsd.org>
From: Marius Strobl 
Date: Fri, 30 Mar 2012 23:56:20 +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: r233718 - in stable/8/sys: dev/ata dev/ata/chipsets
	i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 30 Mar 2012 23:56:21 -0000

Author: marius
Date: Fri Mar 30 23:56:19 2012
New Revision: 233718
URL: http://svn.freebsd.org/changeset/base/233718

Log:
  MFC: r233282
  
  - First pass at const'ifying ata(4) as appropriate.
  - Use DEVMETHOD_END.
  - Use NULL instead of 0 for pointers.

Modified:
  stable/8/sys/dev/ata/ata-all.c
  stable/8/sys/dev/ata/ata-all.h
  stable/8/sys/dev/ata/ata-card.c
  stable/8/sys/dev/ata/ata-cbus.c
  stable/8/sys/dev/ata/ata-disk.c
  stable/8/sys/dev/ata/ata-pci.c
  stable/8/sys/dev/ata/ata-pci.h
  stable/8/sys/dev/ata/ata-queue.c
  stable/8/sys/dev/ata/ata-raid.c
  stable/8/sys/dev/ata/atapi-cam.c
  stable/8/sys/dev/ata/atapi-cd.c
  stable/8/sys/dev/ata/atapi-fd.c
  stable/8/sys/dev/ata/atapi-tape.c
  stable/8/sys/dev/ata/chipsets/ata-acard.c
  stable/8/sys/dev/ata/chipsets/ata-acerlabs.c
  stable/8/sys/dev/ata/chipsets/ata-adaptec.c
  stable/8/sys/dev/ata/chipsets/ata-ahci.c
  stable/8/sys/dev/ata/chipsets/ata-amd.c
  stable/8/sys/dev/ata/chipsets/ata-ati.c
  stable/8/sys/dev/ata/chipsets/ata-cyrix.c
  stable/8/sys/dev/ata/chipsets/ata-highpoint.c
  stable/8/sys/dev/ata/chipsets/ata-intel.c
  stable/8/sys/dev/ata/chipsets/ata-ite.c
  stable/8/sys/dev/ata/chipsets/ata-jmicron.c
  stable/8/sys/dev/ata/chipsets/ata-marvell.c
  stable/8/sys/dev/ata/chipsets/ata-national.c
  stable/8/sys/dev/ata/chipsets/ata-nvidia.c
  stable/8/sys/dev/ata/chipsets/ata-promise.c
  stable/8/sys/dev/ata/chipsets/ata-serverworks.c
  stable/8/sys/dev/ata/chipsets/ata-siliconimage.c
  stable/8/sys/dev/ata/chipsets/ata-sis.c
  stable/8/sys/dev/ata/chipsets/ata-via.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/ata/ata-all.c
==============================================================================
--- stable/8/sys/dev/ata/ata-all.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/ata-all.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -1208,7 +1208,7 @@ ata_udelay(int interval)
 }
 
 #ifndef ATA_CAM
-char *
+const char *
 ata_unit2str(struct ata_device *atadev)
 {
     struct ata_channel *ch = device_get_softc(device_get_parent(atadev->dev));

Modified: stable/8/sys/dev/ata/ata-all.h
==============================================================================
--- stable/8/sys/dev/ata/ata-all.h	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/ata-all.h	Fri Mar 30 23:56:19 2012	(r233718)
@@ -622,7 +622,7 @@ int ata_identify(device_t dev);
 void ata_default_registers(device_t dev);
 void ata_modify_if_48bit(struct ata_request *request);
 void ata_udelay(int interval);
-char *ata_unit2str(struct ata_device *atadev);
+const char *ata_unit2str(struct ata_device *atadev);
 const char *ata_mode2str(int mode);
 int ata_str2mode(const char *str);
 const char *ata_satarev2str(int rev);
@@ -649,7 +649,7 @@ void ata_timeout(struct ata_request *);
 void ata_catch_inflight(device_t dev);
 void ata_fail_requests(device_t dev);
 void ata_drop_requests(device_t dev);
-char *ata_cmd2str(struct ata_request *request);
+const char *ata_cmd2str(struct ata_request *request);
 
 /* ata-lowlevel.c: */
 void ata_generic_hw(device_t dev);

Modified: stable/8/sys/dev/ata/ata-card.c
==============================================================================
--- stable/8/sys/dev/ata/ata-card.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/ata-card.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
 
 #include "pccarddevs.h"
 
-static const struct pccard_product ata_pccard_products[] = {
+static const struct pccard_product const ata_pccard_products[] = {
 	PCMCIA_CARD(FREECOM, PCCARDIDE),
 	PCMCIA_CARD(EXP, EXPMULTIMEDIA),
 	PCMCIA_CARD(IODATA3, CBIDE2),
@@ -172,7 +172,7 @@ static device_method_t ata_pccard_method
     DEVMETHOD(device_attach,            ata_pccard_attach),
     DEVMETHOD(device_detach,            ata_pccard_detach),
 
-    { 0, 0 }
+    DEVMETHOD_END
 };
 
 static driver_t ata_pccard_driver = {
@@ -181,5 +181,5 @@ static driver_t ata_pccard_driver = {
     sizeof(struct ata_channel),
 };
 
-DRIVER_MODULE(ata, pccard, ata_pccard_driver, ata_devclass, 0, 0);
+DRIVER_MODULE(ata, pccard, ata_pccard_driver, ata_devclass, NULL, NULL);
 MODULE_DEPEND(ata, ata, 1, 1, 1);

Modified: stable/8/sys/dev/ata/ata-cbus.c
==============================================================================
--- stable/8/sys/dev/ata/ata-cbus.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/ata-cbus.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -248,7 +248,7 @@ static device_method_t ata_cbus_methods[
     DEVMETHOD(bus_setup_intr,           ata_cbus_setup_intr),
     DEVMETHOD(bus_print_child,          ata_cbus_print_child),
 
-    { 0, 0 }
+    DEVMETHOD_END
 };
 
 static driver_t ata_cbus_driver = {
@@ -393,7 +393,7 @@ static device_method_t ata_cbuschannel_m
     /* ATA methods */
     DEVMETHOD(ata_locking,      ata_cbuschannel_banking),
 #endif
-    { 0, 0 }
+    DEVMETHOD_END
 };
 
 static driver_t ata_cbuschannel_driver = {
@@ -402,5 +402,5 @@ static driver_t ata_cbuschannel_driver =
     sizeof(struct ata_channel),
 };
 
-DRIVER_MODULE(ata, atacbus, ata_cbuschannel_driver, ata_devclass, 0, 0);
+DRIVER_MODULE(ata, atacbus, ata_cbuschannel_driver, ata_devclass, NULL, NULL);
 MODULE_DEPEND(ata, ata, 1, 1, 1);

Modified: stable/8/sys/dev/ata/ata-disk.c
==============================================================================
--- stable/8/sys/dev/ata/ata-disk.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/ata-disk.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -583,7 +583,7 @@ static device_method_t ad_methods[] = {
     /* ATA methods */
     DEVMETHOD(ata_reinit,       ad_reinit),
 
-    { 0, 0 }
+    DEVMETHOD_END
 };
 
 static driver_t ad_driver = {

Modified: stable/8/sys/dev/ata/ata-pci.c
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/ata-pci.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -600,7 +600,7 @@ static device_method_t ata_pci_methods[]
     DEVMETHOD(bus_print_child,		ata_pci_print_child),
     DEVMETHOD(bus_child_location_str,	ata_pci_child_location_str),
 
-    { 0, 0 }
+    DEVMETHOD_END
 };
 
 devclass_t ata_pci_devclass;
@@ -611,7 +611,7 @@ static driver_t ata_pci_driver = {
     sizeof(struct ata_pci_controller),
 };
 
-DRIVER_MODULE(atapci, pci, ata_pci_driver, ata_pci_devclass, 0, 0);
+DRIVER_MODULE(atapci, pci, ata_pci_driver, ata_pci_devclass, NULL, NULL);
 MODULE_VERSION(atapci, 1);
 MODULE_DEPEND(atapci, ata, 1, 1, 1);
 
@@ -778,7 +778,7 @@ static device_method_t ata_pcichannel_me
 #endif
     DEVMETHOD(ata_reset,        ata_pcichannel_reset),
 
-    { 0, 0 }
+    DEVMETHOD_END
 };
 
 driver_t ata_pcichannel_driver = {
@@ -787,7 +787,7 @@ driver_t ata_pcichannel_driver = {
     sizeof(struct ata_channel),
 };
 
-DRIVER_MODULE(ata, atapci, ata_pcichannel_driver, ata_devclass, 0, 0);
+DRIVER_MODULE(ata, atapci, ata_pcichannel_driver, ata_devclass, NULL, NULL);
 
 /*
  * misc support fucntions
@@ -868,8 +868,8 @@ ata_set_desc(device_t dev)
     device_set_desc_copy(dev, buffer);
 }
 
-struct ata_chip_id *
-ata_match_chip(device_t dev, struct ata_chip_id *index)
+const struct ata_chip_id *
+ata_match_chip(device_t dev, const struct ata_chip_id *index)
 {
     uint32_t devid;
     uint8_t revid;
@@ -884,10 +884,10 @@ ata_match_chip(device_t dev, struct ata_
     return (NULL);
 }
 
-struct ata_chip_id *
-ata_find_chip(device_t dev, struct ata_chip_id *index, int slot)
+const struct ata_chip_id *
+ata_find_chip(device_t dev, const struct ata_chip_id *index, int slot)
 {
-    struct ata_chip_id *idx;
+    const struct ata_chip_id *idx;
     device_t *children;
     int nchildren, i;
     uint8_t s;
@@ -909,7 +909,7 @@ ata_find_chip(device_t dev, struct ata_c
     return (NULL);
 }
 
-char *
+const char *
 ata_pcivendor2str(device_t dev)
 {
     switch (pci_get_vendor(dev)) {

Modified: stable/8/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.h	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/ata-pci.h	Fri Mar 30 23:56:19 2012	(r233718)
@@ -33,7 +33,7 @@ struct ata_chip_id {
     int                 cfg1;
     int                 cfg2;
     u_int8_t            max_dma;
-    char                *text;
+    const char          *text;
 };
 
 #define ATA_PCI_MAX_CH	8
@@ -50,7 +50,7 @@ struct ata_pci_controller {
     int                 r_irq_rid;
     struct resource     *r_irq;
     void                *handle;
-    struct ata_chip_id  *chip;
+    const struct ata_chip_id *chip;
     int			legacy;
     int                 channels;
     int			ichannels;
@@ -569,15 +569,15 @@ int ata_pci_status(device_t dev);
 void ata_pci_hw(device_t dev);
 void ata_pci_dmainit(device_t dev);
 void ata_pci_dmafini(device_t dev);
-char *ata_pcivendor2str(device_t dev);
+const char *ata_pcivendor2str(device_t dev);
 int ata_legacy(device_t);
 void ata_generic_intr(void *data);
 int ata_generic_chipinit(device_t dev);
 int ata_generic_setmode(device_t dev, int target, int mode);
 int ata_setup_interrupt(device_t dev, void *intr_func);
 void ata_set_desc(device_t dev);
-struct ata_chip_id *ata_match_chip(device_t dev, struct ata_chip_id *index);
-struct ata_chip_id *ata_find_chip(device_t dev, struct ata_chip_id *index, int slot);
+const struct ata_chip_id *ata_match_chip(device_t dev, const struct ata_chip_id *index);
+const struct ata_chip_id *ata_find_chip(device_t dev, const struct ata_chip_id *index, int slot);
 int ata_mode2idx(int mode);
 
 /* global prototypes from chipsets/ata-*.c */
@@ -611,15 +611,14 @@ static device_method_t __CONCAT(dname,_m
     DEVMETHOD(pci_write_config,		ata_pci_write_config), \
     DEVMETHOD(bus_print_child,		ata_pci_print_child), \
     DEVMETHOD(bus_child_location_str,	ata_pci_child_location_str), \
-    { 0, 0 } \
+    DEVMETHOD_END \
 }; \
 static driver_t __CONCAT(dname,_driver) = { \
         "atapci", \
         __CONCAT(dname,_methods), \
         sizeof(struct ata_pci_controller) \
 }; \
-DRIVER_MODULE(dname, pci, __CONCAT(dname,_driver), ata_pci_devclass, 0, 0); \
+DRIVER_MODULE(dname, pci, __CONCAT(dname,_driver), ata_pci_devclass, NULL, NULL); \
 MODULE_VERSION(dname, 1); \
 MODULE_DEPEND(dname, ata, 1, 1, 1); \
 MODULE_DEPEND(dname, atapci, 1, 1, 1);
-

Modified: stable/8/sys/dev/ata/ata-queue.c
==============================================================================
--- stable/8/sys/dev/ata/ata-queue.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/ata-queue.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -684,7 +684,7 @@ ata_sort_queue(struct ata_channel *ch, s
 }
 #endif
 
-char *
+const char *
 ata_cmd2str(struct ata_request *request)
 {
     static char buffer[20];

Modified: stable/8/sys/dev/ata/ata-raid.c
==============================================================================
--- stable/8/sys/dev/ata/ata-raid.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/ata-raid.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -4546,7 +4546,7 @@ static device_method_t ata_raid_sub_meth
     DEVMETHOD(device_probe,     ata_raid_subdisk_probe),
     DEVMETHOD(device_attach,    ata_raid_subdisk_attach),
     DEVMETHOD(device_detach,    ata_raid_subdisk_detach),
-    { 0, 0 }
+    DEVMETHOD_END
 };
 
 static driver_t ata_raid_sub_driver = {

Modified: stable/8/sys/dev/ata/atapi-cam.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-cam.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/atapi-cam.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -122,7 +122,7 @@ static device_method_t atapi_cam_methods
 	DEVMETHOD(device_attach,        atapi_cam_attach),
 	DEVMETHOD(device_detach,        atapi_cam_detach),
 	DEVMETHOD(ata_reinit,           atapi_cam_reinit),
-	{0, 0}
+	DEVMETHOD_END
 };
 
 static driver_t atapi_cam_driver = {

Modified: stable/8/sys/dev/ata/atapi-cd.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-cd.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/atapi-cd.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -1899,7 +1899,7 @@ static device_method_t acd_methods[] = {
     /* ATA methods */
     DEVMETHOD(ata_reinit,       acd_reinit),
     
-    { 0, 0 }
+    DEVMETHOD_END
 };
     
 static driver_t acd_driver = {

Modified: stable/8/sys/dev/ata/atapi-fd.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-fd.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/atapi-fd.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -423,7 +423,7 @@ static device_method_t afd_methods[] = {
     /* ATA methods */
     DEVMETHOD(ata_reinit,       afd_reinit),
     
-    { 0, 0 }
+    DEVMETHOD_END
 };
     
 static driver_t afd_driver = {

Modified: stable/8/sys/dev/ata/atapi-tape.c
==============================================================================
--- stable/8/sys/dev/ata/atapi-tape.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/atapi-tape.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -723,7 +723,7 @@ static device_method_t ast_methods[] = {
     /* ATA methods */
     DEVMETHOD(ata_reinit,       ast_reinit),
 
-    { 0, 0 }
+    DEVMETHOD_END
 };
 	    
 static driver_t ast_driver = {

Modified: stable/8/sys/dev/ata/chipsets/ata-acard.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-acard.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-acard.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -81,7 +81,7 @@ static int
 ata_acard_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_ATP850R, 0, ATP_OLD, 0x00, ATA_UDMA2, "ATP850" },
      { ATA_ATP860A, 0, 0,       0x00, ATA_UDMA4, "ATP860A" },
      { ATA_ATP860R, 0, 0,       0x00, ATA_UDMA4, "ATP860R" },

Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-acerlabs.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-acerlabs.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -75,7 +75,7 @@ static int
 ata_ali_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_ALI_5289, 0x00, 2, ALI_SATA, ATA_SA150, "M5289" },
      { ATA_ALI_5288, 0x00, 4, ALI_SATA, ATA_SA300, "M5288" },
      { ATA_ALI_5287, 0x00, 4, ALI_SATA, ATA_SA150, "M5287" },
@@ -304,11 +304,12 @@ ata_ali_setmode(device_t dev, int target
 	struct ata_channel *ch = device_get_softc(dev);
 	int devno = (ch->unit << 1) + target;
 	int piomode;
-	u_int32_t piotimings[] =
+	static const uint32_t piotimings[] =
 		{ 0x006d0003, 0x00580002, 0x00440001, 0x00330001,
 		  0x00310001, 0x006d0003, 0x00330001, 0x00310001 };
-	u_int8_t udma[] = {0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0d};
-	u_int32_t word54;
+	static const uint8_t udma[] = {0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x0f,
+	    0x0d};
+	uint32_t word54;
 
         mode = min(mode, ctlr->chip->max_dma);
 

Modified: stable/8/sys/dev/ata/chipsets/ata-adaptec.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-adaptec.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-adaptec.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
 #define MV_60XX		60		//must match ata_marvell.c's definition
 #define MV_7042		72		//must match ata_marvell.c's definition
 
-
 /*
  * Adaptec chipset support functions
  */
@@ -63,7 +62,7 @@ static int
 ata_adaptec_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_ADAPTEC_1420, 0, 4, MV_60XX, ATA_SA300, "1420SA" },
      { ATA_ADAPTEC_1430, 0, 4, MV_7042, ATA_SA300, "1430SA" },
      { 0, 0, 0, 0, 0, 0}};

Modified: stable/8/sys/dev/ata/chipsets/ata-ahci.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-ahci.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-ahci.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -1056,11 +1056,12 @@ static device_method_t ata_ahci_ata_meth
     DEVMETHOD(bus_deactivate_resource,  bus_generic_deactivate_resource),
     DEVMETHOD(bus_setup_intr,           ata_pci_setup_intr),
     DEVMETHOD(bus_teardown_intr,        ata_pci_teardown_intr),
-    { 0, 0 }
+    DEVMETHOD_END
 };
 static driver_t ata_ahci_ata_driver = {
         "atapci",
         ata_ahci_ata_methods,
         sizeof(struct ata_pci_controller)
 };
-DRIVER_MODULE(ata_ahci_ata, atapci, ata_ahci_ata_driver, ata_pci_devclass, 0, 0);
+DRIVER_MODULE(ata_ahci_ata, atapci, ata_ahci_ata_driver, ata_pci_devclass,
+    NULL, NULL);

Modified: stable/8/sys/dev/ata/chipsets/ata-amd.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-amd.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-amd.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -67,7 +67,7 @@ static int
 ata_amd_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_AMD756,  0x00, 0x00,              0, ATA_UDMA4, "756" },
      { ATA_AMD766,  0x00, AMD_CABLE|AMD_BUG, 0, ATA_UDMA5, "766" },
      { ATA_AMD768,  0x00, AMD_CABLE,         0, ATA_UDMA5, "768" },
@@ -113,8 +113,10 @@ ata_amd_setmode(device_t dev, int target
 	struct ata_channel *ch = device_get_softc(dev);
         int devno = (ch->unit << 1) + target;
 	int piomode;
-	u_int8_t timings[] = { 0xa8, 0x65, 0x42, 0x22, 0x20, 0xa8, 0x22, 0x20 };
-	int modes[7] = { 0xc2, 0xc1, 0xc0, 0xc4, 0xc5, 0xc6, 0xc7 };
+	static const uint8_t timings[] =
+	    { 0xa8, 0x65, 0x42, 0x22, 0x20, 0xa8, 0x22, 0x20 };
+	static const uint8_t modes[] =
+	    { 0xc2, 0xc1, 0xc0, 0xc4, 0xc5, 0xc6, 0xc7 };
 	int reg = 0x53 - devno;
 
 	mode = min(mode, ctlr->chip->max_dma);

Modified: stable/8/sys/dev/ata/chipsets/ata-ati.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-ati.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-ati.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -58,11 +58,12 @@ static int ata_ati_ixp700_ch_attach(devi
 static int ata_ati_setmode(device_t dev, int target, int mode);
 
 /* misc defines */
-#define ATI_PATA	0x01
-#define ATI_SATA	0x02
+#define SII_MEMIO       1	/* must match ata_siliconimage.c's definition */
+#define SII_BUG         0x04	/* must match ata_siliconimage.c's definition */
+
+#define ATI_SATA	SII_MEMIO
+#define ATI_PATA	0x02
 #define ATI_AHCI	0x04
-#define SII_MEMIO       1
-#define SII_BUG         0x04
 
 static int force_ahci = 1;
 TUNABLE_INT("hw.ahci.force", &force_ahci);
@@ -74,13 +75,13 @@ static int
 ata_ati_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_ATI_IXP200,    0x00, ATI_PATA, 0, ATA_UDMA5, "IXP200" },
      { ATA_ATI_IXP300,    0x00, ATI_PATA, 0, ATA_UDMA6, "IXP300" },
-     { ATA_ATI_IXP300_S1, 0x00, ATI_SATA, 0, ATA_SA150, "IXP300" },
+     { ATA_ATI_IXP300_S1, 0x00, ATI_SATA, SII_BUG, ATA_SA150, "IXP300" },
      { ATA_ATI_IXP400,    0x00, ATI_PATA, 0, ATA_UDMA6, "IXP400" },
-     { ATA_ATI_IXP400_S1, 0x00, ATI_SATA, 0, ATA_SA150, "IXP400" },
-     { ATA_ATI_IXP400_S2, 0x00, ATI_SATA, 0, ATA_SA150, "IXP400" },
+     { ATA_ATI_IXP400_S1, 0x00, ATI_SATA, SII_BUG, ATA_SA150, "IXP400" },
+     { ATA_ATI_IXP400_S2, 0x00, ATI_SATA, SII_BUG, ATA_SA150, "IXP400" },
      { ATA_ATI_IXP600,    0x00, ATI_PATA, 0, ATA_UDMA6, "IXP600" },
      { ATA_ATI_IXP600_S1, 0x00, ATI_AHCI, 0, ATA_SA300, "IXP600" },
      { ATA_ATI_IXP700,    0x00, ATI_PATA, 0, ATA_UDMA6, "IXP700/800" },
@@ -107,10 +108,7 @@ ata_ati_probe(device_t dev)
     case ATI_SATA:
 	/*
 	 * the ATI SATA controller is actually a SiI 3112 controller
-	 * cfg values below much match those in ata-siliconimage.c
 	 */
-	ctlr->chip->cfg1 = SII_MEMIO;
-	ctlr->chip->cfg2 = SII_BUG;
 	ctlr->chipinit = ata_sii_chipinit;
 	break;
     case ATI_AHCI:
@@ -212,8 +210,8 @@ ata_ati_setmode(device_t dev, int target
 	int devno = (ch->unit << 1) + target;
 	int offset = (devno ^ 0x01) << 3;
 	int piomode;
-	u_int8_t piotimings[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 };
-	u_int8_t dmatimings[] = { 0x77, 0x21, 0x20 };
+	static const uint8_t piotimings[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 };
+	static const uint8_t dmatimings[] = { 0x77, 0x21, 0x20 };
 
 	mode = min(mode, ctlr->chip->max_dma);
 	if (mode >= ATA_UDMA0) {

Modified: stable/8/sys/dev/ata/chipsets/ata-cyrix.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-cyrix.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-cyrix.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -101,10 +101,12 @@ ata_cyrix_setmode(device_t dev, int targ
 	struct ata_channel *ch = device_get_softc(dev);
 	int devno = (ch->unit << 1) + target;
 	int piomode;
-	u_int32_t piotiming[] = 
+	static const uint32_t piotiming[] = 
 	    { 0x00009172, 0x00012171, 0x00020080, 0x00032010, 0x00040010 };
-	u_int32_t dmatiming[] = { 0x00077771, 0x00012121, 0x00002020 };
-	u_int32_t udmatiming[] = { 0x00921250, 0x00911140, 0x00911030 };
+	static const uint32_t dmatiming[] =
+	    { 0x00077771, 0x00012121, 0x00002020 };
+	static const uint32_t udmatiming[] =
+	    { 0x00921250, 0x00911140, 0x00911030 };
 
 	mode = min(mode, ATA_UDMA2);
 	/* dont try to set the mode if we dont have the resource */

Modified: stable/8/sys/dev/ata/chipsets/ata-highpoint.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-highpoint.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-highpoint.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -72,8 +72,8 @@ static int
 ata_highpoint_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    struct ata_chip_id *idx;
-    static struct ata_chip_id ids[] =
+    const struct ata_chip_id *idx;
+    static const struct ata_chip_id const ids[] =
     {{ ATA_HPT374, 0x07, HPT_374, 0,       ATA_UDMA6, "HPT374" },
      { ATA_HPT372, 0x02, HPT_372, 0,       ATA_UDMA6, "HPT372N" },
      { ATA_HPT372, 0x01, HPT_372, 0,       ATA_UDMA6, "HPT372" },
@@ -163,8 +163,8 @@ ata_highpoint_setmode(device_t dev, int 
 	struct ata_pci_controller *ctlr = device_get_softc(parent);
 	struct ata_channel *ch = device_get_softc(dev);
 	int devno = (ch->unit << 1) + target;
-	u_int32_t timings33[][4] = {
-    /*    HPT366      HPT370      HPT372      HPT374               mode */
+	static const uint32_t timings33[][4] = {
+	/*    HPT366      HPT370      HPT372      HPT374           mode */
 	{ 0x40d0a7aa, 0x06914e57, 0x0d029d5e, 0x0ac1f48a },     /* PIO 0 */
 	{ 0x40d0a7a3, 0x06914e43, 0x0d029d26, 0x0ac1f465 },     /* PIO 1 */
 	{ 0x40d0a753, 0x06514e33, 0x0c829ca6, 0x0a81f454 },     /* PIO 2 */

Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-intel.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-intel.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -105,7 +105,7 @@ static int
 ata_intel_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_I82371FB,     0,          0, 2, ATA_WDMA2, "PIIX" },
      { ATA_I82371SB,     0,          0, 2, ATA_WDMA2, "PIIX3" },
      { ATA_I82371AB,     0,          0, 2, ATA_UDMA2, "PIIX4" },
@@ -519,8 +519,10 @@ ata_intel_new_setmode(device_t dev, int 
 	u_int16_t reg54 = pci_read_config(parent, 0x54, 2);
 	u_int32_t mask40 = 0, new40 = 0;
 	u_int8_t mask44 = 0, new44 = 0;
-	u_int8_t timings[] = { 0x00, 0x00, 0x10, 0x21, 0x23, 0x00, 0x21, 0x23 };
-	u_int8_t utimings[] = { 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02 };
+	static const uint8_t timings[] =
+	    { 0x00, 0x00, 0x10, 0x21, 0x23, 0x00, 0x21, 0x23 };
+	static const uint8_t utimings[] =
+	    { 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02 };
 
 	/* In combined mode, skip PATA stuff for SATA channel. */
 	if (ch->flags & ATA_SATA)

Modified: stable/8/sys/dev/ata/chipsets/ata-ite.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-ite.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-ite.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -57,7 +57,6 @@ static int ata_ite_ch_attach(device_t de
 static int ata_ite_821x_setmode(device_t dev, int target, int mode);
 static int ata_ite_8213_setmode(device_t dev, int target, int mode);
 
-
 /*
  * Integrated Technology Express Inc. (ITE) chipset support functions
  */
@@ -65,7 +64,7 @@ static int
 ata_ite_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_IT8213F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8213F" },
      { ATA_IT8212F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8212F" },
      { ATA_IT8211F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8211F" },
@@ -132,9 +131,9 @@ ata_ite_821x_setmode(device_t dev, int t
 	int devno = (ch->unit << 1) + target;
 	int piomode;
 	uint8_t *timings = (uint8_t*)(&ctlr->chipset_data);
-	u_int8_t udmatiming[] =
+	static const uint8_t udmatiming[] =
 		{ 0x44, 0x42, 0x31, 0x21, 0x11, 0xa2, 0x91 };
-	u_int8_t chtiming[] =
+	static const uint8_t chtiming[] =
 		{ 0xaa, 0xa3, 0xa1, 0x33, 0x31, 0x88, 0x32, 0x31 };
 
 	mode = min(mode, ctlr->chip->max_dma);
@@ -182,8 +181,10 @@ ata_ite_8213_setmode(device_t dev, int t
 	u_int16_t reg54 = pci_read_config(parent, 0x54, 2);
 	u_int16_t mask40 = 0, new40 = 0;
 	u_int8_t mask44 = 0, new44 = 0;
-	u_int8_t timings[] = { 0x00, 0x00, 0x10, 0x21, 0x23, 0x00, 0x21, 0x23 };
-	u_int8_t utimings[] = { 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02 };
+	static const uint8_t timings[] =
+	    { 0x00, 0x00, 0x10, 0x21, 0x23, 0x00, 0x21, 0x23 };
+	static const uint8_t utimings[] =
+	    { 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02 };
 
 	mode = min(mode, ctlr->chip->max_dma);
 

Modified: stable/8/sys/dev/ata/chipsets/ata-jmicron.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-jmicron.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-jmicron.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -63,8 +63,8 @@ static int
 ata_jmicron_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    struct ata_chip_id *idx;
-    static struct ata_chip_id ids[] =
+    const struct ata_chip_id *idx;
+    static const struct ata_chip_id const ids[] =
     {{ ATA_JMB360, 0, 1, 0, ATA_SA300, "JMB360" },
      { ATA_JMB361, 0, 1, 1, ATA_UDMA6, "JMB361" },
      { ATA_JMB363, 0, 2, 1, ATA_UDMA6, "JMB363" },

Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-marvell.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-marvell.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -99,7 +99,7 @@ static int
 ata_marvell_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_M88SX5040, 0, 4, MV_50XX, ATA_SA150, "88SX5040" },
      { ATA_M88SX5041, 0, 4, MV_50XX, ATA_SA150, "88SX5041" },
      { ATA_M88SX5080, 0, 8, MV_50XX, ATA_SA150, "88SX5080" },

Modified: stable/8/sys/dev/ata/chipsets/ata-national.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-national.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-national.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -103,11 +103,13 @@ ata_national_setmode(device_t dev, int t
 	struct ata_channel *ch = device_get_softc(dev);
 	int devno = (ch->unit << 1) + target;
 	int piomode;
-	u_int32_t piotiming[] =
+	static const uint32_t piotiming[] =
 	    { 0x9172d132, 0x21717121, 0x00803020, 0x20102010, 0x00100010,
 	      0x9172d132, 0x20102010, 0x00100010 };
-	u_int32_t dmatiming[] = { 0x80077771, 0x80012121, 0x80002020 };
-	u_int32_t udmatiming[] = { 0x80921250, 0x80911140, 0x80911030 };
+	static const uint32_t dmatiming[] =
+	    { 0x80077771, 0x80012121, 0x80002020 };
+	static const uint32_t udmatiming[] =
+	    { 0x80921250, 0x80911140, 0x80911030 };
 
 	mode = min(mode, ATA_UDMA2);
 

Modified: stable/8/sys/dev/ata/chipsets/ata-nvidia.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-nvidia.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-nvidia.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -75,7 +75,7 @@ static int
 ata_nvidia_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_NFORCE1,         0, 0,       0, ATA_UDMA5, "nForce" },
      { ATA_NFORCE2,         0, 0,       0, ATA_UDMA6, "nForce2" },
      { ATA_NFORCE2_PRO,     0, 0,       0, ATA_UDMA6, "nForce2 Pro" },
@@ -332,8 +332,10 @@ ata_nvidia_setmode(device_t dev, int tar
 	struct ata_channel *ch = device_get_softc(dev);
 	int devno = (ch->unit << 1) + target;
 	int piomode;
-	u_int8_t timings[] = { 0xa8, 0x65, 0x42, 0x22, 0x20, 0xa8, 0x22, 0x20 };
-        int modes[7] = { 0xc2, 0xc1, 0xc0, 0xc4, 0xc5, 0xc6, 0xc7 };
+	static const uint8_t timings[] =
+	    { 0xa8, 0x65, 0x42, 0x22, 0x20, 0xa8, 0x22, 0x20 };
+	static const uint8_t modes[] =
+	    { 0xc2, 0xc1, 0xc0, 0xc4, 0xc5, 0xc6, 0xc7 };
 	int reg = 0x63 - devno;
 
 	mode = min(mode, ctlr->chip->max_dma);

Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-promise.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-promise.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -129,8 +129,8 @@ static int
 ata_promise_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    struct ata_chip_id *idx;
-    static struct ata_chip_id ids[] =
+    const struct ata_chip_id *idx;
+    static const struct ata_chip_id const ids[] =
     {{ ATA_PDC20246,  0, PR_OLD, 0x00,     ATA_UDMA2, "PDC20246" },
      { ATA_PDC20262,  0, PR_NEW, 0x00,     ATA_UDMA4, "PDC20262" },
      { ATA_PDC20263,  0, PR_NEW, 0x00,     ATA_UDMA4, "PDC20263" },
@@ -454,7 +454,7 @@ ata_promise_setmode(device_t dev, int ta
     struct ata_pci_controller *ctlr = device_get_softc(parent);
     struct ata_channel *ch = device_get_softc(dev);
     int devno = (ch->unit << 1) + target;
-    u_int32_t timings[][2] = {
+    static const uint32_t timings[][2] = {
     /*    PR_OLD      PR_NEW               mode */
 	{ 0x004ff329, 0x004fff2f },     /* PIO 0 */
 	{ 0x004fec25, 0x004ff82a },     /* PIO 1 */

Modified: stable/8/sys/dev/ata/chipsets/ata-serverworks.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-serverworks.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-serverworks.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -78,7 +78,7 @@ static int
 ata_serverworks_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_ROSB4,     0x00, SWKS_33,  0, ATA_WDMA2, "ROSB4" },
      { ATA_CSB5,      0x92, SWKS_100, 0, ATA_UDMA5, "CSB5" },
      { ATA_CSB5,      0x00, SWKS_66,  0, ATA_UDMA4, "CSB5" },
@@ -358,8 +358,8 @@ ata_serverworks_setmode(device_t dev, in
         int devno = (ch->unit << 1) + target;
         int offset = (devno ^ 0x01) << 3;
 	int piomode;
-	u_int8_t piotimings[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 };
-	u_int8_t dmatimings[] = { 0x77, 0x21, 0x20 };
+	static const uint8_t piotimings[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 };
+	static const uint8_t dmatimings[] = { 0x77, 0x21, 0x20 };
 
 	mode = min(mode, ctlr->chip->max_dma);
 	if (mode >= ATA_UDMA0) {

Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -87,7 +87,7 @@ static int
 ata_sii_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_SII3114,   0x00, SII_MEMIO, SII_4CH,    ATA_SA150, "3114" },
      { ATA_SII3512,   0x02, SII_MEMIO, 0,          ATA_SA150, "3512" },
      { ATA_SII3112,   0x02, SII_MEMIO, 0,          ATA_SA150, "3112" },
@@ -272,10 +272,11 @@ ata_cmd_setmode(device_t dev, int target
 	int treg = 0x54 + ((devno < 3) ? (devno << 1) : 7);
 	int ureg = ch->unit ? 0x7b : 0x73;
 	int piomode;
-	uint8_t piotimings[] = { 0xa9, 0x57, 0x44, 0x32, 0x3f, 0x87, 0x32, 0x3f };
-	uint8_t udmatimings[][2] = { { 0x31,  0xc2 }, { 0x21,  0x82 },
-				     { 0x11,  0x42 }, { 0x25,  0x8a },
-				     { 0x15,  0x4a }, { 0x05,  0x0a } };
+	static const uint8_t piotimings[] =
+	    { 0xa9, 0x57, 0x44, 0x32, 0x3f, 0x87, 0x32, 0x3f };
+	static const uint8_t udmatimings[][2] =
+	    { { 0x31,  0xc2 }, { 0x21,  0x82 }, { 0x11,  0x42 },
+	      { 0x25,  0x8a }, { 0x15,  0x4a }, { 0x05,  0x0a } };
 
 	mode = min(mode, ctlr->chip->max_dma);
 	if (mode >= ATA_UDMA0) {        
@@ -410,9 +411,11 @@ ata_sii_setmode(device_t dev, int target
 	u_int8_t preg = 0xa4 + rego;
 	u_int8_t dreg = 0xa8 + rego;
 	u_int8_t ureg = 0xac + rego;
-	u_int16_t piotimings[] = { 0x328a, 0x2283, 0x1104, 0x10c3, 0x10c1 };
-	u_int16_t dmatimings[] = { 0x2208, 0x10c2, 0x10c1 };
-	u_int8_t udmatimings[] = { 0xf, 0xb, 0x7, 0x5, 0x3, 0x2, 0x1 };
+	static const uint16_t piotimings[] =
+	    { 0x328a, 0x2283, 0x1104, 0x10c3, 0x10c1 };
+	static const uint16_t dmatimings[] = { 0x2208, 0x10c2, 0x10c1 };
+	static const uint8_t udmatimings[] =
+	    { 0xf, 0xb, 0x7, 0x5, 0x3, 0x2, 0x1 };
 
 	mode = min(mode, ctlr->chip->max_dma);
 

Modified: stable/8/sys/dev/ata/chipsets/ata-sis.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-sis.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-sis.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -66,7 +66,6 @@ static int ata_sis_setmode(device_t dev,
 #define SIS_133OLD	6
 #define SIS_SATA	7
 
-
 /*
  * Silicon Integrated Systems Corp. (SiS) chipset support functions
  */
@@ -74,8 +73,8 @@ static int
 ata_sis_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    struct ata_chip_id *idx;
-    static struct ata_chip_id ids[] =
+    const struct ata_chip_id *idx;
+    static const struct ata_chip_id const ids[] =
     {{ ATA_SIS182,  0x00, SIS_SATA,   0, ATA_SA150, "182" }, /* south */
      { ATA_SIS181,  0x00, SIS_SATA,   0, ATA_SA150, "181" }, /* south */
      { ATA_SIS180,  0x00, SIS_SATA,   0, ATA_SA150, "180" }, /* south */
@@ -102,6 +101,8 @@ ata_sis_probe(device_t dev)
      { ATA_SIS5513, 0xc2, SIS_33,     1, ATA_UDMA2, "5513" },
      { ATA_SIS5513, 0x00, SIS_33,     1, ATA_WDMA2, "5513" },
      { 0, 0, 0, 0, 0, 0 }};
+    static struct ata_chip_id id[] =
+    {{ ATA_SISSOUTH, 0x10, 0, 0, 0, "" }, { 0, 0, 0, 0, 0, 0 }};
     char buffer[64];
     int found = 0;
 
@@ -114,14 +115,15 @@ ata_sis_probe(device_t dev)
     if (!(idx = ata_find_chip(dev, ids, -pci_get_slot(dev)))) 
 	return ENXIO;
 
-    if (idx->cfg2 && !found) {
+    if (idx->cfg2) {
 	u_int8_t reg57 = pci_read_config(dev, 0x57, 1);
 
 	pci_write_config(dev, 0x57, (reg57 & 0x7f), 1);
 	if (pci_read_config(dev, PCIR_DEVVENDOR, 4) == ATA_SIS5518) {
 	    found = 1;
-	    idx->cfg1 = SIS_133NEW;
-	    idx->max_dma = ATA_UDMA6;
+    	    memcpy(&id[0], idx, sizeof(id[0]));
+	    id[0].cfg1 = SIS_133NEW;
+	    id[0].max_dma = ATA_UDMA6;
 	    sprintf(buffer, "SiS 962/963 %s controller",
 		    ata_mode2str(idx->max_dma));
 	}
@@ -132,17 +134,13 @@ ata_sis_probe(device_t dev)
 
 	pci_write_config(dev, 0x4a, (reg4a | 0x10), 1);
 	if (pci_read_config(dev, PCIR_DEVVENDOR, 4) == ATA_SIS5517) {
-	    struct ata_chip_id id[] =
-		{{ ATA_SISSOUTH, 0x10, 0, 0, 0, "" }, { 0, 0, 0, 0, 0, 0 }};
-
 	    found = 1;
 	    if (ata_find_chip(dev, id, pci_get_slot(dev))) {
-		idx->cfg1 = SIS_133OLD;
-		idx->max_dma = ATA_UDMA6;
-	    }
-	    else {
-		idx->cfg1 = SIS_100NEW;
-		idx->max_dma = ATA_UDMA5;
+		id[0].cfg1 = SIS_133OLD;
+		id[0].max_dma = ATA_UDMA6;
+	    } else {
+		id[0].cfg1 = SIS_100NEW;
+		id[0].max_dma = ATA_UDMA5;
 	    }
 	    sprintf(buffer, "SiS 961 %s controller",ata_mode2str(idx->max_dma));
 	}
@@ -151,6 +149,8 @@ ata_sis_probe(device_t dev)
     if (!found)
 	sprintf(buffer,"SiS %s %s controller",
 		idx->text, ata_mode2str(idx->max_dma));
+    else
+	idx = &id[0];
 
     device_set_desc_copy(dev, buffer);
     ctlr->chip = idx;
@@ -262,7 +262,7 @@ ata_sis_setmode(device_t dev, int target
 
 	switch (ctlr->chip->cfg1) {
 	case SIS_133NEW: {
-	    u_int32_t timings[] = 
+	    static const uint32_t timings[] = 
 		{ 0x28269008, 0x0c266008, 0x04263008, 0x0c0a3008, 0x05093008,
 		  0x22196008, 0x0c0a3008, 0x05093008, 0x050939fc, 0x050936ac,
 		  0x0509347c, 0x0509325c, 0x0509323c, 0x0509322c, 0x0509321c};
@@ -273,7 +273,7 @@ ata_sis_setmode(device_t dev, int target
 	    break;
 	    }
 	case SIS_133OLD: {
-	    u_int16_t timings[] =
+	    static const uint16_t timings[] =
 	     { 0x00cb, 0x0067, 0x0044, 0x0033, 0x0031, 0x0044, 0x0033, 0x0031,
 	       0x8f31, 0x8a31, 0x8731, 0x8531, 0x8331, 0x8231, 0x8131 };
 		  
@@ -283,7 +283,7 @@ ata_sis_setmode(device_t dev, int target
 	    break;
 	    }
 	case SIS_100NEW: {
-	    u_int16_t timings[] =
+	    static const uint16_t timings[] =
 		{ 0x00cb, 0x0067, 0x0044, 0x0033, 0x0031, 0x0044, 0x0033,
 		  0x0031, 0x8b31, 0x8731, 0x8531, 0x8431, 0x8231, 0x8131 };
 	    u_int16_t reg = 0x40 + (devno << 1);
@@ -294,7 +294,7 @@ ata_sis_setmode(device_t dev, int target
 	case SIS_100OLD:
 	case SIS_66:
 	case SIS_33: {
-	    u_int16_t timings[] =
+	    static const uint16_t timings[] =
 		{ 0x0c0b, 0x0607, 0x0404, 0x0303, 0x0301, 0x0404, 0x0303,
 		  0x0301, 0xf301, 0xd301, 0xb301, 0xa301, 0x9301, 0x8301 };
 	    u_int16_t reg = 0x40 + (devno << 1);

Modified: stable/8/sys/dev/ata/chipsets/ata-via.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-via.c	Fri Mar 30 23:56:16 2012	(r233717)
+++ stable/8/sys/dev/ata/chipsets/ata-via.c	Fri Mar 30 23:56:19 2012	(r233718)
@@ -82,7 +82,6 @@ static int ata_via_sata_status(device_t 
 #define VIAAHCI         0x08
 #define VIASATA         0x10
 
-
 /*
  * VIA Technologies Inc. chipset support functions
  */
@@ -90,7 +89,7 @@ static int
 ata_via_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
-    static struct ata_chip_id ids[] =
+    static const struct ata_chip_id const ids[] =
     {{ ATA_VIA82C586, 0x02, VIA33,  0x00,    ATA_UDMA2, "82C586B" },
      { ATA_VIA82C586, 0x00, VIA33,  0x00,    ATA_WDMA2, "82C586" },
      { ATA_VIA82C596, 0x12, VIA66,  VIACLK,  ATA_UDMA4, "82C596B" },
@@ -114,7 +113,7 @@ ata_via_probe(device_t dev)
      { ATA_VIAVX855,  0x00, VIA133, 0x00,    ATA_UDMA6, "VX855" },
      { ATA_VIAVX900,  0x00, VIA133, VIASATA, ATA_SA300, "VX900" },
      { 0, 0, 0, 0, 0, 0 }};
-    static struct ata_chip_id new_ids[] =
+    static const struct ata_chip_id const new_ids[] =
     {{ ATA_VIA6410,   0x00, 0,      0x00,    ATA_UDMA6, "6410" },
      { ATA_VIA6420,   0x00, 7,      0x00,    ATA_SA150, "6420" },
      { ATA_VIA6421,   0x00, 6,      VIABAR,  ATA_SA150, "6421" },
@@ -328,8 +327,10 @@ ata_via_new_setmode(device_t dev, int ta
 
 	if ((ctlr->chip->cfg2 & VIABAR) && (ch->unit > 1)) {
 	    int piomode;
-    	    u_int8_t pio_timings[] = { 0xa8, 0x65, 0x65, 0x32, 0x20 };
-	    u_int8_t dma_timings[] = { 0xee, 0xe8, 0xe6, 0xe4, 0xe2, 0xe1, 0xe0 };
+    	    static const uint8_t pio_timings[] =
+		{ 0xa8, 0x65, 0x65, 0x32, 0x20 };
+	    static const uint8_t dma_timings[] =
+		{ 0xee, 0xe8, 0xe6, 0xe4, 0xe2, 0xe1, 0xe0 };
 
 	    /* This chip can't do WDMA. */
 	    if (mode >= ATA_WDMA0 && mode < ATA_UDMA0)
@@ -355,8 +356,9 @@ ata_via_old_setmode(device_t dev, int ta
 	int devno = (ch->unit << 1) + target;
 	int reg = 0x53 - devno;
 	int piomode;
-	uint8_t timings[] = { 0xa8, 0x65, 0x42, 0x22, 0x20, 0xa8, 0x22, 0x20 };
-	uint8_t modes[][7] = {
+	static const uint8_t timings[] =
+	    { 0xa8, 0x65, 0x42, 0x22, 0x20, 0xa8, 0x22, 0x20 };
+	static const uint8_t modes[][7] = {
 	    { 0xc2, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x00 },   /* VIA ATA33 */
 	    { 0xee, 0xec, 0xea, 0xe9, 0xe8, 0x00, 0x00 },   /* VIA ATA66 */
 	    { 0xf7, 0xf6, 0xf4, 0xf2, 0xf1, 0xf0, 0x00 },   /* VIA ATA100 */

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 31 00:07:55 2012
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 53B1F1065674;
	Sat, 31 Mar 2012 00:07:55 +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 33C2B8FC0C;
	Sat, 31 Mar 2012 00:07: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 q2V07tL6064466;
	Sat, 31 Mar 2012 00:07:55 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2V07s7I064463;
	Sat, 31 Mar 2012 00:07:54 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203310007.q2V07s7I064463@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 31 Mar 2012 00:07:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233720 - in stable/8/sys: boot/uboot/lib i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 31 Mar 2012 00:07:55 -0000

Author: marius
Date: Sat Mar 31 00:07:54 2012
New Revision: 233720
URL: http://svn.freebsd.org/changeset/base/233720

Log:
  MFC: r233287
  
  Use the common/shared CRC-32 implementation instead of duplicating it.

Modified:
  stable/8/sys/boot/uboot/lib/Makefile
  stable/8/sys/boot/uboot/lib/glue.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/boot/uboot/lib/Makefile
==============================================================================
--- stable/8/sys/boot/uboot/lib/Makefile	Sat Mar 31 00:07:53 2012	(r233719)
+++ stable/8/sys/boot/uboot/lib/Makefile	Sat Mar 31 00:07:54 2012	(r233720)
@@ -1,11 +1,13 @@
 # $FreeBSD$
 
+.PATH: ${.CURDIR}/../../common
+
 LIB=		uboot
 INTERNALLIB=
 WARNS?=		2
 
-SRCS=	devicename.c elf_freebsd.c console.c copy.c disk.c \
-	module.c net.c reboot.c time.c glue.c
+SRCS=	crc32.c console.c copy.c devicename.c disk.c elf_freebsd.c glue.c
+SRCS+=	module.c net.c reboot.c time.c
 
 CFLAGS+=	-ffreestanding -msoft-float
 

Modified: stable/8/sys/boot/uboot/lib/glue.c
==============================================================================
--- stable/8/sys/boot/uboot/lib/glue.c	Sat Mar 31 00:07:53 2012	(r233719)
+++ stable/8/sys/boot/uboot/lib/glue.c	Sat Mar 31 00:07:54 2012	(r233720)
@@ -27,6 +27,9 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
+
+#include 
 #include 
 #include "api_public.h"
 #include "glue.h"
@@ -43,69 +46,6 @@ __FBSDID("$FreeBSD$");
 /* Some random address used by U-Boot. */
 extern long uboot_address;
 
-/* crc32 stuff stolen from lib/libdisk/write_ia64_disk.c */
-static uint32_t crc32_tab[] = {
-	0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
-	0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
-	0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
-	0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
-	0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
-	0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
-	0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
-	0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
-	0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
-	0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
-	0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
-	0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
-	0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
-	0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
-	0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
-	0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
-	0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
-	0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
-	0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
-	0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
-	0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
-	0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
-	0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
-	0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
-	0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
-	0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
-	0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
-	0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
-	0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
-	0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
-	0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
-	0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
-	0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
-	0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
-	0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
-	0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
-	0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
-	0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
-	0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
-	0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
-	0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
-	0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
-	0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
-};
-
-static uint32_t
-crc32(const void *buf, size_t size)
-{
-	const uint8_t *p;
-	uint32_t crc;
-
-	p = buf;
-	crc = ~0U;
-
-	while (size--)
-		crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
-
-	return (crc ^ ~0U);
-}
-
-
 static int
 valid_sig(struct api_signature *sig)
 {
@@ -235,7 +175,6 @@ ub_get_sys_info(void)
 	return ((err) ? NULL : &si);
 }
 
-
 /****************************************
  *
  * timing
@@ -260,7 +199,6 @@ ub_get_timer(unsigned long base)
 	return (cur);
 }
 
-
 /****************************************************************************
  *
  * devices
@@ -314,7 +252,6 @@ ub_dev_enum(void)
 	return (n);
 }
 
-
 /*
  * handle:	0-based id of the device
  *
@@ -559,7 +496,6 @@ ub_env_set(const char *name, char *value
 	syscall(API_ENV_SET, NULL, (uint32_t)name, (uint32_t)value);
 }
 
-
 static char env_name[256];
 
 const char *

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 31 00:10:18 2012
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 63F86106566B;
	Sat, 31 Mar 2012 00:10:18 +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 4CD3A8FC15;
	Sat, 31 Mar 2012 00:10:18 +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 q2V0AIBi064668;
	Sat, 31 Mar 2012 00:10:18 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2V0AIrC064665;
	Sat, 31 Mar 2012 00:10:18 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203310010.q2V0AIrC064665@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 31 Mar 2012 00:10:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233722 - in stable/8/sys: dev/mpt i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 31 Mar 2012 00:10:18 -0000

Author: marius
Date: Sat Mar 31 00:10:17 2012
New Revision: 233722
URL: http://svn.freebsd.org/changeset/base/233722

Log:
  MFC: r233403, r233404
  
  - Use the PCI ID macros from mpi_cnfg.h rather than duplicating them here.
    Note that this driver additionally probes some device IDs for the most
    part not know to other MPT drivers, if at all. So rename the macros not
    present in mpi_cnfg.h to match the naming scheme in the latter and but
    suffix them with a _FB in order to not cause conflicts.
  - Like mpt_set_config_regs(), comment out mpt_read_config_regs() as the
    content of the registers read isn't actually used and both functions
    aren't exactly up to date regarding the possible layouts of the BARs
    (these function might be helpful for debugging though, so don't remove
    them completely).
  - Use DEVMETHOD_END.
  - Use NULL rather than 0 for pointers.
  - Remove an unusual check for the softc being NULL.
  - Remove redundant zeroing of the softc.
  - Remove an overly banal and actually partly incorrect as well as partly
    outdated comment regarding the allocation of the memory resource.

Modified:
  stable/8/sys/dev/mpt/mpt.h
  stable/8/sys/dev/mpt/mpt_pci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/mpt/mpt.h
==============================================================================
--- stable/8/sys/dev/mpt/mpt.h	Sat Mar 31 00:10:16 2012	(r233721)
+++ stable/8/sys/dev/mpt/mpt.h	Sat Mar 31 00:10:17 2012	(r233722)
@@ -716,7 +716,9 @@ struct mpt_softc {
 	int			pci_msi_count;
 	struct resource *	pci_irq;	/* Interrupt map for chip */
 	void *			ih;		/* Interrupt handle */
+#if 0
 	struct mpt_pci_cfg	pci_cfg;	/* saved PCI conf registers */
+#endif
 
 	/*
 	 * DMA Mapping Stuff

Modified: stable/8/sys/dev/mpt/mpt_pci.c
==============================================================================
--- stable/8/sys/dev/mpt/mpt_pci.c	Sat Mar 31 00:10:16 2012	(r233721)
+++ stable/8/sys/dev/mpt/mpt_pci.c	Sat Mar 31 00:10:17 2012	(r233722)
@@ -113,104 +113,36 @@ __FBSDID("$FreeBSD$");
 #define	pci_release_msi(x)	do { ; } while (0)
 #endif
 
-#ifndef	PCI_VENDOR_LSI
-#define	PCI_VENDOR_LSI			0x1000
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC909
-#define	PCI_PRODUCT_LSI_FC909		0x0620
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC909A
-#define	PCI_PRODUCT_LSI_FC909A		0x0621
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC919
-#define	PCI_PRODUCT_LSI_FC919		0x0624
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC919_LAN
-#define	PCI_PRODUCT_LSI_FC919_LAN	0x0625
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC929
-#define	PCI_PRODUCT_LSI_FC929		0x0622
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC929_LAN
-#define	PCI_PRODUCT_LSI_FC929_LAN	0x0623
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC929X
-#define	PCI_PRODUCT_LSI_FC929X		0x0626
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC929X_LAN
-#define	PCI_PRODUCT_LSI_FC929X_LAN	0x0627
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC919X
-#define	PCI_PRODUCT_LSI_FC919X		0x0628
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC919X_LAN
-#define	PCI_PRODUCT_LSI_FC919X_LAN	0x0629
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC7X04X
-#define	PCI_PRODUCT_LSI_FC7X04X		0x0640
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_FC646
-#define	PCI_PRODUCT_LSI_FC646		0x0646
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_1030
-#define	PCI_PRODUCT_LSI_1030		0x0030
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_1030ZC
-#define	PCI_PRODUCT_LSI_1030ZC		0x0031
-#endif
-
-#ifndef	PCI_PRODUCT_LSI_SAS1064
-#define PCI_PRODUCT_LSI_SAS1064		0x0050
-#endif
-
-#ifndef PCI_PRODUCT_LSI_SAS1064A
-#define PCI_PRODUCT_LSI_SAS1064A	0x005C
-#endif
-
-#ifndef PCI_PRODUCT_LSI_SAS1064E
-#define PCI_PRODUCT_LSI_SAS1064E	0x0056
-#endif
+/*
+ * XXX it seems no other MPT driver knows about the following chips.
+ */
 
-#ifndef PCI_PRODUCT_LSI_SAS1066
-#define PCI_PRODUCT_LSI_SAS1066		0x005E
+#ifndef	MPI_MANUFACTPAGE_DEVICEID_FC909_FB
+#define	MPI_MANUFACTPAGE_DEVICEID_FC909_FB	0x0620
 #endif
 
-#ifndef PCI_PRODUCT_LSI_SAS1066E
-#define PCI_PRODUCT_LSI_SAS1066E	0x005A
+#ifndef	MPI_MANUFACTPAGE_DEVICEID_FC919_LAN_FB
+#define	MPI_MANUFACTPAGE_DEVICEID_FC919_LAN_FB	0x0625
 #endif
 
-#ifndef PCI_PRODUCT_LSI_SAS1068
-#define PCI_PRODUCT_LSI_SAS1068		0x0054
+#ifndef	MPI_MANUFACTPAGE_DEVICEID_FC929_LAN_FB
+#define	MPI_MANUFACTPAGE_DEVICEID_FC929_LAN_FB	0x0623
 #endif
 
-#ifndef PCI_PRODUCT_LSI_SAS1068A
-#define PCI_PRODUCT_LSI_SAS1068A	0x0055
+#ifndef	MPI_MANUFACTPAGE_DEVICEID_FC929X_LAN_FB
+#define	MPI_MANUFACTPAGE_DEVICEID_FC929X_LAN_FB	0x0627
 #endif
 
-#ifndef PCI_PRODUCT_LSI_SAS1068E
-#define PCI_PRODUCT_LSI_SAS1068E	0x0058
+#ifndef	MPI_MANUFACTPAGE_DEVICEID_FC919X_LAN_FB
+#define	MPI_MANUFACTPAGE_DEVICEID_FC919X_LAN_FB	0x0629
 #endif
 
-#ifndef PCI_PRODUCT_LSI_SAS1078
-#define PCI_PRODUCT_LSI_SAS1078		0x0062
+#ifndef MPI_MANUFACTPAGE_DEVID_SAS1068A_FB
+#define MPI_MANUFACTPAGE_DEVID_SAS1068A_FB	0x0055
 #endif
 
-#ifndef	PCI_PRODUCT_LSI_SAS1078DE
-#define	PCI_PRODUCT_LSI_SAS1078DE	0x007C
+#ifndef	MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB
+#define	MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB	0x007C
 #endif
 
 #ifndef	PCIM_CMD_SERRESPEN
@@ -224,8 +156,8 @@ static int mpt_pci_detach(device_t);
 static int mpt_pci_shutdown(device_t);
 static int mpt_dma_mem_alloc(struct mpt_softc *mpt);
 static void mpt_dma_mem_free(struct mpt_softc *mpt);
-static void mpt_read_config_regs(struct mpt_softc *mpt);
 #if 0
+static void mpt_read_config_regs(struct mpt_softc *mpt);
 static void mpt_set_config_regs(struct mpt_softc *mpt);
 #endif
 static void mpt_pci_intr(void *);
@@ -236,77 +168,76 @@ static device_method_t mpt_methods[] = {
 	DEVMETHOD(device_attach,	mpt_pci_attach),
 	DEVMETHOD(device_detach,	mpt_pci_detach),
 	DEVMETHOD(device_shutdown,	mpt_pci_shutdown),
-	{ 0, 0 }
+	DEVMETHOD_END
 };
 
 static driver_t mpt_driver = {
 	"mpt", mpt_methods, sizeof(struct mpt_softc)
 };
 static devclass_t mpt_devclass;
-DRIVER_MODULE(mpt, pci, mpt_driver, mpt_devclass, 0, 0);
+DRIVER_MODULE(mpt, pci, mpt_driver, mpt_devclass, NULL, NULL);
 MODULE_DEPEND(mpt, pci, 1, 1, 1);
 MODULE_VERSION(mpt, 1);
 
 static int
 mpt_pci_probe(device_t dev)
 {
-	char *desc;
+	const char *desc;
 
-	if (pci_get_vendor(dev) != PCI_VENDOR_LSI) {
+	if (pci_get_vendor(dev) != MPI_MANUFACTPAGE_VENDORID_LSILOGIC)
 		return (ENXIO);
-	}
 
 	switch (pci_get_device(dev)) {
-	case PCI_PRODUCT_LSI_FC909:
+	case MPI_MANUFACTPAGE_DEVICEID_FC909_FB:
 		desc = "LSILogic FC909 FC Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC909A:
+	case MPI_MANUFACTPAGE_DEVICEID_FC909:
 		desc = "LSILogic FC909A FC Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC919:
+	case MPI_MANUFACTPAGE_DEVICEID_FC919:
 		desc = "LSILogic FC919 FC Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC919_LAN:
+	case MPI_MANUFACTPAGE_DEVICEID_FC919_LAN_FB:
 		desc = "LSILogic FC919 LAN Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC929:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929:
 		desc = "Dual LSILogic FC929 FC Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC929_LAN:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929_LAN_FB:
 		desc = "Dual LSILogic FC929 LAN Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC919X:
+	case MPI_MANUFACTPAGE_DEVICEID_FC919X:
 		desc = "LSILogic FC919 FC PCI-X Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC919X_LAN:
+	case MPI_MANUFACTPAGE_DEVICEID_FC919X_LAN_FB:
 		desc = "LSILogic FC919 LAN PCI-X Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC929X:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929X:
 		desc = "Dual LSILogic FC929X 2Gb/s FC PCI-X Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC929X_LAN:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929X_LAN_FB:
 		desc = "Dual LSILogic FC929X LAN PCI-X Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC646:
+	case MPI_MANUFACTPAGE_DEVICEID_FC949E:
 		desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-Express Adapter";
 		break;
-	case PCI_PRODUCT_LSI_FC7X04X:
+	case MPI_MANUFACTPAGE_DEVICEID_FC949X:
 		desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-X Adapter";
 		break;
-	case PCI_PRODUCT_LSI_1030:
-	case PCI_PRODUCT_LSI_1030ZC:
+	case MPI_MANUFACTPAGE_DEVID_53C1030:
+	case MPI_MANUFACTPAGE_DEVID_53C1030ZC:
 		desc = "LSILogic 1030 Ultra4 Adapter";
 		break;
-	case PCI_PRODUCT_LSI_SAS1064:
-	case PCI_PRODUCT_LSI_SAS1064A:
-	case PCI_PRODUCT_LSI_SAS1064E:
-	case PCI_PRODUCT_LSI_SAS1066:
-	case PCI_PRODUCT_LSI_SAS1066E:
-	case PCI_PRODUCT_LSI_SAS1068:
-	case PCI_PRODUCT_LSI_SAS1068A:
-	case PCI_PRODUCT_LSI_SAS1068E:
-	case PCI_PRODUCT_LSI_SAS1078:
-	case PCI_PRODUCT_LSI_SAS1078DE:
+	case MPI_MANUFACTPAGE_DEVID_SAS1064:
+	case MPI_MANUFACTPAGE_DEVID_SAS1064A:
+	case MPI_MANUFACTPAGE_DEVID_SAS1064E:
+	case MPI_MANUFACTPAGE_DEVID_SAS1066:
+	case MPI_MANUFACTPAGE_DEVID_SAS1066E:
+	case MPI_MANUFACTPAGE_DEVID_SAS1068:
+	case MPI_MANUFACTPAGE_DEVID_SAS1068A_FB:
+	case MPI_MANUFACTPAGE_DEVID_SAS1068E:
+	case MPI_MANUFACTPAGE_DEVID_SAS1078:
+	case MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB:
 		desc = "LSILogic SAS/SATA Adapter";
 		break;
 	default:
@@ -459,40 +390,35 @@ mpt_pci_attach(device_t dev)
 	uint32_t	  data, cmd;
 	int		  mpt_io_bar, mpt_mem_bar;
 
-	/* Allocate the softc structure */
 	mpt  = (struct mpt_softc*)device_get_softc(dev);
-	if (mpt == NULL) {
-		device_printf(dev, "cannot allocate softc\n");
-		return (ENOMEM);
-	}
-	memset(mpt, 0, sizeof(struct mpt_softc));
+
 	switch (pci_get_device(dev)) {
-	case PCI_PRODUCT_LSI_FC909:
-	case PCI_PRODUCT_LSI_FC909A:
-	case PCI_PRODUCT_LSI_FC919:
-	case PCI_PRODUCT_LSI_FC919_LAN:
-	case PCI_PRODUCT_LSI_FC929:
-	case PCI_PRODUCT_LSI_FC929_LAN:
-	case PCI_PRODUCT_LSI_FC929X:
-	case PCI_PRODUCT_LSI_FC929X_LAN:
-	case PCI_PRODUCT_LSI_FC919X:
-	case PCI_PRODUCT_LSI_FC919X_LAN:
-	case PCI_PRODUCT_LSI_FC646:
-	case PCI_PRODUCT_LSI_FC7X04X:
+	case MPI_MANUFACTPAGE_DEVICEID_FC909_FB:
+	case MPI_MANUFACTPAGE_DEVICEID_FC909:
+	case MPI_MANUFACTPAGE_DEVICEID_FC919:
+	case MPI_MANUFACTPAGE_DEVICEID_FC919_LAN_FB:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929_LAN_FB:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929X:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929X_LAN_FB:
+	case MPI_MANUFACTPAGE_DEVICEID_FC919X:
+	case MPI_MANUFACTPAGE_DEVICEID_FC919X_LAN_FB:
+	case MPI_MANUFACTPAGE_DEVICEID_FC949E:
+	case MPI_MANUFACTPAGE_DEVICEID_FC949X:
 		mpt->is_fc = 1;
 		break;
-	case PCI_PRODUCT_LSI_SAS1078:
-	case PCI_PRODUCT_LSI_SAS1078DE:
+	case MPI_MANUFACTPAGE_DEVID_SAS1078:
+	case MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB:
 		mpt->is_1078 = 1;
 		/* FALLTHROUGH */
-	case PCI_PRODUCT_LSI_SAS1064:
-	case PCI_PRODUCT_LSI_SAS1064A:
-	case PCI_PRODUCT_LSI_SAS1064E:
-	case PCI_PRODUCT_LSI_SAS1066:
-	case PCI_PRODUCT_LSI_SAS1066E:
-	case PCI_PRODUCT_LSI_SAS1068:
-	case PCI_PRODUCT_LSI_SAS1068A:
-	case PCI_PRODUCT_LSI_SAS1068E:
+	case MPI_MANUFACTPAGE_DEVID_SAS1064:
+	case MPI_MANUFACTPAGE_DEVID_SAS1064A:
+	case MPI_MANUFACTPAGE_DEVID_SAS1064E:
+	case MPI_MANUFACTPAGE_DEVID_SAS1066:
+	case MPI_MANUFACTPAGE_DEVID_SAS1066E:
+	case MPI_MANUFACTPAGE_DEVID_SAS1068:
+	case MPI_MANUFACTPAGE_DEVID_SAS1068A_FB:
+	case MPI_MANUFACTPAGE_DEVID_SAS1068E:
 		mpt->is_sas = 1;
 		break;
 	default:
@@ -544,12 +470,12 @@ mpt_pci_attach(device_t dev)
 	 * If so, link with our partner (around yet)
 	 */
 	switch (pci_get_device(dev)) {
-	case PCI_PRODUCT_LSI_FC929:
-	case PCI_PRODUCT_LSI_FC929_LAN:
-	case PCI_PRODUCT_LSI_FC646:
-	case PCI_PRODUCT_LSI_FC7X04X:
-	case PCI_PRODUCT_LSI_1030:
-	case PCI_PRODUCT_LSI_1030ZC:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929:
+	case MPI_MANUFACTPAGE_DEVICEID_FC929_LAN_FB:
+	case MPI_MANUFACTPAGE_DEVICEID_FC949E:
+	case MPI_MANUFACTPAGE_DEVICEID_FC949X:
+	case MPI_MANUFACTPAGE_DEVID_53C1030:
+	case MPI_MANUFACTPAGE_DEVID_53C1030ZC:
 		mpt_link_peer(mpt);
 		break;
 	default:
@@ -588,7 +514,6 @@ mpt_pci_attach(device_t dev)
 		mpt->pci_pio_sh = rman_get_bushandle(mpt->pci_pio_reg);
 	}
 
-	/* Allocate kernel virtual memory for the 9x9's Mem0 region */
 	mpt_mem_bar = PCIR_BAR(mpt_mem_bar);
 	mpt->pci_reg = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
 	    &mpt_mem_bar, RF_ACTIVE);
@@ -660,6 +585,7 @@ mpt_pci_attach(device_t dev)
 		goto bad;
 	}
 
+#if 0
 	/*
 	 * Save the PCI config register values
  	 *
@@ -671,6 +597,7 @@ mpt_pci_attach(device_t dev)
 	 */
 
 	mpt_read_config_regs(mpt);
+#endif
 
 	/*
 	 * Disable PIO until we need it
@@ -888,6 +815,7 @@ mpt_dma_mem_free(struct mpt_softc *mpt)
 	mpt->request_pool = NULL;
 }
 
+#if 0
 /* Reads modifiable (via PCI transactions) config registers */
 static void
 mpt_read_config_regs(struct mpt_softc *mpt)
@@ -906,7 +834,6 @@ mpt_read_config_regs(struct mpt_softc *m
 	mpt->pci_cfg.PMCSR = pci_read_config(mpt->dev, 0x44, 4);
 }
 
-#if 0
 /* Sets modifiable config registers */
 static void
 mpt_set_config_regs(struct mpt_softc *mpt)

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 31 00:13:46 2012
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 EACE0106564A;
	Sat, 31 Mar 2012 00:13:46 +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 D557C8FC18;
	Sat, 31 Mar 2012 00:13:46 +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 q2V0Dkev064874;
	Sat, 31 Mar 2012 00:13:46 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2V0Dk5E064872;
	Sat, 31 Mar 2012 00:13:46 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203310013.q2V0Dk5E064872@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 31 Mar 2012 00:13:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233724 - in stable/8/sys: i386/conf sparc64/pci
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, 31 Mar 2012 00:13:47 -0000

Author: marius
Date: Sat Mar 31 00:13:46 2012
New Revision: 233724
URL: http://svn.freebsd.org/changeset/base/233724

Log:
  MFC: r233421
  
  Given that this is a host-PCI-Express bridge driver, create the parent
  DMA tag with a 4 GB boundary as required by PCI-Express. With r232403
  (MFC'ed to stable/8 in r233394) in place this actually is redundant.
  However, the host-PCI-Express bridge driver is the more appropriate
  place for implementing this restriction.

Modified:
  stable/8/sys/sparc64/pci/fire.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/sparc64/pci/fire.c
==============================================================================
--- stable/8/sys/sparc64/pci/fire.c	Sat Mar 31 00:13:41 2012	(r233723)
+++ stable/8/sys/sparc64/pci/fire.c	Sat Mar 31 00:13:46 2012	(r233724)
@@ -764,7 +764,7 @@ fire_attach(device_t dev)
 	if (sc->sc_pci_cfgt == NULL)
 		panic("%s: could not allocate PCI configuration space tag",
 		    __func__);
-	if (bus_dma_tag_create(bus_get_dma_tag(dev), 8, 0,
+	if (bus_dma_tag_create(bus_get_dma_tag(dev), 8, 0x100000000,
 	    sc->sc_is.is_pmaxaddr, ~0, NULL, NULL, sc->sc_is.is_pmaxaddr,
 	    0xff, 0xffffffff, 0, NULL, NULL, &sc->sc_pci_dmat) != 0)
 		panic("%s: could not create PCI DMA tag", __func__);

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 31 01:21:54 2012
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 4CBA0106579C;
	Sat, 31 Mar 2012 01:21:54 +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 1D8BB8FC14;
	Sat, 31 Mar 2012 01:21:54 +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 q2V1LrNw070478;
	Sat, 31 Mar 2012 01:21:53 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2V1Lrdu070476;
	Sat, 31 Mar 2012 01:21:53 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203310121.q2V1Lrdu070476@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 31 Mar 2012 01:21:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233726 - in stable/8/sys: dev/e1000 i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 31 Mar 2012 01:21:54 -0000

Author: marius
Date: Sat Mar 31 01:21:53 2012
New Revision: 233726
URL: http://svn.freebsd.org/changeset/base/233726

Log:
  MFC: r233423
  
  Initialize the mutexes used for the NVM and the swflag as MTX_DUPOK in
  order to avoid otherwise harmless witness warnings when these are acquired
  at the same time and due to both using MTX_NETWORK_LOCK as their type.
  The right fix actually would be to use different, descriptive types for
  these. However, the latter would require undesirable changes to the shared
  code base. Another approach would be to just supply NULL as the type, which
  was deemed as less desirable though as it would cause the unique but cryptic
  name also to be used for the type and to diverge from the type used by other
  network device drivers.

Modified:
  stable/8/sys/dev/e1000/e1000_osdep.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/e1000/e1000_osdep.h
==============================================================================
--- stable/8/sys/dev/e1000/e1000_osdep.h	Sat Mar 31 01:21:46 2012	(r233725)
+++ stable/8/sys/dev/e1000/e1000_osdep.h	Sat Mar 31 01:21:53 2012	(r233726)
@@ -84,7 +84,8 @@
 /* Mutex used in the shared code */
 #define E1000_MUTEX                     struct mtx
 #define E1000_MUTEX_INIT(mutex)         mtx_init((mutex), #mutex, \
-                                            MTX_NETWORK_LOCK, MTX_DEF)
+                                            MTX_NETWORK_LOCK, \
+                                            MTX_DEF | MTX_DUPOK)
 #define E1000_MUTEX_DESTROY(mutex)      mtx_destroy(mutex)
 #define E1000_MUTEX_LOCK(mutex)         mtx_lock(mutex)
 #define E1000_MUTEX_TRYLOCK(mutex)      mtx_trylock(mutex)

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 31 08:46:11 2012
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 B6AE51065674;
	Sat, 31 Mar 2012 08:46:11 +0000 (UTC)
	(envelope-from bschmidt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A0B828FC16;
	Sat, 31 Mar 2012 08:46:11 +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 q2V8kBwN092210;
	Sat, 31 Mar 2012 08:46:11 GMT
	(envelope-from bschmidt@svn.freebsd.org)
Received: (from bschmidt@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2V8kBEq092208;
	Sat, 31 Mar 2012 08:46:11 GMT
	(envelope-from bschmidt@svn.freebsd.org)
Message-Id: <201203310846.q2V8kBEq092208@svn.freebsd.org>
From: Bernhard Schmidt 
Date: Sat, 31 Mar 2012 08:46:11 +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: r233736 - stable/8/sbin/ifconfig
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, 31 Mar 2012 08:46:11 -0000

Author: bschmidt
Date: Sat Mar 31 08:46:11 2012
New Revision: 233736
URL: http://svn.freebsd.org/changeset/base/233736

Log:
  MFC r233328,r233382:
  Fix incorrect parameter usage.
  
  Submitted by:	Monthadar Al Jaberi

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

Modified: stable/8/sbin/ifconfig/ifieee80211.c
==============================================================================
--- stable/8/sbin/ifconfig/ifieee80211.c	Sat Mar 31 08:44:27 2012	(r233735)
+++ stable/8/sbin/ifconfig/ifieee80211.c	Sat Mar 31 08:46:11 2012	(r233736)
@@ -1856,13 +1856,13 @@ DECL_CMD_FUNC(set80211meshttl, val, d)
 static
 DECL_CMD_FUNC(set80211meshforward, val, d)
 {
-	set80211(s, IEEE80211_IOC_MESH_FWRD, atoi(val), 0, NULL);
+	set80211(s, IEEE80211_IOC_MESH_FWRD, d, 0, NULL);
 }
 
 static
 DECL_CMD_FUNC(set80211meshpeering, val, d)
 {
-	set80211(s, IEEE80211_IOC_MESH_AP, atoi(val), 0, NULL);
+	set80211(s, IEEE80211_IOC_MESH_AP, d, 0, NULL);
 }
 
 static

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 31 10:20:50 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E0260106564A;
	Sat, 31 Mar 2012 10:20:50 +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 CB24F8FC08;
	Sat, 31 Mar 2012 10:20:50 +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 q2VAKoBT095710;
	Sat, 31 Mar 2012 10:20:50 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2VAKoXP095708;
	Sat, 31 Mar 2012 10:20:50 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203311020.q2VAKoXP095708@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 31 Mar 2012 10:20:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233738 - stable/8/share/man/man4
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, 31 Mar 2012 10:20:51 -0000

Author: marius
Date: Sat Mar 31 10:20:50 2012
New Revision: 233738
URL: http://svn.freebsd.org/changeset/base/233738

Log:
  MFC: r233426
  
  Add QGE-X to the list of known-working cards.

Modified:
  stable/8/share/man/man4/cas.4
Directory Properties:
  stable/8/share/man/man4/   (props changed)

Modified: stable/8/share/man/man4/cas.4
==============================================================================
--- stable/8/share/man/man4/cas.4	Sat Mar 31 10:20:48 2012	(r233737)
+++ stable/8/share/man/man4/cas.4	Sat Mar 31 10:20:50 2012	(r233738)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 3, 2010
+.Dd March 24, 2012
 .Dt CAS 4
 .Os
 .Sh NAME
@@ -102,6 +102,9 @@ Sun GigaSwift Ethernet UTP (GCS)
 .It
 Sun Quad GigaSwift Ethernet UTP (QGE)
 (part no.\& 501-6522)
+.It
+Sun Quad GigaSwift Ethernet PCI-X (QGE-X)
+(part no.\& 501-6738)
 .El
 .Sh NOTES
 On sparc64 the

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 31 10:27:01 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 157E41065670;
	Sat, 31 Mar 2012 10:27:01 +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 F22B28FC16;
	Sat, 31 Mar 2012 10:27:00 +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 q2VAR09P096057;
	Sat, 31 Mar 2012 10:27:00 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2VAR0x6096043;
	Sat, 31 Mar 2012 10:27:00 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203311027.q2VAR0x6096043@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 31 Mar 2012 10:27:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233741 - in stable/8/sys: dev/mpt/mpilib i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 31 Mar 2012 10:27:01 -0000

Author: marius
Date: Sat Mar 31 10:27:00 2012
New Revision: 233741
URL: http://svn.freebsd.org/changeset/base/233741

Log:
  MFC: r233425
  
  Consistently update to the MPI header set version 01.05.20 after r224761
  (MFC'ed to stable/8 in r224820).
  Requested by:	mjacob

Added:
  stable/8/sys/dev/mpt/mpilib/mpi_log_fc.h
     - copied unchanged from r233425, head/sys/dev/mpt/mpilib/mpi_log_fc.h
  stable/8/sys/dev/mpt/mpilib/mpi_log_sas.h
     - copied unchanged from r233425, head/sys/dev/mpt/mpilib/mpi_log_sas.h
Deleted:
  stable/8/sys/dev/mpt/mpilib/mpi_inb.h
Modified:
  stable/8/sys/dev/mpt/mpilib/mpi.h
  stable/8/sys/dev/mpt/mpilib/mpi_cnfg.h
  stable/8/sys/dev/mpt/mpilib/mpi_fc.h
  stable/8/sys/dev/mpt/mpilib/mpi_init.h
  stable/8/sys/dev/mpt/mpilib/mpi_ioc.h
  stable/8/sys/dev/mpt/mpilib/mpi_lan.h
  stable/8/sys/dev/mpt/mpilib/mpi_raid.h
  stable/8/sys/dev/mpt/mpilib/mpi_sas.h
  stable/8/sys/dev/mpt/mpilib/mpi_targ.h
  stable/8/sys/dev/mpt/mpilib/mpi_tool.h
  stable/8/sys/dev/mpt/mpilib/mpi_type.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/dev/mpt/mpilib/mpi.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@
  *          Title:  MPI Message independent structures and definitions
  *  Creation Date:  July 27, 2000
  *
- *    mpi.h Version:  01.05.13
+ *    mpi.h Version:  01.05.17
  *
  *  Version History
  *  ---------------
@@ -106,6 +106,10 @@
  *  03-27-06  01.05.11  Bumped MPI_HEADER_VERSION_UNIT.
  *  10-11-06  01.05.12  Bumped MPI_HEADER_VERSION_UNIT.
  *  05-24-07  01.05.13  Bumped MPI_HEADER_VERSION_UNIT.
+ *  08-07-07  01.05.14  Bumped MPI_HEADER_VERSION_UNIT.
+ *  01-15-08  01.05.15  Bumped MPI_HEADER_VERSION_UNIT.
+ *  03-28-08  01.05.16  Bumped MPI_HEADER_VERSION_UNIT.
+ *  07-11-08  01.05.17  Bumped MPI_HEADER_VERSION_UNIT.
  *  --------------------------------------------------------------------------
  */
 
@@ -136,7 +140,7 @@
 /* Note: The major versions of 0xe0 through 0xff are reserved */
 
 /* versioning for this MPI header set */
-#define MPI_HEADER_VERSION_UNIT             (0x10)
+#define MPI_HEADER_VERSION_UNIT             (0x14)
 #define MPI_HEADER_VERSION_DEV              (0x00)
 #define MPI_HEADER_VERSION_UNIT_MASK        (0xFF00)
 #define MPI_HEADER_VERSION_UNIT_SHIFT       (8)

Modified: stable/8/sys/dev/mpt/mpilib/mpi_cnfg.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_cnfg.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_cnfg.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@
  *          Title:  MPI Config message, structures, and Pages
  *  Creation Date:  July 27, 2000
  *
- *    mpi_cnfg.h Version:  01.05.15
+ *    mpi_cnfg.h Version:  01.05.19
  *
  *  Version History
  *  ---------------
@@ -335,6 +335,28 @@
  *                      Expander Page 0 Flags field.
  *                      Fixed define for
  *                      MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED.
+ *  08-07-07  01.05.16  Added MPI_IOCPAGE6_CAP_FLAGS_MULTIPORT_DRIVE_SUPPORT
+ *                      define.
+ *                      Added BIOS Page 4 structure.
+ *                      Added MPI_RAID_PHYS_DISK1_PATH_MAX define for RAID
+ *                      Physcial Disk Page 1.
+ *  01-15-07  01.05.17  Added additional bit defines for ExtFlags field of
+ *                      Manufacturing Page 4.
+ *                      Added Solid State Drives Supported bit to IOC Page 6
+ *                      Capabilities Flags.
+ *                      Added new value for AccessStatus field of SAS Device
+ *                      Page 0 (_SATA_NEEDS_INITIALIZATION).
+ *  03-28-08  01.05.18  Defined new bits in Manufacturing Page 4 ExtFlags field
+ *                      to control coercion size and the mixing of SAS and SATA
+ *                      SSD drives.
+ *  07-11-08  01.05.19  Added defines MPI_MANPAGE4_EXTFLAGS_RAID0_SINGLE_DRIVE
+ *                      and MPI_MANPAGE4_EXTFLAGS_SSD_SCRUB_DISABLE for ExtFlags
+ *                      field of Manufacturing Page 4.
+ *                      Added defines for a new bit in BIOS Page 1 BiosOptions
+ *                      field to control adapter scan order.
+ *                      Added BootDeviceWaitTime field to SAS IO Unit Page 2.
+ *                      Added MPI_SAS_PHY0_PHYINFO_PHY_VACANT for use in PhyInfo
+ *                      field of SAS Expander Page 1.
  *  --------------------------------------------------------------------------
  */
 
@@ -713,6 +735,16 @@ typedef struct _CONFIG_PAGE_MANUFACTURIN
 #define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA                 (0x01)
 
 /* defines for the ExtFlags field */
+#define MPI_MANPAGE4_EXTFLAGS_RAID0_SINGLE_DRIVE        (0x0400)
+#define MPI_MANPAGE4_EXTFLAGS_SSD_SCRUB_DISABLE         (0x0200)
+#define MPI_MANPAGE4_EXTFLAGS_MASK_COERCION_SIZE        (0x0180)
+#define MPI_MANPAGE4_EXTFLAGS_SHIFT_COERCION_SIZE       (7)
+#define MPI_MANPAGE4_EXTFLAGS_1GB_COERCION_SIZE         (0)
+#define MPI_MANPAGE4_EXTFLAGS_128MB_COERCION_SIZE       (1)
+
+#define MPI_MANPAGE4_EXTFLAGS_NO_MIX_SSD_SAS_SATA       (0x0040)
+#define MPI_MANPAGE4_EXTFLAGS_MIX_SSD_AND_NON_SSD       (0x0020)
+#define MPI_MANPAGE4_EXTFLAGS_DUAL_PORT_SUPPORT         (0x0010)
 #define MPI_MANPAGE4_EXTFLAGS_HIDE_NON_IR_METADATA      (0x0008)
 #define MPI_MANPAGE4_EXTFLAGS_SAS_CACHE_DISABLE         (0x0004)
 #define MPI_MANPAGE4_EXTFLAGS_SATA_CACHE_DISABLE        (0x0002)
@@ -1186,6 +1218,8 @@ typedef struct _CONFIG_PAGE_IOC_6
 
 /* IOC Page 6 Capabilities Flags */
 
+#define MPI_IOCPAGE6_CAP_FLAGS_SSD_SUPPORT              (0x00000020)
+#define MPI_IOCPAGE6_CAP_FLAGS_MULTIPORT_DRIVE_SUPPORT  (0x00000010)
 #define MPI_IOCPAGE6_CAP_FLAGS_DISABLE_SMART_POLLING    (0x00000008)
 
 #define MPI_IOCPAGE6_CAP_FLAGS_MASK_METADATA_SIZE       (0x00000006)
@@ -1222,6 +1256,10 @@ typedef struct _CONFIG_PAGE_BIOS_1
 #define MPI_BIOSPAGE1_OPTIONS_SPI_ENABLE                (0x00000400)
 #define MPI_BIOSPAGE1_OPTIONS_FC_ENABLE                 (0x00000200)
 #define MPI_BIOSPAGE1_OPTIONS_SAS_ENABLE                (0x00000100)
+
+#define MPI_BIOSPAGE1_OPTIONS_SCAN_HIGH_TO_LOW          (0x00000002)
+#define MPI_BIOSPAGE1_OPTIONS_SCAN_LOW_TO_HIGH          (0x00000000)
+
 #define MPI_BIOSPAGE1_OPTIONS_DISABLE_BIOS              (0x00000001)
 
 /* values for the IOCSettings field */
@@ -1455,6 +1493,15 @@ typedef struct _CONFIG_PAGE_BIOS_2
 #define MPI_BIOSPAGE2_FORM_SAS_WWN                      (0x05)
 #define MPI_BIOSPAGE2_FORM_ENCLOSURE_SLOT               (0x06)
 
+typedef struct _CONFIG_PAGE_BIOS_4
+{
+    CONFIG_PAGE_HEADER      Header;                     /* 00h */
+    U64                     ReassignmentBaseWWID;       /* 04h */
+} CONFIG_PAGE_BIOS_4, MPI_POINTER PTR_CONFIG_PAGE_BIOS_4,
+  BIOSPage4_t, MPI_POINTER pBIOSPage4_t;
+
+#define MPI_BIOSPAGE4_PAGEVERSION                       (0x00)
+
 
 /****************************************************************************
 *   SCSI Port Config Pages
@@ -2446,6 +2493,15 @@ typedef struct _RAID_PHYS_DISK1_PATH
 #define MPI_RAID_PHYSDISK1_FLAG_BROKEN          (0x0002)
 #define MPI_RAID_PHYSDISK1_FLAG_INVALID         (0x0001)
 
+
+/*
+ * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
+ * one and check Header.PageLength or NumPhysDiskPaths at runtime.
+ */
+#ifndef MPI_RAID_PHYS_DISK1_PATH_MAX
+#define MPI_RAID_PHYS_DISK1_PATH_MAX    (1)
+#endif
+
 typedef struct _CONFIG_PAGE_RAID_PHYS_DISK_1
 {
     CONFIG_PAGE_HEADER              Header;             /* 00h */
@@ -2453,7 +2509,7 @@ typedef struct _CONFIG_PAGE_RAID_PHYS_DI
     U8                              PhysDiskNum;        /* 05h */
     U16                             Reserved2;          /* 06h */
     U32                             Reserved1;          /* 08h */
-    RAID_PHYS_DISK1_PATH            Path[1];            /* 0Ch */
+    RAID_PHYS_DISK1_PATH            Path[MPI_RAID_PHYS_DISK1_PATH_MAX];/* 0Ch */
 } CONFIG_PAGE_RAID_PHYS_DISK_1, MPI_POINTER PTR_CONFIG_PAGE_RAID_PHYS_DISK_1,
   RaidPhysDiskPage1_t, MPI_POINTER pRaidPhysDiskPage1_t;
 
@@ -2578,6 +2634,7 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_
 #define MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE              (0x03)
 #define MPI_SAS_IOUNIT0_RATE_1_5                            (0x08)
 #define MPI_SAS_IOUNIT0_RATE_3_0                            (0x09)
+#define MPI_SAS_IOUNIT0_RATE_6_0                            (0x0A)
 
 /* see mpi_sas.h for values for SAS IO Unit Page 0 ControllerPhyDeviceInfo values */
 
@@ -2697,7 +2754,7 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_
 {
     CONFIG_EXTENDED_PAGE_HEADER         Header;                 /* 00h */
     U8                                  NumDevsPerEnclosure;    /* 08h */
-    U8                                  Reserved1;              /* 09h */
+    U8                                  BootDeviceWaitTime;     /* 09h */
     U16                                 Reserved2;              /* 0Ah */
     U16                                 MaxPersistentIDs;       /* 0Ch */
     U16                                 NumPersistentIDsUsed;   /* 0Eh */
@@ -2707,7 +2764,7 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_
 } CONFIG_PAGE_SAS_IO_UNIT_2, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_2,
   SasIOUnitPage2_t, MPI_POINTER pSasIOUnitPage2_t;
 
-#define MPI_SASIOUNITPAGE2_PAGEVERSION      (0x06)
+#define MPI_SASIOUNITPAGE2_PAGEVERSION      (0x07)
 
 /* values for SAS IO Unit Page 2 Status field */
 #define MPI_SAS_IOUNIT2_STATUS_DEVICE_LIMIT_EXCEEDED        (0x08)
@@ -2871,6 +2928,7 @@ typedef struct _CONFIG_PAGE_SAS_DEVICE_0
 #define MPI_SAS_DEVICE0_ASTATUS_SATA_INIT_FAILED            (0x01)
 #define MPI_SAS_DEVICE0_ASTATUS_SATA_CAPABILITY_FAILED      (0x02)
 #define MPI_SAS_DEVICE0_ASTATUS_SATA_AFFILIATION_CONFLICT   (0x03)
+#define MPI_SAS_DEVICE0_ASTATUS_SATA_NEEDS_INITIALIZATION   (0x04)
 /* specific values for SATA Init failures */
 #define MPI_SAS_DEVICE0_ASTATUS_SIF_UNKNOWN                 (0x10)
 #define MPI_SAS_DEVICE0_ASTATUS_SIF_AFFILIATION_CONFLICT    (0x11)
@@ -2981,6 +3039,7 @@ typedef struct _CONFIG_PAGE_SAS_PHY_0
 #define MPI_SAS_PHY0_FLAGS_SGPIO_DIRECT_ATTACH_ENC              (0x01)
 
 /* values for SAS PHY Page 0 PhyInfo field */
+#define MPI_SAS_PHY0_PHYINFO_PHY_VACANT                         (0x80000000)
 #define MPI_SAS_PHY0_PHYINFO_SATA_PORT_ACTIVE                   (0x00004000)
 #define MPI_SAS_PHY0_PHYINFO_SATA_PORT_SELECTOR                 (0x00002000)
 #define MPI_SAS_PHY0_PHYINFO_VIRTUAL_PHY                        (0x00001000)

Modified: stable/8/sys/dev/mpt/mpilib/mpi_fc.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_fc.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_fc.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without

Modified: stable/8/sys/dev/mpt/mpilib/mpi_init.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_init.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_init.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without

Modified: stable/8/sys/dev/mpt/mpilib/mpi_ioc.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_ioc.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_ioc.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
@@ -868,6 +868,7 @@ typedef struct _EVENT_DATA_SAS_PHY_LINK_
 #define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE         (0x03)
 #define MPI_EVENT_SAS_PLS_LR_RATE_1_5                       (0x08)
 #define MPI_EVENT_SAS_PLS_LR_RATE_3_0                       (0x09)
+#define MPI_EVENT_SAS_PLS_LR_RATE_6_0                       (0x0A)
 
 /* SAS Discovery Event data */
 

Modified: stable/8/sys/dev/mpt/mpilib/mpi_lan.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_lan.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_lan.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without

Copied: stable/8/sys/dev/mpt/mpilib/mpi_log_fc.h (from r233425, head/sys/dev/mpt/mpilib/mpi_log_fc.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/sys/dev/mpt/mpilib/mpi_log_fc.h	Sat Mar 31 10:27:00 2012	(r233741, copy of r233425, head/sys/dev/mpt/mpilib/mpi_log_fc.h)
@@ -0,0 +1,117 @@
+/* $FreeBSD$ */
+/*-
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *    substantially similar to the "NO WARRANTY" disclaimer below
+ *    ("Disclaimer") and any redistribution must be conditioned upon including
+ *    a substantially similar Disclaimer requirement for further binary
+ *    redistribution.
+ * 3. Neither the name of the LSI Logic Corporation 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT
+ * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  NAME:           fc_log.h
+ *  SUMMARY:        MPI IocLogInfo definitions for the SYMFC9xx chips
+ *  DESCRIPTION:    Contains the enumerated list of values that may be returned
+ *                  in the IOCLogInfo field of a MPI Default Reply Message.
+ *
+ *  CREATION DATE:  6/02/2000
+ *  ID:             $Id: fc_log.h,v 4.6 2001/07/26 14:41:33 sschremm Exp $
+ */
+
+
+/*
+ * MpiIocLogInfo_t enum
+ *
+ * These 32 bit values are used in the IOCLogInfo field of the MPI reply
+ * messages.
+ * The value is 0xabcccccc where
+ *          a = The type of log info as per the MPI spec. Since these codes are
+ *              all for Fibre Channel this value will always be 2.
+ *          b = Specifies a subclass of the firmware where
+ *                  0 = FCP Initiator
+ *                  1 = FCP Target
+ *                  2 = LAN
+ *                  3 = MPI Message Layer
+ *                  4 = FC Link
+ *                  5 = Context Manager
+ *                  6 = Invalid Field Offset
+ *                  7 = State Change Info
+ *                  all others are reserved for future use
+ *          c = A specific value within the subclass.
+ *
+ * NOTE: Any new values should be added to the end of each subclass so that the
+ *       codes remain consistent across firmware releases.
+ */
+typedef enum _MpiIocLogInfoFc
+{
+    MPI_IOCLOGINFO_FC_INIT_BASE                     = 0x20000000,
+    MPI_IOCLOGINFO_FC_INIT_ERROR_OUT_OF_ORDER_FRAME = 0x20000001, /* received an out of order frame - unsupported */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_START_OF_FRAME = 0x20000002, /* Bad Rx Frame, bad start of frame primative */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_END_OF_FRAME   = 0x20000003, /* Bad Rx Frame, bad end of frame primative */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_OVER_RUN           = 0x20000004, /* Bad Rx Frame, overrun */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_RX_OTHER           = 0x20000005, /* Other errors caught by IOC which require retries */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_SUBPROC_DEAD       = 0x20000006, /* Main processor could not initialize sub-processor */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_RX_OVERRUN         = 0x20000007, /* Scatter Gather overrun  */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_RX_BAD_STATUS      = 0x20000008, /* Receiver detected context mismatch via invalid header */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_RX_UNEXPECTED_FRAME= 0x20000009, /* CtxMgr detected unsupported frame type  */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_LINK_FAILURE       = 0x2000000A, /* Link failure occurred  */
+    MPI_IOCLOGINFO_FC_INIT_ERROR_TX_TIMEOUT         = 0x2000000B, /* Transmitter timeout error */
+
+    MPI_IOCLOGINFO_FC_TARGET_BASE                   = 0x21000000,
+    MPI_IOCLOGINFO_FC_TARGET_NO_PDISC               = 0x21000001, /* not sent because we are waiting for a PDISC from the initiator */
+    MPI_IOCLOGINFO_FC_TARGET_NO_LOGIN               = 0x21000002, /* not sent because we are not logged in to the remote node */
+    MPI_IOCLOGINFO_FC_TARGET_DOAR_KILLED_BY_LIP     = 0x21000003, /* Data Out, Auto Response, not sent due to a LIP */
+    MPI_IOCLOGINFO_FC_TARGET_DIAR_KILLED_BY_LIP     = 0x21000004, /* Data In, Auto Response, not sent due to a LIP */
+    MPI_IOCLOGINFO_FC_TARGET_DIAR_MISSING_DATA      = 0x21000005, /* Data In, Auto Response, missing data frames */
+    MPI_IOCLOGINFO_FC_TARGET_DONR_KILLED_BY_LIP     = 0x21000006, /* Data Out, No Response, not sent due to a LIP */
+    MPI_IOCLOGINFO_FC_TARGET_WRSP_KILLED_BY_LIP     = 0x21000007, /* Auto-response after a write not sent due to a LIP */
+    MPI_IOCLOGINFO_FC_TARGET_DINR_KILLED_BY_LIP     = 0x21000008, /* Data In, No Response, not completed due to a LIP */
+    MPI_IOCLOGINFO_FC_TARGET_DINR_MISSING_DATA      = 0x21000009, /* Data In, No Response, missing data frames */
+    MPI_IOCLOGINFO_FC_TARGET_MRSP_KILLED_BY_LIP     = 0x2100000a, /* Manual Response not sent due to a LIP */
+    MPI_IOCLOGINFO_FC_TARGET_NO_CLASS_3             = 0x2100000b, /* not sent because remote node does not support Class 3 */
+    MPI_IOCLOGINFO_FC_TARGET_LOGIN_NOT_VALID        = 0x2100000c, /* not sent because login to remote node not validated */
+    MPI_IOCLOGINFO_FC_TARGET_FROM_OUTBOUND          = 0x2100000e, /* cleared from the outbound queue after a logout */
+    MPI_IOCLOGINFO_FC_TARGET_WAITING_FOR_DATA_IN    = 0x2100000f, /* cleared waiting for data after a logout */
+
+    MPI_IOCLOGINFO_FC_LAN_BASE                      = 0x22000000,
+    MPI_IOCLOGINFO_FC_LAN_TRANS_SGL_MISSING         = 0x22000001, /* Transaction Context Sgl Missing */
+    MPI_IOCLOGINFO_FC_LAN_TRANS_WRONG_PLACE         = 0x22000002, /* Transaction Context found before an EOB */
+    MPI_IOCLOGINFO_FC_LAN_TRANS_RES_BITS_SET        = 0x22000003, /* Transaction Context value has reserved bits set */
+    MPI_IOCLOGINFO_FC_LAN_WRONG_SGL_FLAG            = 0x22000004, /* Invalid SGL Flags */
+
+    MPI_IOCLOGINFO_FC_MSG_BASE                      = 0x23000000,
+
+    MPI_IOCLOGINFO_FC_LINK_BASE                     = 0x24000000,
+    MPI_IOCLOGINFO_FC_LINK_LOOP_INIT_TIMEOUT        = 0x24000001, /* Loop initialization timed out */
+    MPI_IOCLOGINFO_FC_LINK_ALREADY_INITIALIZED      = 0x24000002, /* Another system controller already initialized the loop */
+    MPI_IOCLOGINFO_FC_LINK_LINK_NOT_ESTABLISHED     = 0x24000003, /* Not synchronized to signal or still negotiating (possible cable problem) */
+    MPI_IOCLOGINFO_FC_LINK_CRC_ERROR                = 0x24000004, /* CRC check detected error on received frame */
+
+    MPI_IOCLOGINFO_FC_CTX_BASE                      = 0x25000000,
+
+    MPI_IOCLOGINFO_FC_INVALID_FIELD_BYTE_OFFSET     = 0x26000000, /* The lower 24 bits give the byte offset of the field in the request message that is invalid */
+    MPI_IOCLOGINFO_FC_INVALID_FIELD_MAX_OFFSET      = 0x26ffffff,
+
+    MPI_IOCLOGINFO_FC_STATE_CHANGE                  = 0x27000000  /* The lower 24 bits give additional information concerning state change */
+
+} MpiIocLogInfoFc_t;

Copied: stable/8/sys/dev/mpt/mpilib/mpi_log_sas.h (from r233425, head/sys/dev/mpt/mpilib/mpi_log_sas.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/sys/dev/mpt/mpilib/mpi_log_sas.h	Sat Mar 31 10:27:00 2012	(r233741, copy of r233425, head/sys/dev/mpt/mpilib/mpi_log_sas.h)
@@ -0,0 +1,352 @@
+/* $FreeBSD$ */
+/*-
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *    substantially similar to the "NO WARRANTY" disclaimer below
+ *    ("Disclaimer") and any redistribution must be conditioned upon including
+ *    a substantially similar Disclaimer requirement for further binary
+ *    redistribution.
+ * 3. Neither the name of the LSI Logic Corporation 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT
+ * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/***************************************************************************
+ *                                                                         *
+ * Description                                                             *
+ * ------------                                                            *
+ * This include file contains SAS firmware interface IOC Log Info codes    *
+ *                                                                         *
+ *-------------------------------------------------------------------------*
+ */
+
+#ifndef IOPI_IOCLOGINFO_H_INCLUDED
+#define IOPI_IOCLOGINFO_H_INCLUDED
+
+#define SAS_LOGINFO_NEXUS_LOSS		0x31170000
+#define SAS_LOGINFO_MASK		0xFFFF0000
+
+/****************************************************************************/
+/*  IOC LOGINFO defines, 0x00000000 - 0x0FFFFFFF                            */
+/*  Format:                                                                 */
+/*      Bits 31-28: MPI_IOCLOGINFO_TYPE_SAS (3)                             */
+/*      Bits 27-24: IOC_LOGINFO_ORIGINATOR: 0=IOP, 1=PL, 2=IR               */
+/*      Bits 23-16: LOGINFO_CODE                                            */
+/*      Bits 15-0:  LOGINFO_CODE Specific                                   */
+/****************************************************************************/
+
+/****************************************************************************/
+/* IOC_LOGINFO_ORIGINATOR defines                                           */
+/****************************************************************************/
+#define IOC_LOGINFO_ORIGINATOR_IOP                      (0x00000000)
+#define IOC_LOGINFO_ORIGINATOR_PL                       (0x01000000)
+#define IOC_LOGINFO_ORIGINATOR_IR                       (0x02000000)
+
+#define IOC_LOGINFO_ORIGINATOR_MASK                     (0x0F000000)
+
+/****************************************************************************/
+/* LOGINFO_CODE defines                                                     */
+/****************************************************************************/
+#define IOC_LOGINFO_CODE_MASK                           (0x00FF0000)
+#define IOC_LOGINFO_CODE_SHIFT                          (16)
+
+/****************************************************************************/
+/* IOP LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = IOP          */
+/****************************************************************************/
+#define IOP_LOGINFO_CODE_INVALID_SAS_ADDRESS                 (0x00010000)
+#define IOP_LOGINFO_CODE_UNUSED2                             (0x00020000)
+#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE                 (0x00030000)
+#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_RT              (0x00030100) /* Route Table Entry not found */
+#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PN              (0x00030200) /* Invalid Page Number */
+#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_FORM            (0x00030300) /* Invalid FORM */
+#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PT              (0x00030400) /* Invalid Page Type */
+#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DNM             (0x00030500) /* Device Not Mapped */
+#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PERSIST         (0x00030600) /* Persistent Page not found */
+#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DEFAULT         (0x00030700) /* Default Page not found */
+
+#define IOP_LOGINFO_CODE_FWUPLOAD_NO_FLASH_AVAILABLE         (0x0003E000) /* Tried to upload from flash, but there is none */
+#define IOP_LOGINFO_CODE_FWUPLOAD_UNKNOWN_IMAGE_TYPE         (0x0003E001) /* ImageType field contents were invalid */
+#define IOP_LOGINFO_CODE_FWUPLOAD_WRONG_IMAGE_SIZE           (0x0003E002) /* ImageSize field in TCSGE was bad/offset in MfgPg 4 was wrong */
+#define IOP_LOGINFO_CODE_FWUPLOAD_ENTIRE_FLASH_UPLOAD_FAILED (0x0003E003) /* Error occured while attempting to upload the entire flash */
+#define IOP_LOGINFO_CODE_FWUPLOAD_REGION_UPLOAD_FAILED       (0x0003E004) /* Error occured while attempting to upload single flash region */
+#define IOP_LOGINFO_CODE_FWUPLOAD_DMA_FAILURE                (0x0003E005) /* Problem occured while DMAing FW to host memory */
+
+#define IOP_LOGINFO_CODE_DIAG_MSG_ERROR                      (0x00040000) /* Error handling diag msg - or'd with diag status */
+
+#define IOP_LOGINFO_CODE_TASK_TERMINATED                     (0x00050000)
+
+#define IOP_LOGINFO_CODE_ENCL_MGMT_READ_ACTION_ERR0R         (0x00060001) /* Read Action not supported for SEP msg */
+#define IOP_LOGINFO_CODE_ENCL_MGMT_INVALID_BUS_ID_ERR0R      (0x00060002) /* Invalid Bus/ID in SEP msg */
+
+#define IOP_LOGINFO_CODE_TARGET_ASSIST_TERMINATED            (0x00070001)
+#define IOP_LOGINFO_CODE_TARGET_STATUS_SEND_TERMINATED       (0x00070002)
+#define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_ALL_IO            (0x00070003)
+#define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO          (0x00070004)
+#define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO_REQ      (0x00070005)
+
+#define IOP_LOGINFO_CODE_LOG_TIMESTAMP_EVENT                 (0x00080000)
+
+/****************************************************************************/
+/* PL LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = PL            */
+/****************************************************************************/
+#define PL_LOGINFO_CODE_OPEN_FAILURE                         (0x00010000) /* see SUB_CODE_OPEN_FAIL_ below */
+
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_NO_DEST_TIME_OUT       (0x00000001)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PATHWAY_BLOCKED        (0x00000002)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_CONTINUE0          (0x00000003)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_CONTINUE1          (0x00000004)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_INITIALIZE0        (0x00000005)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_INITIALIZE1        (0x00000006)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_STOP0              (0x00000007)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_STOP1              (0x00000008)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RETRY                  (0x00000009)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_BREAK                  (0x0000000A)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_UNUSED_0B              (0x0000000B)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_OPEN_TIMEOUT_EXP       (0x0000000C)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_UNUSED_0D              (0x0000000D)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_DVTBLE_ACCSS_FAIL      (0x0000000E)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_BAD_DEST               (0x00000011)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RATE_NOT_SUPP          (0x00000012)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PROT_NOT_SUPP          (0x00000013)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON0      (0x00000014)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON1      (0x00000015)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON2      (0x00000016)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON3      (0x00000017)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_STP_RESOURCES_BSY      (0x00000018)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_WRONG_DESTINATION      (0x00000019)
+
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PATH_BLOCKED           (0x0000001B) /* Retry Timeout */
+#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_AWT_MAXED              (0x0000001C) /* Retry Timeout */
+
+
+
+#define PL_LOGINFO_CODE_INVALID_SGL                          (0x00020000)
+#define PL_LOGINFO_CODE_WRONG_REL_OFF_OR_FRAME_LENGTH        (0x00030000)
+#define PL_LOGINFO_CODE_FRAME_XFER_ERROR                     (0x00040000)
+#define PL_LOGINFO_CODE_TX_FM_CONNECTED_LOW                  (0x00050000)
+#define PL_LOGINFO_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET          (0x00060000)
+#define PL_LOGINFO_CODE_SATA_READ_LOG_RECEIVE_DATA_ERR       (0x00070000)
+#define PL_LOGINFO_CODE_SATA_NCQ_FAIL_ALL_CMDS_AFTR_ERR      (0x00080000)
+#define PL_LOGINFO_CODE_SATA_ERR_IN_RCV_SET_DEV_BIT_FIS      (0x00090000)
+#define PL_LOGINFO_CODE_RX_FM_INVALID_MESSAGE                (0x000A0000)
+#define PL_LOGINFO_CODE_RX_CTX_MESSAGE_VALID_ERROR           (0x000B0000)
+#define PL_LOGINFO_CODE_RX_FM_CURRENT_FRAME_ERROR            (0x000C0000)
+#define PL_LOGINFO_CODE_SATA_LINK_DOWN                       (0x000D0000)
+#define PL_LOGINFO_CODE_DISCOVERY_SATA_INIT_W_IOS            (0x000E0000)
+#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE                  (0x000F0000)
+#define PL_LOGINFO_CODE_CONFIG_PL_NOT_INITIALIZED            (0x000F0001) /* PL not yet initialized, can't do config page req. */
+#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_PT               (0x000F0100) /* Invalid Page Type */
+#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NUM_PHYS         (0x000F0200) /* Invalid Number of Phys */
+#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NOT_IMP          (0x000F0300) /* Case Not Handled */
+#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NO_DEV           (0x000F0400) /* No Device Found */
+#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_FORM             (0x000F0500) /* Invalid FORM */
+#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_PHY              (0x000F0600) /* Invalid Phy */
+#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NO_OWNER         (0x000F0700) /* No Owner Found */
+#define PL_LOGINFO_CODE_DSCVRY_SATA_INIT_TIMEOUT             (0x00100000)
+#define PL_LOGINFO_CODE_RESET                                (0x00110000) /* See Sub-Codes below (PL_LOGINFO_SUB_CODE) */
+#define PL_LOGINFO_CODE_ABORT                                (0x00120000) /* See Sub-Codes below  (PL_LOGINFO_SUB_CODE)*/
+#define PL_LOGINFO_CODE_IO_NOT_YET_EXECUTED                  (0x00130000)
+#define PL_LOGINFO_CODE_IO_EXECUTED                          (0x00140000)
+#define PL_LOGINFO_CODE_PERS_RESV_OUT_NOT_AFFIL_OWNER        (0x00150000)
+#define PL_LOGINFO_CODE_OPEN_TXDMA_ABORT                     (0x00160000)
+#define PL_LOGINFO_CODE_IO_DEVICE_MISSING_DELAY_RETRY        (0x00170000)
+#define PL_LOGINFO_CODE_IO_CANCELLED_DUE_TO_R_ERR            (0x00180000)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE                     (0x00000100)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_NO_DEST_TIMEOUT     (0x00000101)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_SATA_NEG_RATE_2HI   (0x00000102)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_RATE_NOT_SUPPORTED  (0x00000103)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_BREAK               (0x00000104)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ZONE_VIOLATION      (0x00000114)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON0            (0x00000114) /* Open Reject (Zone Violation) - available on SAS-2 devices */
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON1            (0x00000115)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON2            (0x00000116)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON3            (0x00000117)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ORR_TIMEOUT         (0x0000011A) /* Open Reject (Retry) Timeout */
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_PATH_BLOCKED        (0x0000011B)
+#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_AWT_MAXED           (0x0000011C) /* Arbitration Wait Timer Maxed */
+
+#define PL_LOGINFO_SUB_CODE_TARGET_BUS_RESET                 (0x00000120)
+#define PL_LOGINFO_SUB_CODE_TRANSPORT_LAYER                  (0x00000130)  /* Leave lower nibble (1-f) reserved. */
+#define PL_LOGINFO_SUB_CODE_PORT_LAYER                       (0x00000140)  /* Leave lower nibble (1-f) reserved. */
+
+
+#define PL_LOGINFO_SUB_CODE_INVALID_SGL                      (0x00000200)
+#define PL_LOGINFO_SUB_CODE_WRONG_REL_OFF_OR_FRAME_LENGTH    (0x00000300)
+#define PL_LOGINFO_SUB_CODE_FRAME_XFER_ERROR                 (0x00000400) /* Bits 0-3 encode Transport Status Register (offset 0x08) */
+                                                                          /* Bit 0 is Status Bit 0: FrameXferErr */
+                                                                          /* Bit 1 & 2 are Status Bits 16 and 17: FrameXmitErrStatus */
+                                                                          /* Bit 3 is Status Bit 18 WriteDataLenghtGTDataLengthErr */
+
+#define PL_LOGINFO_SUB_CODE_TX_FM_CONNECTED_LOW              (0x00000500)
+#define PL_LOGINFO_SUB_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET      (0x00000600)
+#define PL_LOGINFO_SUB_CODE_SATA_READ_LOG_RECEIVE_DATA_ERR   (0x00000700)
+#define PL_LOGINFO_SUB_CODE_SATA_NCQ_FAIL_ALL_CMDS_AFTR_ERR  (0x00000800)
+#define PL_LOGINFO_SUB_CODE_SATA_ERR_IN_RCV_SET_DEV_BIT_FIS  (0x00000900)
+#define PL_LOGINFO_SUB_CODE_RX_FM_INVALID_MESSAGE            (0x00000A00)
+#define PL_LOGINFO_SUB_CODE_RX_CTX_MESSAGE_VALID_ERROR       (0x00000B00)
+#define PL_LOGINFO_SUB_CODE_RX_FM_CURRENT_FRAME_ERROR        (0x00000C00)
+#define PL_LOGINFO_SUB_CODE_SATA_LINK_DOWN                   (0x00000D00)
+#define PL_LOGINFO_SUB_CODE_DISCOVERY_SATA_INIT_W_IOS        (0x00000E00)
+#define PL_LOGINFO_SUB_CODE_DISCOVERY_REMOTE_SEP_RESET       (0x00000E01)
+#define PL_LOGINFO_SUB_CODE_SECOND_OPEN                      (0x00000F00)
+#define PL_LOGINFO_SUB_CODE_DSCVRY_SATA_INIT_TIMEOUT         (0x00001000)
+#define PL_LOGINFO_SUB_CODE_BREAK_ON_SATA_CONNECTION  		 (0x00002000) /* not currently used in mainline */
+#define PL_LOGINFO_SUB_CODE_BREAK_ON_STUCK_LINK              (0x00003000)
+#define PL_LOGINFO_SUB_CODE_BREAK_ON_STUCK_LINK_AIP          (0x00004000)
+#define PL_LOGINFO_SUB_CODE_BREAK_ON_INCOMPLETE_BREAK_RCVD   (0x00005000)
+
+#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE          (0x00200000) /* Can't get SMP Frame */
+#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR             (0x00200010) /* Error occured on SMP Read */
+#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR            (0x00200020) /* Error occured on SMP Write */
+#define PL_LOGINFO_CODE_ENCL_MGMT_NOT_SUPPORTED_ON_ENCL      (0x00200040) /* Encl Mgmt services not available for this WWID */
+#define PL_LOGINFO_CODE_ENCL_MGMT_ADDR_MODE_NOT_SUPPORTED    (0x00200050) /* Address Mode not suppored */
+#define PL_LOGINFO_CODE_ENCL_MGMT_BAD_SLOT_NUM               (0x00200060) /* Invalid Slot Number in SEP Msg */
+#define PL_LOGINFO_CODE_ENCL_MGMT_SGPIO_NOT_PRESENT          (0x00200070) /* SGPIO not present/enabled */
+#define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_NOT_CONFIGURED        (0x00200080) /* GPIO not configured */
+#define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_FRAME_ERROR           (0x00200090) /* GPIO can't allocate a frame */
+#define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_CONFIG_PAGE_ERROR     (0x002000A0) /* GPIO failed config page request */
+#define PL_LOGINFO_CODE_ENCL_MGMT_SES_FRAME_ALLOC_ERROR      (0x002000B0) /* Can't get frame for SES command */
+#define PL_LOGINFO_CODE_ENCL_MGMT_SES_IO_ERROR               (0x002000C0) /* I/O execution error */
+#define PL_LOGINFO_CODE_ENCL_MGMT_SES_RETRIES_EXHAUSTED      (0x002000D0) /* SEP I/O retries exhausted */
+#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_ALLOC_ERROR      (0x002000E0) /* Can't get frame for SMP command */
+
+#define PL_LOGINFO_DA_SEP_NOT_PRESENT                        (0x00200100) /* SEP not present when msg received */
+#define PL_LOGINFO_DA_SEP_SINGLE_THREAD_ERROR                (0x00200101) /* Can only accept 1 msg at a time */
+#define PL_LOGINFO_DA_SEP_ISTWI_INTR_IN_IDLE_STATE           (0x00200102) /* ISTWI interrupt recvd. while IDLE */
+#define PL_LOGINFO_DA_SEP_RECEIVED_NACK_FROM_SLAVE           (0x00200103) /* SEP NACK'd, it is busy */
+#define PL_LOGINFO_DA_SEP_DID_NOT_RECEIVE_ACK                (0x00200104) /* SEP didn't rcv. ACK (Last Rcvd Bit = 1) */
+#define PL_LOGINFO_DA_SEP_BAD_STATUS_HDR_CHKSUM              (0x00200105) /* SEP stopped or sent bad chksum in Hdr */
+#define PL_LOGINFO_DA_SEP_STOP_ON_DATA                       (0x00200106) /* SEP stopped while transfering data */
+#define PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA                 (0x00200107) /* SEP stopped while transfering sense data */
+#define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_1          (0x00200108) /* SEP returned unknown scsi status */
+#define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_2          (0x00200109) /* SEP returned unknown scsi status */
+#define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP            (0x0020010A) /* SEP returned bad chksum after STOP */
+#define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP_GETDATA    (0x0020010B) /* SEP returned bad chksum after STOP while gettin data*/
+#define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND                (0x0020010C) /* SEP doesn't support CDB opcode f/w location 1 */
+#define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND_2              (0x0020010D) /* SEP doesn't support CDB opcode f/w location 2 */
+#define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND_3              (0x0020010E) /* SEP doesn't support CDB opcode f/w location 3 */
+
+
+/****************************************************************************/
+/* IR LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = IR            */
+/****************************************************************************/
+#define IR_LOGINFO_RAID_ACTION_ERROR                           (0x00010000)
+#define IR_LOGINFO_CODE_UNUSED2                                (0x00020000)
+
+/* Amount of information passed down for Create Volume is too large */
+#define IR_LOGINFO_VOLUME_CREATE_INVALID_LENGTH                (0x00010001)
+/* Creation of duplicate volume attempted (Bus/Target ID checked) */
+#define IR_LOGINFO_VOLUME_CREATE_DUPLICATE                     (0x00010002)
+/* Creation failed due to maximum number of supported volumes exceeded */
+#define IR_LOGINFO_VOLUME_CREATE_NO_SLOTS                      (0x00010003)
+/* Creation failed due to DMA error in trying to read from host */
+#define IR_LOGINFO_VOLUME_CREATE_DMA_ERROR                     (0x00010004)
+/* Creation failed due to invalid volume type passed down */
+#define IR_LOGINFO_VOLUME_CREATE_INVALID_VOLUME_TYPE           (0x00010005)
+/* Creation failed due to error reading MFG Page 4 */
+#define IR_LOGINFO_VOLUME_MFG_PAGE4_ERROR                      (0x00010006)
+/* Creation failed when trying to create internal structures */
+#define IR_LOGINFO_VOLUME_INTERNAL_CONFIG_STRUCTURE_ERROR      (0x00010007)
+
+/* Activation failed due to trying to activate an already active volume */
+#define IR_LOGINFO_VOLUME_ACTIVATING_AN_ACTIVE_VOLUME          (0x00010010)
+/* Activation failed due to trying to active unsupported volume type  */
+#define IR_LOGINFO_VOLUME_ACTIVATING_INVALID_VOLUME_TYPE       (0x00010011)
+/* Activation failed due to trying to active too many volumes  */
+#define IR_LOGINFO_VOLUME_ACTIVATING_TOO_MANY_VOLUMES          (0x00010012)
+/* Activation failed due to Volume ID in use already */
+#define IR_LOGINFO_VOLUME_ACTIVATING_VOLUME_ID_IN_USE          (0x00010013)
+/* Activation failed call to activateVolume returned failure */
+#define IR_LOGINFO_VOLUME_ACTIVATE_VOLUME_FAILED               (0x00010014)
+/* Activation failed trying to import the volume */
+#define IR_LOGINFO_VOLUME_ACTIVATING_IMPORT_VOLUME_FAILED      (0x00010015)
+/* Activation failed trying to import the volume */
+#define IR_LOGINFO_VOLUME_ACTIVATING_TOO_MANY_PHYS_DISKS       (0x00010016)
+
+/* Phys Disk failed, too many phys disks */
+#define IR_LOGINFO_PHYSDISK_CREATE_TOO_MANY_DISKS              (0x00010020)
+/* Amount of information passed down for Create Pnysdisk is too large */
+#define IR_LOGINFO_PHYSDISK_CREATE_INVALID_LENGTH              (0x00010021)
+/* Creation failed due to DMA error in trying to read from host */
+#define IR_LOGINFO_PHYSDISK_CREATE_DMA_ERROR                   (0x00010022)
+/* Creation failed due to invalid Bus TargetID passed down */
+#define IR_LOGINFO_PHYSDISK_CREATE_BUS_TID_INVALID             (0x00010023)
+/* Creation failed due to error in creating RAID Phys Disk Config Page */
+#define IR_LOGINFO_PHYSDISK_CREATE_CONFIG_PAGE_ERROR           (0x00010024)
+
+
+/* Compatibility Error : IR Disabled */
+#define IR_LOGINFO_COMPAT_ERROR_RAID_DISABLED                  (0x00010030)
+/* Compatibility Error : Inquiry Comand failed */
+#define IR_LOGINFO_COMPAT_ERROR_INQUIRY_FAILED                 (0x00010031)
+/* Compatibility Error : Device not direct access device */
+#define IR_LOGINFO_COMPAT_ERROR_NOT_DIRECT_ACCESS              (0x00010032)
+/* Compatibility Error : Removable device found */
+#define IR_LOGINFO_COMPAT_ERROR_REMOVABLE_FOUND                (0x00010033)
+/* Compatibility Error : Device SCSI Version not 2 or higher */
+#define IR_LOGINFO_COMPAT_ERROR_NEED_SCSI_2_OR_HIGHER          (0x00010034)
+/* Compatibility Error : SATA device, 48 BIT LBA not supported */
+#define IR_LOGINFO_COMPAT_ERROR_SATA_48BIT_LBA_NOT_SUPPORTED   (0x00010035)
+/* Compatibility Error : Device does not have 512 byte block sizes */
+#define IR_LOGINFO_COMPAT_ERROR_DEVICE_NOT_512_BYTE_BLOCK      (0x00010036)
+/* Compatibility Error : Volume Type check failed */
+#define IR_LOGINFO_COMPAT_ERROR_VOLUME_TYPE_CHECK_FAILED       (0x00010037)
+/* Compatibility Error : Volume Type is unsupported by FW */
+#define IR_LOGINFO_COMPAT_ERROR_UNSUPPORTED_VOLUME_TYPE        (0x00010038)
+/* Compatibility Error : Disk drive too small for use in volume */
+#define IR_LOGINFO_COMPAT_ERROR_DISK_TOO_SMALL                 (0x00010039)
+/* Compatibility Error : Phys disk for Create Volume not found */
+#define IR_LOGINFO_COMPAT_ERROR_PHYS_DISK_NOT_FOUND            (0x0001003A)
+/* Compatibility Error : membership count error, too many or too few disks for volume type */
+#define IR_LOGINFO_COMPAT_ERROR_MEMBERSHIP_COUNT               (0x0001003B)
+/* Compatibility Error : Disk stripe sizes must be 64KB */
+#define IR_LOGINFO_COMPAT_ERROR_NON_64K_STRIPE_SIZE            (0x0001003C)
+/* Compatibility Error : IME size limited to < 2TB */
+#define IR_LOGINFO_COMPAT_ERROR_IME_VOL_NOT_CURRENTLY_SUPPORTED (0x0001003D)
+
+/* Device Firmware Update: DFU can only be started once */
+#define IR_LOGINFO_DEV_FW_UPDATE_ERR_DFU_IN_PROGRESS            (0x00010050)
+/* Device Firmware Update: Volume must be Optimal/Active/non-Quiesced */
+#define IR_LOGINFO_DEV_FW_UPDATE_ERR_DEVICE_IN_INVALID_STATE    (0x00010051)
+/* Device Firmware Update: DFU Timeout cannot be zero */
+#define IR_LOGINFO_DEV_FW_UPDATE_ERR_INVALID_TIMEOUT            (0x00010052)
+/* Device Firmware Update: CREATE TIMER FAILED */
+#define IR_LOGINFO_DEV_FW_UPDATE_ERR_NO_TIMERS                  (0x00010053)
+/* Device Firmware Update: Failed to read SAS_IO_UNIT_PG_1 */
+#define IR_LOGINFO_DEV_FW_UPDATE_ERR_READING_CFG_PAGE           (0x00010054)
+/* Device Firmware Update: Invalid SAS_IO_UNIT_PG_1 value(s) */
+#define IR_LOGINFO_DEV_FW_UPDATE_ERR_PORT_IO_TIMEOUTS_REQUIRED  (0x00010055)
+/* Device Firmware Update: Unable to allocate memory for page */
+#define IR_LOGINFO_DEV_FW_UPDATE_ERR_ALLOC_CFG_PAGE             (0x00010056)
+/* Device Firmware Update:  */
+//#define IR_LOGINFO_DEV_FW_UPDATE_ERR_                         (0x00010054)
+
+
+/****************************************************************************/
+/* Defines for convenience                                                  */
+/****************************************************************************/
+#define IOC_LOGINFO_PREFIX_IOP                          ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_IOP)
+#define IOC_LOGINFO_PREFIX_PL                           ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_PL)
+#define IOC_LOGINFO_PREFIX_IR                           ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_IR)
+
+#endif /* end of file */
+

Modified: stable/8/sys/dev/mpt/mpilib/mpi_raid.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_raid.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_raid.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -33,7 +33,7 @@
  *          Title:  MPI RAID message and structures
  *  Creation Date:  February 27, 2001
  *
- *    mpi_raid.h Version:  01.05.03
+ *    mpi_raid.h Version:  01.05.05
  *
  *  Version History
  *  ---------------
@@ -61,6 +61,9 @@
  *                      _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.
  *  02-28-07  01.05.03  Added new RAID Action, Device FW Update Mode, and
  *                      associated defines.
+ *  08-07-07  01.05.04  Added Disable Full Rebuild bit to the ActionDataWord
+ *                      for the RAID Action MPI_RAID_ACTION_DISABLE_VOLUME.
+ *  01-15-08  01.05.05  Added define for MPI_RAID_ACTION_SET_VOLUME_NAME.
  *  --------------------------------------------------------------------------
  */
 
@@ -120,6 +123,7 @@ typedef struct _MSG_RAID_ACTION
 #define MPI_RAID_ACTION_SET_RESYNC_RATE             (0x13)
 #define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE         (0x14)
 #define MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE       (0x15)
+#define MPI_RAID_ACTION_SET_VOLUME_NAME             (0x16)
 
 /* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
 #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC           (0x00000001)
@@ -132,6 +136,9 @@ typedef struct _MSG_RAID_ACTION
 #define MPI_RAID_ACTION_ADATA_KEEP_LBA0             (0x00000000)
 #define MPI_RAID_ACTION_ADATA_ZERO_LBA0             (0x00000002)
 
+/* ActionDataWord defines for use with MPI_RAID_ACTION_DISABLE_VOLUME action */
+#define MPI_RAID_ACTION_ADATA_DISABLE_FULL_REBUILD  (0x00000001)
+
 /* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */
 #define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL        (0x00000001)
 

Modified: stable/8/sys/dev/mpt/mpilib/mpi_sas.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_sas.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_sas.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@
  *          Title:  MPI Serial Attached SCSI structures and definitions
  *  Creation Date:  August 19, 2004
  *
- *    mpi_sas.h Version:  01.05.04
+ *    mpi_sas.h Version:  01.05.05
  *
  *  Version History
  *  ---------------
@@ -50,6 +50,10 @@
  *                      reply.
  *  10-11-06  01.05.04  Fixed the name of a define for Operation field of SAS IO
  *                      Unit Control request.
+ *  01-15-08  01.05.05  Added support for MPI_SAS_OP_SET_IOC_PARAMETER,
+ *                      including adding IOCParameter and IOCParameter value
+ *                      fields to SAS IO Unit Control Request.
+ *                      Added MPI_SAS_DEVICE_INFO_PRODUCT_SPECIFIC define.
  *  --------------------------------------------------------------------------
  */
 
@@ -87,6 +91,8 @@
  * Values for the SAS DeviceInfo field used in SAS Device Status Change Event
  * data and SAS IO Unit Configuration pages.
  */
+#define MPI_SAS_DEVICE_INFO_PRODUCT_SPECIFIC    (0xF0000000)
+
 #define MPI_SAS_DEVICE_INFO_SEP                 (0x00004000)
 #define MPI_SAS_DEVICE_INFO_ATAPI_DEVICE        (0x00002000)
 #define MPI_SAS_DEVICE_INFO_LSI_DEVICE          (0x00001000)
@@ -243,7 +249,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
     U8                      ChainOffset;        /* 02h */
     U8                      Function;           /* 03h */
     U16                     DevHandle;          /* 04h */
-    U8                      Reserved3;          /* 06h */
+    U8                      IOCParameter;       /* 06h */
     U8                      MsgFlags;           /* 07h */
     U32                     MsgContext;         /* 08h */
     U8                      TargetID;           /* 0Ch */
@@ -252,7 +258,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
     U8                      PrimFlags;          /* 0Fh */
     U32                     Primitive;          /* 10h */
     U64                     SASAddress;         /* 14h */
-    U32                     Reserved4;          /* 1Ch */
+    U32                     IOCParameterValue;  /* 1Ch */
 } MSG_SAS_IOUNIT_CONTROL_REQUEST, MPI_POINTER PTR_MSG_SAS_IOUNIT_CONTROL_REQUEST,
   SasIoUnitControlRequest_t, MPI_POINTER pSasIoUnitControlRequest_t;
 
@@ -268,6 +274,8 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
 #define MPI_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL  (0x0C)
 #define MPI_SAS_OP_TRANSMIT_REMOVE_DEVICE       (0x0D)  /* obsolete name */
 #define MPI_SAS_OP_REMOVE_DEVICE                (0x0D)
+#define MPI_SAS_OP_SET_IOC_PARAMETER            (0x0E)
+#define MPI_SAS_OP_PRODUCT_SPECIFIC_MIN         (0x80)
 
 /* values for the PrimFlags field */
 #define MPI_SAS_PRIMFLAGS_SINGLE                (0x08)
@@ -283,7 +291,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
     U8                      MsgLength;          /* 02h */
     U8                      Function;           /* 03h */
     U16                     DevHandle;          /* 04h */
-    U8                      Reserved3;          /* 06h */
+    U8                      IOCParameter;       /* 06h */
     U8                      MsgFlags;           /* 07h */
     U32                     MsgContext;         /* 08h */
     U16                     Reserved4;          /* 0Ch */

Modified: stable/8/sys/dev/mpt/mpilib/mpi_targ.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_targ.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_targ.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without

Modified: stable/8/sys/dev/mpt/mpilib/mpi_tool.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_tool.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_tool.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without

Modified: stable/8/sys/dev/mpt/mpilib/mpi_type.h
==============================================================================
--- stable/8/sys/dev/mpt/mpilib/mpi_type.h	Sat Mar 31 10:26:58 2012	(r233740)
+++ stable/8/sys/dev/mpt/mpilib/mpi_type.h	Sat Mar 31 10:27:00 2012	(r233741)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*
- * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
+ * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 31 10:47:43 2012
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 083721065756;
	Sat, 31 Mar 2012 10:47:41 +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 57F308FC12;
	Sat, 31 Mar 2012 10:47: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 q2VAlfJE098498;
	Sat, 31 Mar 2012 10:47:41 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2VAlfEY098495;
	Sat, 31 Mar 2012 10:47:41 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201203311047.q2VAlfEY098495@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 31 Mar 2012 10:47: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: r233744 - in stable/8/sys: amd64/conf i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 31 Mar 2012 10:47:43 -0000

Author: marius
Date: Sat Mar 31 10:47:40 2012
New Revision: 233744
URL: http://svn.freebsd.org/changeset/base/233744

Log:
  MFC: r233427
  
  Add cas(4), gem(4) and hme(4) to x86 GENERICs as suggested by netchild@ in
  <20120222095239.Horde.0hpYHJjmRSRPRKzXsoFRbYk@webmail.leidinger.net>.
  According to some private emails received, it apparently is not unpopular
  to use at least Quad GigaSwift cards driven by cas(4) in x86 machines.

Modified:
  stable/8/sys/amd64/conf/GENERIC
  stable/8/sys/i386/conf/GENERIC
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/amd64/conf/GENERIC
==============================================================================
--- stable/8/sys/amd64/conf/GENERIC	Sat Mar 31 10:47:34 2012	(r233743)
+++ stable/8/sys/amd64/conf/GENERIC	Sat Mar 31 10:47:40 2012	(r233744)
@@ -213,9 +213,12 @@ device		ale		# Atheros AR8121/AR8113/AR8
 device		bce		# Broadcom BCM5706/BCM5708 Gigabit Ethernet
 device		bfe		# Broadcom BCM440x 10/100 Ethernet
 device		bge		# Broadcom BCM570xx Gigabit Ethernet
+device		cas		# Sun Cassini/Cassini+ and NS DP83065 Saturn
 device		dc		# DEC/Intel 21143 and various workalikes
 device		et		# Agere ET1310 10/100/Gigabit Ethernet
 device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
+device		gem		# Sun GEM/Sun ERI/Apple GMAC
+device		hme		# Sun HME (Happy Meal Ethernet)
 device		jme		# JMicron JMC250 Gigabit/JMC260 Fast Ethernet
 device		lge		# Level 1 LXT1001 gigabit Ethernet
 device		msk		# Marvell/SysKonnect Yukon II Gigabit Ethernet

Modified: stable/8/sys/i386/conf/GENERIC
==============================================================================
--- stable/8/sys/i386/conf/GENERIC	Sat Mar 31 10:47:34 2012	(r233743)
+++ stable/8/sys/i386/conf/GENERIC	Sat Mar 31 10:47:40 2012	(r233744)
@@ -223,9 +223,12 @@ device		ale		# Atheros AR8121/AR8113/AR8
 device		bce		# Broadcom BCM5706/BCM5708 Gigabit Ethernet
 device		bfe		# Broadcom BCM440x 10/100 Ethernet
 device		bge		# Broadcom BCM570xx Gigabit Ethernet
+device		cas		# Sun Cassini/Cassini+ and NS DP83065 Saturn
 device		dc		# DEC/Intel 21143 and various workalikes
 device		et		# Agere ET1310 10/100/Gigabit Ethernet
 device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
+device		gem		# Sun GEM/Sun ERI/Apple GMAC
+device		hme		# Sun HME (Happy Meal Ethernet)
 device		jme		# JMicron JMC250 Gigabit/JMC260 Fast Ethernet
 device		lge		# Level 1 LXT1001 gigabit Ethernet
 device		msk		# Marvell/SysKonnect Yukon II Gigabit Ethernet

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Mar 31 18:29:25 2012
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 32C40106566B;
	Sat, 31 Mar 2012 18:29:25 +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 1D1D08FC0A;
	Sat, 31 Mar 2012 18:29:25 +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 q2VITOw0013479;
	Sat, 31 Mar 2012 18:29:24 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2VITOw0013475;
	Sat, 31 Mar 2012 18:29:24 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201203311829.q2VITOw0013475@svn.freebsd.org>
From: Alan Cox 
Date: Sat, 31 Mar 2012 18:29:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r233751 - in stable/8/sys: amd64/amd64 amd64/conf conf
	i386/conf
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 31 Mar 2012 18:29:25 -0000

Author: alc
Date: Sat Mar 31 18:29:24 2012
New Revision: 233751
URL: http://svn.freebsd.org/changeset/base/233751

Log:
  MFC r233256
    Eliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no
    longer serve any purpose.

Modified:
  stable/8/sys/amd64/amd64/pmap.c
  stable/8/sys/amd64/conf/NOTES
  stable/8/sys/conf/options.amd64
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/8/sys/amd64/amd64/pmap.c	Sat Mar 31 17:47:50 2012	(r233750)
+++ stable/8/sys/amd64/amd64/pmap.c	Sat Mar 31 18:29:24 2012	(r233751)
@@ -146,10 +146,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 
-#ifndef PMAP_SHPGPERPROC
-#define PMAP_SHPGPERPROC 200
-#endif
-
 #if !defined(DIAGNOSTIC)
 #define PMAP_INLINE	__gnu89_inline
 #else
@@ -200,9 +196,8 @@ static u_int64_t	DMPDPphys;	/* phys addr
 /*
  * Data for the pv entry allocation mechanism
  */
-static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0;
+static int pv_entry_count;
 static struct md_page *pv_table;
-static int shpgperproc = PMAP_SHPGPERPROC;
 
 /*
  * All those kernel PT submaps that BSD is so fond of
@@ -216,7 +211,7 @@ caddr_t CADDR1 = 0;
 static caddr_t crashdumpmap;
 
 static void	free_pv_entry(pmap_t pmap, pv_entry_t pv);
-static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try);
+static pv_entry_t get_pv_entry(pmap_t locked_pmap, boolean_t try);
 static void	pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa);
 static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa);
 static void	pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa);
@@ -709,16 +704,6 @@ pmap_init(void)
 	}
 
 	/*
-	 * Initialize the address space (zone) for the pv entries.  Set a
-	 * high water mark so that the system can recover from excessive
-	 * numbers of pv entries.
-	 */
-	TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc);
-	pv_entry_max = shpgperproc * maxproc + cnt.v_page_count;
-	TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max);
-	pv_entry_high_water = 9 * (pv_entry_max / 10);
-
-	/*
 	 * If the kernel is running in a virtual machine on an AMD Family 10h
 	 * processor, then it must assume that MCA is enabled by the virtual
 	 * machine monitor.
@@ -753,36 +738,6 @@ pmap_init(void)
 		TAILQ_INIT(&pv_table[i].pv_list);
 }
 
-static int
-pmap_pventry_proc(SYSCTL_HANDLER_ARGS)
-{
-	int error;
-
-	error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req);
-	if (error == 0 && req->newptr) {
-		shpgperproc = (pv_entry_max - cnt.v_page_count) / maxproc;
-		pv_entry_high_water = 9 * (pv_entry_max / 10);
-	}
-	return (error);
-}
-SYSCTL_PROC(_vm_pmap, OID_AUTO, pv_entry_max, CTLTYPE_INT|CTLFLAG_RW, 
-    &pv_entry_max, 0, pmap_pventry_proc, "IU", "Max number of PV entries");
-
-static int
-pmap_shpgperproc_proc(SYSCTL_HANDLER_ARGS)
-{
-	int error;
-
-	error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req);
-	if (error == 0 && req->newptr) {
-		pv_entry_max = shpgperproc * maxproc + cnt.v_page_count;
-		pv_entry_high_water = 9 * (pv_entry_max / 10);
-	}
-	return (error);
-}
-SYSCTL_PROC(_vm_pmap, OID_AUTO, shpgperproc, CTLTYPE_INT|CTLFLAG_RW, 
-    &shpgperproc, 0, pmap_shpgperproc_proc, "IU", "Page share factor per proc");
-
 SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD, 0,
     "2MB page mapping counters");
 
@@ -2109,10 +2064,8 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv
  * when needed.
  */
 static pv_entry_t
-get_pv_entry(pmap_t pmap, int try)
+get_pv_entry(pmap_t pmap, boolean_t try)
 {
-	static const struct timeval printinterval = { 60, 0 };
-	static struct timeval lastprint;
 	static vm_pindex_t colour;
 	struct vpgqueues *pq;
 	int bit, field;
@@ -2123,12 +2076,6 @@ get_pv_entry(pmap_t pmap, int try)
 	PMAP_LOCK_ASSERT(pmap, MA_OWNED);
 	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
 	PV_STAT(pv_entry_allocs++);
-	pv_entry_count++;
-	if (pv_entry_count > pv_entry_high_water)
-		if (ratecheck(&lastprint, &printinterval))
-			printf("Approaching the limit on PV entries, consider "
-			    "increasing either the vm.pmap.shpgperproc or the "
-			    "vm.pmap.pv_entry_max sysctl.\n");
 	pq = NULL;
 retry:
 	pc = TAILQ_FIRST(&pmap->pm_pvchunk);
@@ -2146,8 +2093,10 @@ retry:
 			if (pc->pc_map[0] == 0 && pc->pc_map[1] == 0 &&
 			    pc->pc_map[2] == 0) {
 				TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list);
-				TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list);
+				TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc,
+				    pc_list);
 			}
+			pv_entry_count++;
 			PV_STAT(pv_entry_spare--);
 			return (pv);
 		}
@@ -2158,7 +2107,6 @@ retry:
 	    VM_ALLOC_WIRED);
 	if (m == NULL) {
 		if (try) {
-			pv_entry_count--;
 			PV_STAT(pc_chunk_tryfail++);
 			return (NULL);
 		}
@@ -2174,7 +2122,7 @@ retry:
 			PV_STAT(pmap_collect_active++);
 			pq = &vm_page_queues[PQ_ACTIVE];
 		} else
-			panic("get_pv_entry: increase vm.pmap.shpgperproc");
+			panic("get_pv_entry: allocation failed");
 		pmap_collect(pmap, pq);
 		goto retry;
 	}
@@ -2189,6 +2137,7 @@ retry:
 	pc->pc_map[2] = PC_FREE2;
 	pv = &pc->pc_pventry[0];
 	TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list);
+	pv_entry_count++;
 	PV_STAT(pv_entry_spare += _NPCPV - 1);
 	return (pv);
 }
@@ -2346,8 +2295,7 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm
 
 	PMAP_LOCK_ASSERT(pmap, MA_OWNED);
 	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
-	if (pv_entry_count < pv_entry_high_water && 
-	    (pv = get_pv_entry(pmap, TRUE)) != NULL) {
+	if ((pv = get_pv_entry(pmap, TRUE)) != NULL) {
 		pv->pv_va = va;
 		TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list);
 		return (TRUE);
@@ -2365,8 +2313,7 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse
 	pv_entry_t pv;
 
 	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
-	if (pv_entry_count < pv_entry_high_water && 
-	    (pv = get_pv_entry(pmap, TRUE)) != NULL) {
+	if ((pv = get_pv_entry(pmap, TRUE)) != NULL) {
 		pv->pv_va = va;
 		pvh = pa_to_pvh(pa);
 		TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_list);

Modified: stable/8/sys/amd64/conf/NOTES
==============================================================================
--- stable/8/sys/amd64/conf/NOTES	Sat Mar 31 17:47:50 2012	(r233750)
+++ stable/8/sys/amd64/conf/NOTES	Sat Mar 31 18:29:24 2012	(r233751)
@@ -491,19 +491,6 @@ device		cpuctl
 options 	ENABLE_ALART		# Control alarm on Intel intpm driver
 
 #
-# Set the number of PV entries per process.  Increasing this can
-# stop panics related to heavy use of shared memory.  However, that can
-# (combined with large amounts of physical memory) cause panics at
-# boot time due the kernel running out of VM space.
-#
-# If you're tweaking this, you might also want to increase the sysctls
-# "vm.v_free_min", "vm.v_free_reserved", and "vm.v_free_target".
-#
-# The value below is the one more than the default.
-#
-options 	PMAP_SHPGPERPROC=201
-
-#
 # Number of initial kernel page table pages used for early bootstrap.
 # This number should include enough pages to map the kernel and any
 # modules or other data loaded with the kernel by the loader.  Each

Modified: stable/8/sys/conf/options.amd64
==============================================================================
--- stable/8/sys/conf/options.amd64	Sat Mar 31 17:47:50 2012	(r233750)
+++ stable/8/sys/conf/options.amd64	Sat Mar 31 18:29:24 2012	(r233751)
@@ -5,7 +5,6 @@ AUTO_EOI_1		opt_auto_eoi.h
 AUTO_EOI_2		opt_auto_eoi.h
 MAXMEM
 PERFMON
-PMAP_SHPGPERPROC	opt_pmap.h
 MPTABLE_FORCE_HTT
 MP_WATCHDOG
 NKPT			opt_pmap.h