From owner-svn-src-stable-7@FreeBSD.ORG Sun Apr 10 09:35:44 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2B06106566B; Sun, 10 Apr 2011 09:35:44 +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 932F78FC08; Sun, 10 Apr 2011 09:35:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3A9Zi0A042156; Sun, 10 Apr 2011 09:35:44 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3A9Zimi042154; Sun, 10 Apr 2011 09:35:44 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104100935.p3A9Zimi042154@svn.freebsd.org> From: Marius Strobl Date: Sun, 10 Apr 2011 09:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220514 - stable/7/sys/dev/dc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2011 09:35:44 -0000 Author: marius Date: Sun Apr 10 09:35:44 2011 New Revision: 220514 URL: http://svn.freebsd.org/changeset/base/220514 Log: MFC: r220046, r220106 Wait until the DMA engine is stopped before unmapping buffers and descriptors, which fixes DMA errors seen on sparc64. Modified: stable/7/sys/dev/dc/if_dc.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/dc/if_dc.c ============================================================================== --- stable/7/sys/dev/dc/if_dc.c Sun Apr 10 09:35:42 2011 (r220513) +++ stable/7/sys/dev/dc/if_dc.c Sun Apr 10 09:35:44 2011 (r220514) @@ -279,6 +279,7 @@ static void dc_miibus_statchg(device_t); static void dc_miibus_mediainit(device_t); static void dc_setcfg(struct dc_softc *, int); +static void dc_netcfg_wait(struct dc_softc *); static uint32_t dc_mchash_le(struct dc_softc *, const uint8_t *); static uint32_t dc_mchash_be(const uint8_t *); static void dc_setfilt_21143(struct dc_softc *); @@ -1371,6 +1372,32 @@ dc_setfilt(struct dc_softc *sc) dc_setfilt_xircom(sc); } +static void +dc_netcfg_wait(struct dc_softc *sc) +{ + uint32_t isr; + int i; + + for (i = 0; i < DC_TIMEOUT; i++) { + isr = CSR_READ_4(sc, DC_ISR); + if (isr & DC_ISR_TX_IDLE && + ((isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED || + (isr & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT)) + break; + DELAY(10); + } + if (i == DC_TIMEOUT) { + if (!(isr & DC_ISR_TX_IDLE) && !DC_IS_ASIX(sc)) + device_printf(sc->dc_dev, + "%s: failed to force tx to idle state\n", __func__); + if (!((isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED || + (isr & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT) && + !DC_HAS_BROKEN_RXSTATE(sc)) + device_printf(sc->dc_dev, + "%s: failed to force rx to idle state\n", __func__); + } +} + /* * In order to fiddle with the 'full-duplex' and '100Mbps' bits in * the netconfig register, we first have to put the transmit and/or @@ -1379,8 +1406,7 @@ dc_setfilt(struct dc_softc *sc) static void dc_setcfg(struct dc_softc *sc, int media) { - int i, restart = 0, watchdogreg; - uint32_t isr; + int restart = 0, watchdogreg; if (IFM_SUBTYPE(media) == IFM_NONE) return; @@ -1388,28 +1414,7 @@ dc_setcfg(struct dc_softc *sc, int media if (CSR_READ_4(sc, DC_NETCFG) & (DC_NETCFG_TX_ON | DC_NETCFG_RX_ON)) { restart = 1; DC_CLRBIT(sc, DC_NETCFG, (DC_NETCFG_TX_ON | DC_NETCFG_RX_ON)); - - for (i = 0; i < DC_TIMEOUT; i++) { - isr = CSR_READ_4(sc, DC_ISR); - if (isr & DC_ISR_TX_IDLE && - ((isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED || - (isr & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT)) - break; - DELAY(10); - } - - if (i == DC_TIMEOUT) { - if (!(isr & DC_ISR_TX_IDLE) && !DC_IS_ASIX(sc)) - device_printf(sc->dc_dev, - "%s: failed to force tx to idle state\n", - __func__); - if (!((isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED || - (isr & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT) && - !DC_HAS_BROKEN_RXSTATE(sc)) - device_printf(sc->dc_dev, - "%s: failed to force rx to idle state\n", - __func__); - } + dc_netcfg_wait(sc); } if (IFM_SUBTYPE(media) == IFM_100_TX) { @@ -3916,7 +3921,7 @@ dc_stop(struct dc_softc *sc) struct dc_list_data *ld; struct dc_chain_data *cd; int i; - uint32_t ctl; + uint32_t ctl, netcfg; DC_LOCK_ASSERT(sc); @@ -3927,14 +3932,21 @@ dc_stop(struct dc_softc *sc) callout_stop(&sc->dc_stat_ch); callout_stop(&sc->dc_wdog_ch); sc->dc_wdog_timer = 0; + sc->dc_link = 0; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - DC_CLRBIT(sc, DC_NETCFG, (DC_NETCFG_RX_ON | DC_NETCFG_TX_ON)); + netcfg = CSR_READ_4(sc, DC_NETCFG); + if (netcfg & (DC_NETCFG_RX_ON | DC_NETCFG_TX_ON)) + CSR_WRITE_4(sc, DC_NETCFG, + netcfg & ~(DC_NETCFG_RX_ON | DC_NETCFG_TX_ON)); CSR_WRITE_4(sc, DC_IMR, 0x00000000); + /* Wait the completion of TX/RX SM. */ + if (netcfg & (DC_NETCFG_RX_ON | DC_NETCFG_TX_ON)) + dc_netcfg_wait(sc); + CSR_WRITE_4(sc, DC_TXADDR, 0x00000000); CSR_WRITE_4(sc, DC_RXADDR, 0x00000000); - sc->dc_link = 0; /* * Free data in the RX lists. From owner-svn-src-stable-7@FreeBSD.ORG Mon Apr 11 09:28:29 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54A171065672; Mon, 11 Apr 2011 09:28:29 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4551D8FC1E; Mon, 11 Apr 2011 09:28:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3B9STwK080325; Mon, 11 Apr 2011 09:28:29 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3B9STuQ080323; Mon, 11 Apr 2011 09:28:29 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104110928.p3B9STuQ080323@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 11 Apr 2011 09:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220538 - stable/7/sys/kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2011 09:28:29 -0000 Author: pluknet Date: Mon Apr 11 09:28:28 2011 New Revision: 220538 URL: http://svn.freebsd.org/changeset/base/220538 Log: MFC r220328: Remove malloc type M_NETADDR unused since splitting into vfs_subr.c and vfs_export.c. Modified: stable/7/sys/kern/vfs_subr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_subr.c ============================================================================== --- stable/7/sys/kern/vfs_subr.c Mon Apr 11 09:06:11 2011 (r220537) +++ stable/7/sys/kern/vfs_subr.c Mon Apr 11 09:28:28 2011 (r220538) @@ -89,8 +89,6 @@ __FBSDID("$FreeBSD$"); #include #endif -static MALLOC_DEFINE(M_NETADDR, "subr_export_host", "Export host address structure"); - static void delmntque(struct vnode *vp); static int flushbuflist(struct bufv *bufv, int flags, struct bufobj *bo, int slpflag, int slptimeo); From owner-svn-src-stable-7@FreeBSD.ORG Mon Apr 11 22:00:00 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 257AD1065672; Mon, 11 Apr 2011 22:00:00 +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 ED63A8FC0C; Mon, 11 Apr 2011 21:59:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3BLxxnW000964; Mon, 11 Apr 2011 21:59:59 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3BLxxRq000962; Mon, 11 Apr 2011 21:59:59 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201104112159.p3BLxxRq000962@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 11 Apr 2011 21:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220551 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2011 22:00:00 -0000 Author: edwin Date: Mon Apr 11 21:59:59 2011 New Revision: 220551 URL: http://svn.freebsd.org/changeset/base/220551 Log: MFC of 220549, tzdata2011f: - During 2011 the Falkland Islands will remain on Summer time. Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: stable/7/share/zoneinfo/southamerica Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/southamerica ============================================================================== --- stable/7/share/zoneinfo/southamerica Mon Apr 11 21:59:13 2011 (r220550) +++ stable/7/share/zoneinfo/southamerica Mon Apr 11 21:59:59 2011 (r220551) @@ -1,5 +1,5 @@ #
-# @(#)southamerica	8.47
+# @(#)southamerica	8.48
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1343,6 +1343,24 @@ Zone Pacific/Galapagos	-5:58:24 -	LMT	19
 # For now, we'll just record the time in Stanley, since we have no
 # better info.
 
