CVS commit: src/external/gpl3/gcc/dist/gcc/config

2014-05-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu May 29 07:05:10 UTC 2014

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h

Log Message:
make LINK_EH_SPEC match other usage.  fixes powerpc build.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/dist/gcc/config/netbsd.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/gpl3/gcc/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.10 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.11
--- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.10	Thu Mar 20 01:46:19 2014
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h	Thu May 29 07:05:10 2014
@@ -188,7 +188,7 @@ along with GCC; see the file COPYING3.  
 #undef WINT_TYPE
 #define WINT_TYPE int
 
-#define LINK_EH_SPEC --eh-frame-hdr 
+#define LINK_EH_SPEC %{!static:--eh-frame-hdr} 
 
 /* Use --as-needed -lgcc_s for eh support.  */
 #ifdef HAVE_LD_AS_NEEDED



CVS commit: src/sys/dev/qbus

2014-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu May 29 07:08:10 UTC 2014

Modified Files:
src/sys/dev/qbus: if_il.c

Log Message:
Add missing braces. From Henning Petersen in PR 48846.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/qbus/if_il.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/qbus/if_il.c
diff -u src/sys/dev/qbus/if_il.c:1.26 src/sys/dev/qbus/if_il.c:1.27
--- src/sys/dev/qbus/if_il.c:1.26	Sat Oct 27 17:18:37 2012
+++ src/sys/dev/qbus/if_il.c	Thu May 29 07:08:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_il.c,v 1.26 2012/10/27 17:18:37 chs Exp $	*/
+/*	$NetBSD: if_il.c,v 1.27 2014/05/29 07:08:10 wiz Exp $	*/
 /*
  * Copyright (c) 1982, 1986 Regents of the University of California.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_il.c,v 1.26 2012/10/27 17:18:37 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_il.c,v 1.27 2014/05/29 07:08:10 wiz Exp $);
 
 #include opt_inet.h
 
@@ -332,7 +332,7 @@ ilinit(struct ifnet *ifp)
 		addr-il_csr = ILC_ALLMC;
 		if (ilwait(ui, all multi))
 			return 0;
-	else {
+	} else {
 		int i;
 		register struct ether_addr *ep = is-is_maddrs;
 		struct ether_multi *enm;



CVS commit: src

2014-05-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu May 29 07:40:37 UTC 2014

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.inc
src/tools/gcc: Makefile
Added Files:
src/tools/gcc: gcc-version.mk

Log Message:
commonize the netbsd local version string.  (the native one wasn't
updated, and now that won't be a problem again.)


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gcc/usr.bin/Makefile.inc
cvs rdiff -u -r1.68 -r1.69 src/tools/gcc/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/gcc/gcc-version.mk

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

Modified files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.inc
diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.21 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.22
--- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.21	Sun Mar  9 17:06:30 2014
+++ src/external/gpl3/gcc/usr.bin/Makefile.inc	Thu May 29 07:40:37 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.21 2014/03/09 17:06:30 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.22 2014/05/29 07:40:37 mrg Exp $
 
 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_
 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_=1
@@ -63,10 +63,12 @@ DATESTAMPSTR=		\ $(DATESTAMP)\
 DATESTAMPSTR=		\\
 .endif
 
+.include ${TOP}/tools/gcc/gcc-version.mk
+
 # XXX pull this out of our configs
 G_BUGURL=http://www.NetBSD.org/Misc/send-pr.html
 G_BUGURL_s=\${G_BUGURL}\
-G_PKGVERSION=(NetBSD nb2 20140304) 
+G_PKGVERSION=(${NETBSD_GCC_VERSION}) 
 G_PKGVERSION_s=\${G_PKGVERSION} \
 
 VER_CPPFLAGS=	-DBASEVER=\${BASEVER}\ \

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.68 src/tools/gcc/Makefile:1.69
--- src/tools/gcc/Makefile:1.68	Wed May 28 07:32:22 2014
+++ src/tools/gcc/Makefile	Thu May 29 07:40:37 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.68 2014/05/28 07:32:22 mrg Exp $
+#	$NetBSD: Makefile,v 1.69 2014/05/29 07:40:37 mrg Exp $
 
 .include bsd.own.mk
 
@@ -35,11 +35,13 @@ MULTILIB_ARGS= --disable-multilib
 SOFTFLOAT_ARGS=	-with-float=soft
 .endif
 
+.include gcc-version.mk
+
 COMMON_CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} \
 			--enable-long-long \
 			--enable-threads \
 			--with-bugurl=http://www.NetBSD.org/Misc/send-pr.html \
-			--with-pkgversion=NetBSD nb1 20140527 \
+			--with-pkgversion=NetBSD ${NETBSD_GCC_VERSION} \
 			--with-system-zlib \
 			--enable-__cxa_atexit \
 			--enable-libstdcxx-threads

Added files:

Index: src/tools/gcc/gcc-version.mk
diff -u /dev/null src/tools/gcc/gcc-version.mk:1.1
--- /dev/null	Thu May 29 07:40:37 2014
+++ src/tools/gcc/gcc-version.mk	Thu May 29 07:40:37 2014
@@ -0,0 +1,5 @@
+#	$NetBSD: gcc-version.mk,v 1.1 2014/05/29 07:40:37 mrg Exp $
+
+# common location for tools and native build
+
+NETBSD_GCC_VERSION=nb1 20140527



CVS commit: src/usr.bin/config

2014-05-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu May 29 07:47:45 UTC 2014

Modified Files:
src/usr.bin/config: config.5 gram.y sem.c

Log Message:
implement no ident.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/config/config.5
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/config/gram.y
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/config/sem.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/config/config.5
diff -u src/usr.bin/config/config.5:1.22 src/usr.bin/config/config.5:1.23
--- src/usr.bin/config/config.5:1.22	Thu Feb 13 22:36:28 2014
+++ src/usr.bin/config/config.5	Thu May 29 07:47:45 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: config.5,v 1.22 2014/02/13 22:36:28 wiz Exp $
+.\ $NetBSD: config.5,v 1.23 2014/05/29 07:47:45 mrg Exp $
 .\
 .\  Copyright (c) 2006, 2007 The NetBSD Foundation.
 .\  All rights reserved.
@@ -587,6 +587,8 @@ prefix
 Defines the indentification string of the kernel.
 This statement is optional, and the name of the main configuration file will be
 used as a default value.
+.It Ic no ident
+Deletes any pre-existing indentification string of the kernel.
 .It Ic maxusers Ar number
 Despite its name, this statement does not limit the maximum number of users on
 the system.

Index: src/usr.bin/config/gram.y
diff -u src/usr.bin/config/gram.y:1.38 src/usr.bin/config/gram.y:1.39
--- src/usr.bin/config/gram.y:1.38	Sun Aug 11 10:37:08 2013
+++ src/usr.bin/config/gram.y	Thu May 29 07:47:45 2014
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: gram.y,v 1.38 2013/08/11 10:37:08 pooka Exp $	*/
+/*	$NetBSD: gram.y,v 1.39 2014/05/29 07:47:45 mrg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -627,6 +627,7 @@ config_item:
 	| OPTIONS opt_list
 	| MAXUSERS NUMBER		{ setmaxusers($2.val); }
 	| IDENT stringvalue		{ setident($2); }
+	| NO IDENT			{ setident(NULL); }
 	| CONFIG conf root_spec sysparam_list
 	{ addconf(conf); }
 	| NO CONFIG WORD		{ delconf($3); }

Index: src/usr.bin/config/sem.c
diff -u src/usr.bin/config/sem.c:1.42 src/usr.bin/config/sem.c:1.43
--- src/usr.bin/config/sem.c:1.42	Sun Aug 11 10:37:08 2013
+++ src/usr.bin/config/sem.c	Thu May 29 07:47:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sem.c,v 1.42 2013/08/11 10:37:08 pooka Exp $	*/
+/*	$NetBSD: sem.c,v 1.43 2014/05/29 07:47:45 mrg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -181,7 +181,10 @@ void
 setident(const char *i)
 {
 
-	ident = intern(i);
+	if (i)
+		ident = intern(i);
+	else
+		ident = NULL;
 }
 
 /*



CVS commit: src/usr.bin/config

2014-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu May 29 08:13:17 UTC 2014

Modified Files:
src/usr.bin/config: config.5

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/config/config.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.bin/config/config.5
diff -u src/usr.bin/config/config.5:1.23 src/usr.bin/config/config.5:1.24
--- src/usr.bin/config/config.5:1.23	Thu May 29 07:47:45 2014
+++ src/usr.bin/config/config.5	Thu May 29 08:13:17 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: config.5,v 1.23 2014/05/29 07:47:45 mrg Exp $
+.\ $NetBSD: config.5,v 1.24 2014/05/29 08:13:17 wiz Exp $
 .\
 .\  Copyright (c) 2006, 2007 The NetBSD Foundation.
 .\  All rights reserved.
@@ -24,7 +24,7 @@
 .\  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\  POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd March 3, 2010
+.Dd May 29, 2014
 .Dt CONFIG 5
 .Os
 .Sh NAME



CVS commit: src/sys/compat/linux

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:35:27 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_misc.c

Log Message:
For utimes(2), use compat_50_sys_utimes() instead of local version.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.50 -r1.51 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.116 -r1.117 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.86 -r1.87 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.54 -r1.55 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.63 -r1.64 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.228 -r1.229 src/sys/compat/linux/common/linux_misc.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/compat/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.87 src/sys/compat/linux/arch/alpha/syscalls.master:1.88
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.87	Sat May 17 09:23:51 2014
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Thu May 29 10:35:26 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp $
+	$NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -590,8 +590,8 @@
 362	NOARGS		{ int|compat_50_sys||setitimer(int which, \
 			const struct itimerval50 *itv, \
 			struct itimerval50 *oitv); }
-363	STD		{ int|linux_sys||utimes(char *path, \
-			struct linux_timeval *times); }
+363	NOARGS		{ int|compat_50_sys||utimes(const char *path, \
+			const struct timeval50 *tptr); }
 364	NOARGS		{ int|compat_50_sys||getrusage(int who, \
 			struct rusage50 *rusage); }
 365	STD		{ int|linux_sys||wait4(int pid, int *status, \

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.50 src/sys/compat/linux/arch/amd64/syscalls.master:1.51
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.50	Tue May 20 17:24:49 2014
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Thu May 29 10:35:26 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.50 2014/05/20 17:24:49 njoly Exp $
+	$NetBSD: syscalls.master,v 1.51 2014/05/29 10:35:26 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -441,7 +441,8 @@
 232	UNIMPL		epoll_wait
 233	UNIMPL		epoll_ctl
 234	STD		{ int|linux_sys||tgkill(int tgid, int tid, int sig); }
-235	STD		{ int|linux_sys||utimes(const char *path, struct linux_timeval *times); }
+235	NOARGS		{ int|compat_50_sys||utimes(const char *path, \
+			const struct timeval50 *tptr); }
 236	UNIMPL		vserver
 237	UNIMPL		mbind
 238	UNIMPL		set_mempolicy

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.59 src/sys/compat/linux/arch/arm/syscalls.master:1.60
--- src/sys/compat/linux/arch/arm/syscalls.master:1.59	Tue May 20 17:24:49 2014
+++ src/sys/compat/linux/arch/arm/syscalls.master	Thu May 29 10:35:27 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.59 2014/05/20 17:24:49 njoly Exp $
+	$NetBSD: syscalls.master,v 1.60 2014/05/29 10:35:27 njoly Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -450,7 +450,8 @@
 267	STD		{ int|linux_sys||fstatfs64(int fd, \
 			size_t sz, struct linux_statfs64 *sp); }
 268	STD		{ int|linux_sys||tgkill(int tgid, int tid, int sig); }
-269	STD		{ int|linux_sys||utimes(const char *path, struct linux_timeval *times); }
+269	NOARGS		{ int|compat_50_sys||utimes(const char *path, \
+			const struct timeval50 *tptr); }
 270	STD		{ int|linux_sys||fadvise64_64(int fd, off_t offset, \
 			off_t len, int advice); }
 271	UNIMPL		pciconfig_iobase

Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.116 src/sys/compat/linux/arch/i386/syscalls.master:1.117
--- src/sys/compat/linux/arch/i386/syscalls.master:1.116	Tue May 20 17:24:49 2014
+++ src/sys/compat/linux/arch/i386/syscalls.master	Thu May 29 10:35:27 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.116 2014/05/20 17:24:49 njoly Exp $
+	$NetBSD: syscalls.master,v 1.117 2014/05/29 10:35:27 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -452,7 +452,8 @@
 269	STD		{ int|linux_sys||fstatfs64(int fd, \
 			

CVS commit: src/sys/compat/linux/arch

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:36:31 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen for utimes(2) change.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.92 -r1.93 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.94 -r1.95 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.52 -r1.53 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.62 -r1.63 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.101 -r1.102 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.102 -r1.103 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.92 -r1.93 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.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/compat/linux/arch/alpha/linux_syscall.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.93 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.94
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.93	Sat May 17 09:25:06 2014
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Thu May 29 10:36:31 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.93 2014/05/17 09:25:06 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.94 2014/05/29 10:36:31 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -501,7 +501,7 @@
 /* syscall: setitimer ret: int args: int const struct itimerval50 * struct itimerval50 * */
 #define	LINUX_SYS_setitimer	362
 
