CVS commit: src/tests/bin/sh

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 10 05:57:43 UTC 2019

Modified Files:
src/tests/bin/sh: t_patterns.sh

Log Message:
Make sure we have enough free inodes before running the filename_expansion
test.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_patterns.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/bin/sh/t_patterns.sh
diff -u src/tests/bin/sh/t_patterns.sh:1.4 src/tests/bin/sh/t_patterns.sh:1.5
--- src/tests/bin/sh/t_patterns.sh:1.4	Sun Nov 18 13:41:24 2018
+++ src/tests/bin/sh/t_patterns.sh	Wed Jul 10 05:57:43 2019
@@ -1,4 +1,4 @@
-# $NetBSD: t_patterns.sh,v 1.4 2018/11/18 13:41:24 kre Exp $
+# $NetBSD: t_patterns.sh,v 1.5 2019/07/10 05:57:43 martin Exp $
 #
 # Copyright (c) 2018 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -182,6 +182,8 @@ filename_expansion_body() {
 	atf_require_prog mv
 	atf_require_prog rm
 	atf_require_prog mkdir
+	atf_require_prog df
+	atf_require_prog awk
 
 	reset filename_expansion
 
@@ -194,6 +196,11 @@ filename_expansion_body() {
 	# save inodes, but would require running "ln" many times, so
 	# would be a lot slower.
 
+	free_inodes=$( df -i . | awk '/^Filesystem/{next}; { print $7 }' )
+	if [ $free_inodes -lt 17000 ]; then
+		atf_skip "not enough space"
+	fi
+
 	# This should work on a case insensitive, but preserving,
 	# filesystem - but case sensitive filesystems are preferred.
 



CVS commit: src/tests/bin/sh

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 10 05:57:43 UTC 2019

Modified Files:
src/tests/bin/sh: t_patterns.sh

Log Message:
Make sure we have enough free inodes before running the filename_expansion
test.


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

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



CVS commit: src/distrib/sets/lists

2019-07-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jul  9 22:17:34 UTC 2019

Modified Files:
src/distrib/sets/lists/xbase: shl.mi
src/distrib/sets/lists/xcomp: mi
src/distrib/sets/lists/xdebug: shl.mi

Log Message:
update for libepoxy 1.4.3.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/distrib/sets/lists/xbase/shl.mi
cvs rdiff -u -r1.208 -r1.209 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.50 -r1.51 src/distrib/sets/lists/xdebug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/xbase/shl.mi
diff -u src/distrib/sets/lists/xbase/shl.mi:1.85 src/distrib/sets/lists/xbase/shl.mi:1.86
--- src/distrib/sets/lists/xbase/shl.mi:1.85	Thu Jun 20 12:09:28 2019
+++ src/distrib/sets/lists/xbase/shl.mi	Tue Jul  9 22:17:33 2019
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.85 2019/06/20 12:09:28 uki Exp $
+# $NetBSD: shl.mi,v 1.86 2019/07/09 22:17:33 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -172,7 +172,7 @@
 ./usr/X11R7/lib/libdrm_radeon.so.0.0		-unknown-		xorg,compatx11file
 ./usr/X11R7/lib/libepoxy.so			-unknown-		xorg,compatx11file
 ./usr/X11R7/lib/libepoxy.so.0			-unknown-		xorg,compatx11file
-./usr/X11R7/lib/libepoxy.so.0.0			-unknown-		xorg,compatx11file
+./usr/X11R7/lib/libepoxy.so.0.1			-unknown-		xorg,compatx11file
 ./usr/X11R7/lib/libexpat.so			xbase-obsolete		obsolete
 ./usr/X11R7/lib/libexpat.so.2			xbase-obsolete		obsolete
 ./usr/X11R7/lib/libexpat.so.2.0			xbase-obsolete		obsolete

Index: src/distrib/sets/lists/xcomp/mi
diff -u src/distrib/sets/lists/xcomp/mi:1.208 src/distrib/sets/lists/xcomp/mi:1.209
--- src/distrib/sets/lists/xcomp/mi:1.208	Tue Apr 16 21:20:51 2019
+++ src/distrib/sets/lists/xcomp/mi	Tue Jul  9 22:17:33 2019
@@ -1,4 +1,4 @@
-#	 $NetBSD: mi,v 1.208 2019/04/16 21:20:51 mrg Exp $
+#	 $NetBSD: mi,v 1.209 2019/07/09 22:17:33 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -547,6 +547,7 @@
 ./usr/X11R7/include/drm/via_3d_reg.h			-unknown-	obsolete
 ./usr/X11R7/include/drm/via_drm.h			-unknown-	obsolete
 ./usr/X11R7/include/drm/xgi_drm.h			-unknown-	obsolete
+./usr/X11R7/include/epoxy/common.h			-unknown-	xorg
 ./usr/X11R7/include/epoxy/egl.h-unknown-	xorg
 ./usr/X11R7/include/epoxy/egl_generated.h		-unknown-	xorg
 ./usr/X11R7/include/epoxy/gl.h-unknown-	xorg

Index: src/distrib/sets/lists/xdebug/shl.mi
diff -u src/distrib/sets/lists/xdebug/shl.mi:1.50 src/distrib/sets/lists/xdebug/shl.mi:1.51
--- src/distrib/sets/lists/xdebug/shl.mi:1.50	Thu Jun 13 19:37:36 2019
+++ src/distrib/sets/lists/xdebug/shl.mi	Tue Jul  9 22:17:34 2019
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.50 2019/06/13 19:37:36 christos Exp $
+# $NetBSD: shl.mi,v 1.51 2019/07/09 22:17:34 mrg Exp $
 ./usr/libdata/debug/usr/X11R7/lib	-unknown-		xorg,debug,compatx11dir
 ./usr/libdata/debug/usr/X11R7/lib/X11/locale/lib/common/libximcp.so.2.0.debug	xorg,obsolete		xorg,obsolete
 ./usr/libdata/debug/usr/X11R7/lib/X11/locale/lib/common/libxlcDef.so.2.0.debug	xorg,obsolete		xorg,obsolete
@@ -58,7 +58,7 @@
 ./usr/libdata/debug/usr/X11R7/lib/libXxf86vm.so.2.0.debug	-unknown-		xorg,debug,compatx11file
 ./usr/libdata/debug/usr/X11R7/lib/libdrm.so.3.4.debug	-unknown-		xorg,debug,compatx11file
 ./usr/libdata/debug/usr/X11R7/lib/libdrm_radeon.so.0.0.debug	-unknown-		xorg,debug,compatx11file
-./usr/libdata/debug/usr/X11R7/lib/libepoxy.so.0.0.debug	-unknown-		xorg,debug,compatx11file
+./usr/libdata/debug/usr/X11R7/lib/libepoxy.so.0.1.debug	-unknown-		xorg,debug,compatx11file
 ./usr/libdata/debug/usr/X11R7/lib/libexpat.so.2.0.debug	xdebug-obsolete		xorg,obsolete,compatx11file
 ./usr/libdata/debug/usr/X11R7/lib/libfontconfig.so.2.3.debug	-unknown-		xorg,debug,compatx11file
 ./usr/libdata/debug/usr/X11R7/lib/libfontenc.so.2.0.debug	-unknown-		xorg,debug,compatx11file



CVS commit: src/distrib/sets/lists

2019-07-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jul  9 22:17:34 UTC 2019

Modified Files:
src/distrib/sets/lists/xbase: shl.mi
src/distrib/sets/lists/xcomp: mi
src/distrib/sets/lists/xdebug: shl.mi

Log Message:
update for libepoxy 1.4.3.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/distrib/sets/lists/xbase/shl.mi
cvs rdiff -u -r1.208 -r1.209 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.50 -r1.51 src/distrib/sets/lists/xdebug/shl.mi

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



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

2019-07-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jul  9 22:12:40 UTC 2019

Modified Files:
src/external/mit/xorg/lib/libepoxy: Makefile shlib_version

Log Message:
updates for libepoxy 1.4.3.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libepoxy/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/mit/xorg/lib/libepoxy/shlib_version

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

Modified files:

Index: src/external/mit/xorg/lib/libepoxy/Makefile
diff -u src/external/mit/xorg/lib/libepoxy/Makefile:1.4 src/external/mit/xorg/lib/libepoxy/Makefile:1.5
--- src/external/mit/xorg/lib/libepoxy/Makefile:1.4	Thu Apr 18 10:10:33 2019
+++ src/external/mit/xorg/lib/libepoxy/Makefile	Tue Jul  9 22:12:40 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2019/04/18 10:10:33 mrg Exp $
+#	$NetBSD: Makefile,v 1.5 2019/07/09 22:12:40 mrg Exp $
 
 .include 
 
@@ -22,11 +22,13 @@ CPPFLAGS+=	-DPLATFORM_HAS_EGL=1
 
 INCSDIR=${X11INCDIR}/epoxy
 INCS= \
+	common.h \
 	gl.h gl_generated.h \
 	glx.h glx_generated.h \
 	egl.h egl_generated.h
 
 CPPFLAGS+=	-I${X11SRCDIR.${LIB}}/src
+CPPFLAGS+=	-I${X11SRCDIR.${LIB}}/../include
 CPPFLAGS+=	${X11FLAGS.CONNECTION}
 
 PKGCONFIG=	epoxy

Index: src/external/mit/xorg/lib/libepoxy/shlib_version
diff -u src/external/mit/xorg/lib/libepoxy/shlib_version:1.1 src/external/mit/xorg/lib/libepoxy/shlib_version:1.2
--- src/external/mit/xorg/lib/libepoxy/shlib_version:1.1	Thu Aug 18 07:44:32 2016
+++ src/external/mit/xorg/lib/libepoxy/shlib_version	Tue Jul  9 22:12:40 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: shlib_version,v 1.1 2016/08/18 07:44:32 mrg Exp $
+#	$NetBSD: shlib_version,v 1.2 2019/07/09 22:12:40 mrg Exp $
 #
 major=0
-minor=0
+minor=1



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

2019-07-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jul  9 22:12:40 UTC 2019

Modified Files:
src/external/mit/xorg/lib/libepoxy: Makefile shlib_version

Log Message:
updates for libepoxy 1.4.3.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libepoxy/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/mit/xorg/lib/libepoxy/shlib_version

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



CVS commit: xsrc/external/mit/libepoxy

2019-07-09 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Jul  9 22:12:26 UTC 2019

Modified Files:
xsrc/external/mit/libepoxy/dist/src: dispatch_common.h
xsrc/external/mit/libepoxy/src: egl_generated.h
egl_generated_dispatch.c gl_generated.h gl_generated_dispatch.c
glx_generated.h glx_generated_dispatch.c
Added Files:
xsrc/external/mit/libepoxy/include: config.h

Log Message:
merge and update for libepoxy 1.4.3.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/libepoxy/dist/src/dispatch_common.h
cvs rdiff -u -r0 -r1.1 xsrc/external/mit/libepoxy/include/config.h
cvs rdiff -u -r1.1 -r1.2 xsrc/external/mit/libepoxy/src/egl_generated.h \
xsrc/external/mit/libepoxy/src/gl_generated.h \
xsrc/external/mit/libepoxy/src/glx_generated.h
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/libepoxy/src/egl_generated_dispatch.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/libepoxy/src/gl_generated_dispatch.c \
xsrc/external/mit/libepoxy/src/glx_generated_dispatch.c

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



CVS commit: xsrc/external/mit/libepoxy

2019-07-09 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Jul  9 22:12:26 UTC 2019

Modified Files:
xsrc/external/mit/libepoxy/dist/src: dispatch_common.h
xsrc/external/mit/libepoxy/src: egl_generated.h
egl_generated_dispatch.c gl_generated.h gl_generated_dispatch.c
glx_generated.h glx_generated_dispatch.c
Added Files:
xsrc/external/mit/libepoxy/include: config.h

Log Message:
merge and update for libepoxy 1.4.3.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/libepoxy/dist/src/dispatch_common.h
cvs rdiff -u -r0 -r1.1 xsrc/external/mit/libepoxy/include/config.h
cvs rdiff -u -r1.1 -r1.2 xsrc/external/mit/libepoxy/src/egl_generated.h \
xsrc/external/mit/libepoxy/src/gl_generated.h \
xsrc/external/mit/libepoxy/src/glx_generated.h
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/libepoxy/src/egl_generated_dispatch.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/libepoxy/src/gl_generated_dispatch.c \
xsrc/external/mit/libepoxy/src/glx_generated_dispatch.c

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

diffs are larger than 1MB and have been omitted


CVS commit: xsrc/external/mit/libepoxy/dist/src

2019-07-09 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Jul  9 21:55:21 UTC 2019

Modified Files:
xsrc/external/mit/libepoxy/dist/src: dispatch_common.c
dispatch_common.h

Log Message:
merge libepoxy 1.4.3.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/libepoxy/dist/src/dispatch_common.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/libepoxy/dist/src/dispatch_common.h

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

Modified files:

Index: xsrc/external/mit/libepoxy/dist/src/dispatch_common.c
diff -u xsrc/external/mit/libepoxy/dist/src/dispatch_common.c:1.3 xsrc/external/mit/libepoxy/dist/src/dispatch_common.c:1.4
--- xsrc/external/mit/libepoxy/dist/src/dispatch_common.c:1.3	Fri Aug 19 11:56:56 2016
+++ xsrc/external/mit/libepoxy/dist/src/dispatch_common.c	Tue Jul  9 21:55:21 2019
@@ -22,9 +22,80 @@
  */
 
 /**
+ * \mainpage Epoxy
+ *
+ * \section intro_sec Introduction
+ *
+ * Epoxy is a library for handling OpenGL function pointer management for
+ * you.
+ *
+ * It hides the complexity of `dlopen()`, `dlsym()`, `glXGetProcAddress()`,
+ * `eglGetProcAddress()`, etc. from the app developer, with very little
+ * knowledge needed on their part.  They get to read GL specs and write
+ * code using undecorated function names like `glCompileShader()`.
+ *
+ * Don't forget to check for your extensions or versions being present
+ * before you use them, just like before!  We'll tell you what you forgot
+ * to check for instead of just segfaulting, though.
+ *
+ * \section features_sec Features
+ *
+ *   - Automatically initializes as new GL functions are used.
+ *   - GL 4.4 core and compatibility context support.
+ *   - GLES 1/2/3 context support.
+ *   - Knows about function aliases so (e.g.) `glBufferData()` can be
+ * used with `GL_ARB_vertex_buffer_object` implementations, along
+ * with GL 1.5+ implementations.
+ *   - EGL, GLX, and WGL support.
+ *   - Can be mixed with non-epoxy GL usage.
+ *
+ * \section using_sec Using Epoxy
+ *
+ * Using Epoxy should be as easy as replacing:
+ *
+ * ```cpp
+ * #include 
+ * #include 
+ * #include 
+ * ```
+ *
+ * with:
+ *
+ * ```cpp
+ * #include 
+ * #include 
+ * ```
+ *
+ * \subsection using_include_sec Headers
+ *
+ * Epoxy comes with the following public headers:
+ *
+ *  - `epoxy/gl.h`  - For GL API
+ *  - `epoxy/egl.h` - For EGL API
+ *  - `epoxy/glx.h` - For GLX API
+ *  - `epoxy/wgl.h` - For WGL API
+ *
+ * \section links_sec Additional links
+ *
+ * The latest version of the Epoxy code is available on [GitHub](https://github.com/anholt/libepoxy).
+ *
+ * For bug reports and enhancements, please use the [Issues](https://github.com/anholt/libepoxy/issues)
+ * link.
+ *
+ * The scope of this API reference does not include the documentation for
+ * OpenGL and OpenGL ES. For more information on those programming interfaces
+ * please visit:
+ *
+ *  - [Khronos](https://www.khronos.org/)
+ *  - [OpenGL page on Khronos.org](https://www.khronos.org/opengl/)
+ *  - [OpenGL ES page on Khronos.org](https://www.khronos.org/opengles/)
+ *  - [docs.GL](http://docs.gl/)
+ */
+
+/**
  * @file dispatch_common.c
  *
- * Implements common code shared by the generated GL/EGL/GLX dispatch code.
+ * @brief Implements common code shared by the generated GL/EGL/GLX dispatch code.
  *
  * A collection of some important specs on getting GL function pointers.
  *
@@ -118,6 +189,10 @@
 #define EGL_LIB "libEGL.so"
 #define GLES1_LIB "libGLESv1_CM.so"
 #define GLES2_LIB "libGLESv2.so"
+#elif defined _WIN32
+#define EGL_LIB "libEGL.dll"
+#define GLES1_LIB "libGLES_CM.dll"
+#define GLES2_LIB "libGLESv2.dll"
 #else
 #define EGL_LIB "libEGL.so.1"
 #define GLES1_LIB "libGLESv1_CM.so.1"
@@ -149,32 +224,32 @@
 
 struct api {
 #ifndef _WIN32
-/**
+/*
  * Locking for making sure we don't double-dlopen().
  */
 pthread_mutex_t mutex;
 #endif
 
-/** dlopen() return value for libGL.so.1. */
+/* dlopen() return value for libGL.so.1. */
 void *glx_handle;
 
-/**
+/*
  * dlopen() return value for OS X's GL library.
  *
  * On linux, glx_handle is used instead.
  */
 void *gl_handle;
 
-/** dlopen() return value for libEGL.so.1 */
+/* dlopen() return value for libEGL.so.1 */
 void *egl_handle;
 
-/** dlopen() return value for libGLESv1_CM.so.1 */
+/* dlopen() return value for libGLESv1_CM.so.1 */
 void *gles1_handle;
 
-/** dlopen() return value for libGLESv2.so.2 */
+/* dlopen() return value for libGLESv2.so.2 */
 void *gles2_handle;
 
-/**
+/*
  * This value gets incremented when any thread is in
  * glBegin()/glEnd() called through epoxy.
  *
@@ -272,7 +347,12 @@ do_dlsym(void **handle, const char *lib_
 return result;
 }
 
-PUBLIC bool
+/**
+ * @brief Checks whether we're using OpenGL or OpenGL ES
+ *
+ * @return `true` if we're using OpenGL
+ 

CVS commit: xsrc/external/mit/libepoxy/dist/src

2019-07-09 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Jul  9 21:55:21 UTC 2019

Modified Files:
xsrc/external/mit/libepoxy/dist/src: dispatch_common.c
dispatch_common.h

Log Message:
merge libepoxy 1.4.3.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/libepoxy/dist/src/dispatch_common.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/libepoxy/dist/src/dispatch_common.h

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



CVS import: xsrc/external/mit/libepoxy/dist

2019-07-09 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Jul  9 21:37:38 UTC 2019

Update of /cvsroot/xsrc/external/mit/libepoxy/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv4315

Log Message:
initial import of libepoxy-1.4.3

Status:

Vendor Tag: xorg
Release Tags:   libepoxy-1-4-3

N xsrc/external/mit/libepoxy/dist/.appveyor.yml
U xsrc/external/mit/libepoxy/dist/.dir-locals.el
N xsrc/external/mit/libepoxy/dist/.editorconfig
U xsrc/external/mit/libepoxy/dist/.gitignore
U xsrc/external/mit/libepoxy/dist/.travis.yml
U xsrc/external/mit/libepoxy/dist/COPYING
U xsrc/external/mit/libepoxy/dist/Makefile.am
U xsrc/external/mit/libepoxy/dist/README.md
U xsrc/external/mit/libepoxy/dist/autogen.sh
U xsrc/external/mit/libepoxy/dist/configure.ac
U xsrc/external/mit/libepoxy/dist/epoxy.pc.in
N xsrc/external/mit/libepoxy/dist/meson.build
N xsrc/external/mit/libepoxy/dist/meson_options.txt
N xsrc/external/mit/libepoxy/dist/cross/fedora-mingw64.txt
N xsrc/external/mit/libepoxy/dist/doc/Doxyfile.in
N xsrc/external/mit/libepoxy/dist/doc/meson.build
U xsrc/external/mit/libepoxy/dist/include/epoxy/Makefile.am
N xsrc/external/mit/libepoxy/dist/include/epoxy/common.h
U xsrc/external/mit/libepoxy/dist/include/epoxy/egl.h
U xsrc/external/mit/libepoxy/dist/include/epoxy/gl.h
U xsrc/external/mit/libepoxy/dist/include/epoxy/glx.h
N xsrc/external/mit/libepoxy/dist/include/epoxy/meson.build
U xsrc/external/mit/libepoxy/dist/include/epoxy/wgl.h
N xsrc/external/mit/libepoxy/dist/registry/README.md
U xsrc/external/mit/libepoxy/dist/registry/egl.xml
U xsrc/external/mit/libepoxy/dist/registry/gl.xml
U xsrc/external/mit/libepoxy/dist/registry/glx.xml
U xsrc/external/mit/libepoxy/dist/registry/wgl.xml
U xsrc/external/mit/libepoxy/dist/src/Makefile.am
C xsrc/external/mit/libepoxy/dist/src/dispatch_common.c
C xsrc/external/mit/libepoxy/dist/src/dispatch_common.h
U xsrc/external/mit/libepoxy/dist/src/dispatch_egl.c
U xsrc/external/mit/libepoxy/dist/src/dispatch_glx.c
U xsrc/external/mit/libepoxy/dist/src/dispatch_wgl.c
U xsrc/external/mit/libepoxy/dist/src/gen_dispatch.py
N xsrc/external/mit/libepoxy/dist/src/meson.build
U xsrc/external/mit/libepoxy/dist/test/.gitignore
U xsrc/external/mit/libepoxy/dist/test/Makefile.am
U xsrc/external/mit/libepoxy/dist/test/dlwrap.c
U xsrc/external/mit/libepoxy/dist/test/dlwrap.h
U xsrc/external/mit/libepoxy/dist/test/egl_and_glx_different_pointers.c
U xsrc/external/mit/libepoxy/dist/test/egl_common.c
U xsrc/external/mit/libepoxy/dist/test/egl_common.h
U xsrc/external/mit/libepoxy/dist/test/egl_gl.c
U xsrc/external/mit/libepoxy/dist/test/egl_has_extension_nocontext.c
U xsrc/external/mit/libepoxy/dist/test/egl_without_glx.c
U xsrc/external/mit/libepoxy/dist/test/glx_alias_prefer_same_name.c
U xsrc/external/mit/libepoxy/dist/test/glx_beginend.c
U xsrc/external/mit/libepoxy/dist/test/glx_common.c
U xsrc/external/mit/libepoxy/dist/test/glx_common.h
U xsrc/external/mit/libepoxy/dist/test/glx_gles2.c
U xsrc/external/mit/libepoxy/dist/test/glx_glxgetprocaddress_nocontext.c
U xsrc/external/mit/libepoxy/dist/test/glx_has_extension_nocontext.c
U xsrc/external/mit/libepoxy/dist/test/glx_public_api.c
U xsrc/external/mit/libepoxy/dist/test/glx_public_api_core.c
U xsrc/external/mit/libepoxy/dist/test/glx_static.c
U xsrc/external/mit/libepoxy/dist/test/headerguards.c
U xsrc/external/mit/libepoxy/dist/test/khronos_typedefs.c
U xsrc/external/mit/libepoxy/dist/test/khronos_typedefs.h
U xsrc/external/mit/libepoxy/dist/test/khronos_typedefs_nonepoxy.c
N xsrc/external/mit/libepoxy/dist/test/meson.build
U xsrc/external/mit/libepoxy/dist/test/miscdefines.c
U xsrc/external/mit/libepoxy/dist/test/wgl_common.c
U xsrc/external/mit/libepoxy/dist/test/wgl_common.h
U xsrc/external/mit/libepoxy/dist/test/wgl_core_and_exts.c
U xsrc/external/mit/libepoxy/dist/test/wgl_per_context_funcptrs.c
U xsrc/external/mit/libepoxy/dist/test/wgl_usefontbitmaps.c

2 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jxorg:yesterday -jxorg xsrc/external/mit/libepoxy/dist



CVS import: xsrc/external/mit/libepoxy/dist

2019-07-09 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Jul  9 21:37:38 UTC 2019

Update of /cvsroot/xsrc/external/mit/libepoxy/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv4315

Log Message:
initial import of libepoxy-1.4.3

Status:

Vendor Tag: xorg
Release Tags:   libepoxy-1-4-3

N xsrc/external/mit/libepoxy/dist/.appveyor.yml
U xsrc/external/mit/libepoxy/dist/.dir-locals.el
N xsrc/external/mit/libepoxy/dist/.editorconfig
U xsrc/external/mit/libepoxy/dist/.gitignore
U xsrc/external/mit/libepoxy/dist/.travis.yml
U xsrc/external/mit/libepoxy/dist/COPYING
U xsrc/external/mit/libepoxy/dist/Makefile.am
U xsrc/external/mit/libepoxy/dist/README.md
U xsrc/external/mit/libepoxy/dist/autogen.sh
U xsrc/external/mit/libepoxy/dist/configure.ac
U xsrc/external/mit/libepoxy/dist/epoxy.pc.in
N xsrc/external/mit/libepoxy/dist/meson.build
N xsrc/external/mit/libepoxy/dist/meson_options.txt
N xsrc/external/mit/libepoxy/dist/cross/fedora-mingw64.txt
N xsrc/external/mit/libepoxy/dist/doc/Doxyfile.in
N xsrc/external/mit/libepoxy/dist/doc/meson.build
U xsrc/external/mit/libepoxy/dist/include/epoxy/Makefile.am
N xsrc/external/mit/libepoxy/dist/include/epoxy/common.h
U xsrc/external/mit/libepoxy/dist/include/epoxy/egl.h
U xsrc/external/mit/libepoxy/dist/include/epoxy/gl.h
U xsrc/external/mit/libepoxy/dist/include/epoxy/glx.h
N xsrc/external/mit/libepoxy/dist/include/epoxy/meson.build
U xsrc/external/mit/libepoxy/dist/include/epoxy/wgl.h
N xsrc/external/mit/libepoxy/dist/registry/README.md
U xsrc/external/mit/libepoxy/dist/registry/egl.xml
U xsrc/external/mit/libepoxy/dist/registry/gl.xml
U xsrc/external/mit/libepoxy/dist/registry/glx.xml
U xsrc/external/mit/libepoxy/dist/registry/wgl.xml
U xsrc/external/mit/libepoxy/dist/src/Makefile.am
C xsrc/external/mit/libepoxy/dist/src/dispatch_common.c
C xsrc/external/mit/libepoxy/dist/src/dispatch_common.h
U xsrc/external/mit/libepoxy/dist/src/dispatch_egl.c
U xsrc/external/mit/libepoxy/dist/src/dispatch_glx.c
U xsrc/external/mit/libepoxy/dist/src/dispatch_wgl.c
U xsrc/external/mit/libepoxy/dist/src/gen_dispatch.py
N xsrc/external/mit/libepoxy/dist/src/meson.build
U xsrc/external/mit/libepoxy/dist/test/.gitignore
U xsrc/external/mit/libepoxy/dist/test/Makefile.am
U xsrc/external/mit/libepoxy/dist/test/dlwrap.c
U xsrc/external/mit/libepoxy/dist/test/dlwrap.h
U xsrc/external/mit/libepoxy/dist/test/egl_and_glx_different_pointers.c
U xsrc/external/mit/libepoxy/dist/test/egl_common.c
U xsrc/external/mit/libepoxy/dist/test/egl_common.h
U xsrc/external/mit/libepoxy/dist/test/egl_gl.c
U xsrc/external/mit/libepoxy/dist/test/egl_has_extension_nocontext.c
U xsrc/external/mit/libepoxy/dist/test/egl_without_glx.c
U xsrc/external/mit/libepoxy/dist/test/glx_alias_prefer_same_name.c
U xsrc/external/mit/libepoxy/dist/test/glx_beginend.c
U xsrc/external/mit/libepoxy/dist/test/glx_common.c
U xsrc/external/mit/libepoxy/dist/test/glx_common.h
U xsrc/external/mit/libepoxy/dist/test/glx_gles2.c
U xsrc/external/mit/libepoxy/dist/test/glx_glxgetprocaddress_nocontext.c
U xsrc/external/mit/libepoxy/dist/test/glx_has_extension_nocontext.c
U xsrc/external/mit/libepoxy/dist/test/glx_public_api.c
U xsrc/external/mit/libepoxy/dist/test/glx_public_api_core.c
U xsrc/external/mit/libepoxy/dist/test/glx_static.c
U xsrc/external/mit/libepoxy/dist/test/headerguards.c
U xsrc/external/mit/libepoxy/dist/test/khronos_typedefs.c
U xsrc/external/mit/libepoxy/dist/test/khronos_typedefs.h
U xsrc/external/mit/libepoxy/dist/test/khronos_typedefs_nonepoxy.c
N xsrc/external/mit/libepoxy/dist/test/meson.build
U xsrc/external/mit/libepoxy/dist/test/miscdefines.c
U xsrc/external/mit/libepoxy/dist/test/wgl_common.c
U xsrc/external/mit/libepoxy/dist/test/wgl_common.h
U xsrc/external/mit/libepoxy/dist/test/wgl_core_and_exts.c
U xsrc/external/mit/libepoxy/dist/test/wgl_per_context_funcptrs.c
U xsrc/external/mit/libepoxy/dist/test/wgl_usefontbitmaps.c

2 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jxorg:yesterday -jxorg xsrc/external/mit/libepoxy/dist



CVS commit: src/sys/dev/dkwedge

2019-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul  9 17:06:46 UTC 2019

Modified Files:
src/sys/dev/dkwedge: dkwedge_apple.c dkwedge_bsdlabel.c dkwedge_gpt.c
dkwedge_mbr.c dkwedge_rdb.c

Log Message:
Fix info leak: always clear 'dkw', because some of its (otherwise
uninitialized) fields can be copied to userland, typically in the
DIOCGWEDGEINFO ioctl.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/dkwedge/dkwedge_apple.c \
src/sys/dev/dkwedge/dkwedge_rdb.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/dkwedge/dkwedge_bsdlabel.c \
src/sys/dev/dkwedge/dkwedge_gpt.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/dkwedge/dkwedge_mbr.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/dkwedge/dkwedge_apple.c
diff -u src/sys/dev/dkwedge/dkwedge_apple.c:1.4 src/sys/dev/dkwedge/dkwedge_apple.c:1.5
--- src/sys/dev/dkwedge/dkwedge_apple.c:1.4	Sat Jul  6 05:41:23 2019
+++ src/sys/dev/dkwedge/dkwedge_apple.c	Tue Jul  9 17:06:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: dkwedge_apple.c,v 1.4 2019/07/06 05:41:23 maxv Exp $	*/
+/*	$NetBSD: dkwedge_apple.c,v 1.5 2019/07/09 17:06:46 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dkwedge_apple.c,v 1.4 2019/07/06 05:41:23 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dkwedge_apple.c,v 1.5 2019/07/09 17:06:46 maxv Exp $");
 
 #include 
 #ifdef _KERNEL
@@ -225,6 +225,7 @@ dkwedge_discover_apple(struct disk *pdk,
 		}
 
 		struct dkwedge_info dkw;
+		memset(, 0, sizeof(dkw));
 
 		strlcpy(dkw.dkw_ptype, ptype, sizeof(dkw.dkw_ptype));
 		strlcpy(dkw.dkw_parent, pdk->dk_name, sizeof(dkw.dkw_parent));
Index: src/sys/dev/dkwedge/dkwedge_rdb.c
diff -u src/sys/dev/dkwedge/dkwedge_rdb.c:1.4 src/sys/dev/dkwedge/dkwedge_rdb.c:1.5
--- src/sys/dev/dkwedge/dkwedge_rdb.c:1.4	Tue Feb 28 04:47:41 2017
+++ src/sys/dev/dkwedge/dkwedge_rdb.c	Tue Jul  9 17:06:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: dkwedge_rdb.c,v 1.4 2017/02/28 04:47:41 rin Exp $	*/
+/*	$NetBSD: dkwedge_rdb.c,v 1.5 2019/07/09 17:06:46 maxv Exp $	*/
 
 /*
  * Adapted from arch/amiga/amiga/disksubr.c:
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dkwedge_rdb.c,v 1.4 2017/02/28 04:47:41 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dkwedge_rdb.c,v 1.5 2019/07/09 17:06:46 maxv Exp $");
 
 #include 
 #include 
@@ -165,6 +165,8 @@ dkwedge_discover_rdb(struct disk *pdk, s
 		bp = DKW_REALLOC(bp, bufsize);
 	}
 
+	memset(, 0, sizeof(dkw));
+
 	strlcpy(dkw.dkw_parent, pdk->dk_name, sizeof(dkw.dkw_parent));
 
 	found = root = swap = false;

Index: src/sys/dev/dkwedge/dkwedge_bsdlabel.c
diff -u src/sys/dev/dkwedge/dkwedge_bsdlabel.c:1.23 src/sys/dev/dkwedge/dkwedge_bsdlabel.c:1.24
--- src/sys/dev/dkwedge/dkwedge_bsdlabel.c:1.23	Tue Nov  4 07:45:45 2014
+++ src/sys/dev/dkwedge/dkwedge_bsdlabel.c	Tue Jul  9 17:06:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: dkwedge_bsdlabel.c,v 1.23 2014/11/04 07:45:45 mlelstv Exp $	*/
+/*	$NetBSD: dkwedge_bsdlabel.c,v 1.24 2019/07/09 17:06:46 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dkwedge_bsdlabel.c,v 1.23 2014/11/04 07:45:45 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dkwedge_bsdlabel.c,v 1.24 2019/07/09 17:06:46 maxv Exp $");
 
 #include 
 #ifdef _KERNEL
@@ -227,6 +227,9 @@ addwedges(const mbr_args_t *a, const str
 
 		if (p->p_fstype == FS_UNUSED)
 			continue;
+
+		memset(, 0, sizeof(dkw));
+
 		ptype = bsdlabel_fstype_to_str(p->p_fstype);
 		if (ptype == NULL)
 			snprintf(dkw.dkw_ptype, sizeof(dkw.dkw_ptype),
Index: src/sys/dev/dkwedge/dkwedge_gpt.c
diff -u src/sys/dev/dkwedge/dkwedge_gpt.c:1.23 src/sys/dev/dkwedge/dkwedge_gpt.c:1.24
--- src/sys/dev/dkwedge/dkwedge_gpt.c:1.23	Sat Jun 22 06:45:46 2019
+++ src/sys/dev/dkwedge/dkwedge_gpt.c	Tue Jul  9 17:06:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: dkwedge_gpt.c,v 1.23 2019/06/22 06:45:46 maxv Exp $	*/
+/*	$NetBSD: dkwedge_gpt.c,v 1.24 2019/07/09 17:06:46 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dkwedge_gpt.c,v 1.23 2019/06/22 06:45:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dkwedge_gpt.c,v 1.24 2019/07/09 17:06:46 maxv Exp $");
 
 #include 
 #include 
@@ -242,6 +242,8 @@ dkwedge_discover_gpt(struct disk *pdk, s
 		uuid_snprintf(ent_guid_str, sizeof(ent_guid_str),
 		_guid);
 
+		memset(, 0, sizeof(dkw));
+
 		/* figure out the type */
 		ptype = gpt_ptype_guid_to_str(_guid);
 		strlcpy(dkw.dkw_ptype, ptype, sizeof(dkw.dkw_ptype));

Index: src/sys/dev/dkwedge/dkwedge_mbr.c
diff -u src/sys/dev/dkwedge/dkwedge_mbr.c:1.10 src/sys/dev/dkwedge/dkwedge_mbr.c:1.11
--- src/sys/dev/dkwedge/dkwedge_mbr.c:1.10	Thu Jan 19 00:44:40 2017
+++ src/sys/dev/dkwedge/dkwedge_mbr.c	Tue Jul  9 17:06:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: 

CVS commit: src/sys/dev/dkwedge

2019-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul  9 17:06:46 UTC 2019

Modified Files:
src/sys/dev/dkwedge: dkwedge_apple.c dkwedge_bsdlabel.c dkwedge_gpt.c
dkwedge_mbr.c dkwedge_rdb.c

Log Message:
Fix info leak: always clear 'dkw', because some of its (otherwise
uninitialized) fields can be copied to userland, typically in the
DIOCGWEDGEINFO ioctl.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/dkwedge/dkwedge_apple.c \
src/sys/dev/dkwedge/dkwedge_rdb.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/dkwedge/dkwedge_bsdlabel.c \
src/sys/dev/dkwedge/dkwedge_gpt.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/dkwedge/dkwedge_mbr.c

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



CVS commit: src/sys/netipsec

2019-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul  9 16:56:24 UTC 2019

Modified Files:
src/sys/netipsec: ipsec.c

Log Message:
Fix uninitialized variable: in ipsec_checkpcbcache(), spidx.dir is not
initialized, and the padding of the spidx structure is not initialized
either. This causes the memcmp() to wrongfully fail.

Change ipsec_setspidx() to always initialize spdix.dir and zero out the
padding.

ok ozaki-r@


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/netipsec/ipsec.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/netipsec/ipsec.c
diff -u src/sys/netipsec/ipsec.c:1.168 src/sys/netipsec/ipsec.c:1.169
--- src/sys/netipsec/ipsec.c:1.168	Sun Jan 27 02:08:48 2019
+++ src/sys/netipsec/ipsec.c	Tue Jul  9 16:56:24 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.168 2019/01/27 02:08:48 pgoyette Exp $ */
+/* $NetBSD: ipsec.c,v 1.169 2019/07/09 16:56:24 maxv Exp $ */
 /* $FreeBSD: ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */
 /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.168 2019/01/27 02:08:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.169 2019/07/09 16:56:24 maxv Exp $");
 
 /*
  * IPsec controller part.
@@ -172,7 +172,7 @@ int ip6_ipsec_ecn = 0;		/* ECN ignore(-1
 #endif
 
 static int ipsec_setspidx_inpcb(struct mbuf *, void *);
-static int ipsec_setspidx(struct mbuf *, struct secpolicyindex *, int);
+static int ipsec_setspidx(struct mbuf *, struct secpolicyindex *, int, int);
 static void ipsec4_get_ulp(struct mbuf *m, struct secpolicyindex *, int);
 static int ipsec4_setspidx_ipaddr(struct mbuf *, struct secpolicyindex *);
 #ifdef INET6
@@ -220,7 +220,7 @@ ipsec_checkpcbcache(struct mbuf *m, stru
 	}
 	if ((pcbsp->sp_cacheflags & IPSEC_PCBSP_CONNECTED) == 0) {
 		/* NB: assume ipsec_setspidx never sleep */
-		if (ipsec_setspidx(m, , 1) != 0) {
+		if (ipsec_setspidx(m, , dir, 1) != 0) {
 			sp = NULL;
 			goto out;
 		}
@@ -269,7 +269,7 @@ ipsec_fillpcbcache(struct inpcbpolicy *p
 
 	pcbsp->sp_cache[dir].cachesp = NULL;
 	pcbsp->sp_cache[dir].cachehint = IPSEC_PCBHINT_UNKNOWN;
-	if (ipsec_setspidx(m, >sp_cache[dir].cacheidx, 1) != 0) {
+	if (ipsec_setspidx(m, >sp_cache[dir].cacheidx, dir, 1) != 0) {
 		return EINVAL;
 	}
 	pcbsp->sp_cache[dir].cachesp = sp;
@@ -537,7 +537,7 @@ ipsec_getpolicybyaddr(struct mbuf *m, u_
 	sp = NULL;
 
 	/* Make an index to look for a policy. */
-	*error = ipsec_setspidx(m, , (flag & IP_FORWARDING) ? 0 : 1);
+	*error = ipsec_setspidx(m, , dir, (flag & IP_FORWARDING) ? 0 : 1);
 	if (*error != 0) {
 		IPSECLOG(LOG_DEBUG, "setpidx failed, dir %u flag %u\n", dir, flag);
 		memset(, 0, sizeof(spidx));
@@ -791,9 +791,9 @@ ipsec_setspidx_inpcb(struct mbuf *m, voi
 	KASSERT(inph->inph_sp->sp_out != NULL);
 	KASSERT(inph->inph_sp->sp_in != NULL);
 
-	error = ipsec_setspidx(m, >inph_sp->sp_in->spidx, 1);
+	error = ipsec_setspidx(m, >inph_sp->sp_in->spidx,
+	IPSEC_DIR_INBOUND, 1);
 	if (error == 0) {
-		inph->inph_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND;
 		inph->inph_sp->sp_out->spidx = inph->inph_sp->sp_in->spidx;
 		inph->inph_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND;
 	} else {
@@ -811,7 +811,8 @@ ipsec_setspidx_inpcb(struct mbuf *m, voi
  * the caller is responsible for error recovery (like clearing up spidx).
  */
 static int
-ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport)
+ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int dir,
+int needport)
 {
 	struct ip *ip = NULL;
 	struct ip ipbuf;
@@ -828,6 +829,9 @@ ipsec_setspidx(struct mbuf *m, struct se
 		return EINVAL;
 	}
 
+	memset(spidx, 0, sizeof(*spidx));
+	spidx->dir = dir;
+
 	if (m->m_len >= sizeof(*ip)) {
 		ip = mtod(m, struct ip *);
 	} else {



CVS commit: src/sys/netipsec

2019-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jul  9 16:56:24 UTC 2019

Modified Files:
src/sys/netipsec: ipsec.c

Log Message:
Fix uninitialized variable: in ipsec_checkpcbcache(), spidx.dir is not
initialized, and the padding of the spidx structure is not initialized
either. This causes the memcmp() to wrongfully fail.

Change ipsec_setspidx() to always initialize spdix.dir and zero out the
padding.

ok ozaki-r@


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/netipsec/ipsec.c

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



CVS commit: src/usr.sbin/sysinst

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 16:25:05 UTC 2019

Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c

Log Message:
When we are going to create (and populate) a new boot partition, we should
newfs and mount it.

Fix arguments to the MD_PART_DEFAULTS macro and invoke it a bit earlier
(before we shift things around).


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/bsddisklabel.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/sysinst/bsddisklabel.c
diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.17 src/usr.sbin/sysinst/bsddisklabel.c:1.18
--- src/usr.sbin/sysinst/bsddisklabel.c:1.17	Tue Jul  9 16:21:52 2019
+++ src/usr.sbin/sysinst/bsddisklabel.c	Tue Jul  9 16:25:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bsddisklabel.c,v 1.17 2019/07/09 16:21:52 martin Exp $	*/
+/*	$NetBSD: bsddisklabel.c,v 1.18 2019/07/09 16:25:05 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -72,7 +72,7 @@ default_parts_init[] =
 	  .mount = PART_BOOT_MOUNT,
 	  .instflags = PUIINST_MOUNT|PUIINST_BOOT,
 #else
-	  .instflags = PUIINST_MOUNT|PUIINST_BOOT,
+	  .instflags = PUIINST_BOOT,
 #endif
 #ifdef PART_BOOT_TYPE
 	  .fs_type = PART_BOOT_TYPE,
@@ -996,6 +996,11 @@ fill_defaults(struct partition_usage_set
 	}
 
 	memcpy(wanted->infos, default_parts_init, sizeof(default_parts_init));
+
+#ifdef MD_PART_DEFAULTS
+	MD_PART_DEFAULTS(pm, wanted->infos, wanted->num);
+#endif
+
 	for (i = 0; i < wanted->num; i++) {
 		wanted->infos[i].parts = parts;
 		wanted->infos[i].cur_part_id = NO_PART;
@@ -1035,10 +1040,6 @@ fill_defaults(struct partition_usage_set
 			get_ramsize() * (MEG/512/4);
 	}
 
-#ifdef MD_PART_DEFAULTS
-	MD_PART_DEFAULTS(pm, wanted->infos[i].parts, wanted->num);
-#endif
-
 	/*
 	 * Now we have the defaults as if we were installing to an
 	 * empty disk. Merge the partitions in target range that are already



CVS commit: src/usr.sbin/sysinst

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 16:25:05 UTC 2019

Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c

Log Message:
When we are going to create (and populate) a new boot partition, we should
newfs and mount it.

Fix arguments to the MD_PART_DEFAULTS macro and invoke it a bit earlier
(before we shift things around).


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/bsddisklabel.c

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



CVS commit: src/tests

2019-07-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jul  9 16:24:02 UTC 2019

Modified Files:
src/tests/fs/common: snapshot.c
src/tests/fs/ffs: t_fifos.c
src/tests/fs/hfs: t_pathconvert.c
src/tests/fs/lfs: t_pr.c
src/tests/fs/umapfs: t_basic.c
src/tests/lib/libc/db: t_db_hash_seq.c
src/tests/lib/libc/sys: t_listen.c
src/tests/lib/libpthread: t_condwait.c
src/tests/libexec/ld.elf_so: t_dlerror-cleared.c t_dlinfo.c t_ifunc.c

Log Message:
return return atf_no_error() instead of 0 for consistency.

suggested by moritzbuhl in https://github.com/NetBSD/src/pull/11/


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/common/snapshot.c
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/ffs/t_fifos.c
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/hfs/t_pathconvert.c
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/lfs/t_pr.c
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/umapfs/t_basic.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/db/t_db_hash_seq.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/sys/t_listen.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libpthread/t_condwait.c
cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/t_dlerror-cleared.c
cvs rdiff -u -r1.5 -r1.6 src/tests/libexec/ld.elf_so/t_dlinfo.c
cvs rdiff -u -r1.8 -r1.9 src/tests/libexec/ld.elf_so/t_ifunc.c

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



CVS commit: src/tests

2019-07-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Jul  9 16:24:02 UTC 2019

Modified Files:
src/tests/fs/common: snapshot.c
src/tests/fs/ffs: t_fifos.c
src/tests/fs/hfs: t_pathconvert.c
src/tests/fs/lfs: t_pr.c
src/tests/fs/umapfs: t_basic.c
src/tests/lib/libc/db: t_db_hash_seq.c
src/tests/lib/libc/sys: t_listen.c
src/tests/lib/libpthread: t_condwait.c
src/tests/libexec/ld.elf_so: t_dlerror-cleared.c t_dlinfo.c t_ifunc.c

Log Message:
return return atf_no_error() instead of 0 for consistency.

suggested by moritzbuhl in https://github.com/NetBSD/src/pull/11/


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/common/snapshot.c
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/ffs/t_fifos.c
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/hfs/t_pathconvert.c
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/lfs/t_pr.c
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/umapfs/t_basic.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/db/t_db_hash_seq.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/sys/t_listen.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libpthread/t_condwait.c
cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/t_dlerror-cleared.c
cvs rdiff -u -r1.5 -r1.6 src/tests/libexec/ld.elf_so/t_dlinfo.c
cvs rdiff -u -r1.8 -r1.9 src/tests/libexec/ld.elf_so/t_ifunc.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/fs/common/snapshot.c
diff -u src/tests/fs/common/snapshot.c:1.7 src/tests/fs/common/snapshot.c:1.8
--- src/tests/fs/common/snapshot.c:1.7	Wed Feb  6 09:05:01 2013
+++ src/tests/fs/common/snapshot.c	Tue Jul  9 16:24:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: snapshot.c,v 1.7 2013/02/06 09:05:01 hannken Exp $	*/
+/*	$NetBSD: snapshot.c,v 1.8 2019/07/09 16:24:01 maya Exp $	*/
 
 #include 
 #include 
@@ -224,5 +224,5 @@ ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, snapshot);
 	ATF_TP_ADD_TC(tp, snapshotstress);
-	return 0;
+	return atf_no_error();
 }

Index: src/tests/fs/ffs/t_fifos.c
diff -u src/tests/fs/ffs/t_fifos.c:1.6 src/tests/fs/ffs/t_fifos.c:1.7
--- src/tests/fs/ffs/t_fifos.c:1.6	Fri Jan 13 21:30:39 2017
+++ src/tests/fs/ffs/t_fifos.c	Tue Jul  9 16:24:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fifos.c,v 1.6 2017/01/13 21:30:39 christos Exp $	*/
+/*	$NetBSD: t_fifos.c,v 1.7 2019/07/09 16:24:01 maya Exp $	*/
 
 #include 
 #include 
@@ -154,5 +154,5 @@ ATF_TC_CLEANUP(fifos, tc)
 ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, fifos);
-	return 0;
+	return atf_no_error();
 }

Index: src/tests/fs/hfs/t_pathconvert.c
diff -u src/tests/fs/hfs/t_pathconvert.c:1.6 src/tests/fs/hfs/t_pathconvert.c:1.7
--- src/tests/fs/hfs/t_pathconvert.c:1.6	Fri Jan 13 21:30:40 2017
+++ src/tests/fs/hfs/t_pathconvert.c	Tue Jul  9 16:24:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_pathconvert.c,v 1.6 2017/01/13 21:30:40 christos Exp $	*/
+/*	$NetBSD: t_pathconvert.c,v 1.7 2019/07/09 16:24:01 maya Exp $	*/
 
 #include 
 #include 
@@ -79,5 +79,5 @@ ATF_TC_BODY(colonslash, tc)
 ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, colonslash);
-	return 0;
+	return atf_no_error();
 }

Index: src/tests/fs/lfs/t_pr.c
diff -u src/tests/fs/lfs/t_pr.c:1.7 src/tests/fs/lfs/t_pr.c:1.8
--- src/tests/fs/lfs/t_pr.c:1.7	Fri Jan 13 21:30:40 2017
+++ src/tests/fs/lfs/t_pr.c	Tue Jul  9 16:24:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_pr.c,v 1.7 2017/01/13 21:30:40 christos Exp $	*/
+/*	$NetBSD: t_pr.c,v 1.8 2019/07/09 16:24:01 maya Exp $	*/
 
 #include 
 #include 
@@ -56,5 +56,5 @@ ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, mknod);
-	return 0;
+	return atf_no_error();
 }

Index: src/tests/fs/umapfs/t_basic.c
diff -u src/tests/fs/umapfs/t_basic.c:1.5 src/tests/fs/umapfs/t_basic.c:1.6
--- src/tests/fs/umapfs/t_basic.c:1.5	Fri Jan 13 21:30:40 2017
+++ src/tests/fs/umapfs/t_basic.c	Tue Jul  9 16:24:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_basic.c,v 1.5 2017/01/13 21:30:40 christos Exp $	*/
+/*	$NetBSD: t_basic.c,v 1.6 2019/07/09 16:24:01 maya Exp $	*/
 
 #include 
 #include 
@@ -141,5 +141,5 @@ ATF_TC_BODY(basic, tc)
 ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, basic);