+# From Steffen Thorsen (2011-04-01):
+# The Falkland Islands will not turn back clocks this winter, but stay on
+# daylight saving time.
+#
+# One source:
+# 
+# http://www.falklandnews.com/public/story.cfm?get=5914&source=3
+# 
+#
+# We have gotten this confirmed by a clerk of the legislative assembly:
+# Normally the clocks revert to Local Mean Time (UTC/GMT -4 hours) on the
+# third Sunday of April at 0200hrs and advance to Summer Time (UTC/GMT -3
+# hours) on the first Sunday of September at 0200hrs.
+#
+# IMPORTANT NOTE: During 2011, on a trial basis, the Falkland Islands
+# 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.
 # 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	-
@@ -1354,7 +1372,8 @@ Rule	Falk	1984	1985	-	Apr	lastSun	0:00	0
 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	max	-	Apr	Sun>=15	2: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
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Atlantic/Stanley	-3:51:24 -	LMT	1890

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Apr 12 09:36:38 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A426C1065672;
	Tue, 12 Apr 2011 09:36:38 +0000 (UTC)
	(envelope-from trociny@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 968B38FC08;
	Tue, 12 Apr 2011 09:36:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3C9acZl016840;
	Tue, 12 Apr 2011 09:36:38 GMT (envelope-from trociny@svn.freebsd.org)
Received: (from trociny@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3C9acaY016838;
	Tue, 12 Apr 2011 09:36:38 GMT (envelope-from trociny@svn.freebsd.org)
Message-Id: <201104120936.p3C9acaY016838@svn.freebsd.org>
From: Mikolaj Golub 
Date: Tue, 12 Apr 2011 09:36:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220562 - stable/7/sys/geom/eli
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 12 Apr 2011 09:36:38 -0000

Author: trociny
Date: Tue Apr 12 09:36:38 2011
New Revision: 220562
URL: http://svn.freebsd.org/changeset/base/220562

Log:
  MFC r220299:
  
  In g_eli_read_done() and g_eli_write_done(), for a bio with
  bio_children > 1, g_destroy_bio() is never called and the bio
  leaks. Fix this by calling g_destroy_bio() earlier, before the check.
  
  Submitted by:	Victor Balada Diaz  (initial version)
  
  Tested by:	Oliver Pinter 
  Approved by:	kib (co-mentor)

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

Modified: stable/7/sys/geom/eli/g_eli.c
==============================================================================
--- stable/7/sys/geom/eli/g_eli.c	Tue Apr 12 08:54:49 2011	(r220561)
+++ stable/7/sys/geom/eli/g_eli.c	Tue Apr 12 09:36:38 2011	(r220562)
@@ -153,13 +153,13 @@ g_eli_read_done(struct bio *bp)
 	pbp = bp->bio_parent;
 	if (pbp->bio_error == 0)
 		pbp->bio_error = bp->bio_error;
+	g_destroy_bio(bp);
 	/*
 	 * Do we have all sectors already?
 	 */
 	pbp->bio_inbed++;
 	if (pbp->bio_inbed < pbp->bio_children)
 		return;
-	g_destroy_bio(bp);
 	if (pbp->bio_error != 0) {
 		G_ELI_LOGREQ(0, pbp, "%s() failed", __func__);
 		pbp->bio_completed = 0;
@@ -193,6 +193,7 @@ g_eli_write_done(struct bio *bp)
 		if (bp->bio_error != 0)
 			pbp->bio_error = bp->bio_error;
 	}
+	g_destroy_bio(bp);
 	/*
 	 * Do we have all sectors already?
 	 */
@@ -206,7 +207,6 @@ g_eli_write_done(struct bio *bp)
 		    pbp->bio_error);
 		pbp->bio_completed = 0;
 	}
-	g_destroy_bio(bp);
 	/*
 	 * Write is finished, send it up.
 	 */

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Apr 12 16:52:05 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6DCCD106566C;
	Tue, 12 Apr 2011 16:52:05 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5C8938FC0A;
	Tue, 12 Apr 2011 16:52:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3CGq5wd030247;
	Tue, 12 Apr 2011 16:52:05 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3CGq5Bn030244;
	Tue, 12 Apr 2011 16:52:05 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201104121652.p3CGq5Bn030244@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Tue, 12 Apr 2011 16:52:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220571 - stable/7/sys/fs/devfs
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 12 Apr 2011 16:52:05 -0000

Author: jh
Date: Tue Apr 12 16:52:05 2011
New Revision: 220571
URL: http://svn.freebsd.org/changeset/base/220571

Log:
  MFC r216391:
  
  Handle the special ruleset 0 in devfs_ruleset_use(). An attempt set the
  current ruleset to 0 with command "devfs ruleset 0" triggered a KASSERT
  in devfs_ruleset_create().
  
  PR:		kern/125030

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

Modified: stable/7/sys/fs/devfs/devfs_rule.c
==============================================================================
--- stable/7/sys/fs/devfs/devfs_rule.c	Tue Apr 12 16:43:29 2011	(r220570)
+++ stable/7/sys/fs/devfs/devfs_rule.c	Tue Apr 12 16:52:05 2011	(r220571)
@@ -741,6 +741,11 @@ devfs_ruleset_use(devfs_rsnum rsnum, str
 		devfs_ruleset_reap(cds);
 	}
 
+	if (rsnum == 0) {
+		dm->dm_ruleset = 0;
+		return (0);
+	}
+
 	ds = devfs_ruleset_bynum(rsnum);
 	if (ds == NULL)
 		ds = devfs_ruleset_create(rsnum);

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Apr 13 19:55:59 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B8A2106564A;
	Wed, 13 Apr 2011 19:55:59 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B5C38FC15;
	Wed, 13 Apr 2011 19:55:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3DJtxXa009888;
	Wed, 13 Apr 2011 19:55:59 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3DJtxSg009886;
	Wed, 13 Apr 2011 19:55:59 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201104131955.p3DJtxSg009886@svn.freebsd.org>
From: Doug Barton 
Date: Wed, 13 Apr 2011 19:55:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220609 - stable/7
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 13 Apr 2011 19:55:59 -0000

Author: dougb
Date: Wed Apr 13 19:55:58 2011
New Revision: 220609
URL: http://svn.freebsd.org/changeset/base/220609

Log:
  MFC r220512:
  
  Update recommendation for mergemaster. The -a and -i options are exclusive.

Modified:
  stable/7/Makefile   (contents, props changed)

Modified: stable/7/Makefile
==============================================================================
--- stable/7/Makefile	Wed Apr 13 19:54:54 2011	(r220608)
+++ stable/7/Makefile	Wed Apr 13 19:55:58 2011	(r220609)
@@ -57,7 +57,7 @@
 #  6.  `mergemaster -p'
 #  7.  `make installworld'
 #  8.  `make delete-old'
-#  9.  `mergemaster'                         (you may wish to use -U or -ai).
+#  9.  `mergemaster'		(you may wish to use -i, along with -U or -F).
 # 10.  `reboot'
 # 11.  `make delete-old-libs' (in case no 3rd party program uses them anymore)
 #

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 15 13:50:27 2011
Return-Path: 
Delivered-To: svn-src-stable-7@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3B1341065672;
	Fri, 15 Apr 2011 13:50:27 +0000 (UTC)
	(envelope-from Andre.Albsmeier@siemens.com)
Received: from david.siemens.de (david.siemens.de [192.35.17.14])
	by mx1.freebsd.org (Postfix) with ESMTP id C5AFB8FC0C;
	Fri, 15 Apr 2011 13:50:26 +0000 (UTC)
Received: from mail3.siemens.de (localhost [127.0.0.1])
	by david.siemens.de (8.13.6/8.13.6) with ESMTP id p3FDPPKE020496;
	Fri, 15 Apr 2011 15:25:25 +0200
Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130])
	by mail3.siemens.de (8.13.6/8.13.6) with ESMTP id p3FDPP7S024109;
	Fri, 15 Apr 2011 15:25:25 +0200