-/* syscall: utimes ret: int args: char * struct linux_timeval * */
+/* syscall: utimes ret: int args: const char * const struct timeval50 * */
 #define	LINUX_SYS_utimes	363
 
 /* syscall: getrusage ret: int args: int struct rusage50 * */
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.93 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.94
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.93	Sat May 17 09:25:06 2014
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Thu May 29 10:36:31 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.93 2014/05/17 09:25:06 njoly Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.94 2014/05/29 10:36:31 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.87 2014/05/17 09:23:51 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.88 2014/05/29 10:35:26 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.93 2014/05/17 09:25:06 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.94 2014/05/29 10:36:31 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -796,8 +796,8 @@ struct sysent linux_sysent[] = {
 	(sy_call_t *)compat_50_sys_getitimer },/* 361 = getitimer */
 	{ ns(struct compat_50_sys_setitimer_args), SYCALL_ARG_PTR,
 	(sy_call_t *)compat_50_sys_setitimer },/* 362 = setitimer */
-	{ ns(struct 

CVS commit: src/sys/rump/kern/lib/libsys_linux

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:41:48 UTC 2014

Modified Files:
src/sys/rump/kern/lib/libsys_linux: syscalls.master

Log Message:
Ajust for compat linux utimes(2) change.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/rump/kern/lib/libsys_linux/syscalls.master

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

Modified files:

Index: src/sys/rump/kern/lib/libsys_linux/syscalls.master
diff -u src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.15 src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.16
--- src/sys/rump/kern/lib/libsys_linux/syscalls.master:1.15	Sun May  4 10:30:39 2014
+++ src/sys/rump/kern/lib/libsys_linux/syscalls.master	Thu May 29 10:41:48 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.15 2014/05/04 10:30:39 njoly Exp $
+	$NetBSD: syscalls.master,v 1.16 2014/05/29 10:41:48 njoly Exp $
 
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -547,8 +547,8 @@
 			struct timezone *tzp); }
 419	NOARGS		{ int|linux_sys||settimeofday(struct timeval50 *tp, \
 			struct timezone *tzp); }
