CVS commit: src/sys/uvm/pmap

2017-05-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri May 26 06:41:42 UTC 2017

Modified Files:
src/sys/uvm/pmap: pmap_tlb.h

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.h
diff -u src/sys/uvm/pmap/pmap_tlb.h:1.9 src/sys/uvm/pmap/pmap_tlb.h:1.10
--- src/sys/uvm/pmap/pmap_tlb.h:1.9	Mon Jul 11 16:06:09 2016
+++ src/sys/uvm/pmap/pmap_tlb.h	Fri May 26 06:41:42 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.h,v 1.9 2016/07/11 16:06:09 matt Exp $	*/
+/*	$NetBSD: pmap_tlb.h,v 1.10 2017/05/26 06:41:42 skrll Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -115,7 +115,7 @@ struct pmap_tlb_info {
 #define	tlbinfo_noasids_p(ti)	((ti)->ti_asids_free == 0)
 	kmutex_t *ti_lock;
 	u_int ti_wired;			/* # of wired TLB entries */
-	tlb_asid_t ti_asid_hint;		/* probable next ASID to use */
+	tlb_asid_t ti_asid_hint;	/* probable next ASID to use */
 	tlb_asid_t ti_asid_max;
 	LIST_HEAD(, pmap_asid_info) ti_pais; /* list of active ASIDs */
 #ifdef MULTIPROCESSOR



CVS commit: src/sys/uvm/pmap

