CVS commit: src/sys/compat/sys

2019-04-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Apr 10 04:37:00 UTC 2019

Modified Files:
src/sys/compat/sys: sockio.h

Log Message:
 Whitespace change. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/sys/sockio.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/compat/sys/sockio.h
diff -u src/sys/compat/sys/sockio.h:1.14 src/sys/compat/sys/sockio.h:1.15
--- src/sys/compat/sys/sockio.h:1.14	Wed Apr 10 04:28:03 2019
+++ src/sys/compat/sys/sockio.h	Wed Apr 10 04:37:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sockio.h,v 1.14 2019/04/10 04:28:03 msaitoh Exp $	*/
+/*	$NetBSD: sockio.h,v 1.15 2019/04/10 04:37:00 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993, 1994
@@ -141,43 +141,41 @@ struct oifdatareq {
 			 zero ctrs*/
 
 
-
-
 #define	OBIOCGETIF	 _IOR('B', 107, struct oifreq)
 #define	OBIOCSETIF	 _IOW('B', 108, struct oifreq)
 #define	OTAPGIFNAME	 _IOR('e', 0, struct oifreq)
 
-#define ifreqn2o(oi, ni) \
-	do { \
-		(void)memcpy((oi)->ifr_name, (ni)->ifr_name, \
-		sizeof((oi)->ifr_name)); \
-		(void)memcpy(&(oi)->ifr_ifru, &(ni)->ifr_ifru, \
-		sizeof((oi)->ifr_ifru)); \
+#define ifreqn2o(oi, ni)	\
+	do {			\
+		(void)memcpy((oi)->ifr_name, (ni)->ifr_name,	\
+		sizeof((oi)->ifr_name));			\
+		(void)memcpy(&(oi)->ifr_ifru, &(ni)->ifr_ifru,	\
+		sizeof((oi)->ifr_ifru));			\
 	} while (/*CONSTCOND*/0)
 
-#define ifreqo2n(oi, ni) \
-	do { \
-		(void)memcpy((ni)->ifr_name, (oi)->ifr_name, \
-		sizeof((oi)->ifr_name)); \
-		(void)memcpy(&(ni)->ifr_ifru, &(oi)->ifr_ifru, \
-		sizeof((oi)->ifr_ifru)); \
+#define ifreqo2n(oi, ni)	\
+	do {			\
+		(void)memcpy((ni)->ifr_name, (oi)->ifr_name,	\
+		sizeof((oi)->ifr_name));			\
+		(void)memcpy(&(ni)->ifr_ifru, &(oi)->ifr_ifru,	\
+		sizeof((oi)->ifr_ifru));			\
 	} while (/*CONSTCOND*/0)
 
-#define ifdatan2o(oi, ni) \
-	do { \
-		(void)memcpy((oi), (ni),  sizeof(*(oi))); \
-		(oi)->ifi_lastchange.tv_sec = \
-		(int32_t)(ni)->ifi_lastchange.tv_sec; \
-		(oi)->ifi_lastchange.tv_usec = \
-		(ni)->ifi_lastchange.tv_nsec / 1000; \
+#define ifdatan2o(oi, ni)	\
+	do {			\
+		(void)memcpy((oi), (ni),  sizeof(*(oi)));	\
+		(oi)->ifi_lastchange.tv_sec =			\
+		(int32_t)(ni)->ifi_lastchange.tv_sec;	\
+		(oi)->ifi_lastchange.tv_usec =			\
+		(ni)->ifi_lastchange.tv_nsec / 1000;	\
 	} while (/*CONSTCOND*/0)
 
-#define ifdatao2n(oi, ni) \
-	do { \
-		(void)memcpy((ni), (oi),  sizeof(*(oi))); \
+#define ifdatao2n(oi, ni)		   \
+	do {   \
+		(void)memcpy((ni), (oi),  sizeof(*(oi)));		   \
 		(ni)->ifi_lastchange.tv_sec = (oi)->ifi_lastchange.tv_sec; \
-		(ni)->ifi_lastchange.tv_nsec = \
-		(oi)->ifi_lastchange.tv_usec * 1000; \
+		(ni)->ifi_lastchange.tv_nsec =   \
+		(oi)->ifi_lastchange.tv_usec * 1000;		   \
 	} while (/*CONSTCOND*/0)
 
 #endif /* _COMPAT_SYS_SOCKIO_H_ */



CVS commit: src/sys/compat/sys

2019-04-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Apr 10 04:28:03 UTC 2019

Modified Files:
src/sys/compat/sys: sockio.h

Log Message:
 Fix ifdata"o2n"() macro. This is not a real bug because this macro is not used
from anywhere. Both of SIOCGIFDATA and SIOCZIFDATA use "n2o" because
ZIFDATA is almost the same as GIFDATA except zeroing after read.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/compat/sys/sockio.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/compat/sys/sockio.h
diff -u src/sys/compat/sys/sockio.h:1.13 src/sys/compat/sys/sockio.h:1.14
--- src/sys/compat/sys/sockio.h:1.13	Sun Jan 27 02:08:41 2019
+++ src/sys/compat/sys/sockio.h	Wed Apr 10 04:28:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sockio.h,v 1.13 2019/01/27 02:08:41 pgoyette Exp $	*/
+/*	$NetBSD: sockio.h,v 1.14 2019/04/10 04:28:03 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993, 1994
@@ -175,7 +175,6 @@ struct oifdatareq {
 #define ifdatao2n(oi, ni) \
 	do { \
 		(void)memcpy((ni), (oi),  sizeof(*(oi))); \
-		sizeof((oi)->ifr_name)); \
 		(ni)->ifi_lastchange.tv_sec = (oi)->ifi_lastchange.tv_sec; \
 		(ni)->ifi_lastchange.tv_nsec = \
 		(oi)->ifi_lastchange.tv_usec * 1000; \



CVS commit: src/sys/arch/usermode

2019-04-09 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Apr 10 04:10:54 UTC 2019

Modified Files:
src/sys/arch/usermode/include: types.h
src/sys/arch/usermode/usermode: copy.c

Log Message:
Make the usermode kernel compile again.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/usermode/include/types.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/usermode/usermode/copy.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/usermode/include/types.h
diff -u src/sys/arch/usermode/include/types.h:1.15 src/sys/arch/usermode/include/types.h:1.16
--- src/sys/arch/usermode/include/types.h:1.15	Sat Apr  6 03:06:28 2019
+++ src/sys/arch/usermode/include/types.h	Wed Apr 10 04:10:53 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.15 2019/04/06 03:06:28 thorpej Exp $ */
+/* $NetBSD: types.h,v 1.16 2019/04/10 04:10:53 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -94,6 +94,5 @@ typedef register_t	__register_t;
 #define __HAVE_CPU_LWP_SETPRIVATE
 #define __HAVE_MM_MD_KERNACC
 #define	__HAVE_COMPAT_NETBSD32
-#define	__HAVE_UCAS_FULL
 
 #endif /* !_USERMODE_TYPES_H_ */

Index: src/sys/arch/usermode/usermode/copy.c
diff -u src/sys/arch/usermode/usermode/copy.c:1.10 src/sys/arch/usermode/usermode/copy.c:1.11
--- src/sys/arch/usermode/usermode/copy.c:1.10	Wed Apr 10 03:39:34 2019
+++ src/sys/arch/usermode/usermode/copy.c	Wed Apr 10 04:10:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: copy.c,v 1.10 2019/04/10 03:39:34 msaitoh Exp $ */
+/* $NetBSD: copy.c,v 1.11 2019/04/10 04:10:54 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: copy.c,v 1.10 2019/04/10 03:39:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copy.c,v 1.11 2019/04/10 04:10:54 thorpej Exp $");
 
 #define	__UFETCHSTORE_PRIVATE
 #define	__UCAS_PRIVATE
@@ -97,20 +97,6 @@ kcopy(const void *src, void *dst, size_t
 }
 
 int
-_ucas_32(volatile uint32_t *uaddr, uint32_t old, uint32_t new, uint32_t *ret)
-{
-	*ret = atomic_cas_32(uaddr, old, new);
-}
-
-#ifdef _LP64
-int
-_ucas_64(volatile uint64_t *uaddr, uint64_t old, uint64_t new, uint64_t *ret)
-{
-	*ret = atomic_cas_64(uaddr, old, new);
-}
-#endif /* _LP64 */
-
-int
 _ufetch_8(const uint8_t *uaddr, uint8_t *valp)
 {
 	*valp = *uaddr;



CVS commit: src/sys/net

2019-04-09 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Apr 10 04:06:53 UTC 2019

Modified Files:
src/sys/net: rtsock_shared.c

Log Message:
Avoid a maybe-uninitialized warning by checking for an error return
that might indicate that 'len' was not initialized.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/net/rtsock_shared.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/net/rtsock_shared.c
diff -u src/sys/net/rtsock_shared.c:1.4 src/sys/net/rtsock_shared.c:1.5
--- src/sys/net/rtsock_shared.c:1.4	Fri Mar  1 11:06:57 2019
+++ src/sys/net/rtsock_shared.c	Wed Apr 10 04:06:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_shared.c,v 1.4 2019/03/01 11:06:57 pgoyette Exp $	*/
+/*	$NetBSD: rtsock_shared.c,v 1.5 2019/04/10 04:06:52 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.4 2019/03/01 11:06:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.5 2019/04/10 04:06:52 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -546,7 +546,7 @@ static int
 route_output_report(struct rtentry *rt, struct rt_addrinfo *info,
 struct rt_xmsghdr *rtm, struct rt_xmsghdr **new_rtm)
 {
-	int len;
+	int len, error;
 
 	if (rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) {
 		const struct ifaddr *rtifa;
@@ -580,7 +580,9 @@ route_output_report(struct rtentry *rt, 
 			info->rti_info[RTAX_BRD] = NULL;
 		rtm->rtm_index = ifp->if_index;
 	}
-	(void)rt_msg2(rtm->rtm_type, info, NULL, NULL, );
+	error = rt_msg2(rtm->rtm_type, info, NULL, NULL, );
+	if (error)
+		return error;
 	if (len > rtm->rtm_msglen) {
 		struct rt_xmsghdr *old_rtm = rtm;
 		R_Malloc(*new_rtm, struct rt_xmsghdr *, len);



CVS commit: src/sys/arch/usermode/usermode

2019-04-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Apr 10 03:39:34 UTC 2019

Modified Files:
src/sys/arch/usermode/usermode: copy.c

Log Message:
 Add missing semicolon.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/usermode/usermode/copy.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/usermode/usermode/copy.c
diff -u src/sys/arch/usermode/usermode/copy.c:1.9 src/sys/arch/usermode/usermode/copy.c:1.10
--- src/sys/arch/usermode/usermode/copy.c:1.9	Sat Apr  6 03:06:28 2019
+++ src/sys/arch/usermode/usermode/copy.c	Wed Apr 10 03:39:34 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: copy.c,v 1.9 2019/04/06 03:06:28 thorpej Exp $ */
+/* $NetBSD: copy.c,v 1.10 2019/04/10 03:39:34 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: copy.c,v 1.9 2019/04/06 03:06:28 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copy.c,v 1.10 2019/04/10 03:39:34 msaitoh Exp $");
 
 #define	__UFETCHSTORE_PRIVATE
 #define	__UCAS_PRIVATE
@@ -114,21 +114,21 @@ int
 _ufetch_8(const uint8_t *uaddr, uint8_t *valp)
 {
 	*valp = *uaddr;
-	return 0
+	return 0;
 }
 
 int
 _ufetch_16(const uint16_t *uaddr, uint16_t *valp)
 {
 	*valp = *uaddr;
-	return 0
+	return 0;
 }
 
 int
 _ufetch_32(const uint32_t *uaddr, uint32_t *valp)
 {
 	*valp = *uaddr;
-	return 0
+	return 0;
 }
 
 #ifdef _LP64
@@ -136,7 +136,7 @@ int
 _ufetch_64(const uint64_t *uaddr, uint64_t *valp)
 {
 	*valp = *uaddr;
-	return 0
+	return 0;
 }
 #endif /* _LP64 */
 
@@ -144,21 +144,21 @@ int
 _ustore_8(uint8_t *uaddr, uint8_t val)
 {
 	*uaddr = val;
-	return 0
+	return 0;
 }
 
 int
 _ustore_16(uint16_t *uaddr, uint16_t val)
 {
 	*uaddr = val;
-	return 0
+	return 0;
 }
 
 int
 _ustore_32(uint32_t *uaddr, uint32_t val)
 {
 	*uaddr = val;
-	return 0
+	return 0;
 }
 
 #ifdef _LP64
@@ -166,6 +166,6 @@ int
 _ustore_64(uint64_t *uaddr, uint64_t val)
 {
 	*uaddr = val;
-	return 0
+	return 0;
 }
 #endif /* _LP64 */



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

2019-04-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Apr 10 00:49:49 UTC 2019

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
Include CARP support by default


To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/sys/arch/macppc/conf/GENERIC

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/macppc/conf/GENERIC
diff -u src/sys/arch/macppc/conf/GENERIC:1.352 src/sys/arch/macppc/conf/GENERIC:1.353
--- src/sys/arch/macppc/conf/GENERIC:1.352	Tue Apr  9 22:38:25 2019
+++ src/sys/arch/macppc/conf/GENERIC	Wed Apr 10 00:49:49 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.352 2019/04/09 22:38:25 sevan Exp $
+# $NetBSD: GENERIC,v 1.353 2019/04/10 00:49:49 sevan Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		"arch/macppc/conf/std.macppc"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.352 $"
+#ident 		"GENERIC-$Revision: 1.353 $"
 
 maxusers	32
 
@@ -643,7 +643,7 @@ pseudo-device	fss			# file system snapsh
 pseudo-device	md			# memory disk device
 pseudo-device	loop			# network loopback
 pseudo-device	bpfilter		# packet filter
-#pseudo-device	carp			# Common Address Redundancy Protocol
+pseudo-device	carp			# Common Address Redundancy Protocol
 pseudo-device	npf			# NPF packet filter
 pseudo-device	ppp			# Point-to-Point Protocol
 pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)



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

2019-04-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Apr 10 00:35:25 UTC 2019

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

Log Message:
typo, pasto


To generate a diff of this commit:
cvs rdiff -u -r1.255 -r1.256 src/distrib/sets/lists/etc/mi

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

Modified files:

Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.255 src/distrib/sets/lists/etc/mi:1.256
--- src/distrib/sets/lists/etc/mi:1.255	Wed Apr 10 00:32:15 2019
+++ src/distrib/sets/lists/etc/mi	Wed Apr 10 00:35:25 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.255 2019/04/10 00:32:15 sevan Exp $
+# $NetBSD: mi,v 1.256 2019/04/10 00:35:25 sevan Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -46,8 +46,8 @@
 ./etc/default/security.conf			etc-obsolete		obsolete
 ./etc/default/weekly.conf			etc-obsolete		obsolete
 ./etc/defaults/daily.conf			etc-sys-defaults
-./etc/defaults/monthly.conf			etc-sys-defaults	npf
-./etc/defaults/npf.boot.conf			etc-pf-defaults		pf
+./etc/defaults/monthly.conf			etc-sys-defaults
+./etc/defaults/npf.boot.conf			etc-pf-defaults		npf
 ./etc/defaults/pf.boot.conf			etc-pf-defaults		pf
 ./etc/defaults/pkgpath.conf			etc-sys-defaults
 ./etc/defaults/rc.confetc-sys-defaults



CVS commit: src

2019-04-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Apr 10 00:32:15 UTC 2019

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

Log Message:
Include npf_boot rc.d scripts which loads an interim config early in boot.
By default /etc/default/npf.boot.conf which can be overriden by 
/etc/npf.boot.conf.


To generate a diff of this commit:
cvs rdiff -u -r1.254 -r1.255 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.6 -r1.7 src/etc/defaults/Makefile
cvs rdiff -u -r1.99 -r1.100 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.254 src/distrib/sets/lists/etc/mi:1.255
--- src/distrib/sets/lists/etc/mi:1.254	Sat Jan 12 17:25:09 2019
+++ src/distrib/sets/lists/etc/mi	Wed Apr 10 00:32:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.254 2019/01/12 17:25:09 roy Exp $
+# $NetBSD: mi,v 1.255 2019/04/10 00:32:15 sevan Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -46,7 +46,8 @@
 ./etc/default/security.conf			etc-obsolete		obsolete
 ./etc/default/weekly.conf			etc-obsolete		obsolete
 ./etc/defaults/daily.conf			etc-sys-defaults
-./etc/defaults/monthly.conf			etc-sys-defaults
+./etc/defaults/monthly.conf			etc-sys-defaults	npf
+./etc/defaults/npf.boot.conf			etc-pf-defaults		pf
 ./etc/defaults/pf.boot.conf			etc-pf-defaults		pf
 ./etc/defaults/pkgpath.conf			etc-sys-defaults
 ./etc/defaults/rc.confetc-sys-defaults
@@ -263,6 +264,7 @@
 ./etc/rc.d/nfsd	etc-nfsserver-rc
 ./etc/rc.d/nfslockingetc-nfsserver-rc
 ./etc/rc.d/npf	etc-npf-rc
+./etc/rc.d/npf_bootetc-npf-rc
 ./etc/rc.d/npfd	etc-npf-rc
 ./etc/rc.d/nsd	etc-nsd-rc		nsd
 ./etc/rc.d/ntpd	etc-ntp-rc

Index: src/etc/defaults/Makefile
diff -u src/etc/defaults/Makefile:1.6 src/etc/defaults/Makefile:1.7
--- src/etc/defaults/Makefile:1.6	Wed May  1 05:36:25 2013
+++ src/etc/defaults/Makefile	Wed Apr 10 00:32:15 2019
@@ -1,8 +1,9 @@
-#	$NetBSD: Makefile,v 1.6 2013/05/01 05:36:25 agc Exp $
+#	$NetBSD: Makefile,v 1.7 2019/04/10 00:32:15 sevan Exp $
 
 .include 
 
-CONFIGFILES=	daily.conf monthly.conf pkgpath.conf security.conf weekly.conf
+CONFIGFILES=	daily.conf monthly.conf npf.boot.conf pkgpath.conf \
+		security.conf weekly.conf
 FILESDIR=	/etc/defaults
 FILESMODE=	${NONBINMODE}
 

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.99 src/etc/rc.d/Makefile:1.100
--- src/etc/rc.d/Makefile:1.99	Sun Sep 23 07:24:19 2018
+++ src/etc/rc.d/Makefile	Wed Apr 10 00:32:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.99 2018/09/23 07:24:19 maxv Exp $
+# $NetBSD: Makefile,v 1.100 2019/04/10 00:32:15 sevan Exp $
 
 .include 
 
@@ -30,8 +30,8 @@ CONFIGFILES=\
 		ldconfig ldpd local lpd lvm \
 		makemandb mdnsd mixerctl modules mopd motd mountall \
 		mountcritlocal mountcritremote mountd moused mrouted \
-		named ndbootd network newsyslog nfsd nfslocking npf npfd ntpd \
-		ntpdate \
+		named ndbootd network newsyslog nfsd nfslocking npf npf_boot \
+		npfd ntpd ntpdate \
 		perusertmp pf pf_boot pflogd postfix powerd ppp pwcheck \
 		quota \
 		racoon rpcbind raidframe raidframeparity random_seed rarpd \



CVS commit: src/share/man/man4

2019-04-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Apr 10 00:18:39 UTC 2019

Modified Files:
src/share/man/man4: carp.4

Log Message:
typo, you don't need to specify a prefix & mask


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/carp.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/carp.4
diff -u src/share/man/man4/carp.4:1.5 src/share/man/man4/carp.4:1.6
--- src/share/man/man4/carp.4:1.5	Sun Dec  1 00:17:14 2013
+++ src/share/man/man4/carp.4	Wed Apr 10 00:18:39 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: carp.4,v 1.5 2013/12/01 00:17:14 christos Exp $
+.\"	$NetBSD: carp.4,v 1.6 2019/04/10 00:18:39 sevan Exp $
 .\"	$OpenBSD: carp.4,v 1.19 2005/08/09 09:52:12 jmc Exp $
 .\"
 .\" Copyright (c) 2003, Ryan McBride.  All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd November 30, 2013
+.Dd April 10, 2019
 .Dt CARP 4
 .Os
 .Sh NAME
@@ -124,7 +124,7 @@ This is the setup for host A:
 # ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.1 \e
 	netmask 255.255.255.0
 # ifconfig carp1 create
-# ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.2.1/24 \e
+# ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.2.1 \e
 	netmask 255.255.255.0
 .Ed
 .Pp



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

2019-04-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Apr  9 22:38:25 UTC 2019

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
Add a commented out entry for CARP


To generate a diff of this commit:
cvs rdiff -u -r1.351 -r1.352 src/sys/arch/macppc/conf/GENERIC

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/macppc/conf/GENERIC
diff -u src/sys/arch/macppc/conf/GENERIC:1.351 src/sys/arch/macppc/conf/GENERIC:1.352
--- src/sys/arch/macppc/conf/GENERIC:1.351	Wed Feb  6 11:58:31 2019
+++ src/sys/arch/macppc/conf/GENERIC	Tue Apr  9 22:38:25 2019
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.351 2019/02/06 11:58:31 rin Exp $
+# $NetBSD: GENERIC,v 1.352 2019/04/09 22:38:25 sevan Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		"arch/macppc/conf/std.macppc"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.351 $"
+#ident 		"GENERIC-$Revision: 1.352 $"
 
 maxusers	32
 
@@ -643,6 +643,7 @@ pseudo-device	fss			# file system snapsh
 pseudo-device	md			# memory disk device
 pseudo-device	loop			# network loopback
 pseudo-device	bpfilter		# packet filter
+#pseudo-device	carp			# Common Address Redundancy Protocol
 pseudo-device	npf			# NPF packet filter
 pseudo-device	ppp			# Point-to-Point Protocol
 pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)



CVS commit: src/sys

2019-04-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Apr  9 22:05:27 UTC 2019

Modified Files:
src/sys/conf: files param.c
src/sys/kern: sysv_ipc.c

Log Message:
defparam all of the config variables associated with SYSV IPC stuff.
The variables were removed from sys/conf/param.c and moved into the
SYSV IPC code, but config options were never propagated via any opt_*
file.

This should fix an issue reported on netbsd-users list from Dima Veselov.

Note that this does not address other parameters included in that report,
including CHILD_MAX and NOFILE; this commit only affects items related to
the SYSV IPC code.  Also note that this does not affect non-built-in
sysv_ipc modules, for which you need to update the Makefile to use any
non-standard config values - just like any other non-built-in modules
which have config params.

XXX Pull-up to -8 and -8-0

XXX Note that there are a couple of panic() calls in msginit() which
XXX really should be changed to simple printf() and then result in
XXX msginit failure.  Unfortunately msginit() currently doesn't return
XXX a value so we cannot indicate failure to the caller.  I will fix
XXX this is a future commit.


To generate a diff of this commit:
cvs rdiff -u -r1.1232 -r1.1233 src/sys/conf/files
cvs rdiff -u -r1.67 -r1.68 src/sys/conf/param.c
cvs rdiff -u -r1.37 -r1.38 src/sys/kern/sysv_ipc.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/conf/files
diff -u src/sys/conf/files:1.1232 src/sys/conf/files:1.1233
--- src/sys/conf/files:1.1232	Mon Mar 25 19:24:30 2019
+++ src/sys/conf/files	Tue Apr  9 22:05:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1232 2019/03/25 19:24:30 maxv Exp $
+#	$NetBSD: files,v 1.1233 2019/04/09 22:05:27 pgoyette Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20171118
@@ -73,7 +73,10 @@ defflagCPU_IN_CKSUM
 defflag opt_dtrace.h		KDTRACE_HOOKS
 
 defflag	opt_sysv.h		SYSVMSG SYSVSEM	SYSVSHM
-defparam opt_sysvparam.h	SHMMAXPGS SEMMNI SEMMNS SEMUME SEMMNU
+defparam opt_sysvparam.h	MSGMAX MSGMNI MSGMNB MSGTQL MSGSSZ MSGSEG
+defparam opt_sysvparam.h	SEMMAP SEMMNI SEMMNS SEMMNU SEMMSL SEMOPM
+defparam opt_sysvparam.h	SEMUME SEMUSZ SEMVMX SEMAEM
+defparam opt_sysvparam.h	SHMMAX SHMMIN SHMMNI SHMSEG SHMMAXPGS
 
 defflag	opt_ntp.h		PPS_SYNC PPS_DEBUG NTP
 

Index: src/sys/conf/param.c
diff -u src/sys/conf/param.c:1.67 src/sys/conf/param.c:1.68
--- src/sys/conf/param.c:1.67	Mon Nov  9 01:21:18 2015
+++ src/sys/conf/param.c	Tue Apr  9 22:05:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.c,v 1.67 2015/11/09 01:21:18 pgoyette Exp $	*/
+/*	$NetBSD: param.c,v 1.68 2019/04/09 22:05:27 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1989 Regents of the University of California.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: param.c,v 1.67 2015/11/09 01:21:18 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: param.c,v 1.68 2019/04/09 22:05:27 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_hz.h"
@@ -149,69 +149,6 @@ int	mblowat = MBLOWAT;
 #endif
 int	mcllowat = MCLLOWAT;
 
-#if XXX_PRG
-/*
- * Values in support of System V compatible shared memory.	XXX
- */
-#ifdef SYSVSHM
-#if !defined(SHMMAX) && defined(SHMMAXPGS)
-#define	SHMMAX	SHMMAXPGS	/* shminit() performs a `*= PAGE_SIZE' */
-#elif !defined(SHMMAX)
-#define SHMMAX 0
-#endif
-#ifndef	SHMMIN
-#define	SHMMIN	1
-#endif
-#ifndef	SHMMNI
-#define	SHMMNI	128		/* <64k, see IPCID_TO_IX in ipc.h */
-#endif
-#ifndef	SHMSEG
-#define	SHMSEG	128
-#endif
-
-struct	shminfo shminfo = {
-	SHMMAX,
-	SHMMIN,
-	SHMMNI,
-	SHMSEG,
-	0
-};
-#endif
-
-/*
- * Values in support of System V compatible semaphores.
- */
-#ifdef SYSVSEM
-struct	seminfo seminfo = {
-	SEMMAP,		/* # of entries in semaphore map */
-	SEMMNI,		/* # of semaphore identifiers */
-	SEMMNS,		/* # of semaphores in system */
-	SEMMNU,		/* # of undo structures in system */
-	SEMMSL,		/* max # of semaphores per id */
-	SEMOPM,		/* max # of operations per semop call */
-	SEMUME,		/* max # of undo entries per process */
-	SEMUSZ,		/* size in bytes of undo structure */
-	SEMVMX,		/* semaphore maximum value */
-	SEMAEM		/* adjust on exit max value */
-};
-#endif
-
-/*
- * Values in support of System V compatible messages.
- */
-#ifdef SYSVMSG
-struct	msginfo msginfo = {
-	MSGMAX,		/* max chars in a message */
-	MSGMNI,		/* # of message queue identifiers */
-	MSGMNB,		/* max chars in a queue */
-	MSGTQL,		/* max messages in system */
-	MSGSSZ,		/* size of a message segment */
-			/* (must be small power of 2 greater than 4) */
-	MSGSEG		/* number of message segments */
-};
-#endif
-#endif /* XXX_PRG */
-
 /*
  * Actual network mbuf sizes (read-only), for netstat.
  */

Index: src/sys/kern/sysv_ipc.c
diff -u src/sys/kern/sysv_ipc.c:1.37 src/sys/kern/sysv_ipc.c:1.38
--- src/sys/kern/sysv_ipc.c:1.37	Fri Mar  1 11:06:57 2019
+++ src/sys/kern/sysv_ipc.c	Tue Apr  9 22:05:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: 

CVS commit: src/usr.sbin/altq/altqd

2019-04-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Apr  9 19:10:21 UTC 2019

Modified Files:
src/usr.sbin/altq/altqd: altq.conf.5

Log Message:
bump date


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/altq/altqd/altq.conf.5

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/altq/altqd/altq.conf.5
diff -u src/usr.sbin/altq/altqd/altq.conf.5:1.17 src/usr.sbin/altq/altqd/altq.conf.5:1.18
--- src/usr.sbin/altq/altqd/altq.conf.5:1.17	Tue Apr  9 18:22:33 2019
+++ src/usr.sbin/altq/altqd/altq.conf.5	Tue Apr  9 19:10:21 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: altq.conf.5,v 1.17 2019/04/09 18:22:33 sevan Exp $
+.\"	$NetBSD: altq.conf.5,v 1.18 2019/04/09 19:10:21 sevan Exp $
 .\"	$KAME: altq.conf.5,v 1.15 2002/11/17 02:51:49 kjc Exp $
 .\"
 .\" Copyright (C) 2000
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 10, 2008
+.Dd April 9, 2019
 .Dt ALTQ.CONF 5
 .Os
 .\"



CVS commit: src/usr.bin/make

2019-04-09 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Apr  9 18:28:10 UTC 2019

Modified Files:
src/usr.bin/make: parse.c

Log Message:
ParseDoDependency: free paths rather than assert

PR: 52737
Reviewed by: christos


To generate a diff of this commit:
cvs rdiff -u -r1.231 -r1.232 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.231 src/usr.bin/make/parse.c:1.232
--- src/usr.bin/make/parse.c:1.231	Sat Dec 22 00:36:32 2018
+++ src/usr.bin/make/parse.c	Tue Apr  9 18:28:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.231 2018/12/22 00:36:32 sjg Exp $	*/
+/*	$NetBSD: parse.c,v 1.232 2019/04/09 18:28:10 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.231 2018/12/22 00:36:32 sjg Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.232 2019/04/09 18:28:10 sjg Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.231 2018/12/22 00:36:32 sjg Exp $");
+__RCSID("$NetBSD: parse.c,v 1.232 2019/04/09 18:28:10 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1753,7 +1753,8 @@ ParseDoDependency(char *line)
 }
 
 out:
-assert(paths == NULL);
+if (paths)
+	Lst_Destroy(paths, NULL);
 if (curTargs)
 	Lst_Destroy(curTargs, NULL);
 }



CVS commit: src/usr.sbin/altq/altqd

2019-04-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Apr  9 18:22:33 UTC 2019

Modified Files:
src/usr.sbin/altq/altqd: altq.conf.5

Log Message:
Drop Pp before Bl


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/altq/altqd/altq.conf.5

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/altq/altqd/altq.conf.5
diff -u src/usr.sbin/altq/altqd/altq.conf.5:1.16 src/usr.sbin/altq/altqd/altq.conf.5:1.17
--- src/usr.sbin/altq/altqd/altq.conf.5:1.16	Mon Jul  3 21:35:29 2017
+++ src/usr.sbin/altq/altqd/altq.conf.5	Tue Apr  9 18:22:33 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: altq.conf.5,v 1.16 2017/07/03 21:35:29 wiz Exp $
+.\"	$NetBSD: altq.conf.5,v 1.17 2019/04/09 18:22:33 sevan Exp $
 .\"	$KAME: altq.conf.5,v 1.15 2002/11/17 02:51:49 kjc Exp $
 .\"
 .\" Copyright (C) 2000
@@ -282,7 +282,6 @@ excess bandwidth is available.
 .Op Ar sched_type
 .Op Cm efficient
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar if_name
 specifies the name of a network interface (e.g., fxp0).
@@ -312,7 +311,6 @@ By adding the keyword
 .Cm efficient
 to the interface specification line, enables this mode.
 .El
-.Pp
 .Bl -tag -width class -offset indent
 .It Cm class
 .Ar sched_type
@@ -465,7 +463,6 @@ link-sharing to set the upper limit allo
 .Op Cm tbrsize Ar bytes
 .Op Ar sched_type
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar if_name
 specifies the name of a network interface (e.g., fxp0).
@@ -478,7 +475,6 @@ must be
 .Cm hfsc
 for HFSC.
 .El
-.Pp
 .Bl -tag -width class -offset indent
 .It Cm class
 .Ar sched_type
@@ -611,7 +607,6 @@ Up to 16 priorities can be used with PRI
 .Op Cm tbrsize Ar bytes
 .Op Ar sched_type
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar if_name
 specifies the name of a network interface (e.g., fxp0).
@@ -624,7 +619,6 @@ must be
 .Cm priq
 for PRIQ.
 .El
-.Pp
 .Bl -tag -width class -offset indent
 .It Cm class
 .Ar sched_type
@@ -638,7 +632,6 @@ for PRIQ.
 .Op Cm ecn
 .Op Cm cleardscp
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar sched_type
 must be
@@ -696,7 +689,6 @@ queue.
 .Op Cm qsize Ar bytes
 .Op Cm hash Ar policy
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Cm if_name
 specifies the name of a network interface (e.g., fxp0).
@@ -741,7 +733,6 @@ own queueing disciplines.
 .Op Ar sched_type
 .Op Cm qlimit Ar count
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar if_name
 specifies the name of a network interface (e.g., fxp0).
@@ -795,7 +786,6 @@ For example, 10 means the maximum drop p
 .Op Cm ecn
 .Op Cm flowvalve
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar if_name
 specifies the name of a network interface (e.g., fxp0).
@@ -886,7 +876,6 @@ precedence.
 .Op Cm hi_invpmax Ar n
 .Op Cm ecn
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar if_name
 specifies the name of a network interface (e.g., fxp0).
@@ -941,7 +930,6 @@ enables ECN.
 .Op Cm holdtime Ar usec
 .Op Cm ecn
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar if_name
 specifies the name of a network interface (e.g., fxp0).
@@ -994,7 +982,6 @@ command has the following syntax.
 .Ar cdnr_name
 .Aq action
 .El
-.Pp
 .Bl -tag -width 10n -offset indent
 .It Ar if_name
 Interface name.
@@ -1015,7 +1002,6 @@ The following actions are defined.
 allows the packet to go through without any modification to the packet.
 .El
 .El
-.Pp
 .Bl -tag -width drop -offset indent
 .It Cm drop
 .Bl -inset -offset indent
@@ -1024,7 +1010,6 @@ rejects the packet.
 The packet is immediately discarded.
 .El
 .El
-.Pp
 .Bl -tag -width mark -offset indent
 .It Cm mark
 .Ar value
@@ -1034,13 +1019,11 @@ sets the specified value to the ds field
 Then, the packet is allowed to go through.
 .El
 .El
-.Pp
 .Bl -tag -width tbmeter -offset indent
 .It Cm tbmeter
 .Ar rate depth
 .Aq in_action
 .Aq out_action
-.Pp
 .Bl -inset -offset indent
 .It Cm tbmeter
 is a token bucket meter configured with rate and depth parameters.
@@ -1051,7 +1034,6 @@ the packet size), tbmeter takes in_actio
 Otherwise, tbmeter takes out_action.
 .El
 .El
-.Pp
 .Bl -tag -width trtcm -offset indent
 .It Cm trtcm
 .Ar cmtd_rate cmtd_depth peak_rate peak_depth
@@ -1075,7 +1057,6 @@ a yellow packet can be yellow or red but
 Default is color-blind.
 .El
 .El
-.Pp
 .Bl -tag -width tswtcm -offset indent
 .It Cm tswtcm
 .Ar cmtd_rate peak_rate avg_interval
@@ -1117,7 +1098,6 @@ relaxed.
 .Op Cm tbrsize Ar bytes
 .Op Ar sched_type
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar if_name
 specifies the name of a network interface (e.g., fxp0).
@@ -1137,7 +1117,6 @@ must be
 .Cm jobs
 for JoBS.
 .El
-.Pp
 .Bl -tag -width class -offset indent
 .It Cm class
 .Ar sched_type
@@ -1152,7 +1131,6 @@ for JoBS.
 .Op Cm rdc Ar prop
 .Op Cm rlc Ar prop
 .El
-.Pp
 .Bl -tag -width 8n -offset indent
 .It Ar sched_type
 must be



CVS commit: src/usr.sbin/altq/altqstat

2019-04-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Apr  9 18:21:15 UTC 2019

Modified Files:
src/usr.sbin/altq/altqstat: altqstat.1

Log Message:
New sentence, new line


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/altq/altqstat/altqstat.1

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

Modified files:

Index: src/usr.sbin/altq/altqstat/altqstat.1
diff -u src/usr.sbin/altq/altqstat/altqstat.1:1.6 src/usr.sbin/altq/altqstat/altqstat.1:1.7
--- src/usr.sbin/altq/altqstat/altqstat.1:1.6	Sat Jan 19 03:05:35 2002
+++ src/usr.sbin/altq/altqstat/altqstat.1	Tue Apr  9 18:21:15 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: altqstat.1,v 1.6 2002/01/19 03:05:35 wiz Exp $
+.\"	$NetBSD: altqstat.1,v 1.7 2019/04/09 18:21:15 sevan Exp $
 .\"	$KAME: altqstat.1,v 1.6 2001/08/22 08:50:49 itojun Exp $
 .\"
 .\" Copyright (C) 2000
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 24, 1999
+.Dd April 9, 2019
 .Dt ALTQSTAT 1
 .Os
 .Sh NAME
@@ -41,8 +41,8 @@
 .Sh DESCRIPTION
 The
 .Nm altqstat
-command displays the status of a queueing discipline.  The contents
-displayed by
+command displays the status of a queueing discipline.
+The contents displayed by
 .Nm
 is specific to each queueing discipline.
 .Pp
@@ -51,7 +51,8 @@ The options are as follows:
 .It Fl e
 Echo communication with
 .Xr altqd 8
-to standard output.  This option is for debugging.
+to standard output.
+This option is for debugging.
 .It Fl n
 Disable communication with
 .Xr altqd 8 .
@@ -69,24 +70,27 @@ List all interfaces, classes and filters
 .Nm
 exits after displaying
 .Ar count
-times.  If no repeat
+times.
+If no repeat
 .Ar count
 is specified, the default is infinity.
 .It Fl w Ar wait
 Pause
 .Ar wait
-seconds between each display.  If no repeat
+seconds between each display.
+If no repeat
 .Ar wait
 interval is specified, the default is 5 seconds.
 .It Fl i Ar interface
-Show information about the specified interface.  If no
+Show information about the specified interface.
+If no
 .Ar interface
 is specified, the default interface is the first interface returned
 from
 .Xr altqd 8 .
 .It Fl I Ar input_interface
-Show information about the specified input interface.  This option is
-used to specify
+Show information about the specified input interface.
+This option is used to specify
 .Em traffic conditioner
 at an input interface.
 .El



CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal

2019-04-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  9 17:00:38 UTC 2019

Modified Files:
src/external/bsd/jemalloc/include/jemalloc/internal:
jemalloc_internal_defs.h

Log Message:
Use MIN_PAGE_SHIFT if PAGE_SHIFT is not available instead of MAX_PAGE_SHIFT.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h

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/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.5 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.6
--- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.5	Tue Apr  2 17:19:20 2019
+++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h	Tue Apr  9 13:00:38 2019
@@ -204,8 +204,8 @@
 #include 
 #if defined(PAGE_SHIFT)
 #define LG_PAGE PAGE_SHIFT
-#elif defined(MAX_PAGE_SHIFT)
-#define LG_PAGE MAX_PAGE_SHIFT
+#elif defined(MIN_PAGE_SHIFT)
+#define LG_PAGE MIN_PAGE_SHIFT
 #else
 #error "PAGE_SHIFT is not defined"
 #endif



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

2019-04-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Apr  9 14:47:15 UTC 2019

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

Log Message:
Need pthread for all the mtx_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/mit/xorg/lib/dri/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/dri/Makefile
diff -u src/external/mit/xorg/lib/dri/Makefile:1.30 src/external/mit/xorg/lib/dri/Makefile:1.31
--- src/external/mit/xorg/lib/dri/Makefile:1.30	Sun Mar 10 10:51:58 2019
+++ src/external/mit/xorg/lib/dri/Makefile	Tue Apr  9 14:47:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2019/03/10 10:51:58 mrg Exp $
+# $NetBSD: Makefile,v 1.31 2019/04/09 14:47:14 maya Exp $
 
 # Link the mesa_dri_drivers mega driver.
 
@@ -410,6 +410,7 @@ SRCS+=	${DRI_SOURCES.${_d}}
 
 LIBDPLIBS+=	expat		${NETBSDSRCDIR}/external/mit/expat/lib/libexpat
 LIBDPLIBS+=	m		${NETBSDSRCDIR}/lib/libm
+LIBDPLIBS+=	pthread		${NETBSDSRCDIR}/lib/libpthread
 LIBDPLIBS+= 	glapi		${.CURDIR}/../libglapi
 LIBDPLIBS+= 	drm		${.CURDIR}/../libdrm
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"



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

2019-04-09 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Apr  9 14:31:07 UTC 2019

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

Log Message:
Expand all @@ things in pkgconfig file.
claim TLS.
pick up the list of private libs from pkgsrc mesalib
GL_LIB got renamed to GL_PKGCONF_LIB.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/mit/xorg/lib/libGL/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/libGL/Makefile
diff -u src/external/mit/xorg/lib/libGL/Makefile:1.23 src/external/mit/xorg/lib/libGL/Makefile:1.24
--- src/external/mit/xorg/lib/libGL/Makefile:1.23	Sun Mar 10 10:51:58 2019
+++ src/external/mit/xorg/lib/libGL/Makefile	Tue Apr  9 14:31:06 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.23 2019/03/10 10:51:58 mrg Exp $
+#	$NetBSD: Makefile,v 1.24 2019/04/09 14:31:06 maya Exp $
 
 .include 
 
@@ -203,11 +203,11 @@ PKGCONFIG_VERSION.gl=	${MESA_VER}
 # XXX remove these from bsd.x11.mk
 # XXX enable GLX TLS?  it's enabled in the code, but not here..
 PKGCONFIG_SED_FLAGS= \
-	-e "s,@GL_PC_REQ_PRIV@,x11 xext,; \
-	s,@GL_LIB@,GL,; \
-	s,@GL_PC_LIB_PRIV@,-lm -lpthread,; \
+	-e "s,@GL_PC_REQ_PRIV@,libdrm x11 xext xdamage xfixes xcb-glx xcb-dri2 xxf86vm,; \
+	s,@GL_PKGCONF_LIB@,GL,; \
+	s,@GL_PC_LIB_PRIV@,-lm -lpthread -pthread,; \
 	s,@GL_PC_CFLAGS@,,; \
-	s,@GLX_TLS@,no,"
+	s,@GLX_TLS@,yes,"
 
 
 CWARNFLAGS.clang+=	-Wno-tautological-compare -Wno-format -Wno-constant-conversion \



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

2019-04-09 Thread Maya Rashish
Module Name:xsrc
Committed By:   maya
Date:   Tue Apr  9 14:14:59 UTC 2019

Modified Files:
xsrc/external/mit/MesaLib/dist/src/glx: glxclient.h glxcurrent.c
xsrc/external/mit/MesaLib/dist/src/mapi: entry_x86-64_tls.h
entry_x86_tls.h u_current.c u_current.h

Log Message:
Add workaround for non-zero initialized initial-exec TLS variables.
NetBSD doesn't support these with dlopen.

Ref:
https://bugs.freedesktop.org/show_bug.cgi?id=35268
https://mail-index.netbsd.org/pkgsrc-users/2015/09/11/msg022180.html
http://gnats.netbsd.org/50277

Fixes dlopen of libGL reported by prlw1 on current users.
>From tnn, via pkgsrc/graphics/MesaLib*.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/glx/glxclient.h \
xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86-64_tls.h
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86_tls.h
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/mapi/u_current.c \
xsrc/external/mit/MesaLib/dist/src/mapi/u_current.h

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

Modified files:

Index: xsrc/external/mit/MesaLib/dist/src/glx/glxclient.h
diff -u xsrc/external/mit/MesaLib/dist/src/glx/glxclient.h:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/glx/glxclient.h:1.2
--- xsrc/external/mit/MesaLib/dist/src/glx/glxclient.h:1.1.1.4	Sun Mar 10 03:42:32 2019
+++ xsrc/external/mit/MesaLib/dist/src/glx/glxclient.h	Tue Apr  9 14:14:59 2019
@@ -659,7 +659,11 @@ extern void __glXSetCurrentContext(struc
 extern __thread void *__glX_tls_Context
__attribute__ ((tls_model("initial-exec")));
 
+#if defined(__NetBSD__)
+#  define __glXGetCurrentContext() (likely(__glX_tls_Context) ? __glX_tls_Context : (void*))
+#else
 #  define __glXGetCurrentContext() __glX_tls_Context
+#endif
 
 # else
 
Index: xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c
diff -u xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c:1.1.1.4	Sun Mar 10 03:42:32 2019
+++ xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c	Tue Apr  9 14:14:59 2019
@@ -40,6 +40,18 @@
 #include "glx_error.h"
 
 /*
+ * MASSIVE KLUDGE!
+ * We need these to not be extern in libGL.so because of
+ * PR toolchain/50277
+ */
+#if defined(GLX_USE_TLS) && defined(__NetBSD__)
+_X_EXPORT __thread struct _glapi_table * _glapi_tls_Dispatch
+__attribute__((tls_model("initial-exec"))) = NULL;
+_X_EXPORT __thread void * _glapi_tls_Context
+__attribute__((tls_model("initial-exec")));
+#endif
+
+/*
 ** We setup some dummy structures here so that the API can be used
 ** even if no context is current.
 */
@@ -77,7 +89,11 @@ _X_HIDDEN pthread_mutex_t __glXmutex = P
  * \c __glXGetCurrentContext can be implemented as trivial macro.
  */
 __thread void *__glX_tls_Context __attribute__ ((tls_model("initial-exec")))
+#if defined(__NetBSD__)
+   = NULL; /* non-zero initializers not supported with dlopen */
+#else
= 
+#endif
 
 _X_HIDDEN void
 __glXSetCurrentContext(struct glx_context * c)

Index: xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86-64_tls.h
diff -u xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86-64_tls.h:1.3 xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86-64_tls.h:1.4
--- xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86-64_tls.h:1.3	Sun Mar 10 04:15:51 2019
+++ xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86-64_tls.h	Tue Apr  9 14:14:59 2019
@@ -43,10 +43,19 @@ __asm__(".text\n"
 
 #ifndef __ILP32__
 
+#if defined(__NetBSD__) && defined(MAPI_MODE_GLAPI)
 #define STUB_ASM_CODE(slot)  \
"movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t"  \
"movq %fs:(%rax), %r11\n\t"   \
+   "testq %r11, %r11\n\t"\
+   "cmoveq table_noop_array@GOTPCREL(%rip), %r11\n\t"\
"jmp *(8 * " slot ")(%r11)"
+#else
+#define STUB_ASM_CODE(slot)  \
+   "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t"  \
+   "movq %fs:(%rax), %r11\n\t"   \
+   "jmp *(8 * " slot ")(%r11)"
+#endif
 
 #else
 

Index: xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86_tls.h
diff -u xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86_tls.h:1.4 xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86_tls.h:1.5
--- xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86_tls.h:1.4	Sun Mar 10 04:15:51 2019
+++ xsrc/external/mit/MesaLib/dist/src/mapi/entry_x86_tls.h	Tue Apr  9 14:14:59 2019
@@ -56,10 +56,27 @@ __asm__(".balign 16\n"
".balign 16\n"\
func ":"
 
+#if defined(__NetBSD__) && defined(MAPI_MODE_GLAPI)
+extern const mapi_func table_noop_array[];
 #define STUB_ASM_CODE(slot)  \
"call x86_current_tls\n\t"\

CVS commit: src/share/man/man9

2019-04-09 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Apr  9 13:53:52 UTC 2019

Modified Files:
src/share/man/man9: sched_4bsd.9 sched_m2.9

Log Message:
Add instructions on how to determine the scheduler in use.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/sched_4bsd.9
cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/sched_m2.9

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

Modified files:

Index: src/share/man/man9/sched_4bsd.9
diff -u src/share/man/man9/sched_4bsd.9:1.8 src/share/man/man9/sched_4bsd.9:1.9
--- src/share/man/man9/sched_4bsd.9:1.8	Thu Dec  2 12:54:13 2010
+++ src/share/man/man9/sched_4bsd.9	Tue Apr  9 13:53:52 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: sched_4bsd.9,v 1.8 2010/12/02 12:54:13 wiz Exp $
+.\" $NetBSD: sched_4bsd.9,v 1.9 2019/04/09 13:53:52 sevan Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 14, 2007
+.Dd April 9, 2019
 .Dt SCHED_4BSD 9
 .Os
 .Sh NAME
@@ -78,6 +78,12 @@ every Hz ticks in order to recompute the
 checks if an LWP has slept for more than one second.
 If so, its priority is updated by
 .Fn updatepri .
+.Sh EXAMPLES
+To determine the scheduler currently in use
+.Bd -literal -offset indent
+$ sysctl kern.sched.name
+kern.sched.name = 4.4BSD
+.Ed
 .Sh CODE REFERENCES
 The
 .Bx 4.4

Index: src/share/man/man9/sched_m2.9
diff -u src/share/man/man9/sched_m2.9:1.3 src/share/man/man9/sched_m2.9:1.4
--- src/share/man/man9/sched_m2.9:1.3	Thu Dec  2 12:54:13 2010
+++ src/share/man/man9/sched_m2.9	Tue Apr  9 13:53:52 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: sched_m2.9,v 1.3 2010/12/02 12:54:13 wiz Exp $
+.\" $NetBSD: sched_m2.9,v 1.4 2019/04/09 13:53:52 sevan Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 5, 2010
+.Dd April 9, 2019
 .Dt SCHED_M2 9
 .Os
 .Sh NAME
@@ -38,6 +38,12 @@
 .Sh DESCRIPTION
 The M2 scheduler implements a scheduling algorithm similar to
 the scheduler implementations of UNIX System V Release 4 and Solaris.
+.Sh EXAMPLES
+To determine the scheduler currently in use
+.Bd -literal -offset indent
+$ sysctl kern.sched.name
+kern.sched.name = M2
+.Ed
 .Sh CODE REFERENCES
 The M2 scheduler is implemented within the file
 .Pa sys/kern/sched_m2.c .



CVS commit: src/sys/dev/ic

2019-04-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Apr  9 13:25:07 UTC 2019

Modified Files:
src/sys/dev/ic: i82596.c

Log Message:
 KNF. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/ic/i82596.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/i82596.c
diff -u src/sys/dev/ic/i82596.c:1.38 src/sys/dev/ic/i82596.c:1.39
--- src/sys/dev/ic/i82596.c:1.38	Tue Jun 26 06:48:00 2018
+++ src/sys/dev/ic/i82596.c	Tue Apr  9 13:25:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: i82596.c,v 1.38 2018/06/26 06:48:00 msaitoh Exp $ */
+/* $NetBSD: i82596.c,v 1.39 2019/04/09 13:25:07 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2003 Jochen Kunz.
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.38 2018/06/26 06:48:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.39 2019/04/09 13:25:07 msaitoh Exp $");
 
 /* autoconfig and device stuff */
 #include 
@@ -214,7 +214,7 @@ iee_intr(void *intarg)
 	for (;;) {
 		rfd = SC_RFD(sc, sc->sc_rx_done);
 		IEE_RFDSYNC(sc, sc->sc_rx_done,
-		BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
+		BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 		status = rfd->rfd_status;
 		if ((status & IEE_RFD_C) == 0) {
 			IEE_RFDSYNC(sc, sc->sc_rx_done, BUS_DMASYNC_PREREAD);
@@ -222,20 +222,20 @@ iee_intr(void *intarg)
 		}
 		rfd->rfd_status = 0;
 		IEE_RFDSYNC(sc, sc->sc_rx_done,
-		BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
+		BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 
 		/* At least one packet was received. */
 		rx_map = sc->sc_rx_map[sc->sc_rx_done];
 		rx_mbuf = sc->sc_rx_mbuf[sc->sc_rx_done];
 		IEE_RBDSYNC(sc, (sc->sc_rx_done + IEE_NRFD - 1) % IEE_NRFD,
-		BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
+		BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 		SC_RBD(sc, (sc->sc_rx_done + IEE_NRFD - 1) % IEE_NRFD)->rbd_size
 		&= ~IEE_RBD_EL;
 		IEE_RBDSYNC(sc, (sc->sc_rx_done + IEE_NRFD - 1) % IEE_NRFD,
-		BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
+		BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 		rbd = SC_RBD(sc, sc->sc_rx_done);
 		IEE_RBDSYNC(sc, sc->sc_rx_done,
-		BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
+		BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 		count = rbd->rbd_count;
 		if ((status & IEE_RFD_OK) == 0
 		|| (count & IEE_RBD_EOF) == 0
@@ -244,7 +244,7 @@ iee_intr(void *intarg)
 			rbd->rbd_count = 0;
 			rbd->rbd_size = IEE_RBD_EL | rx_map->dm_segs[0].ds_len;
 			IEE_RBDSYNC(sc, sc->sc_rx_done,
-			BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
+			BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 			printf("%s: iee_intr: receive error %d, rfd_status="
 			"0x%.4x, rfd_count=0x%.4x\n",
 			device_xname(sc->sc_dev),
@@ -286,7 +286,7 @@ iee_intr(void *intarg)
 		rbd->rbd_size = IEE_RBD_EL | rx_map->dm_segs[0].ds_len;
 		rbd->rbd_rb_addr = IEE_SWAPA32(rx_map->dm_segs[0].ds_addr);
 		IEE_RBDSYNC(sc, sc->sc_rx_done,
-		BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
+		BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 		sc->sc_rx_done = (sc->sc_rx_done + 1) % IEE_NRFD;
 	}
 	if ((scb_status & IEE_SCB_RUS) == IEE_SCB_RUS_NR1
@@ -313,7 +313,7 @@ iee_intr(void *intarg)
 		sc->sc_rx_done = 0;
 		bus_dmamap_sync(sc->sc_dmat, sc->sc_shmem_map, sc->sc_rfd_off,
 		sc->sc_rfd_sz * IEE_NRFD + sc->sc_rbd_sz * IEE_NRFD,
-		BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
+		BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 		(sc->sc_iee_cmd)(sc, IEE_SCB_RUC_ST);
 		printf("%s: iee_intr: receive ring buffer overrun\n",
 		device_xname(sc->sc_dev));
@@ -321,7 +321,7 @@ iee_intr(void *intarg)
 
 	if (sc->sc_next_cb != 0) {
 		IEE_CBSYNC(sc, sc->sc_next_cb - 1,
-		BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
+		BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 		status = SC_CB(sc, sc->sc_next_cb - 1)->cb_status;
 		IEE_CBSYNC(sc, sc->sc_next_cb - 1,
 		BUS_DMASYNC_PREREAD);
@@ -336,7 +336,7 @@ iee_intr(void *intarg)
 	bus_dmamap_unload(sc->sc_dmat,
 	sc->sc_tx_map[n]);
 	IEE_CBSYNC(sc, n,
-	BUS_DMASYNC_POSTREAD|
+	BUS_DMASYNC_POSTREAD |
 	BUS_DMASYNC_POSTWRITE);
 	status = SC_CB(sc, n)->cb_status;
 	IEE_CBSYNC(sc, n,
@@ -360,8 +360,8 @@ iee_intr(void *intarg)
 /*
  * Check if a CMD failed, but ignore TX errors.
  */
-IEE_CBSYNC(sc, n,
-BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
+IEE_CBSYNC(sc, n, BUS_DMASYNC_POSTREAD |
+BUS_DMASYNC_POSTWRITE);
 cmd = SC_CB(sc, n)->cb_cmd;
 status = SC_CB(sc, n)->cb_status;
 IEE_CBSYNC(sc, n, BUS_DMASYNC_PREREAD);
@@ -393,8 +393,8 @@ iee_intr(void *intarg)
 	}
 	if (IEE_SWAP32(SC_SCB(sc)->scb_align_err) != sc->sc_align_err) {
 		sc->sc_align_err = IEE_SWAP32(SC_SCB(sc)->scb_align_err);
-		printf("%s: iee_intr: align_err=%d\n", device_xname(sc->sc_dev),
-		sc->sc_align_err);
+		printf("%s: 

CVS commit: src/sys/dev/mii

2019-04-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Apr  9 11:28:45 UTC 2019

Modified Files:
src/sys/dev/mii: mii.c mii_physubr.c miivar.h

Log Message:
- Use uint16_t more for MII registers.
- Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/mii/mii.c
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/mii/miivar.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/mii.c
diff -u src/sys/dev/mii/mii.c:1.53 src/sys/dev/mii/mii.c:1.54
--- src/sys/dev/mii/mii.c:1.53	Mon Mar 25 09:20:46 2019
+++ src/sys/dev/mii/mii.c	Tue Apr  9 11:28:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii.c,v 1.53 2019/03/25 09:20:46 msaitoh Exp $	*/
+/*	$NetBSD: mii.c,v 1.54 2019/04/09 11:28:45 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.53 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.54 2019/04/09 11:28:45 msaitoh Exp $");
 
 #include 
 #include 
@@ -280,7 +280,7 @@ bitreverse(unsigned char x)
 }
 
 u_int
-mii_oui(u_int id1, u_int id2)
+mii_oui(uint16_t id1, uint16_t id2)
 {
 	u_int h;
 

Index: src/sys/dev/mii/mii_physubr.c
diff -u src/sys/dev/mii/mii_physubr.c:1.86 src/sys/dev/mii/mii_physubr.c:1.87
--- src/sys/dev/mii/mii_physubr.c:1.86	Mon Mar 25 09:20:46 2019
+++ src/sys/dev/mii/mii_physubr.c	Tue Apr  9 11:28:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii_physubr.c,v 1.86 2019/03/25 09:20:46 msaitoh Exp $	*/
+/*	$NetBSD: mii_physubr.c,v 1.87 2019/04/09 11:28:45 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.86 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.87 2019/04/09 11:28:45 msaitoh Exp $");
 
 #include 
 #include 
@@ -699,7 +699,7 @@ mii_phy_resume(device_t dv, const pmf_qu
 /*
  * Given an ifmedia word, return the corresponding ANAR value.
  */
-int
+uint16_t
 mii_anar(int media)
 {
 	int rv;

Index: src/sys/dev/mii/miivar.h
diff -u src/sys/dev/mii/miivar.h:1.66 src/sys/dev/mii/miivar.h:1.67
--- src/sys/dev/mii/miivar.h:1.66	Tue Feb 26 05:26:10 2019
+++ src/sys/dev/mii/miivar.h	Tue Apr  9 11:28:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: miivar.h,v 1.66 2019/02/26 05:26:10 msaitoh Exp $	*/
+/*	$NetBSD: miivar.h,v 1.67 2019/04/09 11:28:45 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -196,9 +196,9 @@ struct mii_phydesc {
  * An array of these structures map MII media types to BMCR/ANAR settings.
  */
 struct mii_media {
-	int	mm_bmcr;		/* BMCR settings for this media */
-	int	mm_anar;		/* ANAR settings for this media */
-	int	mm_gtcr;		/* 100base-T2 or 1000base-T CR */
+	uint16_t mm_bmcr;		/* BMCR settings for this media */
+	uint16_t mm_anar;		/* ANAR settings for this media */
+	uint16_t mm_gtcr;		/* 100base-T2 or 1000base-T CR */
 };
 
 #define	MII_MEDIA_NONE		0
@@ -291,9 +291,9 @@ int	mii_mediachg(struct mii_data *);
 void	mii_tick(struct mii_data *);
 void	mii_pollstat(struct mii_data *);
 void	mii_down(struct mii_data *);
-int	mii_anar(int);
+uint16_t mii_anar(int);
 
-int mii_ifmedia_change(struct mii_data *);
+int	mii_ifmedia_change(struct mii_data *);
 
 int	mii_phy_activate(device_t, enum devact);
 int	mii_phy_detach(device_t, int);
@@ -317,7 +317,7 @@ u_int	mii_phy_flowstatus(struct mii_soft
 
 void	ukphy_status(struct mii_softc *);
 
-u_int	mii_oui(u_int, u_int);
+u_int	mii_oui(uint16_t, uint16_t);
 #define	MII_OUI(id1, id2)	mii_oui(id1, id2)
 #define	MII_MODEL(id2)		(((id2) & IDR2_MODEL) >> 4)
 #define	MII_REV(id2)		((id2) & IDR2_REV)



CVS commit: src/sbin/fdisk

2019-04-09 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Tue Apr  9 09:03:41 UTC 2019

Modified Files:
src/sbin/fdisk: fdisk.8

Log Message:
mention that -B is used to set the timeout for mbr_bootsel


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sbin/fdisk/fdisk.8

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

Modified files:

Index: src/sbin/fdisk/fdisk.8
diff -u src/sbin/fdisk/fdisk.8:1.87 src/sbin/fdisk/fdisk.8:1.88
--- src/sbin/fdisk/fdisk.8:1.87	Fri Jan 27 10:12:05 2017
+++ src/sbin/fdisk/fdisk.8	Tue Apr  9 09:03:41 2019
@@ -1,6 +1,6 @@
-.\"	$NetBSD: fdisk.8,v 1.87 2017/01/27 10:12:05 abhinav Exp $
+.\"	$NetBSD: fdisk.8,v 1.88 2019/04/09 09:03:41 tnn Exp $
 .\"
-.Dd September 11, 2016
+.Dd April 9, 2019
 .Dt FDISK 8
 .Os
 .Sh NAME
@@ -172,6 +172,7 @@ In interactive mode this question will b
 have been processed.
 .It Fl B
 On an i386 or amd64 system, interactively update the boot selector settings.
+These include the default boot partition and the timeout value for the prompt.
 (The boot selector permits the user to interactively select the boot
 partition, and thus which operating system is run, at system boot time; see
 .Xr mbr 8



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

2019-04-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr  9 07:37:16 UTC 2019

Modified Files:
src/sys/arch/arm/samsung: exynos_platform.c

Log Message:
EXYNOS5422_DISABLE_CA7_CLUSTER isn't required anymore


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/samsung/exynos_platform.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/samsung/exynos_platform.c
diff -u src/sys/arch/arm/samsung/exynos_platform.c:1.25 src/sys/arch/arm/samsung/exynos_platform.c:1.26
--- src/sys/arch/arm/samsung/exynos_platform.c:1.25	Thu Jan 31 13:06:10 2019
+++ src/sys/arch/arm/samsung/exynos_platform.c	Tue Apr  9 07:37:16 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_platform.c,v 1.25 2019/01/31 13:06:10 skrll Exp $ */
+/* $NetBSD: exynos_platform.c,v 1.26 2019/04/09 07:37:16 skrll Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -35,12 +35,7 @@
 #include "ukbd.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.25 2019/01/31 13:06:10 skrll Exp $");
-
-/* XXXJDM
- * Booting a CA7 core on Exynos5422 is currently broken, disable starting CA7 secondaries.
- */
-#define	EXYNOS5422_DISABLE_CA7_CLUSTER
+__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.26 2019/04/09 07:37:16 skrll Exp $");
 
 #include 
 #include 
@@ -148,11 +143,6 @@ exynos5800_mpstart(void)
 		const u_int aff0 = __SHIFTOUT(mpidr, MPIDR_AFF0);
 		const u_int cpu = cluster * 4 + aff0;
 
-#if defined(EXYNOS5422_DISABLE_CA7_CLUSTER)
-		if (cluster == 1)
-			continue;
-#endif
-
 		val = bus_space_read_4(bst, pmu_bsh, EXYNOS5800_PMU_CORE_STATUS(cpu));
 		bus_space_write_4(bst, pmu_bsh, EXYNOS5800_PMU_CORE_CONFIG(cpu),
 		EXYNOS5800_PMU_CORE_POWER_EN);
@@ -337,27 +327,6 @@ exynos5_platform_bootstrap(void)
 
 	exynos_bootstrap(5);
 
-#if defined(MULTIPROCESSOR) && defined(EXYNOS5422_DISABLE_CA7_CLUSTER)
-	const struct of_compat_data *cd = of_search_compatible(OF_finddevice("/"), mp_compat_data);
-	if (cd && cd->data == (uintptr_t)exynos5800_mpstart) {
-		void *fdt_data = __UNCONST(fdtbus_get_data());
-		int cpu_off, cpus_off, len;
-
-		cpus_off = fdt_path_offset(fdt_data, "/cpus");
-		if (cpus_off < 0)
-			return;
-
-		fdt_for_each_subnode(cpu_off, fdt_data, cpus_off) {
-			const void *prop = fdt_getprop(fdt_data, cpu_off, "reg", );
-			if (len != 4)
-continue;
-			const uint32_t mpidr = be32dec(prop);
-			if (mpidr != cpu_mpidr_aff_read() && __SHIFTOUT(mpidr, MPIDR_AFF1) == 1)
-fdt_setprop_string(fdt_data, cpu_off, "status", "fail");
-		}
-	}
-#endif
-
 	arm_fdt_cpu_bootstrap();
 }
 



CVS commit: src/sys/dev/ic

2019-04-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Apr  9 07:23:41 UTC 2019

Modified Files:
src/sys/dev/ic: gem.c

Log Message:
 Fix a bug that media setting for fiber didn't work correctly. Not tested.
The BUGS section in gem(4) manpage says:

 > BUGS
(snip)
 >  On the SX fibre variants of the hardware, the link will stay down if
 >  there is a duplex mismatch.  Also, packet transmission may fail when in
 >  half-duplex mode.

Is the bug related to this fix?


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/dev/ic/gem.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/gem.c
diff -u src/sys/dev/ic/gem.c:1.114 src/sys/dev/ic/gem.c:1.115
--- src/sys/dev/ic/gem.c:1.114	Tue Feb  5 06:17:02 2019
+++ src/sys/dev/ic/gem.c	Tue Apr  9 07:23:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: gem.c,v 1.114 2019/02/05 06:17:02 msaitoh Exp $ */
+/*	$NetBSD: gem.c,v 1.115 2019/04/09 07:23:41 msaitoh Exp $ */
 
 /*
  *
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.114 2019/02/05 06:17:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.115 2019/04/09 07:23:41 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -1044,12 +1044,12 @@ gem_pcs_start(struct gem_softc *sc)
 	bus_space_write_4(t, h, GEM_MII_CONFIG, 0);
 	v = bus_space_read_4(t, h, GEM_MII_ANAR);
 	v |= (GEM_MII_ANEG_SYM_PAUSE | GEM_MII_ANEG_ASYM_PAUSE);
-	if (sc->sc_mii_media == IFM_AUTO)
+	if (IFM_SUBTYPE(sc->sc_mii_media) == IFM_AUTO)
 		v |= (GEM_MII_ANEG_FUL_DUPLX | GEM_MII_ANEG_HLF_DUPLX);
-	else if (sc->sc_mii_media == IFM_FDX) {
+	else if ((IFM_OPTIONS(sc->sc_mii_media) & IFM_FDX) != 0) {
 		v |= GEM_MII_ANEG_FUL_DUPLX;
 		v &= ~GEM_MII_ANEG_HLF_DUPLX;
-	} else if (sc->sc_mii_media == IFM_HDX) {
+	} else if ((IFM_OPTIONS(sc->sc_mii_media) & IFM_HDX) != 0) {
 		v &= ~GEM_MII_ANEG_FUL_DUPLX;
 		v |= GEM_MII_ANEG_HLF_DUPLX;
 	}



CVS commit: src/sys/dev/isa

2019-04-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Apr  9 06:19:34 UTC 2019

Modified Files:
src/sys/dev/isa: if_ix.c

Log Message:
 Make it compilable with IX_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/isa/if_ix.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/if_ix.c
diff -u src/sys/dev/isa/if_ix.c:1.36 src/sys/dev/isa/if_ix.c:1.37
--- src/sys/dev/isa/if_ix.c:1.36	Tue Apr  9 06:15:21 2019
+++ src/sys/dev/isa/if_ix.c	Tue Apr  9 06:19:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ix.c,v 1.36 2019/04/09 06:15:21 msaitoh Exp $	*/
+/*	$NetBSD: if_ix.c,v 1.37 2019/04/09 06:19:34 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ix.c,v 1.36 2019/04/09 06:15:21 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ix.c,v 1.37 2019/04/09 06:19:34 msaitoh Exp $");
 
 #include 
 #include 
@@ -497,8 +497,9 @@ ix_match(device_t parent, cfdata_t cf, v
 		return 0;
 
 	if (bus_space_map(iot, ia->ia_io[0].ir_addr,
-			  IX_IOSIZE, 0, ) != 0) {
-		DPRINTF(("Can't map io space at 0x%x\n", ia->ia_iobase));
+	IX_IOSIZE, 0, ) != 0) {
+		DPRINTF(("Can't map io space at 0x%x\n",
+			ia->ia_io[0].ir_addr));
 		return 0;
 	}
 
@@ -578,7 +579,7 @@ ix_match(device_t parent, cfdata_t cf, v
 	ia->ia_iomem[0].ir_addr != maddr) {
 		DPRINTF((
 		  "ix_match: memaddr of board @ 0x%x doesn't match config\n",
-		  ia->ia_iobase));
+		  ia->ia_iomem[0].ir_addr));
 		goto out;
 	}
 
@@ -586,7 +587,7 @@ ix_match(device_t parent, cfdata_t cf, v
 	ia->ia_iomem[0].ir_size != msiz) {
 		DPRINTF((
 		   "ix_match: memsize of board @ 0x%x doesn't match config\n",
-		   ia->ia_iobase));
+		   ia->ia_iomem[0].ir_addr));
 		goto out;
 	}
 
@@ -662,7 +663,7 @@ ix_match(device_t parent, cfdata_t cf, v
 	ia->ia_nirq = 1;
 	ia->ia_irq[0].ir_irq = irq;
 
-	DPRINTF(("ix_match: found board @ 0x%x\n", ia->ia_iobase));
+	DPRINTF(("ix_match: found board @ 0x%x\n", ia->ia_iomem[0].ir_addr));
 
 out:
 	bus_space_unmap(iot, ioh, IX_IOSIZE);
@@ -700,7 +701,7 @@ ix_attach(device_t parent, device_t self
 	ia->ia_io[0].ir_size, 0, ) != 0) {
 
 		DPRINTF(("\n%s: can't map i/o space 0x%x-0x%x\n",
-			  device_xname(self), ia->ia_[0].ir_addr,
+			  device_xname(self), ia->ia_io[0].ir_addr,
 			  ia->ia_io[0].ir_addr + ia->ia_io[0].ir_size - 1));
 		return;
 	}



CVS commit: src/sys/dev/isa

2019-04-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Apr  9 06:15:21 UTC 2019

Modified Files:
src/sys/dev/isa: if_ix.c

Log Message:
 KNF. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/isa/if_ix.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/if_ix.c
diff -u src/sys/dev/isa/if_ix.c:1.35 src/sys/dev/isa/if_ix.c:1.36
--- src/sys/dev/isa/if_ix.c:1.35	Thu Jul 14 04:19:27 2016
+++ src/sys/dev/isa/if_ix.c	Tue Apr  9 06:15:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ix.c,v 1.35 2016/07/14 04:19:27 msaitoh Exp $	*/
+/*	$NetBSD: if_ix.c,v 1.36 2019/04/09 06:15:21 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ix.c,v 1.35 2016/07/14 04:19:27 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ix.c,v 1.36 2019/04/09 06:15:21 msaitoh Exp $");
 
 #include 
 #include 
@@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ix.c,v 1.
 #define DPRINTF(x)
 #endif
 
-int ix_media[] = {
+static int ix_media[] = {
 	IFM_ETHER | IFM_10_5,
 	IFM_ETHER | IFM_10_2,
 	IFM_ETHER | IFM_10_T,
@@ -76,8 +76,8 @@ struct ix_softc {
 	bus_space_tag_t sc_regt;	/* space tag for registers */
 	bus_space_handle_t sc_regh;	/* space handle for registers */
 
-	u_int8_t	use_pio;	/* use PIO rather than shared mem */
-	u_int16_t	irq_encoded;	/* encoded IRQ */
+	uint8_t		use_pio;	/* use PIO rather than shared mem */
+	uint16_t	irq_encoded;	/* encoded IRQ */
 	void		*sc_ih;		/* interrupt handle */
 };
 
@@ -90,21 +90,21 @@ static void ix_copyout(struct ie_sof
 
 static void	ix_bus_barrier(struct ie_softc *, int, int, int);
 
-static u_int16_t ix_read_16(struct ie_softc *, int);
-static void	ix_write_16(struct ie_softc *, int, u_int16_t);
+static uint16_t ix_read_16(struct ie_softc *, int);
+static void	ix_write_16(struct ie_softc *, int, uint16_t);
 static void	ix_write_24(struct ie_softc *, int, int);
-static void	ix_zeromem (struct ie_softc *, int, int);
+static void	ix_zeromem(struct ie_softc *, int, int);
 
 static void	ix_mediastatus(struct ie_softc *, struct ifmediareq *);
 
-static u_int16_t ix_read_eeprom(bus_space_tag_t, bus_space_handle_t, int);
+static uint16_t ix_read_eeprom(bus_space_tag_t, bus_space_handle_t, int);
 static void	ix_eeprom_outbits(bus_space_tag_t, bus_space_handle_t, int,
 int);
-static int	ix_eeprom_inbits (bus_space_tag_t, bus_space_handle_t);
-static void	ix_eeprom_clock  (bus_space_tag_t, bus_space_handle_t, int);
+static int	ix_eeprom_inbits(bus_space_tag_t, bus_space_handle_t);
+static void	ix_eeprom_clock(bus_space_tag_t, bus_space_handle_t, int);
 
-int ix_match(device_t, cfdata_t, void *);
-void ix_attach(device_t, device_t, void *);
+static int	ix_match(device_t, cfdata_t, void *);
+static void	ix_attach(device_t, device_t, void *);
 
 /*
  * EtherExpress/16 support routines
@@ -112,12 +112,12 @@ void ix_attach(device_t, device_t, void 
 static void
 ix_reset(struct ie_softc *sc, int why)
 {
-	struct ix_softc* isc = (struct ix_softc *) sc;
+	struct ix_softc *isc = (struct ix_softc *)sc;
 
 	switch (why) {
 	case CHIP_PROBE:
 		bus_space_write_1(isc->sc_regt, isc->sc_regh, IX_ECTRL,
-  IX_RESET_586);
+		IX_RESET_586);
 		delay(100);
 		bus_space_write_1(isc->sc_regt, isc->sc_regh, IX_ECTRL, 0);
 		delay(100);
@@ -125,17 +125,18 @@ ix_reset(struct ie_softc *sc, int why)
 
 	case CARD_RESET:
 		break;
-}
+	}
 }
 
 static void
 ix_atten(struct ie_softc *sc, int why)
 {
-	struct ix_softc* isc = (struct ix_softc *) sc;
+	struct ix_softc *isc = (struct ix_softc *)sc;
+
 	bus_space_write_1(isc->sc_regt, isc->sc_regh, IX_ATTN, 0);
 }
 
-static u_int16_t
+static uint16_t
 ix_read_eeprom(bus_space_tag_t iot, bus_space_handle_t ioh, int location)
 {
 	int ectrl, edata;
@@ -153,7 +154,7 @@ ix_read_eeprom(bus_space_tag_t iot, bus_
 	bus_space_write_1(iot, ioh, IX_ECTRL, ectrl);
 	ix_eeprom_clock(iot, ioh, 1);
 	ix_eeprom_clock(iot, ioh, 0);
-	return (edata);
+	return edata;
 }
 
 static void
@@ -195,7 +196,7 @@ ix_eeprom_inbits(bus_space_tag_t iot, bu
 		}
 		ix_eeprom_clock(iot, ioh, 0);
 	}
-	return (edata);
+	return edata;
 }
 
 static void
@@ -215,7 +216,7 @@ ix_eeprom_clock(bus_space_tag_t iot, bus
 static int
 ix_intrhook(struct ie_softc *sc, int where)
 {
-	struct ix_softc* isc = (struct ix_softc *) sc;
+	struct ix_softc *isc = (struct ix_softc *)sc;
 
 	switch (where) {
 	case INTR_ENTER:
@@ -239,21 +240,20 @@ static void
 ix_copyin(struct ie_softc *sc, void *dst, int offset, size_t size)
 {
 	int i, dribble;
-	u_int8_t* bptr = dst;
-	u_int16_t* wptr = dst;
-	struct ix_softc* isc = (struct ix_softc *) sc;
+	uint8_t *bptr = dst;
+	uint16_t *wptr = dst;
+	struct ix_softc *isc = (struct ix_softc *)sc;
 
 	if (isc->use_pio) {
 		/* Reset read pointer to the specified offset */
 		bus_space_barrier(sc->bt, sc->bh, IX_DATAPORT, 2,
-		  

CVS commit: src/sys/dev/isa

2019-04-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Apr  9 06:00:08 UTC 2019

Modified Files:
src/sys/dev/isa: if_ef.c

Log Message:
 Make it compilable with EF_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/isa/if_ef.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/if_ef.c
diff -u src/sys/dev/isa/if_ef.c:1.32 src/sys/dev/isa/if_ef.c:1.33
--- src/sys/dev/isa/if_ef.c:1.32	Tue Apr  9 05:59:14 2019
+++ src/sys/dev/isa/if_ef.c	Tue Apr  9 06:00:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ef.c,v 1.32 2019/04/09 05:59:14 msaitoh Exp $	*/
+/*	$NetBSD: if_ef.c,v 1.33 2019/04/09 06:00:08 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ef.c,v 1.32 2019/04/09 05:59:14 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ef.c,v 1.33 2019/04/09 06:00:08 msaitoh Exp $");
 
 #include 
 #include 
@@ -143,7 +143,7 @@ ef_card_add(struct ef_isabus *bus, bus_a
 {
 	int idx;
 
-	DPRINTF(("Adding 3c507 at 0x%x, IRQ %d, Mem 0x%lx/%ld\n",
+	DPRINTF(("Adding 3c507 at 0x%x, IRQ %d, Mem 0x%lx/%zu\n",
 		 (u_int) iobase, irq, (u_long) maddr, msiz));
 
 	for (idx = 0; idx < MAXCARDS_PER_ISABUS; idx++) {
@@ -546,8 +546,9 @@ ef_attach(device_t parent, device_t self
 	ia->ia_iomem[0].ir_size, 0, ) != 0) {
 
 		DPRINTF(("\n%s: can't map iomem space 0x%x-0x%x\n",
-			device_xname(self), ia->ia_maddr,
-			ia->ia_maddr + ia->ia_msize - 1));
+			device_xname(self), ia->ia_iomem[0].ir_addr,
+			ia->ia_iomem[0].ir_addr + ia->ia_iomem[0].ir_size
+			- 1));
 		bus_space_unmap(ia->ia_iot, ioh, ia->ia_io[0].ir_size);
 		return;
 	}