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

2019-06-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun  7 06:00:05 UTC 2019

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

Log Message:
put BUILD_LLVMPIPE and it's MKLLVMRT conditional inside the x86 + evbarm
section, so that arm* can build llvmpipe.

the default for arm* and MKLLVMRT remains "no", and for arm64 it does not
actually work yet (faults in "dc cvau", but i don't know why yet).

NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/external/mit/xorg/lib/gallium/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/gallium/Makefile
diff -u src/external/mit/xorg/lib/gallium/Makefile:1.29 src/external/mit/xorg/lib/gallium/Makefile:1.30
--- src/external/mit/xorg/lib/gallium/Makefile:1.29	Sun Jun  2 11:35:55 2019
+++ src/external/mit/xorg/lib/gallium/Makefile	Fri Jun  7 06:00:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2019/06/02 11:35:55 mrg Exp $
+# $NetBSD: Makefile,v 1.30 2019/06/07 06:00:05 mrg Exp $
 
 # Link the gallium mega driver.
 
@@ -90,14 +90,16 @@ BUILD_LLVMPIPE=0
 BUILD_I915=0
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 BUILD_I915=1
-.if ${MKLLVMRT} != "no"
+. if ${MKLLVMRT} != "no"
 BUILD_RADEON=1
-BUILD_LLVMPIPE=1
-.endif
+. endif
 .endif
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || ${MACHINE} == "evbarm"
 BUILD_NOUVEAU=1
 BUILD_VDPAU=1
+. if ${MKLLVMRT} != "no"
+BUILD_LLVMPIPE=1
+. endif
 .endif
 
 DRIVERS=		kms_swrast swrast
@@ -994,6 +996,19 @@ LLVMRT_LIBS+=	\
 		X86TargetInfo \
 		X86Utils
 .endif
+
+.if ${MACHINE_CPU} == "aarch64"
+# XXX duplicates
+LLVMRT_LIBS+=	\
+		AArch64AsmParser \
+		AArch64CodeGen \
+		AArch64MCTargetDesc \
+		AArch64Utils \
+		AArch64AsmPrinter \
+		AArch64Disassembler \
+		AArch64TargetInfo
+.endif
+
 LLVMRT_LIBS+=	\
 		GlobalISel \
 		MCDisassembler \
@@ -1076,11 +1091,13 @@ CPPFLAGS.target.c += \
 CPPFLAGS.target.c += \
 	-DGALLIUM_LLVMPIPE
 .endif  #${BUILD_LLVMPIPE} == 1
+
 .if ${BUILD_I915} == 1
 CPPFLAGS.target.c += \
 	-DGALLIUM_I915 \
 	-DGALLIUM_ILO
 .endif
+
 .if ${BUILD_RADEON} == 1
 CPPFLAGS.target.c += \
 	-DGALLIUM_R200 \



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

2019-06-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun  7 06:00:05 UTC 2019

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

Log Message:
put BUILD_LLVMPIPE and it's MKLLVMRT conditional inside the x86 + evbarm
section, so that arm* can build llvmpipe.

the default for arm* and MKLLVMRT remains "no", and for arm64 it does not
actually work yet (faults in "dc cvau", but i don't know why yet).

NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/external/mit/xorg/lib/gallium/Makefile

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



CVS commit: xsrc/external/mit/xdm/dist/greeter

2019-06-06 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Fri Jun  7 05:49:37 UTC 2019

Modified Files:
xsrc/external/mit/xdm/dist/greeter: Login.c

Log Message:
Center padding around edit fields.
Correct greeting text horizontal position for Logo padding.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xdm/dist/greeter/Login.c

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/xdm/dist/greeter/Login.c
diff -u xsrc/external/mit/xdm/dist/greeter/Login.c:1.5 xsrc/external/mit/xdm/dist/greeter/Login.c:1.6
--- xsrc/external/mit/xdm/dist/greeter/Login.c:1.5	Fri Jun  7 05:01:55 2019
+++ xsrc/external/mit/xdm/dist/greeter/Login.c	Fri Jun  7 05:49:37 2019
@@ -255,7 +255,7 @@ static XtResource resources[] = {
 
 #define Y_ASCENT(w)	max (F_ASCENT(prompt), F_ASCENT(text))
 #define Y_DESCENT(w)	max (F_DESCENT(prompt), F_DESCENT(text))
-#define Y_INC(w)	((Y_ASCENT(w) + Y_DESCENT(w)) * 5 / 4)
+#define Y_INC(w)	(Y_ASCENT(w) + Y_DESCENT(w))
 
 #define CURSOR_W	5
 
@@ -316,7 +316,7 @@ XmuXftTextWidth(Display *dpy, XftFont *f
 
 #define GREETING(w)	((w)->login.secure_session  && !(w)->login.allow_access ?\
 (w)->login.greeting : (w)->login.unsecure_greet)
-#define GREET_X(w)	((int)((w->core.width - \
+#define GREET_X(w)	((int)((w->core.width - LOGO_W(w) + LOGO_PAD(w) - \
 			 	STRING_WIDTH (greet, GREETING(w))) / 2))
 #define GREET_Y(w)	(GREETING(w)[0] ? 2 * GREET_Y_INC (w) : 0)
 #define GREET_W(w)	(max (STRING_WIDTH (greet, w->login.greeting), \
