CVS commit: src/sys/dev/usb

2018-07-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul 25 05:29:33 UTC 2018

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
 Add Huawei E182.


To generate a diff of this commit:
cvs rdiff -u -r1.755 -r1.756 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.755 src/sys/dev/usb/usbdevs:1.756
--- src/sys/dev/usb/usbdevs:1.755	Tue Jul 24 09:16:23 2018
+++ src/sys/dev/usb/usbdevs	Wed Jul 25 05:29:33 2018
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.755 2018/07/24 09:16:23 msaitoh Exp $
+$NetBSD: usbdevs,v 1.756 2018/07/25 05:29:33 msaitoh Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1820,6 +1820,7 @@ product HUAWEI E220		0x1003	Huawei E220
 product HUAWEI U8150		0x1037	Huawei U8150
 product HUAWEI EM770W		0x1404	Huawei EM770W
 product HUAWEI E1750		0x140c	Huawei E1750
+product HUAWEI E182		0x1429	Huawei E182
 product HUAWEI E353 0x1442  Huawei E353
 product HUAWEI E1750INIT	0x1446	Huawei E1750 USB CD
 product HUAWEI K3765		0x1465	Huawei K3765



CVS commit: src/usr.bin/base64

2018-07-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 25 03:45:34 UTC 2018

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

Log Message:
Provide MacOS/X compatible flags (where possible)
Propagate errno


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/base64/base64.c

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

Modified files:

Index: src/usr.bin/base64/base64.c
diff -u src/usr.bin/base64/base64.c:1.1 src/usr.bin/base64/base64.c:1.2
--- src/usr.bin/base64/base64.c:1.1	Tue Jul 24 11:26:16 2018
+++ src/usr.bin/base64/base64.c	Tue Jul 24 23:45:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: base64.c,v 1.1 2018/07/24 15:26:16 christos Exp $	*/
+/*	$NetBSD: base64.c,v 1.2 2018/07/25 03:45:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: base64.c,v 1.1 2018/07/24 15:26:16 christos Exp $");
+__RCSID("$NetBSD: base64.c,v 1.2 2018/07/25 03:45:34 christos Exp $");
 
 #include 
 #include 
@@ -66,23 +66,22 @@ putoutput(FILE *fout, uint8_t out[4], si
 
 	for (i = 0; i < len + 1; i++) {
 		if (out[i] >= 64) {
-			errno = EINVAL;
-			return -1;
+			return EINVAL;
 		}
 		if (fputc(B64[out[i]], fout) == -1)
-			return -1;
+			return errno;
 		if (++(*pos) == wrap) {
 			if (fputc('\n', fout) == -1)
-return -1;
+return errno;
 			*pos = 0;
 		}
 	}
 	for (; i < 4; i++) {
 		if (fputc('=', fout) == -1)
-			return -1;
+			return errno;
 		if (++(*pos) == wrap) {
 			if (fputc('\n', fout) == -1)
-return -1;
+return errno;
 			*pos = 0;
 		}
 	}
@@ -106,22 +105,23 @@ b64_encode(FILE *fout, FILE *fin, size_t
 	uint8_t out[4];
 	size_t ilen;
 	size_t pos = 0;
+	int e;
 
 	while ((ilen = getinput(fin, in)) > 2) {
 		encode(out, in);
-		if (putoutput(fout, out, ilen, wrap, ) == -1)
-			return -1;
+		if ((e = putoutput(fout, out, ilen, wrap, )) != 0)
+			return e;
 	}
 
 	if (ilen != 0) {
 		encode(out, in);
-		if (putoutput(fout, out, ilen, wrap, ) == -1)
-			return -1;
+		if ((e = putoutput(fout, out, ilen, wrap, )) != 0)
+			return e;
 	}
 
 	if (pos && wrap) {
 		if (fputc('\n', fout) == -1)
-			return -1;
+			return errno;
 	}
 	return 0;
 }
@@ -146,7 +146,7 @@ b64_decode(FILE *fout, FILE *fin, bool i
 
 		pos = strchr(B64, c);
 		if (pos == NULL)
-			return -1;
+			return EFTYPE;
 
 		b = (uint8_t)(pos - B64);
 
@@ -157,19 +157,19 @@ b64_decode(FILE *fout, FILE *fin, bool i
 		case 1:
 			out |= b >> 4;
 			if (fputc(out, fout) == -1)
-return -1;
+return errno;
 			out = (uint8_t)((b & 0xf) << 4);
 			break;
 		case 2:
 			out |= b >> 2;
 			if (fputc(out, fout) == -1)
-return -1;
+return errno;
 			out = (uint8_t)((b & 0x3) << 6);
 			break;
 		case 3:
 			out |= b;
 			if (fputc(out, fout) == -1)
-return -1;
+return errno;
 			out = 0;
 			break;
 		default:
@@ -182,7 +182,7 @@ b64_decode(FILE *fout, FILE *fin, bool i
 		switch (state) {
 		case 0:
 		case 1:
-			return -1;
+			return EFTYPE;
 		case 2:
 			while ((c = getc(fin)) != -1) {
 if (ignore && isspace(c))
@@ -190,7 +190,7 @@ b64_decode(FILE *fout, FILE *fin, bool i
 break;
 			}
 			if (c != '=')
-return -1;
+return EFTYPE;
 			/*FALLTHROUGH*/
 		case 3:
 			while ((c = getc(fin)) != -1) {
@@ -199,7 +199,7 @@ b64_decode(FILE *fout, FILE *fin, bool i
 break;
 			}
 			if (c != -1)
-return -1;
+return EFTYPE;
 			return 0;
 		default:
 			abort();
@@ -207,7 +207,7 @@ b64_decode(FILE *fout, FILE *fin, bool i
 	}
 
 	if (c != -1 || state != 0)
-		return -1;
+		return EFTYPE;
 
 	return 0;
 }
@@ -226,12 +226,13 @@ doit(FILE *fout, FILE *fin, bool decode,
 	int e;
 
 	if (decode)
-		e = b64_decode(stdout, stdin, ignore) != 0;
+		e = b64_decode(stdout, stdin, ignore);
 	else
-		e = b64_encode(stdout, stdin, wrap) != 0;
+		e = b64_encode(stdout, stdin, wrap);
 
-	if (e != 0)
-		errx(EXIT_FAILURE, "%scoding failed", decode ? "De": "En");
+	if (e == 0)
+		return;
+	errc(EXIT_FAILURE, e, "%scoding failed", decode ? "De": "En");
 }
 
 int
@@ -242,14 +243,18 @@ main(int argc, char *argv[])
 	bool ignore = false;
 	int c;
 