-	return 0; /*XXX?*/
+	return atf_no_error();
 }

Index: src/tests/lib/libc/db/t_db_hash_seq.c
diff -u src/tests/lib/libc/db/t_db_hash_seq.c:1.2 src/tests/lib/libc/db/t_db_hash_seq.c:1.3
--- src/tests/lib/libc/db/t_db_hash_seq.c:1.2	Mon Jun 22 22:35:51 2015
+++ src/tests/lib/libc/db/t_db_hash_seq.c	Tue Jul  9 16:24:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_db_hash_seq.c,v 1.2 2015/06/22 22:35:51 christos Exp $	*/
+/*	$NetBSD: t_db_hash_seq.c,v 1.3 2019/07/09 16:24:01 maya Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_db_hash_seq.c,v 1.2 2015/06/22 22:35:51 christos Exp $");
+__RCSID("$NetBSD: t_db_hash_seq.c,v 1.3 2019/07/09 16:24:01 maya Exp $");
 
 #include 
 #include 
@@ -338,6 +338,6 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_ADD_TC(tp, test_hash_del_alt);
 	ATF_TP_ADD_TC(tp, 

CVS commit: src/usr.sbin/sysinst

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 16:21:52 UTC 2019

Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c

Log Message:
When checking for existing NetBSD partitions skip extended MBR and disklabel
raw partitions.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/bsddisklabel.c

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



CVS commit: src/usr.sbin/sysinst

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 16:16:33 UTC 2019

Modified Files:
src/usr.sbin/sysinst: label.c

Log Message:
Allow newfs for ext2fs partitions too.


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

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



CVS commit: src/usr.sbin/sysinst

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 16:16:33 UTC 2019

Modified Files:
src/usr.sbin/sysinst: label.c

Log Message:
Allow newfs for ext2fs partitions too.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/label.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/sysinst/label.c
diff -u src/usr.sbin/sysinst/label.c:1.8 src/usr.sbin/sysinst/label.c:1.9
--- src/usr.sbin/sysinst/label.c:1.8	Sat Jun 22 20:46:07 2019
+++ src/usr.sbin/sysinst/label.c	Tue Jul  9 16:16:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: label.c,v 1.8 2019/06/22 20:46:07 christos Exp $	*/
+/*	$NetBSD: label.c,v 1.9 2019/07/09 16:16:33 martin Exp $	*/
 
 /*
  * Copyright 1997 Jonathan Stone
@@ -36,7 +36,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: label.c,v 1.8 2019/06/22 20:46:07 christos Exp $");
+__RCSID("$NetBSD: label.c,v 1.9 2019/07/09 16:16:33 martin Exp $");
 #endif
 
 #include 
@@ -915,8 +915,9 @@ update_edit_ptn_menu(menudesc *m, void *
 			/* can only install onto PT_root partitions */
 			continue;
 		if (m->opts[i].opt_action == edit_fs_preserve &&
-		t != FS_BSDFFS && t != FS_BSDLFS && t != FS_APPLEUFS) {
-			/* Can only newfs UFS and LFS filesystems */
+		t != FS_BSDFFS && t != FS_BSDLFS && t != FS_APPLEUFS &&
+		t != FS_MSDOS && t != FS_EX2FS) {
+			/* Can not newfs this filesystem */
 			edit->wanted->instflags &= ~PUIINST_NEWFS;
 			continue;
 		}



