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

2012-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Nov 30 06:32:31 UTC 2012

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.1

Log Message:
Ticket 728.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-6.0.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-6.0.1
diff -u src/doc/CHANGES-6.0.1:1.1.2.25 src/doc/CHANGES-6.0.1:1.1.2.26
--- src/doc/CHANGES-6.0.1:1.1.2.25	Thu Nov 29 00:04:19 2012
+++ src/doc/CHANGES-6.0.1	Fri Nov 30 06:32:31 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.1,v 1.1.2.25 2012/11/29 00:04:19 riz Exp $
+# $NetBSD: CHANGES-6.0.1,v 1.1.2.26 2012/11/30 06:32:31 msaitoh Exp $
 
 A complete list of changes from the NetBSD 6.0 release to the NetBSD 6.0.1
 release:
@@ -230,3 +230,7 @@ sys/netsmb/smb_smb.c1.33
 	Make smbfs actually works on big-endian ports.
 	[nakayama, ticket #725]
 
+sys/arch/xen/xenbus/xenbus_xs.c			1.23
+
+	Xen Dom0 NetBSD kernel can crash by adding duplicate xenwatches.
+	[royger, ticket #728]



CVS commit: [netbsd-6-0] src/sys/arch/xen/xenbus

2012-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Nov 30 06:30:39 UTC 2012

Modified Files:
src/sys/arch/xen/xenbus [netbsd-6-0]: xenbus_xs.c

Log Message:
Pull up following revision(s) (requested by royger in ticket #728):
sys/arch/xen/xenbus/xenbus_xs.c: revision 1.23
xen: prevent adding duplicate xenwatches
When a xenstore watch triggers, the event is processed on process_msg
and if a valid handle it's found the handler is queued for execution
on the pending xen watches queue (watch_events).
This may present a problem if we trigger a xenwatch several times and
then disconnect the device. If several xenwatch events are added to
the watch_events queue and the device is disconnected afterwards, the
first processed xenwatch event will disconnect the device, remove the
watch and free all resources. This triggers a panic if there are
pending xenwatch events for that device already queued in the local
queue of the function xenwatch_thread, since when the next watch that
has the same handler tries to execute we get a panic due to the fact
that the device is already disconnected and all resources had been
freed:
xenbus_watch: 0xab7cd1d0
xbw_callback: 0x80755dd4
otherend_changed: backend/vif/1/0
backend/vif/1/0/state 6
backend/vif/1/0 -> Closed
backend/vif/1/0 -> backend_device, b_detach: 0x8075a2bf
xenbus_watch: 0xab7cd1d0
xbw_callback: 0xfc5ec02183e547a8
fatal protection fault in supervisor mode
trap type 4 code 0 rip 80756596 cs e030 rflags 10246 cr2
7f7ff7b4c020 ilevel 0 rsp a000e6d82c50
curlwp 0xaa72d580 pid 0 lid 36 lowest kstack
0xa000e6d7f000
kernel: protection fault trap, code=0
Stopped in pid 0.36 (system) at netbsd:xenwatch_thread+0xc7:call
*10(%rax
)
xenwatch_thread() at netbsd:xenwatch_thread+0xc7
ds  f
es  5987
fs  2c40
gs  1460
rdi ab7cd1d0
rsi aa5477f0
rbp a000e6d82c70
rbx ab7c14c0
rdx 2
rcx f
rax ab7cd1d0
r8  78
r9  ffef
r10 deadbeef
r11 1
r12 a000e6d82c50
r13 aa72d580
r14 aa72d580
r15 0
rip 80756596xenwatch_thread+0xc7
cs  e030
rflags  10246
rsp a000e6d82c50
ss  e02b
netbsd:xenwatch_thread+0xc7:call*10(%rax)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.14.1 src/sys/arch/xen/xenbus/xenbus_xs.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/xen/xenbus/xenbus_xs.c
diff -u src/sys/arch/xen/xenbus/xenbus_xs.c:1.22 src/sys/arch/xen/xenbus/xenbus_xs.c:1.22.14.1
--- src/sys/arch/xen/xenbus/xenbus_xs.c:1.22	Wed Jul 27 23:11:23 2011
+++ src/sys/arch/xen/xenbus/xenbus_xs.c	Fri Nov 30 06:30:38 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: xenbus_xs.c,v 1.22 2011/07/27 23:11:23 matt Exp $ */
+/* $NetBSD: xenbus_xs.c,v 1.22.14.1 2012/11/30 06:30:38 msaitoh Exp $ */
 /**
  * xenbus_xs.c
  *
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xenbus_xs.c,v 1.22 2011/07/27 23:11:23 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xenbus_xs.c,v 1.22.14.1 2012/11/30 06:30:38 msaitoh Exp $");
 
 #if 0
 #define DPRINTK(fmt, args...) \
@@ -751,7 +751,7 @@ xenwatch_thread(void *unused)
 static int
 process_msg(void)
 {
-	struct xs_stored_msg *msg;
+	struct xs_stored_msg *msg, *s_msg;
 	char *body;
 	int err;
 
@@ -782,7 +782,7 @@ process_msg(void)
 	body[msg->hdr.len] = '\0';
 
 	if (msg->hdr.type == XS_WATCH_EVENT) {
-		bool found;
+		bool found, repeated;
 
 		DPRINTK("process_msg: XS_WATCH_EVENT");
 		msg->u.watch.vec = split(body, msg->hdr.len,
@@ -796,14 +796,24 @@ process_msg(void)
 		msg->u.watch.handle = find_watch(
 		msg->u.watch.vec[XS_WATCH_TOKEN]);
 		found = (msg->u.watch.handle != NULL);
+		repeated = false;
 		if (found) {
 			mutex_enter(&watch_events_lock);
-			SIMPLEQ_INSERT_TAIL(&watch_events, msg, msg_next);
-			cv_broadcast(&watch_cv);
+			/* Don't add duplicate events to the queue of pending watches */
+			SIMPLEQ_FOREACH(s_msg, &watch_events, msg_next) {
+if (s_msg->u.watch.handle == msg->u.watch.handle) {
+	repeated = true;
+	break;
+}
+			}
+			if (!repeated) {
+SIMPLEQ_INSERT_TAIL(&watch_events, msg, msg_next);
+cv_broadcast(&watch_cv);
+			}
 			mutex_exit(&watch_events_lock);
 		}
 		mutex_exit(&watches_lock);
-		if (!found) {
+		if (!found || repeated) {
 			free(msg->u.watch.vec, M_DEVBUF);
 			free(msg, M_DEVBUF);
 		}



CVS commit: [netbsd-6] src/doc

2012-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Nov 30 04:30:27 UTC 2012

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Ticket 728 and 729.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-6.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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.48 src/doc/CHANGES-6.1:1.1.2.49
--- src/doc/CHANGES-6.1:1.1.2.48	Thu Nov 29 00:12:19 2012
+++ src/doc/CHANGES-6.1	Fri Nov 30 04:30:26 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.48 2012/11/29 00:12:19 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.49 2012/11/30 04:30:26 msaitoh Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -916,7 +916,7 @@ sys/dev/usb/if_urndis.c1.4
 
 lib/libc/arch/arm/sys/__aeabi_read_tp.S		1.3
 
-	Add $NetBSD: CHANGES-6.1,v 1.1.2.48 2012/11/29 00:12:19 riz Exp $ tag.  Use ip to save r1 instead of the stack.
+	Add $NetBSD: CHANGES-6.1,v 1.1.2.49 2012/11/30 04:30:26 msaitoh Exp $ tag.  Use ip to save r1 instead of the stack.
 	[matt, ticket #701]
 
 sys/net/npf/npf.c1.14
@@ -7094,3 +7094,13 @@ sys/arch/amigappc/conf/files.amigappc		1
 	build again.
 	[msaitoh, ticket #727]
 
+sys/arch/xen/xenbus/xenbus_xs.c			1.23
+
+	Xen Dom0 NetBSD kernel can crash by adding duplicate xenwatches.
+	[royger, ticket #728]
+
+distrib/sets/lists/base/shl.mi			1.641
+lib/libnpf/Makefile1.4
+
+	Install libnpf in /lib too because npfctl is linked against it.
+	[christos, ticket #729]



CVS commit: [netbsd-6] src

2012-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Nov 30 04:27:55 UTC 2012

Modified Files:
src/distrib/sets/lists/base [netbsd-6]: shl.mi
src/lib/libnpf [netbsd-6]: Makefile

Log Message:
Pull up following revision(s) (requested by christos in ticket #729):
lib/libnpf/Makefile: revision 1.4
distrib/sets/lists/base/shl.mi: revision 1.641
Install in /lib too because npfctl is linked against it.


To generate a diff of this commit:
cvs rdiff -u -r1.616.2.6 -r1.616.2.7 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.1 -r1.1.8.1 src/lib/libnpf/Makefile

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/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.616.2.6 src/distrib/sets/lists/base/shl.mi:1.616.2.7
--- src/distrib/sets/lists/base/shl.mi:1.616.2.6	Sun Nov 18 22:38:29 2012
+++ src/distrib/sets/lists/base/shl.mi	Fri Nov 30 04:27:54 2012
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.616.2.6 2012/11/18 22:38:29 riz Exp $
+# $NetBSD: shl.mi,v 1.616.2.7 2012/11/30 04:27:54 msaitoh Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -46,6 +46,9 @@
 ./lib/liblzma.sobase-sys-shlib		dynamicroot
 ./lib/liblzma.so.1base-sys-shlib		dynamicroot
 ./lib/liblzma.so.1.1base-sys-shlib		dynamicroot
+./lib/libnpf.so	base-sys-shlib		dynamicroot
+./lib/libnpf.so.0base-sys-shlib		dynamicroot
+./lib/libnpf.so.0.0base-sys-shlib		dynamicroot
 ./lib/libm.so	base-sys-shlib		dynamicroot
 ./lib/libm.so.0	base-sys-shlib		dynamicroot
 ./lib/libm.so.0.10base-sys-shlib		dynamicroot

Index: src/lib/libnpf/Makefile
diff -u src/lib/libnpf/Makefile:1.1 src/lib/libnpf/Makefile:1.1.8.1
--- src/lib/libnpf/Makefile:1.1	Wed Feb  2 02:20:25 2011
+++ src/lib/libnpf/Makefile	Fri Nov 30 04:27:54 2012
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.1 2011/02/02 02:20:25 rmind Exp $
+# $NetBSD: Makefile,v 1.1.8.1 2012/11/30 04:27:54 msaitoh Exp $
 
 .include 
 
+USE_SHLIBDIR=   yes
+
 LIB=		npf
 MAN=		npf.3
 



CVS commit: [netbsd-6] src/sys/arch/xen/xenbus

2012-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Nov 30 04:24:41 UTC 2012

Modified Files:
src/sys/arch/xen/xenbus [netbsd-6]: xenbus_xs.c

Log Message:
Pull up following revision(s) (requested by royger in ticket #728):
sys/arch/xen/xenbus/xenbus_xs.c: revision 1.23
xen: prevent adding duplicate xenwatches
When a xenstore watch triggers, the event is processed on process_msg
and if a valid handle it's found the handler is queued for execution
on the pending xen watches queue (watch_events).
This may present a problem if we trigger a xenwatch several times and
then disconnect the device. If several xenwatch events are added to
the watch_events queue and the device is disconnected afterwards, the
first processed xenwatch event will disconnect the device, remove the
watch and free all resources. This triggers a panic if there are
pending xenwatch events for that device already queued in the local
queue of the function xenwatch_thread, since when the next watch that
has the same handler tries to execute we get a panic due to the fact
that the device is already disconnected and all resources had been
freed:
xenbus_watch: 0xab7cd1d0
xbw_callback: 0x80755dd4
otherend_changed: backend/vif/1/0
backend/vif/1/0/state 6
backend/vif/1/0 -> Closed
backend/vif/1/0 -> backend_device, b_detach: 0x8075a2bf
xenbus_watch: 0xab7cd1d0
xbw_callback: 0xfc5ec02183e547a8
fatal protection fault in supervisor mode
trap type 4 code 0 rip 80756596 cs e030 rflags 10246 cr2
7f7ff7b4c020 ilevel 0 rsp a000e6d82c50
curlwp 0xaa72d580 pid 0 lid 36 lowest kstack
0xa000e6d7f000
kernel: protection fault trap, code=0
Stopped in pid 0.36 (system) at netbsd:xenwatch_thread+0xc7:call
*10(%rax
)
xenwatch_thread() at netbsd:xenwatch_thread+0xc7
ds  f
es  5987
fs  2c40
gs  1460
rdi ab7cd1d0
rsi aa5477f0
rbp a000e6d82c70
rbx ab7c14c0
rdx 2
rcx f
rax ab7cd1d0
r8  78
r9  ffef
r10 deadbeef
r11 1
r12 a000e6d82c50
r13 aa72d580
r14 aa72d580
r15 0
rip 80756596xenwatch_thread+0xc7
cs  e030
rflags  10246
rsp a000e6d82c50
ss  e02b
netbsd:xenwatch_thread+0xc7:call*10(%rax)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.8.1 src/sys/arch/xen/xenbus/xenbus_xs.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/xen/xenbus/xenbus_xs.c
diff -u src/sys/arch/xen/xenbus/xenbus_xs.c:1.22 src/sys/arch/xen/xenbus/xenbus_xs.c:1.22.8.1
--- src/sys/arch/xen/xenbus/xenbus_xs.c:1.22	Wed Jul 27 23:11:23 2011
+++ src/sys/arch/xen/xenbus/xenbus_xs.c	Fri Nov 30 04:24:41 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: xenbus_xs.c,v 1.22 2011/07/27 23:11:23 matt Exp $ */
+/* $NetBSD: xenbus_xs.c,v 1.22.8.1 2012/11/30 04:24:41 msaitoh Exp $ */
 /**
  * xenbus_xs.c
  *
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xenbus_xs.c,v 1.22 2011/07/27 23:11:23 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xenbus_xs.c,v 1.22.8.1 2012/11/30 04:24:41 msaitoh Exp $");
 
 #if 0
 #define DPRINTK(fmt, args...) \
@@ -751,7 +751,7 @@ xenwatch_thread(void *unused)
 static int
 process_msg(void)
 {
-	struct xs_stored_msg *msg;
+	struct xs_stored_msg *msg, *s_msg;
 	char *body;
 	int err;
 
@@ -782,7 +782,7 @@ process_msg(void)
 	body[msg->hdr.len] = '\0';
 
 	if (msg->hdr.type == XS_WATCH_EVENT) {
-		bool found;
+		bool found, repeated;
 
 		DPRINTK("process_msg: XS_WATCH_EVENT");
 		msg->u.watch.vec = split(body, msg->hdr.len,
@@ -796,14 +796,24 @@ process_msg(void)
 		msg->u.watch.handle = find_watch(
 		msg->u.watch.vec[XS_WATCH_TOKEN]);
 		found = (msg->u.watch.handle != NULL);
+		repeated = false;
 		if (found) {
 			mutex_enter(&watch_events_lock);
-			SIMPLEQ_INSERT_TAIL(&watch_events, msg, msg_next);
-			cv_broadcast(&watch_cv);
+			/* Don't add duplicate events to the queue of pending watches */
+			SIMPLEQ_FOREACH(s_msg, &watch_events, msg_next) {
+if (s_msg->u.watch.handle == msg->u.watch.handle) {
+	repeated = true;
+	break;
+}
+			}
+			if (!repeated) {
+SIMPLEQ_INSERT_TAIL(&watch_events, msg, msg_next);
+cv_broadcast(&watch_cv);
+			}
 			mutex_exit(&watch_events_lock);
 		}
 		mutex_exit(&watches_lock);
-		if (!found) {
+		if (!found || repeated) {
 			free(msg->u.watch.vec, M_DEVBUF);
 			free(msg, M_DEVBUF);
 		}



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

2012-11-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Nov 30 01:42:43 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Remove the now-obsolete ipf/t_bpf.sh test


To generate a diff of this commit:
cvs rdiff -u -r1.509 -r1.510 src/distrib/sets/lists/tests/mi

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.509 src/distrib/sets/lists/tests/mi:1.510
--- src/distrib/sets/lists/tests/mi:1.509	Fri Nov 23 08:36:48 2012
+++ src/distrib/sets/lists/tests/mi	Fri Nov 30 01:42:43 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.509 2012/11/23 08:36:48 njoly Exp $
+# $NetBSD: mi,v 1.510 2012/11/30 01:42:43 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2135,7 +2135,7 @@
 ./usr/tests/ipf/regress/p7.pool			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/p9.nat			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/p9.pool			tests-ipf-tests		ipfilter
-./usr/tests/ipf/t_bpftests-ipf-tests		atf,ipfilter
+./usr/tests/ipf/t_bpftests-obsolete		obsolete
 ./usr/tests/ipf/t_filter_exec			tests-ipf-tests		atf,ipfilter
 ./usr/tests/ipf/t_filter_parse			tests-ipf-tests		atf,ipfilter
 ./usr/tests/ipf/t_ipftests-obsolete		obsolete



CVS commit: src/tests/ipf

2012-11-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Nov 30 01:41:50 UTC 2012

Modified Files:
src/tests/ipf: Makefile
Removed Files:
src/tests/ipf: Atffile

Log Message:
Rather than providing a custom Atffile that requires separate
maintenance, just don't build or install the t_bpf.sh test.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r0 src/tests/ipf/Atffile
cvs rdiff -u -r1.4 -r1.5 src/tests/ipf/Makefile

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

Modified files:

Index: src/tests/ipf/Makefile
diff -u src/tests/ipf/Makefile:1.4 src/tests/ipf/Makefile:1.5
--- src/tests/ipf/Makefile:1.4	Sat Dec 18 13:06:51 2010
+++ src/tests/ipf/Makefile	Fri Nov 30 01:41:50 2012
@@ -1,13 +1,14 @@
-# $NetBSD: Makefile,v 1.4 2010/12/18 13:06:51 pooka Exp $
+# $NetBSD: Makefile,v 1.5 2012/11/30 01:41:50 pgoyette Exp $
 
 NOMAN=		# defined
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/ipf
-ATFFILE=	yes
 
-.for name in t_bpf t_filter_exec t_filter_parse t_logging t_nat_exec \
+# t_bpf is omitted from the test list since we don't support it on NetBSD
+
+.for name in t_filter_exec t_filter_parse t_logging t_nat_exec \
  t_nat_ipf_exec t_nat_parse t_pools
 TESTS_SH+=		${name}
 TESTS_SH_SRC_${name}=	h_common.sh ${name}.sh



CVS commit: src/usr.bin/mkubootimage

2012-11-29 Thread Jeremy C. Reed
Module Name:src
Committed By:   reed
Date:   Thu Nov 29 23:23:23 UTC 2012

Added Files:
src/usr.bin/mkubootimage: mkubootimage.1

Log Message:
Add a manual for mkubootimage(1). It was missing.
It had one review on netbsd-docs@.
I didn't add the manual to the Makefile nor distrib set yet --
waiting for more review or improvements first.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/usr.bin/mkubootimage/mkubootimage.1

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

Added files:

Index: src/usr.bin/mkubootimage/mkubootimage.1
diff -u /dev/null src/usr.bin/mkubootimage/mkubootimage.1:1.1
--- /dev/null	Thu Nov 29 23:23:23 2012
+++ src/usr.bin/mkubootimage/mkubootimage.1	Thu Nov 29 23:23:22 2012
@@ -0,0 +1,162 @@
+.\"	$NetBSD: mkubootimage.1,v 1.1 2012/11/29 23:23:22 reed Exp $
+.\"
+.\" Copyright (c) 2012 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Jeremy C. Reed
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd November 28, 2012
+.Dt MKUBOOTIMAGE 1
+.Os
+.Sh NAME
+.Nm mkubootimage
+.Nd create U-Boot loader image
+.Sh SYNOPSIS
+.Nm
+.Fl A No ( arm Ns | Ns mips Ns | Ns mips64 Ns | Ns powerpc )
+.Fl a Ar address
+.Op Fl C No Po bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Pc
+.Op Fl E Ar address
+.Op Fl e Ar address
+.Op Fl h
+.Op Fl m Ar magic
+.Fl n Ar image
+.Op Fl O No Po freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd Pc
+.Fl T No ( fs Ns | Ns kernel Ns | Ns ramdisk Ns | Ns standalone )
+.Ar source destination
+.\"
+.Sh DESCRIPTION
+The
+.Nm
+utility is used to create an image for Das U-Boot, the
+.Qq Universal Boot Loader .
+.Pp
+The arguments are as follows:
+.Bl -tag -width indent
+.It Fl A No ( arm Ns | Ns mips Ns | Ns mips64 Ns | Ns powerpc )
+Defines the architecture.
+This is required.
+.It Fl a Ar address
+Sets the image load address.
+This is an integer between 0 and ULONG_MAX.
+This is required.
+.It Fl C No ( bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Ns )
+Defines the compression.
+The default is
+.Qq none .
+.It Fl E Ar address
+Define the entry point.
+This is an integer between 0 and ULONG_MAX.
+This option is the same as
+.Fl e
+but it inverts the bytes to convert the 32 bit integer
+from little to big endian (or vice versa).
+If
+.Fl E
+or
+.Fl e
+are not set, the entry point defaults to the
+image load address
+.Pq Fl a .
+.It Fl e Ar address
+Define the entry point.
+This is an integer between 0 and ULONG_MAX.
+If
+.Fl E
+or
+.Fl e
+are not set, the entry point defaults to the
+image load address
+.Pq Fl a .
+.It Fl h
+Display the usage and exit.
+.It Fl m Ar magic
+Set the magic.
+This is an integer between 0 and ULONG_MAX.
+The default is
+.Qq 0x27051956.
+.It Fl n Ar image
+Defines the image name.
+This is required.
+.It Fl O No ( freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd )
+Defines the operating system type.
+The default OS name is
+.Qq netbsd .
+.It Fl T No ( fs Ns | Ns kernel Ns | Ns ramdisk Ns | Ns standalone )
+Defines the image type.
+This is required.
+.El
+.Pp
+The required
+.Ar source
+argument is the filename of the kernel that is read.
+The required
+.Ar destination
+argument is the filename of the image file that is created.
+.\"
+.Sh RETURN VALUES
+.Nm
+returns 1 on failure to read the kernel,
+generate a header, or create the image.
+.\"
+.Sh EXAMPLES
+Before the image is written, the header is displayed to standard out;
+for example:
+.Bd -literal -offset 0
+ magic:   0x27051956
+ time:Tue Jun  7 15:58:41 2011
+ size:2482203
+ load add

CVS commit: src/usr.bin/tic

2012-11-29 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Thu Nov 29 23:01:16 UTC 2012

Modified Files:
src/usr.bin/tic: tic.c

Log Message:
Remove an obsolete (and incomprehensible) comment.  Discussed with and ok
Roy Marples, Joerg Sonnenberger.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/tic/tic.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/tic/tic.c
diff -u src/usr.bin/tic/tic.c:1.20 src/usr.bin/tic/tic.c:1.21
--- src/usr.bin/tic/tic.c:1.20	Sun Jun  3 23:19:11 2012
+++ src/usr.bin/tic/tic.c	Thu Nov 29 23:01:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: tic.c,v 1.20 2012/06/03 23:19:11 joerg Exp $ */
+/* $NetBSD: tic.c,v 1.21 2012/11/29 23:01:16 mbalmer Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: tic.c,v 1.20 2012/06/03 23:19:11 joerg Exp $");
+__RCSID("$NetBSD: tic.c,v 1.21 2012/11/29 23:01:16 mbalmer Exp $");
 
 #include 
 #include 
@@ -59,9 +59,6 @@ __RCSID("$NetBSD: tic.c,v 1.20 2012/06/0
 
 #define	HASH_SIZE	16384	/* 2012-06-01: 3600 entries */
 
-/* We store the full list of terminals we have instead of iterating
-   through the database as the sequential iterator doesn't work
-   the the data size stored changes N amount which ours will. */
 typedef struct term {
 	STAILQ_ENTRY(term) next;
 	char *name;



CVS commit: src/tests/ipf

2012-11-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov 29 18:54:43 UTC 2012

Modified Files:
src/tests/ipf: h_common.sh

Log Message:
fix typo in previous - missing quote


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/ipf/h_common.sh

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

Modified files:

Index: src/tests/ipf/h_common.sh
diff -u src/tests/ipf/h_common.sh:1.4 src/tests/ipf/h_common.sh:1.5
--- src/tests/ipf/h_common.sh:1.4	Thu Nov 29 17:10:21 2012
+++ src/tests/ipf/h_common.sh	Thu Nov 29 18:54:43 2012
@@ -1,4 +1,4 @@
-# $NetBSD: h_common.sh,v 1.4 2012/11/29 17:10:21 pgoyette Exp $
+# $NetBSD: h_common.sh,v 1.5 2012/11/29 18:54:43 pgoyette Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -67,7 +67,7 @@ failing_test_case()
 {
 	local name="${1}"; shift
 	local check_function="${1}"; shift
-	local reason="${1}; shift
+	local reason="${1}"; shift
 
 	atf_test_case "${name}"
 	eval "${name}_body() { \



CVS commit: src/sys/dev/pci

2012-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 29 18:48:27 UTC 2012

Modified Files:
src/sys/dev/pci: ichsmb.c

Log Message:
Add C600(and X79) SMBus devices.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/ichsmb.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/pci/ichsmb.c
diff -u src/sys/dev/pci/ichsmb.c:1.28 src/sys/dev/pci/ichsmb.c:1.29
--- src/sys/dev/pci/ichsmb.c:1.28	Mon Nov 26 03:01:28 2012
+++ src/sys/dev/pci/ichsmb.c	Thu Nov 29 18:48:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichsmb.c,v 1.28 2012/11/26 03:01:28 riastradh Exp $	*/
+/*	$NetBSD: ichsmb.c,v 1.29 2012/11/29 18:48:26 msaitoh Exp $	*/
 /*	$OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.28 2012/11/26 03:01:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.29 2012/11/29 18:48:26 msaitoh Exp $");
 
 #include 
 #include 
@@ -109,6 +109,9 @@ ichsmb_match(device_t parent, cfdata_t m
 		case PCI_PRODUCT_INTEL_3400_SMB:
 		case PCI_PRODUCT_INTEL_6SERIES_SMB:
 		case PCI_PRODUCT_INTEL_7SERIES_SMB:
+		case PCI_PRODUCT_INTEL_C600_SMB_0:
+		case PCI_PRODUCT_INTEL_C600_SMB_1:
+		case PCI_PRODUCT_INTEL_C600_SMB_2:
 			return 1;
 		}
 	}



CVS commit: src/sys/dev/pci

2012-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 29 18:45:20 UTC 2012

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

Log Message:
Update SMBus devices from Document(c600-series-chipset-spec-update and
x79-express-chipset-specification-update)


To generate a diff of this commit:
cvs rdiff -u -r1.1143 -r1.1144 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.1143 src/sys/dev/pci/pcidevs:1.1144
--- src/sys/dev/pci/pcidevs:1.1143	Sun Oct 21 23:06:59 2012
+++ src/sys/dev/pci/pcidevs	Thu Nov 29 18:45:20 2012
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1143 2012/10/21 23:06:59 matt Exp $
+$NetBSD: pcidevs,v 1.1144 2012/11/29 18:45:20 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2773,7 +2773,7 @@ product INTEL C600_PCIE_6	0x1d1a	C600/X7
 product INTEL C600_PCIE_7	0x1d1c	C600/X79 PCIE
 product INTEL C600_PCIE_8	0x1d1e	C600/X79 PCIE
 product INTEL C600_HDA		0x1d20	C600 HD Audio
-product INTEL C600_SMB_1	0x1d22	C600/X79 SMBus Controller
+product INTEL C600_SMBUS	0x1d22	C600 SMBus Controller
 product INTEL C600_THERM	0x1d24	C600 Thermal Management Controller
 product INTEL C600_EHCI_1	0x1d26	C600 USB
 product INTEL C600_EHCI_2	0x1d2d	C600 USB
@@ -2799,7 +2799,9 @@ product INTEL C600_SAS_10	0x1d6c	C600 SA
 product INTEL C600_SAS_11	0x1d6d	C600 SAS Controller
 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 C600_SMB_0	0x1d70	C600/X79 Series SMBus Controller
+product INTEL C600_SMB_1	0x1d71	C606/C608 SMBus Controller
+product INTEL C600_SMB_2	0x1d72	C608 SMBus Controller
 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)



CVS commit: [matt-nb6-plus] src/sys/arch/arm/broadcom

2012-11-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 29 18:42:06 UTC 2012

Modified Files:
src/sys/arch/arm/broadcom [matt-nb6-plus]: bcm53xx_reg.h bcm53xx_usb.c

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.2 -r1.10.2.3 src/sys/arch/arm/broadcom/bcm53xx_reg.h
cvs rdiff -u -r1.2.4.2 -r1.2.4.3 src/sys/arch/arm/broadcom/bcm53xx_usb.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/arm/broadcom/bcm53xx_reg.h
diff -u src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.10.2.2 src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.10.2.3
--- src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.10.2.2	Wed Nov 28 22:40:23 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_reg.h	Thu Nov 29 18:42:05 2012
@@ -658,6 +658,13 @@
 
 #endif /* IDM_PRIVATE */
 
+#ifdef USBH_PRIVATE
+#define	USBH_PHY_CTRL_P0		0x200
+#define	USBH_PHY_CTRL_P1		0x204
+
+#define	USBH_PHY_CTRL_INIT		0x3ff
+#endif
+
 #ifdef GMAC_PRIVATE
 
 struct gmac_txdb {

Index: src/sys/arch/arm/broadcom/bcm53xx_usb.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.2.4.2 src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.2.4.3
--- src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.2.4.2	Wed Nov 28 22:40:24 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_usb.c	Thu Nov 29 18:42:05 2012
@@ -26,12 +26,13 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
+#define USBH_PRIVATE
 
 #include "locators.h"
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_usb.c,v 1.2.4.2 2012/11/28 22:40:24 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_usb.c,v 1.2.4.3 2012/11/29 18:42:05 matt Exp $");
 
 #include 
 #include 
@@ -242,6 +243,14 @@ bcmusb_ccb_attach(device_t parent, devic
 	0x1000, &usbsc->usbsc_ohci_bsh);
 
 	/*
+	 * Bring the PHYs out of reset.
+	 */
+	bus_space_write_4(usbsc->usbsc_bst, usbsc->usbsc_ehci_bsh,
+	USBH_PHY_CTRL_P0, USBH_PHY_CTRL_INIT);
+	bus_space_write_4(usbsc->usbsc_bst, usbsc->usbsc_ehci_bsh,
+	USBH_PHY_CTRL_P1, USBH_PHY_CTRL_INIT);
+
+	/*
 	 * Disable interrupts
 	 */
 	bus_space_write_4(usbsc->usbsc_bst, usbsc->usbsc_ohci_bsh,



CVS commit: [matt-nb6-plus] src/sys/arch/arm/cortex

2012-11-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 29 18:33:41 UTC 2012

Modified Files:
src/sys/arch/arm/cortex [matt-nb6-plus]: a9tmr.c

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.3.4.2 -r1.3.4.3 src/sys/arch/arm/cortex/a9tmr.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/arm/cortex/a9tmr.c
diff -u src/sys/arch/arm/cortex/a9tmr.c:1.3.4.2 src/sys/arch/arm/cortex/a9tmr.c:1.3.4.3
--- src/sys/arch/arm/cortex/a9tmr.c:1.3.4.2	Wed Nov 28 22:40:25 2012
+++ src/sys/arch/arm/cortex/a9tmr.c	Thu Nov 29 18:33:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9tmr.c,v 1.3.4.2 2012/11/28 22:40:25 matt Exp $	*/
+/*	$NetBSD: a9tmr.c,v 1.3.4.3 2012/11/29 18:33:41 matt Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.3.4.2 2012/11/28 22:40:25 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.3.4.3 2012/11/29 18:33:41 matt Exp $");
 
 #include 
 #include 
@@ -196,7 +196,7 @@ a9tmr_init_cpu_clock(struct cpu_info *ci
 	 * Re-enable the comparator and now enable interrupts.
 	 */
 	a9tmr_global_write(sc, TMR_GBL_INT, 1);	/* clear interrupt pending */
-	ctl |= TMR_GBL_CTL_CMP_ENABLE | TMR_GBL_CTL_INT_ENABLE | TMR_GBL_CTL_AUTO_INC;
+	ctl |= TMR_GBL_CTL_CMP_ENABLE | TMR_GBL_CTL_INT_ENABLE | TMR_GBL_CTL_AUTO_INC | TMR_CTL_ENABLE;
 	a9tmr_global_write(sc, TMR_GBL_CTL, ctl);
 #if 0
 	printf("%s: %s: ctl %#x autoinc %u cmp %#x%08x now %#"PRIx64"\n",



CVS commit: src/sys/arch/arm/include

2012-11-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 29 18:15:33 UTC 2012

Modified Files:
src/sys/arch/arm/include: armreg.h

Log Message:
Add inlines for SCTRL


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/arm/include/armreg.h

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/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.69 src/sys/arch/arm/include/armreg.h:1.70
--- src/sys/arch/arm/include/armreg.h:1.69	Thu Sep 27 21:48:17 2012
+++ src/sys/arch/arm/include/armreg.h	Thu Nov 29 18:15:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.69 2012/09/27 21:48:17 matt Exp $	*/
+/*	$NetBSD: armreg.h,v 1.70 2012/11/29 18:15:33 matt Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -580,6 +580,8 @@ ARMREG_READ_INLINE(clidr, "p15,1,%0,c0,c
 ARMREG_READ_INLINE(csselr, "p15,2,%0,c0,c0,0") /* Cache Size Selection Register */
 ARMREG_WRITE_INLINE(csselr, "p15,2,%0,c0,c0,0") /* Cache Size Selection Register */
 /* c1 registers */
+ARMREG_READ_INLINE(sctrl, "p15,0,%0,c1,c0,0") /* System Control Register */
+ARMREG_WRITE_INLINE(sctrl, "p15,0,%0,c1,c0,0") /* System Control Register */
 ARMREG_READ_INLINE(auxctl, "p15,0,%0,c1,c0,1") /* Auxiliary Control Register */
 ARMREG_WRITE_INLINE(auxctl, "p15,0,%0,c1,c0,1") /* Auxiliary Control Register */
 ARMREG_READ_INLINE(cpacr, "p15,0,%0,c1,c0,2") /* Co-Processor Access Control Register */



CVS commit: src/sys/arch/arm/broadcom

2012-11-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 29 17:38:27 UTC 2012

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_reg.h bcm53xx_usb.c

Log Message:
Make sure to bring the ULPI ports out of reset.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/broadcom/bcm53xx_reg.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm53xx_usb.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/arm/broadcom/bcm53xx_reg.h
diff -u src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.10 src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.11
--- src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.10	Thu Nov  1 21:29:42 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_reg.h	Thu Nov 29 17:38:27 2012
@@ -658,6 +658,13 @@
 
 #endif /* IDM_PRIVATE */
 
+#ifdef USBH_PRIVATE
+#define	USBH_PHY_CTRL_P0		0x200
+#define	USBH_PHY_CTRL_P1		0x204
+
+#define	USBH_PHY_CTRL_INIT		0x3ff
+#endif
+
 #ifdef GMAC_PRIVATE
 
 struct gmac_txdb {

Index: src/sys/arch/arm/broadcom/bcm53xx_usb.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.2 src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.3
--- src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.2	Thu Sep 27 00:24:36 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_usb.c	Thu Nov 29 17:38:26 2012
@@ -26,12 +26,13 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
+#define USBH_PRIVATE
 
 #include "locators.h"
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_usb.c,v 1.2 2012/09/27 00:24:36 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_usb.c,v 1.3 2012/11/29 17:38:26 matt Exp $");
 
 #include 
 #include 
@@ -242,6 +243,14 @@ bcmusb_ccb_attach(device_t parent, devic
 	0x1000, &usbsc->usbsc_ohci_bsh);
 
 	/*
+	 * Bring the PHYs out of reset.
+	 */
+	bus_space_write_4(usbsc->usbsc_bst, usbsc->usbsc_ehci_bsh,
+	USBH_PHY_CTRL_P0, USBH_PHY_CTRL_INIT);
+	bus_space_write_4(usbsc->usbsc_bst, usbsc->usbsc_ehci_bsh,
+	USBH_PHY_CTRL_P1, USBH_PHY_CTRL_INIT);
+
+	/*
 	 * Disable interrupts
 	 */
 	bus_space_write_4(usbsc->usbsc_bst, usbsc->usbsc_ohci_bsh,



CVS commit: src/sys/arch/arm/cortex

2012-11-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 29 17:36:57 UTC 2012

Modified Files:
src/sys/arch/arm/cortex: a9tmr.c

Log Message:
Make sure we enable the timer since CFE doesn't enable it by default.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/cortex/a9tmr.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/arm/cortex/a9tmr.c
diff -u src/sys/arch/arm/cortex/a9tmr.c:1.3 src/sys/arch/arm/cortex/a9tmr.c:1.4
--- src/sys/arch/arm/cortex/a9tmr.c:1.3	Thu Sep 27 00:23:27 2012
+++ src/sys/arch/arm/cortex/a9tmr.c	Thu Nov 29 17:36:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9tmr.c,v 1.3 2012/09/27 00:23:27 matt Exp $	*/
+/*	$NetBSD: a9tmr.c,v 1.4 2012/11/29 17:36:56 matt Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.3 2012/09/27 00:23:27 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.4 2012/11/29 17:36:56 matt Exp $");
 
 #include 
 #include 
@@ -196,7 +196,7 @@ a9tmr_init_cpu_clock(struct cpu_info *ci
 	 * Re-enable the comparator and now enable interrupts.
 	 */
 	a9tmr_global_write(sc, TMR_GBL_INT, 1);	/* clear interrupt pending */
-	ctl |= TMR_GBL_CTL_CMP_ENABLE | TMR_GBL_CTL_INT_ENABLE | TMR_GBL_CTL_AUTO_INC;
+	ctl |= TMR_GBL_CTL_CMP_ENABLE | TMR_GBL_CTL_INT_ENABLE | TMR_GBL_CTL_AUTO_INC | TMR_CTL_ENABLE;
 	a9tmr_global_write(sc, TMR_GBL_CTL, ctl);
 #if 0
 	printf("%s: %s: ctl %#x autoinc %u cmp %#x%08x now %#"PRIx64"\n",



CVS commit: src/tests/ipf

2012-11-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov 29 17:22:17 UTC 2012

Modified Files:
src/tests/ipf: t_nat_exec.sh

Log Message:
Update a couple of tests to indicate that they are broken/failing because
of missing input/expected data files


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/ipf/t_nat_exec.sh

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

Modified files:

Index: src/tests/ipf/t_nat_exec.sh
diff -u src/tests/ipf/t_nat_exec.sh:1.10 src/tests/ipf/t_nat_exec.sh:1.11
--- src/tests/ipf/t_nat_exec.sh:1.10	Thu Nov 29 04:57:42 2012
+++ src/tests/ipf/t_nat_exec.sh	Thu Nov 29 17:22:17 2012
@@ -1,4 +1,4 @@
-# $NetBSD: t_nat_exec.sh,v 1.10 2012/11/29 04:57:42 pgoyette Exp $
+# $NetBSD: t_nat_exec.sh,v 1.11 2012/11/29 17:22:17 pgoyette Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -85,6 +85,7 @@ test_case n106 nattest hex hex -T update
 test_case n200 nattest hex hex -T update_ipid=0
 test_case n1_6 nattest text text -6
 test_case n2_6 nattest text text -6
+failing_test_case n3_6 nattest "Test input file missing" text text -6
 test_case n4_6 nattest text text -6
 test_case n5_6 nattest text text -6
 test_case n6_6 nattest text text -6
@@ -94,7 +95,7 @@ test_case n9_6 nattest hex hex -6
 test_case n11_6 nattest text text -6
 test_case n12_6 nattest hex hex -6
 test_case n15_6 nattest text text -6
-broken_test_case n17_6 nattest hex hex -6
+failing_test_case n17_6 nattest "Test input file missing" hex hex -6
 
 atf_init_test_cases()
 {
@@ -125,7 +126,7 @@ atf_init_test_cases()
 
 	atf_add_test_case n1_6
 	atf_add_test_case n2_6
-#	atf_add_test_case n3_6
+	atf_add_test_case n3_6
 	atf_add_test_case n4_6
 	atf_add_test_case n5_6
 	atf_add_test_case n6_6



CVS commit: src/tests/ipf

2012-11-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov 29 17:11:19 UTC 2012

Modified Files:
src/tests/ipf: t_filter_parse.sh

Log Message:
Now that I've created PR/47262, reference it in the tests that fail
because of the PR


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/ipf/t_filter_parse.sh

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

Modified files:

Index: src/tests/ipf/t_filter_parse.sh
diff -u src/tests/ipf/t_filter_parse.sh:1.6 src/tests/ipf/t_filter_parse.sh:1.7
--- src/tests/ipf/t_filter_parse.sh:1.6	Sun Jul  8 00:53:01 2012
+++ src/tests/ipf/t_filter_parse.sh	Thu Nov 29 17:11:19 2012
@@ -1,4 +1,4 @@
-# $NetBSD: t_filter_parse.sh,v 1.6 2012/07/08 00:53:01 pgoyette Exp $
+# $NetBSD: t_filter_parse.sh,v 1.7 2012/11/29 17:11:19 pgoyette Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -96,12 +96,12 @@ test_case i10 itest text ipf
 test_case i11 itest text ipf
 test_case i12 itest text ipf
 test_case i13 itest text ipf
-test_case i14 itest text ipf
+failing_test_case i14 itest "PR kern/47262 Proto-family missing from logs" text ipf
 test_case i15 itest text ipf
 test_case i16 itest text ipf
 broken_test_case i17 itest text ipftest
 test_case i18 itest text ipf
-test_case i19 itest_i19 text ipf
+failing_test_case i19 itest_i19 "PR kern/47262 Proto-family missing from logs" text ipf
 test_case i20 itest text ipf
 test_case i21 itest text ipf
 test_case i22 itest text ipf



CVS commit: src/tests/ipf

2012-11-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov 29 17:10:21 UTC 2012

Modified Files:
src/tests/ipf: h_common.sh

Log Message:
Add another test option for expected failures, rather than simply
skipping tests


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/ipf/h_common.sh

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

Modified files:

Index: src/tests/ipf/h_common.sh
diff -u src/tests/ipf/h_common.sh:1.3 src/tests/ipf/h_common.sh:1.4
--- src/tests/ipf/h_common.sh:1.3	Sun Nov  7 17:51:19 2010
+++ src/tests/ipf/h_common.sh	Thu Nov 29 17:10:21 2012
@@ -1,4 +1,4 @@
-# $NetBSD: h_common.sh,v 1.3 2010/11/07 17:51:19 jmmv Exp $
+# $NetBSD: h_common.sh,v 1.4 2012/11/29 17:10:21 pgoyette Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -62,3 +62,16 @@ broken_test_case()
 		${check_function} '${name}' " "${@}" "; \
 	}"
 }
+
+failing_test_case()
+{
+	local name="${1}"; shift
+	local check_function="${1}"; shift
+	local reason="${1}; shift
+
+	atf_test_case "${name}"
+	eval "${name}_body() { \
+		atf_tc_expect_fail "${reason}"; \
+		${check_function} '${name}' " "${@}" "; \
+	}"
+}



CVS commit: [matt-nb6-plus] src/sys/compat/linux/arch/arm

2012-11-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov 29 16:31:01 UTC 2012

Modified Files:
src/sys/compat/linux/arch/arm [matt-nb6-plus]: linux_machdep.c

Log Message:
Sync with HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.16.1 src/sys/compat/linux/arch/arm/linux_machdep.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/compat/linux/arch/arm/linux_machdep.c
diff -u src/sys/compat/linux/arch/arm/linux_machdep.c:1.29 src/sys/compat/linux/arch/arm/linux_machdep.c:1.29.16.1
--- src/sys/compat/linux/arch/arm/linux_machdep.c:1.29	Wed Jul  7 01:30:33 2010
+++ src/sys/compat/linux/arch/arm/linux_machdep.c	Thu Nov 29 16:31:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.29 2010/07/07 01:30:33 chs Exp $	*/
+/*	$NetBSD: linux_machdep.c,v 1.29.16.1 2012/11/29 16:31:01 matt Exp $	*/
 
 /*-
  * Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.29 2010/07/07 01:30:33 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.29.16.1 2012/11/29 16:31:01 matt Exp $");
 
 #include 
 #include 
@@ -76,15 +76,14 @@ linux_setregs(struct lwp *l, struct exec
 void
 linux_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
 {
-	struct lwp *l = curlwp;
-	struct proc *p = l->l_proc;
-	struct trapframe *tf;
+	struct lwp * const l = curlwp;
+	struct proc * const p = l->l_proc;
+	struct trapframe * const tf = lwp_trapframe(l);
 	struct linux_sigframe *fp, frame;
 	int onstack, error;
 	const int sig = ksi->ksi_signo;
 	sig_t catcher = SIGACTION(p, sig).sa_handler;
 
-	tf = process_frame(l);
 
 	/*
 	 * The Linux version of this code is in
@@ -195,13 +194,11 @@ int
 linux_sys_sigreturn(struct lwp *l, const struct linux_sys_sigreturn_args *v,
 	register_t *retval)
 {
+	struct trapframe * const tf = lwp_trapframe(l);
+	struct proc * const p = l->l_proc;
 	struct linux_sigframe *sfp, frame;
-	struct proc *p = l->l_proc;
-	struct trapframe *tf;
 	sigset_t mask;
 
-	tf = process_frame(l);
-
 	/*
 	 * The trampoline code hands us the context.
 	 * It is unsafe to keep track of it ourselves, in the event that a
@@ -219,7 +216,6 @@ linux_sys_sigreturn(struct lwp *l, const
 		return EINVAL;
 
 	/* Restore register context. */
-	tf = process_frame(l);
 	tf->tf_r0= frame.sf_sc.sc_r0;
 	tf->tf_r1= frame.sf_sc.sc_r1;
 	tf->tf_r2= frame.sf_sc.sc_r2;



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

2012-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 29 16:18:35 UTC 2012

Modified Files:
src/distrib/sets/lists/base: shl.mi

Log Message:
add libpnf to /lib


To generate a diff of this commit:
cvs rdiff -u -r1.640 -r1.641 src/distrib/sets/lists/base/shl.mi

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/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.640 src/distrib/sets/lists/base/shl.mi:1.641
--- src/distrib/sets/lists/base/shl.mi:1.640	Tue Nov 20 00:27:22 2012
+++ src/distrib/sets/lists/base/shl.mi	Thu Nov 29 11:18:35 2012
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.640 2012/11/20 05:27:22 agc Exp $
+# $NetBSD: shl.mi,v 1.641 2012/11/29 16:18:35 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -46,6 +46,9 @@
 ./lib/liblzma.sobase-sys-shlib		dynamicroot
 ./lib/liblzma.so.1base-sys-shlib		dynamicroot
 ./lib/liblzma.so.1.1base-sys-shlib		dynamicroot
+./lib/libnpf.so	base-sys-shlib		dynamicroot
+./lib/libnpf.so.0base-sys-shlib		dynamicroot
+./lib/libnpf.so.0.0base-sys-shlib		dynamicroot
 ./lib/libm.so	base-sys-shlib		dynamicroot
 ./lib/libm.so.0	base-sys-shlib		dynamicroot
 ./lib/libm.so.0.10base-sys-shlib		dynamicroot



CVS commit: src/lib/libnpf

2012-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 29 16:17:15 UTC 2012

Modified Files:
src/lib/libnpf: Makefile

Log Message:
install in /lib too because npfctl is linked against it.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libnpf/Makefile

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

Modified files:

Index: src/lib/libnpf/Makefile
diff -u src/lib/libnpf/Makefile:1.3 src/lib/libnpf/Makefile:1.4
--- src/lib/libnpf/Makefile:1.3	Sun Sep 16 09:47:42 2012
+++ src/lib/libnpf/Makefile	Thu Nov 29 11:17:14 2012
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2012/09/16 13:47:42 rmind Exp $
+# $NetBSD: Makefile,v 1.4 2012/11/29 16:17:14 christos Exp $
 
 .include 
 
+USE_SHLIBDIR=   yes
+
 LIB=		npf
 MAN=		npf.3
 



CVS commit: src/tests/ipf

2012-11-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov 29 16:05:34 UTC 2012

Modified Files:
src/tests/ipf: t_bpf.sh

Log Message:
Even though this test is currently disabled, fix it so it looks for the
correct input and expected-output files for test case bpf_f1


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/ipf/t_bpf.sh

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

Modified files:

Index: src/tests/ipf/t_bpf.sh
diff -u src/tests/ipf/t_bpf.sh:1.2 src/tests/ipf/t_bpf.sh:1.3
--- src/tests/ipf/t_bpf.sh:1.2	Tue Oct 19 16:36:36 2010
+++ src/tests/ipf/t_bpf.sh	Thu Nov 29 16:05:34 2012
@@ -1,4 +1,4 @@
-# $NetBSD: t_bpf.sh,v 1.2 2010/10/19 16:36:36 jmmv Exp $
+# $NetBSD: t_bpf.sh,v 1.3 2012/11/29 16:05:34 pgoyette Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -46,7 +46,7 @@ itest()
 
 bpftest()
 {
-	h_copydata $(echo ${1} | tr _ .)
+	h_copydata $(echo ${1} | tr _ -)
 	cp "$(atf_get_srcdir)/input/$(echo ${1} | sed s,bpf_,,)" in
 
 	{ while read rule; do



CVS commit: src/crypto/dist/ipsec-tools/src

2012-11-29 Thread VANHULLEBUS Yvan
Module Name:src
Committed By:   vanhu
Date:   Thu Nov 29 15:31:25 UTC 2012

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: algorithm.c algorithm.h
cfparse.y cftoken.l crypto_openssl.c crypto_openssl.h ipsec_doi.c
ipsec_doi.h pfkey.c racoon.conf.5 strnames.c
src/crypto/dist/ipsec-tools/src/setkey: token.l

Log Message:
Added support for AES GCM 16 in phase2 negociations. Code from Christophe Carre 
/ NETASQ


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/crypto/dist/ipsec-tools/src/racoon/algorithm.c
cvs rdiff -u -r1.5 -r1.6 src/crypto/dist/ipsec-tools/src/racoon/algorithm.h
cvs rdiff -u -r1.47 -r1.48 src/crypto/dist/ipsec-tools/src/racoon/cfparse.y \
src/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
cvs rdiff -u -r1.26 -r1.27 src/crypto/dist/ipsec-tools/src/racoon/cftoken.l
cvs rdiff -u -r1.21 -r1.22 \
src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.h
cvs rdiff -u -r1.13 -r1.14 src/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.h
cvs rdiff -u -r1.58 -r1.59 src/crypto/dist/ipsec-tools/src/racoon/pfkey.c
cvs rdiff -u -r1.64 -r1.65 \
src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5
cvs rdiff -u -r1.9 -r1.10 src/crypto/dist/ipsec-tools/src/racoon/strnames.c
cvs rdiff -u -r1.17 -r1.18 src/crypto/dist/ipsec-tools/src/setkey/token.l

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/algorithm.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/algorithm.c:1.8 src/crypto/dist/ipsec-tools/src/racoon/algorithm.c:1.9
--- src/crypto/dist/ipsec-tools/src/racoon/algorithm.c:1.8	Fri Oct  6 12:02:27 2006
+++ src/crypto/dist/ipsec-tools/src/racoon/algorithm.c	Thu Nov 29 15:31:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: algorithm.c,v 1.8 2006/10/06 12:02:27 manu Exp $	*/
+/*	$NetBSD: algorithm.c,v 1.9 2012/11/29 15:31:24 vanhu Exp $	*/
 
 /* Id: algorithm.c,v 1.15 2006/05/23 20:23:09 manubsd Exp */
 
@@ -165,6 +165,9 @@ static struct enc_algorithm ipsec_encdef
 { "aes",	algtype_aes,		IPSECDOI_ESP_AES,		16,
 		NULL,			NULL,
 		NULL,			eay_aes_keylen, },
+{ "aes_gcm_16",	algtype_aesgcm16,		IPSECDOI_ESP_AESGCM16,		16,
+		NULL,			NULL,
+		NULL,			eay_aesgcm_keylen, },
 { "twofish",	algtype_twofish,	IPSECDOI_ESP_TWOFISH,		16,
 		NULL,			NULL,
 		NULL,			eay_twofish_keylen, },
@@ -798,6 +801,7 @@ default_keylen(class, type)
 	case algtype_rc5:
 	case algtype_cast128:
 	case algtype_aes:
+	case algtype_aesgcm16:
 	case algtype_twofish:
 	case algtype_camellia:
 		return 128;
@@ -834,6 +838,7 @@ check_keylen(class, type, len)
 	case algtype_rc5:
 	case algtype_cast128:
 	case algtype_aes:
+	case algtype_aesgcm16:
 	case algtype_twofish:
 	case algtype_camellia:
 		if (len % 8 != 0) {
@@ -863,6 +868,10 @@ check_keylen(class, type, len)
 		if (!(len == 128 || len == 192 || len == 256))
 			badrange++;
 		break;
+	case algtype_aesgcm16:
+		if (!(len == 128 || len == 192 || len == 256))
+			badrange++;
+		break;
 	case algtype_twofish:
 		if (len < 40 || 256 < len)
 			badrange++;

Index: src/crypto/dist/ipsec-tools/src/racoon/algorithm.h
diff -u src/crypto/dist/ipsec-tools/src/racoon/algorithm.h:1.5 src/crypto/dist/ipsec-tools/src/racoon/algorithm.h:1.6
--- src/crypto/dist/ipsec-tools/src/racoon/algorithm.h:1.5	Fri Oct  6 12:02:27 2006
+++ src/crypto/dist/ipsec-tools/src/racoon/algorithm.h	Thu Nov 29 15:31:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: algorithm.h,v 1.5 2006/10/06 12:02:27 manu Exp $	*/
+/*	$NetBSD: algorithm.h,v 1.6 2012/11/29 15:31:24 vanhu Exp $	*/
 
 /* Id: algorithm.h,v 1.10 2005/04/09 16:25:23 manubsd Exp */
 
@@ -69,6 +69,7 @@ enum algtype {
 	algtype_rc4,
 	algtype_null_enc,
 	algtype_aes,
+	algtype_aesgcm16,
 	algtype_twofish,
 	algtype_camellia,
 

Index: src/crypto/dist/ipsec-tools/src/racoon/cfparse.y
diff -u src/crypto/dist/ipsec-tools/src/racoon/cfparse.y:1.47 src/crypto/dist/ipsec-tools/src/racoon/cfparse.y:1.48
--- src/crypto/dist/ipsec-tools/src/racoon/cfparse.y:1.47	Sun Jan  1 16:14:11 2012
+++ src/crypto/dist/ipsec-tools/src/racoon/cfparse.y	Thu Nov 29 15:31:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cfparse.y,v 1.47 2012/01/01 16:14:11 tteras Exp $	*/
+/*	$NetBSD: cfparse.y,v 1.48 2012/11/29 15:31:24 vanhu Exp $	*/
 
 /* Id: cfparse.y,v 1.66 2006/08/22 18:17:17 manubsd Exp */
 
@@ -1722,6 +1722,7 @@ algorithm
 	:	ALGORITHMTYPE keylength
 		{
 			int defklen;
+			int encklen_tmp;
 
 			$$ = newsainfoalg();
 			if ($$ == NULL) {
@@ -1754,9 +1755,35 @@ algorithm
 			else
 $$->encklen = defklen;
 
+			/* Check keymat size instead of "human" key size
+			 * because kernel store keymat size instead of "human key size".
+			 * For example, the keymat size of aes_gcm_16 128 is 160 bits
+			 * (128 bits + 4 bytes) instead of 128 bits.
+			 *
+			 * Currently, it is only useful for aes_gcm_16 (ipsec_enc).
+			 */
+			if (cu

CVS commit: src/sys/fs/smbfs

2012-11-29 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Thu Nov 29 11:58:49 UTC 2012

Modified Files:
src/sys/fs/smbfs: smbfs_node.c smbfs_vnops.c

Log Message:
- Remove redundant vput() before vgone().
- Avoid unnecessary mutex_exit() in smbfs_node_alloc().
- Set NGONE bit to from-name vnode to invalidate the smbnode cache.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/fs/smbfs/smbfs_node.c
cvs rdiff -u -r1.83 -r1.84 src/sys/fs/smbfs/smbfs_vnops.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/fs/smbfs/smbfs_node.c
diff -u src/sys/fs/smbfs/smbfs_node.c:1.48 src/sys/fs/smbfs/smbfs_node.c:1.49
--- src/sys/fs/smbfs/smbfs_node.c:1.48	Wed Nov 28 13:34:24 2012
+++ src/sys/fs/smbfs/smbfs_node.c	Thu Nov 29 11:58:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: smbfs_node.c,v 1.48 2012/11/28 13:34:24 nakayama Exp $	*/
+/*	$NetBSD: smbfs_node.c,v 1.49 2012/11/29 11:58:49 nakayama Exp $	*/
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smbfs_node.c,v 1.48 2012/11/28 13:34:24 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbfs_node.c,v 1.49 2012/11/29 11:58:49 nakayama Exp $");
 
 #include 
 #include 
@@ -150,15 +150,16 @@ retry:
 		 */
 		if ((vp->v_type == VDIR && (np->n_dosattr & SMB_FA_DIR) == 0) ||
 		(vp->v_type == VREG && (np->n_dosattr & SMB_FA_DIR) != 0)) {
-			vput(vp);
+			VOP_UNLOCK(vp);
 			vgone(vp);
-			break;
+			goto allocnew;
 		}
 		*vpp = vp;
 		return (0);
 	}
 	mutex_exit(&smp->sm_hashlock);
 
+allocnew:
 	/*
 	 * If we don't have node attributes, then it is an explicit lookup
 	 * for an existing vnode.

Index: src/sys/fs/smbfs/smbfs_vnops.c
diff -u src/sys/fs/smbfs/smbfs_vnops.c:1.83 src/sys/fs/smbfs/smbfs_vnops.c:1.84
--- src/sys/fs/smbfs/smbfs_vnops.c:1.83	Wed Nov 28 13:34:24 2012
+++ src/sys/fs/smbfs/smbfs_vnops.c	Thu Nov 29 11:58:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: smbfs_vnops.c,v 1.83 2012/11/28 13:34:24 nakayama Exp $	*/
+/*	$NetBSD: smbfs_vnops.c,v 1.84 2012/11/29 11:58:49 nakayama Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smbfs_vnops.c,v 1.83 2012/11/28 13:34:24 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbfs_vnops.c,v 1.84 2012/11/29 11:58:49 nakayama Exp $");
 
 #include 
 #include 
@@ -725,6 +725,7 @@ smbfs_rename(void *v)
 		}
 		error = smbfs_smb_rename(VTOSMB(fvp), VTOSMB(tdvp),
 		tcnp->cn_nameptr, tcnp->cn_namelen, &scred);
+		VTOSMB(fvp)->n_flag |= NGONE;
 		VN_KNOTE(fdvp, NOTE_WRITE);
 		VN_KNOTE(fvp, NOTE_RENAME);
 	}
@@ -1270,9 +1271,11 @@ smbfs_lookup(void *v)
 
 		cache_purge(newvp);
 		if (newvp != dvp) {
-			vput(newvp);
-			if (killit)
+			if (killit) {
+VOP_UNLOCK(newvp);
 vgone(newvp);
+			} else
+vput(newvp);
 		} else
 			vrele(newvp);
 		*vpp = NULLVP;



CVS commit: src/share/man/man8/man8.sandpoint

2012-11-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Nov 29 11:34:33 UTC 2012

Modified Files:
src/share/man/man8/man8.sandpoint: altboot.8

Log Message:
New sentence, new line.
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man8/man8.sandpoint/altboot.8

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

Modified files:

Index: src/share/man/man8/man8.sandpoint/altboot.8
diff -u src/share/man/man8/man8.sandpoint/altboot.8:1.8 src/share/man/man8/man8.sandpoint/altboot.8:1.9
--- src/share/man/man8/man8.sandpoint/altboot.8:1.8	Thu Nov 29 10:44:37 2012
+++ src/share/man/man8/man8.sandpoint/altboot.8	Thu Nov 29 11:34:33 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: altboot.8,v 1.8 2012/11/29 10:44:37 phx Exp $
+.\" $NetBSD: altboot.8,v 1.9 2012/11/29 11:34:33 wiz Exp $
 .\"
 .\" Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 22, 2012
+.Dd November 29, 2012
 .Dt ALTBOOT 8 sandpoint
 .Os
 .Sh NAME
@@ -279,4 +279,5 @@ first appeared in
 .Sh BUGS
 The Realtek Gigabit Ethernet driver does not work correctly at 1000 Mbps.
 Another known problem of this driver is that it runs into a timeout after
-a coldstart. The system has to be rebooted at least once to make it work.
+a coldstart.
+The system has to be rebooted at least once to make it work.



CVS commit: src/share/man/man8/man8.sandpoint

2012-11-29 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Thu Nov 29 10:44:37 UTC 2012

Modified Files:
src/share/man/man8/man8.sandpoint: altboot.8

Log Message:
Mention Realtek driver bugs in the BUGS section.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man8/man8.sandpoint/altboot.8

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

Modified files:

Index: src/share/man/man8/man8.sandpoint/altboot.8
diff -u src/share/man/man8/man8.sandpoint/altboot.8:1.7 src/share/man/man8/man8.sandpoint/altboot.8:1.8
--- src/share/man/man8/man8.sandpoint/altboot.8:1.7	Sun Jan 22 16:41:42 2012
+++ src/share/man/man8/man8.sandpoint/altboot.8	Thu Nov 29 10:44:37 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: altboot.8,v 1.7 2012/01/22 16:41:42 wiz Exp $
+.\" $NetBSD: altboot.8,v 1.8 2012/11/29 10:44:37 phx Exp $
 .\"
 .\" Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -276,3 +276,7 @@ The
 .Nm
 first appeared in
 .Nx 6.0 .
+.Sh BUGS
+The Realtek Gigabit Ethernet driver does not work correctly at 1000 Mbps.
+Another known problem of this driver is that it runs into a timeout after
+a coldstart. The system has to be rebooted at least once to make it work.



CVS commit: src/sys/dev/sysmon

2012-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 29 10:29:46 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Remove trailing white space(s) from name of random source.
And also, changind space(s) in the middle with '-'.
PR#47232.


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/dev/sysmon/sysmon_envsys.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/sysmon/sysmon_envsys.c
diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.125 src/sys/dev/sysmon/sysmon_envsys.c:1.126
--- src/sys/dev/sysmon/sysmon_envsys.c:1.125	Thu Sep  6 12:21:40 2012
+++ src/sys/dev/sysmon/sysmon_envsys.c	Thu Nov 29 10:29:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_envsys.c,v 1.125 2012/09/06 12:21:40 pgoyette Exp $	*/
+/*	$NetBSD: sysmon_envsys.c,v 1.126 2012/11/29 10:29:45 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.125 2012/09/06 12:21:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.126 2012/11/29 10:29:45 msaitoh Exp $");
 
 #include 
 #include 
@@ -778,8 +778,25 @@ out:
 		 */
 		TAILQ_FOREACH(edata, &sme->sme_sensors_list, sensors_head) {
 			if (edata->flags & ENVSYS_FHAS_ENTROPY) {
+size_t n;
+int tail = 1;
+
 snprintf(rnd_name, sizeof(rnd_name), "%s-%s",
 sme->sme_name, edata->desc);
+n = strlen(rnd_name);
+/*
+ * 1) Remove trailing white space(s).
+ * 2) If space exist, replace it with '-'
+ */
+while (--n) {
+	if (rnd_name[n] == ' ') {
+		if (tail != 0)
+			rnd_name[n] = '\0';
+		else
+			rnd_name[n] = '-';
+	} else
+		tail = 0;
+}
 rnd_attach_source(&edata->rnd_src, rnd_name,
 RND_TYPE_ENV, 0);
 			}



CVS commit: src/tests/lib/libc/sys

2012-11-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Nov 29 09:13:44 UTC 2012

Modified Files:
src/tests/lib/libc/sys: t_kevent.c

Log Message:
Skip kqueue_unsupported_fd if the drvctl device is not present.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/sys/t_kevent.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_kevent.c
diff -u src/tests/lib/libc/sys/t_kevent.c:1.5 src/tests/lib/libc/sys/t_kevent.c:1.6
--- src/tests/lib/libc/sys/t_kevent.c:1.5	Sat Nov 24 15:05:45 2012
+++ src/tests/lib/libc/sys/t_kevent.c	Thu Nov 29 09:13:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_kevent.c,v 1.5 2012/11/24 15:05:45 christos Exp $ */
+/*	$NetBSD: t_kevent.c,v 1.6 2012/11/29 09:13:44 martin Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_kevent.c,v 1.5 2012/11/24 15:05:45 christos Exp $");
+__RCSID("$NetBSD: t_kevent.c,v 1.6 2012/11/29 09:13:44 martin Exp $");
 
 #include 
 #include 
@@ -43,6 +43,7 @@ __RCSID("$NetBSD: t_kevent.c,v 1.5 2012/
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -148,11 +149,13 @@ ATF_TC_HEAD(kqueue_unsupported_fd, tc)
 ATF_TC_BODY(kqueue_unsupported_fd, tc)
 {
 	/* mqueue and semaphore use fnullop_kqueue also */
-	static const char drvctl[] = "/dev/drvctl";
 	int fd, kq;
 	struct kevent ev;
 
-	ATF_REQUIRE((fd = open(drvctl, O_RDONLY)) != -1);
+	fd = open(DRVCTLDEV, O_RDONLY);
+	if (fd == -1 && errno == ENOENT)
+		atf_tc_skip("no " DRVCTLDEV " available for testing");
+	ATF_REQUIRE(fd != -1);
 	ATF_REQUIRE((kq = kqueue()) != -1);
 
 	EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR,