CVS commit: src/sys/dev/pci

2019-04-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 26 04:58:40 UTC 2019

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

Log Message:
 Fix a bug that read value of MII_EXTSR register on TBI mode always fails.
This bug was added in rev. 1.169.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/dev/pci/if_sip.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/if_sip.c
diff -u src/sys/dev/pci/if_sip.c:1.169 src/sys/dev/pci/if_sip.c:1.170
--- src/sys/dev/pci/if_sip.c:1.169	Tue Jan 22 03:42:27 2019
+++ src/sys/dev/pci/if_sip.c	Fri Apr 26 04:58:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_sip.c,v 1.169 2019/01/22 03:42:27 msaitoh Exp $	*/
+/*	$NetBSD: if_sip.c,v 1.170 2019/04/26 04:58:40 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.169 2019/01/22 03:42:27 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.170 2019/04/26 04:58:40 msaitoh Exp $");
 
 
 
@@ -3295,7 +3295,8 @@ sipcom_dp83820_mii_readreg(device_t self
 			 * register itself seems read back 0 on some
 			 * boards.  Just hard-code the result.
 			 */
-			return (EXTSR_1000XFDX|EXTSR_1000XHDX);
+			*val = (EXTSR_1000XFDX | EXTSR_1000XHDX);
+			return 0;
 
 		default:
 			return (0);



CVS commit: src/sys/dev/pci

2019-04-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 26 04:33:00 UTC 2019

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

Log Message:
 Remove duplicated inclusion of sys/bus.h.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/if_ena.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/if_ena.c
diff -u src/sys/dev/pci/if_ena.c:1.13 src/sys/dev/pci/if_ena.c:1.14
--- src/sys/dev/pci/if_ena.c:1.13	Wed Jan 23 11:15:11 2019
+++ src/sys/dev/pci/if_ena.c	Fri Apr 26 04:33:00 2019
@@ -31,7 +31,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.13 2019/01/23 11:15:11 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.14 2019/04/26 04:33:00 msaitoh Exp $");
 
 #include 
 #include 
@@ -51,8 +51,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1
 #include 
 #include 
 
-#include 
-
 #include 
 #include 
 



CVS commit: src/tests/lib/libcurses/slave

2019-04-25 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Fri Apr 26 02:46:00 UTC 2019

Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c

Log Message:
Fix argument parsing for mvinsch, last arg is a chtype not a string.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libcurses/slave/curses_commands.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/libcurses/slave/curses_commands.c
diff -u src/tests/lib/libcurses/slave/curses_commands.c:1.7 src/tests/lib/libcurses/slave/curses_commands.c:1.8
--- src/tests/lib/libcurses/slave/curses_commands.c:1.7	Wed Sep 19 11:51:08 2012
+++ src/tests/lib/libcurses/slave/curses_commands.c	Fri Apr 26 02:46:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses_commands.c,v 1.7 2012/09/19 11:51:08 blymn Exp $	*/
+/*	$NetBSD: curses_commands.c,v 1.8 2019/04/26 02:46:00 blymn Exp $	*/
 
 /*-
  * Copyright 2009 Brett Lymn 
@@ -1274,7 +1274,8 @@ cmd_mvinnstr(int nargs, char **args)
 void
 cmd_mvinsch(int nargs, char **args)
 {
-	int y, x, ch;
+	int y, x;
+	chtype *ch;
 
 	if (check_arg_count(nargs, 3) == 1)
 		return;
@@ -1291,14 +1292,10 @@ cmd_mvinsch(int nargs, char **args)
 		return;
 	}
 
-	if (sscanf(args[2], "%d", ) == 0) {
-		report_count(1);
-		report_error("BAD ARGUMENT");
-		return;
-	}
+	ch = (chtype *) args[2];
 
 	report_count(1);
-	report_return(mvinsch(y, x, ch));
+	report_return(mvinsch(y, x, ch[0]));
 }
 
 



CVS commit: src/crypto/external/bsd/openssh/dist

2019-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 26 01:51:55 UTC 2019

Modified Files:
src/crypto/external/bsd/openssh/dist: packet.c packet.h

Log Message:
attribute police


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/crypto/external/bsd/openssh/dist/packet.c
cvs rdiff -u -r1.19 -r1.20 src/crypto/external/bsd/openssh/dist/packet.h

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/packet.c
diff -u src/crypto/external/bsd/openssh/dist/packet.c:1.37 src/crypto/external/bsd/openssh/dist/packet.c:1.38
--- src/crypto/external/bsd/openssh/dist/packet.c:1.37	Sat Apr 20 13:16:40 2019
+++ src/crypto/external/bsd/openssh/dist/packet.c	Thu Apr 25 21:51:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: packet.c,v 1.37 2019/04/20 17:16:40 christos Exp $	*/
+/*	$NetBSD: packet.c,v 1.38 2019/04/26 01:51:55 christos Exp $	*/
 /* $OpenBSD: packet.c,v 1.283 2019/03/01 03:29:32 djm Exp $ */
 /*
  * Author: Tatu Ylonen 
@@ -39,7 +39,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: packet.c,v 1.37 2019/04/20 17:16:40 christos Exp $");
+__RCSID("$NetBSD: packet.c,v 1.38 2019/04/26 01:51:55 christos Exp $");
 
 #include 	/* MIN roundup */
 #include 
@@ -1767,7 +1767,7 @@ ssh_packet_remaining(struct ssh *ssh)
  * authentication problems.   The length of the formatted message must not
  * exceed 1024 bytes.  This will automatically call ssh_packet_write_wait.
  */
-void
+void __attribute__((__format__ (__printf__, 2, 3)))
 ssh_packet_send_debug(struct ssh *ssh, const char *fmt,...)
 {
 	char buf[1024];
@@ -1804,7 +1804,8 @@ sshpkt_fmt_connection_id(struct ssh *ssh
 /*
  * Pretty-print connection-terminating errors and exit.
  */
-static void
+static void __attribute__((__format__ (__printf__, 3, 0)))
+__attribute__((__noreturn__))
 sshpkt_vfatal(struct ssh *ssh, int r, const char *fmt, va_list ap)
 {
 	char *tag = NULL, remote_id[512];
@@ -1854,7 +1855,8 @@ sshpkt_vfatal(struct ssh *ssh, int r, co
 	}
 }
 
-void
+void __attribute__((__format__ (__printf__, 3, 4)))
+__attribute__((__noreturn__))
 sshpkt_fatal(struct ssh *ssh, int r, const char *fmt, ...)
 {
 	va_list ap;

Index: src/crypto/external/bsd/openssh/dist/packet.h
diff -u src/crypto/external/bsd/openssh/dist/packet.h:1.19 src/crypto/external/bsd/openssh/dist/packet.h:1.20
--- src/crypto/external/bsd/openssh/dist/packet.h:1.19	Sat Apr 20 13:16:40 2019
+++ src/crypto/external/bsd/openssh/dist/packet.h	Thu Apr 25 21:51:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: packet.h,v 1.19 2019/04/20 17:16:40 christos Exp $	*/
+/*	$NetBSD: packet.h,v 1.20 2019/04/26 01:51:55 christos Exp $	*/
 /* $OpenBSD: packet.h,v 1.90 2019/01/21 10:35:09 djm Exp $ */
 
 /*
@@ -167,7 +167,7 @@ int sshpkt_disconnect(struct ssh *, 
 	__attribute__((format(printf, 2, 3)));
 int	sshpkt_add_padding(struct ssh *, u_char);
 void	sshpkt_fatal(struct ssh *ssh, int r, const char *fmt, ...)
-	__attribute__((format(printf, 3, 4)));
+	__attribute__((format(printf, 3, 4))) __attribute__((__noreturn__));
 int	sshpkt_msg_ignore(struct ssh *, u_int);
 
 int	sshpkt_put(struct ssh *ssh, const void *v, size_t len);



CVS commit: src

2019-04-25 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Apr 25 23:17:24 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libm: Makefile
src/lib/libm/man: cos.3

Log Message:
document cosl with MLINKS and in the man page


To generate a diff of this commit:
cvs rdiff -u -r1.2270 -r1.2271 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.208 -r1.209 src/lib/libm/Makefile
cvs rdiff -u -r1.15 -r1.16 src/lib/libm/man/cos.3

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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2270 src/distrib/sets/lists/comp/mi:1.2271
--- src/distrib/sets/lists/comp/mi:1.2270	Wed Apr 24 11:43:20 2019
+++ src/distrib/sets/lists/comp/mi	Thu Apr 25 23:17:24 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2270 2019/04/24 11:43:20 kamil Exp $
+#	$NetBSD: mi,v 1.2271 2019/04/25 23:17:24 maya Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -6235,6 +6235,7 @@
 ./usr/share/man/cat3/cosf.0			comp-c-catman		.cat
 ./usr/share/man/cat3/cosh.0			comp-c-catman		.cat
 ./usr/share/man/cat3/coshf.0			comp-c-catman		.cat
+./usr/share/man/cat3/cosl.0			comp-c-catman		.cat
 ./usr/share/man/cat3/cpow.0			comp-c-catman		complex,.cat
 ./usr/share/man/cat3/cpowf.0			comp-c-catman		complex,.cat
 ./usr/share/man/cat3/cpowl.0			comp-c-catman		complex,.cat
@@ -14235,6 +14236,7 @@
 ./usr/share/man/html3/cosf.html			comp-c-htmlman		html
 ./usr/share/man/html3/cosh.html			comp-c-htmlman		html
 ./usr/share/man/html3/coshf.html		comp-c-htmlman		html
+./usr/share/man/html3/cosl.html			comp-c-htmlman		html
 ./usr/share/man/html3/cpow.html			comp-c-htmlman		complex,html
 ./usr/share/man/html3/cpowf.html		comp-c-htmlman		complex,html
 ./usr/share/man/html3/cpowl.html		comp-c-htmlman		complex,html
@@ -22178,6 +22180,7 @@
 ./usr/share/man/man3/cosf.3			comp-c-man		.man
 ./usr/share/man/man3/cosh.3			comp-c-man		.man
 ./usr/share/man/man3/coshf.3			comp-c-man		.man
+./usr/share/man/man3/cosl.3			comp-c-man		.man
 ./usr/share/man/man3/cpow.3			comp-c-man		complex,.man
 ./usr/share/man/man3/cpowf.3			comp-c-man		complex,.man
 ./usr/share/man/man3/cpowl.3			comp-c-man		complex,.man

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.208 src/lib/libm/Makefile:1.209
--- src/lib/libm/Makefile:1.208	Wed Apr 17 07:45:23 2019
+++ src/lib/libm/Makefile	Thu Apr 25 23:17:24 2019
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.208 2019/04/17 07:45:23 mrg Exp $
+#  $NetBSD: Makefile,v 1.209 2019/04/25 23:17:24 maya Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -383,6 +383,7 @@ MLINKS+=ceil.3 ceilf.3 \
 MLINKS+=copysign.3 copysignf.3 \
 	copysign.3 copysignl.3
 MLINKS+=cos.3 cosf.3
+MLINKS+=cos.3 cosl.3
 MLINKS+=cosh.3 coshf.3
 MLINKS+=erf.3 erff.3 \
 	erf.3 erfl.3 \

Index: src/lib/libm/man/cos.3
diff -u src/lib/libm/man/cos.3:1.15 src/lib/libm/man/cos.3:1.16
--- src/lib/libm/man/cos.3:1.15	Thu Aug  7 16:44:47 2003
+++ src/lib/libm/man/cos.3	Thu Apr 25 23:17:24 2019
@@ -26,14 +26,15 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)cos.3	5.1 (Berkeley) 5/2/91
-.\"	$NetBSD: cos.3,v 1.15 2003/08/07 16:44:47 agc Exp $
+.\"	$NetBSD: cos.3,v 1.16 2019/04/25 23:17:24 maya Exp $
 .\"
-.Dd May 2, 1991
+.Dd April 26, 2019
 .Dt COS 3
 .Os
 .Sh NAME
 .Nm cos ,
-.Nm cosf
+.Nm cosf ,
+.Nm cosl
 .Nd cosine function
 .Sh LIBRARY
 .Lb libm
@@ -43,11 +44,14 @@
 .Fn cos "double x"
 .Ft float
 .Fn cosf "float x"
+.Ft long double
+.Fn cosl "long double x"
 .Sh DESCRIPTION
 The
-.Fn cos
+.Fn cos ,
+.Fn cosf ,
 and
-.Fn cosf
+.Fn cosl
 functions compute the cosine of
 .Fa x
 (measured in radians).



CVS commit: src/tests/lib/libm

2019-04-25 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Apr 25 22:58:24 UTC 2019

Modified Files:
src/tests/lib/libm: t_cos.c

Log Message:
Expand to cover long double somewhat.

The given data is for double, so use DBL_EPSILON and don't expect better
results.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libm/t_cos.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/libm/t_cos.c
diff -u src/tests/lib/libm/t_cos.c:1.7 src/tests/lib/libm/t_cos.c:1.8
--- src/tests/lib/libm/t_cos.c:1.7	Sat Nov 10 23:04:16 2018
+++ src/tests/lib/libm/t_cos.c	Thu Apr 25 22:58:23 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cos.c,v 1.7 2018/11/10 23:04:16 riastradh Exp $ */
+/* $NetBSD: t_cos.c,v 1.8 2019/04/25 22:58:23 maya Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -60,6 +60,107 @@ static const struct {
 	{  360,  6.283185307179586,  1., 999 },
 };
 
+#ifdef __HAVE_LONG_DOUBLE
+/*
+ * cosl(3)
+ */
+ATF_TC(cosl_angles);
+ATF_TC_HEAD(cosl_angles, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test some selected angles");
+}
+
+ATF_TC_BODY(cosl_angles, tc)
+{
+	/*
+	 * XXX The given data is for double, so take that
+	 * into account and expect less precise results..
+	 */
+	const long double eps = DBL_EPSILON;
+	size_t i;
+
+	for (i = 0; i < __arraycount(angles); i++) {
+		int deg = angles[i].angle;
+		long double theta = angles[i].x;
+		long double cos_theta = angles[i].y;
+
+		assert(cos_theta != 0);
+		if (!(fabsl((cosl(theta) - cos_theta)/cos_theta) <= eps)) {
+			atf_tc_fail_nonfatal("cos(%d deg = %.17Lg) = %.17Lg"
+			" != %.17Lg",
+			deg, theta, cosl(theta), cos_theta);
+		}
+	}
+}
+
+ATF_TC(cosl_nan);
+ATF_TC_HEAD(cosl_nan, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test cosl(NaN) == NaN");
+}
+
+ATF_TC_BODY(cosl_nan, tc)
+{
+	const long double x = 0.0L / 0.0L;
+
+	ATF_CHECK(isnan(x) != 0);
+	ATF_CHECK(isnan(cosl(x)) != 0);
+}
+
+ATF_TC(cosl_inf_neg);
+ATF_TC_HEAD(cosl_inf_neg, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test cosl(-Inf) == NaN");
+}
+
+ATF_TC_BODY(cosl_inf_neg, tc)
+{
+	const long double x = -1.0L / 0.0L;
+
+	ATF_CHECK(isnan(cosl(x)) != 0);
+}
+
+ATF_TC(cosl_inf_pos);
+ATF_TC_HEAD(cosl_inf_pos, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test cosl(+Inf) == NaN");
+}
+
+ATF_TC_BODY(cosl_inf_pos, tc)
+{
+	const long double x = 1.0L / 0.0L;
+
+	ATF_CHECK(isnan(cosl(x)) != 0);
+}
+
+
+ATF_TC(cosl_zero_neg);
+ATF_TC_HEAD(cosl_zero_neg, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test cosl(-0.0) == 1.0");
+}
+
+ATF_TC_BODY(cosl_zero_neg, tc)
+{
+	const long double x = -0.0L;
+
+	ATF_CHECK(cosl(x) == 1.0);
+}
+
+ATF_TC(cosl_zero_pos);
+ATF_TC_HEAD(cosl_zero_pos, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test cosl(+0.0) == 1.0");
+}
+
+ATF_TC_BODY(cosl_zero_pos, tc)
+{
+	const long double x = 0.0L;
+
+	ATF_CHECK(cosl(x) == 1.0);
+}
+#endif
+
 /*
  * cos(3)
  */
@@ -260,6 +361,14 @@ ATF_TC_BODY(cosf_zero_pos, tc)
 
 ATF_TP_ADD_TCS(tp)
 {
+#ifdef __HAVE_LONG_DOUBLE
+	ATF_TP_ADD_TC(tp, cosl_angles);
+	ATF_TP_ADD_TC(tp, cosl_nan);
+	ATF_TP_ADD_TC(tp, cosl_inf_neg);
+	ATF_TP_ADD_TC(tp, cosl_inf_pos);
+	ATF_TP_ADD_TC(tp, cosl_zero_neg);
+	ATF_TP_ADD_TC(tp, cosl_zero_pos);
+#endif
 
 	ATF_TP_ADD_TC(tp, cos_angles);
 	ATF_TP_ADD_TC(tp, cos_nan);



CVS commit: src/sys/miscfs/procfs

2019-04-25 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Apr 25 22:48:42 UTC 2019

Modified Files:
src/sys/miscfs/procfs: procfs.h

Log Message:
Restore mapping of file id to pid/type/fd.
Use 64bit file id to allow for 32bit fd and 25-26bit pid.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/miscfs/procfs/procfs.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/miscfs/procfs/procfs.h
diff -u src/sys/miscfs/procfs/procfs.h:1.75 src/sys/miscfs/procfs/procfs.h:1.76
--- src/sys/miscfs/procfs/procfs.h:1.75	Sat Mar 30 23:28:30 2019
+++ src/sys/miscfs/procfs/procfs.h	Thu Apr 25 22:48:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs.h,v 1.75 2019/03/30 23:28:30 christos Exp $	*/
+/*	$NetBSD: procfs.h,v 1.76 2019/04/25 22:48:42 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -115,6 +115,7 @@ typedef enum {
 #ifdef __HAVE_PROCFS_MACHDEP
 	PROCFS_MACHDEP_NODE_TYPES
 #endif
+	PFSlast,	/* track number of types */
 } pfstype;
 
 /*
@@ -133,7 +134,7 @@ struct pfsnode {
 #define pfs_fd pfs_key.pk_fd
 	mode_t		pfs_mode;	/* mode bits for stat() */
 	u_long		pfs_flags;	/* open flags */
-	u_long		pfs_fileno;	/* unique file id */
+	uint64_t	pfs_fileno;	/* unique file id */
 };
 
 #define PROCFS_NOTELEN	64	/* max length of a note (/proc/$pid/note) */
@@ -164,10 +165,12 @@ struct procfs_args {
 #define UIO_MX 32
 
 #define PROCFS_FILENO(pid, type, fd) \
-(((type) < PFSproc) ? ((type) + 2) : \
-	(((fd) == -1) ? pid)+1) << 5) + ((int) (type))) : \
-	pid)+1) << 16) | ((fd) << 5) | ((int) (type)
-#define PROCFS_TYPE(type)	((type) & 0x1f)
+	(  (type) == PFSroot ? 2 \
+	 : (type) == PFScurproc ? 3 \
+	 : (type) == PFSself ? 4 \
+ : (fd) == -1 ? ((pid)+1) * PFSlast + (type) \
+ : ((uint64_t)((pid)+1) << 32 | (fd)) * PFSlast + (type))
+#define PROCFS_TYPE(type)	((type) % PFSlast)
 
 struct procfsmount {
 	void *pmnt_exechook;



CVS commit: src/tests/lib

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

Modified Files:
src/tests/lib/libc/gen: t_fpsetmask.c t_siginfo.c
src/tests/lib/libm: t_fenv.c

Log Message:
Fix typo in 'exceptions'


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libc/gen/t_fpsetmask.c
cvs rdiff -u -r1.35 -r1.36 src/tests/lib/libc/gen/t_siginfo.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libm/t_fenv.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/gen/t_fpsetmask.c
diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.19 src/tests/lib/libc/gen/t_fpsetmask.c:1.20
--- src/tests/lib/libc/gen/t_fpsetmask.c:1.19	Wed Jan 30 12:16:28 2019
+++ src/tests/lib/libc/gen/t_fpsetmask.c	Thu Apr 25 20:48:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fpsetmask.c,v 1.19 2019/01/30 12:16:28 martin Exp $ */
+/*	$NetBSD: t_fpsetmask.c,v 1.20 2019/04/25 20:48:54 kamil Exp $ */
 
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@ ATF_TC_BODY(no_test, tc)
 
 #if (__arm__ && !__SOFTFP__) || __aarch64__
 	/*
-	 * Some NEON fpus do not trap on IEEE 754 FP excpeptions.
+	 * Some NEON fpus do not trap on IEEE 754 FP exceptions.
 	 * skip these tests if running on them and compiled for
 	 * hard float.
 	 */

Index: src/tests/lib/libc/gen/t_siginfo.c
diff -u src/tests/lib/libc/gen/t_siginfo.c:1.35 src/tests/lib/libc/gen/t_siginfo.c:1.36
--- src/tests/lib/libc/gen/t_siginfo.c:1.35	Wed Jan 30 12:16:28 2019
+++ src/tests/lib/libc/gen/t_siginfo.c	Thu Apr 25 20:48:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: t_siginfo.c,v 1.35 2019/01/30 12:16:28 martin Exp $ */
+/* $NetBSD: t_siginfo.c,v 1.36 2019/04/25 20:48:54 kamil Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -311,7 +311,7 @@ ATF_TC_BODY(sigfpe_flt, tc)
 		atf_tc_skip("Test does not run correctly under QEMU");
 #if (__arm__ && !__SOFTFP__) || __aarch64__
 	/*
-	 * Some NEON fpus do not trap on IEEE 754 FP excpeptions.
+	 * Some NEON fpus do not trap on IEEE 754 FP exceptions.
 	 * skip these tests if running on them and compiled for
 	 * hard float.
 	 */

Index: src/tests/lib/libm/t_fenv.c
diff -u src/tests/lib/libm/t_fenv.c:1.5 src/tests/lib/libm/t_fenv.c:1.6
--- src/tests/lib/libm/t_fenv.c:1.5	Wed Jan 30 12:16:28 2019
+++ src/tests/lib/libm/t_fenv.c	Thu Apr 25 20:48:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fenv.c,v 1.5 2019/01/30 12:16:28 martin Exp $ */
+/* $NetBSD: t_fenv.c,v 1.6 2019/04/25 20:48:54 kamil Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_fenv.c,v 1.5 2019/01/30 12:16:28 martin Exp $");
+__RCSID("$NetBSD: t_fenv.c,v 1.6 2019/04/25 20:48:54 kamil Exp $");
 
 #include 
 
@@ -42,7 +42,7 @@ __RCSID("$NetBSD: t_fenv.c,v 1.5 2019/01
 
 #if (__arm__ && !__SOFTFP__) || __aarch64__
 	/*
-	 * Some NEON fpus  do not trap on IEEE 754 FP excpeptions.
+	 * Some NEON fpus  do not trap on IEEE 754 FP exceptions.
 	 * Skip these tests if running on them and compiled for
 	 * hard float.
 	 */



CVS commit: src/tests/kernel

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

Modified Files:
src/tests/kernel: h_segv.c

Log Message:
Fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/kernel/h_segv.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/kernel/h_segv.c
diff -u src/tests/kernel/h_segv.c:1.13 src/tests/kernel/h_segv.c:1.14
--- src/tests/kernel/h_segv.c:1.13	Wed Jan 30 12:16:28 2019
+++ src/tests/kernel/h_segv.c	Thu Apr 25 19:37:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_segv.c,v 1.13 2019/01/30 12:16:28 martin Exp $	*/
+/*	$NetBSD: h_segv.c,v 1.14 2019/04/25 19:37:09 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: h_segv.c,v 1.13 2019/01/30 12:16:28 martin Exp $");
+__RCSID("$NetBSD: h_segv.c,v 1.14 2019/04/25 19:37:09 kamil Exp $");
 
 #define	__TEST_FENV
 
@@ -113,7 +113,7 @@ check_fpe(void)
 {
 #if (__arm__ && !__SOFTFP__) || __aarch64__
 	/*
-	 * Some NEON fpus do not trap on IEEE 754 FP excpeptions.
+	 * Some NEON fpus do not trap on IEEE 754 FP exceptions.
 	 * Skip these tests if running on them and compiled for
 	 * hard float.
 	 */



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

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

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

Log Message:
Introduce check for the support of FPU exceptions

If FPU exceptions are unsupported, skip the SIGFPE crash tests.

Reuse code from tests/kernel/h_segv.c


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r1.113 -r1.114 src/tests/lib/libc/sys/t_ptrace_wait.c
cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libc/sys/t_ptrace_wait.h

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

Modified files:

Index: src/tests/lib/libc/sys/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.54 src/tests/lib/libc/sys/Makefile:1.55
--- src/tests/lib/libc/sys/Makefile:1.54	Sun Feb 10 02:13:45 2019
+++ src/tests/lib/libc/sys/Makefile	Thu Apr 25 19:15:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2019/02/10 02:13:45 kamil Exp $
+# $NetBSD: Makefile,v 1.55 2019/04/25 19:15:23 kamil Exp $
 
 MKMAN=	no
 
@@ -88,12 +88,12 @@ SRCS.t_mprotect=	t_mprotect.c ${SRCS_EXE
 
 LDADD.t_getpid+=-lpthread
 
-LDFLAGS.t_ptrace_wait+=		-pthread
-LDFLAGS.t_ptrace_wait3+=	-pthread
-LDFLAGS.t_ptrace_wait4+=	-pthread
-LDFLAGS.t_ptrace_wait6+=	-pthread
-LDFLAGS.t_ptrace_waitid+=	-pthread
-LDFLAGS.t_ptrace_waitpid+=	-pthread
+LDFLAGS.t_ptrace_wait+=		-pthread -lm
+LDFLAGS.t_ptrace_wait3+=	-pthread -lm
+LDFLAGS.t_ptrace_wait4+=	-pthread -lm
+LDFLAGS.t_ptrace_wait6+=	-pthread -lm
+LDFLAGS.t_ptrace_waitid+=	-pthread -lm
+LDFLAGS.t_ptrace_waitpid+=	-pthread -lm
 
 .if (${MKRUMP} != "no") && !defined(BSD_MK_COMPAT_FILE)
 CPPFLAGS.t_posix_fadvise.c += -D_KERNTYPES
@@ -102,12 +102,12 @@ LDADD.t_posix_fadvise+= -lrumpvfs -lrump
 .endif
 
 CPPFLAGS.t_lwp_create.c		+= -D_KERNTYPES
-CPPFLAGS.t_ptrace_wait.c	+= -D_KERNTYPES
-CPPFLAGS.t_ptrace_wait3.c	+= -D_KERNTYPES
-CPPFLAGS.t_ptrace_wait4.c	+= -D_KERNTYPES
-CPPFLAGS.t_ptrace_wait6.c	+= -D_KERNTYPES
-CPPFLAGS.t_ptrace_waitid.c	+= -D_KERNTYPES
-CPPFLAGS.t_ptrace_waitpid.c	+= -D_KERNTYPES
+CPPFLAGS.t_ptrace_wait.c	+= -D_KERNTYPES -D__TEST_FENV
+CPPFLAGS.t_ptrace_wait3.c	+= -D_KERNTYPES -D__TEST_FENV
+CPPFLAGS.t_ptrace_wait4.c	+= -D_KERNTYPES -D__TEST_FENV
+CPPFLAGS.t_ptrace_wait6.c	+= -D_KERNTYPES -D__TEST_FENV
+CPPFLAGS.t_ptrace_waitid.c	+= -D_KERNTYPES -D__TEST_FENV
+CPPFLAGS.t_ptrace_waitpid.c	+= -D_KERNTYPES -D__TEST_FENV
 CPPFLAGS.t_ucontext.c		+= -D_KERNTYPES
 
 FILES=		truncate_test.root_owned

Index: src/tests/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.113 src/tests/lib/libc/sys/t_ptrace_wait.c:1.114
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.113	Thu Apr 25 11:47:59 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Thu Apr 25 19:15:23 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.113 2019/04/25 11:47:59 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.114 2019/04/25 19:15:23 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.113 2019/04/25 11:47:59 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.114 2019/04/25 19:15:23 kamil Exp $");
 
 #include 
 #include 
@@ -53,6 +53,11 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.11
 #include 
 #include 
 
+#include 
+#if (__arm__ && !__SOFTFP__) || __aarch64__
+#include  /* only need for ARM Cortex/Neon hack */
+#endif
+
 #include 
 
 #include "h_macros.h"
@@ -413,6 +418,9 @@ traceme_crash(int sig)
 		atf_tc_skip("PTRACE_ILLEGAL_ASM not defined");
 #endif
 
+	if (sig == SIGFPE && !are_fpu_exceptions_supported())
+		atf_tc_skip("FP exceptions are not supported");
+
 	memset(, 0, sizeof(info));
 
 	DPRINTF("Before forking process PID=%d\n", getpid());
@@ -537,6 +545,9 @@ traceme_signalmasked_crash(int sig)
 		atf_tc_skip("PTRACE_ILLEGAL_ASM not defined");
 #endif
 
+	if (sig == SIGFPE && !are_fpu_exceptions_supported())
+		atf_tc_skip("FP exceptions are not supported");
+
 	memset(, 0, sizeof(info));
 
 	DPRINTF("Before forking process PID=%d\n", getpid());
@@ -715,6 +726,9 @@ traceme_signalignored_crash(int sig)
 		atf_tc_skip("PTRACE_ILLEGAL_ASM not defined");
 #endif
 
+	if (sig == SIGFPE && !are_fpu_exceptions_supported())
+		atf_tc_skip("FP exceptions are not supported");
+
 	memset(, 0, sizeof(info));
 
 	DPRINTF("Before forking process PID=%d\n", getpid());
@@ -1523,6 +1537,9 @@ traceme_vfork_crash(int sig)
 		atf_tc_skip("PTRACE_ILLEGAL_ASM not defined");
 #endif
 
+	if (sig == SIGFPE && !are_fpu_exceptions_supported())
+		atf_tc_skip("FP exceptions are not supported");
+
 	DPRINTF("Before forking process PID=%d\n", getpid());
 	SYSCALL_REQUIRE((child = vfork()) != -1);
 	if (child == 0) {
@@ -1602,6 +1619,9 @@ traceme_vfork_signalmasked_crash(int sig
 		atf_tc_skip("PTRACE_ILLEGAL_ASM not defined");
 #endif
 
+	if (sig == SIGFPE && !are_fpu_exceptions_supported())
+		atf_tc_skip("FP 

CVS commit: [isaki-audio2] src/sys/dev/isa

2019-04-25 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Apr 25 14:00:20 UTC 2019

Modified Files:
src/sys/dev/isa [isaki-audio2]: ess.c

Log Message:
Adapt to audio2.
- Drop INDEPENDENT property.  Both play and rec share the sample rate.


To generate a diff of this commit:
cvs rdiff -u -r1.84.2.1 -r1.84.2.2 src/sys/dev/isa/ess.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/isa/ess.c
diff -u src/sys/dev/isa/ess.c:1.84.2.1 src/sys/dev/isa/ess.c:1.84.2.2
--- src/sys/dev/isa/ess.c:1.84.2.1	Sun Apr 21 05:11:22 2019
+++ src/sys/dev/isa/ess.c	Thu Apr 25 14:00:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ess.c,v 1.84.2.1 2019/04/21 05:11:22 isaki Exp $	*/
+/*	$NetBSD: ess.c,v 1.84.2.2 2019/04/25 14:00:20 isaki Exp $	*/
 
 /*
  * Copyright 1997
@@ -66,7 +66,7 @@
 */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.84.2.1 2019/04/21 05:11:22 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.84.2.2 2019/04/25 14:00:20 isaki Exp $");
 
 #include 
 #include 
@@ -83,8 +83,6 @@ __KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.84
 #include 
 
 #include 
-#include 
-#include 
 
 #include 
 #include 
@@ -115,15 +113,14 @@ unsigned uuu;
 
 int	ess_setup_sc(struct ess_softc *, int);
 
-int	ess_open(void *, int);
 void	ess_close(void *);
 int	ess_getdev(void *, struct audio_device *);
-int	ess_drain(void *);
 
-int	ess_query_encoding(void *, struct audio_encoding *);
+int	ess_query_format(void *, audio_format_query_t *);
 
-int	ess_set_params(void *, int, int, audio_params_t *,
-	audio_params_t *, stream_filter_list_t *, stream_filter_list_t *);
+int	ess_set_format(void *, int,
+	const audio_params_t *, const audio_params_t *,
+	audio_filter_reg_t *, audio_filter_reg_t *);
 
 int	ess_round_blocksize(void *, int, int, const audio_params_t *);
 
@@ -215,11 +212,9 @@ struct audio_device ess_device = {
  */
 
 const struct audio_hw_if ess_1788_hw_if = {
-	.open			= ess_open,
 	.close			= ess_close,
-	.drain			= ess_drain,
-	.query_encoding		= ess_query_encoding,
-	.set_params		= ess_set_params,
+	.query_format		= ess_query_format,
+	.set_format		= ess_set_format,
 	.round_blocksize	= ess_round_blocksize,
 	.halt_output		= ess_audio1_halt,
 	.halt_input		= ess_audio1_halt,
@@ -231,7 +226,6 @@ const struct audio_hw_if ess_1788_hw_if 
 	.allocm			= ess_malloc,
 	.freem			= ess_free,
 	.round_buffersize	= ess_round_buffersize,
-	.mappage		= ess_mappage,
 	.get_props		= ess_1788_get_props,
 	.trigger_output		= ess_audio1_trigger_output,
 	.trigger_input		= ess_audio1_trigger_input,
@@ -239,11 +233,9 @@ const struct audio_hw_if ess_1788_hw_if 
 };
 
 const struct audio_hw_if ess_1888_hw_if = {
-	.open			= ess_open,
 	.close			= ess_close,
-	.drain			= ess_drain,
-	.query_encoding		= ess_query_encoding,
-	.set_params		= ess_set_params,
+	.query_format		= ess_query_format,
+	.set_format		= ess_set_format,
 	.round_blocksize	= ess_round_blocksize,
 	.halt_output		= ess_audio2_halt,
 	.halt_input		= ess_audio1_halt,
@@ -255,35 +247,25 @@ const struct audio_hw_if ess_1888_hw_if 
 	.allocm			= ess_malloc,
 	.freem			= ess_free,
 	.round_buffersize	= ess_round_buffersize,
-	.mappage		= ess_mappage,
 	.get_props		= ess_1888_get_props,
 	.trigger_output		= ess_audio2_trigger_output,
 	.trigger_input		= ess_audio1_trigger_input,
 	.get_locks		= ess_get_locks,
 };
 
-#define ESS_NFORMATS	8
-#define ESS_FORMAT(enc, prec, ch, chmask) \
-	{ \
-		.mode		= AUMODE_PLAY | AUMODE_RECORD, \
-		.encoding	= (enc), \
-		.validbits	= (prec), \
-		.precision	= (prec), \
-		.channels	= (ch), \
-		.channel_mask	= (chmask), \
-		.frequency_type	= 0, \
-		.frequency	= { ESS_MINRATE, ESS_MAXRATE }, \
-	}
-static const struct audio_format ess_formats[ESS_NFORMATS] = {
-	ESS_FORMAT(AUDIO_ENCODING_SLINEAR_LE, 16, 2, AUFMT_STEREO),
-	ESS_FORMAT(AUDIO_ENCODING_SLINEAR_LE, 16, 1, AUFMT_STEREO),
-	ESS_FORMAT(AUDIO_ENCODING_ULINEAR_LE, 16, 2, AUFMT_STEREO),
-	ESS_FORMAT(AUDIO_ENCODING_ULINEAR_LE, 16, 1, AUFMT_STEREO),
-	ESS_FORMAT(AUDIO_ENCODING_ULINEAR_LE,  8, 2, AUFMT_STEREO),
-	ESS_FORMAT(AUDIO_ENCODING_ULINEAR_LE,  8, 1, AUFMT_STEREO),
-	ESS_FORMAT(AUDIO_ENCODING_SLINEAR_LE,  8, 2, AUFMT_STEREO),
-	ESS_FORMAT(AUDIO_ENCODING_SLINEAR_LE,  8, 1, AUFMT_STEREO),
+static const struct audio_format ess_formats[] = {
+	{
+		.mode		= AUMODE_PLAY | AUMODE_RECORD,
+		.encoding	= AUDIO_ENCODING_SLINEAR_LE,
+		.validbits	= 16,
+		.precision	= 16,
+		.channels	= 2,
+		.channel_mask	= AUFMT_STEREO,
+		.frequency_type	= 0,
+		.frequency	= { ESS_MINRATE, ESS_MAXRATE },
+	},
 };
+#define ESS_NFORMATS __arraycount(ess_formats)
 
 #ifdef AUDIO_DEBUG
 void ess_printsc(struct ess_softc *);
@@ -1097,13 +1079,6 @@ skip:
  * Various routines to interface to higher level audio driver
  */
 
-int
-ess_open(void *addr, int flags)
-{
-
-	return 0;
-}
-
 void
 ess_close(void *addr)
 {
@@ -1118,27 +1093,6 @@ ess_close(void *addr)
 	DPRINTF(("ess_close: closed\n"));
 }
 
-/*
- * Wait 

CVS commit: [isaki-audio2] src/sys

2019-04-25 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Apr 25 13:49:39 UTC 2019

Modified Files:
src/sys/arch/evbarm/mini2440 [isaki-audio2]: audio_mini2440.c
src/sys/dev/ic [isaki-audio2]: uda1341.c uda1341var.h

Log Message:
Adapt to audio2.
- The sample rate seems to be determined by peripherals so
  move uda1341_formats[] structure from ic/uda1341.c to audio_mini2440.c.
- XXX Resetting the device in open() (and close()) might be harmful
  but I don't know details about what does this reset do.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/arch/evbarm/mini2440/audio_mini2440.c
cvs rdiff -u -r1.1.56.1 -r1.1.56.2 src/sys/dev/ic/uda1341.c
cvs rdiff -u -r1.1 -r1.1.56.1 src/sys/dev/ic/uda1341var.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/evbarm/mini2440/audio_mini2440.c
diff -u src/sys/arch/evbarm/mini2440/audio_mini2440.c:1.2 src/sys/arch/evbarm/mini2440/audio_mini2440.c:1.2.2.1
--- src/sys/arch/evbarm/mini2440/audio_mini2440.c:1.2	Sat Mar 16 12:09:56 2019
+++ src/sys/arch/evbarm/mini2440/audio_mini2440.c	Thu Apr 25 13:49:39 2019
@@ -72,8 +72,10 @@ struct uda_softc {
 
 int	uda_ssio_open(void *, int);
 void	uda_ssio_close(void *);
-int	uda_ssio_set_params(void *, int, int, audio_params_t *, audio_params_t *,
-		   stream_filter_list_t *, stream_filter_list_t *);
+int	uda_ssio_query_format(void *, audio_format_query_t *);
+int	uda_ssio_set_format(void *, int,
+		   const audio_params_t *, const audio_params_t *,
+		   audio_filter_reg_t *, audio_filter_reg_t *);
 int	uda_ssio_round_blocksize(void *, int, int, const audio_params_t *);
 int	uda_ssio_start_output(void *, void *, int, void (*)(void *),
 			  void *);
@@ -91,8 +93,8 @@ void	uda_ssio_get_locks(void *, kmutex_t
 struct audio_hw_if uda1341_hw_if = {
 	.open			= uda_ssio_open,
 	.close			= uda_ssio_close,
-	.query_encoding		= uda1341_query_encodings,
-	.set_params		= uda_ssio_set_params,
+	.query_format		= uda_ssio_query_format,
+	.set_format		= uda_ssio_set_format,
 	.round_blocksize	= uda_ssio_round_blocksize,
 	.start_output		= uda_ssio_start_output,
 	.start_input		= uda_ssio_start_input,
@@ -115,6 +117,21 @@ static struct audio_device uda1341_devic
 	"uda_ssio"
 };
 
+static const struct audio_format uda_ssio_formats[] =
+{
+	{
+		.mode		= AUMODE_PLAY | AUMODE_RECORD,
+		.encoding	= AUDIO_ENCODING_SLINEAR_LE,
+		.validbits	= 16,
+		.precision	= 16,
+		.channels	= 2,
+		.channel_mask	= AUFMT_STEREO,
+		.frequency_type	= 6,
+		.frequency	= { 8000, 11025, 22050, 32000, 44100, 48000 },
+	}
+};
+#define UDA_SSIO_NFORMATS __arraycount(uda_ssio_formats)
+
 void uda_ssio_l3_write(void *,int mode, int value);
 
 int uda_ssio_match(device_t, cfdata_t, void*);
@@ -233,54 +250,28 @@ uda_ssio_close(void *handle)
 }
 
 int
-uda_ssio_set_params(void *handle, int setmode, int usemode,
-		audio_params_t *play, audio_params_t *rec,
-		stream_filter_list_t *pfil, stream_filter_list_t *rfil)
+uda_ssio_query_format(void *handle, audio_format_query_t *afp)
+{
+
+	return audio_query_format(uda_ssio_formats, UDA_SSIO_NFORMATS, afp);
+}
+
+int
+uda_ssio_set_format(void *handle, int setmode,
+		const audio_params_t *play, const audio_params_t *rec,
+		audio_filter_reg_t *pfil, audio_filter_reg_t *rfil)
 {
 	struct uda1341_softc *uc = handle;
 	struct uda_softc *sc = uc->parent;
-	const struct audio_format *selected_format;
-	audio_params_t *params;
-	stream_filter_list_t *fil;
 	int retval;
 
 	DPRINTF(("%s: setmode: %d\n", __func__, setmode));
-	DPRINTF(("%s: usemode: %d\n", __func__, usemode));
-
-	if (setmode == 0)
-		setmode = usemode;
 
-	if (setmode & AUMODE_PLAY) {
-		params = play;
-		fil = pfil;
-	} else if (setmode == AUMODE_RECORD) {
-		params = rec;
-		fil = rfil;
-	} else {
-		return EINVAL;
-	}
+	/* *play and *rec are the identical because !AUDIO_PROP_INDEPENDENT. */
 
 	DPRINTF(("%s: %dHz, encoding: %d, precision: %d, channels: %d\n",
-		 __func__, params->sample_rate, params->encoding, play->precision,
-		 params->channels));
-
-	if (params->sample_rate != 8000 &&
-	params->sample_rate != 11025 &&
-	params->sample_rate != 22050 &&
-	params->sample_rate != 32000 &&
-	params->sample_rate != 44100 &&
-	params->sample_rate != 48000) {
-		return EINVAL;
-	}
-
-	retval = auconv_set_converter(uda1341_formats, UDA1341_NFORMATS,
-setmode, params, true, fil);
-	if (retval < 0) {
-		printf("Could not find valid format\n");
-		return EINVAL;
-	}
-
-	selected_format = _formats[retval];
+		 __func__, play->sample_rate, play->encoding, play->precision,
+		 play->channels));
 
 	if (setmode == AUMODE_PLAY) {
 		s3c2440_i2s_set_direction(sc->sc_i2s_handle,
@@ -290,9 +281,8 @@ uda_ssio_set_params(void *handle, int se
 	  S3C2440_I2S_RECEIVE);
 	}
 
-	s3c2440_i2s_set_sample_rate(sc->sc_i2s_handle, params->sample_rate);
-	

CVS commit: [isaki-audio2] src/sys/dev/ic

2019-04-25 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Apr 25 13:24:11 UTC 2019

Modified Files:
src/sys/dev/ic [isaki-audio2]: tms320av110.c

Log Message:
Add missing mutex_exit() in interrupt handler.


To generate a diff of this commit:
cvs rdiff -u -r1.25.2.1 -r1.25.2.2 src/sys/dev/ic/tms320av110.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/ic/tms320av110.c
diff -u src/sys/dev/ic/tms320av110.c:1.25.2.1 src/sys/dev/ic/tms320av110.c:1.25.2.2
--- src/sys/dev/ic/tms320av110.c:1.25.2.1	Thu Apr 25 13:20:11 2019
+++ src/sys/dev/ic/tms320av110.c	Thu Apr 25 13:24:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tms320av110.c,v 1.25.2.1 2019/04/25 13:20:11 isaki Exp $	*/
+/*	$NetBSD: tms320av110.c,v 1.25.2.2 2019/04/25 13:24:11 isaki Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tms320av110.c,v 1.25.2.1 2019/04/25 13:20:11 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tms320av110.c,v 1.25.2.2 2019/04/25 13:24:11 isaki Exp $");
 
 #include 
 #include 
@@ -166,8 +166,10 @@ tms320av110_intr(void *p)
 	intlist = tav_read_short(sc->sc_iot, sc->sc_ioh, TAV_INTR)
 	/* & tav_read_short(sc->sc_iot, sc->sc_ioh, TAV_INTR_EN)*/;
 
-	if (!intlist)
+	if (!intlist) {
+		mutex_spin_exit(>sc_intr_lock);
 		return 0;
+	}
 
 	/* ack now, so that we don't miss later interrupts */
 	if (sc->sc_intack)



CVS commit: [isaki-audio2] src/sys

2019-04-25 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Apr 25 13:20:11 UTC 2019

Modified Files:
src/sys/arch/amiga/dev [isaki-audio2]: melody.c
src/sys/dev/ic [isaki-audio2]: tms320av110.c tms320av110var.h

Log Message:
Adapt to audio2.
- Starting playback in init_output() no longer works.
  Introduce sc_active flag instead and do it in start_output().


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.40.1 src/sys/arch/amiga/dev/melody.c
cvs rdiff -u -r1.25 -r1.25.2.1 src/sys/dev/ic/tms320av110.c
cvs rdiff -u -r1.12 -r1.12.42.1 src/sys/dev/ic/tms320av110var.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/amiga/dev/melody.c
diff -u src/sys/arch/amiga/dev/melody.c:1.18 src/sys/arch/amiga/dev/melody.c:1.18.40.1
--- src/sys/arch/amiga/dev/melody.c:1.18	Sat Oct 27 17:17:30 2012
+++ src/sys/arch/amiga/dev/melody.c	Thu Apr 25 13:20:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: melody.c,v 1.18 2012/10/27 17:17:30 chs Exp $ */
+/*	$NetBSD: melody.c,v 1.18.40.1 2019/04/25 13:20:11 isaki Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: melody.c,v 1.18 2012/10/27 17:17:30 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: melody.c,v 1.18.40.1 2019/04/25 13:20:11 isaki Exp $");
 
 /*
  * Melody audio driver.
@@ -114,7 +114,6 @@ melody_attach(device_t parent, device_t 
 
 	mutex_init(>sc_tav.sc_lock, MUTEX_DEFAULT, IPL_NONE);
 	mutex_init(>sc_tav.sc_intr_lock, MUTEX_DEFAULT, IPL_SCHED);
-	cv_init(>sc_tav.sc_cv, device_xname(self));
 
 	/*
 	 * Attach option boards now. They might provide additional

Index: src/sys/dev/ic/tms320av110.c
diff -u src/sys/dev/ic/tms320av110.c:1.25 src/sys/dev/ic/tms320av110.c:1.25.2.1
--- src/sys/dev/ic/tms320av110.c:1.25	Sat Mar 16 12:09:57 2019
+++ src/sys/dev/ic/tms320av110.c	Thu Apr 25 13:20:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tms320av110.c,v 1.25 2019/03/16 12:09:57 isaki Exp $	*/
+/*	$NetBSD: tms320av110.c,v 1.25.2.1 2019/04/25 13:20:11 isaki Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tms320av110.c,v 1.25 2019/03/16 12:09:57 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tms320av110.c,v 1.25.2.1 2019/04/25 13:20:11 isaki Exp $");
 
 #include 
 #include 
@@ -53,21 +53,18 @@ __KERNEL_RCSID(0, "$NetBSD: tms320av110.
 
 #include 
 
-int tav_open(void *, int);
 void tav_close(void *);
-int tav_drain(void *);
-int tav_query_encoding(void *, struct audio_encoding *);
-int tav_set_params(void *, int, int, audio_params_t *, audio_params_t *,
-stream_filter_list_t *, stream_filter_list_t *);
+int tav_query_format(void *, audio_format_query_t *);
+int tav_set_format(void *, int,
+const audio_params_t *, const audio_params_t *,
+audio_filter_reg_t *, audio_filter_reg_t *);
 int tav_round_blocksize(void *, int, int, const audio_params_t *);
-int tav_init_output(void *, void *, int);
 int tav_start_output(void *, void *, int, void (*)(void *), void *);
 int tav_start_input(void *, void *, int, void (*)(void *), void *);
 int tav_halt_output(void *);
 int tav_halt_input(void *);
 int tav_speaker_ctl(void *, int);
 int tav_getdev(void *, struct audio_device *);
-int tav_setfd(void *, int);
 int tav_set_port(void *, mixer_ctrl_t *);
 int tav_get_port(void *, mixer_ctrl_t *);
 int tav_query_devinfo(void *, mixer_devinfo_t *);
@@ -75,12 +72,10 @@ int tav_get_props(void *);
 void tav_get_locks(void *, kmutex_t **, kmutex_t **);
 
 const struct audio_hw_if tav_audio_if = {
-	.open			= tav_open,
 	.close			= tav_close,
-	.query_encoding		= tav_query_encoding,
-	.set_params		= tav_set_params,
+	.query_format		= tav_query_format,
+	.set_format		= tav_set_format,
 	.round_blocksize	= tav_round_blocksize,
-	.init_output		= tav_init_output,	/* optional */
 	.start_output		= tav_start_output,
 	.start_input		= tav_start_input,
 	.halt_output		= tav_halt_output,
@@ -94,6 +89,30 @@ const struct audio_hw_if tav_audio_if = 
 	.get_locks		= tav_get_locks,
 };
 
+/*
+ * XXX: The frequency might depend on the specific board.
+ * should be handled by the backend.
+ */
+#define TAV_FORMAT(prio, enc, prec) \
+	{ \
+		.priority	= (prio), \
+		.mode		= AUMODE_PLAY, \
+		.encoding	= (enc), \
+		.validbits	= (prec), \
+		.precision	= (prec), \
+		.channels	= 2, \
+		.channel_mask	= AUFMT_STEREO, \
+		.frequency_type	= 1, \
+		.frequency	= { 44100 }, \
+	}
+const struct audio_format tav_formats[] = {
+	TAV_FORMAT(-1, AUDIO_ENCODING_MPEG_L2_STREAM, 1),
+	TAV_FORMAT(-1, AUDIO_ENCODING_MPEG_L2_PACKETS, 1),
+	TAV_FORMAT(-1, AUDIO_ENCODING_MPEG_L2_SYSTEM, 1),
+	TAV_FORMAT( 0, AUDIO_ENCODING_SLINEAR_BE, 16),
+};
+#define TAV_NFORMATS __arraycount(tav_formats)
+
 void
 tms320av110_attach_mi(struct tav_softc *sc)
 {
@@ -129,6 +148,8 @@ tms320av110_attach_mi(struct tav_softc *
 	tav_write_byte(iot, ioh, TAV_SYNC_ECM, TAV_ECM_REPEAT);
 	

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

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

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

Log Message:
Do not allow 0 as ILL si_code as it's reserved for SI_USER


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/tests/lib/libc/sys/t_ptrace_wait.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.112 src/tests/lib/libc/sys/t_ptrace_wait.c:1.113
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.112	Thu Apr 25 11:45:12 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Thu Apr 25 11:47:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.112 2019/04/25 11:45:12 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.113 2019/04/25 11:47:59 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.112 2019/04/25 11:45:12 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.113 2019/04/25 11:47:59 kamil Exp $");
 
 #include 
 #include 
@@ -471,7 +471,7 @@ traceme_crash(int sig)
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
 		break;
 	case SIGILL:
-		ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+		ATF_REQUIRE(info.psi_siginfo.si_code >= ILL_ILLOPC &&
 		info.psi_siginfo.si_code <= ILL_BADSTK);
 		break;
 	case SIGFPE:
@@ -648,7 +648,7 @@ traceme_signalmasked_crash(int sig)
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
 		break;
 	case SIGILL:
-		ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+		ATF_REQUIRE(info.psi_siginfo.si_code >= ILL_ILLOPC &&
 		info.psi_siginfo.si_code <= ILL_BADSTK);
 		break;
 	case SIGFPE:
@@ -828,7 +828,7 @@ traceme_signalignored_crash(int sig)
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
 		break;
 	case SIGILL:
-		ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+		ATF_REQUIRE(info.psi_siginfo.si_code >= ILL_ILLOPC &&
 		info.psi_siginfo.si_code <= ILL_BADSTK);
 		break;
 	case SIGFPE:
@@ -2126,7 +2126,7 @@ unrelated_tracer_sees_crash(int sig, boo
 			FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
 			break;
 		case SIGILL:
-			FORKEE_ASSERT(info.psi_siginfo.si_code >= 0 &&
+			FORKEE_ASSERT(info.psi_siginfo.si_code >= ILL_ILLOPC &&
 			info.psi_siginfo.si_code <= ILL_BADSTK);
 			break;
 		case SIGFPE:



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

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

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

Log Message:
In ATF t_ptrace_wait* SIGILL tests allow any si_code

These codes are not portable between CPUs and kernels.

Change the checks to return any valid si_code in the defined range of ILL
values.

PR port-sparc/54140 by Andreas Gustafsson


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/tests/lib/libc/sys/t_ptrace_wait.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.111 src/tests/lib/libc/sys/t_ptrace_wait.c:1.112
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.111	Fri Apr 19 21:54:32 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Thu Apr 25 11:45:12 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.111 2019/04/19 21:54:32 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.112 2019/04/25 11:45:12 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.111 2019/04/19 21:54:32 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.112 2019/04/25 11:45:12 kamil Exp $");
 
 #include 
 #include 
@@ -471,7 +471,8 @@ traceme_crash(int sig)
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
 		break;
 	case SIGILL:
-		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, ILL_PRVOPC);
+		ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+		info.psi_siginfo.si_code <= ILL_BADSTK);
 		break;
 	case SIGFPE:
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
@@ -647,7 +648,8 @@ traceme_signalmasked_crash(int sig)
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
 		break;
 	case SIGILL:
-		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, ILL_PRVOPC);
+		ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+		info.psi_siginfo.si_code <= ILL_BADSTK);
 		break;
 	case SIGFPE:
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
@@ -826,7 +828,8 @@ traceme_signalignored_crash(int sig)
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
 		break;
 	case SIGILL:
-		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, ILL_PRVOPC);
+		ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+		info.psi_siginfo.si_code <= ILL_BADSTK);
 		break;
 	case SIGFPE:
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
@@ -2123,7 +2126,8 @@ unrelated_tracer_sees_crash(int sig, boo
 			FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
 			break;
 		case SIGILL:
-			FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, ILL_PRVOPC);
+			FORKEE_ASSERT(info.psi_siginfo.si_code >= 0 &&
+			info.psi_siginfo.si_code <= ILL_BADSTK);
 			break;
 		case SIGFPE:
 			FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, FPE_INTDIV);



CVS commit: src/etc/rc.d

2019-04-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Apr 25 11:21:34 UTC 2019

Modified Files:
src/etc/rc.d: Makefile

Log Message:
Fix build, install wsmoused


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/etc/rc.d/Makefile

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

Modified files:

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.101 src/etc/rc.d/Makefile:1.102
--- src/etc/rc.d/Makefile:1.101	Thu Apr 25 08:56:21 2019
+++ src/etc/rc.d/Makefile	Thu Apr 25 11:21:34 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.101 2019/04/25 08:56:21 roy Exp $
+# $NetBSD: Makefile,v 1.102 2019/04/25 11:21:34 roy Exp $
 
 .include 
 
@@ -40,7 +40,7 @@ CONFIGFILES=\
 		savecore screenblank securelevel sshd \
 		staticroute swap1 swap2 sysctl sysdb syslogd \
 		timed tpctl ttys \
-		veriexec virecover wdogctl wpa_supplicant wscons wsmouse
+		veriexec virecover wdogctl wpa_supplicant wscons wsmoused
 FILESDIR=	/etc/rc.d
 FILESMODE=	${BINMODE}
 



CVS commit: src/sys

2019-04-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Apr 25 10:44:53 UTC 2019

Modified Files:
src/sys/arch/acorn32/eb7500atx: if_cs.c
src/sys/dev/ic: rtl80x9.c
src/sys/dev/sbus: if_le_ledma.c

Log Message:
 KNF. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/acorn32/eb7500atx/if_cs.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ic/rtl80x9.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/sbus/if_le_ledma.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/acorn32/eb7500atx/if_cs.c
diff -u src/sys/arch/acorn32/eb7500atx/if_cs.c:1.11 src/sys/arch/acorn32/eb7500atx/if_cs.c:1.12
--- src/sys/arch/acorn32/eb7500atx/if_cs.c:1.11	Thu Apr 25 10:08:45 2019
+++ src/sys/arch/acorn32/eb7500atx/if_cs.c	Thu Apr 25 10:44:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cs.c,v 1.11 2019/04/25 10:08:45 msaitoh Exp $	*/
+/*	$NetBSD: if_cs.c,v 1.12 2019/04/25 10:44:53 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2004 Christopher Gilbert
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_cs.c,v 1.11 2019/04/25 10:08:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cs.c,v 1.12 2019/04/25 10:44:53 msaitoh Exp $");
 
 #include 
 #include 
@@ -145,7 +145,7 @@ cs_rsbus_attach(device_t parent, device_
 	cs_rsbus_bs_tag = *rs->sa_iot;
 
 	/* Registers are normally accessed in pairs, on a 4 byte aligned */
-	cs_rsbus_bs_tag.bs_cookie = (void *) 1;
+	cs_rsbus_bs_tag.bs_cookie = (void *)1;
 
 	sc->sc_iot = sc->sc_memt = _rsbus_bs_tag;
 
@@ -195,11 +195,11 @@ cs_rsbus_attach(device_t parent, device_
 	sc->sc_io_read_1 = cs_rbus_read_1;
 
 	/*
-	 * also provide media, otherwise it attempts to read the media from
+	 * Also provide media, otherwise it attempts to read the media from
 	 * the EEPROM, which again fails
 	 */
 	cs_attach(sc, NULL, cs_rbus_media, __arraycount(cs_rbus_media),
-	IFM_ETHER |IFM_10_T | IFM_FDX);
+	IFM_ETHER | IFM_10_T | IFM_FDX);
 }
 
 /*
@@ -210,20 +210,18 @@ static uint8_t
 cs_rbus_read_1(struct cs_softc *sc, bus_size_t a)
 {
 	bus_size_t offset;
-	/*
-	 * if it's an even address then just use the bus_space_read_1
-	 */
+
+	/* If it's an even address then just use the bus_space_read_1 */
 	if ((a & 1) == 0)
-	{
 		return bus_space_read_1(sc->sc_iot, sc->sc_ioh, a);
-	}
+
 	/*
-	 * otherwise we've get to work out the aligned address and then add
+	 * Otherwise we've get to work out the aligned address and then add
 	 * one
 	 */
 	offset = (a & ~1) << 1;
 	offset++;
 
-	/* and read it, with no shift (cookie is 0) */
+	/* And read it, with no shift (cookie is 0) */
 	return sc->sc_iot->bs_r_1(0, (sc)->sc_ioh, offset);
 }

Index: src/sys/dev/ic/rtl80x9.c
diff -u src/sys/dev/ic/rtl80x9.c:1.17 src/sys/dev/ic/rtl80x9.c:1.18
--- src/sys/dev/ic/rtl80x9.c:1.17	Thu Apr 25 10:08:45 2019
+++ src/sys/dev/ic/rtl80x9.c	Thu Apr 25 10:44:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl80x9.c,v 1.17 2019/04/25 10:08:45 msaitoh Exp $	*/
+/*	$NetBSD: rtl80x9.c,v 1.18 2019/04/25 10:44:52 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtl80x9.c,v 1.17 2019/04/25 10:08:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl80x9.c,v 1.18 2019/04/25 10:44:52 msaitoh Exp $");
 
 #include 
 #include 
@@ -114,11 +114,11 @@ rtl80x9_init_card(struct dp8390_softc *s
 
 	/* Write enable config1-3. */
 	NIC_PUT(sc->sc_regt, sc->sc_regh, NERTL_RTL3_EECR,
-	RTL3_EECR_EEM1|RTL3_EECR_EEM0);
+	RTL3_EECR_EEM1 | RTL3_EECR_EEM0);
 
 	/* First, set basic media type. */
 	reg = NIC_GET(sc->sc_regt, sc->sc_regh, NERTL_RTL3_CONFIG2);