CVS commit: src/usr.sbin/sysinst

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 16:14:46 UTC 2019

Modified Files:
src/usr.sbin/sysinst: part_edit.c

Log Message:
When editing outer partitions:
 - when there are no outer partitions to edit, just report success and go
   on, instead of failing an assertion.
 - use the partitions passed as argument and avoid refering (the hopefully
   same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/part_edit.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/sysinst/part_edit.c
diff -u src/usr.sbin/sysinst/part_edit.c:1.5 src/usr.sbin/sysinst/part_edit.c:1.6
--- src/usr.sbin/sysinst/part_edit.c:1.5	Sat Jun 22 20:46:07 2019
+++ src/usr.sbin/sysinst/part_edit.c	Tue Jul  9 16:14:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: part_edit.c,v 1.5 2019/06/22 20:46:07 christos Exp $ */
+/*	$NetBSD: part_edit.c,v 1.6 2019/07/09 16:14:46 martin Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -1085,24 +1085,25 @@ edit_outer_parts(struct disk_partitions 
 	if (pm && (pm->no_part || pm->no_mbr))
 		return true;
 
-	/* Make sure pm has been properly initialized */
-	assert(pm->parts && pm->parts->pscheme);
+	/* Make sure parts has been properly initialized */
+	assert(parts && parts->pscheme);
 
-	if (partman_go)
+	if (parts->pscheme->secondary_scheme == NULL)
+		return true;	/* no outer parts */
+
+	if (partman_go) {
 		layout = LY_SETSIZES;
-	else {
+	} else {
 		/* Ask full/part */
 		const struct disk_partitioning_scheme *sec =
-		pm->parts->pscheme->secondary_scheme;
-
-		assert(sec != NULL);
+		parts->pscheme->secondary_scheme;
 
 		uint64_t m_size =
 		DEFROOTSIZE + DEFSWAPSIZE + DEFUSRSIZE + XNEEDMB;
 		char min_size[5], build_size[5];
 		const char
-		*prim_name = msg_string(pm->parts->pscheme->name),
-		*prim_short = msg_string(pm->parts->pscheme->short_name),
+		*prim_name = msg_string(parts->pscheme->name),
+		*prim_short = msg_string(parts->pscheme->short_name),
 		*sec_name = msg_string(sec->name),
 		*sec_short = msg_string(sec->short_name);
 
@@ -1120,7 +1121,7 @@ edit_outer_parts(struct disk_partitions 
 		min_size, build_size);
 		msg_display_add("\n\n");
 
-		layout = ask_fullpart(pm->parts);
+		layout = ask_fullpart(parts);
 	}
 
 	if (layout == LY_USEFULL) {
@@ -1133,6 +1134,8 @@ edit_outer_parts(struct disk_partitions 
 continue;
 			if (info.size == 0)
 continue;
+			if (info.flags & (PTI_PSCHEME_INTERNAL|PTI_RAW_PART))
+continue;
 			if (info.nat_type != NULL
 			&& info.nat_type->generic_ptype != PT_root
 			&& info.nat_type->generic_ptype != PT_swap)



CVS commit: src/usr.sbin/sysinst

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 16:14:46 UTC 2019

Modified Files:
src/usr.sbin/sysinst: part_edit.c

Log Message:
When editing outer partitions:
 - when there are no outer partitions to edit, just report success and go
   on, instead of failing an assertion.
 - use the partitions passed as argument and avoid refering (the hopefully
   same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/part_edit.c

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



CVS commit: [netbsd-8] src/doc

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 15:17:50 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1286


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/doc/CHANGES-8.2

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



CVS commit: [netbsd-8] src/sys/dev/hyperv

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 15:16:45 UTC 2019

Modified Files:
src/sys/dev/hyperv [netbsd-8]: vmbus.c

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #1286):

sys/dev/hyperv/vmbus.c: revision 1.4

Zero clear the allocated ring buffer for vmbus_channel.
This change makes Hyper-V's vmbus devices work properly even after reboot.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.3 -r1.2.2.4 src/sys/dev/hyperv/vmbus.c

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



CVS commit: [netbsd-8] src/sys/dev/hyperv

2019-07-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul  9 15:16:45 UTC 2019

Modified Files:
src/sys/dev/hyperv [netbsd-8]: vmbus.c

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #1286):

sys/dev/hyperv/vmbus.c: revision 1.4

Zero clear the allocated ring buffer for vmbus_channel.
This change makes Hyper-V's vmbus devices work properly even after reboot.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.3 -r1.2.2.4 src/sys/dev/hyperv/vmbus.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/hyperv/vmbus.c
diff -u src/sys/dev/hyperv/vmbus.c:1.2.2.3 src/sys/dev/hyperv/vmbus.c:1.2.2.4
--- src/sys/dev/hyperv/vmbus.c:1.2.2.3	Wed Jun 12 10:17:32 2019
+++ src/sys/dev/hyperv/vmbus.c	Tue Jul  9 15:16:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmbus.c,v 1.2.2.3 2019/06/12 10:17:32 martin Exp $	*/
+/*	$NetBSD: vmbus.c,v 1.2.2.4 2019/07/09 15:16:45 martin Exp $	*/
 /*	$OpenBSD: hyperv.c,v 1.43 2017/06/27 13:56:15 mikeb Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.2.2.3 2019/06/12 10:17:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.2.2.4 2019/07/09 15:16:45 martin Exp $");
 
 #include 
 #include 
@@ -1263,6 +1263,7 @@ vmbus_channel_ring_create(struct vmbus_c
 		"failed to allocate channel ring\n");
 		return ENOMEM;
 	}
+	memset(ch->ch_ring, 0, ch->ch_ring_size);
 
 	memset(>ch_wrd, 0, sizeof(ch->ch_wrd));
 	ch->ch_wrd.rd_ring = (struct vmbus_bufring *)ch->ch_ring;



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

2019-07-09 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Jul  9 13:59:25 UTC 2019

Modified Files:
src/tests/lib/libc/regex: t_exhaust.c

Log Message:
Update require.memory to match the increased rlimit.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/regex/t_exhaust.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/regex/t_exhaust.c
diff -u src/tests/lib/libc/regex/t_exhaust.c:1.9 src/tests/lib/libc/regex/t_exhaust.c:1.10
--- src/tests/lib/libc/regex/t_exhaust.c:1.9	Sat Mar 16 21:57:15 2019
+++ src/tests/lib/libc/regex/t_exhaust.c	Tue Jul  9 13:59:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $	*/
+/*	$NetBSD: t_exhaust.c,v 1.10 2019/07/09 13:59:25 gson Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_exhaust.c,v 1.9 2019/03/16 21:57:15 christos Exp $");
+__RCSID("$NetBSD: t_exhaust.c,v 1.10 2019/07/09 13:59:25 gson Exp $");
 
 #include 
 #include 
@@ -177,7 +177,7 @@ ATF_TC_HEAD(regcomp_too_big, tc)
 	" crash, but return a proper error code");
 	// libtre needs it.
 	atf_tc_set_md_var(tc, "timeout", "600");
-	atf_tc_set_md_var(tc, "require.memory", "64M");
+	atf_tc_set_md_var(tc, "require.memory", "256M");
 }
 
 ATF_TC_BODY(regcomp_too_big, tc)



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

2019-07-09 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Jul  9 13:59:25 UTC 2019

Modified Files:
src/tests/lib/libc/regex: t_exhaust.c

Log Message:
Update require.memory to match the increased rlimit.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/regex/t_exhaust.c

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



CVS commit: src/sys/dev

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:56:30 UTC 2019

Modified Files:
src/sys/dev/hid: hidms.c
src/sys/dev/i2c: ims.c

Log Message:
Enable finger touch panel of HP Spectre x360 13-inch ae019TU


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hid/hidms.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/ims.c

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



CVS commit: src/sys/dev

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:56:30 UTC 2019

Modified Files:
src/sys/dev/hid: hidms.c
src/sys/dev/i2c: ims.c

Log Message:
Enable finger touch panel of HP Spectre x360 13-inch ae019TU


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hid/hidms.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/ims.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/hid/hidms.c
diff -u src/sys/dev/hid/hidms.c:1.3 src/sys/dev/hid/hidms.c:1.4
--- src/sys/dev/hid/hidms.c:1.3	Tue Jul  9 12:52:51 2019
+++ src/sys/dev/hid/hidms.c	Tue Jul  9 12:56:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $	*/
+/*	$NetBSD: hidms.c,v 1.4 2019/07/09 12:56:30 ryoon Exp $	*/
 
 /*
  * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.4 2019/07/09 12:56:30 ryoon Exp $");
 
 #include 
 #include 
@@ -81,8 +81,11 @@ hidms_setup(device_t self, struct hidms 
 	bool isdigitizer;
 	int i, hl;
 
+	/* Sync with ims_match() */
 	isdigitizer = hid_is_collection(desc, size, id,
-	HID_USAGE2(HUP_DIGITIZERS, 0x0002));
+	HID_USAGE2(HUP_DIGITIZERS, HUD_PEN)) ||
+hid_is_collection(desc, size, id,
+		HID_USAGE2(HUP_DIGITIZERS, HUD_TOUCH_SCREEN));
 
 	if (!hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
 	   id, hid_input, >hidms_loc_x, )) {

Index: src/sys/dev/i2c/ims.c
diff -u src/sys/dev/i2c/ims.c:1.2 src/sys/dev/i2c/ims.c:1.3
--- src/sys/dev/i2c/ims.c:1.2	Tue Jul  9 12:52:51 2019
+++ src/sys/dev/i2c/ims.c	Tue Jul  9 12:56:30 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $ */
+/* $NetBSD: ims.c,v 1.3 2019/07/09 12:56:30 ryoon Exp $ */
 /* $OpenBSD ims.c,v 1.1 2016/01/12 01:11:15 jcs Exp $ */
 
 /*
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.3 2019/07/09 12:56:30 ryoon Exp $");
 
 #include 
 #include 
@@ -81,6 +81,10 @@ ims_match(device_t parent, cfdata_t matc
 	HID_USAGE2(HUP_DIGITIZERS, HUD_PEN)))
 		return (IMATCH_IFACECLASS);
 
+	if (hid_is_collection(desc, size, iha->reportid,
+	HID_USAGE2(HUP_DIGITIZERS, HUD_TOUCH_SCREEN)))
+		return (IMATCH_IFACECLASS);
+
 	return (IMATCH_NONE);
 }
 



CVS commit: src/sys/dev/wscons

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:55:46 UTC 2019

Modified Files:
src/sys/dev/wscons: tpcalib.c

Log Message:
Do not overflow int64_t on HP Spectre x360 13-inch ae019TU

The machine has pen touch panel with (18344, 10544) -> (3840, 2160)
conversion.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/wscons/tpcalib.c

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



CVS commit: src/sys/dev/wscons

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:55:46 UTC 2019

Modified Files:
src/sys/dev/wscons: tpcalib.c

Log Message:
Do not overflow int64_t on HP Spectre x360 13-inch ae019TU

The machine has pen touch panel with (18344, 10544) -> (3840, 2160)
conversion.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/wscons/tpcalib.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/wscons/tpcalib.c
diff -u src/sys/dev/wscons/tpcalib.c:1.12 src/sys/dev/wscons/tpcalib.c:1.13
--- src/sys/dev/wscons/tpcalib.c:1.12	Thu Apr  6 20:44:39 2017
+++ src/sys/dev/wscons/tpcalib.c	Tue Jul  9 12:55:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpcalib.c,v 1.12 2017/04/06 20:44:39 macallan Exp $	*/
+/*	$NetBSD: tpcalib.c,v 1.13 2019/07/09 12:55:45 ryoon Exp $	*/
 
 /*
  * Copyright (c) 1999-2003 TAKEMURA Shin All rights reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tpcalib.c,v 1.12 2017/04/06 20:44:39 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tpcalib.c,v 1.13 2019/07/09 12:55:45 ryoon Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_tpcalib.h"
@@ -53,7 +53,7 @@ extern int mra_Y_AX1_BX2_C(const int *, 
 			   const int *, int, const int *, int, int, int,
 			   int *, int *, int *);
 
-#define SCALE	(1024*256)
+#define SCALE	(1024)
 
 int
 tpcalib_init(struct tpcalib_softc *sc)



CVS commit: src/sys/dev

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:52:51 UTC 2019

Modified Files:
src/sys/dev/hid: hidms.c hidms.h
src/sys/dev/i2c: ims.c

Log Message:
Add tpcalib, touch panel calibration to ims(4)

Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hid/hidms.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hid/hidms.h
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ims.c

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



CVS commit: src/sys/dev

2019-07-09 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Tue Jul  9 12:52:51 UTC 2019

Modified Files:
src/sys/dev/hid: hidms.c hidms.h
src/sys/dev/i2c: ims.c

Log Message:
Add tpcalib, touch panel calibration to ims(4)

Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hid/hidms.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hid/hidms.h
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ims.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/hid/hidms.c
diff -u src/sys/dev/hid/hidms.c:1.2 src/sys/dev/hid/hidms.c:1.3
--- src/sys/dev/hid/hidms.c:1.2	Fri May 25 15:52:45 2018
+++ src/sys/dev/hid/hidms.c	Tue Jul  9 12:52:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidms.c,v 1.2 2018/05/25 15:52:45 ryoon Exp $	*/
+/*	$NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $	*/
 
 /*
  * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.2 2018/05/25 15:52:45 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $");
 
 #include 
 #include 
@@ -267,6 +267,7 @@ hidms_intr(struct hidms *ms, void *ibuf,
 	if (ms->flags & HIDMS_ABS) {
 		flags |= (WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y);
 		dy = hid_get_data(ibuf, >hidms_loc_y);
+		tpcalib_trans(>sc_tpcalib, dx, dy, , );
 	} else
 		dy = -hid_get_data(ibuf, >hidms_loc_y);
 	dz =  hid_get_data(ibuf, >hidms_loc_z);

Index: src/sys/dev/hid/hidms.h
diff -u src/sys/dev/hid/hidms.h:1.1 src/sys/dev/hid/hidms.h:1.2
--- src/sys/dev/hid/hidms.h:1.1	Sun Dec 10 17:03:07 2017
+++ src/sys/dev/hid/hidms.h	Tue Jul  9 12:52:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidms.h,v 1.1 2017/12/10 17:03:07 bouyer Exp $	*/
+/*	$NetBSD: hidms.h,v 1.2 2019/07/09 12:52:51 ryoon Exp $	*/
 
 /*
  * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
 
 #include 
 #include 
+#include 
 
 #define MAX_BUTTONS	31	/* must not exceed size of sc_buttons */
 
@@ -55,6 +56,9 @@ struct hidms {
 
 	uint32_t hidms_buttons;	/* mouse button status */
 	device_t hidms_wsmousedev;
+
+	struct tpcalib_softc sc_tpcalib; /* calibration */
+	struct wsmouse_calibcoords sc_calibcoords;
 };
 
 bool hidms_setup(device_t, struct hidms *, int, void *, int);

Index: src/sys/dev/i2c/ims.c
diff -u src/sys/dev/i2c/ims.c:1.1 src/sys/dev/i2c/ims.c:1.2
--- src/sys/dev/i2c/ims.c:1.1	Sun Dec 10 17:05:54 2017
+++ src/sys/dev/i2c/ims.c	Tue Jul  9 12:52:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ims.c,v 1.1 2017/12/10 17:05:54 bouyer Exp $ */
+/* $NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $ */
 /* $OpenBSD ims.c,v 1.1 2016/01/12 01:11:15 jcs Exp $ */
 
 /*
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.1 2017/12/10 17:05:54 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $");
 
 #include 
 #include 
@@ -92,6 +92,8 @@ ims_attach(device_t parent, device_t sel
 	struct ihidev_attach_arg *iha = (struct ihidev_attach_arg *)aux;
 	int size, repid;
 	void *desc;
+	struct hid_data * d __debugused;
+	struct hid_item item __debugused;
 
 	sc->sc_hdev.sc_idev = self;
 	sc->sc_hdev.sc_intr = ims_intr;
@@ -110,6 +112,30 @@ ims_attach(device_t parent, device_t sel
 	if (!hidms_setup(self, ms, iha->reportid, desc, size) != 0)
 		return;
 
+#if defined(DEBUG)
+	/* calibrate the touchscreen */
+	memset(>sc_ms.sc_calibcoords, 0, sizeof(sc->sc_ms.sc_calibcoords));
+	d = hid_start_parse(desc, size, hid_input);
+	if (d != NULL) {
+		while (hid_get_item(d, )) {
+			if (item.kind != hid_input
+			|| HID_GET_USAGE_PAGE(item.usage) != HUP_GENERIC_DESKTOP
+			|| item.report_ID != sc->sc_hdev.sc_report_id)
+continue;
+			if (HID_GET_USAGE(item.usage) == HUG_X) {
+aprint_normal("X range: %d - %d\n", item.logical_minimum, item.logical_maximum);
+			}
+			if (HID_GET_USAGE(item.usage) == HUG_Y) {
+aprint_normal("Y range: %d - %d\n", item.logical_minimum, item.logical_maximum);
+			}
+		}
+		hid_end_parse(d);
+	}
+#endif
+	tpcalib_init(>sc_ms.sc_tpcalib);
+	tpcalib_ioctl(>sc_ms.sc_tpcalib, WSMOUSEIO_SCALIBCOORDS,
+	(void *)>sc_ms.sc_calibcoords, 0, 0);
+
 	hidms_attach(self, ms, _accessops);
 }
 
@@ -199,6 +225,9 @@ ims_ioctl(void *v, u_long cmd, void *dat
 			*(u_int *)data = WSMOUSE_TYPE_USB;
 		}
 		return 0;
+	case WSMOUSEIO_SCALIBCOORDS:
+	case WSMOUSEIO_GCALIBCOORDS:
+		return tpcalib_ioctl(>sc_ms.sc_tpcalib, cmd, data, flag, l);
 	}
 	return EPASSTHROUGH;
 }



CVS commit: src/sys/dev/pci

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 12:17:13 UTC 2019

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

Log Message:
 Print extend capability from 0x25 to 0x29 correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.213 -r1.214 src/sys/dev/pci/pci_subr.c

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



CVS commit: src/sys/dev/pci

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 12:17:13 UTC 2019

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

Log Message:
 Print extend capability from 0x25 to 0x29 correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.213 -r1.214 src/sys/dev/pci/pci_subr.c

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.213 src/sys/dev/pci/pci_subr.c:1.214
--- src/sys/dev/pci/pci_subr.c:1.213	Tue Jul  9 12:13:42 2019
+++ src/sys/dev/pci/pci_subr.c	Tue Jul  9 12:17:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.213 2019/07/09 12:13:42 msaitoh Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.214 2019/07/09 12:17:13 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.213 2019/07/09 12:13:42 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.214 2019/07/09 12:17:13 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -4240,6 +4240,9 @@ static struct {
 	  NULL },
 	{ PCI_EXTCAP_VF_RESIZBAR, "VF Resizable BARs",
 	  NULL },
+	{ 0x25, "unknown", NULL },
+	{ 0x26, "unknown", NULL },
+	{ 0x27, "unknown", NULL },
 	{ PCI_EXTCAP_HIERARCHYID, "Hierarchy ID",
 	  NULL },
 	{ PCI_EXTCAP_NPEM,	"Native PCIe Enclosure Management",



CVS commit: src/sys/dev/pci

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 12:13:42 UTC 2019

Modified Files:
src/sys/dev/pci: pci_subr.c ppb.c

Log Message:
Identify 16GT/s.


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/ppb.c

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



CVS commit: src/sys/dev/pci

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 12:13:42 UTC 2019

Modified Files:
src/sys/dev/pci: pci_subr.c ppb.c

Log Message:
Identify 16GT/s.


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/ppb.c

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.212 src/sys/dev/pci/pci_subr.c:1.213
--- src/sys/dev/pci/pci_subr.c:1.212	Fri Mar  1 09:26:00 2019
+++ src/sys/dev/pci/pci_subr.c	Tue Jul  9 12:13:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.212 2019/03/01 09:26:00 msaitoh Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.213 2019/07/09 12:13:42 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.212 2019/03/01 09:26:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.213 2019/07/09 12:13:42 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -1688,7 +1688,7 @@ pci_print_pcie_compl_timeout(uint32_t va
 	}
 }
 
-static const char * const pcie_linkspeeds[] = {"2.5", "5.0", "8.0"};
+static const char * const pcie_linkspeeds[] = {"2.5", "5.0", "8.0", "16.0"};
 
 /*
  * Print link speed. This function is used for the following register bits:

Index: src/sys/dev/pci/ppb.c
diff -u src/sys/dev/pci/ppb.c:1.68 src/sys/dev/pci/ppb.c:1.69
--- src/sys/dev/pci/ppb.c:1.68	Fri Mar  1 09:26:00 2019
+++ src/sys/dev/pci/ppb.c	Tue Jul  9 12:13:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppb.c,v 1.68 2019/03/01 09:26:00 msaitoh Exp $	*/
+/*	$NetBSD: ppb.c,v 1.69 2019/07/09 12:13:42 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.68 2019/03/01 09:26:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.69 2019/07/09 12:13:42 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ppb.h"
@@ -62,8 +62,8 @@ __KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.68
 	(PCIE_SLCSR_ABP | PCIE_SLCSR_PFD | PCIE_SLCSR_MSC |	\
 	 PCIE_SLCSR_PDC | PCIE_SLCSR_CC | PCIE_SLCSR_LACS)
 
-static const char pcie_linkspeed_strings[4][5] = {
-	"1.25", "2.5", "5.0", "8.0",
+static const char pcie_linkspeed_strings[5][5] = {
+	"1.25", "2.5", "5.0", "8.0", "16.0"
 };
 
 int	ppb_printevent = 0; /* Print event type if the value is not 0 */



CVS commit: src/sys/dev/pci

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 12:09:18 UTC 2019

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1365 -r1.1366 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1364 -r1.1365 src/sys/dev/pci/pcidevs_data.h

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

diffs are larger than 1MB and have been omitted


CVS commit: src/sys/dev/pci

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 12:09:18 UTC 2019

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1365 -r1.1366 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1364 -r1.1365 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: src/sys/dev/pci

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 12:07:30 UTC 2019

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

Log Message:
 Add Phison PS5000 and PS5016 NVMe.


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

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



CVS commit: src/sys/dev/pci

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 12:07:30 UTC 2019

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

Log Message:
 Add Phison PS5000 and PS5016 NVMe.


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

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1377 src/sys/dev/pci/pcidevs:1.1378
--- src/sys/dev/pci/pcidevs:1.1377	Fri Jul  5 06:19:24 2019
+++ src/sys/dev/pci/pcidevs	Tue Jul  9 12:07:30 2019
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1377 2019/07/05 06:19:24 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1378 2019/07/09 12:07:30 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -634,6 +634,7 @@ vendor RENESAS		0x1912	Renesas Technolog
 vendor FREESCALE	0x1957	Freescale Semiconductor
 vendor ATTANSIC		0x1969	Attansic Technologies
 vendor JMICRON		0x197b	JMicron Technology
+vendor PHISON		0x1987	Phison
 vendor SERVERENGINES	0x19a2	ServerEngines
 vendor HUAWEI		0x19e5	Huaewi Technology
 vendor ASPEED		0x1a03	ASPEED Technology
@@ -6001,6 +6002,10 @@ product PHILIPS SAA7134HL	0x7134	SAA7134
 product PHILIPS SAA7135HL	0x7135	SAA7135HL PCI A/V Broadcast Decoder
 product PHILIPS SAA7146AH	0x7146	SAA7146AH PCI Multimedia Bridge
 
+/* Phison products */
+product PHISON PS5000		0x5000 PS5000
+product PHISON PS5016		0x5016 PS5016
+
 /* NCR/Symbios Logic products */
 product SYMBIOS 810			0x0001	53c810
 product SYMBIOS 820			0x0002	53c820



CVS commit: src/sys/dev/hyperv

2019-07-09 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Tue Jul  9 10:07:11 UTC 2019

Modified Files:
src/sys/dev/hyperv: vmbus.c

Log Message:
Zero clear the allocated ring buffer for vmbus_channel.
This change makes Hyper-V's vmbus devices work properly even after reboot.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hyperv/vmbus.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/hyperv/vmbus.c
diff -u src/sys/dev/hyperv/vmbus.c:1.3 src/sys/dev/hyperv/vmbus.c:1.4
--- src/sys/dev/hyperv/vmbus.c:1.3	Fri May 24 14:28:48 2019
+++ src/sys/dev/hyperv/vmbus.c	Tue Jul  9 10:07:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmbus.c,v 1.3 2019/05/24 14:28:48 nonaka Exp $	*/
+/*	$NetBSD: vmbus.c,v 1.4 2019/07/09 10:07:11 nakayama Exp $	*/
 /*	$OpenBSD: hyperv.c,v 1.43 2017/06/27 13:56:15 mikeb Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.3 2019/05/24 14:28:48 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.4 2019/07/09 10:07:11 nakayama Exp $");
 
 #include 
 #include 
@@ -1263,6 +1263,7 @@ vmbus_channel_ring_create(struct vmbus_c
 		"failed to allocate channel ring\n");
 		return ENOMEM;
 	}
+	memset(ch->ch_ring, 0, ch->ch_ring_size);
 
 	memset(>ch_wrd, 0, sizeof(ch->ch_wrd));
 	ch->ch_wrd.rd_ring = (struct vmbus_bufring *)ch->ch_ring;



CVS commit: src/sys/dev/hyperv

2019-07-09 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Tue Jul  9 10:07:11 UTC 2019

Modified Files:
src/sys/dev/hyperv: vmbus.c

Log Message:
Zero clear the allocated ring buffer for vmbus_channel.
This change makes Hyper-V's vmbus devices work properly even after reboot.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hyperv/vmbus.c

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



CVS commit: src/sys

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 08:46:59 UTC 2019

Modified Files:
src/sys/arch/powerpc/booke/dev: pq3etsec.c
src/sys/arch/x86/pci: if_vmx.c
src/sys/dev/hyperv: if_hvn.c
src/sys/dev/ic: i82557.c
src/sys/dev/pci: if_age.c if_alc.c if_ale.c if_bge.c if_bnx.c if_jme.c
if_nfe.c if_sip.c if_stge.c if_ti.c if_txp.c if_vge.c if_wm.c
src/sys/net: if_vlan.c

Log Message:
 Don't automatically set ec_capenable's ETHERCAP_VLAN_HWTAGGING bit in
vlan_config() to make it user-controllable. Instead, set the bit in
xxx_attach().


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/powerpc/booke/dev/pq3etsec.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/pci/if_vmx.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hyperv/if_hvn.c
cvs rdiff -u -r1.153 -r1.154 src/sys/dev/ic/i82557.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/if_age.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/if_alc.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/if_ale.c
cvs rdiff -u -r1.334 -r1.335 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/pci/if_bnx.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/if_jme.c
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/pci/if_nfe.c
cvs rdiff -u -r1.173 -r1.174 src/sys/dev/pci/if_sip.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/if_stge.c
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/pci/if_ti.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/if_txp.c
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/if_vge.c
cvs rdiff -u -r1.641 -r1.642 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.138 -r1.139 src/sys/net/if_vlan.c

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



CVS commit: src/sys

2019-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul  9 08:46:59 UTC 2019

Modified Files:
src/sys/arch/powerpc/booke/dev: pq3etsec.c
src/sys/arch/x86/pci: if_vmx.c
src/sys/dev/hyperv: if_hvn.c
src/sys/dev/ic: i82557.c
src/sys/dev/pci: if_age.c if_alc.c if_ale.c if_bge.c if_bnx.c if_jme.c
if_nfe.c if_sip.c if_stge.c if_ti.c if_txp.c if_vge.c if_wm.c
src/sys/net: if_vlan.c

Log Message:
 Don't automatically set ec_capenable's ETHERCAP_VLAN_HWTAGGING bit in
vlan_config() to make it user-controllable. Instead, set the bit in
xxx_attach().


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/powerpc/booke/dev/pq3etsec.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/pci/if_vmx.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hyperv/if_hvn.c
cvs rdiff -u -r1.153 -r1.154 src/sys/dev/ic/i82557.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/if_age.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/if_alc.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/if_ale.c
cvs rdiff -u -r1.334 -r1.335 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/pci/if_bnx.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/if_jme.c
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/pci/if_nfe.c
cvs rdiff -u -r1.173 -r1.174 src/sys/dev/pci/if_sip.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/if_stge.c
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/pci/if_ti.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/if_txp.c
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/if_vge.c
cvs rdiff -u -r1.641 -r1.642 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.138 -r1.139 src/sys/net/if_vlan.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/powerpc/booke/dev/pq3etsec.c
diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.45 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.46
--- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.45	Tue May 28 07:41:48 2019
+++ src/sys/arch/powerpc/booke/dev/pq3etsec.c	Tue Jul  9 08:46:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3etsec.c,v 1.45 2019/05/28 07:41:48 msaitoh Exp $	*/
+/*	$NetBSD: pq3etsec.c,v 1.46 2019/07/09 08:46:58 msaitoh Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -41,7 +41,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.45 2019/05/28 07:41:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.46 2019/07/09 08:46:58 msaitoh Exp $");
 
 #include 
 #include 
@@ -780,6 +780,7 @@ pq3etsec_attach(device_t parent, device_
 
 	ec->ec_capabilities = ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING
 	| ETHERCAP_JUMBO_MTU;
+	ec->ec_capenable = ETHERCAP_VLAN_HWTAGGING;
 
 	strlcpy(ifp->if_xname, xname, IFNAMSIZ);
 	ifp->if_softc = sc;

Index: src/sys/arch/x86/pci/if_vmx.c
diff -u src/sys/arch/x86/pci/if_vmx.c:1.29 src/sys/arch/x86/pci/if_vmx.c:1.30
--- src/sys/arch/x86/pci/if_vmx.c:1.29	Wed May 29 10:07:29 2019
+++ src/sys/arch/x86/pci/if_vmx.c	Tue Jul  9 08:46:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vmx.c,v 1.29 2019/05/29 10:07:29 msaitoh Exp $	*/
+/*	$NetBSD: if_vmx.c,v 1.30 2019/07/09 08:46:58 msaitoh Exp $	*/
 /*	$OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.29 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.30 2019/07/09 08:46:58 msaitoh Exp $");
 
 #include 
 #include 
@@ -1721,7 +1721,9 @@ vmxnet3_setup_interface(struct vmxnet3_s
 
 	sc->vmx_ethercom.ec_if.if_capabilities |= IFCAP_TSOv4 | IFCAP_TSOv6;
 
-	sc->vmx_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
+	sc->vmx_ethercom.ec_capabilities |=
+	ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
+	sc->vmx_ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 
 	IFQ_SET_MAXLEN(>if_snd, sc->vmx_ntxdescs);
 	IFQ_SET_READY(>if_snd);

Index: src/sys/dev/hyperv/if_hvn.c
diff -u src/sys/dev/hyperv/if_hvn.c:1.3 src/sys/dev/hyperv/if_hvn.c:1.4
--- src/sys/dev/hyperv/if_hvn.c:1.3	Wed May 29 10:07:29 2019
+++ src/sys/dev/hyperv/if_hvn.c	Tue Jul  9 08:46:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_hvn.c,v 1.3 2019/05/29 10:07:29 msaitoh Exp $	*/
+/*	$NetBSD: if_hvn.c,v 1.4 2019/07/09 08:46:58 msaitoh Exp $	*/
 /*	$OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.3 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4 2019/07/09 08:46:58 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -284,6 +284,7 @@ hvn_attach(device_t parent, device_t sel
 	if (sc->sc_proto >= HVN_NVS_PROTO_VERSION_2) {
 		sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_HWTAGGING;
 		sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_MTU;
+		sc->sc_ec.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 	}
 
 	IFQ_SET_MAXLEN(>if_snd, HVN_TX_DESC - 1);

Index: src/sys/dev/ic/i82557.c
diff -u src/sys/dev/ic/i82557.c:1.153