Received: (from localhost)
	by curry.mchp.siemens.de (8.14.4/8.14.4) id p3FDPP18009085;
Date: Fri, 15 Apr 2011 15:25:25 +0200
From: Andre Albsmeier 
To: John Baldwin 
Message-ID: <20110415132525.GA88202@curry.mchp.siemens.de>
References: <201102041444.p14EixJP087709@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201102041444.p14EixJP087709@svn.freebsd.org>
X-Echelon: 
X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses!
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-all@FreeBSD.org, svn-src-stable-7@FreeBSD.org,
	Andre.Albsmeier@siemens.com
Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 15 Apr 2011 13:50:27 -0000

On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote:
> Author: jhb
> Date: Fri Feb  4 14:44:59 2011
> New Revision: 218277
> URL: http://svn.freebsd.org/changeset/base/218277
> 
> Log:
>   MFC 217075:
>   Retire PCONFIG and leave the priority of thread0 alone when waiting for
>   interrupt config hooks to execute.
>   
>   To preserve the KBI, I did not renumber priorities but simply removed
>   PCONFIG.
> 
> Modified:
>   stable/7/sys/kern/subr_autoconf.c
>   stable/7/sys/sys/priority.h
> Directory Properties:
>   stable/7/sys/   (props changed)
>   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
>   stable/7/sys/contrib/dev/acpica/   (props changed)
>   stable/7/sys/contrib/pf/   (props changed)
> 
> Modified: stable/7/sys/kern/subr_autoconf.c
> ==============================================================================
> --- stable/7/sys/kern/subr_autoconf.c	Fri Feb  4 14:44:42 2011	(r218276)
> +++ stable/7/sys/kern/subr_autoconf.c	Fri Feb  4 14:44:59 2011	(r218277)
> @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy)
>  	warned = 0;
>  	while (!TAILQ_EMPTY(&intr_config_hook_list)) {
>  		if (msleep(&intr_config_hook_list, &intr_config_hook_lock,
> -		    PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) ==
> +		    0, "conifhk", WARNING_INTERVAL_SECS * hz) ==
>  		    EWOULDBLOCK) {
>  			mtx_unlock(&intr_config_hook_lock);
>  			warned++;


This broke several of my machines in a somewhat strange way:

After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12)
I noticed that some (4) of them didn't start. All 4 didn't find
their boot device anymore. What they all got in common is:

- an Adaptec 2940 Ultra SCSI adapter
- two SCSI harddisks (da0 and da1) of various brands
- one SCSI CDROM drive (cd0)

To be exact, none of the three devices (da0, da1, cd0) were
detected at all. Other machines with a similar configuration
(2940 and da0/da1) but _without_ the CDROM drive didn't have
any problems. So I simply removed the CDROM drives on the 4
machines in question and they all booted again.

Today I decided to dig into this and after reverting(*) the
above change, they worked with the CDROM again. I have cross-
checked it 3 times. No idea what's happening here...

	-Andre

(*) To be honest, I use this patch so I had to modify only one file:

--- sys/kern/subr_autoconf.c.ORI	2011-02-05 13:14:11.000000000 +0100
+++ sys/kern/subr_autoconf.c	2011-04-15 14:34:31.000000000 +0200
@@ -108,7 +108,7 @@
 	warned = 0;
 	while (!TAILQ_EMPTY(&intr_config_hook_list)) {
 		if (msleep(&intr_config_hook_list, &intr_config_hook_lock,
-		    0, "conifhk", WARNING_INTERVAL_SECS * hz) ==
+		    PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) ==
 		    EWOULDBLOCK) {
 			mtx_unlock(&intr_config_hook_lock);
 			warned++;

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 15 16:42:43 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 955471065678;
	Fri, 15 Apr 2011 16:42:43 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 549B78FC15;
	Fri, 15 Apr 2011 16:42:43 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id E5AEA46BA2;
	Fri, 15 Apr 2011 12:42:42 -0400 (EDT)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 804038A01B;
	Fri, 15 Apr 2011 12:42:42 -0400 (EDT)
From: John Baldwin 
To: Andre Albsmeier 
Date: Fri, 15 Apr 2011 12:35:05 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; )
References: <201102041444.p14EixJP087709@svn.freebsd.org>
	<20110415132525.GA88202@curry.mchp.siemens.de>
In-Reply-To: <20110415132525.GA88202@curry.mchp.siemens.de>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201104151235.05114.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6
	(bigwig.baldwin.cx); Fri, 15 Apr 2011 12:42:42 -0400 (EDT)
Cc: svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org
Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 15 Apr 2011 16:42:43 -0000