-	reg &= ~(RTL3_CONFIG2_PL1|RTL3_CONFIG2_PL0);
+	reg &= ~(RTL3_CONFIG2_PL1 | RTL3_CONFIG2_PL0);
 	switch (IFM_SUBTYPE(ifm->ifm_cur->ifm_media)) {
 	case IFM_AUTO:
 		/* Nothing to do; both bits clear == auto-detect. */
@@ -133,7 +133,7 @@ rtl80x9_init_card(struct dp8390_softc *s
 		break;
 
 	case IFM_10_2:
-		reg |= RTL3_CONFIG2_PL1|RTL3_CONFIG2_PL0;
+		reg |= RTL3_CONFIG2_PL1 | RTL3_CONFIG2_PL0;
 		break;
 	}
 	NIC_PUT(sc->sc_regt, sc->sc_regh, NERTL_RTL3_CONFIG2, reg);
@@ -159,7 +159,7 @@ rtl80x9_media_init(struct dp8390_softc *
 	static int rtl80x9_media[] = {
 		IFM_ETHER | IFM_AUTO,
 		IFM_ETHER | IFM_10_T,
-		IFM_ETHER | IFM_10_T|IFM_FDX,
+		IFM_ETHER | IFM_10_T | IFM_FDX,
 		IFM_ETHER | IFM_10_2,
 	};
 	static const int rtl80x9_nmedia = __arraycount(rtl80x9_media);
@@ -176,26 +176,26 @@ rtl80x9_media_init(struct dp8390_softc *
 	conf3 = bus_space_read_1(sc->sc_regt, sc->sc_regh, NERTL_RTL3_CONFIG3);
 	printf("[0x%02x 0x%02x] ", conf2, conf3);
 
-	conf2 &= RTL3_CONFIG2_PL1|RTL3_CONFIG2_PL0;
+	conf2 &= RTL3_CONFIG2_PL1 | RTL3_CONFIG2_PL0;
 
 	switch (conf2) {
 	default:
-		defmedia = IFM_ETHER|IFM_AUTO;
+		defmedia = IFM_ETHER | IFM_AUTO;
 		printf("auto\n");
 		break;
 
-	case RTL3_CONFIG2_PL1|RTL3_CONFIG2_PL0:
+	case RTL3_CONFIG2_PL1 | 

CVS commit: src/sys

2019-04-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Apr 25 10:08:46 UTC 2019

Modified Files:
src/sys/arch/acorn32/eb7500atx: if_cs.c
src/sys/arch/acorn32/podulebus: if_ne_pbus.c
src/sys/arch/hppa/gsc: if_ie_gsc.c
src/sys/arch/macppc/dev: if_mc.c
src/sys/arch/sparc/dev: if_ie_obio.c if_le_obio.c
src/sys/arch/sun2/dev: if_ie_mbmem.c if_ie_obio.c
src/sys/dev/ic: cs89x0.c rtl80x9.c smc91cxx.c
src/sys/dev/isa: if_ef.c if_ix.c
src/sys/dev/pci: if_le_pci.c
src/sys/dev/vme: if_ie_vme.c

Log Message:
No functional change:
- Use __arraycount().
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/acorn32/eb7500atx/if_cs.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/acorn32/podulebus/if_ne_pbus.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/gsc/if_ie_gsc.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/macppc/dev/if_mc.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sparc/dev/if_ie_obio.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sparc/dev/if_le_obio.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sun2/dev/if_ie_mbmem.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sun2/dev/if_ie_obio.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/ic/cs89x0.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/ic/rtl80x9.c
cvs rdiff -u -r1.100 -r1.101 src/sys/dev/ic/smc91cxx.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/isa/if_ef.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/isa/if_ix.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_le_pci.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/vme/if_ie_vme.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/acorn32/eb7500atx/if_cs.c
diff -u src/sys/arch/acorn32/eb7500atx/if_cs.c:1.10 src/sys/arch/acorn32/eb7500atx/if_cs.c:1.11
--- src/sys/arch/acorn32/eb7500atx/if_cs.c:1.10	Mon Apr 13 21:18:40 2015
+++ src/sys/arch/acorn32/eb7500atx/if_cs.c	Thu Apr 25 10:08:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cs.c,v 1.10 2015/04/13 21:18:40 riastradh Exp $	*/
+/*	$NetBSD: if_cs.c,v 1.11 2019/04/25 10:08:45 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2004 Christopher Gilbert
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_cs.c,v 1.10 2015/04/13 21:18:40 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cs.c,v 1.11 2019/04/25 10:08:45 msaitoh Exp $");
 
 #include 
 #include 
@@ -86,14 +86,14 @@ __KERNEL_RCSID(0, "$NetBSD: if_cs.c,v 1.
  *
  * IRQ is mapped as:
  * CS8920 IRQ 3 	INT5
- * 
+ *
  * It must be configured as the following:
  * The CS8920 PNP address should be configured for ISA base at 0x300
- * to achieve the default register mapping as specified. 
+ * to achieve the default register mapping as specified.
  * Note memory addresses are all have bit 23 tied high in hardware.
  * This only effects the value programmed into the CS8920 memory offset
- * registers. 
- * 
+ * registers.
+ *
  * Just to add to the fun the I/O registers are layed out as:
  * R1R0
  * R3R2
@@ -102,8 +102,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_cs.c,v 1.
  * This works fine for 16bit accesses, but it makes access to single
  * register hard (which does happen on a reset, as we've got to toggle
  * the chip into 16bit mode)
- * 
- * Network DRQ is connected to DRQ5 
+ *
+ * Network DRQ is connected to DRQ5
  */
 
 /*
@@ -121,18 +121,18 @@ CFATTACH_DECL_NEW(cs_rsbus, sizeof(struc
 
 /* Available media */
 int cs_rbus_media [] = {
-	IFM_ETHER|IFM_10_T|IFM_FDX,
-	IFM_ETHER|IFM_10_T
+	IFM_ETHER | IFM_10_T | IFM_FDX,
+	IFM_ETHER | IFM_10_T
 };
 
-int 
+int
 cs_rsbus_probe(device_t parent, cfdata_t cf, void *aux)
 {
-	/* for now it'll always attach */
+	/* For now it'll always attach */
 	return 1;
 }
 
-void 
+void
 cs_rsbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct cs_softc *sc = device_private(self);
@@ -141,12 +141,12 @@ cs_rsbus_attach(device_t parent, device_
 
 	sc->sc_dev = self;
 
-	/* member copy */
+	/* Member copy */
 	cs_rsbus_bs_tag = *rs->sa_iot;
-	
-	/* registers are normally accessed in pairs, on a 4 byte aligned */
+
+	/* Registers are normally accessed in pairs, on a 4 byte aligned */
 	cs_rsbus_bs_tag.bs_cookie = (void *) 1;
-	
+
 	sc->sc_iot = sc->sc_memt = _rsbus_bs_tag;
 
 #if 0	/* Do DMA later */
@@ -156,14 +156,12 @@ cs_rsbus_attach(device_t parent, device_
 		isc->sc_drq = -1;
 #endif
 
-	/* device always interrupts on 3 but that routes to IRQ 5 */
+	/* Device always interrupts on 3 but that routes to IRQ 5 */
 	sc->sc_irq = 3;
 
 	printf("\n");
 
-	/*
-	 * Map the device.
-	 */
+	/* Map the device. */
 	iobase = 0x03010600;
 	if (bus_space_map(sc->sc_iot, iobase, CS8900_IOSIZE * 4,
 	0, >sc_ioh)) {
@@ -178,7 +176,7 @@ cs_rsbus_attach(device_t parent, device_
 	} else {
 		sc->sc_cfgflags |= CFGFLG_MEM_MODE | CFGFLG_USE_SA;
 		sc->sc_pktpgaddr = 1<<23;
-		//(0x4000 >> 1)  |  (1<<23);
+		//(0x4000 >> 1)	 |  (1<<23);
 	}
 #endif
 	

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

2019-04-25 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Apr 25 09:03:54 UTC 2019

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

Log Message:
Link against expat.

Helps us pass a qt5-qtbase gbm configure check, and avoid PLIST issues.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/lib/libgbm/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/libgbm/Makefile
diff -u src/external/mit/xorg/lib/libgbm/Makefile:1.5 src/external/mit/xorg/lib/libgbm/Makefile:1.6
--- src/external/mit/xorg/lib/libgbm/Makefile:1.5	Sat Apr 20 17:31:22 2019
+++ src/external/mit/xorg/lib/libgbm/Makefile	Thu Apr 25 09:03:54 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2019/04/20 17:31:22 maya Exp $
+#	$NetBSD: Makefile,v 1.6 2019/04/25 09:03:54 maya Exp $
 
 .include 
 
@@ -47,6 +47,7 @@ INCSDIR=	${X11INCDIR}
 
 LIBDPLIBS=	glapi	${.CURDIR}/../libglapi
 LIBDPLIBS+=	drm ${.CURDIR}/../libdrm
+LIBDPLIBS+=	expat	${NETBSDSRCDIR}/external/mit/expat/lib/libexpat
 
 PKGCONFIG=	gbm
 PKGDIST.gbm=	${X11SRCDIR.Mesa}/src/gbm/main



CVS commit: src

2019-04-25 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Apr 25 08:56:21 UTC 2019

Modified Files:
src/distrib/sets/lists/etc: mi
src/etc/rc.d: Makefile

Log Message:
Don't install YP rc.d files with MKYP=no


To generate a diff of this commit:
cvs rdiff -u -r1.256 -r1.257 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.100 -r1.101 src/etc/rc.d/Makefile

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

Modified files:

Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.256 src/distrib/sets/lists/etc/mi:1.257
--- src/distrib/sets/lists/etc/mi:1.256	Wed Apr 10 00:35:25 2019
+++ src/distrib/sets/lists/etc/mi	Thu Apr 25 08:56:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.256 2019/04/10 00:35:25 sevan Exp $
+# $NetBSD: mi,v 1.257 2019/04/25 08:56:21 roy Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -318,9 +318,9 @@
 ./etc/rc.d/wsconsetc-sys-rc
 ./etc/rc.d/wsmousedetc-sys-rc
 ./etc/rc.d/xntpdetc-obsolete		obsolete
-./etc/rc.d/ypbindetc-nis-rc
-./etc/rc.d/yppasswddetc-nis-rc
-./etc/rc.d/ypservetc-nis-rc
+./etc/rc.d/ypbindetc-nis-rc		yp
+./etc/rc.d/yppasswddetc-nis-rc		yp
+./etc/rc.d/ypservetc-nis-rc		yp
 ./etc/rc.d/ypsetetc-obsolete		obsolete
 ./etc/rc.lkm	etc-obsolete		obsolete
 ./etc/rc.local	etc-sys-rc

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.100 src/etc/rc.d/Makefile:1.101
--- src/etc/rc.d/Makefile:1.100	Wed Apr 10 00:32:15 2019
+++ src/etc/rc.d/Makefile	Thu Apr 25 08:56:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.100 2019/04/10 00:32:15 sevan Exp $
+# $NetBSD: Makefile,v 1.101 2019/04/25 08:56:21 roy Exp $
 
 .include 
 
@@ -40,11 +40,14 @@ CONFIGFILES=\
 		savecore screenblank securelevel sshd \
 		staticroute swap1 swap2 sysctl sysdb syslogd \
 		timed tpctl ttys \
-		veriexec virecover wdogctl wpa_supplicant wscons wsmoused \
-		ypbind yppasswdd ypserv
+		veriexec virecover wdogctl wpa_supplicant wscons wsmouse
 FILESDIR=	/etc/rc.d
 FILESMODE=	${BINMODE}
 
+.if ${MKYP} != "no"
+CONFIGFILES+=	ypbind yppasswdd ypserv
+.endif
+
 .if ${MKX11} != "no"
 CONFIGFILES+=	xdm xfs fccache
 FILESBUILD_xdm=	yes



CVS commit: src/sys/arch/next68k/dev

2019-04-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Apr 25 08:31:33 UTC 2019

Modified Files:
src/sys/arch/next68k/dev: if_xe.c

Log Message:
- KNF.
- Use __arraycount.
- Remove extra 'n' from debug printf.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/next68k/dev/if_xe.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/next68k/dev/if_xe.c
diff -u src/sys/arch/next68k/dev/if_xe.c:1.24 src/sys/arch/next68k/dev/if_xe.c:1.25
--- src/sys/arch/next68k/dev/if_xe.c:1.24	Fri Jun 10 13:27:12 2016
+++ src/sys/arch/next68k/dev/if_xe.c	Thu Apr 25 08:31:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_xe.c,v 1.24 2016/06/10 13:27:12 ozaki-r Exp $	*/
+/*	$NetBSD: if_xe.c,v 1.25 2019/04/25 08:31:33 msaitoh Exp $	*/
 /*
  * Copyright (c) 1998 Darrin B. Jewell
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_xe.c,v 1.24 2016/06/10 13:27:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xe.c,v 1.25 2019/04/25 08:31:33 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -82,26 +82,26 @@ void	xe_attach(device_t, device_t, void 
 int	xe_tint(void *);
 int	xe_rint(void *);
 
-struct mbuf * xe_dma_rxmap_load(struct mb8795_softc *, bus_dmamap_t);
+struct mbuf *xe_dma_rxmap_load(struct mb8795_softc *, bus_dmamap_t);
 
 bus_dmamap_t xe_dma_rx_continue(void *);
-void xe_dma_rx_completed(bus_dmamap_t, void *);
+void	xe_dma_rx_completed(bus_dmamap_t, void *);
 bus_dmamap_t xe_dma_tx_continue(void *);
-void xe_dma_tx_completed(bus_dmamap_t, void *);
-void xe_dma_rx_shutdown(void *);
-void xe_dma_tx_shutdown(void *);
+void	xe_dma_tx_completed(bus_dmamap_t, void *);
+void	xe_dma_rx_shutdown(void *);
+void	xe_dma_tx_shutdown(void *);
 
-static void	findchannel_defer(device_t);
+static void findchannel_defer(device_t);
 
 CFATTACH_DECL_NEW(xe, sizeof(struct xe_softc),
 xe_match, xe_attach, NULL, NULL);
 
 static int xe_dma_medias[] = {
-	IFM_ETHER|IFM_AUTO,
-	IFM_ETHER|IFM_10_T,
-	IFM_ETHER|IFM_10_2,
+	IFM_ETHER | IFM_AUTO,
+	IFM_ETHER | IFM_10_T,
+	IFM_ETHER | IFM_10_2,
 };
-static int nxe_dma_medias = (sizeof(xe_dma_medias)/sizeof(xe_dma_medias[0]));
+static int nxe_dma_medias = __arraycount(xe_dma_medias);
 
 static int attached = 0;
 
@@ -138,11 +138,11 @@ xe_match(device_t parent, cfdata_t match
 	struct intio_attach_args *ia = (struct intio_attach_args *)aux;
 
 	if (attached)
-		return (0);
+		return 0;
 
 	ia->ia_addr = (void *)NEXT_P_ENET;
 
-	return (1);
+	return 1;
 }
 
 static void
@@ -180,17 +180,17 @@ findchannel_defer(device_t self)
 
 	/* Initialize the DMA maps */
 	error = bus_dmamap_create(xsc->sc_txdma->sc_dmat, MCLBYTES,
-  (MCLBYTES/MSIZE), MCLBYTES, 0, BUS_DMA_ALLOCNOW,
-  >sc_tx_dmamap);
+	(MCLBYTES/MSIZE), MCLBYTES, 0, BUS_DMA_ALLOCNOW,
+	>sc_tx_dmamap);
 	if (error) {
-		aprint_error_dev(sc->sc_dev, "can't create tx DMA map, error = %d",
-		  error);
+		aprint_error_dev(sc->sc_dev,
+		"can't create tx DMA map, error = %d", error);
 	}
 
 	for(i = 0; i < MB8795_NRXBUFS; i++) {
 		error = bus_dmamap_create(xsc->sc_rxdma->sc_dmat, MCLBYTES,
-	  (MCLBYTES/MSIZE), MCLBYTES, 0, BUS_DMA_ALLOCNOW,
-	  >sc_rx_dmamap[i]);
+		(MCLBYTES/MSIZE), MCLBYTES, 0, BUS_DMA_ALLOCNOW,
+		>sc_rx_dmamap[i]);
 		if (error) {
 			panic("%s: can't create rx DMA map, error = %d",
 			  device_xname(sc->sc_dev), error);
@@ -207,7 +207,8 @@ findchannel_defer(device_t self)
 	 */
 	xsc->sc_txbuf = malloc(2000, M_DEVBUF, M_NOWAIT);
 	if (!xsc->sc_txbuf)
-		panic("%s: can't malloc tx DMA buffer", device_xname(sc->sc_dev));
+		panic("%s: can't malloc tx DMA buffer",
+		device_xname(sc->sc_dev));
 	
 	xsc->sc_tx_mb_head = NULL;
 	xsc->sc_tx_loaded = 0;
@@ -231,11 +232,12 @@ xe_attach(device_t parent, device_t self
 	DPRINTF(("%s: xe_attach()\n", device_xname(self)));
 
 	{
-		extern u_char rom_enetaddr[6]; /* kludge from machdep.c:next68k_bootargs() */
+		/* kludge from machdep.c:next68k_bootargs() */
+		extern u_char rom_enetaddr[6];
 		int i;
-		for(i=0;i<6;i++) {
+
+		for (i = 0; i < 6; i++)
 			sc->sc_enaddr[i] = rom_enetaddr[i];
-		}
 	}
 
 	printf("\n%s: MAC address %02x:%02x:%02x:%02x:%02x:%02x\n",
@@ -252,23 +254,18 @@ xe_attach(device_t parent, device_t self
 
 	sc->sc_bmap_bst = ia->ia_bst;
 	if (bus_space_map(sc->sc_bmap_bst, NEXT_P_BMAP,
-			  BMAP_SIZE, 0, >sc_bmap_bsh)) {
-		panic("\n%s: can't map bmap registers",
-		  device_xname(self));
-	}
+	BMAP_SIZE, 0, >sc_bmap_bsh))
+		panic("\n%s: can't map bmap registers", device_xname(self));
 
-	/*
-	 * Set up glue for MI code.
-	 */
+	/* Set up glue for MI code. */
 	sc->sc_glue = _glue;
 
 	xsc->sc_txdma = nextdma_findchannel("enetx");
 	xsc->sc_rxdma = nextdma_findchannel("enetr");
-	if (xsc->sc_rxdma && xsc->sc_txdma) {
+	if (xsc->sc_rxdma && xsc->sc_txdma)
 		findchannel_defer(self);
-	} else {
+	else
 		config_defer(self,