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

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 23:00:01 UTC 2019

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

Log Message:
Add new tests traceme_vfork_clone* in ATF t_ptrace_wait*

Added tests:

 - traceme_vfork_clone
 - traceme_vfork_clone_vm
 - traceme_vfork_clone_fs
 - traceme_vfork_clone_files
 - traceme_vfork_clone_sighand
 - traceme_vfork_clone_vfork

All tests pass. Validate that children do not trigger any signals and dead
locks when traced by a vfork(2)ed parent.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/tests/lib/libc/sys/t_ptrace_wait.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_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.106 src/tests/lib/libc/sys/t_ptrace_wait.c:1.107
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.106	Thu Apr 11 19:25:31 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Thu Apr 11 23:00:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.106 2019/04/11 19:25:31 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.107 2019/04/11 23:00:01 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.106 2019/04/11 19:25:31 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.107 2019/04/11 23:00:01 kamil Exp $");
 
 #include 
 #include 
@@ -6936,6 +6936,89 @@ CLONE_TEST2(clone_vfork_signalmasked, CL
 
 /// 
 
+#if defined(TWAIT_HAVE_PID)
+static void
+traceme_vfork_clone_body(int flags)
+{
+	const int exitval = 5;
+	const int exitval2 = 15;
+	pid_t child, child2 = 0, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+	int status;
+#endif
+
+	const size_t stack_size = 1024 * 1024;
+	void *stack, *stack_base;
+
+	stack = malloc(stack_size);
+	ATF_REQUIRE(stack != NULL);
+
+#ifdef __MACHINE_STACK_GROWS_UP
+	stack_base = stack;
+#else
+	stack_base = (char *)stack + stack_size;
+#endif
+
+	SYSCALL_REQUIRE((child = vfork()) != -1);
+	if (child == 0) {
+		DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid());
+		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+		DPRINTF("Before forking process PID=%d flags=%#x\n", getpid(),
+		flags);
+		SYSCALL_REQUIRE((child2 = __clone(clone_func, stack_base,
+		flags|SIGCHLD, (void *)(intptr_t)exitval2)) != -1);
+
+		DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(),
+		child2);
+
+		// XXX WALLSIG?
+		FORKEE_REQUIRE_SUCCESS
+		(wpid = TWAIT_GENERIC(child2, , WALLSIG), child2);
+
+		forkee_status_exited(status, exitval2);
+
+		DPRINTF("Before exiting of the child process\n");
+		_exit(exitval);
+	}
+	DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+	DPRINTF("Before calling %s() for the child - expected exited\n",
+	TWAIT_FNAME);
+	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
+
+	validate_status_exited(status, exitval);
+
+	DPRINTF("Before calling %s() for the child - expected no process\n",
+	TWAIT_FNAME);
+	TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0));
+}
+
+#define TRACEME_VFORK_CLONE_TEST(name,flags)\
+ATF_TC(name);\
+ATF_TC_HEAD(name, tc)			\
+{	\
+	atf_tc_set_md_var(tc, "descr", "Verify that clone(%s) is "	\
+	"handled correctly with vfork(2)ed tracer", 		\
+	#flags);			\
+}	\
+	\
+ATF_TC_BODY(name, tc)			\
+{	\
+	\
+	traceme_vfork_clone_body(flags);\
+}
+
+TRACEME_VFORK_CLONE_TEST(traceme_vfork_clone, 0)
+TRACEME_VFORK_CLONE_TEST(traceme_vfork_clone_vm, CLONE_VM)
+TRACEME_VFORK_CLONE_TEST(traceme_vfork_clone_fs, CLONE_FS)
+TRACEME_VFORK_CLONE_TEST(traceme_vfork_clone_files, CLONE_FILES)
+//TRACEME_VFORK_CLONE_TEST(traceme_vfork_clone_sighand, CLONE_SIGHAND)  // XXX
+TRACEME_VFORK_CLONE_TEST(traceme_vfork_clone_vfork, CLONE_VFORK)
+#endif
+
+/// 
+
 #include "t_ptrace_amd64_wait.h"
 #include "t_ptrace_i386_wait.h"
 #include "t_ptrace_x86_wait.h"
@@ -7342,6 +7425,13 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_ADD_TC_HAVE_PID(tp, clone_vfork_signalignored);
 	ATF_TP_ADD_TC_HAVE_PID(tp, clone_vfork_signalmasked);
 
+	ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone);
+	ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_vm);
+	ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_fs);
+	ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_files);
+//	ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_sighand); // XXX
+	ATF_TP_ADD_TC_HAVE_PID(tp, traceme_vfork_clone_vfork);
+
 	ATF_TP_ADD_TCS_PTRACE_WAIT_AMD64();
 	ATF_TP_ADD_TCS_PTRACE_WAIT_I386();
 	ATF_TP_ADD_TCS_PTRACE_WAIT_X86();



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

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 23:23:53 UTC 2019

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

Log Message:
Add new tests in ATF t_prace_wait*

New tests:

 - traceme_vfork_fork
 - traceme_vfork_vfork

New tests assert that fork/vfork in vforked traced does not emit any
events.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/tests/lib/libc/sys/t_ptrace_wait.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_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.107 src/tests/lib/libc/sys/t_ptrace_wait.c:1.108
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.107	Thu Apr 11 23:00:01 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Thu Apr 11 23:23:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.107 2019/04/11 23:00:01 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.108 2019/04/11 23:23:53 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.107 2019/04/11 23:00:01 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.108 2019/04/11 23:23:53 kamil Exp $");
 
 #include 
 #include 