On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote:
> On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote:
> > Author: jhb
> > Date: Fri Feb  4 14:44:59 2011
> > New Revision: 218277
> > URL: http://svn.freebsd.org/changeset/base/218277
> > 
> > Log:
> >   MFC 217075:
> >   Retire PCONFIG and leave the priority of thread0 alone when waiting for
> >   interrupt config hooks to execute.
> >   
> >   To preserve the KBI, I did not renumber priorities but simply removed
> >   PCONFIG.
> > 
> > Modified:
> >   stable/7/sys/kern/subr_autoconf.c
> >   stable/7/sys/sys/priority.h
> > Directory Properties:
> >   stable/7/sys/   (props changed)
> >   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
> >   stable/7/sys/contrib/dev/acpica/   (props changed)
> >   stable/7/sys/contrib/pf/   (props changed)
> > 
> > Modified: stable/7/sys/kern/subr_autoconf.c
> > 
==============================================================================
> > --- stable/7/sys/kern/subr_autoconf.c	Fri Feb  4 14:44:42 2011	
(r218276)
> > +++ stable/7/sys/kern/subr_autoconf.c	Fri Feb  4 14:44:59 2011	
(r218277)
> > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy)
> >  	warned = 0;
> >  	while (!TAILQ_EMPTY(&intr_config_hook_list)) {
> >  		if (msleep(&intr_config_hook_list, &intr_config_hook_lock,
> > -		    PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) ==
> > +		    0, "conifhk", WARNING_INTERVAL_SECS * hz) ==
> >  		    EWOULDBLOCK) {
> >  			mtx_unlock(&intr_config_hook_lock);
> >  			warned++;
> 
> 
> This broke several of my machines in a somewhat strange way:
> 
> After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12)
> I noticed that some (4) of them didn't start. All 4 didn't find
> their boot device anymore. What they all got in common is:
> 
> - an Adaptec 2940 Ultra SCSI adapter
> - two SCSI harddisks (da0 and da1) of various brands
> - one SCSI CDROM drive (cd0)
> 
> To be exact, none of the three devices (da0, da1, cd0) were
> detected at all. Other machines with a similar configuration
> (2940 and da0/da1) but _without_ the CDROM drive didn't have
> any problems. So I simply removed the CDROM drives on the 4
> machines in question and they all booted again.
> 
> Today I decided to dig into this and after reverting(*) the
> above change, they worked with the CDROM again. I have cross-
> checked it 3 times. No idea what's happening here...
> 
> 	-Andre
> 
> (*) To be honest, I use this patch so I had to modify only one file:
> 
> --- sys/kern/subr_autoconf.c.ORI	2011-02-05 13:14:11.000000000 +0100
> +++ sys/kern/subr_autoconf.c	2011-04-15 14:34:31.000000000 +0200
> @@ -108,7 +108,7 @@
>  	warned = 0;
>  	while (!TAILQ_EMPTY(&intr_config_hook_list)) {
>  		if (msleep(&intr_config_hook_list, &intr_config_hook_lock,
> -		    0, "conifhk", WARNING_INTERVAL_SECS * hz) ==
> +		    PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) ==
>  		    EWOULDBLOCK) {
>  			mtx_unlock(&intr_config_hook_lock);
>  			warned++;

Do you get any warnings about CAM timeouts, etc. when these probe?  A verbose 
dmesg might be nice to look at if possible.

-- 
John Baldwin

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 15 19:50:38 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6ABA2106567F;
	Fri, 15 Apr 2011 19:50:38 +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 57D158FC12;
	Fri, 15 Apr 2011 19:50:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3FJoc4S079954;
	Fri, 15 Apr 2011 19:50:38 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3FJocCo079950;
	Fri, 15 Apr 2011 19:50:38 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104151950.p3FJocCo079950@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 15 Apr 2011 19:50:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220666 - stable/7/usr.sbin/mfiutil
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 15 Apr 2011 19:50:38 -0000

Author: jhb
Date: Fri Apr 15 19:50:38 2011
New Revision: 220666
URL: http://svn.freebsd.org/changeset/base/220666

Log:
  MFC 219717,220363:
  - Add more details to the 'show battery' command including more raw
    capacity values, charge cycle count, temperature, and more detailed
    status.
  - Add the ability to manage the state of write caching when the battery
    back-up is missing or dead.  The current state of this field is reported
    in 'mfiutil cache ' and can be adjusted via
    'mfiutil cache  bad-bbu-write-cache '.  This
    setting should generally be disabled to avoid data loss.

Modified:
  stable/7/usr.sbin/mfiutil/mfi_show.c
  stable/7/usr.sbin/mfiutil/mfi_volume.c
  stable/7/usr.sbin/mfiutil/mfiutil.8
Directory Properties:
  stable/7/usr.sbin/mfiutil/   (props changed)

Modified: stable/7/usr.sbin/mfiutil/mfi_show.c
==============================================================================
--- stable/7/usr.sbin/mfiutil/mfi_show.c	Fri Apr 15 19:50:25 2011	(r220665)
+++ stable/7/usr.sbin/mfiutil/mfi_show.c	Fri Apr 15 19:50:38 2011	(r220666)
@@ -138,8 +138,9 @@ show_battery(int ac, char **av)
 {
 	struct mfi_bbu_capacity_info cap;
 	struct mfi_bbu_design_info design;
+	struct mfi_bbu_status stat;
 	uint8_t status;
-	int error, fd;
+	int comma, error, fd;
 
 	if (ac != 1) {
 		warnx("show battery: extra arguments");
@@ -171,16 +172,57 @@ show_battery(int ac, char **av)
 		return (error);
 	}
 
+	if (mfi_dcmd_command(fd, MFI_DCMD_BBU_GET_STATUS, &stat, sizeof(stat),
+	    NULL, 0, NULL) < 0) {
+		warn("Failed to get status");
+		return (errno);
+	}
+
 	printf("mfi%d: Battery State:\n", mfi_unit);
-	printf(" Manufacture Date: %d/%d/%d\n", design.mfg_date >> 5 & 0x0f,
+	printf("     Manufacture Date: %d/%d/%d\n", design.mfg_date >> 5 & 0x0f,
 	    design.mfg_date & 0x1f, design.mfg_date >> 9 & 0xffff);
-	printf("    Serial Number: %d\n", design.serial_number);
-	printf("     Manufacturer: %s\n", design.mfg_name);
-	printf("            Model: %s\n", design.device_name);
-	printf("        Chemistry: %s\n", design.device_chemistry);
-	printf("  Design Capacity: %d mAh\n", design.design_capacity);
-	printf("   Design Voltage: %d mV\n", design.design_voltage);
-	printf("   Current Charge: %d%%\n", cap.relative_charge);
+	printf("        Serial Number: %d\n", design.serial_number);
+	printf("         Manufacturer: %s\n", design.mfg_name);
+	printf("                Model: %s\n", design.device_name);
+	printf("            Chemistry: %s\n", design.device_chemistry);
+	printf("      Design Capacity: %d mAh\n", design.design_capacity);
+	printf(" Full Charge Capacity: %d mAh\n", cap.full_charge_capacity);
+	printf("     Current Capacity: %d mAh\n", cap.remaining_capacity);
+	printf("        Charge Cycles: %d\n", cap.cycle_count);
+	printf("       Current Charge: %d%%\n", cap.relative_charge);
+	printf("       Design Voltage: %d mV\n", design.design_voltage);
+	printf("      Current Voltage: %d mV\n", stat.voltage);
+	printf("          Temperature: %d C\n", stat.temperature);
+	printf("               Status:");
+	comma = 0;
+	if (stat.fw_status & MFI_BBU_STATE_PACK_MISSING) {
+		printf(" PACK_MISSING");
+		comma = 1;
+	}
+	if (stat.fw_status & MFI_BBU_STATE_VOLTAGE_LOW) {
+		printf("%s VOLTAGE_LOW", comma ? "," : "");
+		comma = 1;
+	}
+	if (stat.fw_status & MFI_BBU_STATE_TEMPERATURE_HIGH) {
+		printf("%s TEMPERATURE_HIGH", comma ? "," : "");
+		comma = 1;
+	}
+	if (stat.fw_status & MFI_BBU_STATE_CHARGE_ACTIVE) {
+		printf("%s CHARGING", comma ? "," : "");
+		comma = 1;
+	}
+	if (stat.fw_status & MFI_BBU_STATE_DISCHARGE_ACTIVE) {
+		printf("%s DISCHARGING", comma ? "," : "");
+	}
+	if (!comma)
+		printf(" normal");
+	printf("\n");
+	switch (stat.battery_type) {
+	case MFI_BBU_TYPE_BBU:
+		printf("      State of Health: %s\n",
+		    stat.detail.bbu.is_SOH_good ? "good" : "bad");
+		break;
+	}
 
 	close(fd);
 

Modified: stable/7/usr.sbin/mfiutil/mfi_volume.c
==============================================================================
--- stable/7/usr.sbin/mfiutil/mfi_volume.c	Fri Apr 15 19:50:25 2011	(r220665)
+++ stable/7/usr.sbin/mfiutil/mfi_volume.c	Fri Apr 15 19:50:38 2011	(r220666)
@@ -138,6 +138,10 @@ update_cache_policy(int fd, struct mfi_l
 		    policy & MR_LD_CACHE_READ_AHEAD ?
 		    (policy & MR_LD_CACHE_READ_ADAPTIVE ?
 		    "adaptive" : "always") : "none");
+	if (changes & MR_LD_CACHE_WRITE_CACHE_BAD_BBU)
+		printf("%s write caching with bad BBU\n",
+		    policy & MR_LD_CACHE_WRITE_CACHE_BAD_BBU ? "Enabling" :
+		    "Disabling");
 
 	props->default_cache_policy = policy;
 	if (mfi_ld_set_props(fd, props) < 0) {
@@ -182,7 +186,7 @@ volume_cache(int ac, char **av)
 	if (ac == 2) {
 		printf("mfi%u volume %s cache settings:\n", mfi_unit,
 		    mfi_volume_name(fd, target_id));
-		printf("      I/O caching: ");
+		printf("             I/O caching: ");
 		switch (props.default_cache_policy &
 		    (MR_LD_CACHE_ALLOW_WRITE_CACHE |
 		    MR_LD_CACHE_ALLOW_READ_CACHE)) {
@@ -200,14 +204,17 @@ volume_cache(int ac, char **av)
 			printf("writes and reads\n");
 			break;
 		}
-		printf("    write caching: %s\n",
+		printf("           write caching: %s\n",
 		    props.default_cache_policy & MR_LD_CACHE_WRITE_BACK ?
 		    "write-back" : "write-through");
-		printf("       read ahead: %s\n",
+		printf("write cache with bad BBU: %s\n",
+		    props.default_cache_policy &
+		    MR_LD_CACHE_WRITE_CACHE_BAD_BBU ? "enabled" : "disabled");
+		printf("              read ahead: %s\n",
 		    props.default_cache_policy & MR_LD_CACHE_READ_AHEAD ?
 		    (props.default_cache_policy & MR_LD_CACHE_READ_ADAPTIVE ?
 		    "adaptive" : "always") : "none");
-		printf("drive write cache: ");
+		printf("       drive write cache: ");
 		switch (props.disk_cache_policy) {
 		case MR_PD_CACHE_UNCHANGED:
 			printf("default\n");
@@ -273,6 +280,21 @@ volume_cache(int ac, char **av)
 			error = update_cache_policy(fd, &props, policy,
 			    MR_LD_CACHE_READ_AHEAD |
 			    MR_LD_CACHE_READ_ADAPTIVE);
+		} else if (strcmp(av[2], "bad-bbu-write-cache") == 0) {
+			if (ac < 4) {
+				warnx("cache: bad BBU setting required");
+				return (EINVAL);
+			}
+			if (strcmp(av[3], "enable") == 0)
+				policy = MR_LD_CACHE_WRITE_CACHE_BAD_BBU;
+			else if (strcmp(av[3], "disable") == 0)
+				policy = 0;
+			else {
+				warnx("cache: invalid bad BBU setting");
+				return (EINVAL);
+			}
+			error = update_cache_policy(fd, &props, policy,
+			    MR_LD_CACHE_WRITE_CACHE_BAD_BBU);
 		} else if (strcmp(av[2], "write-cache") == 0) {
 			if (ac < 4) {
 				warnx("cache: write-cache setting required");

Modified: stable/7/usr.sbin/mfiutil/mfiutil.8
==============================================================================
--- stable/7/usr.sbin/mfiutil/mfiutil.8	Fri Apr 15 19:50:25 2011	(r220665)
+++ stable/7/usr.sbin/mfiutil/mfiutil.8	Fri Apr 15 19:50:38 2011	(r220666)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 16, 2009
+.Dd April 5, 2011
 .Dt MFIUTIL 8
 .Os
 .Sh NAME
@@ -367,7 +367,7 @@ Enable caching only for write I/O operat
 Use write-back policy for cached writes.
 .It Cm write-through
 Use write-through policy for cached writes.
-.It Cm read-ahead Op Ar value
+.It Cm read-ahead Ar value
 Set the read ahead policy for cached reads.
 The
 .Ar value
@@ -376,7 +376,18 @@ argument can be set to either
 .Dq adaptive ,
 or
 .Dq always .
-.It Cm write-cache Op Ar value
+.It Cm bad-bbu-write-cache Ar value
+Control the behavior of I/O write caching if the battery is dead or
+missing.
+The
+.Ar value
+argument can be set to either
+.Dq disable
+or
+.Dq enable .
+In general this setting should be left disabled to avoid data loss when
+the system loses power.
+.It Cm write-cache Ar value
 Control the write caches on the physical drives backing
 .Ar volume .
 The

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 15 20:20:11 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CA8F01065673;
	Fri, 15 Apr 2011 20:20:11 +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 AD4378FC0C;
	Fri, 15 Apr 2011 20:20:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3FKKBZR080791;
	Fri, 15 Apr 2011 20:20:11 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3FKKBR0080788;
	Fri, 15 Apr 2011 20:20:11 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104152020.p3FKKBR0080788@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 15 Apr 2011 20:20:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220670 - stable/7/sys/dev/pci
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 15 Apr 2011 20:20:12 -0000

Author: jhb
Date: Fri Apr 15 20:20:11 2011
New Revision: 220670
URL: http://svn.freebsd.org/changeset/base/220670

Log:
  MFC 219865:
  Add pci_find_cap() as an alias for pci_find_extcap() to ease driver
  portability with 9+ where pci_find_extcap() has been renamed to
  pci_find_cap().

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

Modified: stable/7/sys/dev/pci/pci.c
==============================================================================
--- stable/7/sys/dev/pci/pci.c	Fri Apr 15 20:19:50 2011	(r220669)
+++ stable/7/sys/dev/pci/pci.c	Fri Apr 15 20:20:11 2011	(r220670)
@@ -92,7 +92,7 @@ static char		*pci_describe_device(device
 static int		pci_modevent(module_t mod, int what, void *arg);
 static void		pci_hdrtypedata(device_t pcib, int b, int s, int f,
 			    pcicfgregs *cfg);
-static void		pci_read_extcap(device_t pcib, pcicfgregs *cfg);
+static void		pci_read_cap(device_t pcib, pcicfgregs *cfg);
 static int		pci_read_vpd_reg(device_t pcib, pcicfgregs *cfg,
 			    int reg, uint32_t *data);
 #if 0
@@ -473,7 +473,7 @@ pci_read_device(device_t pcib, int d, in
 		pci_hdrtypedata(pcib, b, s, f, cfg);
 
 		if (REG(PCIR_STATUS, 2) & PCIM_STATUS_CAPPRESENT)
-			pci_read_extcap(pcib, cfg);
+			pci_read_cap(pcib, cfg);
 
 		STAILQ_INSERT_TAIL(devlist_head, devlist_entry, pci_links);
 
@@ -501,7 +501,7 @@ pci_read_device(device_t pcib, int d, in
 }
 
 static void
-pci_read_extcap(device_t pcib, pcicfgregs *cfg)
+pci_read_cap(device_t pcib, pcicfgregs *cfg)
 {
 #define	REG(n, w)	PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w)
 #define	WREG(n, v, w)	PCIB_WRITE_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, v, w)
@@ -1577,7 +1577,7 @@ pci_get_max_read_req(device_t dev)
 	int cap;
 	uint16_t val;
 
-	if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) != 0)
+	if (pci_find_cap(dev, PCIY_EXPRESS, &cap) != 0)
 		return (0);
 	val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2);
 	val &= PCIM_EXP_CTL_MAX_READ_REQUEST;
@@ -1591,7 +1591,7 @@ pci_set_max_read_req(device_t dev, int s
 	int cap;
 	uint16_t val;
 
-	if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) != 0)
+	if (pci_find_cap(dev, PCIY_EXPRESS, &cap) != 0)
 		return (0);
 	if (size < 128)
 		size = 128;

Modified: stable/7/sys/dev/pci/pcivar.h
==============================================================================
--- stable/7/sys/dev/pci/pcivar.h	Fri Apr 15 20:19:50 2011	(r220669)
+++ stable/7/sys/dev/pci/pcivar.h	Fri Apr 15 20:20:11 2011	(r220670)
@@ -407,9 +407,15 @@ pci_get_powerstate(device_t dev)
 }
 
 static __inline int
+pci_find_cap(device_t dev, int capability, int *capreg)
+{
+    return (PCI_FIND_EXTCAP(device_get_parent(dev), dev, capability, capreg));
+}
+
+static __inline int
 pci_find_extcap(device_t dev, int capability, int *capreg)
 {
-    return PCI_FIND_EXTCAP(device_get_parent(dev), dev, capability, capreg);
+    return (PCI_FIND_EXTCAP(device_get_parent(dev), dev, capability, capreg));
 }
 
 static __inline int

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 15 20:26:36 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E4552106564A;
	Fri, 15 Apr 2011 20:26:36 +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 D21BC8FC12;
	Fri, 15 Apr 2011 20:26:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3FKQagM081013;
	Fri, 15 Apr 2011 20:26:36 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3FKQavd081011;
	Fri, 15 Apr 2011 20:26:36 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104152026.p3FKQavd081011@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 15 Apr 2011 20:26:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220672 - stable/7/sys/ufs/ffs
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 15 Apr 2011 20:26:37 -0000

Author: jhb
Date: Fri Apr 15 20:26:36 2011
New Revision: 220672
URL: http://svn.freebsd.org/changeset/base/220672

Log:
  MFC 219276:
  Use ffs() to locate free bits in the inode bitmap rather than a loop with
  bit shifts.

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

Modified: stable/7/sys/ufs/ffs/ffs_alloc.c
==============================================================================
--- stable/7/sys/ufs/ffs/ffs_alloc.c	Fri Apr 15 20:26:24 2011	(r220671)
+++ stable/7/sys/ufs/ffs/ffs_alloc.c	Fri Apr 15 20:26:36 2011	(r220672)
@@ -1765,17 +1765,13 @@ ffs_nodealloccg(ip, cg, ipref, mode)
 		}
 	}
 	i = start + len - loc;
-	map = inosused[i];
-	ipref = i * NBBY;
-	for (i = 1; i < (1 << NBBY); i <<= 1, ipref++) {
-		if ((map & i) == 0) {
-			cgp->cg_irotor = ipref;
-			goto gotit;
-		}
+	map = inosused[i] ^ 0xff;
+	if (map == 0) {
+		printf("fs = %s\n", fs->fs_fsmnt);
+		panic("ffs_nodealloccg: block not in map");
 	}
-	printf("fs = %s\n", fs->fs_fsmnt);
-	panic("ffs_nodealloccg: block not in map");
-	/* NOTREACHED */
+	ipref = i * NBBY + ffs(map) - 1;
+	cgp->cg_irotor = ipref;
 gotit:
 	/*
 	 * Check to see if we need to initialize more inodes.

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 15 20:37:06 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 86AB71065678;
	Fri, 15 Apr 2011 20:37:06 +0000 (UTC)
	(envelope-from Andre.Albsmeier@siemens.com)
Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28])
	by mx1.freebsd.org (Postfix) with ESMTP id 0921A8FC35;
	Fri, 15 Apr 2011 20:37:05 +0000 (UTC)
Received: from mail2.siemens.de (localhost [127.0.0.1])
	by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id p3FKb4Ns003490;
	Fri, 15 Apr 2011 22:37:04 +0200
Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130])
	by mail2.siemens.de (8.13.6/8.13.6) with ESMTP id p3FKb4bA010031;
	Fri, 15 Apr 2011 22:37:04 +0200
Received: (from localhost)
	by curry.mchp.siemens.de (8.14.4/8.14.4) id p3FKb40h009921;
Date: Fri, 15 Apr 2011 22:37:03 +0200
From: Andre Albsmeier 
To: John Baldwin 
Message-ID: <20110415203703.GA89116@curry.mchp.siemens.de>
References: <201102041444.p14EixJP087709@svn.freebsd.org>
	<20110415132525.GA88202@curry.mchp.siemens.de>
	<201104151235.05114.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201104151235.05114.jhb@freebsd.org>
X-Echelon: 
X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses!
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: "svn-src-all@freebsd.org" ,
	"svn-src-stable-7@freebsd.org" 
Subject: Re: svn commit: r218277 - in stable/7/sys: kern sys
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 15 Apr 2011 20:37:06 -0000

On Fri, 15-Apr-2011 at 18:35:05 +0200, John Baldwin wrote:
> On Friday, April 15, 2011 9:25:25 am Andre Albsmeier wrote:
> > On Fri, 04-Feb-2011 at 14:44:59 +0000, John Baldwin wrote:
> > > Author: jhb
> > > Date: Fri Feb  4 14:44:59 2011
> > > New Revision: 218277
> > > URL: http://svn.freebsd.org/changeset/base/218277
> > > 
> > > Log:
> > >   MFC 217075:
> > >   Retire PCONFIG and leave the priority of thread0 alone when waiting for
> > >   interrupt config hooks to execute.
> > >   
> > >   To preserve the KBI, I did not renumber priorities but simply removed
> > >   PCONFIG.
> > > 
> > > Modified:
> > >   stable/7/sys/kern/subr_autoconf.c
> > >   stable/7/sys/sys/priority.h
> > > Directory Properties:
> > >   stable/7/sys/   (props changed)
> > >   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
> > >   stable/7/sys/contrib/dev/acpica/   (props changed)
> > >   stable/7/sys/contrib/pf/   (props changed)
> > > 
> > > Modified: stable/7/sys/kern/subr_autoconf.c
> > > 
> ==============================================================================
> > > --- stable/7/sys/kern/subr_autoconf.c	Fri Feb  4 14:44:42 2011	
> (r218276)
> > > +++ stable/7/sys/kern/subr_autoconf.c	Fri Feb  4 14:44:59 2011	
> (r218277)
> > > @@ -108,7 +108,7 @@ run_interrupt_driven_config_hooks(dummy)
> > >  	warned = 0;
> > >  	while (!TAILQ_EMPTY(&intr_config_hook_list)) {
> > >  		if (msleep(&intr_config_hook_list, &intr_config_hook_lock,
> > > -		    PCONFIG, "conifhk", WARNING_INTERVAL_SECS * hz) ==
> > > +		    0, "conifhk", WARNING_INTERVAL_SECS * hz) ==
> > >  		    EWOULDBLOCK) {
> > >  			mtx_unlock(&intr_config_hook_lock);
> > >  			warned++;
> > 
> > 
> > This broke several of my machines in a somewhat strange way:
> > 
> > After upgrading them (17) to a recent 7-STABLE (as of 2011-04-12)
> > I noticed that some (4) of them didn't start. All 4 didn't find
> > their boot device anymore. What they all got in common is:
> > 
> > - an Adaptec 2940 Ultra SCSI adapter
> > - two SCSI harddisks (da0 and da1) of various brands
> > - one SCSI CDROM drive (cd0)
> > 
> > To be exact, none of the three devices (da0, da1, cd0) were
> > detected at all. Other machines with a similar configuration
> > (2940 and da0/da1) but _without_ the CDROM drive didn't have
> > any problems. So I simply removed the CDROM drives on the 4
> > machines in question and they all booted again.
> > 
> > Today I decided to dig into this and after reverting(*) the
> > above change, they worked with the CDROM again. I have cross-
> > checked it 3 times. No idea what's happening here...
> > 
> > 	-Andre
> > 
> > (*) To be honest, I use this patch so I had to modify only one file:
> > 
> > --- sys/kern/subr_autoconf.c.ORI	2011-02-05 13:14:11.000000000 +0100
> > +++ sys/kern/subr_autoconf.c	2011-04-15 14:34:31.000000000 +0200
> > @@ -108,7 +108,7 @@
> >  	warned = 0;
> >  	while (!TAILQ_EMPTY(&intr_config_hook_list)) {
> >  		if (msleep(&intr_config_hook_list, &intr_config_hook_lock,
> > -		    0, "conifhk", WARNING_INTERVAL_SECS * hz) ==
> > +		    PRI_MIN_KERN + 32, "conifhk", WARNING_INTERVAL_SECS * hz) ==
> >  		    EWOULDBLOCK) {
> >  			mtx_unlock(&intr_config_hook_lock);
> >  			warned++;
> 
> Do you get any warnings about CAM timeouts, etc. when these probe?  A verbose 

This is a part of a verbose dmesg with a working(!) kernel:

Apr 15 12:44:33  inside kernel: splash: image decoder found: snake_saver
Apr 15 12:44:33  inside kernel: lo0: bpf attached
Apr 15 12:44:33  inside kernel: (noperiph:ahc0:0:-1:-1): SCSI bus reset delivered. 0 SCBs aborted.
Apr 15 12:44:33  inside kernel: ahc0: Selection Timeout on A:5. 0 SCBs aborted
Apr 15 12:44:33  inside kernel: ahc0: Selection Timeout on A:2. 0 SCBs aborted
Apr 15 12:44:33  inside kernel: ahc0: Selection Timeout on A:3. 0 SCBs aborted
Apr 15 12:44:33  inside kernel: ahc0: Selection Timeout on A:4. 0 SCBs aborted
Apr 15 12:44:33  inside kernel: (probe0:ahc0:0:0:0): Retrying Command
Apr 15 12:44:33  inside kernel: (probe1:ahc0:0:1:0): Retrying Command
Apr 15 12:44:33  inside kernel: (probe6:ahc0:0:6:0): Retrying Command
Apr 15 12:44:33  inside kernel: (probe6:ahc0:0:6:0): error 22
Apr 15 12:44:33  inside kernel: (probe6:ahc0:0:6:0): Unretryable Error
Apr 15 12:44:33  inside kernel: (probe6:ahc0:0:6:0): Down reving Protocol Version from 4 to 2?
Apr 15 12:44:33  inside kernel: (probe0:ahc0:0:0:0): Down reving Protocol Version from 4 to 2?
Apr 15 12:44:33  inside kernel: (probe1:ahc0:0:1:0): Down reving Protocol Version from 4 to 2?
Apr 15 12:44:33  inside kernel: (ahc0:A:6:0): Sending SDTR period c, offset f
Apr 15 12:44:33  inside kernel: (ahc0:A:6:0): Received SDTR period 19, offset f
Apr 15 12:44:33  inside kernel: Filtered to period 19, offset f
Apr 15 12:44:33  inside kernel: ahc0: target 6 synchronous at 10.0MHz, offset = 0xf
Apr 15 12:44:33  inside kernel: (ahc0:A:0:0): Sending SDTR period c, offset f
Apr 15 12:44:33  inside kernel: (ahc0:A:0:0): Received SDTR period c, offset f
Apr 15 12:44:33  inside kernel: Filtered to period c, offset f
Apr 15 12:44:33  inside kernel: ahc0: target 0 synchronous at 20.0MHz, offset = 0xf
Apr 15 12:44:33  inside kernel: (ahc0:A:1:0): Sending SDTR period c, offset f
Apr 15 12:44:33  inside kernel: (ahc0:A:1:0): Received SDTR period 19, offset f
Apr 15 12:44:33  inside kernel: Filtered to period 19, offset f
Apr 15 12:44:33  inside kernel: ahc0: target 1 synchronous at 10.0MHz, offset = 0xf
Apr 15 12:44:33  inside kernel: (ahc0:A:6:0): Sending SDTR period 19, offset f
Apr 15 12:44:33  inside kernel: (ahc0:A:6:0): Received SDTR period 19, offset f
Apr 15 12:44:33  inside kernel: Filtered to period 19, offset f
Apr 15 12:44:33  inside kernel: (probe6:ahc0:0:6:0): error 16
Apr 15 12:44:33  inside kernel: (probe6:ahc0:0:6:0): Unretryable Error
Apr 15 12:44:33  inside kernel: pass0 at ahc0 bus 0 target 0 lun 0
Apr 15 12:44:33  inside kernel: pass0:  Fixed Direct Access SCSI-2 device
Apr 15 12:44:33  inside kernel: pass0: Serial Number 5U2V4605
Apr 15 12:44:33  inside kernel: pass0: 20.000MB/s transfers (20.000MHz, offset 15)
Apr 15 12:44:33  inside kernel: pass0: Command Queueing Enabled
Apr 15 12:44:33  inside kernel: pass1 at ahc0 bus 0 target 1 lun 0
Apr 15 12:44:33  inside kernel: pass1:  Fixed Direct Access SCSI-2 device
Apr 15 12:44:33  inside kernel: pass1: Serial Number 5U0A7413
Apr 15 12:44:33  inside kernel: pass1: 10.000MB/s transfers (10.000MHz, offset 15)
Apr 15 12:44:33  inside kernel: pass1: Command Queueing Enabled
Apr 15 12:44:33  inside kernel: pass6 at ahc0 bus 0 target 6 lun 0
Apr 15 12:44:33  inside kernel: pass6:  Removable CD-ROM SCSI-2 device
Apr 15 12:44:33  inside kernel: pass6: 10.000MB/s transfers (10.000MHz, offset 15)

<--------------- XXX ---------------->

Apr 15 12:44:33  inside kernel: GEOM: new disk da0
Apr 15 12:44:33  inside kernel: (ahc0:A:6:0): Sending SDTR period 19, offset f
Apr 15 12:44:33  inside kernel: (ahc0:A:6:0): Received SDTR period 19, offset f
Apr 15 12:44:33  inside kernel: Filtered to period 19, offset f
Apr 15 12:44:33  inside kernel: (cd0:ahc0:0:6:0): Retrying Command
Apr 15 12:44:33  inside kernel: da0 at ahc0 bus 0 target 0 lun 0


If I remember things correctly, the line marked XXX is where the
bad kernel stopped and spit out the panic about the missing root
fs. I am 99% sure that pass0 and pass1 could be found in both
cases, however, everything related to da0 and da1 were missing
whith the bad kernel.

Unfortunately, I have no access to these machines before monday
to create the verbose dmesgs. Also all 4 machines are in
production but I think I can figure something out next week...

Thanks,

	-Andre

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Apr 15 20:42:15 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 488691065672;
	Fri, 15 Apr 2011 20:42:15 +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 3632A8FC18;
	Fri, 15 Apr 2011 20:42:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3FKgFXb081680;
	Fri, 15 Apr 2011 20:42:15 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3FKgFJm081678;
	Fri, 15 Apr 2011 20:42:15 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104152042.p3FKgFJm081678@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 15 Apr 2011 20:42:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220678 - stable/7/sys/netinet
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 15 Apr 2011 20:42:15 -0000

Author: jhb
Date: Fri Apr 15 20:42:14 2011
New Revision: 220678
URL: http://svn.freebsd.org/changeset/base/220678

Log:
  MFC 220156:
  Clamp the initial advertised receive window when responding to a SYN/ACK
  to the maximum allowed window.  Growing the window too large would cause
  an underflow in the calculations in tcp_output() to decide if a window
  update should be sent which would prevent the persist timer from being
  started if data was pending and the other end of the connection advertised
  an initial window size of 0.

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

Modified: stable/7/sys/netinet/tcp_input.c
==============================================================================
--- stable/7/sys/netinet/tcp_input.c	Fri Apr 15 20:40:49 2011	(r220677)
+++ stable/7/sys/netinet/tcp_input.c	Fri Apr 15 20:42:14 2011	(r220678)
@@ -1296,7 +1296,8 @@ tcp_do_segment(struct mbuf *m, struct tc
 				(TF_RCVD_SCALE|TF_REQ_SCALE)) {
 				tp->rcv_scale = tp->request_r_scale;
 			}
-			tp->rcv_adv += tp->rcv_wnd;
+			tp->rcv_adv += imin(tp->rcv_wnd,
+			    TCP_MAXWIN << tp->rcv_scale);
 			tp->snd_una++;		/* SYN is acked */
 			/*
 			 * If there's data, delay ACK; if there's also a FIN

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Apr 16 09:57:17 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A82A7106566C;
	Sat, 16 Apr 2011 09:57:17 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 966D68FC08;
	Sat, 16 Apr 2011 09:57:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3G9vHL3098993;
	Sat, 16 Apr 2011 09:57:17 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3G9vHBc098991;
	Sat, 16 Apr 2011 09:57:17 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201104160957.p3G9vHBc098991@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 16 Apr 2011 09:57:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220696 - stable/7/usr.bin/netstat
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 16 Apr 2011 09:57:17 -0000

Author: brucec
Date: Sat Apr 16 09:57:17 2011
New Revision: 220696
URL: http://svn.freebsd.org/changeset/base/220696

Log:
  MFC r219613:
  
  Fix typo.

Modified:
  stable/7/usr.bin/netstat/sctp.c
Directory Properties:
  stable/7/usr.bin/netstat/   (props changed)

Modified: stable/7/usr.bin/netstat/sctp.c
==============================================================================
--- stable/7/usr.bin/netstat/sctp.c	Sat Apr 16 09:56:27 2011	(r220695)
+++ stable/7/usr.bin/netstat/sctp.c	Sat Apr 16 09:57:17 2011	(r220696)
@@ -563,7 +563,7 @@ sctp_stats(u_long off, const char *name,
 	p(sctps_sendfastretrans, "\t\t%ju fast retransmitted DATA chunk%s\n");
 	p(sctps_sendmultfastretrans, "\t\t%ju FR'%s that happened more "
 	    "than once to same chunk\n");
-	p(sctps_sendheartbeat, "\t\t%ju intput HB chunk%s\n");
+	p(sctps_sendheartbeat, "\t\t%ju output HB chunk%s\n");
 	p(sctps_sendecne, "\t\t%ju output ECNE chunk%s\n");
 	p(sctps_sendauth, "\t\t%ju output AUTH chunk%s\n");
 	p1a(sctps_senderrors, "\t\t%ju ip_output error counter\n");

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Apr 16 10:22:06 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DE2CD106566C;
	Sat, 16 Apr 2011 10:22:06 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CCCB48FC19;
	Sat, 16 Apr 2011 10:22:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3GAM6Ev001380;
	Sat, 16 Apr 2011 10:22:06 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3GAM6wk001377;
	Sat, 16 Apr 2011 10:22:06 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201104161022.p3GAM6wk001377@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 16 Apr 2011 10:22:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220699 - stable/7/tools/tools/iwi
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 16 Apr 2011 10:22:07 -0000

Author: brucec
Date: Sat Apr 16 10:22:06 2011
New Revision: 220699
URL: http://svn.freebsd.org/changeset/base/220699

Log:
  MFC r219527:
  
  Fix warnings and style(9) issues.
  Set WARNS to 6.

Modified:
  stable/7/tools/tools/iwi/Makefile
  stable/7/tools/tools/iwi/iwistats.c
Directory Properties:
  stable/7/tools/tools/iwi/   (props changed)

Modified: stable/7/tools/tools/iwi/Makefile
==============================================================================
--- stable/7/tools/tools/iwi/Makefile	Sat Apr 16 10:20:45 2011	(r220698)
+++ stable/7/tools/tools/iwi/Makefile	Sat Apr 16 10:22:06 2011	(r220699)
@@ -2,5 +2,6 @@
 
 PROG=	iwistats
 NO_MAN=
+WARNS?=6
 
 .include 

Modified: stable/7/tools/tools/iwi/iwistats.c
==============================================================================
--- stable/7/tools/tools/iwi/iwistats.c	Sat Apr 16 10:20:45 2011	(r220698)
+++ stable/7/tools/tools/iwi/iwistats.c	Sat Apr 16 10:22:06 2011	(r220699)
@@ -113,16 +113,17 @@ get_statistics(const char *iface)
 	static uint32_t stats[256];
 	const struct statistic *stat;
 	char oid[32];
-	int ifaceno, len;
+	size_t len;
+	int ifaceno;
 
 	if (sscanf(iface, "iwi%u", &ifaceno) != 1)
 		errx(EX_DATAERR, "Invalid interface name '%s'", iface);
 
-	len = sizeof stats;
-	(void)snprintf(oid, sizeof oid, "dev.iwi.%u.stats", ifaceno);
+	len = sizeof(stats);
+	(void)snprintf(oid, sizeof(oid), "dev.iwi.%u.stats", ifaceno);
 	if (sysctlbyname(oid, stats, &len, NULL, 0) == -1)
 		err(EX_OSERR, "Can't retrieve statistics");
 
 	for (stat = tbl; stat->index != -1; stat++)
-		(void)printf("%-60s[%lu]\n", stat->desc, stats[stat->index]);
+		(void)printf("%-60s[%u]\n", stat->desc, stats[stat->index]);
 }

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Apr 16 10:58:25 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CC5CA1065673;
	Sat, 16 Apr 2011 10:58:25 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A1C708FC19;
	Sat, 16 Apr 2011 10:58:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3GAwPYE002448;
	Sat, 16 Apr 2011 10:58:25 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3GAwPF8002445;
	Sat, 16 Apr 2011 10:58:25 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201104161058.p3GAwPF8002445@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 16 Apr 2011 10:58:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220706 - stable/7/tools/test/malloc
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 16 Apr 2011 10:58:25 -0000

Author: brucec
Date: Sat Apr 16 10:58:25 2011
New Revision: 220706
URL: http://svn.freebsd.org/changeset/base/220706

Log:
  MFC r219511:
  
  Fix warnings and style(9) issues.
  Set WARNS to 6.

Modified:
  stable/7/tools/test/malloc/Makefile
  stable/7/tools/test/malloc/main.c
Directory Properties:
  stable/7/tools/test/malloc/   (props changed)

Modified: stable/7/tools/test/malloc/Makefile
==============================================================================
--- stable/7/tools/test/malloc/Makefile	Sat Apr 16 10:57:11 2011	(r220705)
+++ stable/7/tools/test/malloc/Makefile	Sat Apr 16 10:58:25 2011	(r220706)
@@ -4,6 +4,7 @@ SRCS=	main.c
 .PATH:	${.CURDIR}/../../../lib/libc/stdlib
 
 NO_MAN=
+WARNS?=6
 
 test:	malloc
 	@echo

Modified: stable/7/tools/test/malloc/main.c
==============================================================================
--- stable/7/tools/test/malloc/main.c	Sat Apr 16 10:57:11 2011	(r220705)
+++ stable/7/tools/test/malloc/main.c	Sat Apr 16 10:58:25 2011	(r220706)
@@ -1,6 +1,7 @@
 /* $FreeBSD$ */
 #include 
 #include 
+#include 
 #include 
 
 u_long NBUCKETS		= 2000;
@@ -12,25 +13,25 @@ char **foo;
 int
 main(int argc, char **argv) 
 {
-    int i,j,k;
+    u_long i,j,k;
     
     if (argc > 1) NOPS     = strtoul(argv[1],0,0);
     if (argc > 2) NBUCKETS = strtoul(argv[2],0,0);
     if (argc > 3) NSIZE	   = strtoul(argv[3],0,0);
-    printf("BRK(0)=%x ",sbrk(0));
-    foo = malloc (sizeof *foo * NBUCKETS);
-    memset(foo,0,sizeof *foo * NBUCKETS);
+    printf("BRK(0)=%p ", sbrk(0));
+    foo = malloc(sizeof(*foo) * NBUCKETS);
+    memset(foo, 0, sizeof(*foo) * NBUCKETS);
     for (i = 1; i <= 4096; i *= 2) {
-        for (j = 0 ; j < 40960/i && j < NBUCKETS; j++) {
+        for (j = 0; j < 40960/i && j < NBUCKETS; j++) {
 	    foo[j] = malloc(i);
         }
-        for (j = 0 ; j < 40960/i && j < NBUCKETS; j++) {
+        for (j = 0; j < 40960/i && j < NBUCKETS; j++) {
 	    free(foo[j]);
-	    foo[j] = 0;
+	    foo[j] = NULL;
         }
     }
 
-    for (i = 0 ; i < NOPS ; i++) {
+    for (i = 0; i < NOPS; i++) {
 	j = random() % NBUCKETS;
 	k = random() % NSIZE;
 	foo[j] = realloc(foo[j], k & 1 ? 0 : k);
@@ -39,19 +40,19 @@ main(int argc, char **argv) 
 		 * Workaround because realloc return bogus pointer rather than
 		 * NULL if passed zero length.
 		 */
-		foo[j] = 0;
+		foo[j] = NULL;
 	}
 	if (foo[j])
 	    foo[j][0] = 1;
     }
-    printf("BRK(1)=%x ",sbrk(0));
-    for (j = 0 ; j < NBUCKETS ; j++) {
+    printf("BRK(1)=%p ", sbrk(0));
+    for (j = 0; j < NBUCKETS; j++) {
 	if (foo[j]) {
 	    free(foo[j]);
-	    foo[j] = 0;
+	    foo[j] = NULL;
 	}
     }
-    printf("BRK(2)=%x NOPS=%lu NBUCKETS=%lu NSIZE=%lu\n",
-	sbrk(0),NOPS,NBUCKETS,NSIZE);
+    printf("BRK(2)=%p NOPS=%lu NBUCKETS=%lu NSIZE=%lu\n",
+	sbrk(0), NOPS, NBUCKETS, NSIZE);
     return 0;
 }

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Apr 16 11:01:36 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5582B106566B;
	Sat, 16 Apr 2011 11:01:36 +0000 (UTC)
	(envelope-from brucec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 449F08FC15;
	Sat, 16 Apr 2011 11:01:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3GB1aR0002606;
	Sat, 16 Apr 2011 11:01:36 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3GB1akm002603;
	Sat, 16 Apr 2011 11:01:36 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201104161101.p3GB1akm002603@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 16 Apr 2011 11:01:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r220707 - stable/7/tools/tools/aac
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 16 Apr 2011 11:01:36 -0000

Author: brucec
Date: Sat Apr 16 11:01:35 2011
New Revision: 220707
URL: http://svn.freebsd.org/changeset/base/220707

Log:
  MFC r219522:
  
  Fix warnings and set WARNS to 6.

Modified:
  stable/7/tools/tools/aac/Makefile
  stable/7/tools/tools/aac/aac_checkq.c
Directory Properties:
  stable/7/tools/tools/aac/   (props changed)

Modified: stable/7/tools/tools/aac/Makefile
==============================================================================
--- stable/7/tools/tools/aac/Makefile	Sat Apr 16 10:58:25 2011	(r220706)
+++ stable/7/tools/tools/aac/Makefile	Sat Apr 16 11:01:35 2011	(r220707)
@@ -2,6 +2,7 @@
 
 PROG=	aac_checkq
 NO_MAN=
+WARNS?=6
 BINDIR?=/usr/local/bin
 
 .include 

Modified: stable/7/tools/tools/aac/aac_checkq.c
==============================================================================
--- stable/7/tools/tools/aac/aac_checkq.c	Sat Apr 16 10:58:25 2011	(r220706)
+++ stable/7/tools/tools/aac/aac_checkq.c	Sat Apr 16 11:01:35 2011	(r220707)
@@ -34,7 +34,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
+
+void usage(void);
 
 /*
  * Simple program to print out the queue stats on the given queue index.