2017-05-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri May 26 06:40:47 UTC 2017

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
Remove incorrect __diagused


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.20 src/sys/uvm/pmap/pmap_tlb.c:1.21
--- src/sys/uvm/pmap/pmap_tlb.c:1.20	Fri May 26 06:38:56 2017
+++ src/sys/uvm/pmap/pmap_tlb.c	Fri May 26 06:40:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.20 2017/05/26 06:38:56 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.21 2017/05/26 06:40:47 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.20 2017/05/26 06:38:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.21 2017/05/26 06:40:47 skrll Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -826,7 +826,7 @@ pmap_tlb_asid_alloc(struct pmap_tlb_info
 	 * a new one.
 	 */
 	if (__predict_true(TLBINFO_ASID_INUSE_P(ti, ti->ti_asid_hint))) {
-		const size_t nbpw __diagused = 8*sizeof(ti->ti_asid_bitmap[0]);
+		const size_t nbpw = 8 * sizeof(ti->ti_asid_bitmap[0]);
 		size_t i;
 		u_long bits;
 		for (i = 0; (bits = ~ti->ti_asid_bitmap[i]) == 0; i++) {



CVS commit: src/sys/uvm/pmap

2017-05-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri May 26 06:38:56 UTC 2017

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
Use the define name PMAP_HWPAGEWALKER and not PMAP_TLB_HWPAGEWALKER


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.19 src/sys/uvm/pmap/pmap_tlb.c:1.20
--- src/sys/uvm/pmap/pmap_tlb.c:1.19	Sun Oct  9 14:51:50 2016
+++ src/sys/uvm/pmap/pmap_tlb.c	Fri May 26 06:38:56 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.19 2016/10/09 14:51:50 christos Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.20 2017/05/26 06:38:56 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.19 2016/10/09 14:51:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.20 2017/05/26 06:38:56 skrll Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -721,7 +721,7 @@ pmap_tlb_shootdown_bystanders(pmap_t pm)
 }
 #endif /* MULTIPROCESSOR && PMAP_TLB_NEED_SHOOTDOWN */
 
-#ifndef PMAP_TLB_HWPAGEWALKER
+#ifndef PMAP_HWPAGEWALKER
 int
 pmap_tlb_update_addr(pmap_t pm, vaddr_t va, pt_entry_t pte, u_int flags)
 {
@@ -762,7 +762,7 @@ pmap_tlb_update_addr(pmap_t pm, vaddr_t 
 
 	return rv;
 }
-#endif /* !PMAP_TLB_HWPAGEWALKER */
+#endif /* !PMAP_HWPAGEWALKER */
 
 void
 pmap_tlb_invalidate_addr(pmap_t pm, vaddr_t va)



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

2017-05-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri May 26 05:33:27 UTC 2017

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

Log Message:
Add new t_strcol test to the sets list - hopefully fix the build


To generate a diff of this commit:
cvs rdiff -u -r1.746 -r1.747 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.746 src/distrib/sets/lists/tests/mi:1.747
--- src/distrib/sets/lists/tests/mi:1.746	Sun May 21 15:28:38 2017
+++ src/distrib/sets/lists/tests/mi	Fri May 26 05:33:27 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.746 2017/05/21 15:28:38 riastradh Exp $
+# $NetBSD: mi,v 1.747 2017/05/26 05:33:27 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2705,6 +2705,7 @@
 ./usr/tests/lib/libc/string/t_strcat		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/string/t_strchr		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/string/t_strcmp		tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libc/string/t_strcol		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/string/t_strcpy		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/string/t_strcspn		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/string/t_strerror		tests-lib-tests		compattestfile,atf



CVS commit: src/share/man/man9

2017-05-25 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri May 26 02:30:24 UTC 2017

Modified Files:
src/share/man/man9: opencrypto.9

Log Message:
update opencrypto(9)


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/opencrypto.9

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/man9/opencrypto.9
diff -u src/share/man/man9/opencrypto.9:1.14 src/share/man/man9/opencrypto.9:1.15
--- src/share/man/man9/opencrypto.9:1.14	Tue Dec 31 01:55:05 2013
+++ src/share/man/man9/opencrypto.9	Fri May 26 02:30:24 2017
@@ -1,5 +1,5 @@
 .\"	$OpenBSD: crypto.9,v 1.25 2003/07/11 13:47:41 jmc Exp $
-.\"	$NetBSD: opencrypto.9,v 1.14 2013/12/31 01:55:05 pgoyette Exp $
+.\"	$NetBSD: opencrypto.9,v 1.15 2017/05/26 02:30:24 knakahara Exp $
 .\"
 .\" The author of this man page is Angelos D. Keromytis (ange...@cis.upenn.edu)
 .\"
@@ -16,7 +16,7 @@
 .\" MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
 .\" PURPOSE.
 .\"
-.Dd December 30, 2013
+.Dd May 26, 2017
 .Dt OPENCRYPTO 9
 .Os
 .Sh NAME
@@ -34,6 +34,8 @@
 .Nm crypto_kdispatch ,
 .Nm crypto_getreq ,
 .Nm crypto_freereq
+.Nm crypto_kgetreq ,
+.Nm crypto_kfreereq
 .Nd API for cryptographic services in the kernel
 .Sh SYNOPSIS
 .In opencrypto/cryptodev.h
@@ -63,6 +65,10 @@
 .Fn crypto_getreq "int"
 .Ft void
 .Fn crypto_freereq "struct cryptop *"
+.Ft struct cryptop *
+.Fn crypto_kgetreq "int" "int"
+.Ft void
+.Fn crypto_kfreereq "struct cryptop *"
 .Bd -literal
 
 #define EALG_MAX_BLOCK_LEN  16
@@ -451,9 +457,22 @@ Identifier specifying which low-level dr
 Callback called on completion of a keying operation.
 .El
 .Pp
+.Fn crypto_kgetreq
+allocates a
+.Fa cryptkop
+structure. The first argument means the same as
+.Fn crypto_getreq .
+The second argument means flags passed to
+.Fn pool_get .
+.Pp
+.Fn crypto_kfreereq
+deallocates a structure
+.Fa cryptkop
+structure.
+.Pp
 The following sysctl entries exist to adjust
 the behaviour of the system from userland:
-.Bl -tag -width kern.cryptodevallowsoft
+.Bl -tag -width opencrypto.crypto_ret_kq.maxlen
 .It kern.usercrypto
 Allow (1) or forbid (0) userland access to
 .Pa /dev/crypto .
@@ -471,7 +490,50 @@ operations (handling the latter in softw
 .It \*[Gt] 0
 Allow user requests only for operations which are hardware-accelerated.
 .El
+.It opencrypto.crypto_ret_q.maxlen
+Limit the length of queue(crypto_ret_q) which mediates between
+crypto driver's completion and calling
+.Fa cryptop
+callback. When the queue exceeds this limit,
+.Fn crypto_getreq
+fails.
+.Bl -tag -width 
+.It <= 0
+means unlimited.
+.El
+.It opencrypto.crypto_ret_kq.maxlen
+Limit the length of queue(crypto_ret_kq) which mediates between
+crypto driver's completion and calling
+.Fa cryptkop
+callback. When the queue exceeds this limit,
+.Fn crypto_kgetreq
+fails.
+.Bl -tag -width 
+.It <= 0
+means unlimited.
+.El
+.El
+.Pp
+.Bl -tag -width opencrypto.crypto_ret_kq.drops
+The following sysctl entries exist to get statistics.
+.It opencrypto.crypto_ret_q.len
+Current crypto_ret_q length.
+.It opencrypto.crypto_ret_q.drops
+The count of
+.Fn crypto_getreq
+failed as overflow
+.Pa opencrypto.crypto_ret_q.maxlen
+.
+.It opencrypto.crypto_ret_kq.len
+Current crypto_ret_kq length.
+.It opencrypto.crypto_ret_kq.drops
+The count of
+.Fn crypto_kgetreq
+failed as overflow
+.Pa opencrypto.crypto_ret_kq.maxlen
+.
 .El
+.Pp
 .Sh DRIVER-SIDE API
 The
 .Fn crypto_get_driverid ,
@@ -588,6 +650,12 @@ returns a pointer to a
 structure and
 .Dv NULL
 on failure.
+.Fn crypto_kgetreq
+returns a pointer to a
+.Fa cryptkop
+structure and
+.Dv NULL
+on failure.
 .Fn crypto_dispatch
 returns
 .Er EINVAL
@@ -608,7 +676,8 @@ crypto algorithm implementations
 .Xr ipsec 4 ,
 .Xr pcmcia 4 ,
 .Xr condvar 9 ,
-.Xr malloc 9
+.Xr malloc 9 ,
+.Xr pool 9
 .Rs
 .%A "Angelos D. Keromytis"
 .%A "Jason L. Wright"



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

2017-05-25 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Fri May 26 01:24:19 UTC 2017

Modified Files:
src/tests/lib/libc/string: Makefile
Added Files:
src/tests/lib/libc/string: t_strcoll.c

Log Message:
Add simple expect-fail test case for strcoll(3)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/string/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/string/t_strcoll.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/string/Makefile
diff -u src/tests/lib/libc/string/Makefile:1.9 src/tests/lib/libc/string/Makefile:1.10
--- src/tests/lib/libc/string/Makefile:1.9	Mon Jun 23 10:53:20 2014
+++ src/tests/lib/libc/string/Makefile	Fri May 26 01:24:19 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2014/06/23 10:53:20 shm Exp $
+# $NetBSD: Makefile,v 1.10 2017/05/26 01:24:19 perseant Exp $
 
 .include 
 
@@ -13,6 +13,7 @@ TESTS_C+=	t_popcount
 TESTS_C+=	t_strcat
 TESTS_C+=	t_strchr
 TESTS_C+=	t_strcmp
+TESTS_C+=	t_strcoll
 TESTS_C+=	t_strcpy
 TESTS_C+=	t_strcspn
 TESTS_C+=	t_strerror

Added files:

Index: src/tests/lib/libc/string/t_strcoll.c
diff -u /dev/null src/tests/lib/libc/string/t_strcoll.c:1.1
--- /dev/null	Fri May 26 01:24:19 2017
+++ src/tests/lib/libc/string/t_strcoll.c	Fri May 26 01:24:19 2017
@@ -0,0 +1,106 @@
+/* $NetBSD: t_strcoll.c,v 1.1 2017/05/26 01:24:19 perseant Exp $ */
+
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Konrad Schroder
+ *
+ * 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.
+ */
+
+#include 
+__COPYRIGHT("@(#) Copyright (c) 2017\
+ The NetBSD Foundation, inc. All rights reserved.");
+__RCSID("$NetBSD: t_strcoll.c,v 1.1 2017/05/26 01:24:19 perseant Exp $");
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+static struct test {
+	const char *locale;
+	const char * const data[5];
+} tests[] = {
+	{
+		"C",
+		{ "aardvark", "absolution", "zyzygy", NULL },
+	}, {
+		"ru_RU.KOI8-R",
+		{ "\xc5\xc4\xcf\xcb", "\xa3\xd6", "\xc5\xda\xc4\xc9\xd4\xd8", NULL },
+	}, {
+		NULL,
+		{ NULL, NULL, NULL, NULL },
+	}
+};
+
+static void
+h_ordering(const struct test *t)
+{
+	const char * const *a;
+	const char * const *b;
+	char buf_a[1024], buf_b[1024];
+
+	ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
+	printf("Trying locale %s...\n", t->locale);
+	ATF_REQUIRE(setlocale(LC_COLLATE, t->locale) != NULL);
+
+	for (a = t->data; *a != NULL; ++a) {
+		strvis(buf_a, *a, VIS_WHITE | VIS_OCTAL);
+		for (b = a + 1; *b != NULL; ++b) {
+			strvis(buf_b, *b, VIS_WHITE | VIS_OCTAL);
+			printf("Checking \"%s\" < \"%s\"\n", buf_a, buf_b);
+			ATF_REQUIRE(strcoll(*a, *b) < 0);
+			printf("...good\n");
+		}
+	}
+}
+
+ATF_TC(ordering);
+
+ATF_TC_HEAD(ordering, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+		"Checks collation ordering under diferent locales");
+}
+
+ATF_TC_BODY(ordering, tc)
+{
+	struct test *t;
+
+	atf_tc_expect_fail("%s", "LC_COLLATE not supported");
+	for (t = &tests[0]; t->locale != NULL; ++t)
+		h_ordering(t);
+	atf_tc_expect_pass();
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+	ATF_TP_ADD_TC(tp, ordering);
+
+	return atf_no_error();
+}



CVS commit: src/tests/net

2017-05-25 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri May 26 01:14:38 UTC 2017

Modified Files:
src/tests/net/icmp: t_icmp6_redirect.sh
src/tests/net/if_gif: t_gif.sh
src/tests/net/ndp: t_ndp.sh t_ra.sh
src/tests/net/net: t_ipv6address.sh

Log Message:
Change the default value of DEBUG of stable tests to false


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/net/icmp/t_icmp6_redirect.sh
cvs rdiff -u -r1.9 -r1.10 src/tests/net/if_gif/t_gif.sh
cvs rdiff -u -r1.18 -r1.19 src/tests/net/ndp/t_ndp.sh
cvs rdiff -u -r1.26 -r1.27 src/tests/net/ndp/t_ra.sh
cvs rdiff -u -r1.12 -r1.13 src/tests/net/net/t_ipv6address.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/net/icmp/t_icmp6_redirect.sh
diff -u src/tests/net/icmp/t_icmp6_redirect.sh:1.7 src/tests/net/icmp/t_icmp6_redirect.sh:1.8
--- src/tests/net/icmp/t_icmp6_redirect.sh:1.7	Fri Nov 25 08:51:16 2016
+++ src/tests/net/icmp/t_icmp6_redirect.sh	Fri May 26 01:14:38 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_icmp6_redirect.sh,v 1.7 2016/11/25 08:51:16 ozaki-r Exp $
+#	$NetBSD: t_icmp6_redirect.sh,v 1.8 2017/05/26 01:14:38 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -42,7 +42,7 @@ IP6IF0_GW2=fc00:1::3
 
 REDIRECT_TIMEOUT=5
 
-DEBUG=${DEBUG:-true}
+DEBUG=${DEBUG:-false}
 
 atf_test_case icmp6_redirect_basic cleanup
 

Index: src/tests/net/if_gif/t_gif.sh
diff -u src/tests/net/if_gif/t_gif.sh:1.9 src/tests/net/if_gif/t_gif.sh:1.10
--- src/tests/net/if_gif/t_gif.sh:1.9	Wed Dec 21 09:46:39 2016
+++ src/tests/net/if_gif/t_gif.sh	Fri May 26 01:14:38 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_gif.sh,v 1.9 2016/12/21 09:46:39 ozaki-r Exp $
+#	$NetBSD: t_gif.sh,v 1.10 2017/05/26 01:14:38 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -61,7 +61,7 @@ ROUTER2_GIFIP6_DUMMY=fc00:14::1
 ROUTER2_GIFIP6_RECURSIVE1=fc00:104::1
 ROUTER2_GIFIP6_RECURSIVE2=fc00:204::1
 
-DEBUG=${DEBUG:-true}
+DEBUG=${DEBUG:-false}
 TIMEOUT=5
 
 setup_router()

Index: src/tests/net/ndp/t_ndp.sh
diff -u src/tests/net/ndp/t_ndp.sh:1.18 src/tests/net/ndp/t_ndp.sh:1.19
--- src/tests/net/ndp/t_ndp.sh:1.18	Fri Mar  3 07:34:04 2017
+++ src/tests/net/ndp/t_ndp.sh	Fri May 26 01:14:38 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ndp.sh,v 1.18 2017/03/03 07:34:04 ozaki-r Exp $
+#	$NetBSD: t_ndp.sh,v 1.19 2017/05/26 01:14:38 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -30,7 +30,7 @@ SOCKDST=unix://commsock2
 IP6SRC=fc00::1
 IP6DST=fc00::2
 
-DEBUG=${DEBUG:-true}
+DEBUG=${DEBUG:-false}
 TIMEOUT=1
 
 atf_test_case ndp_cache_expiration cleanup

Index: src/tests/net/ndp/t_ra.sh
diff -u src/tests/net/ndp/t_ra.sh:1.26 src/tests/net/ndp/t_ra.sh:1.27
--- src/tests/net/ndp/t_ra.sh:1.26	Fri Mar  3 07:34:04 2017
+++ src/tests/net/ndp/t_ra.sh	Fri May 26 01:14:38 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ra.sh,v 1.26 2017/03/03 07:34:04 ozaki-r Exp $
+#	$NetBSD: t_ra.sh,v 1.27 2017/05/26 01:14:38 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -44,7 +44,7 @@ PIDFILE3=./rump.rtadvd.pid3
 PIDFILE4=./rump.rtadvd.pid4
 CONFIG=./rtadvd.conf
 WAITTIME=2
-DEBUG=${DEBUG:-true}
+DEBUG=${DEBUG:-false}
 
 init_server()
 {

Index: src/tests/net/net/t_ipv6address.sh
diff -u src/tests/net/net/t_ipv6address.sh:1.12 src/tests/net/net/t_ipv6address.sh:1.13
--- src/tests/net/net/t_ipv6address.sh:1.12	Wed Dec 14 02:50:42 2016
+++ src/tests/net/net/t_ipv6address.sh	Fri May 26 01:14:38 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ipv6address.sh,v 1.12 2016/12/14 02:50:42 ozaki-r Exp $
+#	$NetBSD: t_ipv6address.sh,v 1.13 2017/05/26 01:14:38 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -41,7 +41,7 @@ BUS2=bus2
 BUSSRC=bus_src
 BUSDST=bus_dst
 
-DEBUG=${DEBUG:-true}
+DEBUG=${DEBUG:-false}
 TIMEOUT=3
 
 atf_test_case linklocal cleanup



CVS commit: src/sys/arch/evbarm/tegra

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri May 26 00:15:12 UTC 2017

Modified Files:
src/sys/arch/evbarm/tegra: tegra_machdep.c

Log Message:
Remove tegra_chip_id vs compat string test in initarm.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/evbarm/tegra/tegra_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/evbarm/tegra/tegra_machdep.c
diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.40 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.41
--- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.40	Fri Apr 21 23:36:58 2017
+++ src/sys/arch/evbarm/tegra/tegra_machdep.c	Fri May 26 00:15:12 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_machdep.c,v 1.40 2017/04/21 23:36:58 jmcneill Exp $ */
+/* $NetBSD: tegra_machdep.c,v 1.41 2017/05/26 00:15:12 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.40 2017/04/21 23:36:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.41 2017/05/26 00:15:12 jmcneill Exp $");
 
 #include "opt_tegra.h"
 #include "opt_machdep.h"
@@ -281,25 +281,6 @@ initarm(void *arg)
 	parse_mi_bootargs(mi_bootargs);
 #endif
 
-	const u_int chip_id = tegra_chip_id();
-	switch (chip_id) {
-#ifdef SOC_TEGRA124
-case CHIP_ID_TEGRA124: {
-		const char * const tegra124_compatible_strings[] = {
-			"nvidia,tegra124",
-			NULL
-		};
-		const int node = OF_peer(0);
-if (of_compatible(node, tegra124_compatible_strings) < 0) {
-			panic("FDT is not compatible with Tegra124");
-		}
-break;
-	}
-#endif
-	default:
-		panic("Kernel does not support Tegra SOC ID %#x", chip_id);
-	}
-
 	DPRINTF("KERNEL_BASE=0x%x, KERNEL_VM_BASE=0x%x, KERNEL_VM_BASE - KERNEL_BASE=0x%x, KERNEL_BASE_VOFFSET=0x%x\n",
 		KERNEL_BASE, KERNEL_VM_BASE, KERNEL_VM_BASE - KERNEL_BASE, KERNEL_BASE_VOFFSET);
 



CVS commit: src/sys/arch/evbarm/tegra

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri May 26 00:00:25 UTC 2017

Modified Files:
src/sys/arch/evbarm/tegra: tegra_start.S

Log Message:
Remove unused SOC_MPINIT definition


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/tegra/tegra_start.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/evbarm/tegra/tegra_start.S
diff -u src/sys/arch/evbarm/tegra/tegra_start.S:1.10 src/sys/arch/evbarm/tegra/tegra_start.S:1.11
--- src/sys/arch/evbarm/tegra/tegra_start.S:1.10	Fri Apr 21 23:36:58 2017
+++ src/sys/arch/evbarm/tegra/tegra_start.S	Fri May 26 00:00:25 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_start.S,v 1.10 2017/04/21 23:36:58 jmcneill Exp $ */
+/* $NetBSD: tegra_start.S,v 1.11 2017/05/26 00:00:25 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014, 2015 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
 #include 
 #include 
 
-RCSID("$NetBSD: tegra_start.S,v 1.10 2017/04/21 23:36:58 jmcneill Exp $")
+RCSID("$NetBSD: tegra_start.S,v 1.11 2017/05/26 00:00:25 jmcneill Exp $")
 
 #if defined(VERBOSE_INIT_ARM) && defined(CONSADDR)
 #define	XPUTC(n)	mov r0, n; bl xputc
@@ -67,10 +67,6 @@ RCSID("$NetBSD: tegra_start.S,v 1.10 201
 
 #define	MD_CPU_HATCH	_C_LABEL(gtmr_init_cpu_clock)
 
-#if defined(SOC_TEGRA124)
-#define SOC_MPINIT	_C_LABEL(tegra124_mpinit)
-#endif
-
 /*
  * Kernel start routine for Tegra 124 SoC.
  * At this point, this code has been loaded into SDRAM



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:55:30 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_usbphy.c

Log Message:
Match nvidia,tegra210-usb-phy and nvidia,tegra30-usb-phy compat strings.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/nvidia/tegra_usbphy.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/nvidia/tegra_usbphy.c
diff -u src/sys/arch/arm/nvidia/tegra_usbphy.c:1.6 src/sys/arch/arm/nvidia/tegra_usbphy.c:1.7
--- src/sys/arch/arm/nvidia/tegra_usbphy.c:1.6	Tue Mar  8 07:49:20 2016
+++ src/sys/arch/arm/nvidia/tegra_usbphy.c	Thu May 25 23:55:30 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_usbphy.c,v 1.6 2016/03/08 07:49:20 skrll Exp $ */
+/* $NetBSD: tegra_usbphy.c,v 1.7 2017/05/25 23:55:30 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_usbphy.c,v 1.6 2016/03/08 07:49:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_usbphy.c,v 1.7 2017/05/25 23:55:30 jmcneill Exp $");
 
 #include 
 #include 
@@ -79,7 +79,12 @@ CFATTACH_DECL_NEW(tegra_usbphy, sizeof(s
 static int
 tegra_usbphy_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-usb-phy", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-usb-phy",
+		"nvidia,tegra124-usb-phy",
+		"nvidia,tegra30-usb-phy",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:54:45 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_timer.c

Log Message:
Match nvidia,tegra210-timer and nvidia,tegra20-timer compat strings.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/nvidia/tegra_timer.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/nvidia/tegra_timer.c
diff -u src/sys/arch/arm/nvidia/tegra_timer.c:1.5 src/sys/arch/arm/nvidia/tegra_timer.c:1.6
--- src/sys/arch/arm/nvidia/tegra_timer.c:1.5	Sun Apr 16 12:28:21 2017
+++ src/sys/arch/arm/nvidia/tegra_timer.c	Thu May 25 23:54:45 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_timer.c,v 1.5 2017/04/16 12:28:21 jmcneill Exp $ */
+/* $NetBSD: tegra_timer.c,v 1.6 2017/05/25 23:54:45 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_timer.c,v 1.5 2017/04/16 12:28:21 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_timer.c,v 1.6 2017/05/25 23:54:45 jmcneill Exp $");
 
 #include 
 #include 
@@ -74,7 +74,12 @@ CFATTACH_DECL_NEW(tegra_timer, sizeof(st
 static int
 tegra_timer_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-timer", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-timer",
+		"nvidia,tegra124-timer",
+		"nvidia,tegra20-timer",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:53:50 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_sdhc.c

Log Message:
Match nvidia,tegra210-sdhci compat string.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/nvidia/tegra_sdhc.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/nvidia/tegra_sdhc.c
diff -u src/sys/arch/arm/nvidia/tegra_sdhc.c:1.19 src/sys/arch/arm/nvidia/tegra_sdhc.c:1.20
--- src/sys/arch/arm/nvidia/tegra_sdhc.c:1.19	Sat Apr 22 21:50:49 2017
+++ src/sys/arch/arm/nvidia/tegra_sdhc.c	Thu May 25 23:53:50 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_sdhc.c,v 1.19 2017/04/22 21:50:49 jmcneill Exp $ */
+/* $NetBSD: tegra_sdhc.c,v 1.20 2017/05/25 23:53:50 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -31,7 +31,7 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_sdhc.c,v 1.19 2017/04/22 21:50:49 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_sdhc.c,v 1.20 2017/05/25 23:53:50 jmcneill Exp $");
 
 #include 
 #include 
@@ -81,7 +81,11 @@ CFATTACH_DECL_NEW(tegra_sdhc, sizeof(str
 static int
 tegra_sdhc_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-sdhci", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-sdhci",
+		"nvidia,tegra124-sdhci",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:53:05 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_rtc.c

Log Message:
Match nvidia,tegra210-rtc and nvidia,tegra20-rtc compat strings.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_rtc.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/nvidia/tegra_rtc.c
diff -u src/sys/arch/arm/nvidia/tegra_rtc.c:1.3 src/sys/arch/arm/nvidia/tegra_rtc.c:1.4
--- src/sys/arch/arm/nvidia/tegra_rtc.c:1.3	Sat Apr 22 13:24:45 2017
+++ src/sys/arch/arm/nvidia/tegra_rtc.c	Thu May 25 23:53:05 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_rtc.c,v 1.3 2017/04/22 13:24:45 jmcneill Exp $ */
+/* $NetBSD: tegra_rtc.c,v 1.4 2017/05/25 23:53:05 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_rtc.c,v 1.3 2017/04/22 13:24:45 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_rtc.c,v 1.4 2017/05/25 23:53:05 jmcneill Exp $");
 
 #include 
 #include 
@@ -70,7 +70,12 @@ CFATTACH_DECL_NEW(tegra_rtc, sizeof(stru
 static int
 tegra_rtc_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-rtc", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-rtc",
+		"nvidia,tegra124-rtc",
+		"nvidia,tegra20-rtc",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:52:10 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_pmc.c

Log Message:
Match nvidia,tegra210-pmc compat string.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/nvidia/tegra_pmc.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/nvidia/tegra_pmc.c
diff -u src/sys/arch/arm/nvidia/tegra_pmc.c:1.9 src/sys/arch/arm/nvidia/tegra_pmc.c:1.10
--- src/sys/arch/arm/nvidia/tegra_pmc.c:1.9	Thu May 25 23:15:39 2017
+++ src/sys/arch/arm/nvidia/tegra_pmc.c	Thu May 25 23:52:10 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmc.c,v 1.9 2017/05/25 23:15:39 jmcneill Exp $ */
+/* $NetBSD: tegra_pmc.c,v 1.10 2017/05/25 23:52:10 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_pmc.c,v 1.9 2017/05/25 23:15:39 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_pmc.c,v 1.10 2017/05/25 23:52:10 jmcneill Exp $");
 
 #include 
 #include 
@@ -59,7 +59,11 @@ CFATTACH_DECL_NEW(tegra_pmc, sizeof(stru
 static int
 tegra_pmc_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-pmc", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-pmc",
+		"nvidia,tegra124-pmc",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:50:22 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_gpio.c

Log Message:
Match nvidia,tegra210-gpio and nvidia,tegra30-gpio compat strings.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/nvidia/tegra_gpio.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/nvidia/tegra_gpio.c
diff -u src/sys/arch/arm/nvidia/tegra_gpio.c:1.7 src/sys/arch/arm/nvidia/tegra_gpio.c:1.8
--- src/sys/arch/arm/nvidia/tegra_gpio.c:1.7	Sun Mar 13 17:38:44 2016
+++ src/sys/arch/arm/nvidia/tegra_gpio.c	Thu May 25 23:50:22 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_gpio.c,v 1.7 2016/03/13 17:38:44 christos Exp $ */
+/* $NetBSD: tegra_gpio.c,v 1.8 2017/05/25 23:50:22 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_gpio.c,v 1.7 2016/03/13 17:38:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_gpio.c,v 1.8 2017/05/25 23:50:22 jmcneill Exp $");
 
 #include 
 #include 
@@ -148,7 +148,12 @@ CFATTACH_DECL_NEW(tegra_gpio, sizeof(str
 static int
 tegra_gpio_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-gpio", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-gpio",
+		"nvidia,tegra124-gpio",
+		"nvidia,tegra30-gpio",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:48:36 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_fuse.c

Log Message:
Match nvidia,tegra210-efuse compat string.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/tegra_fuse.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/nvidia/tegra_fuse.c
diff -u src/sys/arch/arm/nvidia/tegra_fuse.c:1.4 src/sys/arch/arm/nvidia/tegra_fuse.c:1.5
--- src/sys/arch/arm/nvidia/tegra_fuse.c:1.4	Tue Dec 22 22:10:36 2015
+++ src/sys/arch/arm/nvidia/tegra_fuse.c	Thu May 25 23:48:36 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_fuse.c,v 1.4 2015/12/22 22:10:36 jmcneill Exp $ */
+/* $NetBSD: tegra_fuse.c,v 1.5 2017/05/25 23:48:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_fuse.c,v 1.4 2015/12/22 22:10:36 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_fuse.c,v 1.5 2017/05/25 23:48:36 jmcneill Exp $");
 
 #include 
 #include 
@@ -61,7 +61,11 @@ CFATTACH_DECL_NEW(tegra_fuse, sizeof(str
 static int
 tegra_fuse_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-efuse", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-efuse",
+		"nvidia,tegra124-efuse",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:45:04 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_ehci.c

Log Message:
Match nvidia,tegra210-ehci and nvidia,tegra30-ehci compat strings.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/nvidia/tegra_ehci.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/nvidia/tegra_ehci.c
diff -u src/sys/arch/arm/nvidia/tegra_ehci.c:1.14 src/sys/arch/arm/nvidia/tegra_ehci.c:1.15
--- src/sys/arch/arm/nvidia/tegra_ehci.c:1.14	Mon May 23 18:21:14 2016
+++ src/sys/arch/arm/nvidia/tegra_ehci.c	Thu May 25 23:45:04 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_ehci.c,v 1.14 2016/05/23 18:21:14 jmcneill Exp $ */
+/* $NetBSD: tegra_ehci.c,v 1.15 2017/05/25 23:45:04 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_ehci.c,v 1.14 2016/05/23 18:21:14 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_ehci.c,v 1.15 2017/05/25 23:45:04 jmcneill Exp $");
 
 #include 
 #include 
@@ -73,7 +73,12 @@ CFATTACH_DECL2_NEW(tegra_ehci, sizeof(st
 static int
 tegra_ehci_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-ehci", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-ehci",
+		"nvidia,tegra124-ehci",
+		"nvidia,tegra30-ehci",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:43:49 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_i2c.c

Log Message:
Match nvidia,tegra210-i2c and nvidia,tegra114-i2c compat strings.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/nvidia/tegra_i2c.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/nvidia/tegra_i2c.c
diff -u src/sys/arch/arm/nvidia/tegra_i2c.c:1.15 src/sys/arch/arm/nvidia/tegra_i2c.c:1.16
--- src/sys/arch/arm/nvidia/tegra_i2c.c:1.15	Mon Aug  8 14:40:57 2016
+++ src/sys/arch/arm/nvidia/tegra_i2c.c	Thu May 25 23:43:49 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_i2c.c,v 1.15 2016/08/08 14:40:57 jakllsch Exp $ */
+/* $NetBSD: tegra_i2c.c,v 1.16 2017/05/25 23:43:49 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.15 2016/08/08 14:40:57 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.16 2017/05/25 23:43:49 jmcneill Exp $");
 
 #include 
 #include 
@@ -95,7 +95,12 @@ CFATTACH_DECL_NEW(tegra_i2c, sizeof(stru
 static int
 tegra_i2c_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-i2c", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-i2c",
+		"nvidia,tegra124-i2c",
+		"nvidia,tegra114-i2c",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:42:44 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_com.c

Log Message:
Match nvidia,tegra210-uart and nvidia,tegra20-uart compat strings.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/nvidia/tegra_com.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/nvidia/tegra_com.c
diff -u src/sys/arch/arm/nvidia/tegra_com.c:1.5 src/sys/arch/arm/nvidia/tegra_com.c:1.6
--- src/sys/arch/arm/nvidia/tegra_com.c:1.5	Tue Dec 22 22:10:36 2015
+++ src/sys/arch/arm/nvidia/tegra_com.c	Thu May 25 23:42:44 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_com.c,v 1.5 2015/12/22 22:10:36 jmcneill Exp $ */
+/* $NetBSD: tegra_com.c,v 1.6 2017/05/25 23:42:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: tegra_com.c,v 1.5 2015/12/22 22:10:36 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: tegra_com.c,v 1.6 2017/05/25 23:42:44 jmcneill Exp $");
 
 #include 
 #include 
@@ -65,7 +65,12 @@ CFATTACH_DECL_NEW(tegra_com, sizeof(stru
 static int
 tegra_com_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "nvidia,tegra124-uart", NULL };
+	const char * const compatible[] = {
+		"nvidia,tegra210-uart",
+		"nvidia,tegra124-uart",
+		"nvidia,tegra20-uart",
+		NULL
+	};
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:26:48 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: files.tegra tegra_soc.c tegra_var.h
Added Files:
src/sys/arch/arm/nvidia: soc_tegra210.c

Log Message:
Chip detection and MP spinup code for Tegra210


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/nvidia/files.tegra
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/soc_tegra210.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/nvidia/tegra_soc.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/nvidia/tegra_var.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/nvidia/files.tegra
diff -u src/sys/arch/arm/nvidia/files.tegra:1.35 src/sys/arch/arm/nvidia/files.tegra:1.36
--- src/sys/arch/arm/nvidia/files.tegra:1.35	Sat Apr 29 11:01:51 2017
+++ src/sys/arch/arm/nvidia/files.tegra	Thu May 25 23:26:48 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: files.tegra,v 1.35 2017/04/29 11:01:51 jmcneill Exp $
+#	$NetBSD: files.tegra,v 1.36 2017/05/25 23:26:48 jmcneill Exp $
 #
 # Configuration info for NVIDIA Tegra ARM Peripherals
 #
@@ -27,6 +27,9 @@ device	tegra124cpu
 attach	tegra124cpu at fdt with tegra124_cpu
 file	arch/arm/nvidia/tegra124_cpu.c		tegra124_cpu
 
+# Tegra T210 (X1) support
+file	arch/arm/nvidia/soc_tegra210.c		soc_tegra210
+
 # Interrupt controller
 device	tegralic
 attach	tegralic at fdt with tegra_lic
@@ -161,4 +164,6 @@ defparam opt_tegra.h			MEMSIZE
 
 # SOC parameters
 defflag	opt_tegra.h			SOC_TEGRAK1
+defflag	opt_tegra.h			SOC_TEGRAX1
 defflag	opt_tegra.h			SOC_TEGRA124: SOC_TEGRAK1
+defflag	opt_tegra.h			SOC_TEGRA210: SOC_TEGRAX1

Index: src/sys/arch/arm/nvidia/tegra_soc.c
diff -u src/sys/arch/arm/nvidia/tegra_soc.c:1.10 src/sys/arch/arm/nvidia/tegra_soc.c:1.11
--- src/sys/arch/arm/nvidia/tegra_soc.c:1.10	Sat Apr 22 23:53:24 2017
+++ src/sys/arch/arm/nvidia/tegra_soc.c	Thu May 25 23:26:48 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_soc.c,v 1.10 2017/04/22 23:53:24 jmcneill Exp $ */
+/* $NetBSD: tegra_soc.c,v 1.11 2017/05/25 23:26:48 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -30,7 +30,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_soc.c,v 1.10 2017/04/22 23:53:24 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_soc.c,v 1.11 2017/05/25 23:26:48 jmcneill Exp $");
 
 #define	_ARM32_BUS_DMA_PRIVATE
 #include 
@@ -99,6 +99,11 @@ tegra_mpinit(void)
 		tegra124_mpinit();
 		break;
 #endif
+#ifdef SOC_TEGRA210
+	case CHIP_ID_TEGRA210:
+		tegra210_mpinit();
+		break;
+#endif
 	default:
 		panic("Unsupported SOC ID %#x", tegra_chip_id());
 	}
@@ -127,6 +132,7 @@ tegra_chip_name(void)
 	switch (tegra_chip_id()) {
 	case CHIP_ID_TEGRA124:	return "Tegra K1 (T124)";
 	case CHIP_ID_TEGRA132:	return "Tegra K1 (T132)";
+	case CHIP_ID_TEGRA210:	return "Tegra X1 (T210)";
 	default:		return "Unknown Tegra SoC";
 	}
 }

Index: src/sys/arch/arm/nvidia/tegra_var.h
diff -u src/sys/arch/arm/nvidia/tegra_var.h:1.34 src/sys/arch/arm/nvidia/tegra_var.h:1.35
--- src/sys/arch/arm/nvidia/tegra_var.h:1.34	Thu May 25 23:12:59 2017
+++ src/sys/arch/arm/nvidia/tegra_var.h	Thu May 25 23:26:48 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_var.h,v 1.34 2017/05/25 23:12:59 jmcneill Exp $ */
+/* $NetBSD: tegra_var.h,v 1.35 2017/05/25 23:26:48 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -107,6 +107,9 @@ void	tegra_cpufreq_register(const struct
 #if defined(SOC_TEGRA124)
 void	tegra124_mpinit(void);
 #endif
+#if defined(SOC_TEGRA210)
+void	tegra210_mpinit(void);
+#endif
 
 static void inline
 tegra_reg_set_clear(bus_space_tag_t bst, bus_space_handle_t bsh,

Added files:

Index: src/sys/arch/arm/nvidia/soc_tegra210.c
diff -u /dev/null src/sys/arch/arm/nvidia/soc_tegra210.c:1.1
--- /dev/null	Thu May 25 23:26:48 2017
+++ src/sys/arch/arm/nvidia/soc_tegra210.c	Thu May 25 23:26:48 2017
@@ -0,0 +1,81 @@
+/* $NetBSD: soc_tegra210.c,v 1.1 2017/05/25 23:26:48 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2017 Jared D. McNeill 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce 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 AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:15:39 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_pmc.c

Log Message:
Correct an issue introduced in r1.7 that prevented unclamping power for
non-GPU partitions. While here, apply the GPU power workaround to Tegra210
as well.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/nvidia/tegra_pmc.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/nvidia/tegra_pmc.c
diff -u src/sys/arch/arm/nvidia/tegra_pmc.c:1.8 src/sys/arch/arm/nvidia/tegra_pmc.c:1.9
--- src/sys/arch/arm/nvidia/tegra_pmc.c:1.8	Sun Dec 13 17:39:19 2015
+++ src/sys/arch/arm/nvidia/tegra_pmc.c	Thu May 25 23:15:39 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmc.c,v 1.8 2015/12/13 17:39:19 jmcneill Exp $ */
+/* $NetBSD: tegra_pmc.c,v 1.9 2017/05/25 23:15:39 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_pmc.c,v 1.8 2015/12/13 17:39:19 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_pmc.c,v 1.9 2017/05/25 23:15:39 jmcneill Exp $");
 
 #include 
 #include 
@@ -165,13 +165,17 @@ tegra_pmc_remove_clamping(u_int partid)
 
 	tegra_pmc_get_bs(&bst, &bsh);
 
-	if (tegra_chip_id() == CHIP_ID_TEGRA124) {
+	if (partid == PMC_PARTID_TD) {
 		/*
-		 * On Tegra124 the GPU power clamping is controlled by a
-		 * separate register
+		 * On Tegra124 and later, the GPU power clamping is
+		 * controlled by a separate register
 		 */
-		bus_space_write_4(bst, bsh, PMC_GPU_RG_CNTRL_REG, 0);
-		return;
+		switch (tegra_chip_id()) {
+		case CHIP_ID_TEGRA124:
+		case CHIP_ID_TEGRA210:
+			bus_space_write_4(bst, bsh, PMC_GPU_RG_CNTRL_REG, 0);
+			return;
+		}
 	}
 
 	bus_space_write_4(bst, bsh, PMC_REMOVE_CLAMPING_CMD_0_REG,



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

2017-05-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 25 23:12:59 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra_var.h

Log Message:
Add Tegra210 chip ID.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/nvidia/tegra_var.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/nvidia/tegra_var.h
diff -u src/sys/arch/arm/nvidia/tegra_var.h:1.33 src/sys/arch/arm/nvidia/tegra_var.h:1.34
--- src/sys/arch/arm/nvidia/tegra_var.h:1.33	Sat Apr 22 23:53:24 2017
+++ src/sys/arch/arm/nvidia/tegra_var.h	Thu May 25 23:12:59 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_var.h,v 1.33 2017/04/22 23:53:24 jmcneill Exp $ */
+/* $NetBSD: tegra_var.h,v 1.34 2017/05/25 23:12:59 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -46,6 +46,7 @@ extern struct arm32_bus_dma_tag tegra_dm
 #define CHIP_ID_TEGRA114	0x35
 #define CHIP_ID_TEGRA124	0x40
 #define CHIP_ID_TEGRA132	0x13
+#define CHIP_ID_TEGRA210	0x21
 
 u_int	tegra_chip_id(void);
 const char *tegra_chip_name(void);



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

2017-05-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 25 20:42:41 UTC 2017

Modified Files:
src/sys/arch/arm/include/arm32: pmap.h

Log Message:
Use the define name PMAP_HWPAGEWALKER and not PMAP_TLB_HWPAGEWALKER


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/arch/arm/include/arm32/pmap.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/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.146 src/sys/arch/arm/include/arm32/pmap.h:1.147
--- src/sys/arch/arm/include/arm32/pmap.h:1.146	Thu May 25 20:32:48 2017
+++ src/sys/arch/arm/include/arm32/pmap.h	Thu May 25 20:42:41 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.146 2017/05/25 20:32:48 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.147 2017/05/25 20:42:41 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -84,8 +84,8 @@
 #endif
 
 #ifdef ARM_MMU_EXTENDED
+#define PMAP_HWPAGEWALKER		1
 #define PMAP_TLB_MAX			1
-#define PMAP_TLB_HWPAGEWALKER		1
 #if PMAP_TLB_MAX > 1
 #define PMAP_TLB_NEED_SHOOTDOWN		1
 #endif



CVS commit: src/sys/kern

2017-05-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 25 20:42:37 UTC 2017

Modified Files:
src/sys/kern: uipc_socket.c

Log Message:
switch to a switch


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/sys/kern/uipc_socket.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/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.253 src/sys/kern/uipc_socket.c:1.254
--- src/sys/kern/uipc_socket.c:1.253	Mon May  1 06:00:43 2017
+++ src/sys/kern/uipc_socket.c	Thu May 25 16:42:36 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.253 2017/05/01 10:00:43 ryo Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.254 2017/05/25 20:42:36 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.253 2017/05/01 10:00:43 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.254 2017/05/25 20:42:36 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -435,17 +435,19 @@ socket_listener_cb(kauth_cred_t cred, ka
 
 	case KAUTH_REQ_NETWORK_SOCKET_OPEN:
 		/* We allow "raw" routing/bluetooth sockets to anyone. */
-		if ((u_long)arg1 == PF_ROUTE || (u_long)arg1 == PF_OROUTE
-		|| (u_long)arg1 == PF_BLUETOOTH) {
+		switch ((u_long)arg1) {
+		case PF_ROUTE:
+		case PF_OROUTE:
+		case PF_BLUETOOTH:
 			result = KAUTH_RESULT_ALLOW;
-		} else {
+			break;
+		default:
 			/* Privileged, let secmodel handle this. */
 			if ((u_long)arg2 == SOCK_RAW)
 break;
+			result = KAUTH_RESULT_ALLOW;
+			break;
 		}
-
-		result = KAUTH_RESULT_ALLOW;
-
 		break;
 
 	case KAUTH_REQ_NETWORK_SOCKET_CANSEE:



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

2017-05-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 25 20:32:48 UTC 2017

Modified Files:
src/sys/arch/arm/include/arm32: pmap.h

Log Message:
Spell ARM_MMU_EXTENDED correctly


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/sys/arch/arm/include/arm32/pmap.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/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.145 src/sys/arch/arm/include/arm32/pmap.h:1.146
--- src/sys/arch/arm/include/arm32/pmap.h:1.145	Thu Feb 23 08:22:20 2017
+++ src/sys/arch/arm/include/arm32/pmap.h	Thu May 25 20:32:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.145 2017/02/23 08:22:20 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.146 2017/05/25 20:32:48 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -167,7 +167,7 @@
 
 #ifndef _LOCORE
 
-#ifndef PMAP_MMU_EXTENDED
+#ifndef ARM_MMU_EXTENDED
 struct l1_ttable;
 struct l2_dtable;
 



CVS commit: [bouyer-socketcan] src/sys/kern

2017-05-25 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 25 18:52:24 UTC 2017

Modified Files:
src/sys/kern [bouyer-socketcan]: uipc_socket.c

Log Message:
Allow any user to bind to CAN sockets.
Maybe a better security model is needed.


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.252.2.1 src/sys/kern/uipc_socket.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/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.252 src/sys/kern/uipc_socket.c:1.252.2.1
--- src/sys/kern/uipc_socket.c:1.252	Thu Oct 13 19:10:23 2016
+++ src/sys/kern/uipc_socket.c	Thu May 25 18:52:24 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.252 2016/10/13 19:10:23 uwe Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.252.2.1 2017/05/25 18:52:24 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.252 2016/10/13 19:10:23 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.252.2.1 2017/05/25 18:52:24 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -433,9 +433,9 @@ socket_listener_cb(kauth_cred_t cred, ka
 		}
 
 	case KAUTH_REQ_NETWORK_SOCKET_OPEN:
-		/* We allow "raw" routing/bluetooth sockets to anyone. */
+		/* We allow "raw" routing/bluetooth/CAN sockets to anyone. */
 		if ((u_long)arg1 == PF_ROUTE || (u_long)arg1 == PF_OROUTE
-		|| (u_long)arg1 == PF_BLUETOOTH) {
+		|| (u_long)arg1 == PF_BLUETOOTH || (u_long)arg1 == PF_CAN) {
 			result = KAUTH_RESULT_ALLOW;
 		} else {
 			/* Privileged, let secmodel handle this. */



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

2017-05-25 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Thu May 25 18:28:54 UTC 2017

Modified Files:
src/tests/lib/libc/locale: t_mbtowc.c t_wctomb.c

Log Message:
Add a member to the test data structure that indicates whether the given
encoding is state-dependent, and test the results of wctomb(NULL, '\0') and
mbtowc(NULL, NULL, 0) against this instead of against each other.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/locale/t_mbtowc.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/locale/t_wctomb.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/locale/t_mbtowc.c
diff -u src/tests/lib/libc/locale/t_mbtowc.c:1.1 src/tests/lib/libc/locale/t_mbtowc.c:1.2
--- src/tests/lib/libc/locale/t_mbtowc.c:1.1	Sat Apr  9 17:45:25 2011
+++ src/tests/lib/libc/locale/t_mbtowc.c	Thu May 25 18:28:54 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mbtowc.c,v 1.1 2011/04/09 17:45:25 pgoyette Exp $ */
+/* $NetBSD: t_mbtowc.c,v 1.2 2017/05/25 18:28:54 perseant Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2011\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_mbtowc.c,v 1.1 2011/04/09 17:45:25 pgoyette Exp $");
+__RCSID("$NetBSD: t_mbtowc.c,v 1.2 2017/05/25 18:28:54 perseant Exp $");
 
 #include 
 #include 
@@ -69,21 +69,20 @@ __RCSID("$NetBSD: t_mbtowc.c,v 1.1 2011/
 #include 
 
 static void
-h_mbtowc(const char *locale, const char *illegal, const char *legal)
+h_mbtowc(const char *locale, const char *illegal, const char *legal, size_t stateful)
 {
 	char buf[64];
-	size_t stateful, ret;
+	size_t ret;
 	char *str;
 
 	ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
+	(void)printf("Trying locale: %s\n", locale);
 	ATF_REQUIRE(setlocale(LC_CTYPE, locale) != NULL);
 
 	ATF_REQUIRE((str = setlocale(LC_ALL, NULL)) != NULL);
 	(void)printf("Using locale: %s\n", str);
-
-	stateful = wctomb(NULL, L'\0');
 	(void)printf("Locale is state-%sdependent\n",
-		stateful ? "in" : "");
+		!stateful ? "in" : "");
 
 	/* initialize internal state */
 	ret = mbtowc(NULL, NULL, 0);
@@ -101,8 +100,7 @@ h_mbtowc(const char *locale, const char 
 	/* if this is stateless encoding, this re-initialization is not required. */
 	if (stateful) {
 		/* re-initialize internal state */
-		ret = mbtowc(NULL, NULL, 0);
-		ATF_REQUIRE(stateful ? ret : !ret);
+		mbtowc(NULL, NULL, 0);
 	}
 
 	/* valid multibyte sequence case */
@@ -126,13 +124,13 @@ ATF_TC_HEAD(mbtowc, tc)
 }
 ATF_TC_BODY(mbtowc, tc)
 {
-	h_mbtowc("en_US.UTF-8", "\240", "\302\240");
-	h_mbtowc("ja_JP.ISO2022-JP", "\033$B", "\033$B$\"\033(B");
-	h_mbtowc("ja_JP.SJIS", "\202", "\202\240");
-	h_mbtowc("ja_JP.eucJP", "\244", "\244\242");
-	h_mbtowc("zh_CN.GB18030", "\241", "\241\241");
-	h_mbtowc("zh_TW.Big5", "\241", "\241@");
-	h_mbtowc("zh_TW.eucTW", "\241", "\241\241");
+	h_mbtowc("en_US.UTF-8", "\240", "\302\240", 0);
+	h_mbtowc("ja_JP.ISO2022-JP", "\033$B", "\033$B$\"\033(B", 1);
+	h_mbtowc("ja_JP.SJIS", "\202", "\202\240", 0);
+	h_mbtowc("ja_JP.eucJP", "\244", "\244\242", 0);
+	h_mbtowc("zh_CN.GB18030", "\241", "\241\241", 0);
+	h_mbtowc("zh_TW.Big5", "\241", "\241@", 0);
+	h_mbtowc("zh_TW.eucTW", "\241", "\241\241", 0);
 }
 
 ATF_TP_ADD_TCS(tp)

Index: src/tests/lib/libc/locale/t_wctomb.c
diff -u src/tests/lib/libc/locale/t_wctomb.c:1.3 src/tests/lib/libc/locale/t_wctomb.c:1.4
--- src/tests/lib/libc/locale/t_wctomb.c:1.3	Mon Mar 25 15:31:03 2013
+++ src/tests/lib/libc/locale/t_wctomb.c	Thu May 25 18:28:54 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: t_wctomb.c,v 1.3 2013/03/25 15:31:03 gson Exp $ */
+/* $NetBSD: t_wctomb.c,v 1.4 2017/05/25 18:28:54 perseant Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2011\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_wctomb.c,v 1.3 2013/03/25 15:31:03 gson Exp $");
+__RCSID("$NetBSD: t_wctomb.c,v 1.4 2017/05/25 18:28:54 perseant Exp $");
 
 #include 
 #include 
@@ -76,6 +76,7 @@ static struct test {
 	const char *data;
 	size_t wclen;
 	size_t mblen[16];
+	size_t stateful;
 } tests[] = {
 {
 	"ja_JP.ISO2022-JP",
@@ -87,13 +88,15 @@ static struct test {
 	"\xb1\xb2\xb3"	/* "aiu" */
 	"\x1b(B",	/* ISO 646 */
 	3 + 3 + 3,
-	{ 3+2, 2, 2, 3+1, 1, 1, 3+1, 1, 1, 3+1 }
+	{ 3+2, 2, 2, 3+1, 1, 1, 3+1, 1, 1, 3+1 },
+	1,
 }, {
 	"C", 
 	"ABC",
 	3,
-	{ 1, 1, 1, 1 }
-}, { NULL, NULL, 0, { } }
+	{ 1, 1, 1, 1 },
+	0,
+}, { NULL, NULL, 0, { }, 0 }
 };
 
 static void
@@ -109,19 +112,24 @@ h_wctomb(const struct test *t, char tc)
 	size_t sz, ret, i;
 
 	ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
+	(void)printf("Trying locale: %s\n", t->locale);
 	ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL);
 
+	if (tc == TC_WCRTOMB_ST) {
+		(void)memset(&st, 0, sizeof(st));
+		stp = &st;
+	} else {
+		(void)printf("Checking correc

CVS commit: [bouyer-socketcan] src/sys/arch/arm/allwinner

2017-05-25 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 25 18:26:36 UTC 2017

Modified Files:
src/sys/arch/arm/allwinner [bouyer-socketcan]: awin_can.c

Log Message:
abort may clear sc_m_transmit but leave OACTIVE, so unconditionally clear
OACTIVE in TX interrupt.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/arm/allwinner/awin_can.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/allwinner/awin_can.c
diff -u src/sys/arch/arm/allwinner/awin_can.c:1.1.2.7 src/sys/arch/arm/allwinner/awin_can.c:1.1.2.8
--- src/sys/arch/arm/allwinner/awin_can.c:1.1.2.7	Thu May 25 18:23:15 2017
+++ src/sys/arch/arm/allwinner/awin_can.c	Thu May 25 18:26:36 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: awin_can.c,v 1.1.2.7 2017/05/25 18:23:15 bouyer Exp $	*/
+/*	$NetBSD: awin_can.c,v 1.1.2.8 2017/05/25 18:26:36 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: awin_can.c,v 1.1.2.7 2017/05/25 18:23:15 bouyer Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_can.c,v 1.1.2.8 2017/05/25 18:26:36 bouyer Exp $");
 
 #include 
 #include 
@@ -297,9 +297,8 @@ awin_can_tx_intr(struct awin_can_softc *
 		can_input(ifp, m); /* loopback */
 		sc->sc_m_transmit = NULL;
 		ifp->if_timer = 0;
-		ifp->if_flags &= ~IFF_OACTIVE;
 	}
-
+	ifp->if_flags &= ~IFF_OACTIVE;
 	if_schedule_deferred_start(ifp);
 }
 



CVS commit: [bouyer-socketcan] src/sys/arch/arm/allwinner

2017-05-25 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 25 18:23:16 UTC 2017

Modified Files:
src/sys/arch/arm/allwinner [bouyer-socketcan]: awin_can.c

Log Message:
Do not call bpf_mtap() from interrupt context. Mostly from Ryota Ozaki:
on receive, use bpf_mtap_softint().
On send, call awin_can_ifstart() through if_schedule_deferred_start().


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/arm/allwinner/awin_can.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/allwinner/awin_can.c
diff -u src/sys/arch/arm/allwinner/awin_can.c:1.1.2.6 src/sys/arch/arm/allwinner/awin_can.c:1.1.2.7
--- src/sys/arch/arm/allwinner/awin_can.c:1.1.2.6	Mon May 22 16:11:23 2017
+++ src/sys/arch/arm/allwinner/awin_can.c	Thu May 25 18:23:15 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: awin_can.c,v 1.1.2.6 2017/05/22 16:11:23 bouyer Exp $	*/
+/*	$NetBSD: awin_can.c,v 1.1.2.7 2017/05/25 18:23:15 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: awin_can.c,v 1.1.2.6 2017/05/22 16:11:23 bouyer Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_can.c,v 1.1.2.7 2017/05/25 18:23:15 bouyer Exp $");
 
 #include 
 #include 
@@ -50,6 +50,7 @@ __KERNEL_RCSID(1, "$NetBSD: awin_can.c,v
 
 #include 
 #include 
+#include 
 
 #ifdef CAN
 #include 
@@ -209,6 +210,8 @@ awin_can_attach(device_t parent, device_
 	 * Attach the interface.
 	 */
 	can_ifattach(ifp);
+	if_deferred_start_init(ifp, NULL);
+	bpf_mtap_softint_init(ifp);
 	rnd_attach_source(&sc->sc_rnd_source, device_xname(self),
 	RND_TYPE_NET, RND_FLAG_DEFAULT);
 #ifdef MBUFTRACE
@@ -275,7 +278,7 @@ awin_can_rx_intr(struct awin_can_softc *
 	ifp->if_ipackets++;
 	ifp->if_ibytes += m->m_len;
 	m_set_rcvif(m, ifp);
-	can_bpf_mtap(ifp, m);
+	can_bpf_mtap(ifp, m, 1);
 	can_input(ifp, m);
 }
 
@@ -284,10 +287,6 @@ awin_can_tx_intr(struct awin_can_softc *
 {
 	struct ifnet * const ifp = sc->sc_ifp;
 	struct mbuf *m;
-	struct can_frame *cf;
-	int regd;
-	uint32_t reg0val;
-	int i;
 
 	KASSERT(mutex_owned(&sc->sc_intr_lock));
 	if ((m = sc->sc_m_transmit) != NULL) {
@@ -298,58 +297,10 @@ awin_can_tx_intr(struct awin_can_softc *
 		can_input(ifp, m); /* loopback */
 		sc->sc_m_transmit = NULL;
 		ifp->if_timer = 0;
-	}
-
-	IF_DEQUEUE(&ifp->if_snd, m);
-
-	if (m == NULL) {
 		ifp->if_flags &= ~IFF_OACTIVE;
-		return;
-	}
-	MCLAIM(m, ifp->if_mowner);
-	sc->sc_m_transmit = m;
-
-	KASSERT((m->m_flags & M_PKTHDR) != 0);
-	KASSERT(m->m_len == m->m_pkthdr.len);
-
-	cf = mtod(m, struct can_frame *);
-	reg0val = cf->can_dlc & AWIN_CAN_TXBUF0_DL;
-	if (cf->can_id & CAN_RTR_FLAG)
-		reg0val |= AWIN_CAN_TXBUF0_RTR;
-
-	if (cf->can_id & CAN_EFF_FLAG) {
-		reg0val |= AWIN_CAN_TXBUF0_EFF;
-		awin_can_write(sc, AWIN_CAN_TXBUF1_REG,
-		(cf->can_id >> 21) & 0xff);
-		awin_can_write(sc, AWIN_CAN_TXBUF2_REG,
-		(cf->can_id >> 13) & 0xff);
-		awin_can_write(sc, AWIN_CAN_TXBUF3_REG,
-		(cf->can_id >> 5) & 0xff);
-		awin_can_write(sc, AWIN_CAN_TXBUF4_REG,
-		(cf->can_id << 3) & 0xf8);
-		regd = AWIN_CAN_TXBUF5_REG;
-	} else {
-		awin_can_write(sc, AWIN_CAN_TXBUF1_REG,
-		(cf->can_id >> 3) & 0xff);
-		awin_can_write(sc, AWIN_CAN_TXBUF2_REG,
-		(cf->can_id << 5) & 0xe0);
-		regd = AWIN_CAN_TXBUF3_REG;
 	}
 
-	for (i = 0; i < cf->can_dlc; i++) {
-		awin_can_write(sc, regd + i * 4, cf->data[i]);
-	}
-	awin_can_write(sc, AWIN_CAN_TXBUF0_REG, reg0val);
-
-	if (sc->sc_linkmodes & CAN_LINKMODE_LOOPBACK) {
-		awin_can_write(sc, AWIN_CAN_CMD_REG,
-			AWIN_CAN_CMD_TANS_REQ | AWIN_CAN_CMD_SELF_REQ);
-	} else {
-		awin_can_write(sc, AWIN_CAN_CMD_REG, AWIN_CAN_CMD_TANS_REQ);
-	}
-	ifp->if_flags |= IFF_OACTIVE;
-	ifp->if_timer = 5;
-	can_bpf_mtap(ifp, m);
+	if_schedule_deferred_start(ifp);
 }
 
 static int
@@ -446,10 +397,66 @@ void
 awin_can_ifstart(struct ifnet *ifp)
 {
 	struct awin_can_softc * const sc = ifp->if_softc;
+	struct mbuf *m;
+	struct can_frame *cf;
+	int regd;
+	uint32_t reg0val;
+	int i;
 
 	mutex_enter(&sc->sc_intr_lock);
-	KASSERT((ifp->if_flags & IFF_OACTIVE) == 0);
-	awin_can_tx_intr(sc);
+	if (ifp->if_flags & IFF_OACTIVE)
+		goto out;
+
+	IF_DEQUEUE(&ifp->if_snd, m);
+
+	if (m == NULL)
+		goto out;
+
+	MCLAIM(m, ifp->if_mowner);
+	sc->sc_m_transmit = m;
+
+	KASSERT((m->m_flags & M_PKTHDR) != 0);
+	KASSERT(m->m_len == m->m_pkthdr.len);
+
+	cf = mtod(m, struct can_frame *);
+	reg0val = cf->can_dlc & AWIN_CAN_TXBUF0_DL;
+	if (cf->can_id & CAN_RTR_FLAG)
+		reg0val |= AWIN_CAN_TXBUF0_RTR;
+
+	if (cf->can_id & CAN_EFF_FLAG) {
+		reg0val |= AWIN_CAN_TXBUF0_EFF;
+		awin_can_write(sc, AWIN_CAN_TXBUF1_REG,
+		(cf->can_id >> 21) & 0xff);
+		awin_can_write(sc, AWIN_CAN_TXBUF2_REG,
+		(cf->can_id >> 13) & 0xff);
+		awin_can_write(sc, AWIN_CAN_TXBUF3_REG,
+		(cf->can_id >> 5) & 0xff);
+		awin_can_write(sc, AWIN_CAN_TXBUF4_REG,
+		(cf->can_id << 3) & 0xf8);
+		regd 

CVS commit: [bouyer-socketcan] src/sys/netcan

2017-05-25 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 25 18:21:01 UTC 2017

Modified Files:
src/sys/netcan [bouyer-socketcan]: can.c can_var.h if_canloop.c

Log Message:
Allow can_bpf_mtap() to call bpf_mtap_softint() when needed.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/sys/netcan/can.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/netcan/can_var.h
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/netcan/if_canloop.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/netcan/can.c
diff -u src/sys/netcan/can.c:1.1.2.14 src/sys/netcan/can.c:1.1.2.15
--- src/sys/netcan/can.c:1.1.2.14	Mon May 22 16:11:23 2017
+++ src/sys/netcan/can.c	Thu May 25 18:21:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: can.c,v 1.1.2.14 2017/05/22 16:11:23 bouyer Exp $	*/
+/*	$NetBSD: can.c,v 1.1.2.15 2017/05/25 18:21:00 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.1.2.14 2017/05/22 16:11:23 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.1.2.15 2017/05/25 18:21:00 bouyer Exp $");
 
 #include 
 #include 
@@ -416,7 +416,7 @@ canintr(void)
 }
 
 void
-can_bpf_mtap(struct ifnet *ifp, struct mbuf *m)
+can_bpf_mtap(struct ifnet *ifp, struct mbuf *m, bool do_softint)
 {
 	/* bpf wants the CAN id in network byte order */
 	struct can_frame *cf;
@@ -425,7 +425,10 @@ can_bpf_mtap(struct ifnet *ifp, struct m
 	cf = mtod(m, struct can_frame *);
 	oid = cf->can_id;
 	cf->can_id = htonl(oid);
-	bpf_mtap(ifp, m);
+	if (do_softint)
+		bpf_mtap_softint(ifp, m);
+	else
+		bpf_mtap(ifp, m);
 	cf->can_id = oid;
 }
 

Index: src/sys/netcan/can_var.h
diff -u src/sys/netcan/can_var.h:1.1.2.8 src/sys/netcan/can_var.h:1.1.2.9
--- src/sys/netcan/can_var.h:1.1.2.8	Mon May 22 16:11:23 2017
+++ src/sys/netcan/can_var.h	Thu May 25 18:21:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: can_var.h,v 1.1.2.8 2017/05/22 16:11:23 bouyer Exp $	*/
+/*	$NetBSD: can_var.h,v 1.1.2.9 2017/05/25 18:21:00 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2017 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@ void *can_ctlinput(int, struct sockaddr 
 int can_ctloutput(int, struct socket *, struct sockopt *);
 void can_init(void);
 void canintr(void);
-void can_bpf_mtap(struct ifnet *, struct mbuf *);
+void can_bpf_mtap(struct ifnet *, struct mbuf *, bool);
 
 #endif
 

Index: src/sys/netcan/if_canloop.c
diff -u src/sys/netcan/if_canloop.c:1.1.2.7 src/sys/netcan/if_canloop.c:1.1.2.8
--- src/sys/netcan/if_canloop.c:1.1.2.7	Mon May 22 16:11:23 2017
+++ src/sys/netcan/if_canloop.c	Thu May 25 18:21:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_canloop.c,v 1.1.2.7 2017/05/22 16:11:23 bouyer Exp $	*/
+/*	$NetBSD: if_canloop.c,v 1.1.2.8 2017/05/25 18:21:00 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_canloop.c,v 1.1.2.7 2017/05/22 16:11:23 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_canloop.c,v 1.1.2.8 2017/05/25 18:21:00 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_can.h"
@@ -162,7 +162,7 @@ canloop_ifstart(struct ifnet *ifp)
 			panic("canloop_output: no header mbuf");
 		m_set_rcvif(m, ifp);
 		if (ifp->if_flags & IFF_LOOPBACK)
-			can_bpf_mtap(ifp, m);
+			can_bpf_mtap(ifp, m, 0);
 
 		pktlen = m->m_pkthdr.len;
 		ifp->if_opackets++;



CVS commit: src/sys/dev/usb

2017-05-25 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu May 25 10:02:15 UTC 2017

Modified Files:
src/sys/dev/usb: usbdevices.config

Log Message:
u3ginit rename to umodeswitch


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/usbdevices.config

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/usbdevices.config
diff -u src/sys/dev/usb/usbdevices.config:1.29 src/sys/dev/usb/usbdevices.config:1.30
--- src/sys/dev/usb/usbdevices.config:1.29	Tue Apr 18 19:09:12 2017
+++ src/sys/dev/usb/usbdevices.config	Thu May 25 10:02:15 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: usbdevices.config,v 1.29 2017/04/18 19:09:12 riastradh Exp $
+#	$NetBSD: usbdevices.config,v 1.30 2017/05/25 10:02:15 ryo Exp $
 #
 # This file contains all USB related configuration.
 # It is suitable for inclusion in a kernel config(5) file.
@@ -224,7 +224,7 @@ radio*	at slurm?
 ugen*	at uhub? port ?
 
 # USB 3G datacards
-u3ginit* at uhub? port?
+umodeswitch* at uhub? port ?
 u3g*	at uhub? port ?
 ucom*	at u3g?