@@ -3163,6 +3163,67 @@ FORK_TEST(vfork8, vfork, true, true, tru
 
 /// 
 
+static void
+traceme_vfork_fork_body(pid_t (*fn)(void))
+{
+	const int exitval = 5;
+	const int exitval2 = 15;
+	pid_t child, child2 = 0, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+	int status;
+#endif
+
+	DPRINTF("Before forking process PID=%d\n", getpid());
+	SYSCALL_REQUIRE((child = vfork()) != -1);
+	if (child == 0) {
+		DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid());
+		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+		FORKEE_ASSERT((child2 = (fn)()) != -1);
+
+		if (child2 == 0)
+			_exit(exitval2);
+
+		FORKEE_REQUIRE_SUCCESS
+		(wpid = TWAIT_GENERIC(child2, , 0), child2);
+
+		forkee_status_exited(status, exitval2);
+
+		DPRINTF("Before exiting of the child process\n");
+		_exit(exitval);
+	}
+	DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+	DPRINTF("Before calling %s() for the child - expected exited\n",
+	TWAIT_FNAME);
+	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
+
+	validate_status_exited(status, exitval);
+
+	DPRINTF("Before calling %s() for the child - expected no process\n",
+	TWAIT_FNAME);
+	TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0));
+}
+
+#define TRACEME_VFORK_FORK_TEST(name,fun)\
+ATF_TC(name);\
+ATF_TC_HEAD(name, tc)			\
+{	\
+	atf_tc_set_md_var(tc, "descr", "Verify " #fun "(2) "		\
+	"called from vfork(2)ed child");\
+}	\
+	\
+ATF_TC_BODY(name, tc)			\
+{	\
+	\
+	traceme_vfork_fork_body(fun);	\
+}
+
+TRACEME_VFORK_FORK_TEST(traceme_vfork_fork, fork)
+TRACEME_VFORK_FORK_TEST(traceme_vfork_vfork, vfork)
+
+/// 
+
 enum bytes_transfer_type {
 	BYTES_TRANSFER_DATA,
 	BYTES_TRANSFER_DATAIO,
@@ -7224,6 +7285,9 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_ADD_TC_HAVE_PID(tp, vfork7);
 	ATF_TP_ADD_TC_HAVE_PID(tp, vfork8);
 
+	ATF_TP_ADD_TC(tp, traceme_vfork_fork);
+	ATF_TP_ADD_TC(tp, traceme_vfork_vfork);
+
 	ATF_TP_ADD_TC(tp, bytes_transfer_piod_read_d_8);
 	ATF_TP_ADD_TC(tp, bytes_transfer_piod_read_d_16);
 	ATF_TP_ADD_TC(tp, bytes_transfer_piod_read_d_32);



CVS commit: src/distrib

2019-04-11 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Thu Apr 11 23:50:01 UTC 2019

Modified Files:
src/distrib/amd64/ramdisks/ramdisk-cgdroot: list
src/distrib/i386/ramdisks/ramdisk-cgdroot: list

Log Message:
Add a symlink to /altroot/stand to help the kernel find modules.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/ramdisks/ramdisk-cgdroot/list
cvs rdiff -u -r1.1 -r1.2 src/distrib/i386/ramdisks/ramdisk-cgdroot/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/amd64/ramdisks/ramdisk-cgdroot/list
diff -u src/distrib/amd64/ramdisks/ramdisk-cgdroot/list:1.1 src/distrib/amd64/ramdisks/ramdisk-cgdroot/list:1.2
--- src/distrib/amd64/ramdisks/ramdisk-cgdroot/list:1.1	Mon Jul 15 00:22:10 2013
+++ src/distrib/amd64/ramdisks/ramdisk-cgdroot/list	Thu Apr 11 23:50:01 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.1 2013/07/15 00:22:10 khorben Exp $
+#	$NetBSD: list,v 1.2 2019/04/11 23:50:01 alnsn Exp $
 
 PROG	bin/chio
 PROG	bin/dd
@@ -30,3 +30,5 @@ PROG	usr/bin/tip
 PROG	usr/sbin/installboot
 
 PROG	usr/sbin/wiconfig
+
+SYMLINK	/altroot/stand	stand

Index: src/distrib/i386/ramdisks/ramdisk-cgdroot/list
diff -u src/distrib/i386/ramdisks/ramdisk-cgdroot/list:1.1 src/distrib/i386/ramdisks/ramdisk-cgdroot/list:1.2
--- src/distrib/i386/ramdisks/ramdisk-cgdroot/list:1.1	Tue Jul 16 02:10:43 2013
+++ src/distrib/i386/ramdisks/ramdisk-cgdroot/list	Thu Apr 11 23:50:01 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.1 2013/07/16 02:10:43 khorben Exp $
+#	$NetBSD: list,v 1.2 2019/04/11 23:50:01 alnsn Exp $
 
 PROG	bin/chio
 PROG	bin/dd
@@ -30,3 +30,5 @@ PROG	usr/bin/tip
 PROG	usr/sbin/installboot
 
 PROG	usr/sbin/wiconfig
+
+SYMLINK	/altroot/stand	stand



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

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 19:25:31 UTC 2019

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

Log Message:
Validate that clone(2) is handled properly with more ptrace(2) ATF tests

New tests:

 - clone[1-8]
 - clone_vm[1-8]
 - clone_fs[1-8]
 - clone_files[1-8]
 - clone_sighand[1-8] // disabled temporarily
 - clone_vfork[1-8]

Assert that appropriate events are triggered for the combination of:

 - PTRACE_FORK
 - PTRACE_VFORK
 - PTRACE_VFORK_DONE


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/tests/lib/libc/sys/t_ptrace_wait.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_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.105 src/tests/lib/libc/sys/t_ptrace_wait.c:1.106
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.105	Sat Apr  6 15:35:09 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Thu Apr 11 19:25:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.105 2019/04/06 15:35:09 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.106 2019/04/11 19:25:31 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.105 2019/04/06 15:35:09 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.106 2019/04/11 19:25:31 kamil Exp $");
 
 #include 
 #include 
@@ -6283,19 +6283,297 @@ ATF_TC_BODY(syscallemu1, tc)
 
 /// 
 
-#if defined(TWAIT_HAVE_PID)
-static int
-clone_func(void *arg)
+static void
+clone_body(int flags, bool trackfork, bool trackvfork,
+bool trackvforkdone)
 {
-	int ret;
+	const int exitval = 5;
+	const int exitval2 = 15;
+	const int sigval = SIGSTOP;
+	pid_t child, child2 = 0, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+	int status;
+#endif
+	ptrace_state_t state;
+	const int slen = sizeof(state);
+	ptrace_event_t event;
+	const int elen = sizeof(event);
+
+	const size_t stack_size = 1024 * 1024;
+	void *stack, *stack_base;
+
+	stack = malloc(stack_size);
+	ATF_REQUIRE(stack != NULL);
+
+#ifdef __MACHINE_STACK_GROWS_UP
+	stack_base = stack;
+#else
+	stack_base = (char *)stack + stack_size;
+#endif
+
+	DPRINTF("Before forking process PID=%d\n", getpid());
+	SYSCALL_REQUIRE((child = fork()) != -1);
+	if (child == 0) {
+		DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid());
+		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+		DPRINTF("Before raising %s from child\n", strsignal(sigval));
+		FORKEE_ASSERT(raise(sigval) == 0);
+
+		SYSCALL_REQUIRE((child2 = __clone(clone_func, stack_base,
+		flags|SIGCHLD, (void *)(intptr_t)exitval2)) != -1);
+
+		DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(),
+		child2);
+
+		// XXX WALLSIG?
+		FORKEE_REQUIRE_SUCCESS
+		(wpid = TWAIT_GENERIC(child2, , WALLSIG), child2);
+
+		forkee_status_exited(status, exitval2);
+
+		DPRINTF("Before exiting of the child process\n");
+		_exit(exitval);
+	}
+	DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+	DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME);
+	TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child);
+
+	validate_status_stopped(status, sigval);
+
+	DPRINTF("Set 0%s%s%s in EVENT_MASK for the child %d\n",
+	trackfork ? "|PTRACE_FORK" : "",
+	trackvfork ? "|PTRACE_VFORK" : "",
+	trackvforkdone ? "|PTRACE_VFORK_DONE" : "", child);
+	event.pe_set_event = 0;
+	if (trackfork)
+		event.pe_set_event |= PTRACE_FORK;
+	if (trackvfork)
+		event.pe_set_event |= PTRACE_VFORK;
+	if (trackvforkdone)
+		event.pe_set_event |= PTRACE_VFORK_DONE;
+	SYSCALL_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, , elen) != -1);
+
+	DPRINTF("Before resuming the child process where it left off and "
+	"without signal to be sent\n");
+	SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+#if defined(TWAIT_HAVE_PID)
+	if ((trackfork && !(flags & CLONE_VFORK)) ||
+	(trackvfork && (flags & CLONE_VFORK))) {
+		DPRINTF("Before calling %s() for the child %d\n", TWAIT_FNAME,
+		child);
+		TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0),
+		child);
+
+		validate_status_stopped(status, SIGTRAP);
+
+		SYSCALL_REQUIRE(
+		ptrace(PT_GET_PROCESS_STATE, child, , slen) != -1);
+		if (trackfork && !(flags & CLONE_VFORK)) {
+			ATF_REQUIRE_EQ(state.pe_report_event & PTRACE_FORK,
+			   PTRACE_FORK);
+		}
+		if (trackvfork && (flags & CLONE_VFORK)) {
+			ATF_REQUIRE_EQ(state.pe_report_event & PTRACE_VFORK,
+			   PTRACE_VFORK);
+		}
+
+		child2 = state.pe_other_pid;
+		DPRINTF("Reported ptrace event with forkee %d\n", child2);
+
+		DPRINTF("Before calling %s() for the forkee %d of the child "
+		"%d\n", TWAIT_FNAME, child2, child);
+		TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, , 0),
+		child2);
+
+		validate_status_stopped(status, 

CVS commit: src/sys

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 14:38:06 UTC 2019

Modified Files:
src/sys/arch/arm/at91: at91pmc.c
src/sys/arch/arm/mpcore: mpcore_a2x_space.c
src/sys/arch/evbppc/virtex/dev: cdmacreg.h temacvar.h
src/sys/arch/ia64/include: elf_machdep.h
src/sys/arch/m68k/m68k: sys_machdep.c
src/sys/arch/mips/alchemy: au1000.c
src/sys/arch/riscv/conf: std.riscv64
src/sys/dev/pci: if_bnxvar.h
src/sys/dev/pci/cxgb: cxgb_include.h
src/sys/net/npf: npf_rproc.c
src/sys/rump/net/lib/libvlan: VLAN.ioconf

Log Message:
Fix CVS Id usage


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/at91/at91pmc.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/mpcore/mpcore_a2x_space.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbppc/virtex/dev/cdmacreg.h \
src/sys/arch/evbppc/virtex/dev/temacvar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/elf_machdep.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/m68k/m68k/sys_machdep.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/alchemy/au1000.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/conf/std.riscv64
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/if_bnxvar.h
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/cxgb/cxgb_include.h
cvs rdiff -u -r1.17 -r1.18 src/sys/net/npf/npf_rproc.c
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libvlan/VLAN.ioconf

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/at91/at91pmc.c
diff -u src/sys/arch/arm/at91/at91pmc.c:1.6 src/sys/arch/arm/at91/at91pmc.c:1.7
--- src/sys/arch/arm/at91/at91pmc.c:1.6	Mon Nov 12 18:00:36 2012
+++ src/sys/arch/arm/at91/at91pmc.c	Thu Apr 11 14:38:05 2019
@@ -1,5 +1,5 @@
-/*	$Id: at91pmc.c,v 1.6 2012/11/12 18:00:36 skrll Exp $	*/
-/*	$NetBSD: at91pmc.c,v 1.6 2012/11/12 18:00:36 skrll Exp $	*/
+/*	$Id: at91pmc.c,v 1.7 2019/04/11 14:38:05 kamil Exp $	*/
+/*	$NetBSD: at91pmc.c,v 1.7 2019/04/11 14:38:05 kamil Exp $	*/
 
 /*
  * Copyright (c) 2007 Embedtronics Oy
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD");
+__KERNEL_RCSID(0, "$NetBSD: at91pmc.c,v 1.7 2019/04/11 14:38:05 kamil Exp $");
 
 #include 
 #include 

Index: src/sys/arch/arm/mpcore/mpcore_a2x_space.c
diff -u src/sys/arch/arm/mpcore/mpcore_a2x_space.c:1.3 src/sys/arch/arm/mpcore/mpcore_a2x_space.c:1.4
--- src/sys/arch/arm/mpcore/mpcore_a2x_space.c:1.3	Fri Mar 16 17:56:32 2018
+++ src/sys/arch/arm/mpcore/mpcore_a2x_space.c	Thu Apr 11 14:38:05 2019
@@ -1,4 +1,4 @@
-/* $NetBSD */
+/*	$NetBSD: mpcore_a2x_space.c,v 1.4 2019/04/11 14:38:05 kamil Exp $	*/
 
 /* derived from:
NetBSD: pxa2x0_a4x_space.c,v 1.4 2006/07/28 08:15:29 simonb Exp */
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpcore_a2x_space.c,v 1.3 2018/03/16 17:56:32 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpcore_a2x_space.c,v 1.4 2019/04/11 14:38:05 kamil Exp $");
 
 #include 
 #include 

Index: src/sys/arch/evbppc/virtex/dev/cdmacreg.h
diff -u src/sys/arch/evbppc/virtex/dev/cdmacreg.h:1.1 src/sys/arch/evbppc/virtex/dev/cdmacreg.h:1.2
--- src/sys/arch/evbppc/virtex/dev/cdmacreg.h:1.1	Sat Dec  2 22:18:47 2006
+++ src/sys/arch/evbppc/virtex/dev/cdmacreg.h	Thu Apr 11 14:38:05 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD */
+/* 	$NetBSD: cdmacreg.h,v 1.2 2019/04/11 14:38:05 kamil Exp $	*/
 
 /*
  * Copyright (c) 2006 Jachym Holecek
Index: src/sys/arch/evbppc/virtex/dev/temacvar.h
diff -u src/sys/arch/evbppc/virtex/dev/temacvar.h:1.1 src/sys/arch/evbppc/virtex/dev/temacvar.h:1.2
--- src/sys/arch/evbppc/virtex/dev/temacvar.h:1.1	Sat Dec  2 22:18:47 2006
+++ src/sys/arch/evbppc/virtex/dev/temacvar.h	Thu Apr 11 14:38:05 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD */
+/* 	$NetBSD: temacvar.h,v 1.2 2019/04/11 14:38:05 kamil Exp $	*/
 
 /*
  * Copyright (c) 2006 Jachym Holecek

Index: src/sys/arch/ia64/include/elf_machdep.h
diff -u src/sys/arch/ia64/include/elf_machdep.h:1.3 src/sys/arch/ia64/include/elf_machdep.h:1.4
--- src/sys/arch/ia64/include/elf_machdep.h:1.3	Mon Nov  6 03:47:47 2017
+++ src/sys/arch/ia64/include/elf_machdep.h	Thu Apr 11 14:38:06 2019
@@ -1,4 +1,4 @@
-/*$NetBSD */
+/*$NetBSD: elf_machdep.h,v 1.4 2019/04/11 14:38:06 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1996-1997 John D. Polstra.

Index: src/sys/arch/m68k/m68k/sys_machdep.c
diff -u src/sys/arch/m68k/m68k/sys_machdep.c:1.15 src/sys/arch/m68k/m68k/sys_machdep.c:1.16
--- src/sys/arch/m68k/m68k/sys_machdep.c:1.15	Sun Jun  6 04:50:07 2010
+++ src/sys/arch/m68k/m68k/sys_machdep.c	Thu Apr 11 14:38:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_machdep.c,v 1.15 2010/06/06 04:50:07 mrg Exp $	*/
+/*	$NetBSD: sys_machdep.c,v 1.16 2019/04/11 14:38:06 kamil Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -34,7 +34,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.16 2019/04/11 14:38:06 kamil Exp $");
 
 #include 
 #include 

Index: 

CVS commit: src/usr.sbin/postinstall

2019-04-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Apr 11 14:45:58 UTC 2019

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
Do not test contents of non-existing Xresource file (if X11 sets have
not been installed)


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.224 src/usr.sbin/postinstall/postinstall:1.225
--- src/usr.sbin/postinstall/postinstall:1.224	Sat Mar  9 23:46:34 2019
+++ src/usr.sbin/postinstall/postinstall	Thu Apr 11 14:45:58 2019
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.224 2019/03/09 23:46:34 mrg Exp $
+# $NetBSD: postinstall,v 1.225 2019/04/11 14:45:58 martin Exp $
 #
 # Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1857,7 +1857,8 @@ do_x11()
 	done
 
 	# check if xdm resources have been updated
-	if ! ${GREP} 'inpColor:' ${_etcx11}/xdm/Xresources > /dev/null; then
+	if [ -r ${_etcx11}/xdm/Xresources ] && \
+	! ${GREP} 'inpColor:' ${_etcx11}/xdm/Xresources > /dev/null; then
 		msg "Update ${_etcx11}/xdm/Xresources${_notfixed}"
 		failed=1
 	fi



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

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 14:47:06 UTC 2019

Modified Files:
src/sys/arch/evbppc/mpc85xx: machdep.c

Log Message:
Fix incorrect CVS Id


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/evbppc/mpc85xx/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/arch/evbppc/mpc85xx/machdep.c
diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.43 src/sys/arch/evbppc/mpc85xx/machdep.c:1.44
--- src/sys/arch/evbppc/mpc85xx/machdep.c:1.43	Sat Jan 27 10:07:41 2018
+++ src/sys/arch/evbppc/mpc85xx/machdep.c	Thu Apr 11 14:47:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.43 2018/01/27 10:07:41 flxd Exp $	*/
+/*	$NetBSD: machdep.c,v 1.44 2019/04/11 14:47:06 kamil Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetSBD$");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2019/04/11 14:47:06 kamil Exp $");
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"



CVS commit: src/sys

2019-04-11 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu Apr 11 17:43:45 UTC 2019

Modified Files:
src/sys/kern: subr_asan.c
src/sys/sys: systm.h

Log Message:
Add KASAN instrumentation for copyin/copyinstr/copyoutstr. No copyout for
now, because mm.c needs whitelisting.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/kern/subr_asan.c
cvs rdiff -u -r1.282 -r1.283 src/sys/sys/systm.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/kern/subr_asan.c
diff -u src/sys/kern/subr_asan.c:1.6 src/sys/kern/subr_asan.c:1.7
--- src/sys/kern/subr_asan.c:1.6	Sun Apr  7 09:20:04 2019
+++ src/sys/kern/subr_asan.c	Thu Apr 11 17:43:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_asan.c,v 1.6 2019/04/07 09:20:04 maxv Exp $	*/
+/*	$NetBSD: subr_asan.c,v 1.7 2019/04/11 17:43:45 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.6 2019/04/07 09:20:04 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.7 2019/04/11 17:43:45 maxv Exp $");
 
 #include 
 #include 
@@ -479,6 +479,38 @@ kasan_strlen(const char *str)
 	return (s - str);
 }
 
+#undef copyinstr
+#undef copyoutstr
+#undef copyin
+
+int	kasan_copyinstr(const void *, void *, size_t, size_t *);
+int	kasan_copyoutstr(const void *, void *, size_t, size_t *);
+int	kasan_copyin(const void *, void *, size_t);
+int	copyinstr(const void *, void *, size_t, size_t *);
+int	copyoutstr(const void *, void *, size_t, size_t *);
+int	copyin(const void *, void *, size_t);
+
+int
+kasan_copyin(const void *uaddr, void *kaddr, size_t len)
+{
+	kasan_shadow_check((unsigned long)kaddr, len, true, __RET_ADDR);
+	return copyin(uaddr, kaddr, len);
+}
+
+int
+kasan_copyinstr(const void *uaddr, void *kaddr, size_t len, size_t *done)
+{
+	kasan_shadow_check((unsigned long)kaddr, len, true, __RET_ADDR);
+	return copyinstr(uaddr, kaddr, len, done);
+}
+
+int
+kasan_copyoutstr(const void *kaddr, void *uaddr, size_t len, size_t *done)
+{
+	kasan_shadow_check((unsigned long)kaddr, len, false, __RET_ADDR);
+	return copyoutstr(kaddr, uaddr, len, done);
+}
+
 /* -- */
 
 void __asan_register_globals(struct __asan_global *, size_t);

Index: src/sys/sys/systm.h
diff -u src/sys/sys/systm.h:1.282 src/sys/sys/systm.h:1.283
--- src/sys/sys/systm.h:1.282	Sat Apr  6 03:06:28 2019
+++ src/sys/sys/systm.h	Thu Apr 11 17:43:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: systm.h,v 1.282 2019/04/06 03:06:28 thorpej Exp $	*/
+/*	$NetBSD: systm.h,v 1.283 2019/04/11 17:43:45 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -269,9 +269,18 @@ int	kcopy(const void *, void *, size_t);
 #endif /* KERNEL */
 
 int	copystr(const void *, void *, size_t, size_t *);
+#if defined(_KERNEL) && defined(KASAN)
+int	kasan_copyinstr(const void *, void *, size_t, size_t *);
+int	kasan_copyoutstr(const void *, void *, size_t, size_t *);
+int	kasan_copyin(const void *, void *, size_t);
+#define copyinstr	kasan_copyinstr
+#define copyoutstr	kasan_copyoutstr
+#define copyin		kasan_copyin
+#else
 int	copyinstr(const void *, void *, size_t, size_t *);
 int	copyoutstr(const void *, void *, size_t, size_t *);
 int	copyin(const void *, void *, size_t);
+#endif
 int	copyout(const void *, void *, size_t);
 
 #ifdef KLEAK



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

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 20:20:54 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.h

Log Message:
Add clone_func() in t_ptrace_wait.h


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/sys/t_ptrace_wait.h

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_ptrace_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_wait.h:1.14 src/tests/lib/libc/sys/t_ptrace_wait.h:1.15
--- src/tests/lib/libc/sys/t_ptrace_wait.h:1.14	Sun Feb 10 02:13:45 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.h	Thu Apr 11 20:20:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.h,v 1.14 2019/02/10 02:13:45 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.h,v 1.15 2019/04/11 20:20:54 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -513,6 +513,16 @@ infinite_thread(void *arg __unused)
 __unreachable();
 }
 
