CVS commit: src/sys/arch/usermode/usermode

2012-07-24 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Jul 24 13:59:26 UTC 2012

Modified Files:
src/sys/arch/usermode/usermode: pmap.c

Log Message:
Adding an assert that checks for struct pmap_l2 not being bigger than
PAGE_SIZE.

While here, also add possible bug allerts of temporary mmaps that might screw
up memory.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/usermode/usermode/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.103 src/sys/arch/usermode/usermode/pmap.c:1.104
--- src/sys/arch/usermode/usermode/pmap.c:1.103	Fri Mar  2 16:56:32 2012
+++ src/sys/arch/usermode/usermode/pmap.c	Tue Jul 24 13:59:26 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.103 2012/03/02 16:56:32 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.104 2012/07/24 13:59:26 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.103 2012/03/02 16:56:32 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.104 2012/07/24 13:59:26 reinoud Exp $");
 
 #include "opt_memsize.h"
 #include "opt_kmempages.h"
@@ -204,6 +204,9 @@ pmap_bootstrap(void)
 	if (TRAPSTACKSIZE < 4*PAGE_SIZE) {
 		panic("TRAPSTACKSIZE is too small, please increase UPAGES");
 	}
+	if (sizeof(struct pmap_l2) > PAGE_SIZE) {
+		panic("struct pmap_l2 bigger than one page?\n");
+	}
 
 	/* protect user memory UVM area (---) */
 	err = thunk_munmap((void *) kmem_user_start,
@@ -1202,6 +1205,7 @@ pmap_zero_page(paddr_t pa)
 	if (pa & (PAGE_SIZE-1))
 		panic("%s: unaligned address passed : %p\n", __func__, (void *) pa);
 
+	/* XXX bug alart: can we allow the kernel to make a decision on this? */
 	blob = thunk_mmap(NULL, PAGE_SIZE,
 		THUNK_PROT_READ | THUNK_PROT_WRITE,
 		THUNK_MAP_FILE | THUNK_MAP_SHARED,
@@ -1227,6 +1231,7 @@ pmap_copy_page(paddr_t src_pa, paddr_t d
 	thunk_printf_debug("pmap_copy_page: pa src %p, pa dst %p\n",
 		(void *) src_pa, (void *) dst_pa);
 
+	/* XXX bug alart: can we allow the kernel to make a decision on this? */
 	sblob = thunk_mmap(NULL, PAGE_SIZE,
 		THUNK_PROT_READ,
 		THUNK_MAP_FILE | THUNK_MAP_SHARED,
@@ -1234,6 +1239,7 @@ pmap_copy_page(paddr_t src_pa, paddr_t d
 	if (!sblob)
 		panic("%s: couldn't get src mapping", __func__);
 
+	/* XXX bug alart: can we allow the kernel to make a decision on this? */
 	dblob = thunk_mmap(NULL, PAGE_SIZE,
 		THUNK_PROT_READ | THUNK_PROT_WRITE,
 		THUNK_MAP_FILE | THUNK_MAP_SHARED,



CVS commit: src/distrib/sets/lists/xserver

2012-07-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jul 24 17:40:06 UTC 2012

Modified Files:
src/distrib/sets/lists/xserver: md.amd64 md.i386

Log Message:
+xgi.0


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/distrib/sets/lists/xserver/md.amd64
cvs rdiff -u -r1.83 -r1.84 src/distrib/sets/lists/xserver/md.i386

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xserver/md.amd64
diff -u src/distrib/sets/lists/xserver/md.amd64:1.64 src/distrib/sets/lists/xserver/md.amd64:1.65
--- src/distrib/sets/lists/xserver/md.amd64:1.64	Thu Jul 19 19:30:38 2012
+++ src/distrib/sets/lists/xserver/md.amd64	Tue Jul 24 17:40:05 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.64 2012/07/19 19:30:38 macallan Exp $
+# $NetBSD: md.amd64,v 1.65 2012/07/24 17:40:05 njoly Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -659,6 +659,7 @@
 ./usr/X11R7/man/cat4/void.0-unknown-	obsolete
 ./usr/X11R7/man/cat4/ws.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/wsfb.0-unknown-	.cat,xorg
+./usr/X11R7/man/cat4/xgi.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat5/xorg.conf.0			-unknown-	.cat,xorg
 ./usr/X11R7/man/html1/Xorg.html-unknown-	html,xorg
 ./usr/X11R7/man/html1/cvt.html-unknown-	html,xorg

Index: src/distrib/sets/lists/xserver/md.i386
diff -u src/distrib/sets/lists/xserver/md.i386:1.83 src/distrib/sets/lists/xserver/md.i386:1.84
--- src/distrib/sets/lists/xserver/md.i386:1.83	Thu Jul 19 19:30:38 2012
+++ src/distrib/sets/lists/xserver/md.i386	Tue Jul 24 17:40:06 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.83 2012/07/19 19:30:38 macallan Exp $
+# $NetBSD: md.i386,v 1.84 2012/07/24 17:40:06 njoly Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -749,6 +749,7 @@
 ./usr/X11R7/man/cat4/void.0-unknown-	obsolete
 ./usr/X11R7/man/cat4/ws.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat4/wsfb.0-unknown-	.cat,xorg
+./usr/X11R7/man/cat4/xgi.0-unknown-	.cat,xorg
 ./usr/X11R7/man/cat5/xorg.conf.0			-unknown-	.cat,xorg
 ./usr/X11R7/man/html1/Xorg.html-unknown-	html,xorg
 ./usr/X11R7/man/html1/cvt.html-unknown-	html,xorg



CVS commit: src/distrib/sets/lists/xcomp

2012-07-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jul 24 17:41:50 UTC 2012

Modified Files:
src/distrib/sets/lists/xcomp: md.amd64 md.i386

Log Message:
+libxgi_drv.so.1.debug


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/distrib/sets/lists/xcomp/md.amd64
cvs rdiff -u -r1.39 -r1.40 src/distrib/sets/lists/xcomp/md.i386

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xcomp/md.amd64
diff -u src/distrib/sets/lists/xcomp/md.amd64:1.32 src/distrib/sets/lists/xcomp/md.amd64:1.33
--- src/distrib/sets/lists/xcomp/md.amd64:1.32	Wed Aug  3 01:43:25 2011
+++ src/distrib/sets/lists/xcomp/md.amd64	Tue Jul 24 17:41:50 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.32 2011/08/03 01:43:25 mrg Exp $
+# $NetBSD: md.amd64,v 1.33 2012/07/24 17:41:50 njoly Exp $
 ./usr/X11R6/include/xf86Optrec.h			-unknown-	x11
 ./usr/X11R6/include/xf86Parser.h			-unknown-	x11
 ./usr/X11R6/man/cat3/XF86VidMode.0			-unknown-	.cat,x11
@@ -175,6 +175,7 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libvoid_drv.so.1.debug	-unknown-		obsolete
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libws_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libwsfb_drv.so.0.debug	-unknown-		xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libxgi_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdbe.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri2.so.0.debug	-unknown-		xorg,debug

Index: src/distrib/sets/lists/xcomp/md.i386
diff -u src/distrib/sets/lists/xcomp/md.i386:1.39 src/distrib/sets/lists/xcomp/md.i386:1.40
--- src/distrib/sets/lists/xcomp/md.i386:1.39	Wed Aug  3 01:43:25 2011
+++ src/distrib/sets/lists/xcomp/md.i386	Tue Jul 24 17:41:50 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.39 2011/08/03 01:43:25 mrg Exp $
+# $NetBSD: md.i386,v 1.40 2012/07/24 17:41:50 njoly Exp $
 ./usr/X11R6/include/xf86Optrec.h			-unknown-	x11
 ./usr/X11R6/include/xf86Parser.h			-unknown-	x11
 ./usr/X11R6/man/cat3/XF86VidMode.0			-unknown-	.cat,x11
@@ -174,6 +174,7 @@
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libvoid_drv.so.1.debug	-unknown-		obsolete
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libws_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libwsfb_drv.so.0.debug	-unknown-		xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libxgi_drv.so.1.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdbe.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri.so.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri2.so.0.debug	-unknown-		xorg,debug



CVS commit: src/external/bsd/bind/dist

2012-07-24 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Tue Jul 24 18:06:29 UTC 2012

Modified Files:
src/external/bsd/bind/dist: CHANGES version
src/external/bsd/bind/dist/bin/tests/system/stub: tests.sh
src/external/bsd/bind/dist/lib/dns: resolver.c zone.c
src/external/bsd/bind/dist/lib/isc/include/isc: queue.h

Log Message:
Fixes for CVE-2012-3817 and CVE-2012-3868 from ISC:

--- 9.9.1-P2 released ---

3346.   [security]  Bad-cache data could be used before it was
initialized, causing an assert. [RT #30025]

3345.   [bug]   Addressed race condition when removing the last item
or inserting the first item in an ISC_QUEUE.
[RT #29539]

3342.   [bug]   Change #3314 broke saving of stub zones to disk
resulting in excessive cpu usage in some cases.
[RT #29952]


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/bind/dist/CHANGES
cvs rdiff -u -r1.1.1.11 -r1.2 src/external/bsd/bind/dist/version
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/bsd/bind/dist/bin/tests/system/stub/tests.sh
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/bind/dist/lib/dns/resolver.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/bind/dist/lib/dns/zone.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/bind/dist/lib/isc/include/isc/queue.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/bind/dist/CHANGES
diff -u src/external/bsd/bind/dist/CHANGES:1.3 src/external/bsd/bind/dist/CHANGES:1.4
--- src/external/bsd/bind/dist/CHANGES:1.3	Tue Jun  5 00:38:46 2012
+++ src/external/bsd/bind/dist/CHANGES	Tue Jul 24 18:06:28 2012
@@ -1,3 +1,16 @@
+	--- 9.9.1-P2 released ---
+
+3346.	[security]	Bad-cache data could be used before it was
+			initialized, causing an assert. [RT #30025]
+
+3345.	[bug]		Addressed race condition when removing the last item
+			or inserting the first item in an ISC_QUEUE.
+			[RT #29539]
+
+3342.	[bug]		Change #3314 broke saving of stub zones to disk
+			resulting in excessive cpu usage in some cases.
+			[RT #29952]
+
 	--- 9.9.1-P1 released ---
 
 3331.	[security]	dns_rdataslab_fromrdataset could produce bad

Index: src/external/bsd/bind/dist/version
diff -u src/external/bsd/bind/dist/version:1.1.1.11 src/external/bsd/bind/dist/version:1.2
--- src/external/bsd/bind/dist/version:1.1.1.11	Mon Jun  4 17:53:25 2012
+++ src/external/bsd/bind/dist/version	Tue Jul 24 18:06:28 2012
@@ -7,4 +7,4 @@ MAJORVER=9
 MINORVER=9
 PATCHVER=1
 RELEASETYPE=-P
-RELEASEVER=1
+RELEASEVER=2

Index: src/external/bsd/bind/dist/bin/tests/system/stub/tests.sh
diff -u src/external/bsd/bind/dist/bin/tests/system/stub/tests.sh:1.1.1.3 src/external/bsd/bind/dist/bin/tests/system/stub/tests.sh:1.2
--- src/external/bsd/bind/dist/bin/tests/system/stub/tests.sh:1.1.1.3	Mon Jun  4 17:54:37 2012
+++ src/external/bsd/bind/dist/bin/tests/system/stub/tests.sh	Tue Jul 24 18:06:28 2012
@@ -21,14 +21,24 @@ SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 status=0
+echo "I:check that the stub zone has been saved to disk"
+for i in 1 2 3 4 5 6 7 8 9 20
+do
+	[ -f ns3/child.example.st ] && break
+	sleep 1
+done
+[ -f ns3/child.example.st ] || { status=1;  echo "I:failed"; }
+
+for pass in 1 2
+do
 
-echo "I:trying an axfr that should be denied (NOTAUTH)"
+echo "I:trying an axfr that should be denied (NOTAUTH) (pass=$pass)"
 ret=0
-$DIG +tcp data.child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || ret=1
+$DIG +tcp child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || ret=1
 grep "; Transfer failed." dig.out.ns3 > /dev/null || ret=1
 [ $ret = 0 ] || { status=1;  echo "I:failed"; }
 
-echo "I:look for stub zone data without recursion (should not be found)"
+echo "I:look for stub zone data without recursion (should not be found) (pass=$pass)"
 for i in 1 2 3 4 5 6 7 8 9
 do
 	ret=0
@@ -41,11 +51,20 @@ done
 $PERL ../digcomp.pl knowngood.dig.out.norec dig.out.ns3 || ret=1
 [ $ret = 0 ] || { status=1;  echo "I:failed"; }
 
-echo "I:look for stub zone data with recursion (should be found)"
+echo "I:look for stub zone data with recursion (should be found) (pass=$pass)"
 ret=0
 $DIG +tcp data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 || ret=1
 $PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3 || ret=1
 [ $ret = 0 ] || { status=1;  echo "I:failed"; }
 
+[ $pass = 1 ] && {
+	echo "I:stopping stub server"
+	$PERL $SYSTEMTESTTOP/stop.pl . ns3
+
+	echo "I:re-starting stub server"
+	$PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns3
+}
+done
+
 echo "I:exit status: $status"
 exit $status

Index: src/external/bsd/bind/dist/lib/dns/resolver.c
diff -u src/external/bsd/bind/dist/lib/dns/resolver.c:1.12 src/external/bsd/bind/dist/lib/dns/resolver.c:1.13
--- src/external/bsd/bind/dist/lib/dns/resolver.c:1.12	Tue Jun  5 00:41:39 2012
+++ src/external/bsd/bind/di

CVS commit: src/external/bsd/bind/dist

2012-07-24 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Tue Jul 24 20:00:45 UTC 2012

Modified Files:
src/external/bsd/bind/dist: CHANGES
src/external/bsd/bind/dist/lib/dns: resolver.c
src/external/bsd/bind/dist/lib/isc/include/isc: queue.h

Log Message:
the patch for CVE-2012-3868 was incomplete


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/bind/dist/CHANGES
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/bind/dist/lib/dns/resolver.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/bind/dist/lib/isc/include/isc/queue.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/bind/dist/CHANGES
diff -u src/external/bsd/bind/dist/CHANGES:1.4 src/external/bsd/bind/dist/CHANGES:1.5
--- src/external/bsd/bind/dist/CHANGES:1.4	Tue Jul 24 18:06:28 2012
+++ src/external/bsd/bind/dist/CHANGES	Tue Jul 24 20:00:44 2012
@@ -1,5 +1,7 @@
 	--- 9.9.1-P2 released ---
 
+3349.	[bug]		Change #3345 was incomplete. [RT #30233]
+
 3346.	[security]	Bad-cache data could be used before it was
 			initialized, causing an assert. [RT #30025]
 

Index: src/external/bsd/bind/dist/lib/dns/resolver.c
diff -u src/external/bsd/bind/dist/lib/dns/resolver.c:1.13 src/external/bsd/bind/dist/lib/dns/resolver.c:1.14
--- src/external/bsd/bind/dist/lib/dns/resolver.c:1.13	Tue Jul 24 18:06:28 2012
+++ src/external/bsd/bind/dist/lib/dns/resolver.c	Tue Jul 24 20:00:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: resolver.c,v 1.13 2012/07/24 18:06:28 spz Exp $	*/
+/*	$NetBSD: resolver.c,v 1.14 2012/07/24 20:00:45 spz Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. ("ISC")
@@ -8465,7 +8465,7 @@ dns_resolver_addbadcache(dns_resolver_t 
 		resolver->badhash > DNS_BADCACHE_SIZE)
 			resizehash(resolver, &now, ISC_FALSE);
 	} else
-	bad->expire = *expire;
+		bad->expire = *expire;
  cleanup:
 	UNLOCK(&resolver->lock);
 }

Index: src/external/bsd/bind/dist/lib/isc/include/isc/queue.h
diff -u src/external/bsd/bind/dist/lib/isc/include/isc/queue.h:1.2 src/external/bsd/bind/dist/lib/isc/include/isc/queue.h:1.3
--- src/external/bsd/bind/dist/lib/isc/include/isc/queue.h:1.2	Tue Jul 24 18:06:29 2012
+++ src/external/bsd/bind/dist/lib/isc/include/isc/queue.h	Tue Jul 24 20:00:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: queue.h,v 1.2 2012/07/24 18:06:29 spz Exp $	*/
+/*	$NetBSD: queue.h,v 1.3 2012/07/24 20:00:45 spz Exp $	*/
 
 /*
  * Copyright (C) 2011, 2012  Internet Systems Consortium, Inc. ("ISC")
@@ -103,15 +103,15 @@
 		} \
 		LOCK(&(queue).taillock); \
 		if ((queue).tail == NULL && !headlocked) { \
-		UNLOCK(&(queue).taillock); \
+			UNLOCK(&(queue).taillock); \
 			LOCK(&(queue).headlock); \
 			LOCK(&(queue).taillock); \
 			headlocked = ISC_TRUE; \
 		} \
-		if ((queue).tail != NULL) \
-			(queue).tail->link.next = (elt); \
 		(elt)->link.prev = (queue).tail; \
 		(elt)->link.next = NULL; \
+		if ((queue).tail != NULL) \
+			(queue).tail->link.next = (elt); \
 		(queue).tail = (elt); \
 		UNLOCK(&(queue).taillock); \
 		if (headlocked) { \
@@ -130,10 +130,10 @@
 LOCK(&(queue).taillock); \
 if (ret->link.next == NULL) { \
 	(queue).head = (queue).tail = NULL; \
-UNLOCK(&(queue).taillock); \
+	UNLOCK(&(queue).taillock); \
 	break; \
 			} \
-UNLOCK(&(queue).taillock); \
+			UNLOCK(&(queue).taillock); \
 		} \
 			(queue).head = ret->link.next; \
 			(queue).head->link.prev = NULL; \



CVS commit: [netbsd-4] src/dist/bind

2012-07-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jul 24 20:38:40 UTC 2012

Modified Files:
src/dist/bind [netbsd-4]: CHANGES version
src/dist/bind/bin/tests/system/stub [netbsd-4]: tests.sh
src/dist/bind/lib/dns [netbsd-4]: resolver.c zone.c
src/dist/bind/lib/isc [netbsd-4]: random.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1455):
dist/bind/CHANGES
dist/bind/version
dist/bind/bin/tests/system/stub/tests.sh
dist/bind/lib/dns/resolver.c
dist/bind/lib/dns/zone.c
dist/bind/lib/isc/random.c

Address "Heavy DNSSEC validation load can cause a "bad cache" assertion
failure in bind" vulnerability.

It was generated out of the 9.6-ESV-R7-P1 patch from ISC


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4.4.9 -r1.1.1.4.4.10 src/dist/bind/CHANGES \
src/dist/bind/version
cvs rdiff -u -r1.1.1.3.4.1 -r1.1.1.3.4.2 \
src/dist/bind/bin/tests/system/stub/tests.sh
cvs rdiff -u -r1.2.2.7 -r1.2.2.8 src/dist/bind/lib/dns/resolver.c
cvs rdiff -u -r1.1.1.4.4.3 -r1.1.1.4.4.4 src/dist/bind/lib/dns/zone.c
cvs rdiff -u -r1.1.1.3.4.2 -r1.1.1.3.4.3 src/dist/bind/lib/isc/random.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/dist/bind/CHANGES
diff -u src/dist/bind/CHANGES:1.1.1.4.4.9 src/dist/bind/CHANGES:1.1.1.4.4.10
--- src/dist/bind/CHANGES:1.1.1.4.4.9	Tue Jun  5 20:01:02 2012
+++ src/dist/bind/CHANGES	Tue Jul 24 20:38:38 2012
@@ -1,3 +1,14 @@
+--- 9.4-ESV-R4-P2nb1: added patches from 9.6-ESV-R7-P2 ---
+
+3346.	[security]	Bad-cache data could be used before it was
+			initialized, causing an assert. [RT #30025]
+
+3343.	[bug]		Relax isc_random_jitter() REQUIRE tests. [RT #29821]
+
+3342.	[bug]		Change #3314 broke saving of stub zones to disk
+			resulting in excessive cpu usage in some cases.
+			[RT #29952]
+
 	--- 9.4-ESV-R4-P2 released ---
 
 3331.	[security]	dns_rdataslab_fromrdataset could produce bad
Index: src/dist/bind/version
diff -u src/dist/bind/version:1.1.1.4.4.9 src/dist/bind/version:1.1.1.4.4.10
--- src/dist/bind/version:1.1.1.4.4.9	Tue Jun  5 20:01:02 2012
+++ src/dist/bind/version	Tue Jul 24 20:38:38 2012
@@ -1,4 +1,4 @@
-# $Id: version,v 1.1.1.4.4.9 2012/06/05 20:01:02 bouyer Exp $
+# $Id: version,v 1.1.1.4.4.10 2012/07/24 20:38:38 riz Exp $
 #
 # This file must follow /bin/sh rules.  It is imported directly via
 # configure.
@@ -7,4 +7,4 @@ MAJORVER=9
 MINORVER=4
 PATCHVER=
 RELEASETYPE=-ESV
-RELEASEVER=-R4-P2
+RELEASEVER=-R4-P2nb1

Index: src/dist/bind/bin/tests/system/stub/tests.sh
diff -u src/dist/bind/bin/tests/system/stub/tests.sh:1.1.1.3.4.1 src/dist/bind/bin/tests/system/stub/tests.sh:1.1.1.3.4.2
--- src/dist/bind/bin/tests/system/stub/tests.sh:1.1.1.3.4.1	Thu May 17 00:36:53 2007
+++ src/dist/bind/bin/tests/system/stub/tests.sh	Tue Jul 24 20:38:39 2012
@@ -21,19 +21,38 @@ SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 status=0
+echo "I:check that the stub zone has been saved to disk"
+for i in 1 2 3 4 5 6 7 8 9 20
+do
+	[ -f ns3/child.example.st ] && break
+	sleep 1
+done
+[ -f ns3/child.example.st ] || { status=1;  echo "I:failed"; }
 
-echo "I:trying an axfr that should be denied (NOTAUTH)"
-$DIG +tcp data.child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1
+for pass in 1 2
+do
+
+echo "I:trying an axfr that should be denied (NOTAUTH) (pass=$pass)"
+$DIG +tcp child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1
 grep "; Transfer failed." dig.out.ns3 > /dev/null || status=1
 
-echo "I:look for stub zone data without recursion (should not be found)"
+echo "I:look for stub zone data without recursion (should not be found) (pass=$pass)"
 $DIG +tcp +norec data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 \
 	|| status=1
 $PERL ../digcomp.pl knowngood.dig.out.norec dig.out.ns3 || status=1
 
-echo "I:look for stub zone data with recursion (should be found)"
+echo "I:look for stub zone data with recursion (should be found) (pass=$pass)"
 $DIG +tcp data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 || status=1
 $PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3 || status=1
 
+[ $pass = 1 ] && {
+	echo "I:stopping stub server"
+	$PERL $SYSTEMTESTTOP/stop.pl . ns3
+
+	echo "I:re-starting stub server"
+	$PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns3
+}
+done
+
 echo "I:exit status: $status"
 exit $status

Index: src/dist/bind/lib/dns/resolver.c
diff -u src/dist/bind/lib/dns/resolver.c:1.2.2.7 src/dist/bind/lib/dns/resolver.c:1.2.2.8
--- src/dist/bind/lib/dns/resolver.c:1.2.2.7	Sat Jul 16 00:45:38 2011
+++ src/dist/bind/lib/dns/resolver.c	Tue Jul 24 20:38:39 2012
@@ -1,4 +1,4 @@
-/*$NetBSD: resolver.c,v 1.2.2.7 2011/07/16 00:45:38 riz Exp $  */
+/*$NetBSD: resolver.c,v 1.2.2.8 2012/07/24 20:38:39 riz Exp $  */
 
 /*
  * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
@@ -7625,6 +7625,7 @@ dns_resolver_addbadcache(dns_resolver_t 
 		}
 	

CVS commit: [netbsd-4] src/doc

2012-07-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jul 24 20:40:48 UTC 2012

Modified Files:
src/doc [netbsd-4]: CHANGES-4.1

Log Message:
Ticket 1455


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.244 -r1.1.2.245 src/doc/CHANGES-4.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-4.1
diff -u src/doc/CHANGES-4.1:1.1.2.244 src/doc/CHANGES-4.1:1.1.2.245
--- src/doc/CHANGES-4.1:1.1.2.244	Fri Jun 15 09:04:49 2012
+++ src/doc/CHANGES-4.1	Tue Jul 24 20:40:47 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.244 2012/06/15 09:04:49 sborrill Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.245 2012/07/24 20:40:47 riz Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4675,3 +4675,13 @@ bin/rm/rm.c	1.52
 	effects.
 	[dholland, ticket #1451]
 
+dist/bind/CHANGESpatch
+dist/bind/versionpatch
+dist/bind/bin/tests/system/stub/tests.sh	patch
+dist/bind/lib/dns/resolver.c			patch
+dist/bind/lib/dns/zone.c			patch
+dist/bind/lib/isc/random.c			patch
+
+	Address bind CVE-2012-3817.
+	[spz, ticket #1455]
+



CVS commit: [netbsd-4-0] src/dist/bind

2012-07-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jul 24 20:41:16 UTC 2012

Modified Files:
src/dist/bind [netbsd-4-0]: CHANGES version
src/dist/bind/bin/tests/system/stub [netbsd-4-0]: tests.sh
src/dist/bind/lib/dns [netbsd-4-0]: resolver.c zone.c
src/dist/bind/lib/isc [netbsd-4-0]: random.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1455):
dist/bind/CHANGES
dist/bind/version
dist/bind/bin/tests/system/stub/tests.sh
dist/bind/lib/dns/resolver.c
dist/bind/lib/dns/zone.c
dist/bind/lib/isc/random.c

Address "Heavy DNSSEC validation load can cause a "bad cache" assertion
failure in bind" vulnerability.

It was generated out of the 9.6-ESV-R7-P1 patch from ISC


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4.4.2.2.7 -r1.1.1.4.4.2.2.8 src/dist/bind/CHANGES
cvs rdiff -u -r1.1.1.4.4.3.2.6 -r1.1.1.4.4.3.2.7 src/dist/bind/version
cvs rdiff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.2.1 \
src/dist/bind/bin/tests/system/stub/tests.sh
cvs rdiff -u -r1.2.2.2.2.5 -r1.2.2.2.2.6 src/dist/bind/lib/dns/resolver.c
cvs rdiff -u -r1.1.1.4.4.1.2.2 -r1.1.1.4.4.1.2.3 src/dist/bind/lib/dns/zone.c
cvs rdiff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.2 \
src/dist/bind/lib/isc/random.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/dist/bind/CHANGES
diff -u src/dist/bind/CHANGES:1.1.1.4.4.2.2.7 src/dist/bind/CHANGES:1.1.1.4.4.2.2.8
--- src/dist/bind/CHANGES:1.1.1.4.4.2.2.7	Tue Jun  5 20:01:31 2012
+++ src/dist/bind/CHANGES	Tue Jul 24 20:41:15 2012
@@ -1,3 +1,14 @@
+--- 9.4-ESV-R4-P2nb1: added patches from 9.6-ESV-R7-P2 ---
+
+3346.	[security]	Bad-cache data could be used before it was
+			initialized, causing an assert. [RT #30025]
+
+3343.	[bug]		Relax isc_random_jitter() REQUIRE tests. [RT #29821]
+
+3342.	[bug]		Change #3314 broke saving of stub zones to disk
+			resulting in excessive cpu usage in some cases.
+			[RT #29952]
+
 	--- 9.4-ESV-R4-P2 released ---
 
 3331.	[security]	dns_rdataslab_fromrdataset could produce bad

Index: src/dist/bind/version
diff -u src/dist/bind/version:1.1.1.4.4.3.2.6 src/dist/bind/version:1.1.1.4.4.3.2.7
--- src/dist/bind/version:1.1.1.4.4.3.2.6	Tue Jun  5 20:01:32 2012
+++ src/dist/bind/version	Tue Jul 24 20:41:15 2012
@@ -1,4 +1,4 @@
-# $Id: version,v 1.1.1.4.4.3.2.6 2012/06/05 20:01:32 bouyer Exp $
+# $Id: version,v 1.1.1.4.4.3.2.7 2012/07/24 20:41:15 riz Exp $
 #
 # This file must follow /bin/sh rules.  It is imported directly via
 # configure.
@@ -7,4 +7,4 @@ MAJORVER=9
 MINORVER=4
 PATCHVER=
 RELEASETYPE=-ESV
-RELEASEVER=-R4-P2
+RELEASEVER=-R4-P2nb1

Index: src/dist/bind/bin/tests/system/stub/tests.sh
diff -u src/dist/bind/bin/tests/system/stub/tests.sh:1.1.1.3.4.1 src/dist/bind/bin/tests/system/stub/tests.sh:1.1.1.3.4.1.2.1
--- src/dist/bind/bin/tests/system/stub/tests.sh:1.1.1.3.4.1	Thu May 17 00:36:53 2007
+++ src/dist/bind/bin/tests/system/stub/tests.sh	Tue Jul 24 20:41:15 2012
@@ -21,19 +21,38 @@ SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 status=0
+echo "I:check that the stub zone has been saved to disk"
+for i in 1 2 3 4 5 6 7 8 9 20
+do
+	[ -f ns3/child.example.st ] && break
+	sleep 1
+done
+[ -f ns3/child.example.st ] || { status=1;  echo "I:failed"; }
 
-echo "I:trying an axfr that should be denied (NOTAUTH)"
-$DIG +tcp data.child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1
+for pass in 1 2
+do
+
+echo "I:trying an axfr that should be denied (NOTAUTH) (pass=$pass)"
+$DIG +tcp child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1
 grep "; Transfer failed." dig.out.ns3 > /dev/null || status=1
 
-echo "I:look for stub zone data without recursion (should not be found)"
+echo "I:look for stub zone data without recursion (should not be found) (pass=$pass)"
 $DIG +tcp +norec data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 \
 	|| status=1
 $PERL ../digcomp.pl knowngood.dig.out.norec dig.out.ns3 || status=1
 
-echo "I:look for stub zone data with recursion (should be found)"
+echo "I:look for stub zone data with recursion (should be found) (pass=$pass)"
 $DIG +tcp data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 || status=1
 $PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3 || status=1
 
+[ $pass = 1 ] && {
+	echo "I:stopping stub server"
+	$PERL $SYSTEMTESTTOP/stop.pl . ns3
+
+	echo "I:re-starting stub server"
+	$PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns3
+}
+done
+
 echo "I:exit status: $status"
 exit $status

Index: src/dist/bind/lib/dns/resolver.c
diff -u src/dist/bind/lib/dns/resolver.c:1.2.2.2.2.5 src/dist/bind/lib/dns/resolver.c:1.2.2.2.2.6
--- src/dist/bind/lib/dns/resolver.c:1.2.2.2.2.5	Sat Jul 16 00:44:45 2011
+++ src/dist/bind/lib/dns/resolver.c	Tue Jul 24 20:41:16 2012
@@ -1,4 +1,4 @@
-/*$NetBSD: resolver.c,v 1.2.2.2.2.5 2011/07/16 00:44:45 riz Exp $  */
+/*$NetBSD: resolver.c,v 1.2.2.2.2.6 2012/07/24 20:41:16 riz Exp $  */
 

CVS commit: [netbsd-4-0] src/doc

2012-07-24 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jul 24 20:42:02 UTC 2012

Modified Files:
src/doc [netbsd-4-0]: CHANGES-4.0.2

Log Message:
TIcket 1455


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.103 -r1.1.2.104 src/doc/CHANGES-4.0.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-4.0.2
diff -u src/doc/CHANGES-4.0.2:1.1.2.103 src/doc/CHANGES-4.0.2:1.1.2.104
--- src/doc/CHANGES-4.0.2:1.1.2.103	Tue Jun 12 23:22:46 2012
+++ src/doc/CHANGES-4.0.2	Tue Jul 24 20:42:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.0.2,v 1.1.2.103 2012/06/12 23:22:46 riz Exp $
+#	$NetBSD: CHANGES-4.0.2,v 1.1.2.104 2012/07/24 20:42:02 riz Exp $
 
 A complete list of changes from the NetBSD 4.0.1 release to the NetBSD 4.0.2
 release:
@@ -1392,3 +1392,13 @@ sys/arch/amd64/amd64/netbsd32_machdep.c	
 	now instead of trying to jump to the bogus address.
 	[spz, ticket #1450]
 
+dist/bind/CHANGESpatch
+dist/bind/versionpatch
+dist/bind/bin/tests/system/stub/tests.sh	patch
+dist/bind/lib/dns/resolver.c			patch
+dist/bind/lib/dns/zone.c			patch
+dist/bind/lib/isc/random.c			patch
+
+	Address bind CVE-2012-3817.
+	[spz, ticket #1455]
+



CVS commit: src/distrib/evbppc/ramdisk

2012-07-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jul 24 20:50:14 UTC 2012

Modified Files:
src/distrib/evbppc/ramdisk: Makefile list

Log Message:
Add dkctl / drvctl support.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/evbppc/ramdisk/Makefile
cvs rdiff -u -r1.19 -r1.20 src/distrib/evbppc/ramdisk/list

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/evbppc/ramdisk/Makefile
diff -u src/distrib/evbppc/ramdisk/Makefile:1.13 src/distrib/evbppc/ramdisk/Makefile:1.14
--- src/distrib/evbppc/ramdisk/Makefile:1.13	Mon Jul 23 04:25:03 2012
+++ src/distrib/evbppc/ramdisk/Makefile	Tue Jul 24 20:50:14 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2012/07/23 04:25:03 matt Exp $
+#	$NetBSD: Makefile,v 1.14 2012/07/24 20:50:14 matt Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -23,7 +23,7 @@ IMAGEDEPENDS=	${CRUNCHBIN} \
 		${DISTRIBDIR}/common/services
 MAKEDEVTARGETS=	std md0 wd0 wd1 wd2 wd3 cd0 cd1 sd0 sd1 sd2 sd3 st0 pty0
 MAKEDEVTARGETS+= ld0 ld1
-MAKEDEVTARGETS+= dk0 dk1 dk2 dk3
+MAKEDEVTARGETS+= drvctl dk0 dk1 dk2 dk3
 MAKEDEVTARGETS+= flash0 flash1 flash2 flash3 flash4 flash5 flash6 flash7
 
 # Use stubs to eliminate some large stuff from libc

Index: src/distrib/evbppc/ramdisk/list
diff -u src/distrib/evbppc/ramdisk/list:1.19 src/distrib/evbppc/ramdisk/list:1.20
--- src/distrib/evbppc/ramdisk/list:1.19	Fri Jul 20 11:20:37 2012
+++ src/distrib/evbppc/ramdisk/list	Tue Jul 24 20:50:14 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.19 2012/07/20 11:20:37 matt Exp $
+#	$NetBSD: list,v 1.20 2012/07/24 20:50:14 matt Exp $
 
 SRCDIRS	bin sbin usr.bin usr.sbin
 
@@ -26,6 +26,7 @@ PROG	bin/sync
 
 PROG	sbin/chown	bin/chgrp
 PROG	sbin/disklabel
+PROG	sbin/dkctl
 PROG	sbin/dmesg
 PROG	sbin/fdisk
 PROG	sbin/fsck



CVS commit: src/sys/arch/evbppc/conf

2012-07-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jul 24 22:37:08 UTC 2012

Modified Files:
src/sys/arch/evbppc/conf: MPC8536DS MPC8548CDS P2020DS RB800 TWRP1025

Log Message:
Add drvctl


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbppc/conf/MPC8536DS
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbppc/conf/MPC8548CDS
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbppc/conf/P2020DS
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbppc/conf/RB800
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbppc/conf/TWRP1025

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbppc/conf/MPC8536DS
diff -u src/sys/arch/evbppc/conf/MPC8536DS:1.12 src/sys/arch/evbppc/conf/MPC8536DS:1.13
--- src/sys/arch/evbppc/conf/MPC8536DS:1.12	Mon Jul 23 16:27:44 2012
+++ src/sys/arch/evbppc/conf/MPC8536DS	Tue Jul 24 22:37:08 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: MPC8536DS,v 1.12 2012/07/23 16:27:44 matt Exp $
+#	$NetBSD: MPC8536DS,v 1.13 2012/07/24 22:37:08 matt Exp $
 #
 #	MPC8536DS -- everything that's currently supported
 #
@@ -7,7 +7,7 @@ include		"arch/evbppc/conf/std.mpc85xx"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-ident 		"MPC8536DS-$Revision: 1.12 $"
+ident 		"MPC8536DS-$Revision: 1.13 $"
 
 maxusers	32
 
@@ -226,6 +226,7 @@ makphy* 	at mii? phy ?			# Marvell PHYs
 pseudo-device	loop			# network loopback
 pseudo-device	bpfilter		# packet filter
 pseudo-device	clockctl		# user control of clock subsystem
+pseudo-device	drvctl			# user control of disk subsystem
 pseudo-device	ksyms			# /dev/ksyms
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	kttcp			# kernel ttcp

Index: src/sys/arch/evbppc/conf/MPC8548CDS
diff -u src/sys/arch/evbppc/conf/MPC8548CDS:1.11 src/sys/arch/evbppc/conf/MPC8548CDS:1.12
--- src/sys/arch/evbppc/conf/MPC8548CDS:1.11	Mon Jul 23 16:27:44 2012
+++ src/sys/arch/evbppc/conf/MPC8548CDS	Tue Jul 24 22:37:08 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: MPC8548CDS,v 1.11 2012/07/23 16:27:44 matt Exp $
+#	$NetBSD: MPC8548CDS,v 1.12 2012/07/24 22:37:08 matt Exp $
 #
 #	MPC8548CDS -- everything that's currently supported
 #
@@ -7,7 +7,7 @@ include		"arch/evbppc/conf/std.mpc85xx"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-ident 		"MPC8548CDS-$Revision: 1.11 $"
+ident 		"MPC8548CDS-$Revision: 1.12 $"
 
 maxusers	32
 
@@ -214,6 +214,7 @@ wd*		at atabus? drive ?
 pseudo-device	loop			# network loopback
 pseudo-device	bpfilter		# packet filter
 pseudo-device	clockctl		# user control of clock subsystem
+pseudo-device	drvctl			# user control of drive subsystem
 pseudo-device	ksyms			# /dev/ksyms
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	kttcp			# kernel ttcp

Index: src/sys/arch/evbppc/conf/P2020DS
diff -u src/sys/arch/evbppc/conf/P2020DS:1.13 src/sys/arch/evbppc/conf/P2020DS:1.14
--- src/sys/arch/evbppc/conf/P2020DS:1.13	Mon Jul 23 16:27:44 2012
+++ src/sys/arch/evbppc/conf/P2020DS	Tue Jul 24 22:37:08 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: P2020DS,v 1.13 2012/07/23 16:27:44 matt Exp $
+#	$NetBSD: P2020DS,v 1.14 2012/07/24 22:37:08 matt Exp $
 #
 #	P2020DS -- everything that's currently supported
 #
@@ -8,7 +8,7 @@ include		"arch/evbppc/conf/std.mpc85xx"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-ident 		"P2020DS-$Revision: 1.13 $"
+ident 		"P2020DS-$Revision: 1.14 $"
 
 maxusers	32
 
@@ -237,6 +237,7 @@ ukphy*		at mii? phy ?			# generic unknow
 pseudo-device	loop			# network loopback
 pseudo-device	bpfilter		# packet filter
 pseudo-device	clockctl		# user control of clock subsystem
+pseudo-device	drvctl			# user control of drive subsystem
 pseudo-device	ksyms			# /dev/ksyms
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	kttcp			# kernel ttcp

Index: src/sys/arch/evbppc/conf/RB800
diff -u src/sys/arch/evbppc/conf/RB800:1.18 src/sys/arch/evbppc/conf/RB800:1.19
--- src/sys/arch/evbppc/conf/RB800:1.18	Mon Jul 23 16:27:44 2012
+++ src/sys/arch/evbppc/conf/RB800	Tue Jul 24 22:37:08 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: RB800,v 1.18 2012/07/23 16:27:44 matt Exp $
+#	$NetBSD: RB800,v 1.19 2012/07/24 22:37:08 matt Exp $
 #
 #	RB800 -- everything that's currently supported
 #
@@ -7,7 +7,7 @@ include		"arch/evbppc/conf/std.mpc85xx"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-ident 		"RB800-$Revision: 1.18 $"
+ident 		"RB800-$Revision: 1.19 $"
 
 maxusers	32
 
@@ -230,6 +230,7 @@ pseudo-device	md		1	# memory disk device
 pseudo-device	loop			# network loopback
 pseudo-device	bpfilter		# packet filter
 pseudo-device	clockctl		# user control of clock subsystem
+pseudo-device	drvctl			# user control of drive subsystem
 pseudo-device	ksyms			# /dev/ksyms
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	kttcp			# kernel ttcp

Index: src/sys/arch/evbppc/conf/TWRP1025
diff -u src/sys/arch/evbppc/conf/TWRP1025:1.5 src/sys/arch/evbppc/conf/TWRP1025:1.6
--- src/sys/arch/evbppc/conf/TWRP1025:1.5	Sun Ju

CVS commit: src/sbin/gpt

2012-07-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jul 25 01:07:49 UTC 2012

Modified Files:
src/sbin/gpt: gpt.c

Log Message:
Make sure utf-16 strings are written as little endian words.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/gpt/gpt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.15 src/sbin/gpt/gpt.c:1.16
--- src/sbin/gpt/gpt.c:1.15	Sat Aug 27 17:38:16 2011
+++ src/sbin/gpt/gpt.c	Wed Jul 25 01:07:49 2012
@@ -31,7 +31,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.15 2011/08/27 17:38:16 joerg Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.16 2012/07/25 01:07:49 matt Exp $");
 #endif
 
 #include 
@@ -225,12 +225,14 @@ utf8_to_utf16(const uint8_t *s8, uint16_
 		}
 		if (utfbytes == 0) {
 			if (utfchar >= 0x1 && s16idx + 2 >= s16len)
-utfchar = 0xfffd;
+utfchar = htole16(0xfffd);
 			if (utfchar >= 0x1) {
-s16[s16idx++] = 0xd800 | ((utfchar>>10)-0x40);
-s16[s16idx++] = 0xdc00 | (utfchar & 0x3ff);
+s16[s16idx++] =
+htole16(0xd800 | ((utfchar>>10)-0x40));
+s16[s16idx++] =
+htole16(0xdc00 | (utfchar & 0x3ff));
 			} else
-s16[s16idx++] = utfchar;
+s16[s16idx++] = htole16(utfchar);
 			if (s16idx == s16len) {
 s16[--s16idx] = 0;
 return;



CVS commit: src/usr.bin/touch

2012-07-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 25 01:23:46 UTC 2012

Modified Files:
src/usr.bin/touch: Makefile touch.1 touch.c

Log Message:
add an option to parse human dates.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/touch/Makefile
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/touch/touch.1
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/touch/touch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/touch/Makefile
diff -u src/usr.bin/touch/Makefile:1.3 src/usr.bin/touch/Makefile:1.4
--- src/usr.bin/touch/Makefile:1.3	Wed Dec  7 04:19:47 1994
+++ src/usr.bin/touch/Makefile	Tue Jul 24 21:23:46 2012
@@ -1,6 +1,8 @@
-#	$NetBSD: Makefile,v 1.3 1994/12/07 09:19:47 jtc Exp $
+#	$NetBSD: Makefile,v 1.4 2012/07/25 01:23:46 christos Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/6/93
 
 PROG=	touch
+LDADD+=	-lutil
+DPADD+=	${LIBUTIL}
 
 .include 

Index: src/usr.bin/touch/touch.1
diff -u src/usr.bin/touch/touch.1:1.19 src/usr.bin/touch/touch.1:1.20
--- src/usr.bin/touch/touch.1:1.19	Wed Jun 20 05:56:18 2012
+++ src/usr.bin/touch/touch.1	Tue Jul 24 21:23:46 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: touch.1,v 1.19 2012/06/20 09:56:18 wiz Exp $
+.\"	$NetBSD: touch.1,v 1.20 2012/07/25 01:23:46 christos Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" @(#)touch.1	8.3 (Berkeley) 4/28/95
 .\"
-.Dd June 20, 2012
+.Dd July 24, 2012
 .Dt TOUCH 1
 .Os
 .Sh NAME
@@ -43,6 +43,7 @@
 .Op Fl acfhm
 .Op Fl r Ar file
 .Op Fl t Ar [[CC]YY]MMDDhhmm[.SS]
+.Op Fl d Ar human-datetime
 .Ar file ...
 .Sh DESCRIPTION
 The
@@ -64,6 +65,9 @@ The
 .Nm
 utility does not treat this as an error.
 No error messages are displayed and the exit value is not affected.
+.It Fl d
+The parse the argument using the human datetime parser
+.Xr parsedate 3 .
 .It Fl f
 This flag has no effect; it is accepted for compatibility reasons.
 .It Fl h

Index: src/usr.bin/touch/touch.c
diff -u src/usr.bin/touch/touch.c:1.30 src/usr.bin/touch/touch.c:1.31
--- src/usr.bin/touch/touch.c:1.30	Tue Sep  6 14:33:18 2011
+++ src/usr.bin/touch/touch.c	Tue Jul 24 21:23:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: touch.c,v 1.30 2011/09/06 18:33:18 joerg Exp $	*/
+/*	$NetBSD: touch.c,v 1.31 2012/07/25 01:23:46 christos Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\
 #if 0
 static char sccsid[] = "@(#)touch.c	8.2 (Berkeley) 4/28/95";
 #endif
-__RCSID("$NetBSD: touch.c,v 1.30 2011/09/06 18:33:18 joerg Exp $");
+__RCSID("$NetBSD: touch.c,v 1.31 2012/07/25 01:23:46 christos Exp $");
 #endif /* not lint */
 
 #include 
@@ -56,7 +56,9 @@ __RCSID("$NetBSD: touch.c,v 1.30 2011/09
 #include 
 #include 
 #include 
+#include 
 
+static void	stime_arg0(char *, struct timeval *);
 static void	stime_arg1(char *, struct timeval *);
 static void	stime_arg2(char *, int, struct timeval *);
 static void	stime_file(char *, struct timeval *);
@@ -78,7 +80,7 @@ main(int argc, char *argv[])
 	if (gettimeofday(&tv[0], NULL))
 		err(1, "gettimeofday");
 
-	while ((ch = getopt(argc, argv, "acfhmr:t:")) != -1)
+	while ((ch = getopt(argc, argv, "acd:fhmr:t:")) != -1)
 		switch(ch) {
 		case 'a':
 			aflag = 1;
@@ -86,6 +88,10 @@ main(int argc, char *argv[])
 		case 'c':
 			cflag = 1;
 			break;
+		case 'd':
+			timeset = 1;
+			stime_arg0(optarg, tv);
+			break;
 		case 'f':
 			break;
 		case 'h':
@@ -142,7 +148,7 @@ main(int argc, char *argv[])
 	if (*argv == NULL)
 		usage();
 
-	for (rval = 0; *argv; ++argv) {
+	for (rval = EXIT_SUCCESS; *argv; ++argv) {
 		/* See if the file exists. */
 		if ((*get_file_status)(*argv, &sb)) {
 			if (!cflag) {
@@ -150,7 +156,7 @@ main(int argc, char *argv[])
 fd = open(*argv,
 O_WRONLY | O_CREAT, DEFFILEMODE);
 if (fd == -1 || fstat(fd, &sb) || close(fd)) {
-	rval = 1;
+	rval = EXIT_FAILURE;
 	warn("%s", *argv);
 	continue;
 }
@@ -172,7 +178,7 @@ main(int argc, char *argv[])
 
 		/* If the user specified a time, nothing else we can do. */
 		if (timeset) {
-			rval = 1;
+			rval = EXIT_FAILURE;
 			warn("%s", *argv);
 		}
 
@@ -185,7 +191,7 @@ main(int argc, char *argv[])
 		 if (!(*change_file_times)(*argv, NULL))
 			continue;
 
-		rval = 1;
+		rval = EXIT_FAILURE;
 		warn("%s", *argv);
 	}
 	exit(rval);
@@ -194,6 +200,15 @@ main(int argc, char *argv[])
 #define	ATOI2(s)	((s) += 2, ((s)[-2] - '0') * 10 + ((s)[-1] - '0'))
 
 static void
+stime_arg0(char *arg, struct timeval *tvp)
+{
+	tvp[1].tv_sec = tvp[0].tv_sec = parsedate(arg, NULL, NULL);
+	if (tvp[0].tv_sec == -1)
+		errx(EXIT_FAILURE, "Could not parse `%s'", arg);
+	tvp[0].tv_usec = tvp[1].tv_usec = 0;
+}
+
+static void
 stime_arg1(char *arg, struct timeval *tvp)
 {
 	struct tm *t;
@@ -203,7 +218,7 @@ stime_arg1(char *arg, struct timeval *tv
 	/* Start with the current time. */
 	tmptime = tvp[0].tv_sec;

CVS commit: src/sys/dev/pci

2012-07-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul 25 02:04:43 UTC 2012

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add some Intel devices from document (Intel 7 Series / C216 Chipset
Family Platform Controller Hub (PCH) Family Specification Update)

Modify some devices to clarify


To generate a diff of this commit:
cvs rdiff -u -r1.1124 -r1.1125 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1124 src/sys/dev/pci/pcidevs:1.1125
--- src/sys/dev/pci/pcidevs:1.1124	Mon Jul 23 07:47:14 2012
+++ src/sys/dev/pci/pcidevs	Wed Jul 25 02:04:42 2012
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1124 2012/07/23 07:47:14 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1125 2012/07/25 02:04:42 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2692,7 +2692,16 @@ product INTEL C600_SAS_11	0x1d6d	C600 SA
 product INTEL C600_SAS_12	0x1d6e	C600 SAS Controller
 product INTEL C600_SAS_SATA_4	0x1d6f	C600 SAS Controller (SATA)
 product INTEL C600_SMB_2	0x1d70	C600/X79 Series SMBus Controller
-product INTEL 7SERIES_AHCI	0x1e03	7 Series SATA Controller (AHCI)
+product INTEL 7SER_DT_SATA_1	0x1e00	7 Series (desktop) SATA Controller
+product INTEL 7SER_MO_SATA_1	0x1e01	7 Series (mobile) SATA Controller
+product INTEL 7SER_DT_SATA_AHCI	0x1e02	7 Series (desktop) SATA Controller (AHCI)
+product INTEL 7SER_MO_SATA_AHCI	0x1e03	7 Series (mobile) SATA Controller (AHCI)
+product INTEL 7SER_DT_SATA_RAID_2 0x1e04 7 Series (desktop) SATA Controller (RAID)
+product INTEL 7SER_DT_SATA_RAID_3 0x1e06 7 Series (desktop) SATA Controller (RAID)
+product INTEL 7SER_MO_SATA_RAID 0x1e07	7 Series (mobile) SATA Controller (RAID)
+product INTEL 7SER_DT_SATA_2	0x1e08	7 Series (desktop) SATA Controller
+product INTEL 7SER_MO_SATA_2	0x1e09	7 Series (mobile) SATA Controller
+product INTEL 7SER_DT_SATA_RAID_1 0x1e0e 7 Series (desktop) SATA Controller (RAID)
 product INTEL 7SERIES_PCIE_1	0x1e10	7 Series PCIE
 product INTEL 7SERIES_PCIE_2	0x1e12	7 Series PCIE
 product INTEL 7SERIES_PCIE_3	0x1e14	7 Series PCIE
@@ -2703,12 +2712,29 @@ product INTEL 7SERIES_PCIE_7	0x1e1c	7 Se
 product INTEL 7SERIES_PCIE_8	0x1e1e	7 Series PCIE
 product INTEL 7SERIES_HDA	0x1e20	7 Series HD Audio
 product INTEL 7SERIES_SMB	0x1e22	7 Series SMBus Controller
-product INTEL 7SERIES_EHCI_1	0x1e26	7 Series USB
-product INTEL 7SERIES_EHCI_2	0x1e2d	7 Series USB
+product INTEL 7SERIES_PPB	0x1e25	7 Series PCI-PCI Bridge
+product INTEL 7SERIES_EHCI_1	0x1e26	7 Series USB EHCI
+product INTEL 7SERIES_EHCI_2	0x1e2d	7 Series USB EHCI
 product INTEL 7SERIES_XHCI	0x1e31	7 Series USB xHCI
 product INTEL 7SERIES_MEI_1	0x1e3a	7 Series MEI Controller
 product INTEL 7SERIES_MEI_2	0x1e3b	7 Series MEI Controller
-product INTEL QM77_LPC		0x1e55	QM77 LPC
+product INTEL 7SERIES_IDE_R	0x1e3c	7 Series IDE-R
+product INTEL 7SERIES_KT	0x1e3d	7 Series KT
+product INTEL Z77_LPC		0x1e44	Z77 LPC
+product INTEL Z75_LPC		0x1e46	Z75 LPC
+product INTEL Q77_LPC		0x1e47	Q77 LPC
+product INTEL Q75_LPC		0x1e48	Q75 LPC
+product INTEL B75_LPC		0x1e49	B75 LPC
+product INTEL H77_LPC		0x1e4a	H77 LPC
+product INTEL C216_LPC		0x1e53	C216 LPC
+product INTEL MOBILE_QM77_LPC	0x1e55	Mobile QM77 LPC
+product INTEL MOBILE_QS77_LPC	0x1e56	Mobile QS77 LPC
+product INTEL MOBILE_HM77_LPC	0x1e57	Mobile HM77 LPC
+product INTEL MOBILE_UM77_LPC	0x1e58	Mobile UM77 LPC
+product INTEL MOBILE_HM76_LPC	0x1e59	Mobile HM76 LPC
+product INTEL MOBILE_HM75_LPC	0x1e5d	Mobile HM75 LPC
+product INTEL MOBILE_HM70_LPC	0x1e5e	Mobile HM70 LPC
+product INTEL NM70_LPC		0x1e5f	NM70 LPC
 product INTEL 82801AA_LPC	0x2410	82801AA LPC Interface Bridge
 product INTEL 82801AA_IDE	0x2411	82801AA IDE Controller
 product INTEL 82801AA_USB	0x2412	82801AA USB Controller



CVS commit: src/sys/dev/i2c

2012-07-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jul 25 03:07:37 UTC 2012

Modified Files:
src/sys/dev/i2c: ds1307.c

Log Message:
Clean up error messages.
Tidy some logic.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/i2c/ds1307.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/ds1307.c
diff -u src/sys/dev/i2c/ds1307.c:1.15 src/sys/dev/i2c/ds1307.c:1.16
--- src/sys/dev/i2c/ds1307.c:1.15	Thu Feb 23 20:59:19 2012
+++ src/sys/dev/i2c/ds1307.c	Wed Jul 25 03:07:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ds1307.c,v 1.15 2012/02/23 20:59:19 matt Exp $	*/
+/*	$NetBSD: ds1307.c,v 1.16 2012/07/25 03:07:37 matt Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.15 2012/02/23 20:59:19 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.16 2012/07/25 03:07:37 matt Exp $");
 
 #include 
 #include 
@@ -251,7 +251,8 @@ dsrtc_read(dev_t dev, struct uio *uio, i
 		sc->sc_address, &cmd, 1, &ch, 1, 0)) != 0) {
 			iic_release_bus(sc->sc_tag, 0);
 			aprint_error_dev(sc->sc_dev,
-			"dsrtc_read: read failed at 0x%x\n", a);
+			"%s: read failed at 0x%x: %d\n",
+			__func__, a, error);
 			return error;
 		}
 		if ((error = uiomove(&ch, 1, uio)) != 0) {
@@ -293,7 +294,8 @@ dsrtc_write(dev_t dev, struct uio *uio, 
 		uio->uio_resid ? I2C_OP_WRITE : I2C_OP_WRITE_WITH_STOP,
 		sc->sc_address, cmdbuf, 1, &cmdbuf[1], 1, 0)) != 0) {
 			aprint_error_dev(sc->sc_dev,
-			"dsrtc_write: write failed at 0x%x\n", a);
+			"%s: write failed at 0x%x: %d\n",
+			__func__, a, error);
 			break;
 		}
 	}
@@ -342,33 +344,35 @@ dsrtc_clock_read_ymdhms(struct dsrtc_sof
 {
 	struct dsrtc_model * const dm = &sc->sc_model;
 	uint8_t bcd[DS_RTC_SIZE], cmdbuf[1];
+	int error;
 
 	KASSERT(DS_RTC_SIZE >= dm->dm_rtc_size);
 
-	if (iic_acquire_bus(sc->sc_tag, I2C_F_POLL)) {
+	if ((error = iic_acquire_bus(sc->sc_tag, I2C_F_POLL)) != 0) {
 		aprint_error_dev(sc->sc_dev,
-		"dsrtc_clock_read: failed to acquire I2C bus\n");
+		"%s: failed to acquire I2C bus: %d\n",
+		__func__, error);
 		return 0;
 	}
 
 	/* Read each RTC register in order. */
-	for (u_int i = 0; i < dm->dm_rtc_size; i++) {
+	for (u_int i = 0; !error && i < dm->dm_rtc_size; i++) {
 		cmdbuf[0] = dm->dm_rtc_start + i;
 
-		if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
-			 sc->sc_address, cmdbuf, 1,
-			 &bcd[i], 1, I2C_F_POLL)) {
-			iic_release_bus(sc->sc_tag, I2C_F_POLL);
-			aprint_error_dev(sc->sc_dev,
-			"dsrtc_clock_read: failed to read rtc "
-			"at 0x%x\n", i);
-			return 0;
-		}
+		error = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
+		sc->sc_address, cmdbuf, 1, &bcd[i], 1, I2C_F_POLL);
 	}
 
 	/* Done with I2C */
 	iic_release_bus(sc->sc_tag, I2C_F_POLL);
 
+	if (error != 0) {
+		aprint_error_dev(sc->sc_dev,
+		"%s: failed to read rtc at 0x%x: %d\n", 
+		__func__, cmdbuf[0], error);
+		return 0;
+	}
+
 	/*
 	 * Convert the RTC's register values into something useable
 	 */
@@ -400,6 +404,7 @@ dsrtc_clock_write_ymdhms(struct dsrtc_so
 {
 	struct dsrtc_model * const dm = &sc->sc_model;
 	uint8_t bcd[DS_RTC_SIZE], cmdbuf[2];
+	int error;
 
 	KASSERT(DS_RTC_SIZE >= dm->dm_rtc_size);
 
@@ -417,30 +422,33 @@ dsrtc_clock_write_ymdhms(struct dsrtc_so
 	if (dt->dt_year - POSIX_BASE_YEAR >= 100)
 		bcd[DS_MONTH] |= DS_MONTH_CENTURY;
 
-	if (iic_acquire_bus(sc->sc_tag, I2C_F_POLL)) {
+	if ((error = iic_acquire_bus(sc->sc_tag, I2C_F_POLL)) != 0) {
 		aprint_error_dev(sc->sc_dev,
-		"dsrtc_clock_write: failed to acquire I2C bus\n");
+		"%s: failed to acquire I2C bus: %d\n",
+		__func__, error);
 		return 0;
 	}
 
 	/* Stop the clock */
 	cmdbuf[0] = dm->dm_ch_reg;
 
-	if (iic_exec(sc->sc_tag, I2C_OP_READ, sc->sc_address,
-	cmdbuf, 1, &cmdbuf[1], 1, I2C_F_POLL)) {
+	if ((error = iic_exec(sc->sc_tag, I2C_OP_READ, sc->sc_address,
+	cmdbuf, 1, &cmdbuf[1], 1, I2C_F_POLL)) != 0) {
 		iic_release_bus(sc->sc_tag, I2C_F_POLL);
 		aprint_error_dev(sc->sc_dev,
-		"dsrtc_clock_write: failed to read Hold Clock\n");
+		"%s: failed to read Hold Clock: %d\n",
+		__func__, error);
 		return 0;
 	}
 
 	cmdbuf[1] |= dm->dm_ch_value;
 
-	if (iic_exec(sc->sc_tag, I2C_OP_WRITE, sc->sc_address,
-	cmdbuf, 1, &cmdbuf[1], 1, I2C_F_POLL)) {
+	if ((error = iic_exec(sc->sc_tag, I2C_OP_WRITE, sc->sc_address,
+	cmdbuf, 1, &cmdbuf[1], 1, I2C_F_POLL)) != 0) {
 		iic_release_bus(sc->sc_tag, I2C_F_POLL);
 		aprint_error_dev(sc->sc_dev,
-		"dsrtc_clock_write: failed to write Hold Clock\n");
+		"%s: failed to write Hold Clock: %d\n",
+		__func__, error);
 		return 0;
 	}
 
@@ -454,12 +462,12 @@ dsrtc_clock_write_ymdhms(struct dsrtc_so
 		if (dm->dm_rtc_start + i == dm->dm_ch_reg) {
 			op = I2C_OP_WRITE_WITH_STOP;
 		}
-		if (iic_exec(sc->sc_tag,

CVS commit: src/sys/arch/evbppc/conf

2012-07-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jul 25 03:09:02 UTC 2012

Modified Files:
src/sys/arch/evbppc/conf: P2020RDB

Log Message:
Move dsrtc to correct bus.
Add drvctl
Add sdhc at pci
Remove pq3pci (P2020 only has PCIe).


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbppc/conf/P2020RDB

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbppc/conf/P2020RDB
diff -u src/sys/arch/evbppc/conf/P2020RDB:1.14 src/sys/arch/evbppc/conf/P2020RDB:1.15
--- src/sys/arch/evbppc/conf/P2020RDB:1.14	Mon Jul 23 16:27:44 2012
+++ src/sys/arch/evbppc/conf/P2020RDB	Wed Jul 25 03:09:01 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: P2020RDB,v 1.14 2012/07/23 16:27:44 matt Exp $
+#	$NetBSD: P2020RDB,v 1.15 2012/07/25 03:09:01 matt Exp $
 #
 #	P2020RBD -- everything that's currently supported
 #
@@ -7,7 +7,7 @@ include		"arch/evbppc/conf/std.mpc85xx"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-ident 		"P2020RBD-$Revision: 1.14 $"
+ident 		"P2020RBD-$Revision: 1.15 $"
 
 maxusers	32
 
@@ -180,12 +180,10 @@ ukphy*		at mii?
 
 diic*		at cpunode?		# i2c bus
 iic*		at diic?
-dsrtc*		at iic1 addr 0x68 flags 1339	# RTC DS1339
+dsrtc*		at iic0 addr 0x68 flags 1339	# RTC DS1339
 
 pq3pcie*	at cpunode?		# PCI-Express controller
-pq3pci* 	at cpunode?		# PCI(X)
 pci*		at pq3pcie?
-pci*		at pq3pci?
 
 ppb*		at pci? dev ? function ?	# PCI-PCI bridges
 pci*		at ppb?
@@ -194,6 +192,12 @@ ahcisata*	at pci? dev ? function ?
 atabus*		at ahcisata? channel ?
 wd*		at atabus? drive ?
 
+sdhc*		at pci? dev ? function ?
+
+sdhc*		at cpunode?		# sdmmc
+sdmmc*		at sdhc?		# SD/MMC bus
+ld*		at sdmmc?
+
 ehci*		at cpunode?		# usb
 usb*		at ehci?
 uhub*		at usb?
@@ -201,10 +205,6 @@ umass*		at uhub? port ?
 scsibus*	at umass? channel ?
 sd*		at scsibus? target ? lun ?
 
-sdhc*		at cpunode?		# sdmmc
-sdmmc*		at sdhc?		# SD/MMC bus
-ld*		at sdmmc?
-
 #siisata*	at pci? dev ? function ?
 #atabus* 	at siisata? channel ?
 #jmide*		at pci? dev ? function ?	# JMicron PCI-e PATA/SATA controllers
@@ -225,6 +225,7 @@ ld*		at sdmmc?
 pseudo-device	loop			# network loopback
 pseudo-device	bpfilter		# packet filter
 pseudo-device	clockctl		# user control of clock subsystem
+pseudo-device	drvctl			# user control of disk subsystem
 pseudo-device	ksyms			# /dev/ksyms
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	kttcp			# kernel ttcp