-420	NOARGS		{ int|linux_sys||utimes(const char *path, \
-			struct linux_timeval *tv); }
+420	NOARGS		{ int|compat_50_sys||utimes(const char *path, \
+			const struct timveval50 *tptr); }
 421	UNIMPL		adjtime
 422	UNIMPL		lfs_segwait
 423	NOARGS		{ int|sys|50|futimes(int fd, \



CVS commit: src/sys/rump/kern/lib/libsys_linux

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:42:23 UTC 2014

Modified Files:
src/sys/rump/kern/lib/libsys_linux: rump_linux_syscall.h
rump_linux_syscallargs.h rump_linux_syscalls.c rump_linux_sysent.c

Log Message:
Regen for utimes(2).


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h
cvs rdiff -u -r1.16 -r1.17 \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h \
src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c \
src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.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/rump/kern/lib/libsys_linux/rump_linux_syscall.h
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h:1.13 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h:1.14
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h:1.13	Sun May  4 10:31:10 2014
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscall.h	Thu May 29 10:42:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_linux_syscall.h,v 1.13 2014/05/04 10:31:10 njoly Exp $ */
+/* $NetBSD: rump_linux_syscall.h,v 1.14 2014/05/29 10:42:23 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.15 2014/05/04 10:30:39 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.16 2014/05/29 10:41:48 njoly Exp
  */
 
 #ifndef _RUMP_LINUX_SYS_SYSCALL_H_
@@ -249,7 +249,7 @@
 /* syscall: settimeofday ret: int args: struct timeval50 * struct timezone * */
 #define	RUMP_LINUX_SYS_settimeofday	419
 
-/* syscall: utimes ret: int args: const char * struct linux_timeval * */
+/* syscall: utimes ret: int args: const char * const struct timveval50 * */
 #define	RUMP_LINUX_SYS_utimes	420
 
 /* syscall: __futimes50 ret: int args: int const struct timeval * */

Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.16 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.17
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h:1.16	Sun May  4 10:31:10 2014
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscallargs.h	Thu May 29 10:42:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_linux_syscallargs.h,v 1.16 2014/05/04 10:31:10 njoly Exp $ */
+/* $NetBSD: rump_linux_syscallargs.h,v 1.17 2014/05/29 10:42:23 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.15 2014/05/04 10:30:39 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.16 2014/05/29 10:41:48 njoly Exp
  */
 
 #ifndef _RUMP_LINUX_SYS_SYSCALLARGS_H_
@@ -171,7 +171,7 @@ struct linux_sys_gettimeofday_args;
 
 struct linux_sys_settimeofday_args;
 
-struct linux_sys_utimes_args;
+struct compat_50_sys_utimes_args;
 
 struct sys___futimes50_args;
 
@@ -396,7 +396,7 @@ int	linux_sys_gettimeofday(struct lwp *,
 
 int	linux_sys_settimeofday(struct lwp *, const struct linux_sys_settimeofday_args *, register_t *);
 
-int	linux_sys_utimes(struct lwp *, const struct linux_sys_utimes_args *, register_t *);
+int	compat_50_sys_utimes(struct lwp *, const struct compat_50_sys_utimes_args *, register_t *);
 
 int	sys___futimes50(struct lwp *, const struct sys___futimes50_args *, register_t *);
 
Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.16 src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.17
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c:1.16	Sun May  4 10:31:10 2014
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_syscalls.c	Thu May 29 10:42:23 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: rump_linux_syscalls.c,v 1.16 2014/05/04 10:31:10 njoly Exp $ */
+/* $NetBSD: rump_linux_syscalls.c,v 1.17 2014/05/29 10:42:23 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.15 2014/05/04 10:30:39 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.16 2014/05/29 10:41:48 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump_linux_syscalls.c,v 1.16 2014/05/04 10:31:10 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_linux_syscalls.c,v 1.17 2014/05/29 10:42:23 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include sys/param.h
Index: src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c
diff -u src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.16 src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.17
--- src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c:1.16	Sun May  4 10:31:10 2014
+++ src/sys/rump/kern/lib/libsys_linux/rump_linux_sysent.c	Thu May 29 10:42:23 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: rump_linux_sysent.c,v 1.16 2014/05/04 10:31:10 njoly Exp $ 

CVS commit: src/sys/compat/linux32/arch/amd64

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:47:00 UTC 2014

Modified Files:
src/sys/compat/linux32/arch/amd64: syscalls.master

Log Message:
Add utimes(2) support.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux32/arch/amd64/syscalls.master

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/linux32/arch/amd64/syscalls.master
diff -u src/sys/compat/linux32/arch/amd64/syscalls.master:1.66 src/sys/compat/linux32/arch/amd64/syscalls.master:1.67
--- src/sys/compat/linux32/arch/amd64/syscalls.master:1.66	Sun May  4 10:08:53 2014
+++ src/sys/compat/linux32/arch/amd64/syscalls.master	Thu May 29 10:47:00 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.66 2014/05/04 10:08:53 njoly Exp $
+	$NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp $
 
 ; NetBSD i386 COMPAT_LINUX32 system call name/number master file.
 ; (See syscalls.conf to see what it is processed into.)
@@ -472,7 +472,8 @@
 269	STD	{ int|linux32_sys||fstatfs64(int fd, \
 		netbsd32_size_t sz, linux32_statfs64p sp); }
 270	STD	{ int|linux32_sys||tgkill(int tgid, int tid, int sig); }
-271	UNIMPL	utimes
+271	NOARGS	{ int|compat_50_netbsd32||utimes(netbsd32_charp path, \
+		netbsd32_timeval50p_t tptr); }
 272	STD	{ int|linux32_sys||fadvise64_64(int fd, uint32_t offlo, \
 		uint32_t offhi, uint32_t lenlo, uint32_t lenhi, int advice); }
 273	UNIMPL	vserver



CVS commit: src/sys/compat/linux32/arch/amd64

2014-05-29 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu May 29 10:47:23 UTC 2014

Modified Files:
src/sys/compat/linux32/arch/amd64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c

Log Message:
Regen for utimes(2).


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 \
src/sys/compat/linux32/arch/amd64/linux32_syscall.h \
src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \
src/sys/compat/linux32/arch/amd64/linux32_sysent.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/compat/linux32/arch/amd64/linux32_syscall.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.71 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.72
--- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.71	Sun May  4 10:10:39 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h	Thu May 29 10:47:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscall.h,v 1.71 2014/05/04 10:10:39 njoly Exp $ */
+/* $NetBSD: linux32_syscall.h,v 1.72 2014/05/29 10:47:23 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2014/05/04 10:08:53 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALL_H_
@@ -648,6 +648,9 @@
 /* syscall: tgkill ret: int args: int int int */
 #define	LINUX32_SYS_tgkill	270
 
+/* syscall: compat_50_netbsd32_utimes ret: int args: netbsd32_charp netbsd32_timeval50p_t */
+#define	LINUX32_SYS_compat_50_netbsd32_utimes	271
+
 /* syscall: fadvise64_64 ret: int args: int uint32_t uint32_t uint32_t uint32_t int */
 #define	LINUX32_SYS_fadvise64_64	272
 
Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.71 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.72
--- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.71	Sun May  4 10:10:39 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h	Thu May 29 10:47:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscallargs.h,v 1.71 2014/05/04 10:10:39 njoly Exp $ */
+/* $NetBSD: linux32_syscallargs.h,v 1.72 2014/05/29 10:47:23 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2014/05/04 10:08:53 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALLARGS_H_
@@ -898,6 +898,8 @@ struct linux32_sys_tgkill_args {
 };
 check_syscall_args(linux32_sys_tgkill)
 
+struct compat_50_netbsd32_utimes_args;
+
 struct linux32_sys_fadvise64_64_args {
 	syscallarg(int) fd;
 	syscallarg(uint32_t) offlo;
@@ -1419,6 +1421,8 @@ int	linux32_sys_fstatfs64(struct lwp *, 
 
 int	linux32_sys_tgkill(struct lwp *, const struct linux32_sys_tgkill_args *, register_t *);
 
+int	compat_50_netbsd32_utimes(struct lwp *, const struct compat_50_netbsd32_utimes_args *, register_t *);
+
 int	linux32_sys_fadvise64_64(struct lwp *, const struct linux32_sys_fadvise64_64_args *, register_t *);
 
 int	linux32_sys_openat(struct lwp *, const struct linux32_sys_openat_args *, register_t *);
Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.71 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.72
--- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.71	Sun May  4 10:10:39 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c	Thu May 29 10:47:23 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux32_syscalls.c,v 1.71 2014/05/04 10:10:39 njoly Exp $ */
+/* $NetBSD: linux32_syscalls.c,v 1.72 2014/05/29 10:47:23 njoly Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.66 2014/05/04 10:08:53 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.67 2014/05/29 10:47:00 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux32_syscalls.c,v 1.71 2014/05/04 10:10:39 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_syscalls.c,v 1.72 2014/05/29 10:47:23 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include sys/param.h
@@ -308,7 +308,7 @@ const char *const linux32_syscallnames[]
 	/* 268 */	statfs64,
 	/* 269 */	fstatfs64,
 	/* 270 */	tgkill,
-	/* 271 */	#271 (unimplemented utimes),
+	/* 271 */	compat_50_netbsd32_utimes,
 	/* 272 */	fadvise64_64,
 	/* 273 */	#273 (unimplemented vserver),
 	/* 274 */	#274 (unimplemented mbind),
Index: src/sys/compat/linux32/arch/amd64/linux32_sysent.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.71 src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.72
--- src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.71	Sun May  

CVS commit: src/lib/libc/rpc

2014-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 29 12:35:45 UTC 2014

Modified Files:
src/lib/libc/rpc: svc_generic.c

Log Message:
Don't try to listen on UDP sockets.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/rpc/svc_generic.c

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

Modified files:

Index: src/lib/libc/rpc/svc_generic.c
diff -u src/lib/libc/rpc/svc_generic.c:1.16 src/lib/libc/rpc/svc_generic.c:1.17
--- src/lib/libc/rpc/svc_generic.c:1.16	Wed May 28 10:49:28 2014
+++ src/lib/libc/rpc/svc_generic.c	Thu May 29 08:35:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: svc_generic.c,v 1.16 2014/05/28 14:49:28 christos Exp $	*/
+/*	$NetBSD: svc_generic.c,v 1.17 2014/05/29 12:35:45 christos Exp $	*/
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)svc_generic.c 1.21 89/02/28 Copyr 1988 Sun Micro;
 #else
-__RCSID($NetBSD: svc_generic.c,v 1.16 2014/05/28 14:49:28 christos Exp $);
+__RCSID($NetBSD: svc_generic.c,v 1.17 2014/05/29 12:35:45 christos Exp $);
 #endif
 #endif
 
@@ -251,7 +251,8 @@ svc_tli_create(
 	goto freedata;
 }
 			}
-			if (listen(fd, SOMAXCONN) == -1) {
+			if (si.si_socktype != SOCK_DGRAM 
+			listen(fd, SOMAXCONN) == -1) {
 warnx(%s: could not listen at anonymous port,
 __func__);
 goto freedata;
@@ -264,7 +265,8 @@ svc_tli_create(
 __func__);
 goto freedata;
 			}
-			if (listen(fd, (int)bindaddr-qlen) == -1) {
+			if (si.si_socktype != SOCK_DGRAM 
+			listen(fd, (int)bindaddr-qlen) == -1) {
 warnx(%s: could not listen at requested 
 address, __func__);
 goto freedata;



CVS commit: src/sys/arch/mips/atheros

2014-05-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 29 14:41:26 UTC 2014

Modified Files:
src/sys/arch/mips/atheros: ar9344.c

Log Message:
Comment out nfrac as it's unused.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/atheros/ar9344.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/mips/atheros/ar9344.c
diff -u src/sys/arch/mips/atheros/ar9344.c:1.4 src/sys/arch/mips/atheros/ar9344.c:1.5
--- src/sys/arch/mips/atheros/ar9344.c:1.4	Sat Oct 27 17:18:02 2012
+++ src/sys/arch/mips/atheros/ar9344.c	Thu May 29 14:41:26 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ar9344.c,v 1.4 2012/10/27 17:18:02 chs Exp $ */
+/* $NetBSD: ar9344.c,v 1.5 2014/05/29 14:41:26 skrll Exp $ */
 
 /*
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -48,7 +48,7 @@
  * family.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ar9344.c,v 1.4 2012/10/27 17:18:02 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: ar9344.c,v 1.5 2014/05/29 14:41:26 skrll Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -120,9 +120,10 @@ ar9344_reset(void)
 static void
 ar9344_get_freqs(struct arfreqs *freqs)
 {
-	uint32_t out_div, ref_div, nint, nfrac, post_div;
+	uint32_t out_div, ref_div, nint, post_div;
 	uint32_t pll;
 	uint32_t ref_clk;
+	//uint32_t nfrac;
 
 	if (GETRESETREG(AR9344_RESET_BOOTSTRAP)  AR9344_BOOTSTRAP_REF_CLK_40) {
 		ref_clk = 40 * 100;
@@ -139,7 +140,7 @@ ar9344_get_freqs(struct arfreqs *freqs)
 	out_div = __SHIFTOUT(pll, AR9344_CPU_PLL_CONFIG_OUTDIV);
 	ref_div = __SHIFTOUT(pll, AR9344_CPU_PLL_CONFIG_REFDIV);
 	nint = __SHIFTOUT(pll, AR9344_CPU_PLL_CONFIG_NINT);
-	nfrac = __SHIFTOUT(pll, AR9344_CPU_PLL_CONFIG_NFRAC);
+	//nfrac = __SHIFTOUT(pll, AR9344_CPU_PLL_CONFIG_NFRAC);
 
 	const uint32_t cpu_pll_freq = (nint * ref_clk / ref_div)  out_div;
 
@@ -150,7 +151,7 @@ ar9344_get_freqs(struct arfreqs *freqs)
 	out_div = __SHIFTOUT(pll, AR9344_DDR_PLL_CONFIG_OUTDIV);
 	ref_div = __SHIFTOUT(pll, AR9344_DDR_PLL_CONFIG_REFDIV);
 	nint = __SHIFTOUT(pll, AR9344_DDR_PLL_CONFIG_NINT);
-	nfrac = __SHIFTOUT(pll, AR9344_DDR_PLL_CONFIG_NFRAC);
+	//nfrac = __SHIFTOUT(pll, AR9344_DDR_PLL_CONFIG_NFRAC);
 
 	const uint32_t ddr_pll_freq = (nint * ref_clk / ref_div)  out_div;
 



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

2014-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 29 14:48:40 UTC 2014

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

Log Message:
enable IPSEC


To generate a diff of this commit:
cvs rdiff -u -r1.1103 -r1.1104 src/sys/arch/i386/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/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1103 src/sys/arch/i386/conf/GENERIC:1.1104
--- src/sys/arch/i386/conf/GENERIC:1.1103	Mon Apr 21 12:35:38 2014
+++ src/sys/arch/i386/conf/GENERIC	Thu May 29 10:48:40 2014
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1103 2014/04/21 16:35:38 chs Exp $
+# $NetBSD: GENERIC,v 1.1104 2014/05/29 14:48:40 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	arch/i386/conf/std.i386
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1103 $
+#ident 		GENERIC-$Revision: 1.1104 $
 
 maxusers	64		# estimated number of users
 
@@ -199,7 +199,7 @@ options 	NFSSERVER	# Network File System
 #options 	GATEWAY		# packet forwarding
 options 	INET		# IP + ICMP + TCP + UDP
 options 	INET6		# IPv6
-#options 	IPSEC		# IP security
+options 	IPSEC		# IP security
 #options 	IPSEC_DEBUG	# debug for IP security
 #options 	MPLS		# MultiProtocol Label Switching (needs ifmpls)
 #options 	MROUTING	# IP multicast routing



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

2014-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 29 14:49:36 UTC 2014

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

Log Message:
enable IPSEC


To generate a diff of this commit:
cvs rdiff -u -r1.386 -r1.387 src/sys/arch/amd64/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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.386 src/sys/arch/amd64/conf/GENERIC:1.387
--- src/sys/arch/amd64/conf/GENERIC:1.386	Mon Apr 21 12:35:38 2014
+++ src/sys/arch/amd64/conf/GENERIC	Thu May 29 10:49:35 2014
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.386 2014/04/21 16:35:38 chs Exp $
+# $NetBSD: GENERIC,v 1.387 2014/05/29 14:49:35 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include	arch/amd64/conf/std.amd64
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.386 $
+#ident 		GENERIC-$Revision: 1.387 $
 
 maxusers	64		# estimated number of users
 
@@ -176,7 +176,7 @@ options 	NFSSERVER	# Network File System
 #options 	GATEWAY		# packet forwarding
 options 	INET		# IP + ICMP + TCP + UDP
 options 	INET6		# IPV6
-#options 	IPSEC		# IP security
+options 	IPSEC		# IP security
 #options 	IPSEC_DEBUG	# debug for IP security
 #options 	MPLS		# MultiProtocol Label Switching (needs ifmpls)
 #options 	MROUTING	# IP multicast routing



CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3/arch

2014-05-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 29 16:28:29 UTC 2014

Removed Files:
src/external/gpl3/gcc/lib/libstdc++-v3/arch/alpha: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/arm: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/armeb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earm: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/hppa: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/i386: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/ia64: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/m68000: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/m68k: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sparc: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/vax: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64: config.h

Log Message:
Remove unused files.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/config.h
cvs rdiff -u -r1.11 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/arm/config.h
cvs rdiff -u -r1.10 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/config.h
cvs rdiff -u -r1.5 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/config.h
cvs rdiff -u -r1.9 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earm/config.h
cvs rdiff -u -r1.7 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/config.h
cvs rdiff -u -r1.7 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/config.h
cvs rdiff -u -r1.5 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/config.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/config.h
cvs rdiff -u -r1.8 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/config.h
cvs rdiff -u -r1.8 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/i386/config.h
cvs rdiff -u -r1.2 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/config.h
cvs rdiff -u -r1.8 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/config.h
cvs rdiff -u -r1.8 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/config.h
cvs rdiff -u -r1.9 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/config.h
cvs rdiff -u -r1.9 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/config.h
cvs rdiff -u -r1.10 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/config.h
cvs rdiff -u -r1.9 -r0 \

CVS commit: src/tools/gcc

2014-05-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu May 29 16:27:50 UTC 2014

Modified Files:
src/tools/gcc: mknative-gcc

Log Message:
Don't grab libstdc++-v3/config.h it's not used.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.78 src/tools/gcc/mknative-gcc:1.79
--- src/tools/gcc/mknative-gcc:1.78	Sun Mar  2 04:58:20 2014
+++ src/tools/gcc/mknative-gcc	Thu May 29 16:27:50 2014
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.78 2014/03/02 04:58:20 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.79 2014/05/29 16:27:50 skrll Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -219,8 +219,6 @@ get_libstdcxx_v3 () {
 			$_TMPDIR/$_PLATFORM/libstdc++-v3/include/$_PLATFORM/bits/$h
 	done
 
-	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
-		$_TMPDIR/$_PLATFORM/libstdc++-v3/config.h
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/gstdint.h \
 		$_TMPDIR/$_PLATFORM/libstdc++-v3/include/gstdint.h
 



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

2014-05-29 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu May 29 19:08:30 UTC 2014

Modified Files:
src/sys/arch/x86/x86: mtrr_i686.c

Log Message:
\%s is not an escape sequence, and we want %s


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/x86/x86/mtrr_i686.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/x86/x86/mtrr_i686.c
diff -u src/sys/arch/x86/x86/mtrr_i686.c:1.27 src/sys/arch/x86/x86/mtrr_i686.c:1.28
--- src/sys/arch/x86/x86/mtrr_i686.c:1.27	Sun Apr 22 18:59:41 2012
+++ src/sys/arch/x86/x86/mtrr_i686.c	Thu May 29 19:08:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mtrr_i686.c,v 1.27 2012/04/22 18:59:41 rmind Exp $ */
+/*	$NetBSD: mtrr_i686.c,v 1.28 2014/05/29 19:08:30 plunky Exp $ */
 
 /*-
  * Copyright (c) 2000, 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mtrr_i686.c,v 1.27 2012/04/22 18:59:41 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: mtrr_i686.c,v 1.28 2014/05/29 19:08:30 plunky Exp $);
 
 #include opt_multiprocessor.h
 
@@ -311,7 +311,7 @@ i686_mtrr_init_first(void)
 	i686_mtrr_vcnt = i686_mtrr_cap  MTRR_I686_CAP_VCNT_MASK;
 
 	if (i686_mtrr_vcnt  MTRR_I686_NVAR_MAX)
-		printf(\%s: FIXME: more than %d MTRRs (%d)\n, __FILE__,
+		printf(%s: FIXME: more than %d MTRRs (%d)\n, __FILE__,
 		MTRR_I686_NVAR_MAX, i686_mtrr_vcnt);
 	else if (i686_mtrr_vcnt  MTRR_I686_NVAR_MAX) {
 		for (i = MTRR_I686_NVAR_MAX - i686_mtrr_vcnt; i; i--) {



CVS commit: src/sys/kern

2014-05-29 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Thu May 29 21:15:55 UTC 2014

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

Log Message:
hashinit: replace loop with a formula.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/kern/subr_hash.c

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

Modified files:

Index: src/sys/kern/subr_hash.c
diff -u src/sys/kern/subr_hash.c:1.5 src/sys/kern/subr_hash.c:1.6
--- src/sys/kern/subr_hash.c:1.5	Tue Jun  5 20:51:36 2012
+++ src/sys/kern/subr_hash.c	Thu May 29 21:15:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_hash.c,v 1.5 2012/06/05 20:51:36 rmind Exp $	*/
+/*	$NetBSD: subr_hash.c,v 1.6 2014/05/29 21:15:55 rmind Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1991, 1993
@@ -37,9 +37,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_hash.c,v 1.5 2012/06/05 20:51:36 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_hash.c,v 1.6 2014/05/29 21:15:55 rmind Exp $);
 
 #include sys/param.h
+#include sys/bitops.h
 #include sys/kmem.h
 #include sys/systm.h
 
@@ -89,10 +90,9 @@ hashinit(u_int elements, enum hashtype h
 	if (elements  MAXELEMENTS)
 		elements = MAXELEMENTS;
 
-	for (hashsize = 1; hashsize  elements; hashsize = 1)
-		continue;
-
+	hashsize = 1UL  (ilog2(elements - 1) + 1);
 	esize = hash_list_size(htype);
+
 	p = kmem_alloc(hashsize * esize, waitok ? KM_SLEEP : KM_NOSLEEP);
 	if (p == NULL)
 		return NULL;



CVS commit: src/sys/external/bsd/drm2/i915drm

2014-05-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 29 22:05:24 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/i915drm: i915_gem_gtt.c

Log Message:
Work around broken GTT size detection in agp_i810 code.

This will do until I work out the twisty maze of registers, all
different, to reliably determine the size of the GTT (and hence the
GPU's virtual address space) separately from the size of the AGP
aperture.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.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/external/bsd/drm2/i915drm/i915_gem_gtt.c
diff -u src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c:1.13 src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c:1.14
--- src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c:1.13	Wed May 28 15:44:02 2014
+++ src/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c	Thu May 29 22:05:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: i915_gem_gtt.c,v 1.13 2014/05/28 15:44:02 riastradh Exp $	*/
+/*	$NetBSD: i915_gem_gtt.c,v 1.14 2014/05/29 22:05:24 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: i915_gem_gtt.c,v 1.13 2014/05/28 15:44:02 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: i915_gem_gtt.c,v 1.14 2014/05/29 22:05:24 riastradh Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -405,7 +405,14 @@ agp_gtt_init(struct drm_device *dev)
 	gtt-gma_bus_addr = agp_i810_sc-as_apaddr;
 	gtt-gtt_mappable_entries = (agp_i810_sc-as_apsize  AGP_PAGE_SHIFT);
 	gtt-stolen_size = (isc-stolen  AGP_PAGE_SHIFT);
-	gtt-gtt_total_entries = isc-gtt_size/4;
+
+	/*
+	 * XXX Not quite right -- on some devices (i965), there are
+	 * more entries in the GTT than fit in the aperture.  However,
+	 * this is a safe approximation until we work out the fake AGP
+	 * code to detect the correct number of GTT entries.
+	 */
+	gtt-gtt_total_entries = gtt-gtt_mappable_entries;
 
 	product = PCI_PRODUCT(dev-pdev-pd_pa.pa_id);
 	if (((product == PCI_PRODUCT_INTEL_IRONLAKE_M_HB) ||



CVS commit: src/sys/netinet

2014-05-29 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Thu May 29 23:02:48 UTC 2014

Modified Files:
src/sys/netinet: igmp.c igmp.h igmp_var.h in.c in_var.h ip_carp.c
ip_input.c ip_output.c ip_var.h

Log Message:
Make IGMP and multicast group management code MP-safe.  Use a read-write
lock to protect the hash table of multicast address records; also, make it
private and eliminate some macros.  In the long term, the lookup path ought
to be optimised.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/netinet/igmp.c
cvs rdiff -u -r1.11 -r1.12 src/sys/netinet/igmp.h
cvs rdiff -u -r1.23 -r1.24 src/sys/netinet/igmp_var.h
cvs rdiff -u -r1.145 -r1.146 src/sys/netinet/in.c
cvs rdiff -u -r1.67 -r1.68 src/sys/netinet/in_var.h
cvs rdiff -u -r1.55 -r1.56 src/sys/netinet/ip_carp.c
cvs rdiff -u -r1.315 -r1.316 src/sys/netinet/ip_input.c
cvs rdiff -u -r1.227 -r1.228 src/sys/netinet/ip_output.c
cvs rdiff -u -r1.103 -r1.104 src/sys/netinet/ip_var.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/netinet/igmp.c
diff -u src/sys/netinet/igmp.c:1.54 src/sys/netinet/igmp.c:1.55
--- src/sys/netinet/igmp.c:1.54	Tue Feb 25 18:30:12 2014
+++ src/sys/netinet/igmp.c	Thu May 29 23:02:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: igmp.c,v 1.54 2014/02/25 18:30:12 pooka Exp $	*/
+/*	$NetBSD: igmp.c,v 1.55 2014/05/29 23:02:48 rmind Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: igmp.c,v 1.54 2014/02/25 18:30:12 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: igmp.c,v 1.55 2014/05/29 23:02:48 rmind Exp $);
 
 #include opt_mrouting.h
 
@@ -50,6 +50,7 @@ __KERNEL_RCSID(0, $NetBSD: igmp.c,v 1.5
 #include sys/socketvar.h
 #include sys/protosw.h
 #include sys/systm.h
+#include sys/cprng.h
 #include sys/sysctl.h
 
 #include net/if.h
@@ -64,83 +65,107 @@ __KERNEL_RCSID(0, $NetBSD: igmp.c,v 1.5
 #include netinet/igmp.h
 #include netinet/igmp_var.h
 
-#define IP_MULTICASTOPTS	0
-
-static struct pool igmp_rti_pool;
+/*
+ * Per-interface router version information.
+ */
+typedef struct router_info {
+	LIST_ENTRY(router_info) rti_link;
+	ifnet_t *	rti_ifp;
+	int		rti_type;	/* type of router on this interface */
+	int		rti_age;	/* time since last v1 query */
+} router_info_t;
 
-static percpu_t *igmpstat_percpu;
+/*
+ * The router-info list and the timer flag are protected by in_multilock.
+ *
+ * Lock order:
+ *
+ *	softnet_lock -
+ *		in_multilock
+ */
+static struct pool	igmp_rti_pool		__cacheline_aligned;
+static LIST_HEAD(, router_info)	rti_head	__cacheline_aligned;
+static int		igmp_timers_on		__cacheline_aligned;
+static percpu_t *	igmpstat_percpu		__read_mostly;
 
 #define	IGMP_STATINC(x)		_NET_STATINC(igmpstat_percpu, x)
 
-int igmp_timers_are_running;
-static LIST_HEAD(, router_info) rti_head = LIST_HEAD_INITIALIZER(rti_head);
-
-void igmp_sendpkt(struct in_multi *, int);
-static int rti_fill(struct in_multi *);
-static struct router_info *rti_find(struct ifnet *);
-static void rti_delete(struct ifnet *);
-
-static void sysctl_net_inet_igmp_setup(struct sysctllog **);
+static void		igmp_sendpkt(struct in_multi *, int);
+static int		rti_fill(struct in_multi *);
+static router_info_t *	rti_find(struct ifnet *);
+static void		rti_delete(struct ifnet *);
+static void		sysctl_net_inet_igmp_setup(struct sysctllog **);
 
+/*
+ * rti_fill: associate router information with the given multicast group;
+ * if there is no router information for the interface, then create it.
+ */
 static int
 rti_fill(struct in_multi *inm)
 {
-	struct router_info *rti;
+	router_info_t *rti;
+
+	KASSERT(in_multi_lock_held());
 
-	/* this function is called at splsoftnet() */
 	LIST_FOREACH(rti, rti_head, rti_link) {
 		if (rti-rti_ifp == inm-inm_ifp) {
 			inm-inm_rti = rti;
-			if (rti-rti_type == IGMP_v1_ROUTER)
-return (IGMP_v1_HOST_MEMBERSHIP_REPORT);
-			else
-return (IGMP_v2_HOST_MEMBERSHIP_REPORT);
+			return rti-rti_type == IGMP_v1_ROUTER ?
+			IGMP_v1_HOST_MEMBERSHIP_REPORT :
+			IGMP_v2_HOST_MEMBERSHIP_REPORT;
 		}
 	}
-
 	rti = pool_get(igmp_rti_pool, PR_NOWAIT);
-	if (rti == NULL)
+	if (rti == NULL) {
 		return 0;
+	}
 	rti-rti_ifp = inm-inm_ifp;
 	rti-rti_type = IGMP_v2_ROUTER;
 	LIST_INSERT_HEAD(rti_head, rti, rti_link);
 	inm-inm_rti = rti;
-	return (IGMP_v2_HOST_MEMBERSHIP_REPORT);
+	return IGMP_v2_HOST_MEMBERSHIP_REPORT;
 }
 
-static struct router_info *
-rti_find(struct ifnet *ifp)
+/*
+ * rti_find: lookup or create router information for the given interface.
+ */
+static router_info_t *
+rti_find(ifnet_t *ifp)
 {
-	struct router_info *rti;
-	int s = splsoftnet();
+	router_info_t *rti;
+
+	KASSERT(in_multi_lock_held());
 
 	LIST_FOREACH(rti, rti_head, rti_link) {
 		if (rti-rti_ifp == ifp)
-			return (rti);
+			return rti;
 	}
-
 	rti = pool_get(igmp_rti_pool, PR_NOWAIT);
 	if (rti == NULL) {
-		splx(s);
 		

CVS commit: src/share/man/man7

2014-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 30 01:34:32 UTC 2014

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
mention new ipsec sysctls.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/share/man/man7/sysctl.7

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/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.79 src/share/man/man7/sysctl.7:1.80
--- src/share/man/man7/sysctl.7:1.79	Sun Dec 15 19:59:37 2013
+++ src/share/man/man7/sysctl.7	Thu May 29 21:34:32 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysctl.7,v 1.79 2013/12/16 00:59:37 wiz Exp $
+.\	$NetBSD: sysctl.7,v 1.80 2014/05/30 01:34:32 christos Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
 .\
-.Dd December 14, 2013
+.Dd May 29, 2014
 .Dt SYSCTL 7
 .Os
 .Sh NAME
@@ -1889,6 +1889,8 @@ The currently defined variable and names
 .Bl -column blockacq_lifetime integer Changeable -offset indent
 .It Sy Variable name	Type	Changeable
 .It debug	integer	yes
+.It enabled	integer	yes
+.It used	integer	no
 .It spi_try	integer	yes
 .It spi_min_value	integer	yes
 .It spi_max_value	integer	yes
@@ -1906,6 +1908,12 @@ The variables are as follows:
 Turn on debugging message from within the kernel.
 The value is a bitmap, as defined in
 .In netkey/key_debug.h .
+.It Li enabled
+Turn on and off IPsec processing.
+.It Li used
+Based on if IPsec is enabled, and SPD rule existance, show if
+IPsec is being used.
+Note that currenly once IPsec is being used, it cannot be disabled.
 .It Li spi_try
 The number of times the kernel will try to obtain an unique SPI
 when it generates it from random number generator.



CVS commit: src/sys

2014-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 30 01:39:03 UTC 2014

Modified Files:
src/sys/netinet: in.h in_pcb.c in_pcb_hdr.h ip_icmp.c ip_input.c
ip_output.c raw_ip.c tcp_input.c tcp_output.c udp_usrreq.c
src/sys/netinet6: icmp6.c in6.h in6_pcb.c ip6_forward.c ip6_input.c
ip6_output.c raw_ip6.c udp6_usrreq.c
src/sys/netipsec: ipsec.c ipsec.h ipsec_netbsd.c key.c key.h

Log Message:
Introduce 2 new variables: ipsec_enabled and ipsec_used.
Ipsec enabled is controlled by sysctl and determines if is allowed.
ipsec_used is set automatically based on ipsec being enabled, and
rules existing.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/netinet/in.h
cvs rdiff -u -r1.147 -r1.148 src/sys/netinet/in_pcb.c
cvs rdiff -u -r1.10 -r1.11 src/sys/netinet/in_pcb_hdr.h
cvs rdiff -u -r1.133 -r1.134 src/sys/netinet/ip_icmp.c
cvs rdiff -u -r1.316 -r1.317 src/sys/netinet/ip_input.c
cvs rdiff -u -r1.228 -r1.229 src/sys/netinet/ip_output.c
cvs rdiff -u -r1.123 -r1.124 src/sys/netinet/raw_ip.c
cvs rdiff -u -r1.331 -r1.332 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.175 -r1.176 src/sys/netinet/tcp_output.c
cvs rdiff -u -r1.198 -r1.199 src/sys/netinet/udp_usrreq.c
cvs rdiff -u -r1.167 -r1.168 src/sys/netinet6/icmp6.c
cvs rdiff -u -r1.75 -r1.76 src/sys/netinet6/in6.h
cvs rdiff -u -r1.124 -r1.125 src/sys/netinet6/in6_pcb.c
cvs rdiff -u -r1.72 -r1.73 src/sys/netinet6/ip6_forward.c
cvs rdiff -u -r1.145 -r1.146 src/sys/netinet6/ip6_input.c
cvs rdiff -u -r1.156 -r1.157 src/sys/netinet6/ip6_output.c
cvs rdiff -u -r1.117 -r1.118 src/sys/netinet6/raw_ip6.c
cvs rdiff -u -r1.97 -r1.98 src/sys/netinet6/udp6_usrreq.c
cvs rdiff -u -r1.62 -r1.63 src/sys/netipsec/ipsec.c
cvs rdiff -u -r1.34 -r1.35 src/sys/netipsec/ipsec.h
cvs rdiff -u -r1.36 -r1.37 src/sys/netipsec/ipsec_netbsd.c
cvs rdiff -u -r1.87 -r1.88 src/sys/netipsec/key.c
cvs rdiff -u -r1.12 -r1.13 src/sys/netipsec/key.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/netinet/in.h
diff -u src/sys/netinet/in.h:1.90 src/sys/netinet/in.h:1.91
--- src/sys/netinet/in.h:1.90	Thu May 22 18:01:12 2014
+++ src/sys/netinet/in.h	Thu May 29 21:39:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.h,v 1.90 2014/05/22 22:01:12 rmind Exp $	*/
+/*	$NetBSD: in.h,v 1.91 2014/05/30 01:39:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -282,9 +282,7 @@ struct ip_opts {
 #define	IP_PORTRANGE		19   /* int; range to use for ephemeral port */
 #define	IP_RECVIF		20   /* bool; receive reception if w/dgram */
 #define	IP_ERRORMTU		21   /* int; get MTU of last xmit = EMSGSIZE */
-#if 1 /*IPSEC*/
-#define	IP_IPSEC_POLICY		22 /* struct; get/set security policy */
-#endif
+#define	IP_IPSEC_POLICY		22   /* struct; get/set security policy */
 #define	IP_RECVTTL		23   /* bool; receive IP TTL w/dgram */
 #define	IP_MINTTL		24   /* minimum TTL for packet or drop */
 #define	IP_PKTINFO		25   /* int; send interface and src addr */

Index: src/sys/netinet/in_pcb.c
diff -u src/sys/netinet/in_pcb.c:1.147 src/sys/netinet/in_pcb.c:1.148
--- src/sys/netinet/in_pcb.c:1.147	Thu May 22 18:01:12 2014
+++ src/sys/netinet/in_pcb.c	Thu May 29 21:39:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in_pcb.c,v 1.147 2014/05/22 22:01:12 rmind Exp $	*/
+/*	$NetBSD: in_pcb.c,v 1.148 2014/05/30 01:39:03 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -93,7 +93,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in_pcb.c,v 1.147 2014/05/22 22:01:12 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: in_pcb.c,v 1.148 2014/05/30 01:39:03 christos Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -191,9 +191,6 @@ in_pcballoc(struct socket *so, void *v)
 	struct inpcbtable *table = v;
 	struct inpcb *inp;
 	int s;
-#if defined(IPSEC)
-	int error;
-#endif
 
 	s = splnet();
 	inp = pool_get(inpcb_pool, PR_NOWAIT);
@@ -208,12 +205,14 @@ in_pcballoc(struct socket *so, void *v)
 	inp-inp_portalgo = PORTALGO_DEFAULT;
 	inp-inp_bindportonsend = false;
 #if defined(IPSEC)
-	error = ipsec_init_pcbpolicy(so, inp-inp_sp);
-	if (error != 0) {
-		s = splnet();
-		pool_put(inpcb_pool, inp);
-		splx(s);
-		return error;
+	if (ipsec_enabled) {
+		int error = ipsec_init_pcbpolicy(so, inp-inp_sp);
+		if (error != 0) {
+			s = splnet();
+			pool_put(inpcb_pool, inp);
+			splx(s);
+			return error;
+		}
 	}
 #endif
 	so-so_pcb = inp;
@@ -556,7 +555,7 @@ in_pcbconnect(void *v, struct mbuf *nam,
 
 	in_pcbstate(inp, INP_CONNECTED);
 #if defined(IPSEC)
-	if (inp-inp_socket-so_type == SOCK_STREAM)
+	if (ipsec_enabled  inp-inp_socket-so_type == SOCK_STREAM)
 		ipsec_pcbconn(inp-inp_sp);
 #endif
 	return (0);
@@ -574,7 +573,8 @@ in_pcbdisconnect(void *v)
 	inp-inp_fport = 0;
 	in_pcbstate(inp, INP_BOUND);
 #if defined(IPSEC)
-	ipsec_pcbdisconn(inp-inp_sp);
+	if (ipsec_enabled)
+		ipsec_pcbdisconn(inp-inp_sp);
 #endif
 	if 

CVS commit: src/share/man/man7

2014-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 30 01:43:20 UTC 2014

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Explain ipsec.enabled better.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/share/man/man7/sysctl.7

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/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.80 src/share/man/man7/sysctl.7:1.81
--- src/share/man/man7/sysctl.7:1.80	Thu May 29 21:34:32 2014
+++ src/share/man/man7/sysctl.7	Thu May 29 21:43:20 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysctl.7,v 1.80 2014/05/30 01:34:32 christos Exp $
+.\	$NetBSD: sysctl.7,v 1.81 2014/05/30 01:43:20 christos Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -1909,7 +1909,15 @@ Turn on debugging message from within th
 The value is a bitmap, as defined in
 .In netkey/key_debug.h .
 .It Li enabled
-Turn on and off IPsec processing.
+Control processing of IPsec control messages.
+.Bl -tag -width indent
+.It 0
+Never allow IPsec processing
+.It 1
+Allow IPsec processing when SPD policies are present.
+.It 2
+Force IPsec processing even when SPD policies are not present.
+.El
 .It Li used
 Based on if IPsec is enabled, and SPD rule existance, show if
 IPsec is being used.



CVS commit: src

2014-05-29 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri May 30 01:44:21 UTC 2014

Modified Files:
src/usr.bin/netstat: main.c
src/usr.sbin/ifmcstat: ifmcstat.c

Log Message:
netstat(1) and ifmcstat(8): ifnet was renamed to ifnet_list, PR/48850.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/ifmcstat/ifmcstat.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/netstat/main.c
diff -u src/usr.bin/netstat/main.c:1.90 src/usr.bin/netstat/main.c:1.91
--- src/usr.bin/netstat/main.c:1.90	Mon Apr 28 15:41:15 2014
+++ src/usr.bin/netstat/main.c	Fri May 30 01:44:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.90 2014/04/28 15:41:15 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.91 2014/05/30 01:44:21 rmind Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = from: @(#)main.c	8.4 (Berkeley) 3/1/94;
 #else
-__RCSID($NetBSD: main.c,v 1.90 2014/04/28 15:41:15 christos Exp $);
+__RCSID($NetBSD: main.c,v 1.91 2014/05/30 01:44:21 rmind Exp $);
 #endif
 #endif /* not lint */
 
@@ -79,8 +79,8 @@ struct nlist nl[] = {
 	{ _udbtable, 0, 0, 0, 0 },
 #define	N_UDPSTAT	5
 	{ _udpstat, 0, 0, 0, 0 },	/* not available via kvm */
-#define	N_IFNET		6
-	{ _ifnet, 0, 0, 0, 0 },
+#define	N_IFNET_LIST		6
+	{ _ifnet_list, 0, 0, 0, 0 },
 #define	N_ICMPSTAT	7
 	{ _icmpstat, 0, 0, 0, 0 },	/* not available via kvm */
 #define	N_RTSTAT	8
@@ -570,7 +570,7 @@ main(int argc, char *argv[])
 	}
 	if (pflag) {
 		if (iflag  tp-pr_istats)
-			intpr(interval, nl[N_IFNET].n_value, tp-pr_istats);
+			intpr(interval, nl[N_IFNET_LIST].n_value, tp-pr_istats);
 		else if (tp-pr_stats)
 			(*tp-pr_stats)(nl[tp-pr_sindex].n_value,
 tp-pr_name);
@@ -624,7 +624,7 @@ main(int argc, char *argv[])
 			if (af != AF_UNSPEC)
 goto protostat;
 
-			intpr(interval, nl[N_IFNET].n_value, NULL);
+			intpr(interval, nl[N_IFNET_LIST].n_value, NULL);
 			break;
 		}
 		if (rflag) {
@@ -723,7 +723,7 @@ printproto(struct protox *tp, const char
 	if (sflag) {
 		if (iflag) {
 			if (tp-pr_istats)
-intpr(interval, nl[N_IFNET].n_value,
+intpr(interval, nl[N_IFNET_LIST].n_value,
   tp-pr_istats);
 			return;
 		}

Index: src/usr.sbin/ifmcstat/ifmcstat.c
diff -u src/usr.sbin/ifmcstat/ifmcstat.c:1.12 src/usr.sbin/ifmcstat/ifmcstat.c:1.13
--- src/usr.sbin/ifmcstat/ifmcstat.c:1.12	Sat Oct 19 17:16:25 2013
+++ src/usr.sbin/ifmcstat/ifmcstat.c	Fri May 30 01:44:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifmcstat.c,v 1.12 2013/10/19 17:16:25 christos Exp $	*/
+/*	$NetBSD: ifmcstat.c,v 1.13 2014/05/30 01:44:21 rmind Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,8 +65,8 @@
 kvm_t	*kvmd;
 
 struct	nlist nl[] = {
-#define	N_IFNET	0
-	{ _ifnet, 0, 0, 0, 0 },
+#define	N_IFNET_LIST	0
+	{ _ifnet_list, 0, 0, 0, 0 },
 #if !(defined(__FreeBSD__)  __FreeBSD__ = 3)
 #define N_IN6_MK 1
 	{ _in6_mk, 0, 0, 0, 0 },
@@ -149,11 +149,11 @@ int main()
 		perror(kvm_nlist);
 		exit(1);
 	}
-	if (nl[N_IFNET].n_value == 0) {
-		printf(symbol %s not found\n, nl[N_IFNET].n_name);
+	if (nl[N_IFNET_LIST].n_value == 0) {
+		printf(symbol %s not found\n, nl[N_IFNET_LIST].n_name);
 		exit(1);
 	}
-	KREAD(nl[N_IFNET].n_value, ifp, struct ifnet *);
+	KREAD(nl[N_IFNET_LIST].n_value, ifp, struct ifnet *);
 	while (ifp) {
 		KREAD(ifp, ifnet, struct ifnet);
 		printf(%s:\n, if_indextoname(ifnet.if_index, ifnam));



CVS commit: src/usr.sbin/mopd

2014-05-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 02:16:10 UTC 2014

Modified Files:
src/usr.sbin/mopd: Makefile.inc

Log Message:
No need for libkvm here.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/mopd/Makefile.inc

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/mopd/Makefile.inc
diff -u src/usr.sbin/mopd/Makefile.inc:1.10 src/usr.sbin/mopd/Makefile.inc:1.11
--- src/usr.sbin/mopd/Makefile.inc:1.10	Mon May 28 12:06:37 2007
+++ src/usr.sbin/mopd/Makefile.inc	Fri May 30 02:16:10 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.10 2007/05/28 12:06:37 tls Exp $
+#	$NetBSD: Makefile.inc,v 1.11 2014/05/30 02:16:10 joerg Exp $
 
 .include bsd.own.mk
 
@@ -6,8 +6,8 @@ USE_FORT?=yes	# network server
 
 LIBCOMMON != cd ${.CURDIR}/../common  ${PRINTOBJDIR}
 CPPFLAGS+=-I${.CURDIR}/../common
-DPADD+=	${LIBKVM} ${LIBCOMMON}/libcommon.a
-LDADD+=	-lkvm -L${LIBCOMMON} -lcommon
+DPADD+=	${LIBCOMMON}/libcommon.a
+LDADD+=	-L${LIBCOMMON} -lcommon
 
 .if exists(${.CURDIR}/../../Makefile.inc)
 .include ${.CURDIR}/../../Makefile.inc



CVS commit: src/sys/external/bsd/ipf/netinet

2014-05-29 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri May 30 02:16:17 UTC 2014

Modified Files:
src/sys/external/bsd/ipf/netinet: ip_auth.c

Log Message:
Include cdefs.h earlier for NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/ipf/netinet/ip_auth.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/external/bsd/ipf/netinet/ip_auth.c
diff -u src/sys/external/bsd/ipf/netinet/ip_auth.c:1.4 src/sys/external/bsd/ipf/netinet/ip_auth.c:1.5
--- src/sys/external/bsd/ipf/netinet/ip_auth.c:1.4	Sun Oct 20 17:14:05 2013
+++ src/sys/external/bsd/ipf/netinet/ip_auth.c	Fri May 30 02:16:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_auth.c,v 1.4 2013/10/20 17:14:05 christos Exp $	*/
+/*	$NetBSD: ip_auth.c,v 1.5 2014/05/30 02:16:17 rmind Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -11,6 +11,9 @@
 # defineKERNEL	1
 # define_KERNEL	1
 #endif
+#if defined(__NetBSD__)
+#include sys/cdefs.h
+#endif
 #include sys/errno.h
 #include sys/types.h
 #include sys/param.h
@@ -128,8 +131,7 @@ extern struct ifqueue   ipintrq;		/* ip 
 
 #if !defined(lint)
 #if defined(__NetBSD__)
-#include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_auth.c,v 1.4 2013/10/20 17:14:05 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_auth.c,v 1.5 2014/05/30 02:16:17 rmind Exp $);
 #else
 static const char rcsid[] = @(#)Id: ip_auth.c,v 1.1.1.2 2012/07/22 13:45:08 darrenr Exp;
 #endif



CVS commit: src/sys/netinet

2014-05-29 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri May 30 02:17:01 UTC 2014

Modified Files:
src/sys/netinet: ip_var.h

Log Message:
Use __CTASSERT() in the header.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/netinet/ip_var.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/netinet/ip_var.h
diff -u src/sys/netinet/ip_var.h:1.104 src/sys/netinet/ip_var.h:1.105
--- src/sys/netinet/ip_var.h:1.104	Thu May 29 23:02:48 2014
+++ src/sys/netinet/ip_var.h	Fri May 30 02:17:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_var.h,v 1.104 2014/05/29 23:02:48 rmind Exp $	*/
+/*	$NetBSD: ip_var.h,v 1.105 2014/05/30 02:17:01 rmind Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -173,9 +173,8 @@ struct ip_moptions {
 #define	IP_RAWOUTPUT		0x0002		/* raw ip header exists */
 #define	IP_RETURNMTU		0x0004		/* pass back mtu on EMSGSIZE */
 #define	IP_NOIPNEWID		0x0008		/* don't fill in ip_id */
-
-CTASSERT(SO_DONTROUTE ==	0x0010);
-CTASSERT(SO_BROADCAST ==	0x0020);
+__CTASSERT(SO_DONTROUTE ==	0x0010);
+__CTASSERT(SO_BROADCAST ==	0x0020);
 #define	IP_ROUTETOIF		SO_DONTROUTE	/* bypass routing tables */
 #define	IP_ALLOWBROADCAST	SO_BROADCAST	/* can send broadcast packets */
 



CVS commit: src/sys/netinet

2014-05-29 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri May 30 02:27:29 UTC 2014

Modified Files:
src/sys/netinet: tcp_input.c

Log Message:
tcp_signature_getsav: handle !ipsec_used case and fix the build (hi christos!).


To generate a diff of this commit:
cvs rdiff -u -r1.332 -r1.333 src/sys/netinet/tcp_input.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/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.332 src/sys/netinet/tcp_input.c:1.333
--- src/sys/netinet/tcp_input.c:1.332	Fri May 30 01:39:03 2014
+++ src/sys/netinet/tcp_input.c	Fri May 30 02:27:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.332 2014/05/30 01:39:03 christos Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.333 2014/05/30 02:27:29 rmind Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.332 2014/05/30 01:39:03 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.333 2014/05/30 02:27:29 rmind Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -3170,6 +3170,7 @@ tcp_signature_getsav(struct mbuf *m, str
 		 */
 		return KEY_ALLOCSA(dst, IPPROTO_TCP, htonl(TCP_SIG_SPI), 0, 0);
 	}
+	return NULL;
 #else
 	if (ip)
 		return key_allocsa(AF_INET, (void *)ip-ip_src,



CVS commit: src/usr.sbin/ifmcstat

2014-05-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 02:28:07 UTC 2014

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

Log Message:
Remove !NetBSD code.


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

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

Modified files:

Index: src/usr.sbin/ifmcstat/ifmcstat.c
diff -u src/usr.sbin/ifmcstat/ifmcstat.c:1.13 src/usr.sbin/ifmcstat/ifmcstat.c:1.14
--- src/usr.sbin/ifmcstat/ifmcstat.c:1.13	Fri May 30 01:44:21 2014
+++ src/usr.sbin/ifmcstat/ifmcstat.c	Fri May 30 02:28:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifmcstat.c,v 1.13 2014/05/30 01:44:21 rmind Exp $	*/
+/*	$NetBSD: ifmcstat.c,v 1.14 2014/05/30 02:28:07 joerg Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -40,23 +40,10 @@
 #include sys/types.h
 #include sys/socket.h
 #include net/if.h
-#if defined(__FreeBSD__)  __FreeBSD__ = 3
-# include net/if_var.h
-#endif
 #include net/if_types.h
 #include net/if_dl.h
 #include netinet/in.h
-#ifndef __NetBSD__
-# ifdef	__FreeBSD__
-#  define	KERNEL
-# endif
-# include netinet/if_ether.h
-# ifdef	__FreeBSD__
-#  undef	KERNEL
-# endif
-#else
-# include net/if_ether.h
-#endif
+#include net/if_ether.h
 #include netinet/in_var.h
 #include arpa/inet.h
 
@@ -67,10 +54,8 @@ kvm_t	*kvmd;
 struct	nlist nl[] = {
 #define	N_IFNET_LIST	0
 	{ _ifnet_list, 0, 0, 0, 0 },
-#if !(defined(__FreeBSD__)  __FreeBSD__ = 3)
 #define N_IN6_MK 1
 	{ _in6_mk, 0, 0, 0, 0 },
-#endif
 	{ , 0, 0, 0, 0 },
 };
 
@@ -78,32 +63,19 @@ const char *inet6_n2a __P((struct in6_ad
 int main __P((void));
 char *ifname __P((struct ifnet *));
 void kread __P((u_long, void *, int));
-#if !(defined(__FreeBSD__)  __FreeBSD__ = 3)
 void acmc __P((struct ether_multi *));
-#endif
 void if6_addrlist __P((struct ifaddr *));
 void in6_multilist __P((struct in6_multi *));
 struct in6_multi * in6_multientry __P((struct in6_multi *));
 
-#if !defined(__NetBSD__)  !(defined(__FreeBSD__)  __FreeBSD__ = 3)  !defined(__OpenBSD__)
-#ifdef __bsdi__
-struct ether_addr {
-	u_int8_t ether_addr_octet[6];
-};
-#endif
-static char *ether_ntoa __P((struct ether_addr *));
-#endif
-
 #define	KREAD(addr, buf, type) \
 	kread((u_long)addr, (void *)buf, sizeof(type))
 
-#ifdef N_IN6_MK
 struct multi6_kludge {
 	LIST_ENTRY(multi6_kludge) mk_entry;
 	struct ifnet *mk_ifp;
 	struct in6_multihead mk_head;
 };
-#endif
 
 const char *inet6_n2a(p)
 	struct in6_addr *p;
@@ -129,9 +101,6 @@ int main()
 {
 	char	buf[_POSIX2_LINE_MAX], ifnam[IFNAMSIZ];
 	struct	ifnet	*ifp, *nifp, ifnet;
-#ifndef __NetBSD__
-	struct	arpcom	arpcom;
-#else
 	struct ethercom ec;
 	union {
 		struct sockaddr_storage st;
@@ -139,7 +108,6 @@ int main()
 	} su;
 	struct sockaddr_dl *sdlp;
 	sdlp = su.sdl;
-#endif
 
 	if ((kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, buf)) == NULL) {
 		perror(kvm_openfiles);
@@ -158,18 +126,9 @@ int main()
 		KREAD(ifp, ifnet, struct ifnet);
 		printf(%s:\n, if_indextoname(ifnet.if_index, ifnam));
 
-#if defined(__NetBSD__) || defined(__OpenBSD__)
 		if6_addrlist(ifnet.if_addrlist.tqh_first);
 		nifp = ifnet.if_list.tqe_next;
-#elif defined(__FreeBSD__)  __FreeBSD__ = 3
-		if6_addrlist(TAILQ_FIRST(ifnet.if_addrhead));
-		nifp = ifnet.if_link.tqe_next;
-#else
-		if6_addrlist(ifnet.if_addrlist);
-		nifp = ifnet.if_next;
-#endif
 
-#ifdef __NetBSD__
 		KREAD(ifnet.if_sadl, sdlp, struct sockaddr_dl);
 		if (sdlp-sdl_type == IFT_ETHER) {
 			/* If we didn't get all of it, try again */
@@ -182,23 +141,6 @@ int main()
 			acmc(ec.ec_multiaddrs.lh_first);
 			printf(\n);
 		}
-#elif defined(__FreeBSD__)  __FreeBSD__ = 3
-		/* not supported */
-#else
-		if (ifnet.if_type == IFT_ETHER) {
-			KREAD(ifp, arpcom, struct arpcom);
-			printf(\tenaddr %s,
-			ether_ntoa((struct ether_addr *)arpcom.ac_enaddr));
-			KREAD(ifp, arpcom, struct arpcom);
-			printf( multicnt %d, arpcom.ac_multicnt);
-#ifdef __OpenBSD__
-			acmc(arpcom.ac_multiaddrs.lh_first);
-#else
-			acmc(arpcom.ac_multiaddrs);
-#endif
-			printf(\n);
-		}
-#endif
 
 		ifp = nifp;
 	}
@@ -211,16 +153,10 @@ char *ifname(ifp)
 	struct ifnet *ifp;
 {
 	static char buf[BUFSIZ];
-#if defined(__NetBSD__) || defined(__OpenBSD__)
 	struct ifnet ifnet;
-#endif
 
-#if defined(__NetBSD__) || defined(__OpenBSD__)
 	KREAD(ifp, ifnet, struct ifnet);
 	strncpy(buf, ifnet.if_xname, BUFSIZ);
-#else
-	KREAD(ifp-if_name, buf, IFNAMSIZ);
-#endif
 	return buf;
 }
 
@@ -235,7 +171,6 @@ void kread(addr, buf, len)
 	}
 }
 
-#if !(defined(__FreeBSD__)  __FreeBSD__ = 3)
 void acmc(am)
 	struct ether_multi *am;
 {
@@ -248,14 +183,9 @@ void acmc(am)
 		printf(%s -- , ether_ntoa((struct ether_addr *)em.enm_addrlo));
 		printf(%s , ether_ntoa((struct ether_addr *)em.enm_addrhi));
 		printf(%d, em.enm_refcount);
-#if !defined(__NetBSD__)  !defined(__OpenBSD__)
-		am = em.enm_next;
-#else
 		am = em.enm_list.le_next;
-#endif
 	}
 }
-#endif
 
 void
 

CVS commit: src/usr.sbin/ifmcstat

2014-05-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 30 02:31:40 UTC 2014

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

Log Message:
Kill __P. Use static.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/ifmcstat/ifmcstat.c

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

Modified files:

Index: src/usr.sbin/ifmcstat/ifmcstat.c
diff -u src/usr.sbin/ifmcstat/ifmcstat.c:1.14 src/usr.sbin/ifmcstat/ifmcstat.c:1.15
--- src/usr.sbin/ifmcstat/ifmcstat.c:1.14	Fri May 30 02:28:07 2014
+++ src/usr.sbin/ifmcstat/ifmcstat.c	Fri May 30 02:31:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifmcstat.c,v 1.14 2014/05/30 02:28:07 joerg Exp $	*/
+/*	$NetBSD: ifmcstat.c,v 1.15 2014/05/30 02:31:40 joerg Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -59,14 +59,13 @@ struct	nlist nl[] = {
 	{ , 0, 0, 0, 0 },
 };
 
-const char *inet6_n2a __P((struct in6_addr *));
-int main __P((void));
-char *ifname __P((struct ifnet *));
-void kread __P((u_long, void *, int));
-void acmc __P((struct ether_multi *));
-void if6_addrlist __P((struct ifaddr *));
-void in6_multilist __P((struct in6_multi *));
-struct in6_multi * in6_multientry __P((struct in6_multi *));
+static const char *inet6_n2a(struct in6_addr *);
+static char *ifname(struct ifnet *);
+static void kread(u_long, void *, int);
+static void acmc(struct ether_multi *);
+static void if6_addrlist(struct ifaddr *);
+static void in6_multilist(struct in6_multi *);
+static struct in6_multi * in6_multientry(struct in6_multi *);
 
 #define	KREAD(addr, buf, type) \
 	kread((u_long)addr, (void *)buf, sizeof(type))
@@ -77,8 +76,8 @@ struct multi6_kludge {
 	struct in6_multihead mk_head;
 };
 
-const char *inet6_n2a(p)
-	struct in6_addr *p;
+static const char *
+inet6_n2a(struct in6_addr *p)
 {
 	static char buf[NI_MAXHOST];
 	struct sockaddr_in6 sin6;
@@ -97,7 +96,8 @@ const char *inet6_n2a(p)
 		return (invalid);
 }
 
-int main()
+int
+main(void)
 {
 	char	buf[_POSIX2_LINE_MAX], ifnam[IFNAMSIZ];
 	struct	ifnet	*ifp, *nifp, ifnet;
@@ -149,8 +149,8 @@ int main()
 	/*NOTREACHED*/
 }
 
-char *ifname(ifp)
-	struct ifnet *ifp;
+static char *
+ifname(struct ifnet *ifp)
 {
 	static char buf[BUFSIZ];
 	struct ifnet ifnet;
@@ -160,10 +160,8 @@ char *ifname(ifp)
 	return buf;
 }
 
-void kread(addr, buf, len)
-	u_long addr;
-	void *buf;
-	int len;
+static void
+kread(u_long addr, void *buf, int len)
 {
 	if (kvm_read(kvmd, addr, buf, len) != len) {
 		perror(kvm_read);
@@ -171,8 +169,8 @@ void kread(addr, buf, len)
 	}
 }
 
-void acmc(am)
-	struct ether_multi *am;
+static void
+acmc(struct ether_multi *am)
 {
 	struct ether_multi em;
 
@@ -187,9 +185,8 @@ void acmc(am)
 	}
 }
 
-void
-if6_addrlist(ifap)
-	struct ifaddr *ifap;
+static void
+if6_addrlist(struct ifaddr *ifap)
 {
 	struct ifaddr ifa;
 	struct sockaddr sa;
@@ -236,9 +233,8 @@ if6_addrlist(ifap)
 	}
 }
 
-struct in6_multi *
-in6_multientry(mc)
-	struct in6_multi *mc;
+static struct in6_multi *
+in6_multientry(struct in6_multi *mc)
 {
 	struct in6_multi multi;
 
@@ -248,9 +244,8 @@ in6_multientry(mc)
 	return(multi.in6m_entry.le_next);
 }
 
-void
-in6_multilist(mc)
-	struct in6_multi *mc;
+static void
+in6_multilist(struct in6_multi *mc)
 {
 	while (mc)
 		mc = in6_multientry(mc);



CVS commit: src/sys/dev/pci

2014-05-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 30 03:01:58 UTC 2014

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

Log Message:
Add Intel 3200 Host and PCIe.


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

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1191 src/sys/dev/pci/pcidevs:1.1192
--- src/sys/dev/pci/pcidevs:1.1191	Wed May 28 13:59:06 2014
+++ src/sys/dev/pci/pcidevs	Fri May 30 03:01:58 2014
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1191 2014/05/28 13:59:06 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1192 2014/05/30 03:01:58 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3323,6 +3323,8 @@ product INTEL 82Q33_IGD_1	0x29d3  82Q35 
 product INTEL 82Q33_KT		0x29d7  82Q33 KT
 product INTEL 82X38_HB		0x29e0	82X38 Host Bridge
 product INTEL 82X38_KT		0x29e7  82X38 KT
+product INTEL 3200_HB		0x29f0	3200/3210 Host
+product INTEL 3200_PCIE		0x29f1	3200/3210 PCIE
 product INTEL 3200_KT		0x29f7  3200 KT
 product INTEL 82965PM_HB	0x2a00  82965PM Host Bridge
 product INTEL 80862A01		0x2a01  80862A01 Mobile PCI Express Root Port



CVS commit: src/sys/dev/pci

2014-05-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 30 03:42:38 UTC 2014

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

Log Message:
- Add PCI-X capability stuff.
- remove extra ':' in pci_conf_print_pcie_cap()
- Add comments.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/pcireg.h

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.121 src/sys/dev/pci/pci_subr.c:1.122
--- src/sys/dev/pci/pci_subr.c:1.121	Tue May 27 16:50:31 2014
+++ src/sys/dev/pci/pci_subr.c	Fri May 30 03:42:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.121 2014/05/27 16:50:31 msaitoh Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.122 2014/05/30 03:42:38 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.121 2014/05/27 16:50:31 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.122 2014/05/30 03:42:38 msaitoh Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pci.h
@@ -1117,7 +1117,109 @@ pci_conf_print_msi_cap(const pcireg_t *r
 }
 
 /* XXX pci_conf_print_cpci_hostwap_cap */
-/* XXX pci_conf_print_pcix_cap */
+
+/*
+ * For both command register and status register.
+ * The argument idx is index number (0 to 7).
+ */
+static int
+pcix_split_trans(unsigned int idx)
+{
+	static int table[8] = {
+		1, 2, 3, 4, 8, 12, 16, 32
+	};
+
+	if (idx = __arraycount(table))
+		return -1;
+	return table[idx];
+}
+
+static void
+pci_conf_print_pcix_cap(const pcireg_t *regs, int capoff)
+{
+	pcireg_t reg;
+	int isbridge;
+	int i;
+
+	isbridge = (PCI_HDRTYPE_TYPE(regs[o2i(PCI_BHLC_REG)])
+	 PCI_HDRTYPE_PPB) != 0 ? 1 : 0;
+	printf(\n  PCI-X %s Capabilities Register\n,
+	isbridge ? Bridge : Non-bridge);
+
+	reg = regs[o2i(capoff)];
+	if (isbridge != 0) {
+		printf(Secondary status register: 0x%04x\n,
+		(reg  0x)  16);
+		onoff(64bit device, reg, PCIX_STATUS_64BIT);
+		onoff(133MHz capable, reg, PCIX_STATUS_133);
+		onoff(Split completion discarded, reg, PCIX_STATUS_SPLDISC);
+		onoff(Unexpected split completion, reg, PCIX_STATUS_SPLUNEX);
+		onoff(Split completion overrun, reg, PCIX_BRIDGE_ST_SPLOVRN);
+		onoff(Split request delayed, reg, PCIX_BRIDGE_ST_SPLRQDL);
+		printf(  Secondary clock frequency: 0x%x\n,
+		(reg  PCIX_BRIDGE_2NDST_CLKF)
+		 PCIX_BRIDGE_2NDST_CLKF_SHIFT);
+		printf(  Version: 0x%x\n,
+		(reg  PCIX_BRIDGE_2NDST_VER_MASK)
+		 PCIX_BRIDGE_2NDST_VER_SHIFT);
+		onoff(266MHz capable, reg, PCIX_BRIDGE_ST_266);
+		onoff(533MHz capable, reg, PCIX_BRIDGE_ST_533);
+	} else {
+		printf(Command register: 0x%04x\n,
+		(reg  0x)  16);
+		onoff(Data Parity Error Recovery, reg,
+		PCIX_CMD_PERR_RECOVER);
+		onoff(Enable Relaxed Ordering, reg, PCIX_CMD_RELAXED_ORDER);
+		printf(  Maximum Burst Read Count: %u\n,
+		PCIX_CMD_BYTECNT(reg));
+		printf(  Maximum Split Transactions: %d\n,
+		pcix_split_trans((reg  PCIX_CMD_SPLTRANS_MASK)
+			 PCIX_CMD_SPLTRANS_SHIFT));
+	}
+	reg = regs[o2i(capoff+PCIX_STATUS)]; /* Or PCIX_BRIDGE_PRI_STATUS */
+	printf(%sStatus register: 0x%08x\n,
+	isbridge ? Bridge  : , reg);
+	printf(  Function: %d\n, PCIX_STATUS_FN(reg));
+	printf(  Device: %d\n, PCIX_STATUS_DEV(reg));
+	printf(  Bus: %d\n, PCIX_STATUS_BUS(reg));
+	onoff(64bit device, reg, PCIX_STATUS_64BIT);
+	onoff(133MHz capable, reg, PCIX_STATUS_133);
+	onoff(Split completion discarded, reg, PCIX_STATUS_SPLDISC);
+	onoff(Unexpected split completion, reg, PCIX_STATUS_SPLUNEX);
+	if (isbridge != 0) {
+		onoff(Split completion overrun, reg, PCIX_BRIDGE_ST_SPLOVRN);
+		onoff(Split request delayed, reg, PCIX_BRIDGE_ST_SPLRQDL);
+	} else {
+		onoff2(Device Complexity, reg, PCIX_STATUS_DEVCPLX,
+		bridge device, simple device);
+		printf(  Designed max memory read byte count: %d\n,
+		512  ((reg  PCIX_STATUS_MAXB_MASK)
+			 PCIX_STATUS_MAXB_SHIFT));
+		printf(  Designed max outstanding split transaction: %d\n,
+		pcix_split_trans((reg  PCIX_STATUS_MAXST_MASK)
+			 PCIX_STATUS_MAXST_SHIFT));
+		printf(  MAX cumulative Read Size: %u\n,
+		8  ((reg  0x1c00)  PCIX_STATUS_MAXRS_SHIFT));
+		onoff(Received split completion error, reg,
+		PCIX_STATUS_SCERR);
+	}
+	onoff(266MHz capable, reg, PCIX_STATUS_266);
+	onoff(533MHz capable, reg, PCIX_STATUS_533);
+
+	if (isbridge == 0)
+		return;
+
+	/* Only for bridge */
+	for (i = 0; i  2; i++) {
+		reg = regs[o2i(capoff+PCIX_BRIDGE_UP_STCR + (4 * i))];
+		printf(%s split transaction control register: 0x%08x\n,
+		(i == 0) ? Upstream : Downstream, reg);
+		printf(  Capacity: %d\n, reg  PCIX_BRIDGE_STCAP);
+		printf(  Commitment Limit: %d\n,
+		(reg  PCIX_BRIDGE_STCLIM)  PCIX_BRIDGE_STCLIM_SHIFT);
+	

CVS commit: src/sys/dev/pci

2014-05-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 30 05:04:21 UTC 2014

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

Log Message:
- Remove some obsoleted comments.
- KNF.


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

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.122 src/sys/dev/pci/pci_subr.c:1.123
--- src/sys/dev/pci/pci_subr.c:1.122	Fri May 30 03:42:38 2014
+++ src/sys/dev/pci/pci_subr.c	Fri May 30 05:04:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.122 2014/05/30 03:42:38 msaitoh Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.123 2014/05/30 05:04:21 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.122 2014/05/30 03:42:38 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.123 2014/05/30 05:04:21 msaitoh Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pci.h
@@ -1221,7 +1221,6 @@ pci_conf_print_pcix_cap(const pcireg_t *
 }
 
 /* XXX pci_conf_print_ldt_cap */
-/* XXX pci_conf_print_vendspec_cap */
 
 static void
 pci_conf_print_vendspec_cap(const pcireg_t *regs, int capoff)
@@ -1552,7 +1551,7 @@ pci_conf_print_pcie_cap(const pcireg_t *
 			(unsigned int)(reg  PCIE_LCSR_LINKSPEED)  16);
 		} else {
 			printf(%sGT/s\n,
-			linkspeeds[((reg  PCIE_LCSR_LINKSPEED)  16) - 1]);
+			linkspeeds[((reg  PCIE_LCSR_LINKSPEED)  16)-1]);
 		}
 		printf(  Negotiated Link Width: x%u lanes\n,
 		(reg  20)  0x003f);
@@ -1864,7 +1863,8 @@ pci_conf_print_caplist(
 			break;
 		case PCI_CAP_PWRMGMT:
 			printf(Power Management, rev. %s,
-			pci_conf_print_pcipm_cap_pmrev((rval  0)  0x07));
+			pci_conf_print_pcipm_cap_pmrev(
+(rval  0)  0x07));
 			pcipm_off = off;
 			break;
 		case PCI_CAP_AGP:
@@ -2089,9 +2089,6 @@ pci_conf_print_type1(
 	int use_upper;
 
 	/*
-	 * XXX these need to be printed in more detail, need to be
-	 * XXX checked against specs/docs, etc.
-	 *
 	 * This layout was cribbed from the TI PCI2030 PCI-to-PCI
 	 * Bridge chip documentation, and may not be correct with
 	 * respect to various standards. (XXX)
@@ -2378,7 +2375,8 @@ pci_conf_print(
 	int off, capoff, endoff, hdrtype;
 	const char *typename;
 #ifdef _KERNEL
-	void (*typeprintfn)(pci_chipset_tag_t, pcitag_t, const pcireg_t *, int);
+	void (*typeprintfn)(pci_chipset_tag_t, pcitag_t, const pcireg_t *,
+	int);
 	int sizebars;
 #else
 	void (*typeprintfn)(const pcireg_t *);



CVS commit: src/share/misc

2014-05-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 30 05:37:04 UTC 2014

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

Log Message:
Add 6.0.[45] and 6.1.[34]


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

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

Modified files:

Index: src/share/misc/bsd-family-tree
diff -u src/share/misc/bsd-family-tree:1.54 src/share/misc/bsd-family-tree:1.55
--- src/share/misc/bsd-family-tree:1.54	Mon Sep 30 03:48:51 2013
+++ src/share/misc/bsd-family-tree	Fri May 30 05:37:04 2014
@@ -275,12 +275,20 @@ FreeBSD 5.2   |  |  
  | |  |  | |6.0.2  |   |
  | |  |  | |  ||   |
  | |  |  | |  NetBSD 6.0.3 |   |
+ | |  |  | |  ||   |
+ | |  |  | |  NetBSD 6.0.4 |   |
+ | |  |  | |  ||   |
+ | |  |  | |  NetBSD 6.0.5 |   |
  | |  |  | |   |   |
  | |  |  |  `-NetBSD 6.1   |   |
  |  FreeBSD   |  | |   |   |
  |8.4 |  |NetBSD 6.1.1 |   |
  ||  | |   |   |
  ||  |NetBSD 6.1.2 |   |
+ ||  | |   |   |
+ ||  |NetBSD 6.1.3 |   |
+ ||  | |   |   |
+ ||  |NetBSD 6.1.4 |   |
  ||  | |   |
 FreeBSD 10 -current   |  NetBSD -current  OpenBSD -current |
  ||  | |   |
@@ -594,6 +602,10 @@ NetBSD 5.1.3		2013-09-29 [NBD]
 NetBSD 5.2.1		2013-09-29 [NBD]
 NetBSD 6.0.3		2013-09-30 [NBD]
 NetBSD 6.1.2		2013-09-30 [NBD]
+NetBSD 6.0.4		2014-01-25 [NBD]
+NetBSD 6.1.3		2014-01-25 [NBD]
+NetBSD 6.0.5		2014-04-12 [NBD]
+NetBSD 6.1.4		2014-04-12 [NBD]
 
 Bibliography