+static int __used
+clone_func(void *arg)
+{
+	int ret;
+
+	ret = (int)(intptr_t)arg;
+
+	return ret;
+}
+
 #if defined(HAVE_DBREGS)
 static bool __used
 can_we_set_dbregs(void)



CVS commit: src/share/man/man4

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 17:46:32 UTC 2019

Modified Files:
src/share/man/man4: acpifan.4

Log Message:
Fix CVS Id


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/acpifan.4

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/man4/acpifan.4
diff -u src/share/man/man4/acpifan.4:1.3 src/share/man/man4/acpifan.4:1.4
--- src/share/man/man4/acpifan.4:1.3	Sun Jan  9 16:07:45 2011
+++ src/share/man/man4/acpifan.4	Thu Apr 11 17:46:32 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD
+.\" $NetBSD: acpifan.4,v 1.4 2019/04/11 17:46:32 kamil Exp $
 .\"
 .\" Copyright (c) 2011 Jukka Ruohonen 
 .\" All rights reserved.



CVS commit: src/sys

2019-04-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Apr 11 08:50:59 UTC 2019

Modified Files:
src/sys/arch/arm/imx: if_enet.c
src/sys/arch/mips/adm5120/dev: if_admsw.c
src/sys/dev/pci: if_bge.c if_bnx.c if_et.c if_lii.c if_msk.c if_nfe.c
if_sk.c if_ti.c if_txp.c if_vge.c
src/sys/dev/usb: if_axen.c

Log Message:
 Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/imx/if_enet.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/adm5120/dev/if_admsw.c