@@ -333,6 +333,7 @@ XmuXftTextWidth(Display *dpy, XftFont *f
 #define PROMPT_H(w)	Y_INC(w)
 
 #define VALUE_HPAD(w,n)	(TEXT_X_INC(w)/8)
+#define VALUE_VPAD(w,n)	((Y_INC(w)+3)/4)
 #define VALUE_X(w,n)	(PROMPT_X(w) + CUR_PROMPT_W(w,n) + VALUE_HPAD(w,n))
 #define VALUE_Y(w,n)	(PROMPT_Y(w,n))
 #define VALUE_W(w,n)	(PROMPT_W(w) - VALUE_X(w,n) + PROMPT_X(w) - CURSOR_W)
@@ -388,7 +389,7 @@ realizeValue (LoginWidget w, int cursor,
 x = VALUE_X (w,promptNum) + VALUE_HPAD(w,promptNum);
 y = VALUE_Y (w,promptNum);
 
-height = Y_INC(w);
+height = VALUE_H(w,promptNum);
 width = VALUE_W(w,promptNum);
 
 offset = VALUE_SHOW_START(w, promptNum);
@@ -742,11 +743,13 @@ draw_it (LoginWidget w)
 for (p = 0; p < NUM_PROMPTS ; p++)
 {
 	int in_frame_x = VALUE_X(w,p) - w->login.inframeswidth;
-	int in_frame_y = VALUE_Y(w,p) - Y_ASCENT(w) - w->login.inframeswidth;
+	int in_frame_y = VALUE_Y(w,p) - Y_ASCENT(w) - w->login.inframeswidth
+		- VALUE_VPAD(w,p);
 
 	int in_width = VALUE_W(w,p) + CURSOR_W + 2 * w->login.inframeswidth
 		+ 2 * VALUE_HPAD(w,p);
-	int in_height = Y_INC(w) + 2 * w->login.inframeswidth;
+	int in_height = VALUE_H(w,p) + 2 * w->login.inframeswidth
+		+ 2 * VALUE_VPAD(w,p);
 
 	GC topLeftGC, botRightGC, inpGC;
 
@@ -788,12 +791,8 @@ draw_it (LoginWidget w)
 }
 
 if (GREETING(w)[0]) {
-	int gx = GREET_X(w);
-
-#ifdef XPM
-	gx -= ((w->login.logoWidth/2) + w->login.logoPadding);
-#endif
-	DRAW_STRING (greet, gx, GREET_Y(w), GREETING(w), strlen (GREETING(w)));
+	DRAW_STRING (greet, GREET_X(w), GREET_Y(w),
+		 GREETING(w), strlen (GREETING(w)));
 }
 for (p = 0; p < NUM_PROMPTS ; p++) {
 	if (PROMPT_STATE(w, p) != LOGIN_PROMPT_NOT_SHOWN) {



CVS commit: xsrc/external/mit/xdm/dist/greeter

2019-06-06 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Fri Jun  7 05:49:37 UTC 2019

Modified Files:
xsrc/external/mit/xdm/dist/greeter: Login.c

Log Message:
Center padding around edit fields.
Correct greeting text horizontal position for Logo padding.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xdm/dist/greeter/Login.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/puffs/mount_9p

2019-06-06 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Jun  7 05:34:34 UTC 2019

Modified Files:
src/usr.sbin/puffs/mount_9p: mount_9p.8 nineproto.c ninepuffs.h node.c
subr.c

Log Message:
Handle Rerror and return errno correctly (only for 9P2000.u for now)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/puffs/mount_9p/mount_9p.8
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/puffs/mount_9p/nineproto.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/puffs/mount_9p/ninepuffs.h
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/puffs/mount_9p/node.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/mount_9p/subr.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/puffs/mount_9p

2019-06-06 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Jun  7 05:34:34 UTC 2019

Modified Files:
src/usr.sbin/puffs/mount_9p: mount_9p.8 nineproto.c ninepuffs.h node.c
subr.c

Log Message:
Handle Rerror and return errno correctly (only for 9P2000.u for now)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/puffs/mount_9p/mount_9p.8
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/puffs/mount_9p/nineproto.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/puffs/mount_9p/ninepuffs.h
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/puffs/mount_9p/node.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/mount_9p/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/usr.sbin/puffs/mount_9p/mount_9p.8
diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.9 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.10
--- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.9	Fri May 17 08:56:12 2019
+++ src/usr.sbin/puffs/mount_9p/mount_9p.8	Fri Jun  7 05:34:34 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount_9p.8,v 1.9 2019/05/17 08:56:12 wiz Exp $
+.\"	$NetBSD: mount_9p.8,v 1.10 2019/06/07 05:34:34 ozaki-r Exp $
 .\"
 .\" Copyright (c) 2007 Antti Kantee.  All rights reserved.
 .\"
@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd May 15, 2019
+.Dd June 7, 2019
 .Dt MOUNT_9P 8
 .Os
 .Sh NAME
@@ -92,7 +92,7 @@ Permissions are not handled well.
 .Pp
 Authentication support is missing.
 .Pp
-Error code handling is missing.
+Error code handling is missing for 9P2000.
 .Pp
 Under construction.
 .Pp

Index: src/usr.sbin/puffs/mount_9p/nineproto.c
diff -u src/usr.sbin/puffs/mount_9p/nineproto.c:1.10 src/usr.sbin/puffs/mount_9p/nineproto.c:1.11
--- src/usr.sbin/puffs/mount_9p/nineproto.c:1.10	Fri May 17 08:48:04 2019
+++ src/usr.sbin/puffs/mount_9p/nineproto.c	Fri Jun  7 05:34:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nineproto.c,v 1.10 2019/05/17 08:48:04 ozaki-r Exp $	*/
+/*	$NetBSD: nineproto.c,v 1.11 2019/06/07 05:34:34 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2007  Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: nineproto.c,v 1.10 2019/05/17 08:48:04 ozaki-r Exp $");
+__RCSID("$NetBSD: nineproto.c,v 1.11 2019/06/07 05:34:34 ozaki-r Exp $");
 #endif /* !lint */
 
 #include 
@@ -188,6 +188,49 @@ proto_getstat(struct puffs_usermount *pu
 	return 0;
 }
 
+static int
+proto_rerror(struct puffs_usermount *pu, struct puffs_framebuf *pb,
+uint32_t *_errno)
+{
+	struct puffs9p *p9p = puffs_getspecific(pu);
+	uint16_t size;
+	int rv;
+	char *name;
+
+	/* Skip size[4] Rerror tag[2] */
+	rv = puffs_framebuf_seekset(pb,
+	sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t));
+	if (rv == -1)
+		return EPROTO;
+
+	rv = p9pbuf_get_str(pb, &name, &size);
+	if (rv != 0)
+		return rv;
+	if (p9p->protover == P9PROTO_VERSION_U) {
+		rv = p9pbuf_get_4(pb, _errno);
+	} else {
+		/* TODO Convert error string to errno */
+		rv = EPROTO;
+	}
+
+	return rv;
+}
+
+int
+proto_handle_rerror(struct puffs_usermount *pu, struct puffs_framebuf *pb)
+{
+	int rv;
+	uint32_t _errno;
+
+	if (p9pbuf_get_type(pb) != P9PROTO_R_ERROR)
+		return EPROTO;
+
+	rv = proto_rerror(pu, pb, &_errno);
+	if (rv == 0)
+		rv = _errno;
+	return rv;
+}
+
 int
 proto_cc_dupfid(struct puffs_usermount *pu, p9pfid_t oldfid, p9pfid_t newfid)
 {
@@ -206,7 +249,7 @@ proto_cc_dupfid(struct puffs_usermount *
 	p9pbuf_put_2(pb, 0);
 	GETRESPONSE(pb);
 
-	rv = proto_expect_walk_nqids(pb, &qids);
+	rv = proto_expect_walk_nqids(pu, pb, &qids);
 	if (rv == 0 && qids != 0)
 		rv = EPROTO;
 
@@ -232,7 +275,7 @@ proto_cc_clunkfid(struct puffs_usermount
 	if (waitforit) {
 		if (puffs_framev_enqueue_cc(pcc, p9p->servsock, pb, 0) == 0) {
 			if (p9pbuf_get_type(pb) != P9PROTO_R_CLUNK)
-rv = EPROTO;
+rv = proto_handle_rerror(pu, pb);
 		} else {
 			rv = errno;
 		}
@@ -269,7 +312,7 @@ proto_cc_open(struct puffs_usermount *pu
 	p9pbuf_put_1(pb, mode);
 	GETRESPONSE(pb);
 	if (p9pbuf_get_type(pb) != P9PROTO_R_OPEN)
-		rv = EPROTO;
+		rv = proto_handle_rerror(pu, pb);
 
  out:
 	puffs_framebuf_destroy(pb);
@@ -349,20 +392,22 @@ proto_make_stat(struct puffs_usermount *
 }
 
 int
-proto_expect_walk_nqids(struct puffs_framebuf *pb, uint16_t *nqids)
+proto_expect_walk_nqids(struct puffs_usermount *pu, struct puffs_framebuf *pb,
+uint16_t *nqids)
 {
 
 	if (p9pbuf_get_type(pb) != P9PROTO_R_WALK)
-		return EPROTO;
+		return proto_handle_rerror(pu, pb);
 	return p9pbuf_get_2(pb, nqids);
 }
 
 int
-proto_expect_qid(struct puffs_framebuf *pb, uint8_t op, struct qid9p *qid)
+proto_expect_qid(struct puffs_usermount *pu, struct puffs_framebuf *pb,
+uint8_t op, struct qid9p *qid)
 {
 
 	if (p9pbuf_get_type(pb) != op)
-		return EPROTO;
+		return proto_handle_rerror(pu, pb);
 	return proto_getqid(pb, qid);
 }
 
@@ -374,7 +419,7 @@ proto_expect_stat(struct puffs_usermount
 	int rv;
 
 	if (p9p

CVS commit: src/external/bsd/llvm/include

2019-06-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun  7 05:22:28 UTC 2019

Modified Files:
src/external/bsd/llvm/include: Makefile

Log Message:
also fix up LLVM_HOST_TRIPLE.

previously, this was attempting to emit x86 code on arm.

thanks joerg@ for pointing me in the right place.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/external/bsd/llvm/include/Makefile

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

Modified files:

Index: src/external/bsd/llvm/include/Makefile
diff -u src/external/bsd/llvm/include/Makefile:1.49 src/external/bsd/llvm/include/Makefile:1.50
--- src/external/bsd/llvm/include/Makefile:1.49	Wed Apr  3 15:21:58 2019
+++ src/external/bsd/llvm/include/Makefile	Fri Jun  7 05:22:28 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.49 2019/04/03 15:21:58 joerg Exp $
+#	$NetBSD: Makefile,v 1.50 2019/06/07 05:22:28 mrg Exp $
 
 .include 
 
@@ -294,11 +294,15 @@ NATIVE_LLVM_TARGETMC=		LLVMInitialize${N
 
 llvm/Config/config.h: ${LLVM_TOPLEVEL}/Makefile.inc ${LLVM_TOPLEVEL}/config/llvm/Config/config.h.in
 	mkdir -p ${.TARGET:H}
-	${TOOL_SED} -e /LLVM_DEFAULT_TARGET_TRIPLE/d -e /LLVM_NATIVE_/d \
-	-e /LLVM_VERSION_/d -e /PACKAGE_VERSION/d -e 'x' \
+	${TOOL_SED} -e /LLVM_DEFAULT_TARGET_TRIPLE/d \
+		-e /LLVM_HOST_TRIPLE/d \
+		-e /LLVM_NATIVE_/d \
+		-e /LLVM_VERSION_/d \
+		-e /PACKAGE_VERSION/d -e 'x' \
 	< ${LLVM_TOPLEVEL}/config/llvm/Config/config.h.in \
 	> ${.TARGET}.tmp
 	printf '#define LLVM_DEFAULT_TARGET_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
+	printf '#define LLVM_HOST_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
 .if defined(NATIVE_LLVM_ARCH)
 	printf '#define LLVM_NATIVE_ARCH ${NATIVE_LLVM_ARCH}\n' >> ${.TARGET}.tmp
 	printf '#define LLVM_NATIVE_ASMPARSER ${NATIVE_LLVM_ASMPARSER}\n' >> ${.TARGET}.tmp
@@ -318,11 +322,15 @@ llvm/Config/config.h: ${LLVM_TOPLEVEL}/M
 
 llvm/Config/llvm-config.h: ${LLVM_TOPLEVEL}/Makefile.inc ${LLVM_TOPLEVEL}/config/llvm/Config/llvm-config.h.in
 	mkdir -p ${.TARGET:H}
-	${TOOL_SED} -e /LLVM_DEFAULT_TARGET_TRIPLE/d -e /LLVM_NATIVE_/d \
-	-e /LLVM_VERSION_/d -e /PACKAGE_VERSION/d -e 'x' \
+	${TOOL_SED} -e /LLVM_DEFAULT_TARGET_TRIPLE/d \
+		-e /LLVM_HOST_TRIPLE/d \
+		-e /LLVM_NATIVE_/d \
+		-e /LLVM_VERSION_/d \
+		-e /PACKAGE_VERSION/d -e 'x' \
 	< ${LLVM_TOPLEVEL}/config/llvm/Config/llvm-config.h.in \
 	> ${.TARGET}.tmp
 	printf '#define LLVM_DEFAULT_TARGET_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
+	printf '#define LLVM_HOST_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
 .if defined(NATIVE_LLVM_ARCH)
 	printf '#define LLVM_NATIVE_ARCH ${NATIVE_LLVM_ARCH}\n' >> ${.TARGET}.tmp
 	printf '#define LLVM_NATIVE_ASMPARSER ${NATIVE_LLVM_ASMPARSER}\n' >> ${.TARGET}.tmp



CVS commit: src/external/bsd/llvm/include

2019-06-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun  7 05:22:28 UTC 2019

Modified Files:
src/external/bsd/llvm/include: Makefile

Log Message:
also fix up LLVM_HOST_TRIPLE.

previously, this was attempting to emit x86 code on arm.

thanks joerg@ for pointing me in the right place.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/external/bsd/llvm/include/Makefile

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



CVS commit: xsrc/external/mit/xdm/dist/greeter

2019-06-06 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Fri Jun  7 05:01:55 UTC 2019

Modified Files:
xsrc/external/mit/xdm/dist/greeter: Login.c

Log Message:
Add visible padding to edit fields.
Vertically: 25% of field height.
Horizontally: 25% of character width.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xdm/dist/greeter/Login.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/xdm/dist/greeter

2019-06-06 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Fri Jun  7 05:01:55 UTC 2019

Modified Files:
xsrc/external/mit/xdm/dist/greeter: Login.c

Log Message:
Add visible padding to edit fields.
Vertically: 25% of field height.
Horizontally: 25% of character width.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xdm/dist/greeter/Login.c

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/xdm/dist/greeter/Login.c
diff -u xsrc/external/mit/xdm/dist/greeter/Login.c:1.4 xsrc/external/mit/xdm/dist/greeter/Login.c:1.5
--- xsrc/external/mit/xdm/dist/greeter/Login.c:1.4	Fri Jun  7 04:29:02 2019
+++ xsrc/external/mit/xdm/dist/greeter/Login.c	Fri Jun  7 05:01:55 2019
@@ -255,7 +255,7 @@ static XtResource resources[] = {
 
 #define Y_ASCENT(w)	max (F_ASCENT(prompt), F_ASCENT(text))
 #define Y_DESCENT(w)	max (F_DESCENT(prompt), F_DESCENT(text))
-#define Y_INC(w)	(Y_ASCENT(w) + Y_DESCENT(w))
+#define Y_INC(w)	((Y_ASCENT(w) + Y_DESCENT(w)) * 5 / 4)
 
 #define CURSOR_W	5
 
@@ -332,7 +332,8 @@ XmuXftTextWidth(Display *dpy, XftFont *f
 #define PROMPT_W(w)	(w->core.width - PROMPT_X(w) - 2 * TEXT_X_INC(w) - LOGO_W(w))
 #define PROMPT_H(w)	Y_INC(w)
 
-#define VALUE_X(w,n)	(PROMPT_X(w) + CUR_PROMPT_W(w,n))
+#define VALUE_HPAD(w,n)	(TEXT_X_INC(w)/8)
+#define VALUE_X(w,n)	(PROMPT_X(w) + CUR_PROMPT_W(w,n) + VALUE_HPAD(w,n))
 #define VALUE_Y(w,n)	(PROMPT_Y(w,n))
 #define VALUE_W(w,n)	(PROMPT_W(w) - VALUE_X(w,n) + PROMPT_X(w) - CURSOR_W)
 #define VALUE_H(w,n)	Y_INC(w)
@@ -384,7 +385,7 @@ realizeValue (LoginWidget w, int cursor,
 	text[i] = 0;
 }
 
-x = VALUE_X (w,promptNum);
+x = VALUE_X (w,promptNum) + VALUE_HPAD(w,promptNum);
 y = VALUE_Y (w,promptNum);
 
 height = Y_INC(w);
@@ -468,7 +469,8 @@ realizeCursor (LoginWidget w, GC gc)
 	return;
 }
 
-x = VALUE_X (w, w->login.activePrompt);
+x = VALUE_X (w, w->login.activePrompt)
+  + VALUE_HPAD(w, w->login.activePrompt);
 y = VALUE_Y (w, w->login.activePrompt);
 ascent = F_ASCENT(text);
 descent = F_DESCENT(text);
@@ -742,7 +744,8 @@ draw_it (LoginWidget w)
 	int in_frame_x = VALUE_X(w,p) - w->login.inframeswidth;
 	int in_frame_y = VALUE_Y(w,p) - Y_ASCENT(w) - w->login.inframeswidth;
 
-	int in_width = VALUE_W(w,p) + CURSOR_W + 2 * w->login.inframeswidth;
+	int in_width = VALUE_W(w,p) + CURSOR_W + 2 * w->login.inframeswidth
+		+ 2 * VALUE_HPAD(w,p);
 	int in_height = Y_INC(w) + 2 * w->login.inframeswidth;
 
 	GC topLeftGC, botRightGC, inpGC;



CVS commit: src/sys/dev/pci

2019-06-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Jun  7 04:39:15 UTC 2019

Modified Files:
src/sys/dev/pci: if_wm.c if_wmreg.h

Log Message:
 Use unsigned. Found by UBSan. OK'd by kamil.


To generate a diff of this commit:
cvs rdiff -u -r1.639 -r1.640 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/pci/if_wmreg.h

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.639 src/sys/dev/pci/if_wm.c:1.640
--- src/sys/dev/pci/if_wm.c:1.639	Tue May 28 08:59:35 2019
+++ src/sys/dev/pci/if_wm.c	Fri Jun  7 04:39:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.639 2019/05/28 08:59:35 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.640 2019/06/07 04:39:15 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.639 2019/05/28 08:59:35 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.640 2019/06/07 04:39:15 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -3541,9 +3541,9 @@ wm_set_ral(struct wm_softc *sc, const ui
 	int rv;
 
 	if (enaddr != NULL) {
-		ral_lo = enaddr[0] | (enaddr[1] << 8) | (enaddr[2] << 16) |
-		(enaddr[3] << 24);
-		ral_hi = enaddr[4] | (enaddr[5] << 8);
+		ral_lo = (uint32_t)enaddr[0] | ((uint32_t)enaddr[1] << 8) |
+		((uint32_t)enaddr[2] << 16) | ((uint32_t)enaddr[3] << 24);
+		ral_hi = (uint32_t)enaddr[4] | ((uint32_t)enaddr[5] << 8);
 		ral_hi |= RAL_AV;
 	} else {
 		ral_lo = 0;
@@ -5198,7 +5198,7 @@ wm_init_rss(struct wm_softc *sc)
 	CTASSERT(sizeof(rss_key) == RSS_KEYSIZE);
 
 	for (i = 0; i < RETA_NUM_ENTRIES; i++) {
-		int qid, reta_ent;
+		unsigned int qid, reta_ent;
 
 		qid  = i % sc->sc_nqueues;
 		switch (sc->sc_type) {
@@ -5915,9 +5915,9 @@ wm_init_locked(struct ifnet *ifp)
 
 	/* Set registers about MSI-X */
 	if (wm_is_using_msix(sc)) {
-		uint32_t ivar;
+		uint32_t ivar, qintr_idx;
 		struct wm_queue *wmq;
-		int qid, qintr_idx;
+		unsigned int qid;
 
 		if (sc->sc_type == WM_T_82575) {
 			/* Interrupt control */

Index: src/sys/dev/pci/if_wmreg.h
diff -u src/sys/dev/pci/if_wmreg.h:1.113 src/sys/dev/pci/if_wmreg.h:1.114
--- src/sys/dev/pci/if_wmreg.h:1.113	Thu Feb 28 16:56:35 2019
+++ src/sys/dev/pci/if_wmreg.h	Fri Jun  7 04:39:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmreg.h,v 1.113 2019/02/28 16:56:35 khorben Exp $	*/
+/*	$NetBSD: if_wmreg.h,v 1.114 2019/06/07 04:39:15 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -720,17 +720,17 @@ struct livengood_tcpip_ctxdesc {
 #define IVAR_VALID   __BIT(7)
 /* IVAR definitions for 82580 and newer */
 #define WMREG_IVAR_Q(x)	(WMREG_IVAR0 + ((x) / 2) * 4)
-#define IVAR_TX_MASK_Q(x) (0x00ff << (((x) % 2) == 0 ? 8 : 24))
-#define IVAR_RX_MASK_Q(x) (0x00ff << (((x) % 2) == 0 ? 0 : 16))
+#define IVAR_TX_MASK_Q(x) (0x00ffUL << (((x) % 2) == 0 ? 8 : 24))
+#define IVAR_RX_MASK_Q(x) (0x00ffUL << (((x) % 2) == 0 ? 0 : 16))
 /* IVAR definitions for 82576 */
 #define WMREG_IVAR_Q_82576(x)	(WMREG_IVAR0 + ((x) & 0x7) * 4)
-#define IVAR_TX_MASK_Q_82576(x) (0x00ff << (((x) / 8) == 0 ? 8 : 24))
-#define IVAR_RX_MASK_Q_82576(x) (0x00ff << (((x) / 8) == 0 ? 0 : 16))
+#define IVAR_TX_MASK_Q_82576(x) (0x00ffUL << (((x) / 8) == 0 ? 8 : 24))
+#define IVAR_RX_MASK_Q_82576(x) (0x00ffUL << (((x) / 8) == 0 ? 0 : 16))
 /* IVAR definitions for 82574 */
 #define IVAR_ALLOC_MASK_82574	__BITS(0, 2)
 #define IVAR_VALID_82574	__BIT(3)
-#define IVAR_TX_MASK_Q_82574(x) (0x000f << ((x) == 0 ? 8 : 12))
-#define IVAR_RX_MASK_Q_82574(x) (0x000f << ((x) == 0 ? 0 : 4))
+#define IVAR_TX_MASK_Q_82574(x) (0x000fUL << ((x) == 0 ? 8 : 12))
+#define IVAR_RX_MASK_Q_82574(x) (0x000fUL << ((x) == 0 ? 0 : 4))
 #define IVAR_OTHER_MASK		__BITS(16, 19)
 #define IVAR_INT_ON_ALL_WB	__BIT(31)
 



CVS commit: src/sys/dev/pci

2019-06-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Jun  7 04:39:15 UTC 2019

Modified Files:
src/sys/dev/pci: if_wm.c if_wmreg.h

Log Message:
 Use unsigned. Found by UBSan. OK'd by kamil.


To generate a diff of this commit:
cvs rdiff -u -r1.639 -r1.640 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/pci/if_wmreg.h

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



CVS commit: xsrc/external/mit/xdm/dist/greeter

2019-06-06 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Fri Jun  7 04:29:03 UTC 2019

Modified Files:
xsrc/external/mit/xdm/dist/greeter: Login.c

Log Message:
Respect the outer border width for sizing the widget horizontally.
Add it twice so that the greeting text can neither trash nor touch
the border.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xdm/dist/greeter/Login.c

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/xdm/dist/greeter/Login.c
diff -u xsrc/external/mit/xdm/dist/greeter/Login.c:1.3 xsrc/external/mit/xdm/dist/greeter/Login.c:1.4
--- xsrc/external/mit/xdm/dist/greeter/Login.c:1.3	Fri Jun  7 04:00:43 2019
+++ xsrc/external/mit/xdm/dist/greeter/Login.c	Fri Jun  7 04:29:02 2019
@@ -345,7 +345,7 @@ XmuXftTextWidth(Display *dpy, XftFont *f
 #define FAIL_W(w)	max(ERROR_W(w, w->login.failMsg), \
 			ERROR_W(w, w->login.passwdChangeMsg))
 
-#define PAD_X(w)	(2 * (PROMPT_X(w) + max (GREET_X_INC(w), FAIL_X_INC(w
+#define PAD_X(w)	(2 * (PROMPT_X(w) + max (GREET_X_INC(w), FAIL_X_INC(w)) + 4*w->login.outframewidth))
 #define PAD_Y(w)	(max (max (Y_INC(w), GREET_Y_INC(w)),\
 			 FAIL_Y_INC(w)))
 



CVS commit: xsrc/external/mit/xdm/dist/greeter

2019-06-06 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Fri Jun  7 04:29:03 UTC 2019

Modified Files:
xsrc/external/mit/xdm/dist/greeter: Login.c

Log Message:
Respect the outer border width for sizing the widget horizontally.
Add it twice so that the greeting text can neither trash nor touch
the border.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xdm/dist/greeter/Login.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/xdm/dist/greeter

2019-06-06 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Fri Jun  7 04:00:43 UTC 2019

Modified Files:
xsrc/external/mit/xdm/dist/greeter: Login.c

Log Message:
Cursor position was two pixels off to the left.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xdm/dist/greeter/Login.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/xdm/dist/greeter

2019-06-06 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Fri Jun  7 04:00:43 UTC 2019

Modified Files:
xsrc/external/mit/xdm/dist/greeter: Login.c

Log Message:
Cursor position was two pixels off to the left.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xdm/dist/greeter/Login.c

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/xdm/dist/greeter/Login.c
diff -u xsrc/external/mit/xdm/dist/greeter/Login.c:1.2 xsrc/external/mit/xdm/dist/greeter/Login.c:1.3
--- xsrc/external/mit/xdm/dist/greeter/Login.c:1.2	Sat Jun  1 07:54:12 2019
+++ xsrc/external/mit/xdm/dist/greeter/Login.c	Fri Jun  7 04:00:43 2019
@@ -506,6 +506,8 @@ realizeCursor (LoginWidget w, GC gc)
 	break;
 }
 
+x += 2;
+
 XFillRectangle (XtDisplay (w), XtWindow (w), gc,
 		x, y - ascent + 1, 1, ascent + descent - 2);
 



CVS commit: src/sys/arch/sparc/sparc

2019-06-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun  7 00:18:26 UTC 2019

Modified Files:
src/sys/arch/sparc/sparc: locore.s

Log Message:
remove code to directly check for NULL savefpstate() calls.
it has not triggered for years now, and if it comes back,
you still get a normal kernel fault.


To generate a diff of this commit:
cvs rdiff -u -r1.273 -r1.274 src/sys/arch/sparc/sparc/locore.s

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



CVS commit: src/sys/arch/sparc/sparc

2019-06-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun  7 00:18:26 UTC 2019

Modified Files:
src/sys/arch/sparc/sparc: locore.s

Log Message:
remove code to directly check for NULL savefpstate() calls.
it has not triggered for years now, and if it comes back,
you still get a normal kernel fault.


To generate a diff of this commit:
cvs rdiff -u -r1.273 -r1.274 src/sys/arch/sparc/sparc/locore.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/sparc/sparc/locore.s
diff -u src/sys/arch/sparc/sparc/locore.s:1.273 src/sys/arch/sparc/sparc/locore.s:1.274
--- src/sys/arch/sparc/sparc/locore.s:1.273	Sat Apr  6 03:06:27 2019
+++ src/sys/arch/sparc/sparc/locore.s	Fri Jun  7 00:18:26 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.273 2019/04/06 03:06:27 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.274 2019/06/07 00:18:26 mrg Exp $	*/
 
 /*
  * Copyright (c) 1996 Paul Kranenburg
@@ -5649,8 +5649,6 @@ ENTRY(ipi_savefpstate)
 
 ENTRY(savefpstate)
 	cmp	%o0, 0
-	bz	Lfp_null_fpstate
-	 nop
 	rd	%psr, %o1		! enable FP before we begin
 	set	PSR_EF, %o2
 	or	%o1, %o2, %o1
@@ -5692,22 +5690,6 @@ Lfp_finish:
 	retl
 	 std	%f30, [%o0 + FS_REGS + (4*30)]
 
-/* Handle NULL fpstate argument for savefpstate */
-Lfp_null_fpstate:
-#ifdef DIAGNOSTIC
-	ld	[%o5 + CPUINFO_CPUNO], %o1
-	sethi	%hi(Lpanic_savefpstate), %o0
-	call	_C_LABEL(panic)
-	 or	%o0, %lo(Lpanic_savefpstate), %o0
-#else
-	sethi	%hi(CPUINFO_VA), %o5
-	ldd	[%o5 + CPUINFO_SAVEFPSTATE_NULL], %o2
-	inccc   %o3
-	addx%o2, 0, %o2
-	retl
-	 std	%o2, [%o5 + CPUINFO_SAVEFPSTATE_NULL]
-#endif
-
 /*
  * Store the (now known nonempty) FP queue.
  * We have to reread the fsr each time in order to get the new QNE bit.



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

2019-06-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun  6 23:19:07 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sun8i_codec.c sunxi_i2s.c

Log Message:
Update compatible strings for mainline


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sun8i_codec.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_i2s.c

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

Modified files:

Index: src/sys/arch/arm/sunxi/sun8i_codec.c
diff -u src/sys/arch/arm/sunxi/sun8i_codec.c:1.6 src/sys/arch/arm/sunxi/sun8i_codec.c:1.7
--- src/sys/arch/arm/sunxi/sun8i_codec.c:1.6	Wed May  8 13:40:14 2019
+++ src/sys/arch/arm/sunxi/sun8i_codec.c	Thu Jun  6 23:19:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun8i_codec.c,v 1.6 2019/05/08 13:40:14 isaki Exp $ */
+/* $NetBSD: sun8i_codec.c,v 1.7 2019/06/06 23:19:07 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sun8i_codec.c,v 1.6 2019/05/08 13:40:14 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun8i_codec.c,v 1.7 2019/06/06 23:19:07 jmcneill Exp $");
 
 #include 
 #include 
@@ -333,7 +333,7 @@ sun8i_codec_thread(struct work *wk, void
 }
 
 static const char * compatible[] = {
-	"allwinner,sun50i-a64-codec",
+	"allwinner,sun8i-a33-codec",
 	NULL
 };
 

Index: src/sys/arch/arm/sunxi/sunxi_i2s.c
diff -u src/sys/arch/arm/sunxi/sunxi_i2s.c:1.4 src/sys/arch/arm/sunxi/sunxi_i2s.c:1.5
--- src/sys/arch/arm/sunxi/sunxi_i2s.c:1.4	Wed May  8 13:40:14 2019
+++ src/sys/arch/arm/sunxi/sunxi_i2s.c	Thu Jun  6 23:19:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_i2s.c,v 1.4 2019/05/08 13:40:14 isaki Exp $ */
+/* $NetBSD: sunxi_i2s.c,v 1.5 2019/06/06 23:19:07 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,v 1.4 2019/05/08 13:40:14 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,v 1.5 2019/06/06 23:19:07 jmcneill Exp $");
 
 #include 
 #include 
@@ -108,7 +108,7 @@ static const struct sunxi_i2s_config sun
 };
 
 static const struct of_compat_data compat_data[] = {
-	{ "allwinner,sun50i-a64-acodec-i2s",
+	{ "allwinner,sun50i-a64-codec-i2s",
 	  (uintptr_t)&sun50i_a64_codec_config },
 
 	{ NULL }



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

2019-06-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun  6 23:19:07 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sun8i_codec.c sunxi_i2s.c

Log Message:
Update compatible strings for mainline


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sun8i_codec.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_i2s.c

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



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

2019-06-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun  6 23:19:45 UTC 2019

Modified Files:
src/sys/arch/arm/dts: sun50i-a64-pinebook.dts sun50i-a64.dtsi

Log Message:
Remove audio related nodes (they are present in mainline dts now)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/dts/sun50i-a64.dtsi

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

Modified files:

Index: src/sys/arch/arm/dts/sun50i-a64-pinebook.dts
diff -u src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.15 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.16
--- src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.15	Sun Feb  3 13:19:20 2019
+++ src/sys/arch/arm/dts/sun50i-a64-pinebook.dts	Thu Jun  6 23:19:45 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i-a64-pinebook.dts,v 1.15 2019/02/03 13:19:20 jmcneill Exp $ */
+/* $NetBSD: sun50i-a64-pinebook.dts,v 1.16 2019/06/06 23:19:45 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017-2019 Jared McNeill 
@@ -91,18 +91,6 @@
 	status = "okay";
 };
 
-&codec_analog {
-	status = "okay";
-};
-
-&dai {
-	status = "okay";
-};
-
-&sound {
-	status = "okay";
-};
-
 &de {
 	status = "okay";
 };

Index: src/sys/arch/arm/dts/sun50i-a64.dtsi
diff -u src/sys/arch/arm/dts/sun50i-a64.dtsi:1.10 src/sys/arch/arm/dts/sun50i-a64.dtsi:1.11
--- src/sys/arch/arm/dts/sun50i-a64.dtsi:1.10	Tue Jan 22 15:28:45 2019
+++ src/sys/arch/arm/dts/sun50i-a64.dtsi	Thu Jun  6 23:19:45 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i-a64.dtsi,v 1.10 2019/01/22 15:28:45 jmcneill Exp $ */
+/* $NetBSD: sun50i-a64.dtsi,v 1.11 2019/06/06 23:19:45 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -40,53 +40,7 @@
 		};
 	};
 
-	sound: sound {
-		compatible = "simple-audio-card";
-		simple-audio-card,name = "SUN50I Audio Card";
-		simple-audio-card,format = "i2s";
-		simple-audio-card,frame-master = <&cpudai>;
-		simple-audio-card,bitclock-master = <&cpudai>;
-		simple-audio-card,mclk-fs = <512>;
-		simple-audio-card,aux-devs = <&codec_analog>;
-		simple-audio-card,routing =
-"Left DAC", "AIF1 Slot 0 Left",
-"Right DAC", "AIF1 Slot 0 Right";
-		status = "disabled";
-
-		cpudai: simple-audio-card,cpu {
-			sound-dai = <&dai>;
-		};
-
-		link_codec: simple-audio-card,codec {
-			sound-dai = <&codec>;
-		};
-	};
-
 	soc {
-		dai: dai@1c22c00 {
-			#sound-dai-cells = <0>;
-			compatible = "allwinner,sun50i-a64-acodec-i2s";
-			reg = <0x01c22c00 0x200>;
-			interrupts = ;
-			clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
-			clock-names = "apb", "mod";
-			resets = <&ccu RST_BUS_CODEC>;
-			reset-names = "rst";
-			dmas = <&dma 15>, <&dma 15>;
-			dma-names = "rx", "tx";
-			status = "disabled";
-		};
-
-		codec: codec@1c22e00 {
-			#sound-dai-cells = <0>;
-			compatible = "allwinner,sun50i-a64-codec";
-			reg = <0x01c22e00 0x600>;
-			interrupts = ;
-			clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
-			clock-names = "bus", "mod";
-			status = "disabled";
-		};
-
 		rtp: rtp@1c25000 {
 			compatible = "allwinner,sun50i-a64-ts";
 			reg = <0x01c25000 0x400>;
@@ -96,12 +50,6 @@
 			resets = <&ccu RST_BUS_THS>;
 			#thermal-sensor-cells = <0>;
 		};
-
-		codec_analog: codec-analog@1f015c0 {
-			compatible = "allwinner,sun50i-a64-codec-analog";
-			reg = <0x01f015c0 0x4>;
-			status = "disabled";
-		};
 	};
 };
 



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

2019-06-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun  6 23:19:45 UTC 2019

Modified Files:
src/sys/arch/arm/dts: sun50i-a64-pinebook.dts sun50i-a64.dtsi

Log Message:
Remove audio related nodes (they are present in mainline dts now)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/dts/sun50i-a64.dtsi

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



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

2019-06-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun  6 22:41:02 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC GENERIC64

Log Message:
Attach sunxi dma controllers earlier.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/evbarm/conf/GENERIC
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/evbarm/conf/GENERIC64

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



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

2019-06-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun  6 22:41:02 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC GENERIC64

Log Message:
Attach sunxi dma controllers earlier.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/evbarm/conf/GENERIC
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/evbarm/conf/GENERIC64

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

Modified files:

Index: src/sys/arch/evbarm/conf/GENERIC
diff -u src/sys/arch/evbarm/conf/GENERIC:1.36 src/sys/arch/evbarm/conf/GENERIC:1.37
--- src/sys/arch/evbarm/conf/GENERIC:1.36	Wed Jun  5 03:38:09 2019
+++ src/sys/arch/evbarm/conf/GENERIC	Thu Jun  6 22:41:02 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC,v 1.36 2019/06/05 03:38:09 thorpej Exp $
+#	$NetBSD: GENERIC,v 1.37 2019/06/06 22:41:02 jmcneill Exp $
 #
 #	GENERIC ARM (aarch32) kernel
 #
@@ -315,8 +315,8 @@ vcmbox*		at bcmmbox?
 
 # DMA controller
 bcmdmac*	at fdt?			# Broadcom BCM283x DMA controller
-sun4idma*   at fdt?			# Allwinner DMA controller (sun4i)
-sun6idma*	at fdt?			# Allwinner DMA controller (sun6i)
+sun4idma*	at fdt? pass 4		# Allwinner DMA controller (sun4i)
+sun6idma*	at fdt?	pass 4		# Allwinner DMA controller (sun6i)
 tegraapbdma*	at fdt? pass 4		# NVIDIA Tegra APB DMA
 
 # FUSE controller

Index: src/sys/arch/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.95 src/sys/arch/evbarm/conf/GENERIC64:1.96
--- src/sys/arch/evbarm/conf/GENERIC64:1.95	Fri May 31 14:52:17 2019
+++ src/sys/arch/evbarm/conf/GENERIC64	Thu Jun  6 22:41:02 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC64,v 1.95 2019/05/31 14:52:17 jmcneill Exp $
+#	$NetBSD: GENERIC64,v 1.96 2019/06/06 22:41:02 jmcneill Exp $
 #
 #	GENERIC ARM (aarch64) kernel
 #
@@ -218,7 +218,7 @@ qemufwcfg*	at acpi?
 
 # DMA controller
 bcmdmac*	at fdt?			# Broadcom BCM283x DMA controller
-sun6idma*	at fdt?			# Allwinner DMA controller (sun6i)
+sun6idma*	at fdt?	pass 4		# Allwinner DMA controller (sun6i)
 tegraapbdma*	at fdt? pass 4		# NVIDIA Tegra APB DMA
 
 # FUSE controller



CVS commit: src/sys/dev/adb

2019-06-06 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jun  6 20:59:58 UTC 2019

Modified Files:
src/sys/dev/adb: adb_kbd.c files.adb

Log Message:
- call Debugger() from adbkbd_keys() instead of the task queue
- add options ADBKBD_POWER_DDB to enable DDB-on-Power by default


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/adb/adb_kbd.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/adb/files.adb

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



CVS commit: src/sys/dev/adb

2019-06-06 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jun  6 20:59:58 UTC 2019

Modified Files:
src/sys/dev/adb: adb_kbd.c files.adb

Log Message:
- call Debugger() from adbkbd_keys() instead of the task queue
- add options ADBKBD_POWER_DDB to enable DDB-on-Power by default


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/adb/adb_kbd.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/adb/files.adb

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/adb/adb_kbd.c
diff -u src/sys/dev/adb/adb_kbd.c:1.27 src/sys/dev/adb/adb_kbd.c:1.28
--- src/sys/dev/adb/adb_kbd.c:1.27	Sat Oct 28 04:53:55 2017
+++ src/sys/dev/adb/adb_kbd.c	Thu Jun  6 20:59:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: adb_kbd.c,v 1.27 2017/10/28 04:53:55 riastradh Exp $	*/
+/*	$NetBSD: adb_kbd.c,v 1.28 2019/06/06 20:59:58 macallan Exp $	*/
 
 /*
  * Copyright (C) 1998	Colin Wood
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.27 2017/10/28 04:53:55 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.28 2019/06/06 20:59:58 macallan Exp $");
 
 #include 
 #include 
@@ -232,7 +232,11 @@ adbkbd_attach(device_t parent, device_t 
 	sc->sc_power = 0x;
 	sc->sc_timestamp = 0;
 	sc->sc_emul_usb = FALSE;
+#ifdef ADBKBD_POWER_DDB
+	sc->sc_power_dbg = TRUE;
+#else
 	sc->sc_power_dbg = FALSE;
+#endif
 
 	aprint_normal(" addr %d: ", sc->sc_adbdev->current_addr);
 
@@ -463,8 +467,12 @@ adbkbd_keys(struct adbkbd_softc *sc, uin
 		 (sc->sc_power_button_delay == 0)) {
 
 			/* power button, report to sysmon */
-			sc->sc_pe = k1;
-			sysmon_task_queue_sched(0, adbkbd_powerbutton, sc);
+			if (sc->sc_power_dbg) {
+Debugger();
+			} else {
+sc->sc_pe = k1;
+sysmon_task_queue_sched(0, adbkbd_powerbutton, sc);
+			}
 		}
 	} else {
 
@@ -479,17 +487,10 @@ adbkbd_powerbutton(void *cookie)
 {
 	struct adbkbd_softc *sc = cookie;
 
-	if (sc->sc_power_dbg) {
-#ifdef DDB
-		Debugger();
-#else
-		printf("kernel is not compiled with DDB support\n");
-#endif
-	} else {
-		sysmon_pswitch_event(&sc->sc_sm_pbutton, 
-		ADBK_PRESS(sc->sc_pe) ? PSWITCH_EVENT_PRESSED :
-		PSWITCH_EVENT_RELEASED);
-	}
+	sysmon_pswitch_event(&sc->sc_sm_pbutton, 
+	ADBK_PRESS(sc->sc_pe) ? PSWITCH_EVENT_PRESSED :
+	PSWITCH_EVENT_RELEASED);
+
 }
 
 static inline void

Index: src/sys/dev/adb/files.adb
diff -u src/sys/dev/adb/files.adb:1.7 src/sys/dev/adb/files.adb:1.8
--- src/sys/dev/adb/files.adb:1.7	Thu Aug 30 01:27:44 2012
+++ src/sys/dev/adb/files.adb	Thu Jun  6 20:59:58 2019
@@ -1,5 +1,5 @@
 # 
-#	$NetBSD: files.adb,v 1.7 2012/08/30 01:27:44 macallan Exp $
+#	$NetBSD: files.adb,v 1.8 2019/06/06 20:59:58 macallan Exp $
 #
 # Apple Desktop Bus protocol and drivers
 
@@ -7,7 +7,7 @@ defflag	adbdebug.h	ADB_DEBUG
 defflag	adbdebug.h	ADBKBD_DEBUG
 defflag	adbdebug.h	ADBMS_DEBUG
 defflag	adbdebug.h	ADBBT_DEBUG
-defflag adbdebug.h	ADBKBD_POWER_PANIC
+defflag adbdebug.h	ADBKBD_POWER_DDB
 
 define adb_bus {}
 



CVS commit: src/sys/dev/ata

2019-06-06 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Jun  6 20:55:43 UTC 2019

Modified Files:
src/sys/dev/ata: wd.c

Log Message:
Take channel lock for calling reset_drive.
Should fix PR 54217.


To generate a diff of this commit:
cvs rdiff -u -r1.451 -r1.452 src/sys/dev/ata/wd.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/ata

2019-06-06 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Jun  6 20:55:43 UTC 2019

Modified Files:
src/sys/dev/ata: wd.c

Log Message:
Take channel lock for calling reset_drive.
Should fix PR 54217.


To generate a diff of this commit:
cvs rdiff -u -r1.451 -r1.452 src/sys/dev/ata/wd.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/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.451 src/sys/dev/ata/wd.c:1.452
--- src/sys/dev/ata/wd.c:1.451	Thu Jun  6 20:41:04 2019
+++ src/sys/dev/ata/wd.c	Thu Jun  6 20:55:43 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wd.c,v 1.451 2019/06/06 20:41:04 mlelstv Exp $ */
+/*	$NetBSD: wd.c,v 1.452 2019/06/06 20:55:43 mlelstv Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.451 2019/06/06 20:41:04 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.452 2019/06/06 20:55:43 mlelstv Exp $");
 
 #include "opt_ata.h"
 #include "opt_wd.h"
@@ -1663,6 +1663,7 @@ int
 wd_get_params(struct wd_softc *wd, uint8_t flags, struct ataparams *params)
 {
 	int retry = 0;
+	struct ata_channel *chp = wd->drvp->chnl_softc;
 
 again:
 	switch (wd->atabus->ata_get_params(wd->drvp, flags, params)) {
@@ -1671,7 +1672,9 @@ again:
 	case CMD_ERR:
 		if (retry == 0) {
 			retry++;
+			ata_channel_lock(chp);
 			(*wd->atabus->ata_reset_drive)(wd->drvp, flags, NULL);
+			ata_channel_unlock(chp);
 			goto again;
 		}
 



CVS commit: src/sys/dev/sdmmc

2019-06-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun  6 20:50:46 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmc_mem.c

Log Message:
If setting HS_TIMING fails, keep trying slower speeds instead of bailing
out.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/sdmmc/sdmmc_mem.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/sdmmc/sdmmc_mem.c
diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.67 src/sys/dev/sdmmc/sdmmc_mem.c:1.68
--- src/sys/dev/sdmmc/sdmmc_mem.c:1.67	Tue May 28 00:25:27 2019
+++ src/sys/dev/sdmmc/sdmmc_mem.c	Thu Jun  6 20:50:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_mem.c,v 1.67 2019/05/28 00:25:27 jmcneill Exp $	*/
+/*	$NetBSD: sdmmc_mem.c,v 1.68 2019/06/06 20:50:46 jmcneill Exp $	*/
 /*	$OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $	*/
 
 /*
@@ -45,7 +45,7 @@
 /* Routines for SD/MMC memory cards. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.67 2019/05/28 00:25:27 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.68 2019/06/06 20:50:46 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -124,6 +124,12 @@ static const struct {
 	{ "DDR50",		SMC_CAPS_UHS_DDR50,	 5 },
 };
 
+static const int sdmmc_mmc_timings[] = {
+	[EXT_CSD_HS_TIMING_LEGACY]	= 26000,
+	[EXT_CSD_HS_TIMING_HIGHSPEED]	= 52000,
+	[EXT_CSD_HS_TIMING_HS200]	= 20
+};
+
 /*
  * Initialize SD/MMC memory cards and memory in SDIO "combo" cards.
  */
@@ -955,18 +961,14 @@ sdmmc_mem_mmc_init(struct sdmmc_softc *s
 
 		if (ISSET(sc->sc_caps, SMC_CAPS_MMC_HS200) &&
 		ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_F_HS200_1_8V) {
-			sf->csd.tran_speed = 20;	/* 200MHz SDR */
 			hs_timing = EXT_CSD_HS_TIMING_HS200;
 		} else if (ISSET(sc->sc_caps, SMC_CAPS_MMC_DDR52) &&
 		ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_F_DDR52_1_8V) {
-			sf->csd.tran_speed = 52000;	/* 52MHz */
 			hs_timing = EXT_CSD_HS_TIMING_HIGHSPEED;
 			ddr = true;
 		} else if (ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_F_52M) {
-			sf->csd.tran_speed = 52000;	/* 52MHz */
 			hs_timing = EXT_CSD_HS_TIMING_HIGHSPEED;
 		} else if (ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_F_26M) {
-			sf->csd.tran_speed = 26000;	/* 26MHz */
 			hs_timing = EXT_CSD_HS_TIMING_LEGACY;
 		} else {
 			aprint_error_dev(sc->sc_dev,
@@ -1007,16 +1009,25 @@ sdmmc_mem_mmc_init(struct sdmmc_softc *s
 		!ISSET(sc->sc_caps, SMC_CAPS_MMC_HIGHSPEED)) {
 			hs_timing = EXT_CSD_HS_TIMING_LEGACY;
 		}
+
+		const int target_timing = hs_timing;
 		if (hs_timing != EXT_CSD_HS_TIMING_LEGACY) {
-			error = sdmmc_mem_mmc_switch(sf, EXT_CSD_CMD_SET_NORMAL,
-			EXT_CSD_HS_TIMING, hs_timing, false);
-			if (error) {
-aprint_error_dev(sc->sc_dev,
-"can't change high speed %d, error %d\n",
-hs_timing, error);
-return error;
+			while (hs_timing >= EXT_CSD_HS_TIMING_LEGACY) {
+error = sdmmc_mem_mmc_switch(sf, EXT_CSD_CMD_SET_NORMAL,
+EXT_CSD_HS_TIMING, hs_timing, false);
+if (error == 0 || hs_timing == EXT_CSD_HS_TIMING_LEGACY)
+	break;
+hs_timing--;
 			}
 		}
+		if (hs_timing != target_timing) {
+			aprint_debug_dev(sc->sc_dev,
+			"card failed to switch to timing mode %d, using %d\n",
+			target_timing, hs_timing);
+		}
+
+		KASSERT(hs_timing < __arraycount(sdmmc_mmc_timings));
+		sf->csd.tran_speed = sdmmc_mmc_timings[hs_timing];
 
 		if (sc->sc_busclk > sf->csd.tran_speed)
 			sc->sc_busclk = sf->csd.tran_speed;



CVS commit: src/sys/dev/sdmmc

2019-06-06 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun  6 20:50:46 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmc_mem.c

Log Message:
If setting HS_TIMING fails, keep trying slower speeds instead of bailing
out.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/sdmmc/sdmmc_mem.c

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



CVS commit: src/doc

2019-06-06 Thread John Klos
Module Name:src
Committed By:   jklos
Date:   Thu Jun  6 20:45:35 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Add note about mac68k page size switch to 8KB.


To generate a diff of this commit:
cvs rdiff -u -r1.2546 -r1.2547 src/doc/CHANGES

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



CVS commit: src/doc

2019-06-06 Thread John Klos
Module Name:src
Committed By:   jklos
Date:   Thu Jun  6 20:45:35 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Add note about mac68k page size switch to 8KB.


To generate a diff of this commit:
cvs rdiff -u -r1.2546 -r1.2547 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/CHANGES
diff -u src/doc/CHANGES:1.2546 src/doc/CHANGES:1.2547
--- src/doc/CHANGES:1.2546	Thu Jun  6 05:36:42 2019
+++ src/doc/CHANGES	Thu Jun  6 20:45:35 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2546 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2547 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -391,3 +391,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	unbound(8): Import 1.9.1. [christos 20190525]
 	gdb(1): Updated to 8.3.  [christos 20190528]
 	evbarm: Add support for the Banana Pi BPI-P2 Zero. [thorpej 20190604]
+	mac68k: Switch page size to 8KB. [jklos 20190606]



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

2019-06-06 Thread John Klos
Module Name:src
Committed By:   jklos
Date:   Thu Jun  6 20:42:33 UTC 2019

Modified Files:
src/sys/arch/mac68k/include: param.h

Log Message:
As per port-m68k/54254 and a few months of testing, mac68k will switch
to 8KB pages. OK with hauke@, rjs@ and tsutsui@.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/mac68k/include/param.h

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

Modified files:

Index: src/sys/arch/mac68k/include/param.h
diff -u src/sys/arch/mac68k/include/param.h:1.45 src/sys/arch/mac68k/include/param.h:1.46
--- src/sys/arch/mac68k/include/param.h:1.45	Fri Feb 10 17:35:48 2012
+++ src/sys/arch/mac68k/include/param.h	Thu Jun  6 20:42:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.45 2012/02/10 17:35:48 para Exp $	*/
+/*	$NetBSD: param.h,v 1.46 2019/06/06 20:42:33 jklos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -87,7 +87,7 @@
  */
 #include 
 
-#define	PGSHIFT		12		/* LOG2(NBPG) */
+#define	PGSHIFT		13		/* LOG2(NBPG) */
 #define	KERNBASE	0x	/* start of kernel virtual */
 
 #define	UPAGES		3  		/* pages of u-area */



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

2019-06-06 Thread John Klos
Module Name:src
Committed By:   jklos
Date:   Thu Jun  6 20:42:33 UTC 2019

Modified Files:
src/sys/arch/mac68k/include: param.h

Log Message:
As per port-m68k/54254 and a few months of testing, mac68k will switch
to 8KB pages. OK with hauke@, rjs@ and tsutsui@.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/mac68k/include/param.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/ata

2019-06-06 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Jun  6 20:41:04 UTC 2019

Modified Files:
src/sys/dev/ata: wd.c

Log Message:
Count only the initial start of a transfer, not the retries.
Should fix kern/54166.

Thanks to macallan@ for spotting the issue.


To generate a diff of this commit:
cvs rdiff -u -r1.450 -r1.451 src/sys/dev/ata/wd.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/ata

2019-06-06 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Jun  6 20:41:04 UTC 2019

Modified Files:
src/sys/dev/ata: wd.c

Log Message:
Count only the initial start of a transfer, not the retries.
Should fix kern/54166.

Thanks to macallan@ for spotting the issue.


To generate a diff of this commit:
cvs rdiff -u -r1.450 -r1.451 src/sys/dev/ata/wd.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/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.450 src/sys/dev/ata/wd.c:1.451
--- src/sys/dev/ata/wd.c:1.450	Fri May 24 06:01:05 2019
+++ src/sys/dev/ata/wd.c	Thu Jun  6 20:41:04 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: wd.c,v 1.450 2019/05/24 06:01:05 mlelstv Exp $ */
+/*	$NetBSD: wd.c,v 1.451 2019/06/06 20:41:04 mlelstv Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.450 2019/05/24 06:01:05 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.451 2019/06/06 20:41:04 mlelstv Exp $");
 
 #include "opt_ata.h"
 #include "opt_wd.h"
@@ -734,7 +734,8 @@ wdstart1(struct wd_softc *wd, struct buf
 		xfer->c_bio.flags |= ATA_FUA;
 	}
 
-	wd->inflight++;
+	if (xfer->c_retries == 0)
+		wd->inflight++;
 	switch (wd->atabus->ata_bio(wd->drvp, xfer)) {
 	case ATACMD_TRY_AGAIN:
 		panic("wdstart1: try again");
@@ -989,7 +990,9 @@ noerror:	if ((xfer->c_bio.flags & ATA_CO
 
 	ata_free_xfer(wd->drvp->chnl_softc, xfer);
 
+	mutex_enter(&wd->sc_lock);
 	wd->inflight--;
+	mutex_exit(&wd->sc_lock);
 	dk_done(dksc, bp);
 	dk_start(dksc, NULL);
 }



CVS commit: src/sys/dev/mii

2019-06-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jun  6 16:05:45 UTC 2019

Modified Files:
src/sys/dev/mii: miidevs.h miidevs_data.h

Log Message:
Regen for addition of BCM53125 switch.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.138 -r1.139 src/sys/dev/mii/miidevs_data.h

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

Modified files:

Index: src/sys/dev/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.150 src/sys/dev/mii/miidevs.h:1.151
--- src/sys/dev/mii/miidevs.h:1.150	Mon Apr 22 09:30:09 2019
+++ src/sys/dev/mii/miidevs.h	Thu Jun  6 16:05:45 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.150 2019/04/22 09:30:09 jmcneill Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.151 2019/06/06 16:05:45 thorpej Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.152 2019/04/22 09:29:55 jmcneill Exp
+ *	NetBSD: miidevs,v 1.153 2019/06/06 16:04:13 thorpej Exp
  */
 
 /*-
@@ -294,6 +294,8 @@
 #define	MII_STR_BROADCOM3_BCM5719C	"BCM5719C 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM3_BCM57765	0x0024
 #define	MII_STR_BROADCOM3_BCM57765	"BCM57765 1000BASE-T media interface"
+#define	MII_MODEL_BROADCOM3_BCM53125	0x0032
+#define	MII_STR_BROADCOM3_BCM53125	"BCM53125 1000BASE-T switch"
 #define	MII_MODEL_BROADCOM3_BCM5720C	0x0036
 #define	MII_STR_BROADCOM3_BCM5720C	"BCM5720C 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM4_BCM5725C	0x0038

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.138 src/sys/dev/mii/miidevs_data.h:1.139
--- src/sys/dev/mii/miidevs_data.h:1.138	Mon Apr 22 09:30:09 2019
+++ src/sys/dev/mii/miidevs_data.h	Thu Jun  6 16:05:45 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs_data.h,v 1.138 2019/04/22 09:30:09 jmcneill Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.139 2019/06/06 16:05:45 thorpej Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.152 2019/04/22 09:29:55 jmcneill Exp
+ *	NetBSD: miidevs,v 1.153 2019/06/06 16:04:13 thorpej Exp
  */
 
 /*-
@@ -115,6 +115,7 @@ struct mii_knowndev mii_knowndevs[] = {
  { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM5717C, MII_STR_BROADCOM3_BCM5717C },
  { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM5719C, MII_STR_BROADCOM3_BCM5719C },
  { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM57765, MII_STR_BROADCOM3_BCM57765 },
+ { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM53125, MII_STR_BROADCOM3_BCM53125 },
  { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM5720C, MII_STR_BROADCOM3_BCM5720C },
  { MII_OUI_BROADCOM4, MII_MODEL_BROADCOM4_BCM5725C, MII_STR_BROADCOM4_BCM5725C },
  { MII_OUI_xxBROADCOM_ALT1, MII_MODEL_xxBROADCOM_ALT1_BCM5906, MII_STR_xxBROADCOM_ALT1_BCM5906 },



CVS commit: src/sys/dev/mii

2019-06-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jun  6 16:05:45 UTC 2019

Modified Files:
src/sys/dev/mii: miidevs.h miidevs_data.h

Log Message:
Regen for addition of BCM53125 switch.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.138 -r1.139 src/sys/dev/mii/miidevs_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/mii

2019-06-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jun  6 16:04:13 UTC 2019

Modified Files:
src/sys/dev/mii: miidevs

Log Message:
Add ID for the Broadcom BCM53125 1000BASE-T switch.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/dev/mii/miidevs

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

Modified files:

Index: src/sys/dev/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.152 src/sys/dev/mii/miidevs:1.153
--- src/sys/dev/mii/miidevs:1.152	Mon Apr 22 09:29:55 2019
+++ src/sys/dev/mii/miidevs	Thu Jun  6 16:04:13 2019
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.152 2019/04/22 09:29:55 jmcneill Exp $
+$NetBSD: miidevs,v 1.153 2019/06/06 16:04:13 thorpej Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -214,6 +214,7 @@ model BROADCOM3 BCM57780	0x0019 BCM57780
 model BROADCOM3 BCM5717C	0x0020 BCM5717C 1000BASE-T media interface
 model BROADCOM3 BCM5719C	0x0022 BCM5719C 1000BASE-T media interface
 model BROADCOM3 BCM57765	0x0024 BCM57765 1000BASE-T media interface
+model BROADCOM3 BCM53125	0x0032 BCM53125 1000BASE-T switch
 model BROADCOM3 BCM5720C	0x0036 BCM5720C 1000BASE-T media interface
 model BROADCOM4 BCM5725C	0x0038 BCM5725C 1000BASE-T media interface
 model xxBROADCOM_ALT1 BCM5906	0x0004 BCM5906 10/100baseTX media interface



CVS commit: src/sys/dev/mii

2019-06-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jun  6 16:04:13 UTC 2019

Modified Files:
src/sys/dev/mii: miidevs

Log Message:
Add ID for the Broadcom BCM53125 1000BASE-T switch.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/dev/mii/miidevs

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



CVS commit: src/external/cddl/osnet/dist/cmd/stat/common

2019-06-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun  6 15:59:23 UTC 2019

Removed Files:
src/external/cddl/osnet/dist/cmd/stat/common: timestamp.c

Log Message:
Remove "dist/cmd/stat" containing only one left over and unneeded file.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/cddl/osnet/dist/cmd/stat/common/timestamp.c

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



CVS commit: src/external/cddl/osnet/dist/cmd/stat/common

2019-06-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun  6 15:59:23 UTC 2019

Removed Files:
src/external/cddl/osnet/dist/cmd/stat/common: timestamp.c

Log Message:
Remove "dist/cmd/stat" containing only one left over and unneeded file.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/cddl/osnet/dist/cmd/stat/common/timestamp.c

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



CVS commit: src/external/cddl/osnet

2019-06-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun  6 14:58:51 UTC 2019

Added Files:
src/external/cddl/osnet/sys: libshare.h
src/external/cddl/osnet/sys/sys: systeminfo.h
Removed Files:
src/external/cddl/osnet/dist/lib/libshare/common: libshare.h
src/external/cddl/osnet/dist/uts/common/sys: systeminfo.h taskq_impl.h

Log Message:
Handle files not present upstream:

dist/lib/libshare/common/libshare.h -> sys/libshare.h
dist/uts/common/sys/systeminfo.h-> sys/sys/systeminfo.h
dist/uts/common/sys/taskq_impl.h-> TRASH

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r0 \
src/external/cddl/osnet/dist/lib/libshare/common/libshare.h
cvs rdiff -u -r1.1.1.3 -r0 \
src/external/cddl/osnet/dist/uts/common/sys/systeminfo.h \
src/external/cddl/osnet/dist/uts/common/sys/taskq_impl.h
cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/sys/libshare.h
cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/sys/sys/systeminfo.h

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

Added files:

Index: src/external/cddl/osnet/sys/libshare.h
diff -u /dev/null src/external/cddl/osnet/sys/libshare.h:1.1
--- /dev/null	Thu Jun  6 14:58:51 2019
+++ src/external/cddl/osnet/sys/libshare.h	Thu Jun  6 14:58:50 2019
@@ -0,0 +1,36 @@
+/*-
+ * Copyright (c) 2007 Pawel Jakub Dawidek 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _OPENSOLARIS_LIBSHARE_H_
+#define _OPENSOLARIS_LIBSHARE_H_
+
+#define	SA_OK	0
+
+#define	SA_INIT_CONTROL_API	0
+
+#endif	/* !_OPENSOLARIS_LIBSHARE_H_ */

Index: src/external/cddl/osnet/sys/sys/systeminfo.h
diff -u /dev/null src/external/cddl/osnet/sys/sys/systeminfo.h:1.1
--- /dev/null	Thu Jun  6 14:58:51 2019
+++ src/external/cddl/osnet/sys/sys/systeminfo.h	Thu Jun  6 14:58:51 2019
@@ -0,0 +1,6 @@
+#ifndef _SYS_SYSTEMINFO_H_
+#define	_SYS_SYSTEMINFO_H_
+
+#define	HW_HOSTID_LEN	11
+
+#endif	/* !_SYS_SYSTEMINFO_H_ */



CVS commit: src/external/cddl/osnet

2019-06-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Thu Jun  6 14:58:51 UTC 2019

Added Files:
src/external/cddl/osnet/sys: libshare.h
src/external/cddl/osnet/sys/sys: systeminfo.h
Removed Files:
src/external/cddl/osnet/dist/lib/libshare/common: libshare.h
src/external/cddl/osnet/dist/uts/common/sys: systeminfo.h taskq_impl.h

Log Message:
Handle files not present upstream:

dist/lib/libshare/common/libshare.h -> sys/libshare.h
dist/uts/common/sys/systeminfo.h-> sys/sys/systeminfo.h
dist/uts/common/sys/taskq_impl.h-> TRASH

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r0 \
src/external/cddl/osnet/dist/lib/libshare/common/libshare.h
cvs rdiff -u -r1.1.1.3 -r0 \
src/external/cddl/osnet/dist/uts/common/sys/systeminfo.h \
src/external/cddl/osnet/dist/uts/common/sys/taskq_impl.h
cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/sys/libshare.h
cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/sys/sys/systeminfo.h

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



CVS commit: src

2019-06-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun  6 14:51:43 UTC 2019

Modified Files:
src: Makefile

Log Message:
Fix editor mishap


To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 src/Makefile

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



CVS commit: src

2019-06-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun  6 14:51:43 UTC 2019

Modified Files:
src: Makefile

Log Message:
Fix editor mishap


To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 src/Makefile

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

Modified files:

Index: src/Makefile
diff -u src/Makefile:1.325 src/Makefile:1.326
--- src/Makefile:1.325	Sun Nov 11 07:43:35 2018
+++ src/Makefile	Thu Jun  6 14:51:43 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.325 2018/11/11 07:43:35 maya Exp $
+#	$NetBSD: Makefile,v 1.326 2019/06/06 14:51:43 martin Exp $
 
 #
 # This is the top-level makefile for building NetBSD. For an outline of
@@ -93,8 +93,7 @@
 #   obj: creates object directories.
 #   do-distrib-dirs: creates the distribution directories.
 #   includes:installs include files.
-#   do-lib:  builds and installs prerequisites from lib
-#if ${MKCOMPAT} != "no".
+#   do-lib:  builds and installs prerequisites from lib.
 #   do-compat-lib:   builds and installs prerequisites from compat/lib
 #if ${MKCOMPAT} != "no".
 #   do-x11:  builds and installs X11 tools and libraries



CVS commit: src/sys/dev/audio

2019-06-06 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Jun  6 13:08:30 UTC 2019

Modified Files:
src/sys/dev/audio: audio.c

Log Message:
Revert rev1.7.
Don't take care of incorrect drivers.  They should be fixed.
PR kern/54264.  OK'ed by nakayama@-san.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/audio/audio.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/audio

2019-06-06 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Jun  6 13:08:30 UTC 2019

Modified Files:
src/sys/dev/audio: audio.c

Log Message:
Revert rev1.7.
Don't take care of incorrect drivers.  They should be fixed.
PR kern/54264.  OK'ed by nakayama@-san.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/audio/audio.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/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.10 src/sys/dev/audio/audio.c:1.11
--- src/sys/dev/audio/audio.c:1.10	Sat May 25 02:42:03 2019
+++ src/sys/dev/audio/audio.c	Thu Jun  6 13:08:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.10 2019/05/25 02:42:03 isaki Exp $	*/
+/*	$NetBSD: audio.c,v 1.11 2019/06/06 13:08:30 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.10 2019/05/25 02:42:03 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.11 2019/06/06 13:08:30 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -1933,17 +1933,12 @@ audio_open(dev_t dev, struct audio_softc
 			 * hw_if->open() is always (FREAD | FWRITE)
 			 * regardless of this open()'s flags.
 			 * see also dev/isa/aria.c
-			 * but ckeck its playback or recording capability.
 			 * On half duplex hardware, the flags passed to
 			 * hw_if->open() is either FREAD or FWRITE.
 			 * see also arch/evbarm/mini2440/audio_mini2440.c
 			 */
 			if (fullduplex) {
 hwflags = FREAD | FWRITE;
-if (!audio_can_playback(sc))
-	hwflags &= ~FWRITE;
-if (!audio_can_capture(sc))
-	hwflags &= ~FREAD;
 			} else {
 /* Construct hwflags from af->mode. */
 hwflags = 0;



CVS commit: src/sys/dev/usb

2019-06-06 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Jun  6 12:59:33 UTC 2019

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

Log Message:
Return correct properties.
It fixes PR kern/54264.
XXX I'm not sure all bidirectional uaudio devices support FULLDUPLEX
or INDEPENDENT.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/dev/usb/uaudio.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/uaudio.c
diff -u src/sys/dev/usb/uaudio.c:1.160 src/sys/dev/usb/uaudio.c:1.161
--- src/sys/dev/usb/uaudio.c:1.160	Wed May  8 13:40:19 2019
+++ src/sys/dev/usb/uaudio.c	Thu Jun  6 12:59:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudio.c,v 1.160 2019/05/08 13:40:19 isaki Exp $	*/
+/*	$NetBSD: uaudio.c,v 1.161 2019/06/06 12:59:33 isaki Exp $	*/
 
 /*
  * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.160 2019/05/08 13:40:19 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.161 2019/06/06 12:59:33 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2264,8 +2264,21 @@ uaudio_round_blocksize(void *addr, int b
 Static int
 uaudio_get_props(void *addr)
 {
-	return AUDIO_PROP_FULLDUPLEX | AUDIO_PROP_INDEPENDENT;
+	struct uaudio_softc *sc;
+	int props;
+
+	sc = addr;
+	props = 0;
+	if ((sc->sc_mode & AUMODE_PLAY))
+		props |= AUDIO_PROP_PLAYBACK;
+	if ((sc->sc_mode & AUMODE_RECORD))
+		props |= AUDIO_PROP_CAPTURE;
+
+	/* XXX I'm not sure all bidirectional devices support FULLDUP&INDEP */
+	if (props == (AUDIO_PROP_PLAYBACK | AUDIO_PROP_CAPTURE))
+		props |= AUDIO_PROP_FULLDUPLEX | AUDIO_PROP_INDEPENDENT;
 
+	return props;
 }
 
 Static void



CVS commit: src/sys/dev/usb

2019-06-06 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Jun  6 12:59:33 UTC 2019

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

Log Message:
Return correct properties.
It fixes PR kern/54264.
XXX I'm not sure all bidirectional uaudio devices support FULLDUPLEX
or INDEPENDENT.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/dev/usb/uaudio.c

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



CVS commit: src/share/man/man4/man4.evbarm

2019-06-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun  6 09:42:45 UTC 2019

Modified Files:
src/share/man/man4/man4.evbarm: rktsadc.4

Log Message:
Use bulleted list to full effect, and comment out reference to fdt(4),
which doesn't exist (yet?).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.evbarm/rktsadc.4

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

Modified files:

Index: src/share/man/man4/man4.evbarm/rktsadc.4
diff -u src/share/man/man4/man4.evbarm/rktsadc.4:1.1 src/share/man/man4/man4.evbarm/rktsadc.4:1.2
--- src/share/man/man4/man4.evbarm/rktsadc.4:1.1	Thu Jun  6 05:32:29 2019
+++ src/share/man/man4/man4.evbarm/rktsadc.4	Thu Jun  6 09:42:45 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rktsadc.4,v 1.1 2019/06/06 05:32:29 mrg Exp $
+.\"	$NetBSD: rktsadc.4,v 1.2 2019/06/06 09:42:45 wiz Exp $
 .\"
 .\" Copyright (c) 2019 Matthew R. Green
 .\" All rights reserved.
@@ -46,12 +46,14 @@ The following RockChip CPUs are supporte
 .Pp
 .Bl -bullet -compact -offset abc
 .It
-RK3329, RK3399.
+RK3329
+.It
+RK3399
 .El
 .Sh SEE ALSO
 .Xr envsys 4 ,
+.\".Xr fdt 4 ,
 .Xr intro 4 ,
-.Xr fdt 4 ,
 .Xr envstat 8
 .Sh HISTORY
 The



CVS commit: src/share/man/man4/man4.evbarm

2019-06-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun  6 09:42:45 UTC 2019

Modified Files:
src/share/man/man4/man4.evbarm: rktsadc.4

Log Message:
Use bulleted list to full effect, and comment out reference to fdt(4),
which doesn't exist (yet?).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.evbarm/rktsadc.4

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