-	while ((c = getopt(argc, argv, "diw:")) != -1) {
+	while ((c = getopt(argc, argv, "b:Ddiw:")) != -1) {
 		switch (c) {
+		case 'D':
+			decode = ignore = true;
+			break;
 		case 'd':
 			decode = true;
 			break;
 		case 'i':
 			ignore = true;
 			break;
+		case 'b':
 		case 'w':
 			wrap = (size_t)atoi(optarg);
 			break;



CVS commit: src/share/misc

2018-07-24 Thread Eitan Adler
Module Name:src
Committed By:   eadler
Date:   Wed Jul 25 03:28:17 UTC 2018

Modified Files:
src/share/misc: bsd-family-tree

Log Message:
bsd-family-tree: use the right date...


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/share/misc/bsd-family-tree

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

Modified files:

Index: src/share/misc/bsd-family-tree
diff -u src/share/misc/bsd-family-tree:1.69 src/share/misc/bsd-family-tree:1.70
--- src/share/misc/bsd-family-tree:1.69	Wed Jul 25 03:26:40 2018
+++ src/share/misc/bsd-family-tree	Wed Jul 25 03:28:17 2018
@@ -751,7 +751,7 @@ DragonFly 5.2.0		2018-04-10 [DFB]
 DragonFly 5.2.1		2018-05-20 [DFB]
 DragonFly 5.2.2		2018-06-18 [DFB]
 FreeBSD 11.2		2018-06-27 [FBD]
-NetBSD 8.0		2018-08-17 [NBD]
+NetBSD 8.0		2018-07-17 [NBD]
 
 Bibliography
 
@@ -817,4 +817,4 @@ Copyright (c) 1997-2012 Wolfram Schneide
 URL: http://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree
 
 $FreeBSD: head/share/misc/bsd-family-tree 335811 2018-06-30 01:04:37Z eadler $
-$NetBSD: bsd-family-tree,v 1.69 2018/07/25 03:26:40 eadler Exp $
+$NetBSD: bsd-family-tree,v 1.70 2018/07/25 03:28:17 eadler Exp $



CVS commit: src/share/misc

2018-07-24 Thread Eitan Adler
Module Name:src
Committed By:   eadler
Date:   Wed Jul 25 03:26:40 UTC 2018

Modified Files:
src/share/misc: bsd-family-tree

Log Message:
bsd-family-tree: announce NetBSD 8.0; dfly 5.2.2


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/share/misc/bsd-family-tree

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

Modified files:

Index: src/share/misc/bsd-family-tree
diff -u src/share/misc/bsd-family-tree:1.68 src/share/misc/bsd-family-tree:1.69
--- src/share/misc/bsd-family-tree:1.68	Thu Jul 19 09:02:32 2018
+++ src/share/misc/bsd-family-tree	Wed Jul 25 03:26:40 2018
@@ -369,14 +369,14 @@ FreeBSD 5.2   |  |  
  | |  | |  |   |   |
  | |  | |  |  OpenBSD 6.3  |
  | |  | |  |   |   DragonFly 5.2.0
- | |  | |  v   |   |
+ | |  | |  |   |   |
  | |  | |  |   |   DragonFly 5.2.1
- | |  | |  v   |   |
+ | |  | |  |   |   |
  | |  | |  |   |   DragonFly 5.2.2
- |  FreeBSD   | |  |   |
- |   11.2 | |  |   |
- | v  | |  |   |
- || |  |   |
+ |  FreeBSD   | |  NetBSD 8.0  |   |
+ |   11.2 | |  |   |   |
+ | v  | |  |   |   |
+ || |  v   |   |
 FreeBSD 12 -current   | NetBSD -current   OpenBSD -currentDragonFly -current
  || |  |   |
  vv v  v   v
@@ -751,7 +751,7 @@ DragonFly 5.2.0		2018-04-10 [DFB]
 DragonFly 5.2.1		2018-05-20 [DFB]
 DragonFly 5.2.2		2018-06-18 [DFB]
 FreeBSD 11.2		2018-06-27 [FBD]
-NetBSD 8.0		2018-07-17 [NBD]
+NetBSD 8.0		2018-08-17 [NBD]
 
 Bibliography
 
@@ -817,4 +817,4 @@ Copyright (c) 1997-2012 Wolfram Schneide
 URL: http://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree
 
 $FreeBSD: head/share/misc/bsd-family-tree 335811 2018-06-30 01:04:37Z eadler $
-$NetBSD: bsd-family-tree,v 1.68 2018/07/19 09:02:32 martin Exp $
+$NetBSD: bsd-family-tree,v 1.69 2018/07/25 03:26:40 eadler Exp $



CVS commit: src/usr.bin/printf

2018-07-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jul 24 20:58:40 UTC 2018

Modified Files:
src/usr.bin/printf: printf.1

Log Message:
Add the new formats to the list of format cracters (oops...)


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/printf/printf.1

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

Modified files:

Index: src/usr.bin/printf/printf.1
diff -u src/usr.bin/printf/printf.1:1.29 src/usr.bin/printf/printf.1:1.30
--- src/usr.bin/printf/printf.1:1.29	Tue Jul 24 20:49:19 2018
+++ src/usr.bin/printf/printf.1	Tue Jul 24 20:58:39 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: printf.1,v 1.29 2018/07/24 20:49:19 kre Exp $
+.\"	$NetBSD: printf.1,v 1.30 2018/07/24 20:58:39 kre Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -241,7 +241,7 @@ formats); if the digit string is missing
 as zero;
 .It Format :
 A character which indicates the type of format to use (one of
-.Cm diouxXfeEgGbBcs ) .
+.Cm diouxXfFeEgGaAbBcs ) .
 .El
 .Pp
 A field width or precision may be



CVS commit: src/sys/arch/aarch64/aarch64

2018-07-24 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Jul 24 20:55:49 UTC 2018

Modified Files:
src/sys/arch/aarch64/aarch64: copyinout.S

Log Message:
copy(9) had returned -1 if a bad address is encountered. fix to return EFAULT 
in that case.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/aarch64/copyinout.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/aarch64/aarch64/copyinout.S
diff -u src/sys/arch/aarch64/aarch64/copyinout.S:1.5 src/sys/arch/aarch64/aarch64/copyinout.S:1.6
--- src/sys/arch/aarch64/aarch64/copyinout.S:1.5	Tue Jul 17 18:08:36 2018
+++ src/sys/arch/aarch64/aarch64/copyinout.S	Tue Jul 24 20:55:49 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: copyinout.S,v 1.5 2018/07/17 18:08:36 christos Exp $ */
+/* $NetBSD: copyinout.S,v 1.6 2018/07/24 20:55:49 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: copyinout.S,v 1.5 2018/07/17 18:08:36 christos Exp $");
+RCSID("$NetBSD: copyinout.S,v 1.6 2018/07/24 20:55:49 ryo Exp $");
 
 	.macro enter_cpu_onfault
 	stp	fp, lr, [sp, #-16]!	/* save fp, lr */
@@ -48,8 +48,8 @@ RCSID("$NetBSD: copyinout.S,v 1.5 2018/0
 	stp	x2, x3, [sp, #-16]!	/* save x2, x3 */
 	bl	cpu_set_onfault
 	ldp	x2, x3, [sp], #16	/* restore x2, x3 */
-	mvn	x8, xzr			/* temporary return value = -1 */
-	cbnz	w0, 9f			/* return if error */
+	mov	x8, x0			/* x8 = cpu_set_onfault() */
+	cbnz	x0, 9f			/* return if error */
 
 	mov	x0, x19			/* x0 = x19 = arg0 */
 	mov	x1, x20			/* x1 = x20 = arg1 */



CVS commit: src/usr.bin/printf

2018-07-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jul 24 20:49:20 UTC 2018

Modified Files:
src/usr.bin/printf: printf.1 printf.c

Log Message:
Add support for F a and A formats (which go with the eEfgG formats
already supported.)


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/printf/printf.1
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/printf/printf.c

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

Modified files:

Index: src/usr.bin/printf/printf.1
diff -u src/usr.bin/printf/printf.1:1.28 src/usr.bin/printf/printf.1:1.29
--- src/usr.bin/printf/printf.1:1.28	Tue Jul 24 19:49:33 2018
+++ src/usr.bin/printf/printf.1	Tue Jul 24 20:49:19 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: printf.1,v 1.28 2018/07/24 19:49:33 kre Exp $
+.\"	$NetBSD: printf.1,v 1.29 2018/07/24 20:49:19 kre Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	from: @(#)printf.1	8.1 (Berkeley) 6/6/93
 .\"
-.Dd March 11, 2018
+.Dd July 25, 2018
 .Dt PRINTF 1
 .Os
 .Sh NAME
@@ -169,6 +169,7 @@ For
 .Cm e ,
 .Cm E ,
 .Cm f ,
+.Cm F ,
 .Cm g ,
 and
 .Cm G
@@ -257,7 +258,7 @@ The
 .Ar argument
 is printed as a signed decimal (d or i), unsigned octal, unsigned decimal,
 or unsigned hexadecimal (X or x), respectively.
-.It Cm f
+.It Cm fF
 The
 .Ar argument
 is printed in the style
@@ -269,6 +270,17 @@ after the decimal point is equal to the 
 the argument.
 If the precision is missing, 6 digits are given; if the precision
 is explicitly 0, no digits and no decimal point are printed.
+If the number is Infinity, or Not a Number (NaN), then
+.Dq inf
+.Pq \ Dq nan
+is printed for
+.Cm f
+format, and
+.Dq INF
+.Pq \ Dq NAN
+for
+.Cm F
+format.
 .It Cm eE
 The
 .Ar argument
@@ -282,16 +294,28 @@ the precision specification for the argu
 missing, 6 digits are produced.
 An upper-case E is used for an
 .Sq E
+format, and upper-case for Infinity and NaN as for
+.Sq F
 format.
 .It Cm gG
 The
 .Ar argument
 is printed in style
 .Cm f
+.Pq Cm F
 or in style
 .Cm e
 .Pq Cm E
 whichever gives full precision in minimum space.
+.It Cm aA
+The
+.Ar argument
+is treated as a floating point number,
+for which the underlying hexadecimal representation is
+printed.
+See
+.Xr printf 3
+for the details.
 .It Cm b
 Characters from the string
 .Ar argument

Index: src/usr.bin/printf/printf.c
diff -u src/usr.bin/printf/printf.c:1.39 src/usr.bin/printf/printf.c:1.40
--- src/usr.bin/printf/printf.c:1.39	Tue Jul  3 01:56:39 2018
+++ src/usr.bin/printf/printf.c	Tue Jul 24 20:49:19 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: printf.c,v 1.39 2018/07/03 01:56:39 kre Exp $	*/
+/*	$NetBSD: printf.c,v 1.40 2018/07/24 20:49:19 kre Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)printf.c	8.2 (Berkeley) 3/22/95";
 #else
-__RCSID("$NetBSD: printf.c,v 1.39 2018/07/03 01:56:39 kre Exp $");
+__RCSID("$NetBSD: printf.c,v 1.40 2018/07/24 20:49:19 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -293,9 +293,12 @@ int main(int argc, char *argv[])
 	goto out;
 break;
 			}
+			case 'a':
+			case 'A':
 			case 'e':
 			case 'E':
 			case 'f':
+			case 'F':
 			case 'g':
 			case 'G': {
 double p = getdouble();



CVS commit: src/usr.bin/printf

2018-07-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jul 24 19:49:34 UTC 2018

Modified Files:
src/usr.bin/printf: printf.1

Log Message:
Correct a typo (off by one  (key)) ...
There is no 'w' format, but there is an 'e'


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/printf/printf.1

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

Modified files:

Index: src/usr.bin/printf/printf.1
diff -u src/usr.bin/printf/printf.1:1.27 src/usr.bin/printf/printf.1:1.28
--- src/usr.bin/printf/printf.1:1.27	Mon Mar 12 09:29:43 2018
+++ src/usr.bin/printf/printf.1	Tue Jul 24 19:49:33 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: printf.1,v 1.27 2018/03/12 09:29:43 wiz Exp $
+.\"	$NetBSD: printf.1,v 1.28 2018/07/24 19:49:33 kre Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -240,7 +240,7 @@ formats); if the digit string is missing
 as zero;
 .It Format :
 A character which indicates the type of format to use (one of
-.Cm diouxXfwEgGbBcs ) .
+.Cm diouxXfeEgGbBcs ) .
 .El
 .Pp
 A field width or precision may be



CVS commit: src/usr.bin/base64

2018-07-24 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 24 19:08:22 UTC 2018

Modified Files:
src/usr.bin/base64: base64.1

Log Message:
Fix typo. Comment out SEE ALSO since it only refers nonexistent man pages.
Reduce history to NetBSD until we know more details about other OSes.
Use An. Fix Dt argument.


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

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

Modified files:

Index: src/usr.bin/base64/base64.1
diff -u src/usr.bin/base64/base64.1:1.1 src/usr.bin/base64/base64.1:1.2
--- src/usr.bin/base64/base64.1:1.1	Tue Jul 24 15:26:16 2018
+++ src/usr.bin/base64/base64.1	Tue Jul 24 19:08:22 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: base64.1,v 1.1 2018/07/24 15:26:16 christos Exp $
+.\"	$NetBSD: base64.1,v 1.2 2018/07/24 19:08:22 wiz Exp $
 .\"
 .\" Copyright (c) 2018 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -29,11 +29,11 @@
 .\"
 .\"
 .Dd July 24, 2018
-.Dt base64 1
+.Dt BASE64 1
 .Os
 .Sh NAME
 .Nm base64
-.Nd base64 encode/decode data into the stardard output
+.Nd base64 encode/decode data into the standard output
 .Sh SYNOPSIS
 .Nm
 .Op Fl di
@@ -61,14 +61,14 @@ The default number of characters is 76.
 .Nm
 exits with 0 if there was no error and non-zero if it could not encode or
 decode, printing an error message.
-.Sh SEE ALSO
-.Xr b64_ntop ,
-.Xr b64_pton .
-.Sh AUTHORS
-Christos Zoulas
+.\" .Sh SEE ALSO
+.\" .Xr b64_ntop 3 ,
+.\" .Xr b64_pton 3
 .Sh HISTORY
 The
 .Nm
 command first appeared on
-Linux ?, MacOS/X ?, and
+.\" Linux ?, MacOS/X ?, and
 .Nx 9 .
+.Sh AUTHORS
+.An Christos Zoulas



CVS commit: src/distrib/sets/lists

2018-07-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 24 15:29:05 UTC 2018

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/man: mi

Log Message:
sets for base64


To generate a diff of this commit:
cvs rdiff -u -r1.1180 -r1.1181 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.257 -r1.258 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1600 -r1.1601 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1180 src/distrib/sets/lists/base/mi:1.1181
--- src/distrib/sets/lists/base/mi:1.1180	Tue Jul 17 14:55:24 2018
+++ src/distrib/sets/lists/base/mi	Tue Jul 24 11:29:05 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1180 2018/07/17 18:55:24 joerg Exp $
+# $NetBSD: mi,v 1.1181 2018/07/24 15:29:05 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -653,6 +653,7 @@
 ./usr/bin/audiorecordbase-audio-bin
 ./usr/bin/awk	base-util-bin
 ./usr/bin/bannerbase-util-bin
+./usr/bin/base64base-util-bin
 ./usr/bin/basenamebase-util-bin
 ./usr/bin/batch	base-cron-bin
 ./usr/bin/bc	base-util-bin

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.257 src/distrib/sets/lists/debug/mi:1.258
--- src/distrib/sets/lists/debug/mi:1.257	Fri Jul 13 07:14:14 2018
+++ src/distrib/sets/lists/debug/mi	Tue Jul 24 11:29:05 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.257 2018/07/13 11:14:14 maxv Exp $
+# $NetBSD: mi,v 1.258 2018/07/24 15:29:05 christos Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -463,6 +463,7 @@
 ./usr/libdata/debug/usr/bin/audiorecord.debug	comp-audio-debug	debug
 ./usr/libdata/debug/usr/bin/awk.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/banner.debug	comp-util-debug		debug
+./usr/libdata/debug/usr/bin/base64.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/basename.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/bc.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/bdes.debug		comp-crypto-debug	debug

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1600 src/distrib/sets/lists/man/mi:1.1601
--- src/distrib/sets/lists/man/mi:1.1600	Sat Jul 21 02:25:29 2018
+++ src/distrib/sets/lists/man/mi	Tue Jul 24 11:29:05 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1600 2018/07/21 06:25:29 maxv Exp $
+# $NetBSD: mi,v 1.1601 2018/07/24 15:29:05 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -76,6 +76,7 @@
 ./usr/share/man/cat1/audit-packages.0		man-obsolete		obsolete
 ./usr/share/man/cat1/awk.0			man-util-catman		.cat
 ./usr/share/man/cat1/banner.0			man-util-catman		.cat
+./usr/share/man/cat1/base64.0			man-util-catman		.cat
 ./usr/share/man/cat1/basename.0			man-util-catman		.cat
 ./usr/share/man/cat1/batch.0			man-cron-catman		.cat
 ./usr/share/man/cat1/bc.0			man-util-catman		.cat
@@ -3302,6 +3303,7 @@
 ./usr/share/man/html1/audit-packages.html	man-obsolete		obsolete
 ./usr/share/man/html1/awk.html			man-util-htmlman	html
 ./usr/share/man/html1/banner.html		man-util-htmlman	html
+./usr/share/man/html1/base64.html		man-util-htmlman	html
 ./usr/share/man/html1/basename.html		man-util-htmlman	html
 ./usr/share/man/html1/batch.html		man-cron-htmlman	html
 ./usr/share/man/html1/bc.html			man-util-htmlman	html
@@ -6138,6 +6140,7 @@
 ./usr/share/man/man1/audit-packages.1		man-obsolete		obsolete
 ./usr/share/man/man1/awk.1			man-util-man		.man
 ./usr/share/man/man1/banner.1			man-util-man		.man
+./usr/share/man/man1/base64.1			man-util-man		.man
 ./usr/share/man/man1/basename.1			man-util-man		.man
 ./usr/share/man/man1/batch.1			man-cron-man		.man
 ./usr/share/man/man1/bc.1			man-util-man		.man



CVS commit: src/usr.bin

2018-07-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 24 15:26:16 UTC 2018

Modified Files:
src/usr.bin: Makefile
Added Files:
src/usr.bin/base64: Makefile base64.1 base64.c

Log Message:
Tiny base64 encoder/decoder command patterned after the linux and the macosx
ones with the same name,.


To generate a diff of this commit:
cvs rdiff -u -r1.231 -r1.232 src/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/base64/Makefile \
src/usr.bin/base64/base64.1 src/usr.bin/base64/base64.c

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

Modified files:

Index: src/usr.bin/Makefile
diff -u src/usr.bin/Makefile:1.231 src/usr.bin/Makefile:1.232
--- src/usr.bin/Makefile:1.231	Fri Jul 13 07:14:14 2018
+++ src/usr.bin/Makefile	Tue Jul 24 11:26:16 2018
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.231 2018/07/13 11:14:14 maxv Exp $
+#	$NetBSD: Makefile,v 1.232 2018/07/24 15:26:16 christos Exp $
 #	from: @(#)Makefile	8.3 (Berkeley) 1/7/94
 
 .include 
 
 SUBDIR= apply asa at audio audiocfg \
-	banner basename biff bthset btkey btpin \
+	banner base64 basename biff bthset btkey btpin \
 	bzip2 bzip2recover c11 c89 c99 cal calendar cap_mkdb cdplay \
 	checknr chflags chpass cksum cmp cleantags col colcrt colrm \
 	column comm compress config crunch csplit ctags cut cvslatest \

Added files:

Index: src/usr.bin/base64/Makefile
diff -u /dev/null src/usr.bin/base64/Makefile:1.1
--- /dev/null	Tue Jul 24 11:26:16 2018
+++ src/usr.bin/base64/Makefile	Tue Jul 24 11:26:16 2018
@@ -0,0 +1,9 @@
+#	$NetBSD: Makefile,v 1.1 2018/07/24 15:26:16 christos Exp $
+
+WARNS?= 6	
+
+.include 
+
+PROG=		base64
+
+.include 
Index: src/usr.bin/base64/base64.1
diff -u /dev/null src/usr.bin/base64/base64.1:1.1
--- /dev/null	Tue Jul 24 11:26:16 2018
+++ src/usr.bin/base64/base64.1	Tue Jul 24 11:26:16 2018
@@ -0,0 +1,74 @@
+.\"	$NetBSD: base64.1,v 1.1 2018/07/24 15:26:16 christos Exp $
+.\"
+.\" Copyright (c) 2018 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Christos Zoulas.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\"
+.Dd July 24, 2018
+.Dt base64 1
+.Os
+.Sh NAME
+.Nm base64
+.Nd base64 encode/decode data into the stardard output
+.Sh SYNOPSIS
+.Nm
+.Op Fl di
+.Op Fl w Ar wrap
+.Op Ar
+.Sh DESCRIPTION
+.Nm
+reads from the standard input or from each file argument, and encodes
+or decodes data based on the base64 scheme described in RFC 3548 into
+the standard output.
+.Pp
+The following options are available:
+.Bl -tag -width XXX
+.It Fl d
+Decode the input instead of encoding it.
+.It Fl i
+Ignore whitespace characters when decoding.
+.It Fl w Ar wrap
+Wrap lines longer than
+.Ar wrap
+characters using a newline.
+The default number of characters is 76.
+.El
+.Sh EXIT STATUS
+.Nm
+exits with 0 if there was no error and non-zero if it could not encode or
+decode, printing an error message.
+.Sh SEE ALSO
+.Xr b64_ntop ,
+.Xr b64_pton .
+.Sh AUTHORS
+Christos Zoulas
+.Sh HISTORY
+The
+.Nm
+command first appeared on
+Linux ?, MacOS/X ?, and
+.Nx 9 .
Index: src/usr.bin/base64/base64.c
diff -u /dev/null src/usr.bin/base64/base64.c:1.1
--- /dev/null	Tue Jul 24 11:26:16 2018
+++ src/usr.bin/base64/base64.c	Tue Jul 24 11:26:16 2018
@@ -0,0 +1,278 @@
+/*	$NetBSD: base64.c,v 1.1 2018/07/24 15:26:16 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or 

CVS commit: src/sys/kern

2018-07-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jul 24 15:09:37 UTC 2018

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

Log Message:
In mi_switch(), also call pserialize_switchpoint() if we're not switching
to another lwp, as proposed on
http://mail-index.netbsd.org/tech-kern/2018/07/20/msg023709.html

Without it, on a SMP machine with few processes running (e.g while
running sysinst), pserialize could hang for a long time until all
CPUs got a LWP to run (or, eventually, forever).
Tested on Xen domUs with 4 CPUs, and on a 64-threads AMD machine.


To generate a diff of this commit:
cvs rdiff -u -r1.316 -r1.317 src/sys/kern/kern_synch.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/kern_synch.c
diff -u src/sys/kern/kern_synch.c:1.316 src/sys/kern/kern_synch.c:1.317
--- src/sys/kern/kern_synch.c:1.316	Thu Jul 12 10:46:48 2018
+++ src/sys/kern/kern_synch.c	Tue Jul 24 15:09:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_synch.c,v 1.316 2018/07/12 10:46:48 maxv Exp $	*/
+/*	$NetBSD: kern_synch.c,v 1.317 2018/07/24 15:09:37 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@@ -69,7 +69,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.316 2018/07/12 10:46:48 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.317 2018/07/24 15:09:37 bouyer Exp $");
 
 #include "opt_kstack.h"
 #include "opt_dtrace.h"
@@ -745,6 +745,7 @@ mi_switch(lwp_t *l)
 		retval = 1;
 	} else {
 		/* Nothing to do - just unlock and return. */
+		pserialize_switchpoint();
 		mutex_spin_exit(spc->spc_mutex);
 		lwp_unlock(l);
 		retval = 0;



CVS commit: src/libexec/ld.elf_so

2018-07-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 24 13:48:48 UTC 2018

Modified Files:
src/libexec/ld.elf_so: headers.c

Log Message:
Apply relocbase for tlsinit of the executable itself. Fixes PIE where
relocbase typically is not zero.

PR bin/53465


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/libexec/ld.elf_so/headers.c

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

Modified files:

Index: src/libexec/ld.elf_so/headers.c
diff -u src/libexec/ld.elf_so/headers.c:1.63 src/libexec/ld.elf_so/headers.c:1.64
--- src/libexec/ld.elf_so/headers.c:1.63	Thu May 24 17:05:54 2018
+++ src/libexec/ld.elf_so/headers.c	Tue Jul 24 13:48:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: headers.c,v 1.63 2018/05/24 17:05:54 christos Exp $	 */
+/*	$NetBSD: headers.c,v 1.64 2018/07/24 13:48:48 joerg Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: headers.c,v 1.63 2018/05/24 17:05:54 christos Exp $");
+__RCSID("$NetBSD: headers.c,v 1.64 2018/07/24 13:48:48 joerg Exp $");
 #endif /* not lint */
 
 #include 
@@ -449,7 +449,8 @@ _rtld_digest_phdr(const Elf_Phdr *phdr, 
 			obj->tlssize = ph->p_memsz;
 			obj->tlsalign = ph->p_align;
 			obj->tlsinitsize = ph->p_filesz;
-			obj->tlsinit = (void *)(uintptr_t)ph->p_vaddr;
+			obj->tlsinit = (void *)(obj->relocbase +
+			(uintptr_t)ph->p_vaddr);
 			dbg(("headers: %s %p phsize %" PRImemsz,
 			"PT_TLS", (void *)(uintptr_t)vaddr,
 			 ph->p_memsz));



CVS commit: src/doc

2018-07-24 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 24 12:59:16 UTC 2018

Modified Files:
src/doc: 3RDPARTY

Log Message:
binutils-2.31 out


To generate a diff of this commit:
cvs rdiff -u -r1.1533 -r1.1534 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1533 src/doc/3RDPARTY:1.1534
--- src/doc/3RDPARTY:1.1533	Tue Jul 24 07:59:46 2018
+++ src/doc/3RDPARTY	Tue Jul 24 12:59:15 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1533 2018/07/24 07:59:46 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1534 2018/07/24 12:59:15 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -186,7 +186,7 @@ Todo[5]: Reconcile the doc directory.
 
 Package:	binutils
 Version:	2.27
-Current Vers:	2.30
+Current Vers:	2.31
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/binutils/
 Home Page:	http://www.gnu.org/software/binutils/



CVS commit: src/sys/arch/xen/x86

2018-07-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jul 24 12:26:14 UTC 2018

Modified Files:
src/sys/arch/xen/x86: xen_ipi.c

Log Message:
Fix what looks like a typo in xen_send_ipi():
ci != NULL || ci != curcpu()
is always true


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/xen/x86/xen_ipi.c

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

Modified files:

Index: src/sys/arch/xen/x86/xen_ipi.c
diff -u src/sys/arch/xen/x86/xen_ipi.c:1.25 src/sys/arch/xen/x86/xen_ipi.c:1.26
--- src/sys/arch/xen/x86/xen_ipi.c:1.25	Sun Jun 24 13:35:32 2018
+++ src/sys/arch/xen/x86/xen_ipi.c	Tue Jul 24 12:26:14 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_ipi.c,v 1.25 2018/06/24 13:35:32 jdolecek Exp $ */
+/* $NetBSD: xen_ipi.c,v 1.26 2018/07/24 12:26:14 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,10 +33,10 @@
 
 /* 
  * Based on: x86/ipi.c
- * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.25 2018/06/24 13:35:32 jdolecek Exp $");
+ * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.26 2018/07/24 12:26:14 bouyer Exp $");
  */
 
-__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.25 2018/06/24 13:35:32 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.26 2018/07/24 12:26:14 bouyer Exp $");
 
 #include "opt_ddb.h"
 
@@ -168,7 +168,7 @@ xen_send_ipi(struct cpu_info *ci, uint32
 {
 	evtchn_port_t evtchn;
 
-	KASSERT(ci != NULL || ci != curcpu());
+	KASSERT(ci != NULL && ci != curcpu());
 
 	if ((ci->ci_flags & CPUF_RUNNING) == 0) {
 		return ENOENT;



CVS commit: src/sys/arch/xen/x86

2018-07-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jul 24 12:24:45 UTC 2018

Modified Files:
src/sys/arch/xen/x86: cpu.c

Log Message:
Sync cpu_boot_secondary_processors() with x86/x86/cpu.c:
explicitely wait for all CPUs to be registered in kcpuset_running.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/xen/x86/cpu.c

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

Modified files:

Index: src/sys/arch/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.122 src/sys/arch/xen/x86/cpu.c:1.123
--- src/sys/arch/xen/x86/cpu.c:1.122	Sat Jun 23 10:30:22 2018
+++ src/sys/arch/xen/x86/cpu.c	Tue Jul 24 12:24:45 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.122 2018/06/23 10:30:22 jdolecek Exp $	*/
+/*	$NetBSD: cpu.c,v 1.123 2018/07/24 12:24:45 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.122 2018/06/23 10:30:22 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.123 2018/07/24 12:24:45 bouyer Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -583,7 +583,11 @@ void
 cpu_boot_secondary_processors(void)
 {
 	struct cpu_info *ci;
+	kcpuset_t *cpus;
 	u_long i;
+
+	kcpuset_create(, true);
+	kcpuset_set(cpus, cpu_index(curcpu()));
 	for (i = 0; i < maxcpus; i++) {
 		ci = cpu_lookup(i);
 		if (ci == NULL)
@@ -595,7 +599,11 @@ cpu_boot_secondary_processors(void)
 		if (ci->ci_flags & (CPUF_BSP|CPUF_SP|CPUF_PRIMARY))
 			continue;
 		cpu_boot_secondary(ci);
+		kcpuset_set(cpus, cpu_index(ci));
 	}
+	while (!kcpuset_match(cpus, kcpuset_running))
+		;
+	kcpuset_destroy(cpus);
 
 	x86_mp_online = true;
 }



CVS commit: src/sys/arch/aarch64/aarch64

2018-07-24 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Jul 24 10:08:43 UTC 2018

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

Log Message:
don't call pool_cache_put with locking pmap. pool_cache_put call pmap_kenter_pa 
internally.
(pool_cache_put_paddr -> pool_cache_put_slow -> pool_get -> pmap_kenter_pa)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/aarch64/aarch64/pmap.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.13 src/sys/arch/aarch64/aarch64/pmap.c:1.14
--- src/sys/arch/aarch64/aarch64/pmap.c:1.13	Mon Jul 23 22:51:39 2018
+++ src/sys/arch/aarch64/aarch64/pmap.c	Tue Jul 24 10:08:43 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.13 2018/07/23 22:51:39 ryo Exp $	*/
+/*	$NetBSD: pmap.c,v 1.14 2018/07/24 10:08:43 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.13 2018/07/23 22:51:39 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.14 2018/07/24 10:08:43 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -852,7 +852,7 @@ _pmap_pte_adjust_cacheflags(pt_entry_t p
 	return pte;
 }
 
-static void
+static struct pv_entry *
 _pmap_remove_pv(struct vm_page *pg, struct pmap *pm, vaddr_t va, pt_entry_t pte)
 {
 	struct vm_page_md *md;
@@ -883,8 +883,7 @@ _pmap_remove_pv(struct vm_page *pg, stru
 
 	pmap_pv_unlock(md);
 
-	if (pv != NULL)
-		pool_cache_put(&_pmap_pv_pool, pv);
+	return pv;
 }
 
 #if defined(PMAP_PV_DEBUG) || defined(DDB)
@@ -1292,7 +1291,7 @@ _pmap_enter(struct pmap *pm, vaddr_t va,
 u_int flags, bool kenter)
 {
 	struct vm_page *pg;
-	struct pv_entry *spv;
+	struct pv_entry *spv, *opv = NULL;
 	pd_entry_t pde;
 	pt_entry_t attr, pte, *ptep;
 #ifdef UVMHIST
@@ -1428,7 +1427,7 @@ _pmap_enter(struct pmap *pm, vaddr_t va,
 
 			opg = PHYS_TO_VM_PAGE(l3pte_pa(pte));
 			if (opg != NULL)
-_pmap_remove_pv(opg, pm, va, pte);
+opv = _pmap_remove_pv(opg, pm, va, pte);
 		}
 
 		if (pte & LX_BLKPAG_OS_WIRED)
@@ -1509,6 +1508,9 @@ _pmap_enter(struct pmap *pm, vaddr_t va,
 	if (spv != NULL)
 		pool_cache_put(&_pmap_pv_pool, spv);
 
+	if (opv != NULL)
+		pool_cache_put(&_pmap_pv_pool, opv);
+
 	return error;
 }
 
@@ -1531,6 +1533,7 @@ _pmap_remove(struct pmap *pm, vaddr_t va
 {
 	pt_entry_t pte, *ptep;
 	struct vm_page *pg;
+	struct pv_entry *opv = NULL;
 	paddr_t pa;
 
 
@@ -1556,7 +1559,7 @@ _pmap_remove(struct pmap *pm, vaddr_t va
 			pg = PHYS_TO_VM_PAGE(pa);
 
 		if (pg != NULL)
-			_pmap_remove_pv(pg, pm, va, pte);
+			opv = _pmap_remove_pv(pg, pm, va, pte);
 
 		atomic_swap_64(ptep, 0);
 #if 0
@@ -1571,6 +1574,9 @@ _pmap_remove(struct pmap *pm, vaddr_t va
 	}
  done:
 	pm_unlock(pm);
+
+	if (opv != NULL)
+		pool_cache_put(&_pmap_pv_pool, opv);
 }
 
 void



CVS commit: src/usr.sbin/tprof

2018-07-24 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul 24 10:05:36 UTC 2018

Modified Files:
src/usr.sbin/tprof: tprof.8

Log Message:
Add a "support" section.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/tprof/tprof.8

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/tprof/tprof.8
diff -u src/usr.sbin/tprof/tprof.8:1.9 src/usr.sbin/tprof/tprof.8:1.10
--- src/usr.sbin/tprof/tprof.8:1.9	Wed Jul 18 16:50:05 2018
+++ src/usr.sbin/tprof/tprof.8	Tue Jul 24 10:05:36 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tprof.8,v 1.9 2018/07/18 16:50:05 wiz Exp $
+.\"	$NetBSD: tprof.8,v 1.10 2018/07/24 10:05:36 maxv Exp $
 .\"
 .\" Copyright (c)2011 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 13, 2018
+.Dd July 24, 2018
 .Dt TPROF 8
 .Os
 .Sh NAME
@@ -120,6 +120,20 @@ samples into the file myfile.out.
 .Dl # tprof monitor -e llc-misses:k -o myfile.out sleep 20
 The following command displays the results of the sampling.
 .Dl # tprof analyze myfile.out
+.Sh SUPPORT
+The following CPU models are supported:
+.Bl -hyphen -compact -offset indent
+.It
+ARMv7
+.It
+ARMv8
+.It
+x86 AMD Family 10h
+.It
+x86 Intel Generic (all Intel CPUs)
+.It
+x86 Intel Skylake/Kabylake
+.El
 .Sh DIAGNOSTICS
 The
 .Nm



CVS commit: src/usr.sbin/tprof

2018-07-24 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul 24 09:50:37 UTC 2018

Modified Files:
src/usr.sbin/tprof: tprof.c

Log Message:
Use errx, there is no errno.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/tprof/tprof.c

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

Modified files:

Index: src/usr.sbin/tprof/tprof.c
diff -u src/usr.sbin/tprof/tprof.c:1.12 src/usr.sbin/tprof/tprof.c:1.13
--- src/usr.sbin/tprof/tprof.c:1.12	Wed Jul 18 16:50:05 2018
+++ src/usr.sbin/tprof/tprof.c	Tue Jul 24 09:50:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprof.c,v 1.12 2018/07/18 16:50:05 wiz Exp $	*/
+/*	$NetBSD: tprof.c,v 1.13 2018/07/24 09:50:37 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: tprof.c,v 1.12 2018/07/18 16:50:05 wiz Exp $");
+__RCSID("$NetBSD: tprof.c,v 1.13 2018/07/24 09:50:37 maxv Exp $");
 #endif /* not lint */
 
 #include 
@@ -284,7 +284,7 @@ main(int argc, char *argv[])
 		info.ti_version, TPROF_VERSION);
 	}
 	if (tprof_event_init(info.ti_ident) == -1) {
-		err(EXIT_FAILURE, "cpu not supported");
+		errx(EXIT_FAILURE, "cpu not supported");
 	}
 
 	if (argc == 0)



CVS commit: src

2018-07-24 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul 24 09:47:36 UTC 2018

Modified Files:
src/distrib/sets/lists/modules: md.amd64 md.i386
src/sys/dev/tprof: tprof_x86_amd.c tprof_x86_intel.c
src/sys/modules: Makefile
Added Files:
src/sys/dev/tprof: tprof_x86.c
src/sys/modules/tprof_x86: Makefile
Removed Files:
src/sys/modules/tprof_amdpmi: Makefile
src/sys/modules/tprof_pmi: Makefile

Log Message:
Merge the tprof_pmi and tprof_amdpmi modules into a single tprof_x86
module.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.79 -r1.80 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r0 -r1.1 src/sys/dev/tprof/tprof_x86.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/tprof/tprof_x86_amd.c \
src/sys/dev/tprof/tprof_x86_intel.c
cvs rdiff -u -r1.206 -r1.207 src/sys/modules/Makefile
cvs rdiff -u -r1.2 -r0 src/sys/modules/tprof_amdpmi/Makefile
cvs rdiff -u -r1.2 -r0 src/sys/modules/tprof_pmi/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/tprof_x86/Makefile

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

Modified files:

Index: src/distrib/sets/lists/modules/md.amd64
diff -u src/distrib/sets/lists/modules/md.amd64:1.75 src/distrib/sets/lists/modules/md.amd64:1.76
--- src/distrib/sets/lists/modules/md.amd64:1.75	Mon Feb 26 07:30:17 2018
+++ src/distrib/sets/lists/modules/md.amd64	Tue Jul 24 09:47:35 2018
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.75 2018/02/26 07:30:17 pgoyette Exp $
+# $NetBSD: md.amd64,v 1.76 2018/07/24 09:47:35 maxv Exp $
 #
 # NOTE that there are two sets of files here:
 # @MODULEDIR@ and amd64-xen
@@ -157,10 +157,12 @@
 ./@MODULEDIR@/tco/tco.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/thinkpadbase-kernel-modules	kmod
 ./@MODULEDIR@/thinkpad/thinkpad.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/tprof_amdpmi			base-kernel-modules	kmod
-./@MODULEDIR@/tprof_amdpmi/tprof_amdpmi.kmod	base-kernel-modules	kmod
-./@MODULEDIR@/tprof_pmibase-kernel-modules	kmod
-./@MODULEDIR@/tprof_pmi/tprof_pmi.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/tprof_amdpmi			base-obsolete		obsolete
+./@MODULEDIR@/tprof_amdpmi/tprof_amdpmi.kmod	base-obsolete		obsolete
+./@MODULEDIR@/tprof_pmibase-obsolete		obsolete
+./@MODULEDIR@/tprof_pmi/tprof_pmi.kmod		base-obsolete		obsolete
+./@MODULEDIR@/tprof_x86base-kernel-modules	kmod
+./@MODULEDIR@/tprof_x86/tprof_x86.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/tvpllbase-kernel-modules	kmod
 ./@MODULEDIR@/tvpll/tvpll.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/ubsecbase-kernel-modules	kmod

Index: src/distrib/sets/lists/modules/md.i386
diff -u src/distrib/sets/lists/modules/md.i386:1.79 src/distrib/sets/lists/modules/md.i386:1.80
--- src/distrib/sets/lists/modules/md.i386:1.79	Tue Jul 10 17:01:42 2018
+++ src/distrib/sets/lists/modules/md.i386	Tue Jul 24 09:47:35 2018
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.79 2018/07/10 17:01:42 maya Exp $
+# $NetBSD: md.i386,v 1.80 2018/07/24 09:47:35 maxv Exp $
 #
 # NOTE that there are three sets of files here:
 # @MODULEDIR@, i386-xen, and i386pae-xen
@@ -172,10 +172,12 @@
 ./@MODULEDIR@/tdfxdrm/tdfxdrm.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/thinkpadbase-kernel-modules	kmod
 ./@MODULEDIR@/thinkpad/thinkpad.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/tprof_amdpmi			base-kernel-modules	kmod
-./@MODULEDIR@/tprof_amdpmi/tprof_amdpmi.kmod	base-kernel-modules	kmod
-./@MODULEDIR@/tprof_pmibase-kernel-modules	kmod
-./@MODULEDIR@/tprof_pmi/tprof_pmi.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/tprof_amdpmi			base-obsolete		obsolete
+./@MODULEDIR@/tprof_amdpmi/tprof_amdpmi.kmod	base-obsolete		obsolete
+./@MODULEDIR@/tprof_pmibase-obsolete		obsolete
+./@MODULEDIR@/tprof_pmi/tprof_pmi.kmod		base-obsolete		obsolete
+./@MODULEDIR@/tprof_x86base-kernel-modules	kmod
+./@MODULEDIR@/tprof_x86/tprof_x86.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/tvpllbase-kernel-modules	kmod
 ./@MODULEDIR@/tvpll/tvpll.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/ubsecbase-kernel-modules	kmod

Index: src/sys/dev/tprof/tprof_x86_amd.c
diff -u src/sys/dev/tprof/tprof_x86_amd.c:1.1 src/sys/dev/tprof/tprof_x86_amd.c:1.2
--- src/sys/dev/tprof/tprof_x86_amd.c:1.1	Mon Jul 16 06:18:31 2018
+++ src/sys/dev/tprof/tprof_x86_amd.c	Tue Jul 24 09:47:35 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprof_x86_amd.c,v 1.1 2018/07/16 06:18:31 maxv Exp $	*/
+/*	$NetBSD: tprof_x86_amd.c,v 1.2 2018/07/24 09:47:35 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tprof_x86_amd.c,v 1.1 2018/07/16 06:18:31 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_x86_amd.c,v 1.2 2018/07/24 09:47:35 maxv Exp $");
 
 #include 
 #include 
@@ -245,28 +245,9 @@ tprof_amd_stop(const tprof_param_t *para
 	amd_nmi_handle = NULL;
 }
 
-static const tprof_backend_ops_t 

CVS commit: src/sys/dev/usb

2018-07-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 24 09:16:23 UTC 2018

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
- Add Huawei HWD12, E353, E355, E392, EC156, E3272 / Softbank 203HW
- Add NetIndex RT-WJ02 and UX312NC.
- Add Siemens HC28
- Add ZTE MF112, MF119, MF190, MF228 modem / Softbank 004Z


To generate a diff of this commit:
cvs rdiff -u -r1.754 -r1.755 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.754 src/sys/dev/usb/usbdevs:1.755
--- src/sys/dev/usb/usbdevs:1.754	Tue Jul 24 08:13:34 2018
+++ src/sys/dev/usb/usbdevs	Tue Jul 24 09:16:23 2018
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.754 2018/07/24 08:13:34 msaitoh Exp $
+$NetBSD: usbdevs,v 1.755 2018/07/24 09:16:23 msaitoh Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1820,17 +1820,19 @@ product HUAWEI E220		0x1003	Huawei E220
 product HUAWEI U8150		0x1037	Huawei U8150
 product HUAWEI EM770W		0x1404	Huawei EM770W
 product HUAWEI E1750		0x140c	Huawei E1750
+product HUAWEI E353 0x1442  Huawei E353
 product HUAWEI E1750INIT	0x1446	Huawei E1750 USB CD
 product HUAWEI K3765		0x1465	Huawei K3765
 product HUAWEI E1820		0x14ac	Huawei E1820
+product HUAWEI HWD12_RNDIS	0x14db	Huawei HWD12 RNDIS mode
 product HUAWEI E171INIT		0x14fe	Huawei E171 USB CD
-product HUAWEI E171		0x1506	Huawei E171
+product HUAWEI E392INIT		0x1505	Huawei E392 EC156 Installer
+product HUAWEI E171		0x1506	Huawei E171 / HWD12 RAS mode
 product HUAWEI E353_HiLink	0x1507	Huawei E353_HiLink
-/* Accessing http://192.168.1.1/html/switchProjectMode.html on
-   a Huawei HiLink device will switch it to u3g mode */
-product HUAWEI E353 0x1442  Huawei E353
 product HUAWEI K3765INIT	0x1520	Huawei K3765 USB CD
+product HUAWEI E3272		0x1c1e	Huawei E3272 E355 / Softbank 203HW
 product HUAWEI E353INIT		0x1f01	Huawei E353 USB CD
+product HUAWEI HWD12_INSTALLER	0x1f03	Huawei HWD12 Installer
 
 /* Huawei-3Com products */
 product HUAWEI3COM RT2573	0x0009	RT2573
@@ -2452,6 +2454,8 @@ product NETGEAR3 WPN111_NF	0x5f01	WPN111
 product NETGEAR4 RTL8188CU	0x9041	RTL8188CU
 
 /* NetIndex products */
+product NETINDEX RTWJ02		0x1022	RT-WJ02
+product NETINDEX UX312NC	0x1032	UX312NC
 product NETINDEX WS002IN	0x2001	Willcom WS002IN (DD)
 
 /* NHJ product */
@@ -2982,6 +2986,9 @@ product SIEMENS SPEEDSTREAM22	0x1022	Spe
 /* Siemens Info products */
 product SIEMENS2 WLL013		0x001b	WLL013
 product SIEMENS2 MC75		0x0034	Wireless Modules MC75
+product SIEMENS2 HC28MDMNET 0x004a  HC28 MdmNet
+product SIEMENS2 HC28MS 0x004b  HC28 Mass Storage Device
+product SIEMENS2 HC28MDM0x004c  HC28 Mdm
 product SIEMENS2 WL54G		0x3c06	54g USB Network Adapter
 
 /* Sierra Wireless products */
@@ -3546,6 +3553,8 @@ product ZTE MF628		0x0015	MF628 modem
 product ZTE MF633		0x0016	MF633 USUPA USB modem
 product ZTE MF626		0x0031	MF626 modem
 product	ZTE UMASS_INSTALLER2	0x0103	USB MSM installer 
+product ZTE MF112		0x0117	MF112 MF119 MF190 MF228 modem / Softbank 004Z
+product	ZTE UMASS_INSTALLER3	0x0149	USB MSM installer (MF288)
 product ZTE MF820D_INSTALLER	0x0166	MF820D CD
 product ZTE MF820D		0x0167	MF820D modem
 product ZTE INSTALLER		0x2000  UMTS CD



CVS commit: src/sys/dev/usb

2018-07-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 24 08:15:57 UTC 2018

Modified Files:
src/sys/dev/usb: u3g.c ugensa.c umodeswitch.c usb_quirks.c

Log Message:
- USB_VENDOR_QUALCOMM -> USB_VENDOR_LG
- USB_VENDOR_4GSYSTEMS -> USB_VENDOR_LONGCHEER


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/usb/u3g.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/usb/ugensa.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/umodeswitch.c
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/usb/usb_quirks.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/u3g.c
diff -u src/sys/dev/usb/u3g.c:1.34 src/sys/dev/usb/u3g.c:1.35
--- src/sys/dev/usb/u3g.c:1.34	Wed May 24 20:23:58 2017
+++ src/sys/dev/usb/u3g.c	Tue Jul 24 08:15:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: u3g.c,v 1.34 2017/05/24 20:23:58 christos Exp $	*/
+/*	$NetBSD: u3g.c,v 1.35 2018/07/24 08:15:57 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.34 2017/05/24 20:23:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.35 2018/07/24 08:15:57 msaitoh Exp $");
 
 #include 
 #include 
@@ -189,6 +189,8 @@ static const struct usb_devno u3g_devs[]
 	{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE },
 	{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E171 },
 	{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E353 },
+	/* LG Electronics */
+	{ USB_VENDOR_LG, USB_PRODUCT_LG_NTT_DOCOMO_L02C_MODEM },
 	/* OEM: Merlin */
 	{ USB_VENDOR_MERLIN, USB_PRODUCT_MERLIN_V620 },
 	/* OEM: Novatel */
@@ -215,8 +217,6 @@ static const struct usb_devno u3g_devs[]
 	{ USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_QUADPLUSUMTS },
 	{ USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_HSDPA },
 	{ USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GTMAXHSUPA },
-	/* OEM: Qualcomm, Inc. */
-	{ USB_VENDOR_QUALCOMM, USB_PRODUCT_QUALCOMM_NTT_DOCOMO_L02C_MODEM },
 
 	/* OEM: Sierra Wireless: */
 	{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC595U },
@@ -256,8 +256,8 @@ static const struct usb_devno u3g_devs[]
 	{ USB_VENDOR_ZTE, USB_PRODUCT_ZTE_MF820D },
 
 	/* 4G Systems */
-	{ USB_VENDOR_4GSYSTEMS, USB_PRODUCT_4GSYSTEMS_XSSTICK_P14 },
-	{ USB_VENDOR_4GSYSTEMS, USB_PRODUCT_4GSYSTEMS_XSSTICK_W14 },
+	{ USB_VENDOR_LONGCHEER, USB_PRODUCT_LONGCHEER_XSSTICK_P14 },
+	{ USB_VENDOR_LONGCHEER, USB_PRODUCT_LONGCHEER_XSSTICK_W14 },
 };
 
 /*

Index: src/sys/dev/usb/ugensa.c
diff -u src/sys/dev/usb/ugensa.c:1.35 src/sys/dev/usb/ugensa.c:1.36
--- src/sys/dev/usb/ugensa.c:1.35	Fri Nov 25 12:56:29 2016
+++ src/sys/dev/usb/ugensa.c	Tue Jul 24 08:15:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugensa.c,v 1.35 2016/11/25 12:56:29 skrll Exp $	*/
+/*	$NetBSD: ugensa.c,v 1.36 2018/07/24 08:15:57 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ugensa.c,v 1.35 2016/11/25 12:56:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugensa.c,v 1.36 2018/07/24 08:15:57 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -107,7 +107,7 @@ static const struct ugensa_type ugensa_d
 
 	{{ USB_VENDOR_ANYDATA, USB_PRODUCT_ANYDATA_ADU_500A }, UNTESTED },
 	{{ USB_VENDOR_NOVATEL2, USB_PRODUCT_NOVATEL2_EXPRESSCARD }, UNTESTED },
-	{{ USB_VENDOR_QUALCOMM, USB_PRODUCT_QUALCOMM_MSM_HSDPA }, UNTESTED },
+	{{ USB_VENDOR_LG, USB_PRODUCT_LG_MSM_HSDPA }, UNTESTED },
 	{{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD875 }, UNTESTED },
 	{{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625 }, UNTESTED },
 };

Index: src/sys/dev/usb/umodeswitch.c
diff -u src/sys/dev/usb/umodeswitch.c:1.3 src/sys/dev/usb/umodeswitch.c:1.4
--- src/sys/dev/usb/umodeswitch.c:1.3	Sat Aug  5 12:38:08 2017
+++ src/sys/dev/usb/umodeswitch.c	Tue Jul 24 08:15:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: umodeswitch.c,v 1.3 2017/08/05 12:38:08 khorben Exp $	*/
+/*	$NetBSD: umodeswitch.c,v 1.4 2018/07/24 08:15:57 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.3 2017/08/05 12:38:08 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.4 2018/07/24 08:15:57 msaitoh Exp $");
 
 #include 
 #include 
@@ -401,8 +401,8 @@ umodeswitch_match(device_t parent, cfdat
 		}
 		break;
 
-	case USB_VENDOR_QUALCOMM:
-		if (uaa->uaa_product == USB_PRODUCT_QUALCOMM_NTT_DOCOMO_L02C_STORAGE)
+	case USB_VENDOR_LG:
+		if (uaa->uaa_product == USB_PRODUCT_LG_NTT_DOCOMO_L02C_STORAGE)
 			return u3g_bulk_scsi_eject(uaa->uaa_device);
 		break;
 
@@ -431,8 +431,8 @@ umodeswitch_match(device_t parent, cfdat
 		}
 		break;
 
-	case USB_VENDOR_4GSYSTEMS:
-		if (uaa->uaa_product == USB_PRODUCT_4GSYSTEMS_XSSTICK_P14_INSTALLER)
+	case USB_VENDOR_LONGCHEER:
+		if (uaa->uaa_product == USB_PRODUCT_LONGCHEER_XSSTICK_P14_INSTALLER)
 			return u3g_4gsystems_reinit(uaa->uaa_device);
 		break;
 

Index: 

CVS commit: src/sys/dev/usb

2018-07-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 24 08:13:34 UTC 2018

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
- Vendor ID 0x0430 is not Sun Microsystems but Fujitsu Component
  (it's listed in usb.if). Same as OpenBSD.
- Add Fujitsu Component Smart Power Strip FX-5204PS, Base Station FX-5251WB
  and Virtual Eth Device From OpenBSD.
- Vendor ID 0x1004 is not Qualcomm but LG Electronics (it's listed in usb.if).
- Add Cinterion
- Rename 4GSYSTEMS to LONGCHEER. Same as other OSes.
- Add Longcheer WM66 HSDPA, Emobile D21LC Mass only mode, Emobile D21LC,
  IIJmobile 510FU and IIJmobile 510FU Mass only mode.
- Add Sierra Wireless C01SW.
- Add SMSC USB 2.0 7-Port Hub.
- Add ZTE MF633 USUPA USB modem and USB MSM installer.


To generate a diff of this commit:
cvs rdiff -u -r1.753 -r1.754 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.753 src/sys/dev/usb/usbdevs:1.754
--- src/sys/dev/usb/usbdevs:1.753	Fri Jul 20 16:36:16 2018
+++ src/sys/dev/usb/usbdevs	Tue Jul 24 08:13:34 2018
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.753 2018/07/20 16:36:16 martin Exp $
+$NetBSD: usbdevs,v 1.754 2018/07/24 08:13:34 msaitoh Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -83,7 +83,7 @@ vendor ADI		0x0422	ADI Systems
 vendor CATC		0x0423	Computer Access Technology
 vendor SMSC		0x0424	SMSC
 vendor GRAVIS		0x0428	Advanced Gravis Computer
-vendor SUN		0x0430	Sun Microsystems
+vendor FUJITSUCOMP	0x0430	Fujitsu Component
 vendor TAUGA		0x0436	Taugagreining HF
 vendor AMD		0x0438	Advanced Micro Devices
 vendor LEXMARK		0x043d	Lexmark International
@@ -459,7 +459,7 @@ vendor RIM		0x0fca	Research In Motion
 vendor DYNASTREAM	0x0fcf	Dynastream Innovations
 vendor SUNRISING	0x0fe6	SUNRISING
 vendor DVICO		0x0fe9	DViCO
-vendor QUALCOMM		0x1004	Qualcomm
+vendor LG		0x1004	LG Electronics
 vendor MOTOROLA4	0x100d	Motorola
 vendor HP3		0x103c	Hewlett Packard
 vendor GIGABYTE		0x1044	GIGABYTE
@@ -551,11 +551,12 @@ vendor QUANTA		0x1a32	Quanta
 vendor TERMINUS		0x1a40	Terminus Technology
 vendor WINCHIPHEAD2	0x1a86	QinHeng Electronics
 vendor OVISLINK		0x1b75	OvisLink
+vendor LONGCHEER	0x1c9e	Longcheer Technology
 vendor MPMAN		0x1cae	MPMan
-vendor 4GSYSTEMS	0x1c9e	4G Systems
 vendor PEGATRON		0x1d4d	Pegatron
 vendor FUTUREBITS	0x1d50	Future Bits
 vendor LINUXFOUNDATION	0x1d6b  Linux Foundation
+vendor CINTERION	0x1e2d	Cinterion
 vendor AIRTIES		0x1eda	AirTies
 vendor DLINK		0x2001	D-Link
 vendor PLANEX2		0x2019	Planex Communications
@@ -632,11 +633,6 @@ product 3COMUSR USRISDN		0x008f	3Com U.S
 product 3COMUSR HOMECONN	0x009d	3Com HomeConnect camera
 product 3COMUSR USR56K		0x3021	U.S.Robotics 56000 Voice Faxmodem Pro
 
-/* 4G Systems products */
-product 4GSYSTEMS XSSTICK_W14	0x9603	4G Systems XSStick W14
-product 4GSYSTEMS XSSTICK_P14	0x9605	4G Systems XSStick P14
-product 4GSYSTEMS XSSTICK_P14_INSTALLER	0xf000	4G Systems XSStick P14 - Windows driver
-
 /* ACDC products */
 product ACDC HUB		0x2315	USB Pen Drive HUB
 product ACDC SECWRITE		0x2316	USB Pen Drive Secure Write
@@ -1627,6 +1623,15 @@ product FUJIPHOTO MASS0100	0x0100	Mass S
 /* Fujitsu protducts */
 product FUJITSU AH_F401U	0x105b	AH-F401U Air H device
 
+/* Fujitsu Component products */
+product FUJITSUCOMP KEYBOARD6	0x0005	Type 6 Keyboard
+product FUJITSUCOMP KEYBOARD7	0x00a2	Type 7 Keyboard
+/* XXX The above is a North American PC style keyboard possibly */
+product FUJITSUCOMP MOUSE	0x0100	Type 6 Mouse
+product FUJITSUCOMP FX5204PS	0x0423	Smart Power Strip FX-5204PS
+product FUJITSUCOMP FX5251WB	0x042a	Base Station FX-5251WB
+product FUJITSUCOMP VIRTETH	0xa4a2	Virtual Eth Device
+
 /* Fujitsu Siemens Computers products */
 product FSC E5400		0x1009	PrismGT USB 2.0 WLAN
 
@@ -2056,6 +2061,14 @@ product LEXAR MCR		0xb018	Multi-Card Rea
 /* Lexmark products */
 product LEXMARK S2450		0x0009	Optra S 2450
 
+/* LG Electronics products */
+product LG CDMA_MSM		0x6000	CDMA Technologies MSM phone
+product LG NTT_DOCOMO_L05A_MODEM	0x6124	NTT DOCOMO L-05A
+product LG NTT_DOCOMO_L05A_STORAGE	0x613a	NTT DOCOMO L-05A
+product LG NTT_DOCOMO_L02C_MODEM	0x618f	NTT DOCOMO L-02C
+product LG NTT_DOCOMO_L02C_STORAGE	0x61dd	NTT DOCOMO L-02C
+product LG MSM_HSDPA		0x6613	HSDPA MSM
+
 /* Linksys products */
 product LINKSYS MAUSB2		0x0105	Camedia MAUSB-2
 product LINKSYS USB10TX1	0x200c	USB10TX
@@ -2137,6 +2150,16 @@ product LOGITECH MX700		0xc506	Cordless 
 product LOGITECH CBT44		0xc517	C-BT44 Receiver
 product LOGITECH QUICKCAMPRO2	0xd001	QuickCam Pro
 
+/* Longcheer products */
+product LONGCHEER WM66		0x6061	Longcheer WM66 HSDPA
+product LONGCHEER D21LCMASS	0x9401	Emobile D21LC Mass only mode
+product LONGCHEER D21LC		0x9404	Emobile D21LC
+product LONGCHEER XSSTICK_W14	0x9603	4G Systems XSStick W14
+product LONGCHEER XSSTICK_P14	0x9605	4G Systems XSStick P14

CVS commit: src/doc

2018-07-24 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 24 07:59:46 UTC 2018

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-7.0.7


To generate a diff of this commit:
cvs rdiff -u -r1.1532 -r1.1533 src/doc/3RDPARTY
cvs rdiff -u -r1.2413 -r1.2414 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1532 src/doc/3RDPARTY:1.1533
--- src/doc/3RDPARTY:1.1532	Tue Jul 17 19:11:47 2018
+++ src/doc/3RDPARTY	Tue Jul 24 07:59:46 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1532 2018/07/17 19:11:47 joerg Exp $
+#	$NetBSD: 3RDPARTY,v 1.1533 2018/07/24 07:59:46 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -334,8 +334,8 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	7.0.6
-Current Vers:	7.0.6
+Version:	7.0.7
+Current Vers:	7.0.7
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2413 src/doc/CHANGES:1.2414
--- src/doc/CHANGES:1.2413	Sat Jul 21 06:28:02 2018
+++ src/doc/CHANGES	Tue Jul 24 07:59:46 2018
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2413 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2414 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -180,3 +180,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 		[jmcneill 20180715]
 	arm: Add support for ARMv7 performance event monitoring with tprof(4).
 		[jmcneill 20180715]
+	dhcpcd: Import 7.0.7. [roy 20180724]



CVS import: src/external/bsd/dhcpcd/dist

2018-07-24 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 24 07:58:32 UTC 2018

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv23307

Log Message:
Import dhcpcd-7.0.7 with the following changes:
  *  host routes work correctly again
  *  vlanid is also used to calculate slaac stable private addresses

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-7-0-7

U src/external/bsd/dhcpcd/dist/.arcconfig
U src/external/bsd/dhcpcd/dist/.gitignore
U src/external/bsd/dhcpcd/dist/BUILDING.md
U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/Makefile
U src/external/bsd/dhcpcd/dist/Makefile.inc
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/config-null.mk
U src/external/bsd/dhcpcd/dist/configure
U src/external/bsd/dhcpcd/dist/iconfig.mk
U src/external/bsd/dhcpcd/dist/compat/_strtoi.h
U src/external/bsd/dhcpcd/dist/compat/arc4random.c
U src/external/bsd/dhcpcd/dist/compat/arc4random.h
U src/external/bsd/dhcpcd/dist/compat/bitops.h
U src/external/bsd/dhcpcd/dist/compat/queue.h
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c
U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.c
U src/external/bsd/dhcpcd/dist/compat/dprintf.h
U src/external/bsd/dhcpcd/dist/compat/endian.h
U src/external/bsd/dhcpcd/dist/compat/pidfile.c
U src/external/bsd/dhcpcd/dist/compat/pidfile.h
U src/external/bsd/dhcpcd/dist/compat/reallocarray.h
U src/external/bsd/dhcpcd/dist/compat/strlcpy.c
U src/external/bsd/dhcpcd/dist/compat/strlcpy.h
U src/external/bsd/dhcpcd/dist/compat/strtoi.c
U src/external/bsd/dhcpcd/dist/compat/strtoi.h
U src/external/bsd/dhcpcd/dist/compat/strtou.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c
U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c
U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c
U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h
U src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/GNUmakefile
U src/external/bsd/dhcpcd/dist/src/Makefile
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/auth.h
U src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.c
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/dev.c
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
U src/external/bsd/dhcpcd/dist/src/dhcp.h
U src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
U src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/src/genembedc
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c
U src/external/bsd/dhcpcd/dist/src/genembedh
U src/external/bsd/dhcpcd/dist/src/if-bsd.c
U src/external/bsd/dhcpcd/dist/src/if-linux.c
U src/external/bsd/dhcpcd/dist/src/if-options.c
U src/external/bsd/dhcpcd/dist/src/if-options.h
U src/external/bsd/dhcpcd/dist/src/if-sun.c
U src/external/bsd/dhcpcd/dist/src/if.c
U src/external/bsd/dhcpcd/dist/src/if.h
U src/external/bsd/dhcpcd/dist/src/ipv4.c
U src/external/bsd/dhcpcd/dist/src/ipv4.h
U src/external/bsd/dhcpcd/dist/src/ipv4ll.c
U src/external/bsd/dhcpcd/dist/src/ipv4ll.h
U src/external/bsd/dhcpcd/dist/src/ipv6.c
U src/external/bsd/dhcpcd/dist/src/ipv6.h
U src/external/bsd/dhcpcd/dist/src/ipv6nd.c
U src/external/bsd/dhcpcd/dist/src/ipv6nd.h
U src/external/bsd/dhcpcd/dist/src/logerr.c
U src/external/bsd/dhcpcd/dist/src/logerr.h
U src/external/bsd/dhcpcd/dist/src/route.c
U src/external/bsd/dhcpcd/dist/src/route.h
U src/external/bsd/dhcpcd/dist/src/sa.c
U src/external/bsd/dhcpcd/dist/src/sa.h
U src/external/bsd/dhcpcd/dist/src/script.c
U src/external/bsd/dhcpcd/dist/src/script.h
U src/external/bsd/dhcpcd/dist/src/dev/Makefile
U src/external/bsd/dhcpcd/dist/src/dev/udev.c
U src/external/bsd/dhcpcd/dist/hooks/15-timezone
U src/external/bsd/dhcpcd/dist/hooks/01-test
U