cvs rdiff -u -r1.328 -r1.329 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/pci/if_bnx.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/if_et.c src/sys/dev/pci/if_lii.c
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/pci/if_msk.c
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/if_nfe.c
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/pci/if_sk.c
cvs rdiff -u -r1.106 -r1.107 src/sys/dev/pci/if_ti.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_txp.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/if_vge.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/usb/if_axen.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/imx/if_enet.c
diff -u src/sys/arch/arm/imx/if_enet.c:1.17 src/sys/arch/arm/imx/if_enet.c:1.18
--- src/sys/arch/arm/imx/if_enet.c:1.17	Tue Jan 22 03:42:25 2019
+++ src/sys/arch/arm/imx/if_enet.c	Thu Apr 11 08:50:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_enet.c,v 1.17 2019/01/22 03:42:25 msaitoh Exp $	*/
+/*	$NetBSD: if_enet.c,v 1.18 2019/04/11 08:50:59 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2014 Ryo Shimizu 
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.17 2019/01/22 03:42:25 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.18 2019/04/11 08:50:59 msaitoh Exp $");
 
 #include "vlan.h"
 
@@ -1172,7 +1172,7 @@ enet_miibus_statchg(struct ifnet *ifp)
 		mii->mii_media_active &= ~IFM_ETH_FMASK;
 	}
 
-	if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+	if ((ife->ifm_media & IFM_FDX) != 0) {
 		tcr |= ENET_TCR_FDEN;	/* full duplex */
 		rcr &= ~ENET_RCR_DRT;;	/* enable receive on transmit */
 	} else {
@@ -1787,7 +1787,7 @@ enet_init_regs(struct enet_softc *sc, in
 		mii = >sc_mii;
 		ife = mii->mii_media.ifm_cur;
 
-		if ((ife->ifm_media & IFM_GMASK) == IFM_FDX)
+		if ((ife->ifm_media & IFM_FDX) != 0)
 			fulldup = 1;
 		else
 			fulldup = 0;

Index: src/sys/arch/mips/adm5120/dev/if_admsw.c
diff -u src/sys/arch/mips/adm5120/dev/if_admsw.c:1.18 src/sys/arch/mips/adm5120/dev/if_admsw.c:1.19
--- src/sys/arch/mips/adm5120/dev/if_admsw.c:1.18	Mon Sep  3 16:29:25 2018
+++ src/sys/arch/mips/adm5120/dev/if_admsw.c	Thu Apr 11 08:50:59 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_admsw.c,v 1.18 2018/09/03 16:29:25 riastradh Exp $ */
+/* $NetBSD: if_admsw.c,v 1.19 2019/04/11 08:50:59 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.18 2018/09/03 16:29:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.19 2019/04/11 08:50:59 msaitoh Exp $");
 
 
 #include 
@@ -1232,7 +1232,7 @@ admsw_mediachange(struct ifnet *ifp)
 	if (IFM_SUBTYPE(ifm->ifm_media) == IFM_AUTO) {
 		val = PHY_CNTL2_AUTONEG|PHY_CNTL2_100M|PHY_CNTL2_FDX;
 	} else if (IFM_SUBTYPE(ifm->ifm_media) == IFM_100_TX) {
-		if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
+		if ((ifm->ifm_media & IFM_FDX) != 0)
 			val = PHY_CNTL2_100M|PHY_CNTL2_FDX;
 		else
 			val = PHY_CNTL2_100M;

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.328 src/sys/dev/pci/if_bge.c:1.329
--- src/sys/dev/pci/if_bge.c:1.328	Fri Apr  5 18:14:54 2019
+++ src/sys/dev/pci/if_bge.c	Thu Apr 11 08:50:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.328 2019/04/05 18:14:54 bouyer Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.329 2019/04/11 08:50:59 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.328 2019/04/05 18:14:54 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.329 2019/04/11 08:50:59 msaitoh Exp $");
 
 #include 
 #include 
@@ -5677,7 +5677,7 @@ bge_ifmedia_upd(struct ifnet *ifp)
 			}
 			break;
 		case IFM_1000_SX:
-			if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
+			if ((ifm->ifm_media & IFM_FDX) != 0) {
 BGE_CLRBIT(sc, BGE_MAC_MODE,
 BGE_MACMODE_HALF_DUPLEX);
 			} else {

Index: src/sys/dev/pci/if_bnx.c
diff -u src/sys/dev/pci/if_bnx.c:1.80 src/sys/dev/pci/if_bnx.c:1.81
--- src/sys/dev/pci/if_bnx.c:1.80	Mon Apr  8 03:56:08 2019
+++ src/sys/dev/pci/if_bnx.c	Thu Apr 11 08:50:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bnx.c,v 1.80 2019/04/08 03:56:08 msaitoh Exp $	*/
+/*	$NetBSD: if_bnx.c,v 1.81 2019/04/11 08:50:59 msaitoh Exp $	*/
 /*	$OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $	

CVS commit: src/sys/dev/mii

2019-04-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Apr 11 09:00:34 UTC 2019

Modified Files:
src/sys/dev/mii: atphy.c

Log Message:
 Simplify. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/mii/atphy.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/mii/atphy.c
diff -u src/sys/dev/mii/atphy.c:1.21 src/sys/dev/mii/atphy.c:1.22
--- src/sys/dev/mii/atphy.c:1.21	Mon Mar 25 09:20:46 2019
+++ src/sys/dev/mii/atphy.c	Thu Apr 11 09:00:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.21 2019/03/25 09:20:46 msaitoh Exp $ */
+/*	$NetBSD: atphy.c,v 1.22 2019/04/11 09:00:34 msaitoh Exp $ */
 /*	$OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.21 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.22 2019/04/11 09:00:34 msaitoh Exp $");
 
 #include 
 #include 
@@ -223,7 +223,7 @@ atphy_service(struct mii_softc *sc, stru
 		}
 
 		anar = mii_anar(IFM_SUBTYPE(ife->ifm_media));
-		if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) {
+		if ((ife->ifm_media & IFM_FDX) != 0) {
 			bmcr |= BMCR_FDX;
 			/* Enable pause. */
 			if (sc->mii_flags & MIIF_DOPAUSE)



CVS commit: src/sys/dev/mii

2019-04-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Apr 11 09:14:07 UTC 2019

Modified Files:
src/sys/dev/mii: brgphyreg.h ciphy.c mii.h miivar.h rgephy.c

Log Message:
 KNF. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/mii/brgphyreg.h
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/mii/mii.h
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/mii/miivar.h
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/mii/rgephy.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/mii/brgphyreg.h
diff -u src/sys/dev/mii/brgphyreg.h:1.10 src/sys/dev/mii/brgphyreg.h:1.11
--- src/sys/dev/mii/brgphyreg.h:1.10	Wed Jan 16 07:32:13 2019
+++ src/sys/dev/mii/brgphyreg.h	Thu Apr 11 09:14:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphyreg.h,v 1.10 2019/01/16 07:32:13 msaitoh Exp $	*/
+/*	$NetBSD: brgphyreg.h,v 1.11 2019/04/11 09:14:07 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2000
@@ -323,6 +323,6 @@
 /***/
 
 #define BRGPHY_INTRS	\
-	~(BRGPHY_IMR_LNK_CHG|BRGPHY_IMR_LSP_CHG|BRGPHY_IMR_DUP_CHG)
+	~(BRGPHY_IMR_LNK_CHG | BRGPHY_IMR_LSP_CHG | BRGPHY_IMR_DUP_CHG)
 
 #endif /* _DEV_BRGPHY_MIIREG_H_ */

Index: src/sys/dev/mii/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.33 src/sys/dev/mii/ciphy.c:1.34
--- src/sys/dev/mii/ciphy.c:1.33	Thu Apr 11 08:50:20 2019
+++ src/sys/dev/mii/ciphy.c	Thu Apr 11 09:14:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.33 2019/04/11 08:50:20 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.34 2019/04/11 09:14:07 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.33 2019/04/11 08:50:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.34 2019/04/11 09:14:07 msaitoh Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -212,9 +212,8 @@ setit:
 			if ((mii->mii_ifp->if_flags & IFF_LINK0)) {
 PHY_WRITE(sc, MII_GTCR,
 gig | GTCR_MAN_MS | GTCR_ADV_MS);
-			} else {
+			} else
 PHY_WRITE(sc, MII_GTCR, gig | GTCR_MAN_MS);
-			}
 			break;
 		case IFM_NONE:
 			PHY_WRITE(sc, MII_BMCR, BMCR_ISO | BMCR_PDOWN);
@@ -398,7 +397,6 @@ ciphy_fixup(struct mii_softc *sc)
 	switch (model) {
 	case MII_MODEL_CICADA_CS8201:
 	case MII_MODEL_CICADA_CS8204:
-
 		/* Turn off "aux mode" (whatever that means) */
 		PHY_SETBIT(sc, CIPHY_MII_AUXCSR, CIPHY_AUXCSR_MDPPS);
 
@@ -407,11 +405,10 @@ ciphy_fixup(struct mii_softc *sc)
 		 * when using MII in full duplex mode.
 		 */
 		if ((speed == CIPHY_SPEED10 || speed == CIPHY_SPEED100) &&
-		(status & CIPHY_AUXCSR_FDX)) {
+		(status & CIPHY_AUXCSR_FDX))
 			PHY_SETBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO);
-		} else {
+		else
 			PHY_CLRBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO);
-		}
 
 		/* Enable link/activity LED blink. */
 		PHY_SETBIT(sc, CIPHY_MII_LED, CIPHY_LED_LINKACTBLINK);
@@ -420,15 +417,14 @@ ciphy_fixup(struct mii_softc *sc)
 
 	case MII_MODEL_CICADA_CS8201A:
 	case MII_MODEL_CICADA_CS8201B:
-
 		/*
 		 * Work around speed polling bug in VT3119/VT3216
 		 * when using MII in full duplex mode.
 		 */
 		if ((speed == CIPHY_SPEED10 || speed == CIPHY_SPEED100) &&
-		(status & CIPHY_AUXCSR_FDX)) {
+		(status & CIPHY_AUXCSR_FDX))
 			PHY_SETBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO);
-		} else
+		else
 			PHY_CLRBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO);
 
 		break;

Index: src/sys/dev/mii/mii.h
diff -u src/sys/dev/mii/mii.h:1.26 src/sys/dev/mii/mii.h:1.27
--- src/sys/dev/mii/mii.h:1.26	Mon Feb 25 07:36:16 2019
+++ src/sys/dev/mii/mii.h	Thu Apr 11 09:14:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii.h,v 1.26 2019/02/25 07:36:16 msaitoh Exp $	*/
+/*	$NetBSD: mii.h,v 1.27 2019/04/11 09:14:07 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.  All rights reserved.
@@ -64,7 +64,7 @@
 #define	BMCR_S100	BMCR_SPEED0	/* 100 Mb/s */
 #define	BMCR_S1000	BMCR_SPEED1	/* 1000 Mb/s */
 
-#define	BMCR_SPEED(x)	((x) & (BMCR_SPEED0|BMCR_SPEED1))
+#define	BMCR_SPEED(x)	((x) & (BMCR_SPEED0 | BMCR_SPEED1))
 
 #define	MII_BMSR	0x01	/* Basic mode status register (ro) */
 #define	BMSR_100T4	0x8000	/* 100 base T4 capable */
@@ -90,8 +90,8 @@
  * states that all 1000 Mb/s capable PHYs will set this bit to 1.
  */
 
-#define	BMSR_MEDIAMASK	(BMSR_100T4|BMSR_100TXFDX|BMSR_100TXHDX| \
-			 BMSR_10TFDX|BMSR_10THDX|BMSR_100T2FDX|BMSR_100T2HDX)
+#define	BMSR_MEDIAMASK	(BMSR_100T4 | BMSR_100TXFDX | BMSR_100TXHDX | \
+	BMSR_10TFDX | BMSR_10THDX | BMSR_100T2FDX | BMSR_100T2HDX)
 
 /*
  * Convert BMSR media capabilities to ANAR bits for autonegotiation.
@@ -304,7 +304,7 @@
 #define	EXTSR_1000TFDX	0x2000	/* 1000T full-duplex capable */
 #define	EXTSR_1000THDX	0x1000	/* 1000T half-duplex capable */
 
-#define	EXTSR_MEDIAMASK	(EXTSR_1000XFDX|EXTSR_1000XHDX| \
-			 EXTSR_1000TFDX|EXTSR_1000THDX)
+#define	EXTSR_MEDIAMASK	(EXTSR_1000XFDX | 

CVS commit: src/sys/dev/mii

2019-04-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Apr 11 08:50:20 UTC 2019

Modified Files:
src/sys/dev/mii: brgphy.c ciphy.c rgephy.c

Log Message:
 Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set. Same as a part of
FreeBSD r217413.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/mii/rgephy.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/mii/brgphy.c
diff -u src/sys/dev/mii/brgphy.c:1.83 src/sys/dev/mii/brgphy.c:1.84
--- src/sys/dev/mii/brgphy.c:1.83	Mon Mar 25 09:20:46 2019
+++ src/sys/dev/mii/brgphy.c	Thu Apr 11 08:50:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphy.c,v 1.83 2019/03/25 09:20:46 msaitoh Exp $	*/
+/*	$NetBSD: brgphy.c,v 1.84 2019/04/11 08:50:20 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.83 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.84 2019/04/11 08:50:20 msaitoh Exp $");
 
 #include 
 #include 
@@ -351,7 +351,7 @@ brgphy_service(struct mii_softc *sc, str
 			speed = BMCR_S10;
 setit:
 			brgphy_loop(sc);
-			if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+			if ((ife->ifm_media & IFM_FDX) != 0) {
 speed |= BMCR_FDX;
 gig = GTCR_ADV_1000TFDX;
 			} else

Index: src/sys/dev/mii/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.32 src/sys/dev/mii/ciphy.c:1.33
--- src/sys/dev/mii/ciphy.c:1.32	Mon Mar 25 09:20:46 2019
+++ src/sys/dev/mii/ciphy.c	Thu Apr 11 08:50:20 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.32 2019/03/25 09:20:46 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.33 2019/04/11 08:50:20 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.32 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.33 2019/04/11 08:50:20 msaitoh Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -184,7 +184,7 @@ ciphy_service(struct mii_softc *sc, stru
 		case IFM_10_T:
 			speed = BMCR_S10;
 setit:
-			if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+			if ((ife->ifm_media & IFM_FDX) != 0) {
 speed |= BMCR_FDX;
 gig = GTCR_ADV_1000TFDX;
 			} else

Index: src/sys/dev/mii/rgephy.c
diff -u src/sys/dev/mii/rgephy.c:1.52 src/sys/dev/mii/rgephy.c:1.53
--- src/sys/dev/mii/rgephy.c:1.52	Mon Mar 25 09:20:46 2019
+++ src/sys/dev/mii/rgephy.c	Thu Apr 11 08:50:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rgephy.c,v 1.52 2019/03/25 09:20:46 msaitoh Exp $	*/
+/*	$NetBSD: rgephy.c,v 1.53 2019/04/11 08:50:20 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2003
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.52 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.53 2019/04/11 08:50:20 msaitoh Exp $");
 
 
 /*
@@ -231,7 +231,7 @@ rgephy_service(struct mii_softc *sc, str
 			anar |= ANAR_10_FD | ANAR_10;
  setit:
 			rgephy_loop(sc);
-			if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+			if ((ife->ifm_media & IFM_FDX) != 0) {
 speed |= BMCR_FDX;
 gig = GTCR_ADV_1000TFDX;
 anar &= ~(ANAR_TX | ANAR_10);



CVS commit: src/share/examples/npf

2019-04-11 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Apr 11 10:17:21 UTC 2019

Modified Files:
src/share/examples/npf: soho_gw-npf.conf

Log Message:
s/ifnets/ifaddrs


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/examples/npf/soho_gw-npf.conf

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

Modified files:

Index: src/share/examples/npf/soho_gw-npf.conf
diff -u src/share/examples/npf/soho_gw-npf.conf:1.11 src/share/examples/npf/soho_gw-npf.conf:1.12
--- src/share/examples/npf/soho_gw-npf.conf:1.11	Thu Apr 11 09:59:24 2019
+++ src/share/examples/npf/soho_gw-npf.conf	Thu Apr 11 10:17:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: soho_gw-npf.conf,v 1.11 2019/04/11 09:59:24 sevan Exp $
+# $NetBSD: soho_gw-npf.conf,v 1.12 2019/04/11 10:17:21 sevan Exp $
 #
 # SOHO border
 #
@@ -8,7 +8,7 @@
 
 $ext_if = "wm0"
 $ext_v4 = inet4(wm0)
-$ext_addrs = inets(wm0)
+$ext_addrs = ifaddrs(wm0)
 
 $int_if = "wm1"
 



CVS commit: src/sys/sys

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 11:20:46 UTC 2019

Modified Files:
src/sys/sys: kcov.h

Log Message:
Rely on volatile operations in KCOV data types

Extra atomicity isn't needed and makes maintenance burden between CPUs.

Fixes build issue on NetBSD/i386 reported by 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/kcov.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/sys/kcov.h
diff -u src/sys/sys/kcov.h:1.4 src/sys/sys/kcov.h:1.5
--- src/sys/sys/kcov.h:1.4	Sun Mar 10 17:51:00 2019
+++ src/sys/sys/kcov.h	Thu Apr 11 11:20:46 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: kcov.h,v 1.4 2019/03/10 17:51:00 kamil Exp $*/
+/*  $NetBSD: kcov.h,v 1.5 2019/04/11 11:20:46 kamil Exp $*/
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -47,19 +47,7 @@
 typedef volatile uint64_t kcov_int_t;
 #define KCOV_ENTRY_SIZE sizeof(kcov_int_t)
 
-/*
- * Always prefer 64-bit atomic operations whenever accessible.
- *
- * As a fallback keep regular volatile move operation that it's not known
- * to have negative effect in KCOV even if interrupted in the middle of
- * operation.
- */
-#ifdef __HAVE_ATOMIC64_OPS
-#define KCOV_STORE(x,v)	__atomic_store_n(&(x), (v), __ATOMIC_RELAXED)
-#define KCOV_LOAD(x)	__atomic_load_n(&(x), __ATOMIC_RELAXED)
-#else
 #define KCOV_STORE(x,v)	(x) = (v)
 #define KCOV_LOAD(x)	(x)
-#endif
 
 #endif /* !_SYS_KCOV_H_ */



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

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 11:23:52 UTC 2019

Modified Files:
src/sys/arch/riscv/include: locore.h

Log Message:
Fix a typo in a comment


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/riscv/include/locore.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/riscv/include/locore.h
diff -u src/sys/arch/riscv/include/locore.h:1.3 src/sys/arch/riscv/include/locore.h:1.4
--- src/sys/arch/riscv/include/locore.h:1.3	Thu Mar 16 16:13:21 2017
+++ src/sys/arch/riscv/include/locore.h	Thu Apr 11 11:23:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.h,v 1.3 2017/03/16 16:13:21 chs Exp $ */
+/* $NetBSD: locore.h,v 1.4 2019/04/11 11:23:51 kamil Exp $ */
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -77,7 +77,7 @@ struct trapframe {
 #define tf_t6		tf_reg[_X_T6]
 };
 
-// For COMPAT_NETBDS32 coredumps
+// For COMPAT_NETBSD32 coredumps
 struct trapframe32 {
 	struct reg32 tf_regs;
 	register32_t tf_badaddr;	



CVS commit: src/sys/dev/ic

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 11:25:33 UTC 2019

Modified Files:
src/sys/dev/ic: mc6854reg.h

Log Message:
Fix a typo in a comment


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/mc6854reg.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/dev/ic/mc6854reg.h
diff -u src/sys/dev/ic/mc6854reg.h:1.1 src/sys/dev/ic/mc6854reg.h:1.2
--- src/sys/dev/ic/mc6854reg.h:1.1	Mon Sep 10 23:41:49 2001
+++ src/sys/dev/ic/mc6854reg.h	Thu Apr 11 11:25:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mc6854reg.h,v 1.1 2001/09/10 23:41:49 bjh21 Exp $	*/
+/*	$NetBSD: mc6854reg.h,v 1.2 2019/04/11 11:25:33 kamil Exp $	*/
 
 /*
  * Ben Harris, 2001
@@ -23,7 +23,7 @@
 #define MC6854_SR2	1 /* Status Register #2 (R) */
 #define MC6854_RXFIFO	2 /* Receiver FIFO (R) */
 
-/* Control Regsiter #1 bits */
+/* Control Register #1 bits */
 #define MC6854_CR1_AC		0x01 /* Address Control */
 #define MC6854_CR1_RIE		0x02 /* Receiver Interrupt Enable */
 #define MC6854_CR1_TIE		0x04 /* Transmitter Interrupt Enable */
@@ -100,4 +100,3 @@
 #define MC6854_SR2_RDA		0x80 /* Receiver Data Available */
 
 #define MC6854_SR2_BITS "\20\1AP\2FV\3RX_IDLE\4RXABT\5ERR\6NDCD\7OVRN\10RDA"
-



CVS commit: src/sys/arch/hpcsh/dev/hd64461

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 11:26:13 UTC 2019

Modified Files:
src/sys/arch/hpcsh/dev/hd64461: hd64461videoreg.h

Log Message:
Fix a typo in a comment

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hpcsh/dev/hd64461/hd64461videoreg.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/hpcsh/dev/hd64461/hd64461videoreg.h
diff -u src/sys/arch/hpcsh/dev/hd64461/hd64461videoreg.h:1.4 src/sys/arch/hpcsh/dev/hd64461/hd64461videoreg.h:1.5
--- src/sys/arch/hpcsh/dev/hd64461/hd64461videoreg.h:1.4	Mon Apr 28 20:23:22 2008
+++ src/sys/arch/hpcsh/dev/hd64461/hd64461videoreg.h	Thu Apr 11 11:26:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hd64461videoreg.h,v 1.4 2008/04/28 20:23:22 martin Exp $	*/
+/*	$NetBSD: hd64461videoreg.h,v 1.5 2019/04/11 11:26:13 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -287,7 +287,7 @@
 #define HD64461_LCDLNAXLR_REG16			0xb000104a
 #define HD64461_LCDLNAXLR_MASK		0x07ff
 
-/* Diagonal Regsiter */
+/* Diagonal Register */
 #define HD64461_LCDLNDGR_REG16			0xb000104c
 #define HD64461_LCDLNDGR_LNDGR_SIGN		0x8000
 #define HD64461_LCDLNDGR_LNDGR_MASK	0x07ff



CVS commit: src/share/examples/npf

2019-04-11 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Apr 11 09:59:24 UTC 2019

Modified Files:
src/share/examples/npf: soho_gw-npf.conf

Log Message:
Revert previous & just use the inets function to handle both address families.
Heads up by 


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/examples/npf/soho_gw-npf.conf

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

Modified files:

Index: src/share/examples/npf/soho_gw-npf.conf
diff -u src/share/examples/npf/soho_gw-npf.conf:1.10 src/share/examples/npf/soho_gw-npf.conf:1.11
--- src/share/examples/npf/soho_gw-npf.conf:1.10	Wed Apr 10 23:14:46 2019
+++ src/share/examples/npf/soho_gw-npf.conf	Thu Apr 11 09:59:24 2019
@@ -1,4 +1,4 @@
-# $NetBSD: soho_gw-npf.conf,v 1.10 2019/04/10 23:14:46 sevan Exp $
+# $NetBSD: soho_gw-npf.conf,v 1.11 2019/04/11 09:59:24 sevan Exp $
 #
 # SOHO border
 #
@@ -8,8 +8,7 @@
 
 $ext_if = "wm0"
 $ext_v4 = inet4(wm0)
-$ext_addrs = inet4(wm0)
-$ext_addrs6 = inet6(wm0)
+$ext_addrs = inets(wm0)
 
 $int_if = "wm1"
 
@@ -43,15 +42,11 @@ group "external" on $ext_if {
 		apply "log"
 	pass stateful in final proto tcp to $ext_addrs port $services_tcp
 	pass stateful in final proto udp to $ext_addrs port $services_udp
-	pass stateful in final family inet6 proto tcp to $ext_addrs6 port $services_tcp
-	pass stateful in final family inet6 proto udp to $ext_addrs6 port $services_udp
 
 	# Passive FTP
 	pass stateful in final proto tcp to $ext_addrs port 49151-65535
-	pass stateful in final family inet6 proto tcp to $ext_addrs6 port 49151-65535
 	# Traceroute
 	pass stateful in final proto udp to $ext_addrs port 33434-33600
-	pass stateful in final family inet6 proto udp to $ext_addrs6 port 33434-33600
 }
 
 group "internal" on $int_if {



CVS commit: src/external/mit/xorg/lib/libGL

2019-04-11 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Apr 11 10:15:53 UTC 2019

Modified Files:
src/external/mit/xorg/lib/libGL: Makefile

Log Message:
the drivers we dlopen need pthread.
I'm not sure about the exact scenario causing failure, but using the
libc pthread stubs isn't sufficient.

fixes one of the glmark2 crashes (at startup with llvmpipe)


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/mit/xorg/lib/libGL/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/libGL/Makefile
diff -u src/external/mit/xorg/lib/libGL/Makefile:1.24 src/external/mit/xorg/lib/libGL/Makefile:1.25
--- src/external/mit/xorg/lib/libGL/Makefile:1.24	Tue Apr  9 14:31:06 2019
+++ src/external/mit/xorg/lib/libGL/Makefile	Thu Apr 11 10:15:53 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.24 2019/04/09 14:31:06 maya Exp $
+#	$NetBSD: Makefile,v 1.25 2019/04/11 10:15:53 maya Exp $
 
 .include 
 
@@ -191,7 +191,8 @@ LIBDPLIBS=	Xext		${.CURDIR}/../libXext \
 		xcb-dri2	${.CURDIR}/../libxcb/dri2 \
 		xcb-glx		${.CURDIR}/../libxcb/glx \
 		expat		${NETBSDSRCDIR}/external/mit/expat/lib/libexpat \
-		m		${NETBSDSRCDIR}/lib/libm
+		m		${NETBSDSRCDIR}/lib/libm \
+		pthread		${NETBSDSRCDIR}/lib/libpthread
 
 MKLINT=no
 



CVS commit: src/sys

2019-04-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Apr 11 11:40:58 UTC 2019

Modified Files:
src/sys/arch/mips/cavium/dev: octeon_pow.c octeon_uartreg.h
src/sys/dev/iscsi: iscsi_main.c
src/sys/net80211: ieee80211_ioctl.c

Log Message:
Fix CVS Id

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/cavium/dev/octeon_pow.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/cavium/dev/octeon_uartreg.h
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/iscsi/iscsi_main.c
cvs rdiff -u -r1.64 -r1.65 src/sys/net80211/ieee80211_ioctl.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/mips/cavium/dev/octeon_pow.c
diff -u src/sys/arch/mips/cavium/dev/octeon_pow.c:1.2 src/sys/arch/mips/cavium/dev/octeon_pow.c:1.3
--- src/sys/arch/mips/cavium/dev/octeon_pow.c:1.2	Mon Jun  1 22:55:12 2015
+++ src/sys/arch/mips/cavium/dev/octeon_pow.c	Thu Apr 11 11:40:58 2019
@@ -1,4 +1,4 @@
-/*	$NetbBSD$	*/
+/*	$NetBSD: octeon_pow.c,v 1.3 2019/04/11 11:40:58 kamil Exp $	*/
 
 /*
  * Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: octeon_pow.c,v 1.2 2015/06/01 22:55:12 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_pow.c,v 1.3 2019/04/11 11:40:58 kamil Exp $");
 
 #include "opt_octeon.h"	/* OCTEON_ETH_DEBUG */
 

Index: src/sys/arch/mips/cavium/dev/octeon_uartreg.h
diff -u src/sys/arch/mips/cavium/dev/octeon_uartreg.h:1.1 src/sys/arch/mips/cavium/dev/octeon_uartreg.h:1.2
--- src/sys/arch/mips/cavium/dev/octeon_uartreg.h:1.1	Wed Apr 29 08:32:01 2015
+++ src/sys/arch/mips/cavium/dev/octeon_uartreg.h	Thu Apr 11 11:40:58 2019
@@ -1,4 +1,4 @@
-/*	$NetbSD$	*/
+/*	$NetBSD: octeon_uartreg.h,v 1.2 2019/04/11 11:40:58 kamil Exp $	*/
 
 /*
  * Copyright (c) 2007 Internet Initiative Japan, Inc.

Index: src/sys/dev/iscsi/iscsi_main.c
diff -u src/sys/dev/iscsi/iscsi_main.c:1.27 src/sys/dev/iscsi/iscsi_main.c:1.28
--- src/sys/dev/iscsi/iscsi_main.c:1.27	Sun Dec  3 19:07:10 2017
+++ src/sys/dev/iscsi/iscsi_main.c	Thu Apr 11 11:40:58 2019
@@ -1,4 +1,4 @@
-/*	$netBSD: iscsi_main.c,v 1.1.1.1 2011/05/02 07:01:11 agc Exp $	*/
+/*	$NetBSD: iscsi_main.c,v 1.28 2019/04/11 11:40:58 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.

Index: src/sys/net80211/ieee80211_ioctl.c
diff -u src/sys/net80211/ieee80211_ioctl.c:1.64 src/sys/net80211/ieee80211_ioctl.c:1.65
--- src/sys/net80211/ieee80211_ioctl.c:1.64	Fri Mar  1 11:06:57 2019
+++ src/sys/net80211/ieee80211_ioctl.c	Thu Apr 11 11:40:58 2019
@@ -1,4 +1,4 @@
-/*	$netBSD: ieee80211_ioctl.c,v 1.60.16.1 2018/03/28 00:30:05 pgoyette Exp $	*/
+/*	$NetBSD: ieee80211_ioctl.c,v 1.65 2019/04/11 11:40:58 kamil Exp $	*/
 /*-
  * Copyright (c) 2001 Atsushi Onoe
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,7 +36,7 @@
 __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.35 2005/08/30 14:27:47 avatar Exp $");
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ieee80211_ioctl.c,v 1.64 2019/03/01 11:06:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee80211_ioctl.c,v 1.65 2019/04/11 11:40:58 kamil Exp $");
 #endif
 
 /*



CVS commit: src/sys/dev/usb

2019-04-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Apr 11 09:16:57 UTC 2019

Modified Files:
src/sys/dev/usb: if_aue.c

Log Message:
 Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/dev/usb/if_aue.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/usb/if_aue.c
diff -u src/sys/dev/usb/if_aue.c:1.148 src/sys/dev/usb/if_aue.c:1.149
--- src/sys/dev/usb/if_aue.c:1.148	Tue Mar 12 03:08:34 2019
+++ src/sys/dev/usb/if_aue.c	Thu Apr 11 09:16:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_aue.c,v 1.148 2019/03/12 03:08:34 msaitoh Exp $	*/
+/*	$NetBSD: if_aue.c,v 1.149 2019/04/11 09:16:56 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.148 2019/03/12 03:08:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.149 2019/04/11 09:16:56 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -538,7 +538,7 @@ aue_miibus_statchg(struct ifnet *ifp)
 		AUE_CLRBIT(sc, AUE_CTL1, AUE_CTL1_SPEEDSEL);
 	}
 
-	if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX)
+	if ((mii->mii_media_active & IFM_FDX) != 0)
 		AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_DUPLEX);
 	else
 		AUE_CLRBIT(sc, AUE_CTL1, AUE_CTL1_DUPLEX);



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

2019-04-11 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Thu Apr 11 09:18:55 UTC 2019

Modified Files:
src/sys/arch/mips/include: cache_octeon.h

Log Message:
Fix tyop.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/include/cache_octeon.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/mips/include/cache_octeon.h
diff -u src/sys/arch/mips/include/cache_octeon.h:1.2 src/sys/arch/mips/include/cache_octeon.h:1.3
--- src/sys/arch/mips/include/cache_octeon.h:1.2	Mon Jul 11 16:15:35 2016
+++ src/sys/arch/mips/include/cache_octeon.h	Thu Apr 11 09:18:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache_octeon.h,v 1.2 2016/07/11 16:15:35 matt Exp $	*/
+/*	$NetBSD: cache_octeon.h,v 1.3 2019/04/11 09:18:55 simonb Exp $	*/
 
 #define	CACHE_OCTEON_I			0
 #define	CACHE_OCTEON_D			1
@@ -13,7 +13,7 @@
 /*
  * cache_octeon_invalidate:
  *
- *	Invalidate all cahce blocks.
+ *	Invalidate all cache blocks.
  *	Argument "op" must be CACHE_OCTEON_I or CACHE_OCTEON_D.
  *	In Octeon specification, invalidate instruction works
  *	all cache blocks.



CVS commit: src/distrib/sets

2019-04-11 Thread Yuuki Enomoto
Module Name:src
Committed By:   uki
Date:   Thu Apr 11 08:34:19 UTC 2019

Modified Files:
src/distrib/sets: regpkg

Log Message:
Fix "build.sh syspkgs" error when creating base-util-root package


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/distrib/sets/regpkg

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/regpkg
diff -u src/distrib/sets/regpkg:1.22 src/distrib/sets/regpkg:1.23
--- src/distrib/sets/regpkg:1.22	Fri May 30 08:37:35 2014
+++ src/distrib/sets/regpkg	Thu Apr 11 08:34:19 2019
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# $NetBSD: regpkg,v 1.22 2014/05/30 08:37:35 uebayasi Exp $
+# $NetBSD: regpkg,v 1.23 2019/04/11 08:34:19 uki Exp $
 #
 # Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -628,7 +628,7 @@ EOF
 	# "@name" line and a lot of "@comment MD5:" lines.
 	#
 	{
-		rcsid='$NetBSD: regpkg,v 1.22 2014/05/30 08:37:35 uebayasi Exp $'
+		rcsid='$NetBSD: regpkg,v 1.23 2019/04/11 08:34:19 uki Exp $'
 		utcdate="$(${ENV_CMD} TZ=UTC LOCALE=C \
 			${DATE} '+%Y-%m-%d %H:%M')"
 		user="${USER:-root}"
@@ -836,8 +836,11 @@ EOF
 		if [ -n "${metalog}" ]; then
 			names1="${SCRATCH}/names1"
 			names2="${SCRATCH}/names2"
-			${AWK} '{print $1}' <"${spec1}" | ${SORT} >"${names1}"
-			${AWK} '{print $1}' <"${spec2}" | ${SORT} >"${names2}"
+			# There is different format between spec1 and spec2 for test(1).
+			# spec1's format is "./bin/\133" but spec2's format is "./bin/["
+			# XXX filtering for only '[' now
+			${AWK} '{print $1}' <"${spec1}" | ${SORT} | sed -e 's,\\133,\[,g' >"${names1}"
+			${AWK} '{print $1}' <"${spec2}" | ${SORT} | sed -e 's,\[,\\133,g' >"${names2}"
 			if ${FGREP} -v -f "${names2}" "${spec1}" >/dev/null
 			then
 cat >&2 <

CVS commit: src/lib/librefuse

2019-04-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Apr 11 06:18:43 UTC 2019

Modified Files:
src/lib/librefuse: refuse.3

Log Message:
Avoid marking up semicolons.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/librefuse/refuse.3

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

Modified files:

Index: src/lib/librefuse/refuse.3
diff -u src/lib/librefuse/refuse.3:1.14 src/lib/librefuse/refuse.3:1.15
--- src/lib/librefuse/refuse.3:1.14	Wed Apr 10 21:38:02 2019
+++ src/lib/librefuse/refuse.3	Thu Apr 11 06:18:43 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: refuse.3,v 1.14 2019/04/10 21:38:02 maya Exp $
+.\"	$NetBSD: refuse.3,v 1.15 2019/04/11 06:18:43 wiz Exp $
 .\"
 .\" Copyright © 2007 Alistair Crooks.  All rights reserved.
 .\"
@@ -48,11 +48,11 @@
 .Fo FUSE_OPT_KEY
 .Fa "const char* templ" "int32_t key"
 .Fc
-.Vt struct fuse_opt Dv FUSE_OPT_END;
-.Vt int32_t Dv FUSE_OPT_KEY_OPT;
-.Vt int32_t Dv FUSE_OPT_KEY_NONOPT;
-.Vt int32_t Dv FUSE_OPT_KEY_KEEP;
-.Vt int32_t Dv FUSE_OPT_KEY_DISCARD;
+.Vt struct fuse_opt Dv FUSE_OPT_END ;
+.Vt int32_t Dv FUSE_OPT_KEY_OPT ;
+.Vt int32_t Dv FUSE_OPT_KEY_NONOPT ;
+.Vt int32_t Dv FUSE_OPT_KEY_KEEP ;
+.Vt int32_t Dv FUSE_OPT_KEY_DISCARD ;
 .Ft int
 .Fo fuse_opt_add_arg
 .Fa "struct fuse_args *args" "const char *arg"



CVS commit: src/sys/arch

2019-04-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 12 04:46:48 UTC 2019

Modified Files:
src/sys/arch/amd64/conf: ALL
src/sys/arch/i386/conf: ALL

Log Message:
Add the following debug options:

 AI_DEBUG
 ATHN_DEBUG
 ATU_DEBUG
 AXEN_DEBUG
 BGE_DEBUG
 BNX_DEBUG
 BWFM_DEBUG
 CAS_DEBUG
 CBB_DEBUG
 CMALO_DEBUG
 EF_DEBUG
 IWN_DEBUG
 IX_DEBUG
 LII_DEBUG
 MSK_DEBUG
 OTUS_DEBUG
 RUM_DEBUG
 RUN_DEBUG
 UMB_DEBUG
 UPGT_DEBUG
 URAL_DEBUG
 URNDIS_DEBUG
 URTW_DEBUG
 URTWN_DEBUG
 WPI_DEBUG
 ZYD_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.465 -r1.466 src/sys/arch/i386/conf/ALL

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/amd64/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.116 src/sys/arch/amd64/conf/ALL:1.117
--- src/sys/arch/amd64/conf/ALL:1.116	Sun Feb 24 20:58:55 2019
+++ src/sys/arch/amd64/conf/ALL	Fri Apr 12 04:46:48 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.116 2019/02/24 20:58:55 kamil Exp $
+# $NetBSD: ALL,v 1.117 2019/04/12 04:46:48 msaitoh Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.116 $"
+#ident		"ALL-$Revision: 1.117 $"
 
 maxusers	64		# estimated number of users
 
@@ -1754,6 +1754,7 @@ options AHD_DEBUG
 options AHD_DEBUG_OPTS=1
 options AH_DEBUG_ALQ
 options AIC_DEBUG
+options AI_DEBUG
 options ALTQ_DEBUG
 options AMD756_DEBUG
 options AMRR_DEBUG
@@ -1768,8 +1769,10 @@ options ATAPI_DEBUG_PROBE
 options ATA_DEBUG
 options ATA_RAID_DEBUG
 options ATE_DEBUG
+options ATHN_DEBUG
 options ATMEL_DEBUG
 options ATPPC_DEBUG
+options ATU_DEBUG
 options ATW_BBPDEBUG
 options ATW_DEBUG
 options ATW_SYNDEBUG
@@ -1785,11 +1788,13 @@ options AUSMBUS_PSC_DEBUG
 options AWACS_DEBUG
 options AWI_DEBUG
 options AXE_DEBUG
+options AXEN_DEBUG
 options AZALIA_DEBUG
 options BAH_DEBUG
 options BCACHE_DEBUG
 options BDEBUG
 options BEDEBUG
+options BGE_DEBUG
 options BHADEBUG
 options BIOS_MEMORY_DEBUG
 options BIT3DEBUG
@@ -1797,6 +1802,7 @@ options BKTR_RADIO_DEBUG
 options BLUETOOTH_DEBUG
 options BMAC_DEBUG
 options BMD_DEBUG
+options BNX_DEBUG
 options BOOTP_DEBUG
 options BOOTP_DEBUGx
 options BOOTXX_DEBUG
@@ -1808,8 +1814,11 @@ options BTLBDEBUG
 options BTNMGRDEBUG
 options BUS_DMA_DEBUG
 options BUS_SPACE_DEBUG
+options BWFM_DEBUG
 options CACHE_DEBUG
 options CARDBUS_DEBUG
+options CAS_DEBUG
+options CBB_DEBUG
 options CD18XXDEBUG
 options CGSIX_DEBUG
 options CHANGER_DEBUG
@@ -1817,6 +1826,7 @@ options CISS_DEBUG
 options CKSUMDEBUG
 options CLOCKDEBUG
 options CLOCK_DEBUG
+options CMALO_DEBUG
 options CNW_DEBUG
 options COMDEBUG
 options COMVRIPDEBUG
@@ -1995,6 +2005,8 @@ options ITE8181DEBUG
 options ITK_PROBE_DEBUG
 options IWI_DEBUG
 options IWM_DEBUG
+options IWN_DEBUG
+options IX_DEBUG
 options IYDEBUG
 options IYMEMDEBUG
 options J6X0TP_DEBUG
@@ -2011,6 +2023,7 @@ options LCD_DEBUG
 options LEDEBUG
 options LE_DEBUG
 options LIFDEBUG
+options LII_DEBUG
 options LINUX_SG_DEBUG
 options LLCDEBUG
 options LLC_DEBUG
@@ -2037,6 +2050,7 @@ options MQ200_DEBUG
 options MRT6DEBUG
 options MSDOSFS_DEBUG
 options MSG_DEBUG_OK
+options MSK_DEBUG
 options MULAW_DEBUG
 options MYDEV_DEBUG
 options NB_DEBUG
@@ -2069,6 +2083,7 @@ options ONOE_DEBUG
 options OPTPOINTDEBUG
 options OSIOP_DEBUG
 options OST_DEBUG
+options OTUS_DEBUG
 options P1212_DEBUG
 options PARDEBUG
 options PBMS_DEBUG
@@ -2128,6 +2143,8 @@ options RQDEBUG
 options RTC_DEBUG
 options RTSOCK_DEBUG
 options RTW_DEBUG
+options RUM_DEBUG
+options RUN_DEBUG
 options SACKBCDEBUG
 options SBC_DEBUG
 options SBJCN_DEBUG
@@ -2252,16 +2269,22 @@ options UKYOPON_DEBUG
 options ULPT_DEBUG
 options UL_DEBUG
 options UMASS_DEBUG
+options UMB_DEBUG
 options UMCT_DEBUG
 options UMIDIQUIRK_DEBUG
 options UMIDI_DEBUG
 options UMODEM_DEBUG
 options UNIV_DEBUG
+options UPGT_DEBUG
 options UPLCOM_DEBUG
 options UPL_DEBUG
+options URAL_DEBUG
 options URIO_DEBUG
 options URLPHY_DEBUG
 options URL_DEBUG
+options URNDIS_DEBUG
+options URTW_DEBUG
+options URTWN_DEBUG
 options USB_DEBUG
 options USCANNER_DEBUG
 options USEFULL_DEBUG
@@ -2306,6 +2329,7 @@ options WFQ_DEBUG
 options WI_DEBUG
 options WI_RING_DEBUG
 options WM_DEBUG
+options WPI_DEBUG
 options WSKBD_DEBUG
 options WSMUX_DEBUG
 options XBD_DEBUG
@@ -2323,5 +2347,6 @@ options XHCI_DEBUG
 options XYC_DEBUG
 options ZSKBD_DEBUG
 options ZSMACDEBUG
+options ZYD_DEBUG
 options xSCSI_DEBUG
 options xSD_DEBUG

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.465 src/sys/arch/i386/conf/ALL:1.466
--- src/sys/arch/i386/conf/ALL:1.465	Sat Mar 16 04:31:25 2019
+++ src/sys/arch/i386/conf/ALL	Fri Apr 12 04:46:48 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.465 2019/03/16 04:31:25 isaki Exp $
+# 

CVS commit: src/sys/dev/pci

2019-04-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 12 04:49:48 UTC 2019

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

Log Message:
- Add some new C620 LPC devices.
- Remove extra white spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.1369 -r1.1370 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.1369 src/sys/dev/pci/pcidevs:1.1370
--- src/sys/dev/pci/pcidevs:1.1369	Thu Apr 11 04:59:49 2019
+++ src/sys/dev/pci/pcidevs	Fri Apr 12 04:49:48 2019
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1369 2019/04/11 04:59:49 mrg Exp $
+$NetBSD: pcidevs,v 1.1370 2019/04/12 04:49:48 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4434,7 +4434,6 @@ product INTEL XE5_V3_IMC0_TADR3 0x2fac	X
 product INTEL XE5_V3_IMC0_TADR4 0x2fad	Xeon E5 v3 IMC Ch 2-3 Target Address Decode Registers
 product INTEL XE5_V3_DDRIO_CHAN	0x2fae  Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO Channel 0/1 Broadcast
 product INTEL XE5_V3_DDRIO_BROAD 0x2faf Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO Global Broadcast
-
 product INTEL XE5_V3_IMC0_REG1	0x2fb0	Xeon E5 v3 IMC Ch 0-1 Registers
 product INTEL XE5_V3_IMC0_REG2	0x2fb1	Xeon E5 v3 IMC Ch 0-1 Registers
 product INTEL XE5_V3_IMC0_REG3	0x2fb2	Xeon E5 v3 IMC Ch 2-3 Registers
@@ -4495,7 +4494,6 @@ product INTEL XE5_V3_BRA4	0x2ffb  Xeon E
 product INTEL XE5_V3_SADBR1	0x2ffc  Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers
 product INTEL XE5_V3_SADBR2	0x2ffd  Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers
 product INTEL XE5_V3_SADBR3	0x2ffe  Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers
-
 product INTEL WIFI_LINK_3165_1	0x3165	Dual Band Wireless AC 3165
 product INTEL WIFI_LINK_3165_2	0x3166	Dual Band Wireless AC 3165
 product INTEL GLK_IGD_1		0x3184	UHD Graphics 605
@@ -5436,6 +5434,9 @@ product INTEL C620_LPC_5	0xa1c5	C626 LPC
 product INTEL C620_LPC_6	0xa1c6	C627 LPC or eSPI
 product INTEL C620_LPC_7	0xa1c7	C628 LPC or eSPI
 product INTEL C620_LPC_8	0xa1ca	C629 LPC or eSPI
+product INTEL C620_LPC_9	0xa1cb	C621A LPC or eSPI
+product INTEL C620_LPC_10	0xa1cc	C627A LPC or eSPI
+product INTEL C620_LPC_11	0xa1cd	C629A LPC or eSPI
 product INTEL C620_SSATA_AHCI	0xa1d2	C620 sSATA AHCI
 product INTEL C620_SSATA_RAID	0xa1d6	C620 sSATA 3rd Party RAID
 product INTEL C620_PCIE_16	0xa1e7	C620 PCIe Root Port
@@ -5485,6 +5486,9 @@ product INTEL C620_LPC_S_2	0xa243	C627 L
 product INTEL C620_LPC_S_3	0xa244	C621 LPC or eSPI
 product INTEL C620_LPC_S_4	0xa245	C627 LPC or eSPI
 product INTEL C620_LPC_S_5	0xa246	C628 LPC or eSPI
+product INTEL C620_LPC_S_6	0xa24a	C621A LPC or eSPI
+product INTEL C620_LPC_12	0xa24b	C627A LPC or eSPI
+product INTEL C620_LPC_13	0xa24c	C629A LPC or eSPI
 product INTEL C620_SSATA_AHCI_S	0xa252	C620 sSATA AHCI
 product INTEL C620_SSATA_RAID_S	0xa256	C620 sSATA 3rd Party RAID
 product INTEL C620_PCIE_S_16	0xa267	C620 PCIe Root Port



CVS commit: src/sys/arch/mips/adm5120/dev

2019-04-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 12 05:19:24 UTC 2019

Modified Files:
src/sys/arch/mips/adm5120/dev: if_admsw.c

Log Message:
 Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/mips/adm5120/dev/if_admsw.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/mips/adm5120/dev/if_admsw.c
diff -u src/sys/arch/mips/adm5120/dev/if_admsw.c:1.19 src/sys/arch/mips/adm5120/dev/if_admsw.c:1.20
--- src/sys/arch/mips/adm5120/dev/if_admsw.c:1.19	Thu Apr 11 08:50:59 2019
+++ src/sys/arch/mips/adm5120/dev/if_admsw.c	Fri Apr 12 05:19:24 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_admsw.c,v 1.19 2019/04/11 08:50:59 msaitoh Exp $ */
+/* $NetBSD: if_admsw.c,v 1.20 2019/04/12 05:19:24 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.19 2019/04/11 08:50:59 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.20 2019/04/12 05:19:24 msaitoh Exp $");
 
 
 #include 
@@ -1237,7 +1237,7 @@ admsw_mediachange(struct ifnet *ifp)
 		else
 			val = PHY_CNTL2_100M;
 	} else if (IFM_SUBTYPE(ifm->ifm_media) == IFM_10_T) {
-		if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
+		if ((ifm->ifm_media & IFM_FDX) != 0)
 			val = PHY_CNTL2_FDX;
 		else
 			val = 0;



CVS commit: src/sys/arch/m68k/m68k

2019-04-11 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Apr 12 03:29:24 UTC 2019

Modified Files:
src/sys/arch/m68k/m68k: copy.s

Log Message:
Fix an asm-comments-vs-preprocessor-line-continuations mistake in
UFETCH_PROLOGUE and USTORE_PROLOGUE that caused a couple of important
instructions to be omitted, resulting in a fatal trap.

Thanks isaki@ for finding my mistake and providing the fix!


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/m68k/m68k/copy.s

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/m68k/m68k/copy.s
diff -u src/sys/arch/m68k/m68k/copy.s:1.47 src/sys/arch/m68k/m68k/copy.s:1.48
--- src/sys/arch/m68k/m68k/copy.s:1.47	Sat Apr  6 03:06:26 2019
+++ src/sys/arch/m68k/m68k/copy.s	Fri Apr 12 03:29:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: copy.s,v 1.47 2019/04/06 03:06:26 thorpej Exp $	*/
+/*	$NetBSD: copy.s,v 1.48 2019/04/12 03:29:24 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2019 The NetBSD Foundation, Inc.
@@ -364,8 +364,8 @@ ENTRY(kcopy)
 
 #define	UFETCH_PROLOGUE			\
 	CHECK_SFC		;	\
-	movl	4(%sp),%a0		| address to read	;	\
-	GETCURPCB(%a1)			| a1 = curpcb		;	\
+	movl	4(%sp),%a0		/* address to read */	;	\
+	GETCURPCB(%a1)			/* a1 = curpcb */	;	\
 	movl	#.Lufetchstore_fault,PCB_ONFAULT(%a1)
 
 /* LINTSTUB: _ufetch_8(const uint8_t *uaddr, uint8_t *valp); */
@@ -394,8 +394,8 @@ ENTRY(_ufetch_32)
 
 #define	USTORE_PROLOGUE			\
 	CHECK_DFC		;	\
-	movl	4(%sp),%a0		| address to write	;	\
-	GETCURPCB(%a1)			| a1 = curpcb		;	\
+	movl	4(%sp),%a0		/* address to write */	;	\
+	GETCURPCB(%a1)			/* a1 = curpcb */	;	\
 	movl	#.Lufetchstore_fault,PCB_ONFAULT(%a1)
 
 /* LINTSTUB: _ustore_8(uint8_t *uaddr, uint8_t val); */



CVS commit: src/sys/dev/usb

2019-04-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 12 03:32:06 UTC 2019

Modified Files:
src/sys/dev/usb: if_urereg.h

Log Message:
 Apply FreeBSD r346028 from ganbold@f.o:

 > Fix URE_WDT6_SET_MODE value in the register definition.
 > Both linux and u-boot sources for RTL8152 driver has this value.
 > RTL8152 USB ethernet is used in NanoPI R1 board as second ethernet.
 > This fixes for me RTL8152 USB ethernet not detected problem after
 > reboot on NanoPI R1 board.
 >
 > Both NetBSD and OpenBSD have a wrong value so far.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/if_urereg.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/dev/usb/if_urereg.h
diff -u src/sys/dev/usb/if_urereg.h:1.1 src/sys/dev/usb/if_urereg.h:1.2
--- src/sys/dev/usb/if_urereg.h:1.1	Wed Feb  6 11:55:06 2019
+++ src/sys/dev/usb/if_urereg.h	Fri Apr 12 03:32:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urereg.h,v 1.1 2019/02/06 11:55:06 rin Exp $	*/
+/*	$NetBSD: if_urereg.h,v 1.2 2019/04/12 03:32:06 msaitoh Exp $	*/
 /*	$OpenBSD: if_urereg.h,v 1.5 2018/11/02 21:32:30 jcs Exp $	*/
 /*-
  * Copyright (c) 2015-2016 Kevin Lo 
@@ -178,7 +178,7 @@
 #define	URE_EEEP_CR_EEEP_TX	0x0002
 
 /* PLA_WDT6_CTRL */
-#define	URE_WDT6_SET_MODE	0x001
+#define	URE_WDT6_SET_MODE	0x0010
 
 /* PLA_TCR0 */
 #define	URE_TCR0_TX_EMPTY	0x0800



CVS commit: src/sbin/tunefs

2019-04-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Apr 12 01:14:37 UTC 2019

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

Log Message:
Add missing space in "quotas disabled" output from tunefs -N


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sbin/tunefs/tunefs.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/tunefs/tunefs.c
diff -u src/sbin/tunefs/tunefs.c:1.49 src/sbin/tunefs/tunefs.c:1.50
--- src/sbin/tunefs/tunefs.c:1.49	Wed Aug 26 05:41:20 2015
+++ src/sbin/tunefs/tunefs.c	Fri Apr 12 01:14:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tunefs.c,v 1.49 2015/08/26 05:41:20 mlelstv Exp $	*/
+/*	$NetBSD: tunefs.c,v 1.50 2019/04/12 01:14:37 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)tunefs.c	8.3 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: tunefs.c,v 1.49 2015/08/26 05:41:20 mlelstv Exp $");
+__RCSID("$NetBSD: tunefs.c,v 1.50 2019/04/12 01:14:37 pgoyette Exp $");
 #endif
 #endif /* not lint */
 
@@ -352,7 +352,7 @@ main(int argc, char *argv[])
 printf(" group");
 			printf(" enabled\n");
 		} else {
-			printf("disabled\n");
+			printf(" disabled\n");
 		}
 		printf("tunefs: no changes made\n");
 		exit(0);



CVS commit: src/lib/libterminfo

2019-04-11 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Apr 11 23:52:08 UTC 2019

Modified Files:
src/lib/libterminfo: setupterm.c

Log Message:
fix typo in error message; database is spelled with one 'b' and three 'a's


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libterminfo/setupterm.c

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

Modified files:

Index: src/lib/libterminfo/setupterm.c
diff -u src/lib/libterminfo/setupterm.c:1.8 src/lib/libterminfo/setupterm.c:1.9
--- src/lib/libterminfo/setupterm.c:1.8	Thu May  4 09:42:23 2017
+++ src/lib/libterminfo/setupterm.c	Thu Apr 11 23:52:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: setupterm.c,v 1.8 2017/05/04 09:42:23 roy Exp $ */
+/* $NetBSD: setupterm.c,v 1.9 2019/04/11 23:52:08 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: setupterm.c,v 1.8 2017/05/04 09:42:23 roy Exp $");
+__RCSID("$NetBSD: setupterm.c,v 1.9 2019/04/11 23:52:08 jakllsch Exp $");
 
 #include 
 #include 
@@ -107,7 +107,7 @@ ti_setupterm(TERMINAL **nterm, const cha
 			/* NOTREACHED */
 		case 0:
 			reterrarg(error,
-			"%s: terminal not listed in terminfo datase",
+			"%s: terminal not listed in terminfo database",
 			term);
 			/* NOTREACHED */
 		default: