CVS commit: [netbsd-6] src

2013-10-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Oct 20 13:28:20 UTC 2013

Modified Files:
src/share/man/man4/man4.x86 [netbsd-6]: vmt.4
src/sys/arch/x86/x86 [netbsd-6]: vmt.c

Log Message:
Pull up following revision(s) (requested by pettai in ticket #965):
sys/arch/x86/x86/vmt.c: revision 1.8
share/man/man4/man4.x86/vmt.4: revision 1.4
Synchronize the clock periodically in vmt(4).
Add periodic clock synchronization to vmt(4) so that the guest clock
remains synchronized even when the host is suspended (which is a very
typical situation in a laptop).
Do this by default once per minute, but provide a sysctl to tune this
value (machdep.vmt0.clock_sync.period).
Sent to tech-kern@ for review and addressed a couple of issues.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.4.1 src/share/man/man4/man4.x86/vmt.4
cvs rdiff -u -r1.7 -r1.7.8.1 src/sys/arch/x86/x86/vmt.c

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

Modified files:

Index: src/share/man/man4/man4.x86/vmt.4
diff -u src/share/man/man4/man4.x86/vmt.4:1.3 src/share/man/man4/man4.x86/vmt.4:1.3.4.1
--- src/share/man/man4/man4.x86/vmt.4:1.3	Tue Oct 18 14:25:06 2011
+++ src/share/man/man4/man4.x86/vmt.4	Sun Oct 20 13:28:20 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: vmt.4,v 1.3 2011/10/18 14:25:06 wiz Exp $
+.\	$NetBSD: vmt.4,v 1.3.4.1 2013/10/20 13:28:20 bouyer Exp $
 .\	$OpenBSD: vmt.4,v 1.4 2010/10/26 05:07:31 jmc Exp $
 .\
 .\ Copyright (c) 2008 Marco Peereboom ma...@openbsd.org
@@ -15,7 +15,7 @@
 .\ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 .\ ACTION OF CONTRACT, NEGLIGENCE OR TORTIOUS ACTION, ARISING OUT OF
 .\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.Dd October 18, 2011
+.Dd March 16, 2013
 .Dt VMT 4 x86
 .Os
 .Sh NAME
@@ -44,6 +44,25 @@ host.
 .Pp
 .Nm
 reports the guest's hostname and first non-loopback IP address to the host.
+.Ss Clock synchronization
+The
+.Nm
+driver synchronizes the virtual machine's clock with the host clock in the
+following situations:
+.Bl -bullet
+.It
+When the virtual machine resumes after having been suspended.
+.It
+Periodically with the interval indicated by the
+.Va machdep.vmt0.clock_sync.period
+.Xr sysctl 8
+variable.
+This is done so that the virtual machine can keep its clock synchronized
+when the host is suspended, because in this case the
+.Nm
+driver receives no notification of such an event.
+Setting this tunable to zero disables clock synchronization.
+.El
 .Sh SEE ALSO
 .\ .Xr cpu 4 ,
 .Xr powerd 8

Index: src/sys/arch/x86/x86/vmt.c
diff -u src/sys/arch/x86/x86/vmt.c:1.7 src/sys/arch/x86/x86/vmt.c:1.7.8.1
--- src/sys/arch/x86/x86/vmt.c:1.7	Fri Oct 21 10:10:28 2011
+++ src/sys/arch/x86/x86/vmt.c	Sun Oct 20 13:28:20 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: vmt.c,v 1.7 2011/10/21 10:10:28 jmcneill Exp $ */
+/* $NetBSD: vmt.c,v 1.7.8.1 2013/10/20 13:28:20 bouyer Exp $ */
 /* $OpenBSD: vmt.c,v 1.11 2011/01/27 21:29:25 dtucker Exp $ */
 
 /*
@@ -36,6 +36,7 @@
 #include sys/socket.h
 #include sys/timetc.h
 #include sys/module.h
+#include sys/sysctl.h
 
 #include net/if.h
 #include netinet/in.h
@@ -182,6 +183,7 @@ struct vmt_event {
 struct vmt_softc {
 	device_t		sc_dev;
 
+	struct sysctllog	*sc_log;
 	struct vm_rpc		sc_tclo_rpc;
 	bool			sc_tclo_rpc_open;
 	char			*sc_rpc_buf;
@@ -193,6 +195,10 @@ struct vmt_softc {
 	struct callout		sc_tick;
 	struct callout		sc_tclo_tick;
 
+#define VMT_CLOCK_SYNC_PERIOD_SECONDS 60
+	int			sc_clock_sync_period_seconds;
+	struct callout		sc_clock_sync_tick;
+
 	struct vmt_event	sc_ev_power;
 	struct vmt_event	sc_ev_reset;
 	struct vmt_event	sc_ev_sleep;
@@ -204,6 +210,10 @@ struct vmt_softc {
 CFATTACH_DECL_NEW(vmt, sizeof(struct vmt_softc),
 	vmt_match, vmt_attach, vmt_detach, NULL);
 
+static int vmt_sysctl_setup_root(device_t);
+static int vmt_sysctl_setup_clock_sync(device_t, const struct sysctlnode *);
+static int vmt_sysctl_update_clock_sync_period(SYSCTLFN_PROTO);
+
 static void vm_cmd(struct vm_backdoor *);
 static void vm_ins(struct vm_backdoor *);
 static void vm_outs(struct vm_backdoor *);
@@ -230,6 +240,7 @@ static void vmt_sync_guest_clock(struct 
 
 static void vmt_tick(void *);
 static void vmt_tclo_tick(void *);
+static void vmt_clock_sync_tick(void *);
 static bool vmt_shutdown(device_t, int);
 static void vmt_pswitch_event(void *);
 
@@ -294,14 +305,27 @@ vmt_type(void)
 static void
 vmt_attach(device_t parent, device_t self, void *aux)
 {
+	int rv;
 	struct vmt_softc *sc = device_private(self);
 
 	aprint_naive(\n);
 	aprint_normal(: %s\n, vmt_type());
 
 	sc-sc_dev = self;
+	sc-sc_log = NULL;
+
 	callout_init(sc-sc_tick, 0);
 	callout_init(sc-sc_tclo_tick, 0);
+	callout_init(sc-sc_clock_sync_tick, 0);
+
+	sc-sc_clock_sync_period_seconds = VMT_CLOCK_SYNC_PERIOD_SECONDS;
+
+	rv = vmt_sysctl_setup_root(self);
+	if (rv != 0) {
+		aprint_error_dev(self, failed to initialize sysctl 
+		(err %d)\n, 

CVS commit: [netbsd-6] src/sys/netinet

2013-10-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Oct 20 13:29:37 UTC 2013

Modified Files:
src/sys/netinet [netbsd-6]: tcp_usrreq.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #967):
sys/netinet/tcp_usrreq.c: revision 1.168
PR/48098: Brian Marcotte: Avoid kernel assertion for embryonic sockets that
don't have credentials yet.
XXX: pullup-6


To generate a diff of this commit:
cvs rdiff -u -r1.162.2.1 -r1.162.2.2 src/sys/netinet/tcp_usrreq.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_usrreq.c
diff -u src/sys/netinet/tcp_usrreq.c:1.162.2.1 src/sys/netinet/tcp_usrreq.c:1.162.2.2
--- src/sys/netinet/tcp_usrreq.c:1.162.2.1	Sat Mar 17 19:51:45 2012
+++ src/sys/netinet/tcp_usrreq.c	Sun Oct 20 13:29:37 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_usrreq.c,v 1.162.2.1 2012/03/17 19:51:45 bouyer Exp $	*/
+/*	$NetBSD: tcp_usrreq.c,v 1.162.2.2 2013/10/20 13:29:37 bouyer Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -95,7 +95,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_usrreq.c,v 1.162.2.1 2012/03/17 19:51:45 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_usrreq.c,v 1.162.2.2 2013/10/20 13:29:37 bouyer Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1168,18 +1168,20 @@ sysctl_net_inet_ip_ports(SYSCTLFN_ARGS)
 static inline int
 copyout_uid(struct socket *sockp, void *oldp, size_t *oldlenp)
 {
-	size_t sz;
-	int error;
-	uid_t uid;
-
-	uid = kauth_cred_geteuid(sockp-so_cred);
 	if (oldp) {
+		size_t sz;
+		uid_t uid;
+		int error;
+
+		if (sockp-so_cred == NULL)
+			return EPERM;
+
+		uid = kauth_cred_geteuid(sockp-so_cred);
 		sz = MIN(sizeof(uid), *oldlenp);
-		error = copyout(uid, oldp, sz);
-		if (error)
+		if ((error = copyout(uid, oldp, sz)) != 0)
 			return error;
 	}
-	*oldlenp = sizeof(uid);
+	*oldlenp = sizeof(uid_t);
 	return 0;
 }
 



CVS commit: [netbsd-6] src/usr.bin/systat

2013-10-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Oct 20 13:32:45 UTC 2013

Modified Files:
src/usr.bin/systat [netbsd-6]: keyboard.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #968):
usr.bin/systat/keyboard.c: revision 1.25
No David, '\?' is not the del character.  Broken in rev 1.21.
XXX pullup-5, pullup-6.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.28.1 src/usr.bin/systat/keyboard.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/systat/keyboard.c
diff -u src/usr.bin/systat/keyboard.c:1.24 src/usr.bin/systat/keyboard.c:1.24.28.1
--- src/usr.bin/systat/keyboard.c:1.24	Mon Dec 31 00:22:14 2007
+++ src/usr.bin/systat/keyboard.c	Sun Oct 20 13:32:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: keyboard.c,v 1.24 2007/12/31 00:22:14 christos Exp $	*/
+/*	$NetBSD: keyboard.c,v 1.24.28.1 2013/10/20 13:32:45 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)keyboard.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: keyboard.c,v 1.24 2007/12/31 00:22:14 christos Exp $);
+__RCSID($NetBSD: keyboard.c,v 1.24.28.1 2013/10/20 13:32:45 bouyer Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -121,7 +121,7 @@ keyboard(void)
 }
 continue;
 			}
-			if (ch == '\b' || ch == '\?' || ch == erasechar()) {
+			if (ch == '\b' || ch == '\177' || ch == erasechar()) {
 if (col  0)
 	col--;
 goto doerase;



CVS commit: [netbsd-6] src/sys/dev/i2c

2013-10-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Oct 20 13:36:43 UTC 2013

Modified Files:
src/sys/dev/i2c [netbsd-6]: w83795g.c

Log Message:
apply patch, requested by simonb in ticket #970:
sys/dev/i2c/w83795g.c   patch

Make this driver compile on the netbsd-6 branch (fix ticket #929).


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/dev/i2c/w83795g.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/i2c/w83795g.c
diff -u src/sys/dev/i2c/w83795g.c:1.1.2.2 src/sys/dev/i2c/w83795g.c:1.1.2.3
--- src/sys/dev/i2c/w83795g.c:1.1.2.2	Sat Aug 10 22:50:56 2013
+++ src/sys/dev/i2c/w83795g.c	Sun Oct 20 13:36:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: w83795g.c,v 1.1.2.2 2013/08/10 22:50:56 riz Exp $	*/
+/*	$NetBSD: w83795g.c,v 1.1.2.3 2013/10/20 13:36:43 bouyer Exp $	*/
 
 /*
  * Copyright (c) 2013 Soren S. Jorvang.  All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: w83795g.c,v 1.1.2.2 2013/08/10 22:50:56 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: w83795g.c,v 1.1.2.3 2013/10/20 13:36:43 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -231,7 +231,6 @@ w83795g_attach(device_t parent, device_t
 		sc-sc_sensors[i].units = sensors[i].type;
 		sc-sc_sensors[i].state = ENVSYS_SINVALID;
 		sc-sc_sensors[i].flags = ENVSYS_FMONLIMITS;
-		sc-sc_sensors[i].flags |= ENVSYS_FHAS_ENTROPY;
 		sc-sc_sensors[i].private = i;
 		sysmon_envsys_sensor_attach(sc-sc_sme, sc-sc_sensors[i]);
 	}



CVS commit: [netbsd-6] src/external/mit/xorg/server/drivers/xf86-video-intel

2013-10-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Oct 20 13:40:00 UTC 2013

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-intel [netbsd-6]:
Makefile

Log Message:
Pull up following revision(s) (requested by martin in ticket #971):
external/mit/xorg/server/drivers/xf86-video-intel/Makefile: revision 
1.11
Add missing i810_dri.c file to SRCS.
PR xsrc/48315.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 \
src/external/mit/xorg/server/drivers/xf86-video-intel/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/server/drivers/xf86-video-intel/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.10 src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.10.4.1
--- src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.10	Thu Aug 11 23:15:40 2011
+++ src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile	Sun Oct 20 13:40:00 2013
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.10 2011/08/11 23:15:40 joerg Exp $
+#	$NetBSD: Makefile,v 1.10.4.1 2013/10/20 13:40:00 bouyer Exp $
 
 DRIVER=		xf86-video-intel
 DRIVER_NAME=	intel_drv
 
 SRCS=		drmmode_display.c i810_accel.c i810_cursor.c i810_dga.c
-SRCS+=		i810_driver.c i810_io.c i810_memory.c i810_video.c
+SRCS+=		i810_dri.c i810_driver.c i810_io.c i810_memory.c i810_video.c
 SRCS+=		i810_wmark.c i830_3d.c i830_accel.c i830_bios.c
 SRCS+=		i830_batchbuffer.c i830_crt.c i830_cursor.c i830_debug.c
 SRCS+=		i830_display.c i830_quirks.c i830_driver.c i830_dvo.c



CVS commit: [netbsd-6] src/distrib/utils/sysinst

2013-10-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Oct 20 13:43:17 UTC 2013

Modified Files:
src/distrib/utils/sysinst [netbsd-6]: mbr.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #972):
distrib/utils/sysinst/mbr.c: revision 1.92
Fix another botch of my dumb patch in PR/45990; add missing braces.
The offset of MBR partition 0 was unintentionally set to 2048 even on
small (=128GB) disks.  Probably we should rethink the threshold,
but anyway sysinst(8) should follow fdisk(8) default.
http://nxr.NetBSD.org/xref/src/sbin/fdisk/fdisk.c?r=1.145#1199
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sbin/fdisk/fdisk.c#rev1.129
The problem is pointed out and analyzed by Simon Nicolussi in PR/48304.
Should be pulled up to all netbsd-6* branches.


To generate a diff of this commit:
cvs rdiff -u -r1.89.2.2 -r1.89.2.3 src/distrib/utils/sysinst/mbr.c

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

Modified files:

Index: src/distrib/utils/sysinst/mbr.c
diff -u src/distrib/utils/sysinst/mbr.c:1.89.2.2 src/distrib/utils/sysinst/mbr.c:1.89.2.3
--- src/distrib/utils/sysinst/mbr.c:1.89.2.2	Tue Jun 12 19:19:20 2012
+++ src/distrib/utils/sysinst/mbr.c	Sun Oct 20 13:43:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.89.2.2 2012/06/12 19:19:20 riz Exp $ */
+/*	$NetBSD: mbr.c,v 1.89.2.3 2013/10/20 13:43:17 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1890,8 +1890,9 @@ get_ptn_alignment(struct mbr_partition *
 		}
 	} else {
 		/* Use 1MB offset for large (128GB) disks */
-		if (dlsize  2048 * 1024 * 128)
+		if (dlsize  2048 * 1024 * 128) {
 			ptn_alignment = 2048;
 			ptn_0_offset = 2048;
+		}
 	}
 }



CVS commit: [netbsd-6] src/sys/arch/hp700/hp700

2013-10-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Oct 20 13:45:46 UTC 2013

Modified Files:
src/sys/arch/hp700/hp700 [netbsd-6]: autoconf.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #973):
sys/arch/hp700/hp700/autoconf.c: revision 1.51
Remember to unmap pagezero once we've finished with it. Found by gcc 4.8.


To generate a diff of this commit:
cvs rdiff -u -r1.44.2.1 -r1.44.2.2 src/sys/arch/hp700/hp700/autoconf.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/hp700/hp700/autoconf.c
diff -u src/sys/arch/hp700/hp700/autoconf.c:1.44.2.1 src/sys/arch/hp700/hp700/autoconf.c:1.44.2.2
--- src/sys/arch/hp700/hp700/autoconf.c:1.44.2.1	Wed Aug  8 15:51:10 2012
+++ src/sys/arch/hp700/hp700/autoconf.c	Sun Oct 20 13:45:46 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.44.2.1 2012/08/08 15:51:10 martin Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.44.2.2 2013/10/20 13:45:46 bouyer Exp $	*/
 
 /*	$OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $	*/
 
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.44.2.1 2012/08/08 15:51:10 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.44.2.2 2013/10/20 13:45:46 bouyer Exp $);
 
 #include opt_kgdb.h
 #include opt_useleds.h
@@ -474,6 +474,8 @@ cpu_rootconf(void)
 	}
 	printf(dp_flags 0x%x pz_class 0x%x\n, PAGE0-mem_boot.pz_dp.dp_flags,
 	PAGE0-mem_boot.pz_class);
+
+	hp700_pagezero_unmap(pagezero_cookie);
 #endif /* DEBUG */
 
 	if (boot_device != NULL)



CVS commit: [netbsd-6] src/doc

2013-10-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Oct 20 13:48:56 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Tickets 956, 957, 958, 961, 962, 963, 964, 965, 967, 968, 970, 971, 972, 973.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.54 -r1.1.2.55 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.54 src/doc/CHANGES-6.2:1.1.2.55
--- src/doc/CHANGES-6.2:1.1.2.54	Sat Oct 12 18:59:58 2013
+++ src/doc/CHANGES-6.2	Sun Oct 20 13:48:56 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.54 2013/10/12 18:59:58 jdc Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.55 2013/10/20 13:48:56 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -820,3 +820,118 @@ xsrc/xfree/xc/programs/Xserver/dix/dixfo
 	references *c.
 	[spz, ticket #966]
 
+sys/dev/usb/if_aue.c1.131
+
+	Change one aprint_error_dev(9) to aprint_debug_dev(9) to avoid console
+	spam.
+	[tsutsui, ticket #956]
+
+sys/arch/i386/stand/lib/vbe.c   1.8
+ 
+	The 'vesa' command can take 'list' flag so mention it
+	in an error message.
+	[tsutsui, ticket #957]  
+
+sys/arch/hp300/hp300/pmap_bootstrap.c		1.58
+
+	Fix a build error on a kernel config without 68040 machines.
+	[tsutsui, ticket #958]
+
+external/ibm-public/postfix/dist/HISTORY			patch
+external/ibm-public/postfix/dist/RELEASE_NOTES			patch
+external/ibm-public/postfix/dist/src/global/mail_version.h	patch
+external/ibm-public/postfix/dist/src/local/forward.c		patch
+external/ibm-public/postfix/dist/src/tls/tls_client.c		patch
+external/ibm-public/postfix/dist/src/tls/tls_server.c		patch
+
+	Update postfix to version 2.8.16:
+	- TLS Interoperability workaround: turn on SHA-2 digests by
+	  force. This improves interoperability with clients and servers that
+	  deploy SHA-2 digests without the required support for TLSv1.2-style
+	  digest negotiation.
+	- TLS Performance workaround: the Postfix SMTP server TLS session
+	  cache had become ineffective because recent OpenSSL versions enable
+	  session tickets by default, resulting in a different ticket
+	  encryption key for each smtpd(8) process. The workaround turns off
+	  session tickets. Postfix 2.11 will enable session tickets properly.
+	- TLS Interoperability workaround: Debian Exim versions before 4.80-3
+	  may fail to communicate with Postfix and possibly other MTAs, with
+	  the following Exim SMTP client error message:
+	  TLS error on connection to server-name [server-address]
+	  (gnutls_handshake):
+	 
+		The Diffie-Hellman prime sent by the server is not acceptable
+		(not long  enough)
+
+	  See the RELEASE_NOTES file for a Postfix SMTP server configuration
+	  workaround.
+	- Bugfix (defect introduced: 1997): memory leak while forwarding mail
+	  with the local(8) delivery agent, in code that handles a cleanup(8)
+	  server error.  
+	[tron, ticket #961]
+
+gnu/dist/texinfo/util/texi2dvi			1.10
+
+	Remove trailing whitespace in texi2dvi which confuses sed.
+	[riastradh, ticket #962]
+
+sys/arch/x86/pci/pci_machdep.c			1.61 via patch
+
+	Force PCI mode 1 when running under QEMU, to work around
+	QEMU bug 897771.
+	This should also make it possible to boot NetBSD under versions of KVM
+	that have inherited said QEMU bug.  Fixes PR kern/45671.
+	[gson, ticket #963]
+
+usr.sbin/eeprom/eehandlers.c			1.16
+
+	PR/47528: Izumi Tsutsui: eeprom(8) dumps core after 64 bit time_t
+	changes
+	[dholland, ticket #964]
+
+share/man/man4/man4.x86/vmt.4			1.4
+sys/arch/x86/x86/vmt.c1.8
+
+	Add periodic clock synchronization to vmt(4) so that the guest clock
+	remains synchronized even when the host is suspended (which is a very
+	typical situation in a laptop).
+
+	Do this by default once per minute, but provide a sysctl to tune this
+	value (machdep.vmt0.clock_sync.period).
+
+	[pettai, ticket #965]
+
+sys/netinet/tcp_usrreq.c			1.168
+
+	PR/48098: Brian Marcotte: Avoid kernel assertion for embryonic sockets
+	that don't have credentials yet.
+	[spz, ticket #967]
+
+usr.bin/systat/keyboard.c   1.25
+ 
+	Fix typo that made '?' an erase char instead of DEL as intended.
+	[dholland, ticket #968] 
+
+sys/dev/i2c/w83795g.cpatch
+
+	Make this driver compile on the netbsd-6 branch (fix ticket #929).
+	[simonb, ticket #970]
+
+external/mit/xorg/server/drivers/xf86-video-intel/Makefile 1.11
+
+	Add missing i810_dri.c file to SRCS.
+	PR xsrc/48315.
+	[martin, ticket #971]
+
+distrib/utils/sysinst/mbr.c			1.92
+
+	Add missing braces, which caused the offset of MBR partition 0 to be
+	unintentionally set to 2048 even on small (=128GB) disks.
+	PR/48304.
+	[tsutsui, ticket #972]
+
+sys/arch/hp700/hp700/autoconf.c			1.51
+
+	Remember to unmap pagezero once we've finished with it.
+	[skrll, ticket #973]
+



CVS commit: [netbsd-6] src/doc

2013-10-12 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Oct 12 18:59:58 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket #966.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.53 -r1.1.2.54 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.53 src/doc/CHANGES-6.2:1.1.2.54
--- src/doc/CHANGES-6.2:1.1.2.53	Thu Sep 26 14:20:16 2013
+++ src/doc/CHANGES-6.2	Sat Oct 12 18:59:58 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.53 2013/09/26 14:20:16 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.54 2013/10/12 18:59:58 jdc Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -809,3 +809,14 @@ lib/libcurses/setterm.c1.51
 	among others)
 	[dsainty, ticket #960]
 
+xsrc/external/mit/xorg-server/dist/dix/dixfonts.c	1.2
+xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c		1.4
+
+	Fix CVE-2013-4396 using a patch from Alan Coopersmith:
+	Save a pointer to the passed in closure structure before copying it
+	and overwriting the *c pointer to point to our copy instead of the
+	original.  If we hit an error, once we free(c), reset c to point to
+	the original structure before jumping to the cleanup code that
+	references *c.
+	[spz, ticket #966]
+



CVS commit: [netbsd-6] src/doc

2013-09-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Sep 26 14:20:16 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 960


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.52 -r1.1.2.53 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.52 src/doc/CHANGES-6.2:1.1.2.53
--- src/doc/CHANGES-6.2:1.1.2.52	Thu Sep 26 02:03:32 2013
+++ src/doc/CHANGES-6.2	Thu Sep 26 14:20:16 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.52 2013/09/26 02:03:32 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.53 2013/09/26 14:20:16 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -802,3 +802,10 @@ lib/libpthread/pthread.c			1.137
 	Return errno, not just -1, from pthread_create().
 	[riastradh, ticket #959]
 
+lib/libcurses/setterm.c1.51
+
+	Fix a crash in curses for terminals defining exit_attribute_mode but
+	not exit_alt_charset_mode. (Examples include vt131 and xterm-5,
+	among others)
+	[dsainty, ticket #960]
+



CVS commit: [netbsd-6] src/lib/libcurses

2013-09-26 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Sep 26 14:20:03 UTC 2013

Modified Files:
src/lib/libcurses [netbsd-6]: setterm.c

Log Message:
Pull up following revision(s) (requested by dsainty in ticket #960):
lib/libcurses/setterm.c: revision 1.51
Fix a NULL dereference if the exit_alt_charset_mode capability is not
defined.
The previous version of this file changed a terminal initialisation test on
the exit_attribute_mode capability, checking for the exit_alt_charset_mode
capability as a substring, rather than performing a search for the
hard-coded
^O character.
That works better on terminals where ^O is not the correct value for
exit_alt_charset_mode.  But it works worse on terminals that don't have a
definition specified for exit_alt_charset_mode.
For example:
% TERMCAP='xterm:me=\E[m:' TERM=xterm vi
segmentation fault (core dumped)  TERMCAP='xterm:me=\E[m:' TERM=xterm vi
The crash can be avoided (without fixing the bug) by defining
exit_alt_charset_mode:
% TERMCAP='xterm|:me=\E[m:ae=:' TERM=xterm vi
ex/vi: Error: xterm: No such process
We now test exit_alt_charset_mode for NULL before continuing with the fatal
test, restoring the original no-crash behaviour.
XXX does_ctrl_o() is now just a naive reimplementation of strstr(), so
should
probably just use strstr() instead.


To generate a diff of this commit:
cvs rdiff -u -r1.48.4.1 -r1.48.4.2 src/lib/libcurses/setterm.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/libcurses/setterm.c
diff -u src/lib/libcurses/setterm.c:1.48.4.1 src/lib/libcurses/setterm.c:1.48.4.2
--- src/lib/libcurses/setterm.c:1.48.4.1	Sat May 11 21:48:23 2013
+++ src/lib/libcurses/setterm.c	Thu Sep 26 14:20:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: setterm.c,v 1.48.4.1 2013/05/11 21:48:23 riz Exp $	*/
+/*	$NetBSD: setterm.c,v 1.48.4.2 2013/09/26 14:20:03 riz Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)setterm.c	8.8 (Berkeley) 10/25/94;
 #else
-__RCSID($NetBSD: setterm.c,v 1.48.4.1 2013/05/11 21:48:23 riz Exp $);
+__RCSID($NetBSD: setterm.c,v 1.48.4.2 2013/09/26 14:20:03 riz Exp $);
 #endif
 #endif /* not lint */
 
@@ -172,6 +172,7 @@ _cursesi_setterm(char *type, SCREEN *scr
 	 * It might turn off ACS, so check for that.
 	 */
 	if (t_exit_attribute_mode(screen-term) != NULL 
+	t_exit_alt_charset_mode(screen-term) != NULL 
 	does_ctrl_o(t_exit_attribute_mode(screen-term),
 	t_exit_alt_charset_mode(screen-term)))
 		screen-mask_me = 0;



CVS commit: [netbsd-6] src/sys/dev/usb

2013-09-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Sep 26 01:51:47 UTC 2013

Modified Files:
src/sys/dev/usb [netbsd-6]: ehci.c uhci.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #950):
sys/dev/usb/uhci.c: revision 1.255
sys/dev/usb/uhci.c: revision 1.256
sys/dev/usb/ehci.c: revision 1.205
sys/dev/usb/uhci.c: revision 1.258
Add missed byteswap ops for BE machines in block added in rev 1.223.
Call usb_syncmem() against descriptors more strictly.
(not sure if the previous ones were fatal though)
Deal with control transfers better by
- removing the UHCI_PTR_VF flag for the setup and status stages
  which means they are scheduled less aggressively.  Some devices
  appear to require this (blymn@ has one).  The flag was
  introduced as a performance improvement for bulk transfers.
- Checking for short reads and making sure the status stage runs
  if they're encountered.
PR/47522 Enumeration of LUFA/Atmel devices on UHCI fails
Thanks to jak@ and blymn@ for testing and mlelstv@ for comments.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.183.2.1 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.242 -r1.242.2.1 src/sys/dev/usb/uhci.c

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

Modified files:

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.183 src/sys/dev/usb/ehci.c:1.183.2.1
--- src/sys/dev/usb/ehci.c:1.183	Fri Dec 23 00:51:43 2011
+++ src/sys/dev/usb/ehci.c	Thu Sep 26 01:51:47 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.183 2011/12/23 00:51:43 jakllsch Exp $ */
+/*	$NetBSD: ehci.c,v 1.183.2.1 2013/09/26 01:51:47 riz Exp $ */
 
 /*
  * Copyright (c) 2004-2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.183 2011/12/23 00:51:43 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.183.2.1 2013/09/26 01:51:47 riz Exp $);
 
 #include ohci.h
 #include uhci.h
@@ -763,7 +763,11 @@ ehci_check_qh_intr(ehci_softc_t *sc, str
 	lsqtd-offs + offsetof(ehci_qtd_t, qtd_status),
 	sizeof(lsqtd-qtd.qtd_status),
 	BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
-	if (le32toh(lsqtd-qtd.qtd_status)  EHCI_QTD_ACTIVE) {
+	status = le32toh(lsqtd-qtd.qtd_status);
+	usb_syncmem(lsqtd-dma,
+	lsqtd-offs + offsetof(ehci_qtd_t, qtd_status),
+	sizeof(lsqtd-qtd.qtd_status), BUS_DMASYNC_PREREAD);
+	if (status  EHCI_QTD_ACTIVE) {
 		DPRINTFN(12, (ehci_check_intr: active ex=%p\n, ex));
 		for (sqtd = ex-sqtdstart; sqtd != lsqtd; sqtd=sqtd-nextqtd) {
 			usb_syncmem(sqtd-dma,
@@ -786,9 +790,6 @@ ehci_check_qh_intr(ehci_softc_t *sc, str
 		}
 		DPRINTFN(12, (ehci_check_intr: ex=%p std=%p still active\n,
 			  ex, ex-sqtdstart));
-		usb_syncmem(lsqtd-dma,
-		lsqtd-offs + offsetof(ehci_qtd_t, qtd_status),
-		sizeof(lsqtd-qtd.qtd_status), BUS_DMASYNC_PREREAD);
 		return;
 	}
  done:

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.242 src/sys/dev/usb/uhci.c:1.242.2.1
--- src/sys/dev/usb/uhci.c:1.242	Fri Dec 23 00:51:46 2011
+++ src/sys/dev/usb/uhci.c	Thu Sep 26 01:51:47 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.242 2011/12/23 00:51:46 jakllsch Exp $	*/
+/*	$NetBSD: uhci.c,v 1.242.2.1 2013/09/26 01:51:47 riz Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $	*/
 
 /*
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.242 2011/12/23 00:51:46 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.242.2.1 2013/09/26 01:51:47 riz Exp $);
 
 #include opt_usb.h
 
@@ -1102,6 +1102,7 @@ void
 uhci_remove_hs_ctrl(uhci_softc_t *sc, uhci_soft_qh_t *sqh)
 {
 	uhci_soft_qh_t *pqh;
+	uint32_t elink;
 
 	SPLUSBCHECK;
 
@@ -1125,7 +1126,10 @@ uhci_remove_hs_ctrl(uhci_softc_t *sc, uh
 	usb_syncmem(sqh-dma, sqh-offs + offsetof(uhci_qh_t, qh_elink),
 	sizeof(sqh-qh.qh_elink),
 	BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
-	if (!(sqh-qh.qh_elink  htole32(UHCI_PTR_T))) {
+	elink = le32toh(sqh-qh.qh_elink);
+	usb_syncmem(sqh-dma, sqh-offs + offsetof(uhci_qh_t, qh_elink),
+	sizeof(sqh-qh.qh_elink), BUS_DMASYNC_PREREAD);
+	if (!(elink  UHCI_PTR_T)) {
 		sqh-qh.qh_elink = htole32(UHCI_PTR_T);
 		usb_syncmem(sqh-dma,
 		sqh-offs + offsetof(uhci_qh_t, qh_elink),
@@ -1175,6 +1179,7 @@ void
 uhci_remove_ls_ctrl(uhci_softc_t *sc, uhci_soft_qh_t *sqh)
 {
 	uhci_soft_qh_t *pqh;
+	uint32_t elink;
 
 	SPLUSBCHECK;
 
@@ -1183,7 +1188,10 @@ uhci_remove_ls_ctrl(uhci_softc_t *sc, uh
 	usb_syncmem(sqh-dma, sqh-offs + offsetof(uhci_qh_t, qh_elink),
 	sizeof(sqh-qh.qh_elink),
 	BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
-	if (!(sqh-qh.qh_elink  htole32(UHCI_PTR_T))) {
+	elink = le32toh(sqh-qh.qh_elink);
+	usb_syncmem(sqh-dma, sqh-offs + offsetof(uhci_qh_t, qh_elink),
+	sizeof(sqh-qh.qh_elink), BUS_DMASYNC_PREREAD);
+	if (!(elink  UHCI_PTR_T)) {
 		

CVS commit: [netbsd-6] src/doc

2013-09-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Sep 26 01:55:13 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 950.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.50 src/doc/CHANGES-6.2:1.1.2.51
--- src/doc/CHANGES-6.2:1.1.2.50	Sun Sep 22 20:30:55 2013
+++ src/doc/CHANGES-6.2	Thu Sep 26 01:55:13 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.50 2013/09/22 20:30:55 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.51 2013/09/26 01:55:13 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -773,3 +773,27 @@ sys/arch/mvme68k/mvme68k/pmap_bootstrap.
 	Addresses mvme68k-specific part of PR#45915.
 	[tsutsui, ticket #953]
 
+sys/arch/mvme68k/include/prom.h			1.18
+sys/arch/mvme68k/stand/Makefile.booters		1.24
+sys/arch/mvme68k/stand/libbug/outln.c		1.4
+sys/arch/mvme68k/stand/libbug/outstr.c		1.4
+sys/arch/mvme68k/stand/libsa/Makefile		1.34
+sys/arch/mvme68k/stand/libsa/Makefile.inc	1.6
+
+	Fixed a bootloader problem and gcc 4.5 problem on mvme68k.
+	[tsutsui, ticket #954]
+
+sys/arch/mvmeppc/stand/Makefile.booters		1.13
+sys/arch/mvmeppc/stand/libsa/Makefile		1.11
+sys/arch/mvmeppc/stand/libsa/Makefile.inc	1.2
+
+	Fix the mvmeppc bootloader.
+	[tsutsui, ticket #955]
+
+sys/dev/usb/ehci.c1.205
+sys/dev/usb/uhci.c1.255,1.256,1.258
+
+	USB fixes: missed byteswap ops for big-endian machines,
+	fix device enumeration in some edge cases.  PR#47522, PR#48237
+	[skrll, ticket #950]
+



CVS commit: [netbsd-6] src/doc

2013-09-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Sep 26 02:03:32 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
TIcket 959


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.51 src/doc/CHANGES-6.2:1.1.2.52
--- src/doc/CHANGES-6.2:1.1.2.51	Thu Sep 26 01:55:13 2013
+++ src/doc/CHANGES-6.2	Thu Sep 26 02:03:32 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.51 2013/09/26 01:55:13 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.52 2013/09/26 02:03:32 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -797,3 +797,8 @@ sys/dev/usb/uhci.c1.255,1.256,1.258
 	fix device enumeration in some edge cases.  PR#47522, PR#48237
 	[skrll, ticket #950]
 
+lib/libpthread/pthread.c			1.137
+
+	Return errno, not just -1, from pthread_create().
+	[riastradh, ticket #959]
+



CVS commit: [netbsd-6] src/lib/libpthread

2013-09-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Sep 26 02:03:09 UTC 2013

Modified Files:
src/lib/libpthread [netbsd-6]: pthread.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #959):
lib/libpthread/pthread.c: revision 1.137
return errno if pthread_create hits the system limit, not just -1
(this is not entirely correct because it can return ENOMEM which is
not mentioned in the spec, but there are other places in pthread_create
whete ENOMEM is returned -- it at all, this should be fixed everywhere)


To generate a diff of this commit:
cvs rdiff -u -r1.125.4.3 -r1.125.4.4 src/lib/libpthread/pthread.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/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.125.4.3 src/lib/libpthread/pthread.c:1.125.4.4
--- src/lib/libpthread/pthread.c:1.125.4.3	Mon Apr 29 01:50:19 2013
+++ src/lib/libpthread/pthread.c	Thu Sep 26 02:03:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread.c,v 1.125.4.3 2013/04/29 01:50:19 riz Exp $	*/
+/*	$NetBSD: pthread.c,v 1.125.4.4 2013/09/26 02:03:09 riz Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread.c,v 1.125.4.3 2013/04/29 01:50:19 riz Exp $);
+__RCSID($NetBSD: pthread.c,v 1.125.4.4 2013/09/26 02:03:09 riz Exp $);
 
 #define	__EXPOSE_STACK	1
 
@@ -443,6 +443,7 @@ pthread_create(pthread_t *thread, const 
 		flag |= LWP_SUSPENDED;
 	ret = _lwp_create(newthread-pt_uc, flag, newthread-pt_lid);
 	if (ret != 0) {
+		ret = errno;
 		pthread_mutex_lock(newthread-pt_lock);
 		/* Will unlock and free name. */
 		pthread__reap(newthread);



CVS commit: [netbsd-6] src/sys/arch/mvmeppc/stand

2013-09-23 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Sep 23 14:28:13 UTC 2013

Modified Files:
src/sys/arch/mvmeppc/stand [netbsd-6]: Makefile.booters
src/sys/arch/mvmeppc/stand/libsa [netbsd-6]: Makefile Makefile.inc

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #955):
sys/arch/mvmeppc/stand/libsa/Makefile.inc: revision 1.2
sys/arch/mvmeppc/stand/Makefile.booters: revision 1.13
sys/arch/mvmeppc/stand/libsa/Makefile: revision 1.11
Explicitly link srt0.o (Standalone RunTime startup code) first.
Taken from the similar fix of mvme68k:
http://mail-index.netbsd.org/source-changes/2013/09/21/msg047819.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The original changes to switch to using MI libsa is:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016563.html
Should be pulled up to netbsd-6 branches.
(though untested since there seems no users of mvmeppc)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.10.1 src/sys/arch/mvmeppc/stand/Makefile.booters
cvs rdiff -u -r1.10 -r1.10.14.1 src/sys/arch/mvmeppc/stand/libsa/Makefile
cvs rdiff -u -r1.1 -r1.1.16.1 src/sys/arch/mvmeppc/stand/libsa/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/sys/arch/mvmeppc/stand/Makefile.booters
diff -u src/sys/arch/mvmeppc/stand/Makefile.booters:1.12 src/sys/arch/mvmeppc/stand/Makefile.booters:1.12.10.1
--- src/sys/arch/mvmeppc/stand/Makefile.booters:1.12	Sat Jan 22 19:19:20 2011
+++ src/sys/arch/mvmeppc/stand/Makefile.booters	Mon Sep 23 14:28:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.booters,v 1.12 2011/01/22 19:19:20 joerg Exp $
+#	$NetBSD: Makefile.booters,v 1.12.10.1 2013/09/23 14:28:13 riz Exp $
 
 S?=		${.CURDIR}/../../../..
 MDEC_DIR?=	/usr/mdec
@@ -56,6 +56,8 @@ LIBSA_DIR!=	cd ${LIB_SA_DIR}  ${PRINTO
 LIBSA=		${LIBSA_DIR}/lib/sa/libsa.a
 LIBKERN=	${LIBSA_DIR}/lib/kern/libkern.a
 
+SRTOBJ?= ${LIBSA_DIR}/srt0.o
+
 #WRTVID_BOOT_DIR=  ${.CURDIR}/../wrtvid
 #WRTVID_DIR!=	cd ${WRTVID_BOOT_DIR}  ${PRINTOBJDIR}
 #WRTVID=${WRTVID_DIR}/wrtvid

Index: src/sys/arch/mvmeppc/stand/libsa/Makefile
diff -u src/sys/arch/mvmeppc/stand/libsa/Makefile:1.10 src/sys/arch/mvmeppc/stand/libsa/Makefile:1.10.14.1
--- src/sys/arch/mvmeppc/stand/libsa/Makefile:1.10	Sun Jan  2 09:40:52 2011
+++ src/sys/arch/mvmeppc/stand/libsa/Makefile	Mon Sep 23 14:28:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2011/01/02 09:40:52 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.10.14.1 2013/09/23 14:28:13 riz Exp $
 
 S!= cd ${.CURDIR}/../../../..; pwd
 
@@ -32,7 +32,9 @@ LIBKERN= ${KERNLIB}
 
 LIBS= ${LIBSA} ${LIBKERN}
 
-all realall: ${LIBS}
+CLEANFILES+=	srt0.o
+
+all realall: ${LIBS} srt0.o
 
 cleandir distclean: .WAIT cleanlibdir
  

Index: src/sys/arch/mvmeppc/stand/libsa/Makefile.inc
diff -u src/sys/arch/mvmeppc/stand/libsa/Makefile.inc:1.1 src/sys/arch/mvmeppc/stand/libsa/Makefile.inc:1.1.16.1
--- src/sys/arch/mvmeppc/stand/libsa/Makefile.inc:1.1	Sun Jan  2 09:40:52 2011
+++ src/sys/arch/mvmeppc/stand/libsa/Makefile.inc	Mon Sep 23 14:28:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.1 2011/01/02 09:40:52 tsutsui Exp $
+#	$NetBSD: Makefile.inc,v 1.1.16.1 2013/09/23 14:28:13 riz Exp $
 
 S!= cd ${SA_EXTRADIR}/../../../..; pwd
 
@@ -7,7 +7,7 @@ S!= cd ${SA_EXTRADIR}/../../../..; pwd
 
 SRC_sa= dev_net.c
 
-SRC_here= srt0.S bugsyscalls.S exec_mvme.c parse_args.c getchar.c putchar.c
+SRC_here= bugsyscalls.S exec_mvme.c parse_args.c getchar.c putchar.c
 SRC_here+= if_bug.c clock.c
 
 SRCS+= ${SRC_sa} ${SRC_here}



CVS commit: [netbsd-6] src/sys/net/npf

2013-09-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Sep 22 17:29:05 UTC 2013

Modified Files:
src/sys/net/npf [netbsd-6]: npf_ctl.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #952):
sys/net/npf/npf_ctl.c: revision 1.27
npfctl_rule: fixes for the dynamic rules.


To generate a diff of this commit:
cvs rdiff -u -r1.12.2.9 -r1.12.2.10 src/sys/net/npf/npf_ctl.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/npf/npf_ctl.c
diff -u src/sys/net/npf/npf_ctl.c:1.12.2.9 src/sys/net/npf/npf_ctl.c:1.12.2.10
--- src/sys/net/npf/npf_ctl.c:1.12.2.9	Mon Feb 18 18:26:14 2013
+++ src/sys/net/npf/npf_ctl.c	Sun Sep 22 17:29:05 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_ctl.c,v 1.12.2.9 2013/02/18 18:26:14 riz Exp $	*/
+/*	$NetBSD: npf_ctl.c,v 1.12.2.10 2013/09/22 17:29:05 riz Exp $	*/
 
 /*-
  * Copyright (c) 2009-2013 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_ctl.c,v 1.12.2.9 2013/02/18 18:26:14 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_ctl.c,v 1.12.2.10 2013/09/22 17:29:05 riz Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -244,7 +244,7 @@ npf_mk_code(prop_object_t obj, int type,
 		}
 		break;
 	case NPF_CODE_BPF:
-		if (!bpf_validate(cptr, clen)) {
+		if (!bpf_validate(cptr, clen / sizeof(struct bpf_insn))) {
 			return EINVAL;
 		}
 		break;
@@ -550,14 +550,16 @@ npfctl_rule(u_long cmd, void *data)
 	prop_dictionary_get_uint32(npf_rule, command, rcmd);
 	if (!prop_dictionary_get_cstring_nocopy(npf_rule,
 	ruleset-name, ruleset_name)) {
-		return EINVAL;
+		error = EINVAL;
+		goto out;
 	}
 
 	if (rcmd == NPF_CMD_RULE_ADD) {
-		if ((rl = npf_rule_alloc(npf_rule)) == NULL) {
-			return EINVAL;
-		}
 		retdict = prop_dictionary_create();
+		if (npf_mk_singlerule(npf_rule, NULL, rl, retdict) != 0) {
+			error = EINVAL;
+			goto out;
+		}
 	}
 
 	npf_config_enter();
@@ -618,6 +620,7 @@ npfctl_rule(u_long cmd, void *data)
 	if (rl) {
 		npf_rule_free(rl);
 	}
+out:
 	if (retdict) {
 		prop_object_release(npf_rule);
 		prop_dictionary_copyout_ioctl(pref, cmd, retdict);



CVS commit: [netbsd-6] src/doc

2013-09-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Sep 22 17:29:34 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 952


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.47 -r1.1.2.48 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.47 src/doc/CHANGES-6.2:1.1.2.48
--- src/doc/CHANGES-6.2:1.1.2.47	Sat Sep 21 16:40:20 2013
+++ src/doc/CHANGES-6.2	Sun Sep 22 17:29:34 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.47 2013/09/21 16:40:20 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.48 2013/09/22 17:29:34 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -759,3 +759,8 @@ usr.bin/flock/flock.11.9
 	flock(1) really appeared first in NetBSD 6.1
 	[khorben, ticket #951]
 
+sys/net/npf/npf_ctl.c1.27
+
+	npfctl_rule: fix filtering of dynamic rules.
+	[rmind, ticket #952]
+



CVS commit: [netbsd-6] src/sys/arch/mvme68k/mvme68k

2013-09-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Sep 22 17:33:31 UTC 2013

Modified Files:
src/sys/arch/mvme68k/mvme68k [netbsd-6]: pmap_bootstrap.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #953):
sys/arch/mvme68k/mvme68k/pmap_bootstrap.c: revision 1.52
Move physmem calculations before nptpage initialization.
Fixes mvme68k specific part of PR port-m68k/45915
(panic: pmap_enter_ptpage: can't get KPT page).
Reported and confirmed by Andrew Gillham on his MVME177:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg82.html
Should be pulled up to all netbsd-6 branches.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.51.2.1 src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.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/mvme68k/mvme68k/pmap_bootstrap.c
diff -u src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c:1.51 src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c:1.51.2.1
--- src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c:1.51	Fri Feb 10 06:28:39 2012
+++ src/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c	Sun Sep 22 17:33:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.51 2012/02/10 06:28:39 mhitch Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.51.2.1 2013/09/22 17:33:31 riz Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.51 2012/02/10 06:28:39 mhitch Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.51.2.1 2013/09/22 17:33:31 riz Exp $);
 
 #include opt_m68k_arch.h
 
@@ -100,6 +100,42 @@ pmap_bootstrap(paddr_t nextpa, paddr_t f
 #endif
 
 	/*
+	 * Initialize the mem_clusters[] array for the crash dump
+	 * code.  While we're at it, compute the total amount of
+	 * physical memory in the system.
+	 */
+	for (i = 0; i  VM_PHYSSEG_MAX; i++) {
+		if (RELOC(phys_seg_list[i].ps_start, paddr_t) ==
+		RELOC(phys_seg_list[i].ps_end, paddr_t)) {
+			/*
+			 * No more memory.
+			 */
+			break;
+		}
+
+		/*
+		 * Make sure these are properly rounded.
+		 */
+		RELOC(phys_seg_list[i].ps_start, paddr_t) =
+		m68k_round_page(RELOC(phys_seg_list[i].ps_start,
+	  paddr_t));
+		RELOC(phys_seg_list[i].ps_end, paddr_t) =
+		m68k_trunc_page(RELOC(phys_seg_list[i].ps_end,
+	  paddr_t));
+
+		size = RELOC(phys_seg_list[i].ps_end, paddr_t) -
+		RELOC(phys_seg_list[i].ps_start, paddr_t);
+
+		RELOC(mem_clusters[i].start, u_quad_t) =
+		RELOC(phys_seg_list[i].ps_start, paddr_t);
+		RELOC(mem_clusters[i].size, u_quad_t) = size;
+
+		RELOC(physmem, int) += size  PGSHIFT;
+
+		RELOC(mem_cluster_cnt, int) += 1;
+	}
+
+	/*
 	 * Calculate important physical addresses:
 	 *
 	 *	lwp0upa		lwp0 u-area		UPAGES pages
@@ -409,42 +445,6 @@ pmap_bootstrap(paddr_t nextpa, paddr_t f
 	RELOC(lwp0uarea, vaddr_t) = lwp0upa - firstpa;
 
 	/*
-	 * Initialize the mem_clusters[] array for the crash dump
-	 * code.  While we're at it, compute the total amount of
-	 * physical memory in the system.
-	 */
-	for (i = 0; i  VM_PHYSSEG_MAX; i++) {
-		if (RELOC(phys_seg_list[i].ps_start, paddr_t) ==
-		RELOC(phys_seg_list[i].ps_end, paddr_t)) {
-			/*
-			 * No more memory.
-			 */
-			break;
-		}
-
-		/*
-		 * Make sure these are properly rounded.
-		 */
-		RELOC(phys_seg_list[i].ps_start, paddr_t) =
-		m68k_round_page(RELOC(phys_seg_list[i].ps_start,
-	  paddr_t));
-		RELOC(phys_seg_list[i].ps_end, paddr_t) =
-		m68k_trunc_page(RELOC(phys_seg_list[i].ps_end,
-	  paddr_t));
-
-		size = RELOC(phys_seg_list[i].ps_end, paddr_t) -
-		RELOC(phys_seg_list[i].ps_start, paddr_t);
-
-		RELOC(mem_clusters[i].start, u_quad_t) =
-		RELOC(phys_seg_list[i].ps_start, paddr_t);
-		RELOC(mem_clusters[i].size, u_quad_t) = size;
-
-		RELOC(physmem, int) += size  PGSHIFT;
-
-		RELOC(mem_cluster_cnt, int) += 1;
-	}
-
-	/*
 	 * Scoot the start of available on-board RAM forward to
 	 * account for:
 	 *



CVS commit: [netbsd-6] src/doc

2013-09-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Sep 22 17:34:22 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 953


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.48 src/doc/CHANGES-6.2:1.1.2.49
--- src/doc/CHANGES-6.2:1.1.2.48	Sun Sep 22 17:29:34 2013
+++ src/doc/CHANGES-6.2	Sun Sep 22 17:34:22 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.48 2013/09/22 17:29:34 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.49 2013/09/22 17:34:22 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -764,3 +764,9 @@ sys/net/npf/npf_ctl.c1.27
 	npfctl_rule: fix filtering of dynamic rules.
 	[rmind, ticket #952]
 
+sys/arch/mvme68k/mvme68k/pmap_bootstrap.c	1.52
+
+	Fix panic: pmap_enter_ptpage: can't get KPT page.
+	Addresses mvme68k-specific part of PR#45915.
+	[tsutsui, ticket #953]
+



CVS commit: [netbsd-6] src/doc

2013-09-22 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Sep 22 20:30:55 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Add missing newline.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.49 src/doc/CHANGES-6.2:1.1.2.50
--- src/doc/CHANGES-6.2:1.1.2.49	Sun Sep 22 17:34:22 2013
+++ src/doc/CHANGES-6.2	Sun Sep 22 20:30:55 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.49 2013/09/22 17:34:22 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.50 2013/09/22 20:30:55 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -497,6 +497,7 @@ sys/dev/pci/if_bgereg.h1.57
 	Add support for BCM57762 and BCM57765, found in Apple's Thunderbolt
 	to Gigabit Ethernet adapter.  PR kern/46961
 	[tsutsui, ticket #652]
+
 sys/fs/udf/udf_allocation.c			1.34
 
 	Fix 32 bit issue in main file read-in function. On both 32 bit and
@@ -694,6 +695,7 @@ sys/net/npf/npf_inet.c1.23
 	- npf_cache_all: clear NBUF_DATAREF_RESET since npf_cache_ip() handles
 	  it.
 	[riz, ticket #942]
+
 lib/libc/stdlib/_env.c1.8
 
 	Don't scrub the environment unless we are going to change it.
@@ -715,6 +717,7 @@ sys/netinet6/in6.c1.167 via patch
 	Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from
 	FreeBSD.
 	[spz, ticket #944]
+
 xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c	patch
 xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c	patch
 



CVS commit: [netbsd-6] src/usr.bin/flock

2013-09-21 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Sep 21 16:39:58 UTC 2013

Modified Files:
src/usr.bin/flock [netbsd-6]: flock.1

Log Message:
Pull up following revision(s) (requested by khorben in ticket #951):
usr.bin/flock/flock.1: revision 1.9
flock(1) really appeared first in NetBSD 6.1


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.2 -r1.8.4.3 src/usr.bin/flock/flock.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.bin/flock/flock.1
diff -u src/usr.bin/flock/flock.1:1.8.4.2 src/usr.bin/flock/flock.1:1.8.4.3
--- src/usr.bin/flock/flock.1:1.8.4.2	Wed Nov 28 21:34:36 2012
+++ src/usr.bin/flock/flock.1	Sat Sep 21 16:39:58 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: flock.1,v 1.8.4.2 2012/11/28 21:34:36 riz Exp $
+.\	$NetBSD: flock.1,v 1.8.4.3 2013/09/21 16:39:58 riz Exp $
 .\
 .\ Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -97,4 +97,4 @@ Obtain an exclusive lock.
 An
 .Nm
 utility appeared in
-.Nx 7.0 .
+.Nx 6.1 .



CVS commit: [netbsd-6] src/doc

2013-09-21 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Sep 21 16:40:20 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 951


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.46 -r1.1.2.47 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.46 src/doc/CHANGES-6.2:1.1.2.47
--- src/doc/CHANGES-6.2:1.1.2.46	Sat Sep 21 02:56:13 2013
+++ src/doc/CHANGES-6.2	Sat Sep 21 16:40:20 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.46 2013/09/21 02:56:13 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.47 2013/09/21 16:40:20 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -754,3 +754,8 @@ share/zoneinfo/australasia			1.33
 	This year Fiji will start DST on October 27, not October 20.
 	[apb, ticket #949]
 
+usr.bin/flock/flock.11.9
+
+	flock(1) really appeared first in NetBSD 6.1
+	[khorben, ticket #951]
+



CVS commit: [netbsd-6] src/sbin/raidctl

2013-09-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Sep 20 14:13:21 UTC 2013

Modified Files:
src/sbin/raidctl [netbsd-6]: raidctl.8

Log Message:
Pull up following revision(s) (requested by tron in ticket #948):
sbin/raidctl/raidctl.8: revision 1.65
Note that NetBSD/amd64 can boot off RAID volumes.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.63.4.1 src/sbin/raidctl/raidctl.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/raidctl/raidctl.8
diff -u src/sbin/raidctl/raidctl.8:1.63 src/sbin/raidctl/raidctl.8:1.63.4.1
--- src/sbin/raidctl/raidctl.8:1.63	Tue Aug  2 10:28:00 2011
+++ src/sbin/raidctl/raidctl.8	Fri Sep 20 14:13:21 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: raidctl.8,v 1.63 2011/08/02 10:28:00 wiz Exp $
+.\ $NetBSD: raidctl.8,v 1.63.4.1 2013/09/20 14:13:21 riz Exp $
 .\
 .\ Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -173,7 +173,7 @@ All components of the set must be of typ
 .Dv RAID
 in the disklabel.
 Note that only certain architectures
-.Pq currently alpha, i386, pmax, sparc, sparc64, and vax
+.Pq currently alpha, amd64, i386, pmax, sparc, sparc64, and vax
 support booting a kernel directly from a RAID set.
 .It Fl B Ar dev
 Initiate a copyback of reconstructed data from a spare disk to



CVS commit: [netbsd-6] src/doc

2013-09-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Sep 20 14:13:48 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 948


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.44 -r1.1.2.45 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.44 src/doc/CHANGES-6.2:1.1.2.45
--- src/doc/CHANGES-6.2:1.1.2.44	Fri Sep 20 03:49:23 2013
+++ src/doc/CHANGES-6.2	Fri Sep 20 14:13:48 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.44 2013/09/20 03:49:23 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.45 2013/09/20 14:13:48 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -743,3 +743,8 @@ sys/dev/pci/piixpmreg.h1.6
 	Expose iic busses.  (Needed for ticket #929)
 	[fair, ticket #936]
 
+sbin/raidctl/raidctl.81.65
+
+	Note that NetBSD/amd64 can boot off RAID volumes.
+	[tron, ticket #948]
+



CVS commit: [netbsd-6] src/doc

2013-09-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Sep 21 02:56:13 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 949


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.45 -r1.1.2.46 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.45 src/doc/CHANGES-6.2:1.1.2.46
--- src/doc/CHANGES-6.2:1.1.2.45	Fri Sep 20 14:13:48 2013
+++ src/doc/CHANGES-6.2	Sat Sep 21 02:56:13 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.45 2013/09/20 14:13:48 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.46 2013/09/21 02:56:13 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -748,3 +748,9 @@ sbin/raidctl/raidctl.81.65
 	Note that NetBSD/amd64 can boot off RAID volumes.
 	[tron, ticket #948]
 
+share/zoneinfo/australasia			1.33
+
+	Merge the Fiji-related change from tzdata2013e.
+	This year Fiji will start DST on October 27, not October 20.
+	[apb, ticket #949]
+



CVS commit: [netbsd-6] src/share/zoneinfo

2013-09-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Sep 21 02:55:59 UTC 2013

Modified Files:
src/share/zoneinfo [netbsd-6]: australasia

Log Message:
Pull up following revision(s) (requested by apb in ticket #949):
share/zoneinfo/australasia: revision 1.33
Merge the Fiji-related change from tzdata2013e.
This is the only urgent change in tzdata2013e.
 This year Fiji will start DST on October 27, not October 20.
 (Thanks to David Wheeler for the heads-up.)  For now, guess that
 Fiji will continue to spring forward the Sunday before the fourth
 Monday in October.


To generate a diff of this commit:
cvs rdiff -u -r1.23.4.9 -r1.23.4.10 src/share/zoneinfo/australasia

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

Modified files:

Index: src/share/zoneinfo/australasia
diff -u src/share/zoneinfo/australasia:1.23.4.9 src/share/zoneinfo/australasia:1.23.4.10
--- src/share/zoneinfo/australasia:1.23.4.9	Mon Jul 29 20:21:08 2013
+++ src/share/zoneinfo/australasia	Sat Sep 21 02:55:59 2013
@@ -352,16 +352,25 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st
 # October 2012 and end at 3 am on Sunday 20th January 2013.
 # http://www.fiji.gov.fj/index.php?option=com_contentview=articleid=6702catid=71Itemid=155
-#
-# From Paul Eggert (2012-08-31):
-# For now, guess a pattern of the penultimate Sundays in October and January.
+
+# From the Fijian Government Media Center (2013-08-30) via David Wheeler:
+# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am
+# on Sunday 19th January, 2014  move clocks forward by one hour from 2am
+# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx
+#
+# From Paul Eggert (2013-09-09):
+# For now, guess that Fiji springs forward the Sunday before the fourth
+# Monday in October.  This matches both recent practice and
+# timeanddate.com's current spring-forward prediction.
+# For the January 2014 transition we guessed right while timeanddate.com
+# guessed wrong, so leave the fall-back prediction alone.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
 Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
-Rule	Fiji	2010	max	-	Oct	Sun=18	2:00	1:00	S
+Rule	Fiji	2010	max	-	Oct	Sun=21	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun=1	3:00	0	-
 Rule	Fiji	2012	max	-	Jan	Sun=18	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]



CVS commit: [netbsd-6] src/doc

2013-09-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Sep 20 03:14:37 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 947


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.42 src/doc/CHANGES-6.2:1.1.2.43
--- src/doc/CHANGES-6.2:1.1.2.42	Wed Sep 18 20:01:20 2013
+++ src/doc/CHANGES-6.2	Fri Sep 20 03:14:37 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.42 2013/09/18 20:01:20 bouyer Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.43 2013/09/20 03:14:37 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -732,3 +732,8 @@ sys/dev/ic/rtl8169.c1.138
 	(QNAP V200) and some sandpoint NAS.
 	[phx, ticket #946]
 
+etc/ssh/ssh_known_hosts1.8
+
+	Update project host keys.
+	[spz, ticket #947]
+



CVS commit: [netbsd-6] src/etc/ssh

2013-09-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Sep 20 03:14:17 UTC 2013

Modified Files:
src/etc/ssh [netbsd-6]: ssh_known_hosts

Log Message:
Pull up following revision(s) (requested by spz in ticket #947):
etc/ssh/ssh_known_hosts: revision 1.8
fix narn-names - mollari
add ecdsa keys (in many cases, pre-emptive strikes)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.6.1 src/etc/ssh/ssh_known_hosts

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

Modified files:

Index: src/etc/ssh/ssh_known_hosts
diff -u src/etc/ssh/ssh_known_hosts:1.7 src/etc/ssh/ssh_known_hosts:1.7.6.1
--- src/etc/ssh/ssh_known_hosts:1.7	Sun May  8 13:19:08 2011
+++ src/etc/ssh/ssh_known_hosts	Fri Sep 20 03:14:17 2013
@@ -1,27 +1,51 @@
-#	$NetBSD: ssh_known_hosts,v 1.7 2011/05/08 13:19:08 spz Exp $
+#	$NetBSD: ssh_known_hosts,v 1.7.6.1 2013/09/20 03:14:17 riz Exp $
 #
 anoncvs.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEA3QiBl8leG9fqIJpKeNov0PKq5YryFFiroMWOPUv4hDFn8R0jC07YVaR/OSBrr37CTmGX5AFceXPzoFnLlwCqWR7rXg4NR75FTlTp9CG9EBAEtU8mee27KDrUFBTZdfVl2+aRYoAI5fTXA+0vpIO68Cq843vRWUZCcwinS4cNLUU=
 
+anoncvs.netbsd.org ecdsa-sha2-nistp521 E2VjZHNhLXNoYTItbmlzdHA1MjEIbmlzdHA1MjEAAACFBAFhP4E9+oDpCQZ9yVQA7OzDF0tHnL3eykrqEt3hS+rdHXA0Ak5uCaxi2Aj2JRnAKW1JYbjQ5hyKHYZ2o6SfDimqaQBAt18nWm4CCKc20UbSgyWaH/x+O3J68j5n43MY8gHycPKcLHly2FjhDhuhHuoYODfq9GYn3okYsMu2T/i6Tg+SKw==
+#
 cvs.netbsd.org,cvs4.netbsd.org,cvs6.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEA1b7MS3j0v6NzPr/Snh8OJTILvGLD9OA/zdrTfzQdq3doJjkLKJhD4WYj8SonaauEKuqzdJa1KVilj44GCrJBnjwbWg2BdJWLzB5YFmNgvmXwoqrl9kRyzMVk47UOxeREIipXldKajkCTc/nwa1mGrsCwVlC+TwAhWIyjyza6MOk=
 
+cvs.netbsd.org,cvs4.netbsd.org,cvs6.netbsd.org ecdsa-sha2-nistp521 E2VjZHNhLXNoYTItbmlzdHA1MjEIbmlzdHA1MjEAAACFBAGFloNiNSqIkMFVBUglnE9AgBI6J5cLh4hej8DZEtn4InWbFD3dxIFLvw8ZA3qLpVX/TCjFt++MEO3w5GJ2L7a2zQHGIn50E5KVcHuh9arVYRhLPqs9Vfl6ANJ6WiQ81f5k/dZ6ESI8BwqOyQY22/zTujyL8FGHvlZukNsB4iie7Wl+/Q==
+#
 ftp.netbsd.org,ftp4.netbsd.org,ftp6.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEAv+tO1aHHsW1McwHgnJ28qsXn8gH8z/61yopJzmOKuHH07zBYOnhenAcni6E0+BRavSXXIuuTDdyxEyWcTqXoR0LEVShTzAFmZS3RyzTVl7A+Fp644lNnRaJh1380H+20uZjcKSPU0IudG5J7QllMbJY9RnIBFjGLzTb4vrC8GIc=
 
-mail.netbsd.org,homeworld.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEAt8UJLhW8iou8Ack7V5XrzfCgzOkdK75+xDZePMBPg+CYDLnHbP1+KQaSrvfnvDzCvgOUXHOkGji1jbrtzDYwv7Itw0hRUo7TxR99c3bTomb9U0vWV5k4FDIyz4xJXWBJMVkKseAWAXgnc5FSdB6V/e21TAISJBl9dolhqOGVsxM=
+morden.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEAv+tO1aHHsW1McwHgnJ28qsXn8gH8z/61yopJzmOKuHH07zBYOnhenAcni6E0+BRavSXXIuuTDdyxEyWcTqXoR0LEVShTzAFmZS3RyzTVl7A+Fp644lNnRaJh1380H+20uZjcKSPU0IudG5J7QllMbJY9RnIBFjGLzTb4vrC8GIc=
 
-www.netbsd.org,www4.netbsd.org,gnats.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEAyBrlCbbZ2lQxWt7c9Ru0byoOktalLWKJ4t0kzWp6C2oVa+Ll1c1TO2FJb34DCZqULfSHaMmKgq647d75npk9GeXXLk8QwcX6kNl7QFnHo7GUHnHtiZAjTMbYmYOaNLi1PjwyQH+9yeRQYsGW7xejTsyK0yuRKROdCl/QU9gkB3s=
+ftp.netbsd.org,ftp4.netbsd.org,ftp6.netbsd.org ecdsa-sha2-nistp521 E2VjZHNhLXNoYTItbmlzdHA1MjEIbmlzdHA1MjEAAACFBAFp8B5B8/cosThWLYgZp0jQGIqduvJUlra4gyCCqKLnaTn44cPltjjDWp1UHRsdVjm8ka81EYSJ95ZgD8lbPE/XZwBBmisSzTVoQT+b2x7ENPz2BOAgjxX5Lljy6Z2vpky8Gtu2nNJlFtekPbAS4wyDxHuwR5SZMEYNPTWegtBcvm460A==
 
+morden.netbsd.org ecdsa-sha2-nistp521 E2VjZHNhLXNoYTItbmlzdHA1MjEIbmlzdHA1MjEAAACFBAFp8B5B8/cosThWLYgZp0jQGIqduvJUlra4gyCCqKLnaTn44cPltjjDWp1UHRsdVjm8ka81EYSJ95ZgD8lbPE/XZwBBmisSzTVoQT+b2x7ENPz2BOAgjxX5Lljy6Z2vpky8Gtu2nNJlFtekPbAS4wyDxHuwR5SZMEYNPTWegtBcvm460A==
+#
+mail.netbsd.org,homeworld.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEAt8UJLhW8iou8Ack7V5XrzfCgzOkdK75+xDZePMBPg+CYDLnHbP1+KQaSrvfnvDzCvgOUXHOkGji1jbrtzDYwv7Itw0hRUo7TxR99c3bTomb9U0vWV5k4FDIyz4xJXWBJMVkKseAWAXgnc5FSdB6V/e21TAISJBl9dolhqOGVsxM=
+
+mail.netbsd.org,homeworld.netbsd.org ecdsa-sha2-nistp521 E2VjZHNhLXNoYTItbmlzdHA1MjEIbmlzdHA1MjEAAACFBADOK8FUImVH0iPCzfwBD9gT8AUELweTGWry8eBXFbxCDcOYW+4HRtUuY7OqP/sJ8tlYCNg9F+PjAIDqp72h6YgPcQH2/M/8ZXizAT7y7uCiysYxMKYbmuBHqVybaJd5rWUNL19JE6e3H+KBkwYQbf7Jrrs6RhDYMCguPmi6ppNEEEAAcQ==
+#
 pkgbuild.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEAz2c3dFuPdL75gpvwiYinwQ5jiRlfe3HvbXbMkTvpZxLFBQWTVkcDr/yd+vCiWcqVKVENX2tIvT91gPM9/iw7Wl82rxZ54jjaL0pWPL0yjSVhSFxff9pH+as5hgX4l1HjmXLB6v+MWyYVmOSpB01NfVVV2Z9+BGp3Y7i+U5pCdf0=
 
+pkgbuild.netbsd.org ecdsa-sha2-nistp521 E2VjZHNhLXNoYTItbmlzdHA1MjEIbmlzdHA1MjEAAACFBAE7rzIErnIESapcXZJYCMmlNlS3cbeE9zbvraS0/woWexchdhVxLOi/qkfqM5U0Zkin1ooNsUfEYmaJ1k1T+LHbzAAGwZMo/aESnTEekYgBSwhHUj1EjIWeeN/bet9HJrz9Y4WGd2MOXHL88T+cUzfHLEneYrrVe6FDbAlMpSPw4OAOAQ==
+#
 build.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEAzmmcuzoX0D/qDFdDJDyRgQGkUaNTEu7GdruMg1N+ajqvEoKQHQEEBrMdDbeYqCUYacHyhTRMrP6vZ27iX90rl9iS1lR2iPHp/mbnf+iV/BzdWROPvJWxp9/Am/DrYL+Idah5AYNnkC7fon9n+BeMqPDXYGYl/U+dAzp+8GHPhRc=
 
-blog.netbsd.org,rt.netbsd.org,monitor.netbsd.org,releng.netbsd.org,wiki.netbsd.org ssh-rsa 

CVS commit: [netbsd-6] src/doc

2013-09-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Sep 20 03:49:23 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 936.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.43 -r1.1.2.44 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.43 src/doc/CHANGES-6.2:1.1.2.44
--- src/doc/CHANGES-6.2:1.1.2.43	Fri Sep 20 03:14:37 2013
+++ src/doc/CHANGES-6.2	Fri Sep 20 03:49:23 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.43 2013/09/20 03:14:37 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.44 2013/09/20 03:49:23 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -737,3 +737,9 @@ etc/ssh/ssh_known_hosts1.8
 	Update project host keys.
 	[spz, ticket #947]
 
+sys/dev/pci/piixpm.c1.42 via patch
+sys/dev/pci/piixpmreg.h1.6
+
+	Expose iic busses.  (Needed for ticket #929)
+	[fair, ticket #936]
+



CVS commit: [netbsd-6] src/sys/dev/pci

2013-09-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Sep 20 03:49:00 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: piixpm.c piixpmreg.h

Log Message:
Pull up following revision(s) (requested by fair in ticket #936):
sys/dev/pci/piixpmreg.h: revision 1.6
sys/dev/pci/piixpm.c: revision 1.42
The SB800 SMBus controller has four selectable SDA lines.
Expose them as four iic busses.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.40.2.1 src/sys/dev/pci/piixpm.c
cvs rdiff -u -r1.5 -r1.5.10.1 src/sys/dev/pci/piixpmreg.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/piixpm.c
diff -u src/sys/dev/pci/piixpm.c:1.40 src/sys/dev/pci/piixpm.c:1.40.2.1
--- src/sys/dev/pci/piixpm.c:1.40	Tue Feb 14 15:08:07 2012
+++ src/sys/dev/pci/piixpm.c	Fri Sep 20 03:49:00 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: piixpm.c,v 1.40 2012/02/14 15:08:07 pgoyette Exp $ */
+/* $NetBSD: piixpm.c,v 1.40.2.1 2013/09/20 03:49:00 riz Exp $ */
 /*	$OpenBSD: piixpm.c,v 1.20 2006/02/27 08:25:02 grange Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: piixpm.c,v 1.40 2012/02/14 15:08:07 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: piixpm.c,v 1.40.2.1 2013/09/20 03:49:00 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -55,40 +55,37 @@ __KERNEL_RCSID(0, $NetBSD: piixpm.c,v 1
 #define PIIXPM_DELAY	200
 #define PIIXPM_TIMEOUT	1
 
-#define PIIXPM_INDIRECTIO_BASE	0xcd6
-#define PIIXPM_INDIRECTIO_SIZE	2
-#define PIIXPM_INDIRECTIO_INDEX	0
-#define PIIXPM_INDIRECTIO_DATA	1
-
-#define SB800_PM_SMBUS0EN_LO	0x2c
-#define SB800_PM_SMBUS0EN_HI	0x2d
-
-#define SB800_PM_SMBUS0EN_ENABLE	0x0001
-#define SB800_PM_SMBUS0EN_BADDR		0xffe0
+struct piixpm_smbus {
+	int			sda;
+	struct			piixpm_softc *softc;
+};
 
 struct piixpm_softc {
 	device_t		sc_dev;
 
-	bus_space_tag_t		sc_smb_iot;
+	bus_space_tag_t		sc_iot;
+#define	sc_pm_iot sc_iot
+#define sc_smb_iot sc_iot
+	bus_space_handle_t	sc_pm_ioh;
+	bus_space_handle_t	sc_sb800_ioh;
 	bus_space_handle_t	sc_smb_ioh;
 	void *			sc_smb_ih;
 	int			sc_poll;
 
-	bus_space_tag_t		sc_pm_iot;
-	bus_space_handle_t	sc_pm_ioh;
-
 	pci_chipset_tag_t	sc_pc;
 	pcitag_t		sc_pcitag;
 	pcireg_t		sc_id;
 
-	struct i2c_controller	sc_i2c_tag;
+	struct piixpm_smbus	sc_busses[4];
+	struct i2c_controller	sc_i2c_tags[4];
+
 	kmutex_t		sc_i2c_mutex;
 	struct {
-		i2c_op_t op;
-		void *  buf;
-		size_t   len;
-		int  flags;
-		volatile int error;
+		i2c_op_t	op;
+		void *		buf;
+		size_t		len;
+		int		flags;
+		volatile int	error;
 	}			sc_i2c_xfer;
 
 	pcireg_t		sc_devact[2];
@@ -100,8 +97,7 @@ static void	piixpm_attach(device_t, devi
 static bool	piixpm_suspend(device_t, const pmf_qual_t *);
 static bool	piixpm_resume(device_t, const pmf_qual_t *);
 
-static int	piixpm_sb800_init(struct piixpm_softc *,
-struct pci_attach_args *);
+static int	piixpm_sb800_init(struct piixpm_softc *);
 static void	piixpm_csb5_reset(void *);
 static int	piixpm_i2c_acquire_bus(void *, int);
 static void	piixpm_i2c_release_bus(void *, int);
@@ -159,8 +155,10 @@ piixpm_attach(device_t parent, device_t 
 	pcireg_t pmmisc;
 	pci_intr_handle_t ih;
 	const char *intrstr = NULL;
+	int i, numbusses = 1;
 
 	sc-sc_dev = self;
+	sc-sc_iot = pa-pa_iot;
 	sc-sc_id = pa-pa_id;
 	sc-sc_pc = pa-pa_pc;
 	sc-sc_pcitag = pa-pa_tag;
@@ -183,7 +181,6 @@ piixpm_attach(device_t parent, device_t 
 	if (!(pmmisc  1))
 		goto nopowermanagement;
 
-	sc-sc_pm_iot = pa-pa_iot;
 	/* Map I/O space */
 	base = pci_conf_read(pa-pa_pc, pa-pa_tag, PIIX_PM_BASE);
 	if (bus_space_map(sc-sc_pm_iot, PCI_MAPREG_IO_ADDR(base),
@@ -207,8 +204,10 @@ nopowermanagement:
 	if (PCI_VENDOR(pa-pa_id) == PCI_VENDOR_ATI 
 	PCI_PRODUCT(pa-pa_id) == PCI_PRODUCT_ATI_SB600_SMB 
 	PCI_REVISION(pa-pa_class) = 0x40) {
-		if (piixpm_sb800_init(sc, pa) == 0)
+		if (piixpm_sb800_init(sc) == 0) {
+			numbusses = 4;
 			goto attach_i2c;
+		}
 		aprint_normal_dev(self, SMBus disabled\n);
 		return;
 	}
@@ -219,7 +218,6 @@ nopowermanagement:
 	}
 
 	/* Map I/O space */
-	sc-sc_smb_iot = pa-pa_iot;
 	base = pci_conf_read(pa-pa_pc, pa-pa_tag, PIIX_SMB_BASE)  0x;
 	if (bus_space_map(sc-sc_smb_iot, PCI_MAPREG_IO_ADDR(base),
 	PIIX_SMB_SIZE, 0, sc-sc_smb_ioh)) {
@@ -252,17 +250,20 @@ nopowermanagement:
 attach_i2c:
 	/* Attach I2C bus */
 	mutex_init(sc-sc_i2c_mutex, MUTEX_DEFAULT, IPL_NONE);
-	sc-sc_i2c_tag.ic_cookie = sc;
-	sc-sc_i2c_tag.ic_acquire_bus = piixpm_i2c_acquire_bus;
-	sc-sc_i2c_tag.ic_release_bus = piixpm_i2c_release_bus;
-	sc-sc_i2c_tag.ic_exec = piixpm_i2c_exec;
-
-	memset(iba, 0, sizeof(iba));
-	iba.iba_type = I2C_TYPE_SMBUS;
-	iba.iba_tag = sc-sc_i2c_tag;
-	config_found_ia(self, i2cbus, iba, iicbus_print);
 
-	return;
+	for (i = 0; i  numbusses; i++) {
+		sc-sc_busses[i].sda = i;
+		sc-sc_busses[i].softc = sc;
+		sc-sc_i2c_tags[i].ic_cookie = sc-sc_busses[i];
+		

CVS commit: [netbsd-6] src/doc

2013-09-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Sep 18 19:53:23 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
ticket 945


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.40 src/doc/CHANGES-6.2:1.1.2.41
--- src/doc/CHANGES-6.2:1.1.2.40	Wed Sep 18 03:23:28 2013
+++ src/doc/CHANGES-6.2	Wed Sep 18 19:53:23 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.40 2013/09/18 03:23:28 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.41 2013/09/18 19:53:23 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -715,3 +715,12 @@ sys/netinet6/in6.c1.167 via patch
 	Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from
 	FreeBSD.
 	[spz, ticket #944]
+xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c	patch
+xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c	patch
+
+	The size of the arrays is max_key_code + 1. This makes these functions
+	consistent with the other checks added for CVE-2013-1997.
+	Check the XkbGetNames reply when names-keys was just allocated
+	Should fix PR lib/48170.
+	[riz, ticket #945]
+



CVS commit: [netbsd-6] src/sys

2013-09-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Sep 18 20:00:53 UTC 2013

Modified Files:
src/sys/arch/sandpoint/stand/altboot [netbsd-6]: brdsetup.c rge.c
src/sys/dev/ic [netbsd-6]: rtl8169.c

Log Message:
Pull up following revision(s) (requested by phx in ticket #946):
sys/arch/sandpoint/stand/altboot/rge.c: revision 1.7
sys/arch/sandpoint/stand/altboot/brdsetup.c: revision 1.32
sys/dev/ic/rtl8169.c: revision 1.138
QNAP V200 boards have no EEPROM for the MAC address, so all devices default
to the same address (00:e0:4c:69:20:01).
Now we read the real MAC address from the flash ROM. It is stored at the
beginning of a 512-byte block in ASCII format. Some QNAP's have a broken
ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein,
but have to search the whole flash in 512-byte steps for candidates...
Make re(4) driver always use IDR register values for its MAC address.
Some sandpoint NAS firmwares set MAC address per their
firmware settings and don't use re(4)'s EEPROM values.
Per rtl8169 manuals re(4) chip reads EEPROM automatically after
hardware reset and Linux driver also uses IDR registers,
so this change should not affect existing other boards
which actually have vaild EEPROM.
Per discussion in old tech-kern@ thread:
http://mail-index.netbsd.org/tech-kern/2012/12/01/msg014573.html
Note rtl81x9.c is still shared among rtk(4) only for a multicast function
(to avoid boring refactoring work).


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.27.2.1 \
src/sys/arch/sandpoint/stand/altboot/brdsetup.c
cvs rdiff -u -r1.6 -r1.6.8.1 src/sys/arch/sandpoint/stand/altboot/rge.c
cvs rdiff -u -r1.134.4.2 -r1.134.4.3 src/sys/dev/ic/rtl8169.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/sandpoint/stand/altboot/brdsetup.c
diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.27 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.27.2.1
--- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.27	Sat Jan 14 22:36:54 2012
+++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c	Wed Sep 18 20:00:53 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: brdsetup.c,v 1.27 2012/01/14 22:36:54 phx Exp $ */
+/* $NetBSD: brdsetup.c,v 1.27.2.1 2013/09/18 20:00:53 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -1181,6 +1181,41 @@ read_mac_string(uint8_t *mac, char *p)
 }
 
 /*
+ * Scan through the Flash memory and look for a string starting at 512 bytes
+ * block boundaries, matching the format: xx:xx:xx:xx:xx:xxNUL, where x
+ * are hexadecimal digits.
+ * Read the first match as our MAC address.
+ * The start address of the search, p, *must* be dividable by 512!
+ * Return false when no suitable MAC string was found.
+ */
+static int
+find_mac_string(uint8_t *mac, char *p)
+{
+	int i;
+
+	for (;;) {
+		for (i = 0; i  3 * 6; i += 3) {
+			if (!isxdigit((unsigned)p[i]) ||
+			!isxdigit((unsigned)p[i + 1]))
+break;
+			if ((i  5  p[i + 2] != ':') ||
+			(i = 5  p[i + 2] != '\0'))
+break;
+		}
+		if (i = 6) {
+			/* found a valid MAC address */
+			read_mac_string(mac, p);
+			return 1;
+		}
+		if (p = (char *)0xfe00)
+			break;
+		p += 0x200;
+	}
+	return 0;
+}
+
+
+/*
  * For cost saving reasons some NAS boxes lack SEEPROM for NIC's
  * ethernet address and keep it in their Flash memory instead.
  */
@@ -1199,6 +1234,10 @@ read_mac_from_flash(uint8_t *mac)
 	case BRD_DLINKDSM:
 		read_mac_string(mac, (char *)0xfff0ff80);
 		return;
+	case BRD_QNAPTS:
+		if (find_mac_string(mac, (char *)0xfff0))
+			return;
+		break;
 	default:
 		printf(Warning: This board has no known method defined 
 		to determine its MAC address!\n);

Index: src/sys/arch/sandpoint/stand/altboot/rge.c
diff -u src/sys/arch/sandpoint/stand/altboot/rge.c:1.6 src/sys/arch/sandpoint/stand/altboot/rge.c:1.6.8.1
--- src/sys/arch/sandpoint/stand/altboot/rge.c:1.6	Sun Oct 30 21:08:33 2011
+++ src/sys/arch/sandpoint/stand/altboot/rge.c	Wed Sep 18 20:00:53 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: rge.c,v 1.6 2011/10/30 21:08:33 phx Exp $ */
+/* $NetBSD: rge.c,v 1.6.8.1 2013/09/18 20:00:53 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -102,6 +102,9 @@ struct desc {
 #define	 RCR_AM		(1U  2)	/* accept multicast frame */
 #define	 RCR_APM	(1U  1)	/* accept unicast frame */
 #define	 RCR_AAP	(1U  0)	/* promiscuous */
+#define RGE_EECMD	0x50		/* EEPROM command register */
+#define  EECMD_LOCK	0x00
+#define  EECMD_UNLOCK	0xc0
 #define RGE_PHYAR	0x60		/* PHY access */
 #define RGE_PHYSR	0x6c		/* PHY status */
 #define RGE_RMS		0xda		/* Rx maximum frame size */
@@ -146,7 +149,8 @@ rge_init(unsigned tag, void *data)
 	unsigned val;
 	struct local *l;
 	struct desc *txd, *rxd;
-	uint8_t *en = data;
+	uint32_t reg;
+	uint8_t *en;
 
 	l = ALLOC(struct local, 256);	/* desc alignment */
 	memset(l, 0, sizeof(struct local));
@@ -158,14 +162,27 @@ 

CVS commit: [netbsd-6] src/doc

2013-09-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Sep 18 20:01:20 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
ticket 946


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.41 src/doc/CHANGES-6.2:1.1.2.42
--- src/doc/CHANGES-6.2:1.1.2.41	Wed Sep 18 19:53:23 2013
+++ src/doc/CHANGES-6.2	Wed Sep 18 20:01:20 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.41 2013/09/18 19:53:23 bouyer Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.42 2013/09/18 20:01:20 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -724,3 +724,11 @@ xsrc/external/mit/libX11/dist/src/xkb/XK
 	Should fix PR lib/48170.
 	[riz, ticket #945]
 
+sys/arch/sandpoint/stand/altboot/brdsetup.c	1.32
+sys/arch/sandpoint/stand/altboot/rge.c		1.7
+sys/dev/ic/rtl8169.c1.138
+
+	Fix ethernet address for the onboard re(4) for boards without eeprom
+	(QNAP V200) and some sandpoint NAS.
+	[phx, ticket #946]
+



CVS commit: [netbsd-6] src/doc

2013-09-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Sep 17 19:39:38 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 943.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.37 -r1.1.2.38 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.37 src/doc/CHANGES-6.2:1.1.2.38
--- src/doc/CHANGES-6.2:1.1.2.37	Sat Sep 14 13:43:52 2013
+++ src/doc/CHANGES-6.2	Tue Sep 17 19:39:38 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.37 2013/09/14 13:43:52 bouyer Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.38 2013/09/17 19:39:38 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -702,3 +702,10 @@ lib/libc/stdlib/_env.c1.8
 	original environment like Emacs 24.
 	[tron, ticket #940]
 
+external/bsd/pkg_install/dist/lib/pkg_signature.c 1.2
+
+	Fixed installation of signed packages. Some variables part of struct
+	signature_archive were not initialized properly, therefore randomly
+	failing in the verify_signature_read_cb() callback.
+	Partly closes PR pkg/48194; pkgsrc needs to be updated as well.
+	[khorben, ticket #943]



CVS commit: [netbsd-6] src/external/bsd/pkg_install/dist/lib

2013-09-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Sep 17 19:38:00 UTC 2013

Modified Files:
src/external/bsd/pkg_install/dist/lib [netbsd-6]: pkg_signature.c

Log Message:
Pull up following revision(s) (requested by khorben in ticket #943):
external/bsd/pkg_install/dist/lib/pkg_signature.c: revision 1.2
Fixed installation of signed packages. Some variables part of struct
signature_archive were not initialized properly, therefore randomly
failing in the verify_signature_read_cb() callback.
Partly closes PR pkg/48194; pkgsrc needs to be updated as well.
please commit agc@
XXX pull-up to netbsd-6


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.8.1 \
src/external/bsd/pkg_install/dist/lib/pkg_signature.c

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/pkg_install/dist/lib/pkg_signature.c
diff -u src/external/bsd/pkg_install/dist/lib/pkg_signature.c:1.1.1.7 src/external/bsd/pkg_install/dist/lib/pkg_signature.c:1.1.1.7.8.1
--- src/external/bsd/pkg_install/dist/lib/pkg_signature.c:1.1.1.7	Sat Feb 20 04:41:58 2010
+++ src/external/bsd/pkg_install/dist/lib/pkg_signature.c	Tue Sep 17 19:38:00 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pkg_signature.c,v 1.1.1.7 2010/02/20 04:41:58 joerg Exp $	*/
+/*	$NetBSD: pkg_signature.c,v 1.1.1.7.8.1 2013/09/17 19:38:00 msaitoh Exp $	*/
 
 #if HAVE_CONFIG_H
 #include config.h
@@ -7,7 +7,7 @@
 #if HAVE_SYS_CDEFS_H
 #include sys/cdefs.h
 #endif
-__RCSID($NetBSD: pkg_signature.c,v 1.1.1.7 2010/02/20 04:41:58 joerg Exp $);
+__RCSID($NetBSD: pkg_signature.c,v 1.1.1.7.8.1 2013/09/17 19:38:00 msaitoh Exp $);
 
 /*-
  * Copyright (c) 2008 Joerg Sonnenberger jo...@netbsd.org.
@@ -325,10 +325,7 @@ pkg_verify_signature(const char *archive
 
 	*pkgname = NULL;
 
-	state = xmalloc(sizeof(*state));
-	state-sign_blocks = NULL;
-	state-sign_buf = NULL;
-	state-archive = NULL;
+	state = xcalloc(sizeof(*state), 1);
 
 	r = read_file_from_archive(archive_name, *archive, entry, HASH_FNAME,
 	hash_file, hash_len);



CVS commit: [netbsd-6] src/doc

2013-09-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Sep 17 19:41:00 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Cleanup a bit for ticket 943.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.38 -r1.1.2.39 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.38 src/doc/CHANGES-6.2:1.1.2.39
--- src/doc/CHANGES-6.2:1.1.2.38	Tue Sep 17 19:39:38 2013
+++ src/doc/CHANGES-6.2	Tue Sep 17 19:41:00 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.38 2013/09/17 19:39:38 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.39 2013/09/17 19:41:00 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -707,5 +707,5 @@ external/bsd/pkg_install/dist/lib/pkg_si
 	Fixed installation of signed packages. Some variables part of struct
 	signature_archive were not initialized properly, therefore randomly
 	failing in the verify_signature_read_cb() callback.
-	Partly closes PR pkg/48194; pkgsrc needs to be updated as well.
+	Partly closes PR pkg/48194.
 	[khorben, ticket #943]



CVS commit: [netbsd-6] src/sys/netinet6

2013-09-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Sep 18 03:22:11 UTC 2013

Modified Files:
src/sys/netinet6 [netbsd-6]: in6.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #944):
sys/netinet6/in6.c: revision 1.167 via patch
Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.159.4.1 -r1.159.4.2 src/sys/netinet6/in6.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.159.4.1 src/sys/netinet6/in6.c:1.159.4.2
--- src/sys/netinet6/in6.c:1.159.4.1	Mon Jul  8 07:40:07 2013
+++ src/sys/netinet6/in6.c	Wed Sep 18 03:22:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.159.4.1 2013/07/08 07:40:07 jdc Exp $	*/
+/*	$NetBSD: in6.c,v 1.159.4.2 2013/09/18 03:22:11 msaitoh Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.159.4.1 2013/07/08 07:40:07 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.159.4.2 2013/09/18 03:22:11 msaitoh Exp $);
 
 #include opt_inet.h
 #include opt_pfil_hooks.h
@@ -367,6 +367,8 @@ in6_control1(struct socket *so, u_long c
 #ifdef SIOCSIFCONF_X25
 	case SIOCSIFCONF_X25:
 #endif
+	case SIOCSIFBRDADDR:
+	case SIOCSIFNETMASK:
 		return EOPNOTSUPP;
 	case SIOCGETSGCNT_IN6:
 	case SIOCGETMIFCNT_IN6:



CVS commit: [netbsd-6] src/doc

2013-09-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Sep 18 03:23:28 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 944.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.39 src/doc/CHANGES-6.2:1.1.2.40
--- src/doc/CHANGES-6.2:1.1.2.39	Tue Sep 17 19:41:00 2013
+++ src/doc/CHANGES-6.2	Wed Sep 18 03:23:28 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.39 2013/09/17 19:41:00 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.40 2013/09/18 03:23:28 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -709,3 +709,9 @@ external/bsd/pkg_install/dist/lib/pkg_si
 	failing in the verify_signature_read_cb() callback.
 	Partly closes PR pkg/48194.
 	[khorben, ticket #943]
+
+sys/netinet6/in6.c1.167 via patch
+
+	Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from
+	FreeBSD.
+	[spz, ticket #944]



CVS commit: [netbsd-6] src/lib/libc/stdlib

2013-09-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep 14 13:43:27 UTC 2013

Modified Files:
src/lib/libc/stdlib [netbsd-6]: _env.c

Log Message:
Pull up following revision(s) (requested by tron in ticket #940):
lib/libc/stdlib/_env.c: revision 1.8
Don't scrub the environment unless we are going to change it. This should
prevent crashes in applications which carefully and manually construct
a temporary environment and later restore the original environment
like Emacs 24.
Problem reported by Thomas Klausner on pkgsrc-users mailing list.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.4.1 src/lib/libc/stdlib/_env.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/stdlib/_env.c
diff -u src/lib/libc/stdlib/_env.c:1.6 src/lib/libc/stdlib/_env.c:1.6.4.1
--- src/lib/libc/stdlib/_env.c:1.6	Thu Oct  6 20:31:41 2011
+++ src/lib/libc/stdlib/_env.c	Sat Sep 14 13:43:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: _env.c,v 1.6 2011/10/06 20:31:41 christos Exp $ */
+/*	$NetBSD: _env.c,v 1.6.4.1 2013/09/14 13:43:27 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: _env.c,v 1.6 2011/10/06 20:31:41 christos Exp $);
+__RCSID($NetBSD: _env.c,v 1.6.4.1 2013/09/14 13:43:27 bouyer Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -256,10 +256,6 @@ __getenvslot(const char *name, size_t l_
 	size_t new_size, num_entries, required_size;
 	char **new_environ;
 
-	/* Does the environ need scrubbing? */
-	if (environ != allocated_environ  allocated_environ != NULL)
-		__scrubenv();
-
 	/* Search for an existing environment variable of the given name. */
 	num_entries = 0;
 	while (environ[num_entries] != NULL) {
@@ -275,6 +271,10 @@ __getenvslot(const char *name, size_t l_
 	if (!allocate)
 		return -1;
 
+	/* Does the environ need scrubbing? */
+	if (environ != allocated_environ  allocated_environ != NULL)
+		__scrubenv();
+
 	/* Create a new slot in the environment. */
 	required_size = num_entries + 1;
 	if (environ == allocated_environ 



CVS commit: [netbsd-6] src/doc

2013-09-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep 14 13:43:52 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
ticket 940


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.36 src/doc/CHANGES-6.2:1.1.2.37
--- src/doc/CHANGES-6.2:1.1.2.36	Fri Sep 13 04:15:36 2013
+++ src/doc/CHANGES-6.2	Sat Sep 14 13:43:52 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.36 2013/09/13 04:15:36 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.37 2013/09/14 13:43:52 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -694,3 +694,11 @@ sys/net/npf/npf_inet.c1.23
 	- npf_cache_all: clear NBUF_DATAREF_RESET since npf_cache_ip() handles
 	  it.
 	[riz, ticket #942]
+lib/libc/stdlib/_env.c1.8
+
+	Don't scrub the environment unless we are going to change it.
+	This should prevent crashes in applications which carefully and
+	manually construct a temporary environment and later restore the
+	original environment like Emacs 24.
+	[tron, ticket #940]
+



CVS commit: [netbsd-6] src/sys/net/npf

2013-09-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Sep 13 04:12:54 UTC 2013

Modified Files:
src/sys/net/npf [netbsd-6]: npf_inet.c

Log Message:
Pull up following revision (requested by riz in ticket #942):
 /sys/net/npf/npf_inet.crevision 1.23
Fix bugs to prevent panic:
- npf_cache_ip: re-fetch IPv6 header since nbufs might have been reallocated.
- npf_cache_all: clear NBUF_DATAREF_RESET since npf_cache_ip() handles it.


To generate a diff of this commit:
cvs rdiff -u -r1.10.4.9 -r1.10.4.10 src/sys/net/npf/npf_inet.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/npf/npf_inet.c
diff -u src/sys/net/npf/npf_inet.c:1.10.4.9 src/sys/net/npf/npf_inet.c:1.10.4.10
--- src/sys/net/npf/npf_inet.c:1.10.4.9	Mon Feb 11 21:49:49 2013
+++ src/sys/net/npf/npf_inet.c	Fri Sep 13 04:12:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_inet.c,v 1.10.4.9 2013/02/11 21:49:49 riz Exp $	*/
+/*	$NetBSD: npf_inet.c,v 1.10.4.10 2013/09/13 04:12:54 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_inet.c,v 1.10.4.9 2013/02/11 21:49:49 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_inet.c,v 1.10.4.10 2013/09/13 04:12:54 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -391,8 +391,12 @@ npf_cache_ip(npf_cache_t *npc, nbuf_t *n
 			npc-npc_hlen += hlen;
 		}
 
-		/* Restore the offset. */
+		/*
+		 * Re-fetch the header pointers (nbufs might have been
+		 * reallocated).  Restore the original offset (if any).
+		 */
 		nbuf_reset(nbuf);
+		ip6 = nbuf_dataptr(nbuf);
 		if (off) {
 			nbuf_advance(nbuf, off, 0);
 		}
@@ -437,6 +441,7 @@ again:
 	 */
 	flags = npf_cache_ip(npc, nbuf);
 	if ((flags  NPC_IP46) == 0 || (flags  NPC_IPFRAG) != 0) {
+		nbuf_unset_flag(nbuf, NBUF_DATAREF_RESET);
 		npc-npc_info |= flags;
 		return flags;
 	}



CVS commit: [netbsd-6] src/doc

2013-09-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Sep 13 04:15:36 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 942.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.35 -r1.1.2.36 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.35 src/doc/CHANGES-6.2:1.1.2.36
--- src/doc/CHANGES-6.2:1.1.2.35	Wed Sep 11 04:00:18 2013
+++ src/doc/CHANGES-6.2	Fri Sep 13 04:15:36 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.35 2013/09/11 04:00:18 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.36 2013/09/13 04:15:36 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -685,3 +685,12 @@ sys/net/bpf.c	1.176
 	Avoid kernel panic caused by setting a very small bpf buffer size.
 	Fixes PR/48198 reported by Peter Bex.
 	[spz, ticket #941]
+
+sys/net/npf/npf_inet.c1.23
+
+	Fix bugs to prevent panic:
+	- npf_cache_ip: re-fetch IPv6 header since nbufs might have been
+  reallocated.
+	- npf_cache_all: clear NBUF_DATAREF_RESET since npf_cache_ip() handles
+	  it.
+	[riz, ticket #942]



CVS commit: [netbsd-6] src/sys/net

2013-09-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Sep 11 03:54:35 UTC 2013

Modified Files:
src/sys/net [netbsd-6]: bpf.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #941):
sys/net/bpf.c: revision 1.176
PR/48198: Peter Bex: Avoid kernel panic caused by setting a very small bpf
buffer size.


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.168.2.1 src/sys/net/bpf.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/bpf.c
diff -u src/sys/net/bpf.c:1.168 src/sys/net/bpf.c:1.168.2.1
--- src/sys/net/bpf.c:1.168	Fri Dec 16 03:05:23 2011
+++ src/sys/net/bpf.c	Wed Sep 11 03:54:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.168 2011/12/16 03:05:23 christos Exp $	*/
+/*	$NetBSD: bpf.c,v 1.168.2.1 2013/09/11 03:54:35 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bpf.c,v 1.168 2011/12/16 03:05:23 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpf.c,v 1.168.2.1 2013/09/11 03:54:35 msaitoh Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_bpf.h
@@ -1560,11 +1560,8 @@ static void
 catchpacket(struct bpf_d *d, u_char *pkt, u_int pktlen, u_int snaplen,
 void *(*cpfn)(void *, const void *, size_t), struct timespec *ts)
 {
-	struct bpf_hdr *hp;
-#ifdef _LP64
-	struct bpf_hdr32 *hp32;
-#endif
-	int totlen, curlen;
+	char *h;
+	int totlen, curlen, caplen;
 	int hdrlen = bpf_hdrlen(d);
 	int do_wakeup = 0;
 
@@ -1579,6 +1576,13 @@ catchpacket(struct bpf_d *d, u_char *pkt
 	totlen = hdrlen + min(snaplen, pktlen);
 	if (totlen  d-bd_bufsize)
 		totlen = d-bd_bufsize;
+	/*
+	 * If we adjusted totlen to fit the bufsize, it could be that
+	 * totlen is smaller than hdrlen because of the link layer header.
+	 */
+	caplen = totlen - hdrlen;
+	if (caplen  0)
+		caplen = 0;
 
 	/*
 	 * Round up the end of the previous packet to the next longword.
@@ -1619,33 +1623,34 @@ catchpacket(struct bpf_d *d, u_char *pkt
 	/*
 	 * Append the bpf header.
 	 */
+	h = (char *)d-bd_sbuf + curlen;
 #ifdef _LP64
 	if (d-bd_compat32) {
-		hp32 = (struct bpf_hdr32 *)((char *)d-bd_sbuf + curlen);
+		struct bpf_hdr32 *hp32;
+
+		hp32 = (struct bpf_hdr32 *)h;
 		hp32-bh_tstamp.tv_sec = ts-tv_sec;
 		hp32-bh_tstamp.tv_usec = ts-tv_nsec / 1000;
 		hp32-bh_datalen = pktlen;
 		hp32-bh_hdrlen = hdrlen;
-		/*
-		 * Copy the packet data into the store buffer and update its length.
-		 */
-		(*cpfn)((u_char *)hp32 + hdrlen, pkt,
-		(hp32-bh_caplen = totlen - hdrlen));
+		hp32-bh_caplen = caplen;
 	} else
 #endif
 	{
-		hp = (struct bpf_hdr *)((char *)d-bd_sbuf + curlen);
+		struct bpf_hdr *hp;
+
+		hp = (struct bpf_hdr *)h;
 		hp-bh_tstamp.tv_sec = ts-tv_sec;
 		hp-bh_tstamp.tv_usec = ts-tv_nsec / 1000;
 		hp-bh_datalen = pktlen;
 		hp-bh_hdrlen = hdrlen;
-		/*
-		 * Copy the packet data into the store buffer and update
-		 * its length.
-		 */
-		(*cpfn)((u_char *)hp + hdrlen, pkt,
-		(hp-bh_caplen = totlen - hdrlen));
+		hp-bh_caplen = caplen;
 	}
+
+	/*
+	 * Copy the packet data into the store buffer and update its length.
+	 */
+	(*cpfn)(h + hdrlen, pkt, caplen);
 	d-bd_slen = curlen + totlen;
 
 	/*



CVS commit: [netbsd-6] src/doc

2013-09-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Sep 11 04:00:18 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 941.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.34 src/doc/CHANGES-6.2:1.1.2.35
--- src/doc/CHANGES-6.2:1.1.2.34	Mon Sep  9 04:13:30 2013
+++ src/doc/CHANGES-6.2	Wed Sep 11 04:00:18 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.34 2013/09/09 04:13:30 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.35 2013/09/11 04:00:18 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -680,3 +680,8 @@ share/man/man4/bge.4		1.13-1.15 via patc
 	- Remove extra semicolon. Remove unused code.
 	[msaitoh, ticket #939]
 
+sys/net/bpf.c	1.176
+
+	Avoid kernel panic caused by setting a very small bpf buffer size.
+	Fixes PR/48198 reported by Peter Bex.
+	[spz, ticket #941]



CVS commit: [netbsd-6] src/doc

2013-09-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Sep  9 04:13:30 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Modify ticket 939:
 - Add note about PR#47710
 - 80 columns.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.33 src/doc/CHANGES-6.2:1.1.2.34
--- src/doc/CHANGES-6.2:1.1.2.33	Sat Sep  7 16:44:13 2013
+++ src/doc/CHANGES-6.2	Mon Sep  9 04:13:30 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.33 2013/09/07 16:44:13 bouyer Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.34 2013/09/09 04:13:30 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -574,11 +574,12 @@ share/man/man4/bge.4		1.13-1.15 via patc
 
 	Add some device support, fix a lot of bugs and add some enahcements.
 	- Add Altima AC1003, APPLE BCM5701, Broadcom BCM5785F,
-	  BCM5785G, BCM5787F, BCM5719, BCM5720, BCM57766, BCM57782 and BCM57786.
+	  BCM5785G, BCM5787F, BCM5719, BCM5720, BCM57766, BCM57782 and
+	   BCM57786. PR#47710.
 	- brgphy(4): Add BCM5756, BCM5717C, BCM5719C, BCM5720C and BCM57780.
 	- Add some bugfixes and enhancement from FreeBSD:
-	  - Workaround for BCM5906 silicon bug. When auto-negotiation results in
-	   half-duplex operation, excess collision on the ethernet link may
+	  - Workaround for BCM5906 silicon bug. When auto-negotiation results
+	   in half-duplex operation, excess collision on the ethernet link may
 	   cause internal chip delays that may result in subsequent valid
 	   frames being dropped due to insufficient receive buffer resources.
 	   (FreeBSD: r214219, r214251, r214292)
@@ -614,9 +615,9 @@ share/man/man4/bge.4		1.13-1.15 via patc
 	  flag to not to check Gigabit flags. It's the same as FreeBSD.
 	- In brgphyattach(), set sc_isbge, sc_isbnx and sc_phyflags before
 	  PHY_RESET() because brgphy_reset() refers those flags.
-	- Call brgpy specific autonego function in MII_TICK. Before this commit,
-	  only MII_MEDIACHG calls brgphy_mii_phy_auto() and MII_TICK calls MI
-	  mii_phy_auto(). That was not intended.
+	- Call brgpy specific autonego function in MII_TICK. Before this
+	  commit, only MII_MEDIACHG calls brgphy_mii_phy_auto() and MII_TICK
+	  calls MI mii_phy_auto(). That was not intended.
 	- Sync with FreeBSD and OpenBSD. Almost the same as OpenBSD rev. 1.325:
 	  - Sync the ring setup code closer to FreeBSD's driver
 	  - Do not touch the jumbo replenish threshold register on chips that
@@ -645,9 +646,9 @@ share/man/man4/bge.4		1.13-1.15 via patc
 	  bge_readmem_ind().
 	- For BGE_IS_575X_PLUS() devices, don't set
 	  BGE_RXLPSTATCONTROL_DACK_FIX bits because these bits are reserved.
-	- bge_init_tx_ring() uses BGE_RSLOTS (==256) but bge_free_tx_ring() uses
-	  BGE_TX_RING_CNT (== 512). Delete BGE_RSLOTS and use BGE_TX_RING_CNT.
-	  Same as OpenBSD's if_bge.c rev. 1.86.
+	- bge_init_tx_ring() uses BGE_RSLOTS (==256) but bge_free_tx_ring()
+	  uses BGE_TX_RING_CNT (== 512). Delete BGE_RSLOTS and use
+	  BGE_TX_RING_CNT. Same as OpenBSD's if_bge.c rev. 1.86.
 	- Document says 5717 and newer chips have no
 	  BGE_PCISTATE_INTR_NOT_ACTIVE bit, so don't use the bit on those
 	  chips. Same as OpenBSD.



CVS commit: [netbsd-6] src/sys/fs/udf

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 15:57:35 UTC 2013

Modified Files:
src/sys/fs/udf [netbsd-6]: udf_allocation.c

Log Message:
Pull up following revision(s) (requested by reinoud in ticket #930):
sys/fs/udf/udf_allocation.c: revision 1.34
Fix 32 bit issue in main file read-in function. On both 32 bit and 64 bit
hosts a missing cast would result in `garbage' after the 4Gbyte limit.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.8.1 src/sys/fs/udf/udf_allocation.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/fs/udf/udf_allocation.c
diff -u src/sys/fs/udf/udf_allocation.c:1.32 src/sys/fs/udf/udf_allocation.c:1.32.8.1
--- src/sys/fs/udf/udf_allocation.c:1.32	Thu Jun 16 09:21:02 2011
+++ src/sys/fs/udf/udf_allocation.c	Sat Sep  7 15:57:35 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_allocation.c,v 1.32 2011/06/16 09:21:02 hannken Exp $ */
+/* $NetBSD: udf_allocation.c,v 1.32.8.1 2013/09/07 15:57:35 bouyer Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__KERNEL_RCSID(0, $NetBSD: udf_allocation.c,v 1.32 2011/06/16 09:21:02 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: udf_allocation.c,v 1.32.8.1 2013/09/07 15:57:35 bouyer Exp $);
 #endif /* not lint */
 
 
@@ -586,7 +586,7 @@ translate_again:
 
 			end_foffset = foffset + len;
 
-			if (end_foffset  lb_num * lb_size)
+			if (end_foffset  (uint64_t) lb_num * lb_size)
 break;	/* found */
 			foffset = end_foffset;
 			slot++;
@@ -724,13 +724,13 @@ udf_translate_file_extent(struct udf_nod
 
 		end_foffset = foffset + len;
 
-		if (end_foffset  from * lb_size)
+		if (end_foffset  (uint64_t) from * lb_size)
 			break;	/* found */
 		foffset = end_foffset;
 		slot++;
 	}
 	/* found overlapping slot */
-	ext_offset = from * lb_size - foffset;
+	ext_offset = (uint64_t) from * lb_size - foffset;
 
 	for (;;) {
 		udf_get_adslot(udf_node, slot, s_ad, eof);



CVS commit: [netbsd-6] src/sys/dev/pci

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 16:01:03 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: virtio.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #931):
sys/dev/pci/virtio.c: revision 1.4
Make sure to check if the driver has a valid intr handler in virtio_detach().
Fixes a panic during shutdown on KVM under ubuntu 13.04 with virtio,
as reported in PR kern/48105 by Richard Hansen.
Should be pulled up to netbsd-6 branches.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.8.1 src/sys/dev/pci/virtio.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/virtio.c
diff -u src/sys/dev/pci/virtio.c:1.3 src/sys/dev/pci/virtio.c:1.3.8.1
--- src/sys/dev/pci/virtio.c:1.3	Wed Nov  2 23:05:52 2011
+++ src/sys/dev/pci/virtio.c	Sat Sep  7 16:01:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $	*/
+/*	$NetBSD: virtio.c,v 1.3.8.1 2013/09/07 16:01:03 bouyer Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: virtio.c,v 1.3.8.1 2013/09/07 16:01:03 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -199,8 +199,10 @@ virtio_detach(device_t self, int flags)
 	}
 	KASSERT(sc-sc_child == 0 || sc-sc_child == (void*)1);
 	KASSERT(sc-sc_vqs == 0);
-	pci_intr_disestablish(sc-sc_pc, sc-sc_ih);
-	sc-sc_ih = 0;
+	if (sc-sc_ih != NULL) {
+		pci_intr_disestablish(sc-sc_pc, sc-sc_ih);
+		sc-sc_ih = NULL;
+	}
 	if (sc-sc_iosize)
 		bus_space_unmap(sc-sc_iot, sc-sc_ioh, sc-sc_iosize);
 	sc-sc_iosize = 0;



CVS commit: [netbsd-6] src/sys/dev/pci

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 16:05:59 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: mpii.c

Log Message:
Pull up following revision(s) (requested by kardel in ticket #932):
sys/dev/pci/mpii.c: revision 1.2
sys/dev/pci/mpii.c: revision 1.3
Allow 8 luns instead of 1. This enables access to the changer device on
a Dell PV-124T:
ch0 at scsibus0 target 9 lun 1: DELL, PV-124T, 0086 changer removable
ch0: 16 slots, 1 drive, 1 picker, 0 portals
fix issues when reading variable block sized tapes.
symptoms:
 generic HBA error on console when reading
 with a larger blocksize. blocks read
 are padded to requested block size with
 a 5a... a5... pattern.
problems fixed:
 - controller scsi_status values did not match
   the ones used by the spsipi layer.
   a mapping function was introduced.
 - when experiencing an underrun (read 64k and
   get a 63k block) the controller posted
   not a SUCCESS status but CHECK status. handle
   that like SUCCESS adjusting xs-resid and set
   XS_SENSE.
   now the correct data amount is returned and
   nothing is 'added' and no 'generic HBA error'
   occurs.
 - make decisions using variables and constants
   from the controller domain.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/dev/pci/mpii.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/mpii.c
diff -u src/sys/dev/pci/mpii.c:1.1.2.2 src/sys/dev/pci/mpii.c:1.1.2.3
--- src/sys/dev/pci/mpii.c:1.1.2.2	Mon Apr 23 16:31:36 2012
+++ src/sys/dev/pci/mpii.c	Sat Sep  7 16:05:59 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.1.2.2 2012/04/23 16:31:36 riz Exp $ */
+/* $NetBSD: mpii.c,v 1.1.2.3 2013/09/07 16:05:59 bouyer Exp $ */
 /*	OpenBSD: mpii.c,v 1.51 2012/04/11 13:29:14 naddy Exp 	*/
 /*
  * Copyright (c) 2010 Mike Belopuhov m...@crypt.org.ru
@@ -20,7 +20,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mpii.c,v 1.1.2.2 2012/04/23 16:31:36 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: mpii.c,v 1.1.2.3 2013/09/07 16:05:59 bouyer Exp $);
 
 #include bio.h
 
@@ -790,18 +790,18 @@ struct mpii_msg_scsi_io_error {
 	u_int16_t		reserved3;
 
 	u_int8_t		scsi_status;
-	/* XXX JPG validate this */
-#if notyet
-#define MPII_SCSIIO_ERR_STATUS_SUCCESS
-#define MPII_SCSIIO_ERR_STATUS_CHECK_COND
-#define MPII_SCSIIO_ERR_STATUS_BUSY
-#define MPII_SCSIIO_ERR_STATUS_INTERMEDIATE
-#define MPII_SCSIIO_ERR_STATUS_INTERMEDIATE_CONDMET
-#define MPII_SCSIIO_ERR_STATUS_RESERVATION_CONFLICT
-#define MPII_SCSIIO_ERR_STATUS_CMD_TERM
-#define MPII_SCSIIO_ERR_STATUS_TASK_SET_FULL
-#define MPII_SCSIIO_ERR_STATUS_ACA_ACTIVE
-#endif
+
+#define MPII_SCSIIO_ERR_STATUS_SUCCESS			(0x00)
+#define MPII_SCSIIO_ERR_STATUS_CHECK_COND		(0x02)
+#define MPII_SCSIIO_ERR_STATUS_BUSY			(0x04)
+#define MPII_SCSIIO_ERR_STATUS_INTERMEDIATE		(0x08)
+#define MPII_SCSIIO_ERR_STATUS_INTERMEDIATE_CONDMET	(0x10)
+#define MPII_SCSIIO_ERR_STATUS_RESERVATION_CONFLICT	(0x14)
+#define MPII_SCSIIO_ERR_STATUS_CMD_TERM			(0x22)
+#define MPII_SCSIIO_ERR_STATUS_TASK_SET_FULL		(0x28)
+#define MPII_SCSIIO_ERR_STATUS_ACA_ACTIVE		(0x30)
+#define MPII_SCSIIO_ERR_STATUS_TASK_ABORTED		(0x40)
+
 	u_int8_t		scsi_state;
 #define MPII_SCSIIO_ERR_STATE_AUTOSENSE_VALID		(10)
 #define MPII_SCSIIO_ERR_STATE_AUTOSENSE_FAILED		(11)
@@ -2296,7 +2296,7 @@ mpii_attach(device_t parent, device_t se
 	chan-chan_bustype = scsi_sas_bustype;
 	chan-chan_channel = 0;
 	chan-chan_flags = 0;
-	chan-chan_nluns = 1;
+	chan-chan_nluns = 8;
 	chan-chan_ntargets = sc-sc_max_devices;
 	chan-chan_id = -1;
 
@@ -4682,6 +4682,58 @@ mpii_scsi_cmd_tmo_done(struct mpii_ccb *
 mpii_put_ccb(tccb-ccb_sc, tccb);
 }
 
+static u_int8_t
+map_scsi_status(u_int8_t mpii_scsi_status)
+{
+	u_int8_t scsi_status;
+	
+	switch (mpii_scsi_status) 
+	{
+	case MPII_SCSIIO_ERR_STATUS_SUCCESS:
+		scsi_status = SCSI_OK;
+		break;
+		
+	case MPII_SCSIIO_ERR_STATUS_CHECK_COND:
+		scsi_status = SCSI_CHECK;
+		break;
+		
+	case MPII_SCSIIO_ERR_STATUS_BUSY:
+		scsi_status = SCSI_BUSY;
+		break;
+		
+	case MPII_SCSIIO_ERR_STATUS_INTERMEDIATE:
+		scsi_status = SCSI_INTERM;
+		break;
+		
+	case MPII_SCSIIO_ERR_STATUS_INTERMEDIATE_CONDMET:
+		scsi_status = SCSI_INTERM;
+		break;
+		
+	case MPII_SCSIIO_ERR_STATUS_RESERVATION_CONFLICT:
+		scsi_status = SCSI_RESV_CONFLICT;
+		break;
+		
+	case MPII_SCSIIO_ERR_STATUS_CMD_TERM:
+	case MPII_SCSIIO_ERR_STATUS_TASK_ABORTED:
+		scsi_status = SCSI_TERMINATED;
+		break;
+
+	case MPII_SCSIIO_ERR_STATUS_TASK_SET_FULL:
+		scsi_status = SCSI_QUEUE_FULL;
+		break;
+
+	case MPII_SCSIIO_ERR_STATUS_ACA_ACTIVE:
+		scsi_status = SCSI_ACA_ACTIVE;
+		break;
+
+	default:
+		/* XXX: for the lack of anything better and other than OK */
+		scsi_status = 0xFF;
+		break;
+	}
+
+	return scsi_status;
+}

CVS commit: [netbsd-6] src/sys/nfs

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 16:08:13 UTC 2013

Modified Files:
src/sys/nfs [netbsd-6]: nfs_bio.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #933):
sys/nfs/nfs_bio.c: revision 1.189
Function nfs_vinvalbuf() ignores errors from vinvalbuf() and therefore
delayed write errors may get lost.
Change nfs_vinvalbuf() to keep errors from vinvalbuf() for fsync() or =
close().
=20
Presented on tech-kern@
=20
Fix for PR kern/47980 (NFS over-quota not detected if utimes() called
before fsync()/close())
=20
=20


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.188.8.1 src/sys/nfs/nfs_bio.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/nfs/nfs_bio.c
diff -u src/sys/nfs/nfs_bio.c:1.188 src/sys/nfs/nfs_bio.c:1.188.8.1
--- src/sys/nfs/nfs_bio.c:1.188	Tue Sep 27 01:07:38 2011
+++ src/sys/nfs/nfs_bio.c	Sat Sep  7 16:08:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_bio.c,v 1.188 2011/09/27 01:07:38 christos Exp $	*/
+/*	$NetBSD: nfs_bio.c,v 1.188.8.1 2013/09/07 16:08:13 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.188 2011/09/27 01:07:38 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.188.8.1 2013/09/07 16:08:13 bouyer Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs.h
@@ -614,7 +614,7 @@ nfs_vinvalbuf(struct vnode *vp, int flag
 {
 	struct nfsnode *np = VTONFS(vp);
 	struct nfsmount *nmp = VFSTONFS(vp-v_mount);
-	int error = 0, slptimeo;
+	int error = 0, allerror = 0, slptimeo;
 	bool catch;
 
 	if ((nmp-nm_flag  NFSMNT_INT) == 0)
@@ -647,6 +647,8 @@ nfs_vinvalbuf(struct vnode *vp, int flag
 	mutex_exit(vp-v_interlock);
 	error = vinvalbuf(vp, flags, cred, l, catch, 0);
 	while (error) {
+		if (allerror == 0)
+			allerror = error;
 		if (intrflg  nfs_sigintr(nmp, NULL, l)) {
 			error = EINTR;
 			break;
@@ -654,6 +656,13 @@ nfs_vinvalbuf(struct vnode *vp, int flag
 		error = vinvalbuf(vp, flags, cred, l, 0, slptimeo);
 	}
 	mutex_enter(vp-v_interlock);
+	if (allerror != 0) {
+		/*
+		 * Keep error from vinvalbuf so fsync/close will know.
+		 */
+		np-n_error = allerror;
+		np-n_flag |= NWRITEERR;
+	}
 	if (error == 0)
 		np-n_flag = ~NMODIFIED;
 	np-n_flag = ~NFLUSHINPROG;



CVS commit: [netbsd-6] src/lib/libc/locale

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 16:11:41 UTC 2013

Modified Files:
src/lib/libc/locale [netbsd-6]: global_locale.c

Log Message:
Apply patch, requested by joerg in ticket #934:
lib/libc/locale/global_locale.c: patch
provide consistent and correct data for the C locale.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.2.1 src/lib/libc/locale/global_locale.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/locale/global_locale.c
diff -u src/lib/libc/locale/global_locale.c:1.12 src/lib/libc/locale/global_locale.c:1.12.2.1
--- src/lib/libc/locale/global_locale.c:1.12	Fri Jan 20 16:31:29 2012
+++ src/lib/libc/locale/global_locale.c	Sat Sep  7 16:11:41 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: global_locale.c,v 1.12 2012/01/20 16:31:29 joerg Exp $ */
+/* $NetBSD: global_locale.c,v 1.12.2.1 2013/09/07 16:11:41 bouyer Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: global_locale.c,v 1.12 2012/01/20 16:31:29 joerg Exp $);
+__RCSID($NetBSD: global_locale.c,v 1.12.2.1 2013/09/07 16:11:41 bouyer Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/types.h
@@ -77,44 +77,44 @@ static const char *_global_items[(size_t
 	[(size_t)T_FMT_AMPM ] = %I:%M:%S %p,
 	[(size_t)AM_STR ] = AM,
 	[(size_t)PM_STR ] = PM,
-	[(size_t)DAY_1  ] = Sun,
-	[(size_t)DAY_2  ] = Mon,
-	[(size_t)DAY_3  ] = Tue,
-	[(size_t)DAY_4  ] = Wed,
-	[(size_t)DAY_5  ] = Thu,
-	[(size_t)DAY_6  ] = Fri,
-	[(size_t)DAY_7  ] = Sat,
-	[(size_t)ABDAY_1] = Sunday,
-	[(size_t)ABDAY_2] = Monday,
-	[(size_t)ABDAY_3] = Tuesday,
-	[(size_t)ABDAY_4] = Wednesday,
-	[(size_t)ABDAY_5] = Thursday,
-	[(size_t)ABDAY_6] = Friday,
-	[(size_t)ABDAY_7] = Saturday,
-	[(size_t)MON_1  ] = Jan,
-	[(size_t)MON_2  ] = Feb,
-	[(size_t)MON_3  ] = Mar,
-	[(size_t)MON_4  ] = Apr,
+	[(size_t)DAY_1  ] = Sunday,
+	[(size_t)DAY_2  ] = Monday,
+	[(size_t)DAY_3  ] = Tuesday,
+	[(size_t)DAY_4  ] = Wednesday,
+	[(size_t)DAY_5  ] = Thursday,
+	[(size_t)DAY_6  ] = Friday,
+	[(size_t)DAY_7  ] = Saturday,
+	[(size_t)ABDAY_1] = Sun,
+	[(size_t)ABDAY_2] = Mon,
+	[(size_t)ABDAY_3] = Tue,
+	[(size_t)ABDAY_4] = Wed,
+	[(size_t)ABDAY_5] = Thu,
+	[(size_t)ABDAY_6] = Fri,
+	[(size_t)ABDAY_7] = Sat,
+	[(size_t)MON_1  ] = January,
+	[(size_t)MON_2  ] = February,
+	[(size_t)MON_3  ] = March,
+	[(size_t)MON_4  ] = April,
 	[(size_t)MON_5  ] = May,
-	[(size_t)MON_6  ] = Jun,
-	[(size_t)MON_7  ] = Jul,
-	[(size_t)MON_8  ] = Aug,
-	[(size_t)MON_9  ] = Sep,
-	[(size_t)MON_10 ] = Oct,
-	[(size_t)MON_11 ] = Nov,
-	[(size_t)MON_12 ] = Dec,
-	[(size_t)ABMON_1] = January,
-	[(size_t)ABMON_2] = February,
-	[(size_t)ABMON_3] = March,
-	[(size_t)ABMON_4] = April,
+	[(size_t)MON_6  ] = June,
+	[(size_t)MON_7  ] = July,
+	[(size_t)MON_8  ] = August,
+	[(size_t)MON_9  ] = September,
+	[(size_t)MON_10 ] = October,
+	[(size_t)MON_11 ] = November,
+	[(size_t)MON_12 ] = December,
+	[(size_t)ABMON_1] = Jan,
+	[(size_t)ABMON_2] = Feb,
+	[(size_t)ABMON_3] = Mar,
+	[(size_t)ABMON_4] = Apr,
 	[(size_t)ABMON_5] = May,
-	[(size_t)ABMON_6] = June,
-	[(size_t)ABMON_7] = July,
-	[(size_t)ABMON_8] = August,
-	[(size_t)ABMON_9] = September,
-	[(size_t)ABMON_10   ] = October,
-	[(size_t)ABMON_11   ] = November,
-	[(size_t)ABMON_12   ] = December,
+	[(size_t)ABMON_6] = Jun,
+	[(size_t)ABMON_7] = Jul,
+	[(size_t)ABMON_8] = Aug,
+	[(size_t)ABMON_9] = Sep,
+	[(size_t)ABMON_10   ] = Oct,
+	[(size_t)ABMON_11   ] = Nov,
+	[(size_t)ABMON_12   ] = Dec,
 	[(size_t)RADIXCHAR  ] = .,
 	[(size_t)THOUSEP] = ,
 	[(size_t)YESSTR ] = yes,



CVS commit: [netbsd-6] src/sys/arch

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 16:16:00 UTC 2013

Modified Files:
src/sys/arch/amiga/amiga [netbsd-6]: amiga_init.c
src/sys/arch/m68k/m68k [netbsd-6]: pmap_motorola.c

Log Message:
Pull up following revision(s) (requested by rkujawa in ticket #935):
sys/arch/amiga/amiga/amiga_init.c: revision 1.127
sys/arch/m68k/m68k/pmap_motorola.c: revision 1.66
Set user page table base address dynamically on amiga. This unbreaks =
machines
with large Zorro III I/O spaces. Patch originally by Michael L. Hitch.
Test on an A4000.
=20
=20


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.126.2.1 src/sys/arch/amiga/amiga/amiga_init.c
cvs rdiff -u -r1.65 -r1.65.2.1 src/sys/arch/m68k/m68k/pmap_motorola.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/amiga/amiga/amiga_init.c
diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.126 src/sys/arch/amiga/amiga/amiga_init.c:1.126.2.1
--- src/sys/arch/amiga/amiga/amiga_init.c:1.126	Sun Feb 12 16:34:06 2012
+++ src/sys/arch/amiga/amiga/amiga_init.c	Sat Sep  7 16:16:00 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: amiga_init.c,v 1.126 2012/02/12 16:34:06 matt Exp $	*/
+/*	$NetBSD: amiga_init.c,v 1.126.2.1 2013/09/07 16:16:00 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1994 Michael L. Hitch
@@ -38,7 +38,7 @@
 #include ser.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.126 2012/02/12 16:34:06 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.126.2.1 2013/09/07 16:16:00 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -73,7 +73,8 @@ __KERNEL_RCSID(0, $NetBSD: amiga_init.c
 extern u_int	lowram;
 extern u_int	Umap;
 extern u_long boot_partition;
-vaddr_t		amiga_uptbase;
+extern vaddr_t	m68k_uptbase;
+
 #ifdef P5PPC68KBOARD
 extern int	p5ppc;
 #endif
@@ -705,7 +706,7 @@ start_c(int id, u_int fphystart, u_int f
 	 * XXX 16 MB instead of 256 MB should be enough, but...
 	 * we need to fix the fastmem loading first. (see comment at line 375)
 	 */
-	RELOC(amiga_uptbase, vaddr_t) =
+	RELOC(m68k_uptbase, vaddr_t) =
 	roundup(vstart + 0x1000, 0x1000);
 
 	/*

Index: src/sys/arch/m68k/m68k/pmap_motorola.c
diff -u src/sys/arch/m68k/m68k/pmap_motorola.c:1.65 src/sys/arch/m68k/m68k/pmap_motorola.c:1.65.2.1
--- src/sys/arch/m68k/m68k/pmap_motorola.c:1.65	Fri Jan 27 19:48:38 2012
+++ src/sys/arch/m68k/m68k/pmap_motorola.c	Sat Sep  7 16:16:00 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_motorola.c,v 1.65 2012/01/27 19:48:38 para Exp $*/
+/*	$NetBSD: pmap_motorola.c,v 1.65.2.1 2013/09/07 16:16:00 bouyer Exp $*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -119,7 +119,7 @@
 #include opt_m68k_arch.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_motorola.c,v 1.65 2012/01/27 19:48:38 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_motorola.c,v 1.65.2.1 2013/09/07 16:16:00 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -256,6 +256,8 @@ int		page_cnt;	/* number of pages manage
 
 bool		pmap_initialized = false;	/* Has pmap_init completed? */
 
+vaddr_t		m68k_uptbase = M68K_PTBASE;
+
 struct pv_header {
 	struct pv_entry		pvh_first;	/* first PV entry */
 	uint16_t		pvh_attrs;	/* attributes:
@@ -514,7 +516,7 @@ pmap_init(void)
 	st_map = uvm_km_suballoc(kernel_map, addr, addr2, s, 0, false,
 	st_map_store);
 
-	addr = M68K_PTBASE;
+	addr = m68k_uptbase;
 	if ((M68K_PTMAXSIZE / M68K_MAX_PTSIZE)  maxproc) {
 		s = M68K_PTMAXSIZE;
 		/*



CVS commit: [netbsd-6] src/sys/dev/usb

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 16:22:29 UTC 2013

Modified Files:
src/sys/dev/usb [netbsd-6]: u3g.c usbdevs

Log Message:
Pull up following revision(s) (requested by dholland in ticket #937):
sys/dev/usb/u3g.c: revision 1.30
sys/dev/usb/usbdevs: revision 1.653
PR/48172: Reinhard Speyerer: u3g(4): add 4G Systems XS Stick W14 support


To generate a diff of this commit:
cvs rdiff -u -r1.24.2.1 -r1.24.2.2 src/sys/dev/usb/u3g.c
cvs rdiff -u -r1.607.2.8 -r1.607.2.9 src/sys/dev/usb/usbdevs

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

Modified files:

Index: src/sys/dev/usb/u3g.c
diff -u src/sys/dev/usb/u3g.c:1.24.2.1 src/sys/dev/usb/u3g.c:1.24.2.2
--- src/sys/dev/usb/u3g.c:1.24.2.1	Mon Feb 11 21:44:22 2013
+++ src/sys/dev/usb/u3g.c	Sat Sep  7 16:22:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: u3g.c,v 1.24.2.1 2013/02/11 21:44:22 riz Exp $	*/
+/*	$NetBSD: u3g.c,v 1.24.2.2 2013/09/07 16:22:29 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: u3g.c,v 1.24.2.1 2013/02/11 21:44:22 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: u3g.c,v 1.24.2.2 2013/09/07 16:22:29 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -251,6 +251,7 @@ static const struct usb_devno u3g_devs[]
 
 	/* 4G Systems */
 	{ USB_VENDOR_4GSYSTEMS, USB_PRODUCT_4GSYSTEMS_XSSTICK_P14 },
+	{ USB_VENDOR_4GSYSTEMS, USB_PRODUCT_4GSYSTEMS_XSSTICK_W14 },
 };
 
 static int

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.607.2.8 src/sys/dev/usb/usbdevs:1.607.2.9
--- src/sys/dev/usb/usbdevs:1.607.2.8	Sun May 19 21:51:00 2013
+++ src/sys/dev/usb/usbdevs	Sat Sep  7 16:22:29 2013
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.607.2.8 2013/05/19 21:51:00 riz Exp $
+$NetBSD: usbdevs,v 1.607.2.9 2013/09/07 16:22:29 bouyer Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -583,6 +583,7 @@ product 3COMUSR HOMECONN	0x009d	3Com Hom
 product 3COMUSR USR56K		0x3021	U.S.Robotics 56000 Voice Faxmodem Pro
 
 /* 4G Systems products */
+product 4GSYSTEMS XSSTICK_W14	0x9603	4G Systems XSStick W14
 product 4GSYSTEMS XSSTICK_P14	0x9605	4G Systems XSStick P14
 product 4GSYSTEMS XSSTICK_P14_INSTALLER	0xf000	4G Systems XSStick P14 - Windows driver
 



CVS commit: [netbsd-6] src/sys/dev/usb

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 16:23:24 UTC 2013

Modified Files:
src/sys/dev/usb [netbsd-6]: usbdevs.h usbdevs_data.h

Log Message:
Regen for ticket 937


To generate a diff of this commit:
cvs rdiff -u -r1.600.2.8 -r1.600.2.9 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.601.2.8 -r1.601.2.9 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.600.2.8 src/sys/dev/usb/usbdevs.h:1.600.2.9
--- src/sys/dev/usb/usbdevs.h:1.600.2.8	Sun May 19 21:51:46 2013
+++ src/sys/dev/usb/usbdevs.h	Sat Sep  7 16:23:24 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.600.2.8 2013/05/19 21:51:46 riz Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.600.2.9 2013/09/07 16:23:24 bouyer Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.607.2.8 2013/05/19 21:51:00 riz Exp
+ *	NetBSD
  */
 
 /*
@@ -590,6 +590,7 @@
 #define	USB_PRODUCT_3COMUSR_USR56K	0x3021		/* U.S.Robotics 56000 Voice Faxmodem Pro */
 
 /* 4G Systems products */
+#define	USB_PRODUCT_4GSYSTEMS_XSSTICK_W14	0x9603		/* 4G Systems XSStick W14 */
 #define	USB_PRODUCT_4GSYSTEMS_XSSTICK_P14	0x9605		/* 4G Systems XSStick P14 */
 #define	USB_PRODUCT_4GSYSTEMS_XSSTICK_P14_INSTALLER	0xf000		/* 4G Systems XSStick P14 - Windows driver */
 

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.601.2.8 src/sys/dev/usb/usbdevs_data.h:1.601.2.9
--- src/sys/dev/usb/usbdevs_data.h:1.601.2.8	Sun May 19 21:51:46 2013
+++ src/sys/dev/usb/usbdevs_data.h	Sat Sep  7 16:23:24 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.601.2.8 2013/05/19 21:51:46 riz Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.601.2.9 2013/09/07 16:23:24 bouyer Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.607.2.8 2013/05/19 21:51:00 riz Exp
+ *	NetBSD
  */
 
 /*
@@ -2107,6 +2107,10 @@ const struct usb_product usb_products[] 
 	U.S.Robotics 56000 Voice Faxmodem Pro,
 	},
 	{
+	USB_VENDOR_4GSYSTEMS, USB_PRODUCT_4GSYSTEMS_XSSTICK_W14,
+	4G Systems XSStick W14,
+	},
+	{
 	USB_VENDOR_4GSYSTEMS, USB_PRODUCT_4GSYSTEMS_XSSTICK_P14,
 	4G Systems XSStick P14,
 	},
@@ -9139,4 +9143,4 @@ const struct usb_product usb_products[] 
 	Prestige,
 	},
 };
-const int usb_nproducts = 1769;
+const int usb_nproducts = 1770;



CVS commit: [netbsd-6] src/sys/dev/mii

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 16:41:08 UTC 2013

Modified Files:
src/sys/dev/mii [netbsd-6]: miidevs.h miidevs_data.h

Log Message:
regen for ticket 939


To generate a diff of this commit:
cvs rdiff -u -r1.108.4.1 -r1.108.4.2 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.96.4.1 -r1.96.4.2 src/sys/dev/mii/miidevs_data.h

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

Modified files:

Index: src/sys/dev/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.108.4.1 src/sys/dev/mii/miidevs.h:1.108.4.2
--- src/sys/dev/mii/miidevs.h:1.108.4.1	Wed Oct 24 03:42:25 2012
+++ src/sys/dev/mii/miidevs.h	Sat Sep  7 16:41:08 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.108.4.1 2012/10/24 03:42:25 riz Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.108.4.2 2013/09/07 16:41:08 bouyer Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.105.4.1 2012/10/24 03:41:51 riz Exp
+ *	NetBSD: miidevs,v 1.105.4.2 2013/09/07 16:39:32 bouyer Exp
  */
 
 /*-
@@ -225,8 +225,12 @@
 #define	MII_STR_BROADCOM2_BCM5482	BCM5482 1000BASE-T media interface
 #define	MII_MODEL_BROADCOM2_BCM5755	0x000c
 #define	MII_STR_BROADCOM2_BCM5755	BCM5755 1000BASE-T media interface
+#define	MII_MODEL_BROADCOM2_BCM5756	0x000d
+#define	MII_STR_BROADCOM2_BCM5756	BCM5756 1000BASE-T media interface XXX
 #define	MII_MODEL_BROADCOM2_BCM5754	0x000e
 #define	MII_STR_BROADCOM2_BCM5754	BCM5754/5787 1000BASE-T media interface
+#define	MII_MODEL_BROADCOM2_BCM5708S	0x0015
+#define	MII_STR_BROADCOM2_BCM5708S	BCM5708S 1000/2500baseSX PHY
 #define	MII_MODEL_BROADCOM2_BCM5785	0x0016
 #define	MII_STR_BROADCOM2_BCM5785	BCM5785 1000BASE-T media interface
 #define	MII_MODEL_BROADCOM2_BCM5709CAX	0x002c
@@ -241,8 +245,16 @@
 #define	MII_STR_BROADCOM2_BCM5761	BCM5761 10/100/1000baseT PHY
 #define	MII_MODEL_BROADCOM2_BCM5709S	0x003f
 #define	MII_STR_BROADCOM2_BCM5709S	BCM5709S 1000/2500baseSX PHY
+#define	MII_MODEL_BROADCOM3_BCM57780	0x0019
+#define	MII_STR_BROADCOM3_BCM57780	BCM57780 1000BASE-T media interface
+#define	MII_MODEL_BROADCOM3_BCM5717C	0x0020
+#define	MII_STR_BROADCOM3_BCM5717C	BCM5717C 1000BASE-T media interface
+#define	MII_MODEL_BROADCOM3_BCM5719C	0x0022
+#define	MII_STR_BROADCOM3_BCM5719C	BCM5719C 1000BASE-T media interface
 #define	MII_MODEL_BROADCOM3_BCM57765	0x0024
 #define	MII_STR_BROADCOM3_BCM57765	BCM57765 1000BASE-T media interface
+#define	MII_MODEL_BROADCOM3_BCM5720C	0x0036
+#define	MII_STR_BROADCOM3_BCM5720C	BCM5720C 1000BASE-T media interface
 #define	MII_MODEL_xxBROADCOM_ALT1_BCM5906	0x0004
 #define	MII_STR_xxBROADCOM_ALT1_BCM5906	BCM5906 10/100baseTX media interface
  

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.96.4.1 src/sys/dev/mii/miidevs_data.h:1.96.4.2
--- src/sys/dev/mii/miidevs_data.h:1.96.4.1	Wed Oct 24 03:42:25 2012
+++ src/sys/dev/mii/miidevs_data.h	Sat Sep  7 16:41:08 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs_data.h,v 1.96.4.1 2012/10/24 03:42:25 riz Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.96.4.2 2013/09/07 16:41:08 bouyer Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.105.4.1 2012/10/24 03:41:51 riz Exp
+ *	NetBSD: miidevs,v 1.105.4.2 2013/09/07 16:39:32 bouyer Exp
  */
 
 /*-
@@ -83,7 +83,9 @@ struct mii_knowndev mii_knowndevs[] = {
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5481, MII_STR_BROADCOM2_BCM5481 },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5482, MII_STR_BROADCOM2_BCM5482 },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5755, MII_STR_BROADCOM2_BCM5755 },
+ { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5756, MII_STR_BROADCOM2_BCM5756 },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5754, MII_STR_BROADCOM2_BCM5754 },
+ { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5708S, MII_STR_BROADCOM2_BCM5708S },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5785, MII_STR_BROADCOM2_BCM5785 },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5709CAX, MII_STR_BROADCOM2_BCM5709CAX },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5722, MII_STR_BROADCOM2_BCM5722 },
@@ -91,7 +93,11 @@ struct mii_knowndev mii_knowndevs[] = {
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5709C, MII_STR_BROADCOM2_BCM5709C },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5761, MII_STR_BROADCOM2_BCM5761 },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5709S, MII_STR_BROADCOM2_BCM5709S },
+ { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM57780, MII_STR_BROADCOM3_BCM57780 },
+ { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM5717C, MII_STR_BROADCOM3_BCM5717C },
+ { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM5719C, MII_STR_BROADCOM3_BCM5719C },
  { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM57765, MII_STR_BROADCOM3_BCM57765 },
+ { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM5720C, MII_STR_BROADCOM3_BCM5720C },
  { MII_OUI_xxBROADCOM_ALT1, MII_MODEL_xxBROADCOM_ALT1_BCM5906, MII_STR_xxBROADCOM_ALT1_BCM5906 },
  { 

CVS commit: [netbsd-6] src/doc

2013-09-07 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Sep  7 16:44:13 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
tickets 930 931 932 933 934 935 937 938 939


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.32 src/doc/CHANGES-6.2:1.1.2.33
--- src/doc/CHANGES-6.2:1.1.2.32	Mon Aug 26 04:06:25 2013
+++ src/doc/CHANGES-6.2	Sat Sep  7 16:44:13 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.32 2013/08/26 04:06:25 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.33 2013/09/07 16:44:13 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -497,3 +497,185 @@ sys/dev/pci/if_bgereg.h1.57
 	Add support for BCM57762 and BCM57765, found in Apple's Thunderbolt
 	to Gigabit Ethernet adapter.  PR kern/46961
 	[tsutsui, ticket #652]
+sys/fs/udf/udf_allocation.c			1.34
+
+	Fix 32 bit issue in main file read-in function. On both 32 bit and
+	64 bit hosts a missing cast would result in `garbage' after the
+	4Gbyte limit.
+	[reinoud, ticket #930]
+
+sys/dev/pci/virtio.c1.4
+
+	Make sure to check if the driver has a valid intr handler in
+	virtio_detach().
+	Fixes a panic during shutdown on KVM under ubuntu 13.04 with virtio,
+	as reported in PR kern/48105 by Richard Hansen.
+	[tsutsui, ticket #931]
+
+sys/dev/pci/mpii.c1.2, 1.3
+
+	allow more than 1 LUN (changers on LUN 1 can now be found)
+	fix short read (underruns)
+	[kardel, ticket #932]
+
+sys/nfs/nfs_bio.c1.189
+
+	Change nfs_vinvalbuf() to keep errors from vinvalbuf() for fsync() or
+	close().
+	Fix for PR kern/47980 (NFS over-quota not detected if utimes() called
+	before fsync()/close())
+	[hannken, ticket #933]
+
+lib/libc/locale/global_locale.c			patch
+
+	provide consistent and correct data for the C locale.
+	[joerg, ticket #934]
+
+sys/arch/amiga/amiga/amiga_init.c		1.127
+sys/arch/m68k/m68k/pmap_motorola.c		1.66
+
+	Set user page table base address dynamically on amiga. This unbreaks
+	machines with large Zorro III I/O spaces.
+	Patch originally by Michael L. Hitch.
+	[rkujawa, ticket #935]
+
+sys/dev/usb/u3g.c1.30
+sys/dev/usb/usbdevs1.653
+sys/dev/usb/usbdevs.hregen
+sys/dev/usb/usbdevs_data.h			regen
+
+	PR/48172: Reinhard Speyerer:
+	u3g(4): add 4G Systems XS Stick W14 support
+	[dholland, ticket #937]
+
+external/ibm-public/postfix/dist/HISTORY			patch
+external/ibm-public/postfix/dist/src/global/mail_version.h	patch
+external/ibm-public/postfix/dist/src/smtp/smtp_connect.c	patch
+external/ibm-public/postfix/dist/src/smtp/smtp_reuse.c		patch
+external/ibm-public/postfix/dist/src/tls/tls_misc.c		patch
+external/ibm-public/postfix/dist/src/trivial-rewrite/resolve.c	patch
+external/ibm-public/postfix/dist/src/util/exec_command.c	patch
+
+	Update postfix to 2.8.15, fixing several bugs
+	[tron, ticket #938]
+
+sys/dev/pci/if_bge.c		1.203-1.237, 1.239-1.241, 1.243-1.258 via patch
+sys/dev/pci/if_bgereg.h		1.58-1.74, 1.76-1.83 via patch
+sys/dev/pci/if_bgevar.h		1.10-1.16 via patch
+sys/dev/pci/pcidevs		1.1149 via patch
+sys/dev/pci/pcidevs.h		regen
+sys/dev/pci/pcidevs_data.h	regen
+sys/dev/mii/brgphy.c		1.61-1.63, 1.65, 1.67 via patch
+sys/dev/mii/miivar.h		1.61 via patch
+sys/dev/mii/miidevs		1.112-1.113 via patch
+sys/dev/mii/miidevs.h		regen
+sys/dev/mii/miidevs_data.h	regen
+share/man/man4/bge.4		1.13-1.15 via patch
+
+	Add some device support, fix a lot of bugs and add some enahcements.
+	- Add Altima AC1003, APPLE BCM5701, Broadcom BCM5785F,
+	  BCM5785G, BCM5787F, BCM5719, BCM5720, BCM57766, BCM57782 and BCM57786.
+	- brgphy(4): Add BCM5756, BCM5717C, BCM5719C, BCM5720C and BCM57780.
+	- Add some bugfixes and enhancement from FreeBSD:
+	  - Workaround for BCM5906 silicon bug. When auto-negotiation results in
+	   half-duplex operation, excess collision on the ethernet link may
+	   cause internal chip delays that may result in subsequent valid
+	   frames being dropped due to insufficient receive buffer resources.
+	   (FreeBSD: r214219, r214251, r214292)
+	  - Allow write DMA to request larger DMA burst size to get better
+	   performance on BCM5785.
+	   (FreeBSD r21: OpenBSD 1.294)
+	  - Enable TX MAC state machine lockup fix for both BCM5755 or higher
+	   and BCM5906. Publicly available data sheet just says it may happen
+	   due to corrupted TxMbuf.
+	   (FreeBSD r214216)
+	  - Follow Broadcom datasheet:
+	   Delay 100 microseconds after enabling transmit MAC.
+	   Delay 10 microseconds after enabling receive MAC.
+	   (FreeBSD r241220)
+	- Insert the completion barrier between register write and the
+	  consecutive delay(). It will fix some device timeout problems
+	  we have seen before.
+	- Add DELAY(40) after turning on write DMA state machine.
+	- Add some workarounds for 5717 A0 and 5776[56] to be 

CVS commit: [netbsd-6] src/sys/dev

2013-08-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 26 04:00:16 UTC 2013

Modified Files:
src/sys/dev/mii [netbsd-6]: brgphy.c
src/sys/dev/pci [netbsd-6]: if_bge.c if_bgereg.h

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #652):
sys/dev/mii/brgphy.c1.60
sys/dev/pci/if_bge.c1.202
sys/dev/pci/if_bgereg.h 1.57
Add support for BCM57762 and BCM57765, found in Apple's Thunderbolt
to Gigabit Ethernet adapter.  PR kern/46961.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.59.8.1 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.200 -r1.200.2.1 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.56 -r1.56.18.1 src/sys/dev/pci/if_bgereg.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/brgphy.c
diff -u src/sys/dev/mii/brgphy.c:1.59 src/sys/dev/mii/brgphy.c:1.59.8.1
--- src/sys/dev/mii/brgphy.c:1.59	Tue Jun  7 10:10:44 2011
+++ src/sys/dev/mii/brgphy.c	Mon Aug 26 04:00:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphy.c,v 1.59 2011/06/07 10:10:44 cegger Exp $	*/
+/*	$NetBSD: brgphy.c,v 1.59.8.1 2013/08/26 04:00:16 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: brgphy.c,v 1.59 2011/06/07 10:10:44 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: brgphy.c,v 1.59.8.1 2013/08/26 04:00:16 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -205,6 +205,9 @@ static const struct mii_phydesc brgphys[
 	{ MII_OUI_BROADCOM2,		MII_MODEL_BROADCOM2_BCM5785,
 	  MII_STR_BROADCOM2_BCM5785 },
 
+	{ MII_OUI_BROADCOM3,		MII_MODEL_BROADCOM3_BCM57765,
+	  MII_STR_BROADCOM3_BCM57765 },
+
 	{ MII_OUI_xxBROADCOM_ALT1,	MII_MODEL_xxBROADCOM_ALT1_BCM5906,
 	  MII_STR_xxBROADCOM_ALT1_BCM5906 },
 

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.200 src/sys/dev/pci/if_bge.c:1.200.2.1
--- src/sys/dev/pci/if_bge.c:1.200	Thu Feb  2 19:43:05 2012
+++ src/sys/dev/pci/if_bge.c	Mon Aug 26 04:00:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.200 2012/02/02 19:43:05 tls Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.200.2.1 2013/08/26 04:00:16 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.200 2012/02/02 19:43:05 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.200.2.1 2013/08/26 04:00:16 msaitoh Exp $);
 
 #include vlan.h
 
@@ -564,6 +564,10 @@ static const struct bge_product {
 	  Broadcom BCM57761 Fast Ethernet,
 	  },
 	{ PCI_VENDOR_BROADCOM,
+	  PCI_PRODUCT_BROADCOM_BCM57762,
+	  Broadcom BCM57762 Gigabit Ethernet,
+	  },
+	{ PCI_VENDOR_BROADCOM,
 	  PCI_PRODUCT_BROADCOM_BCM57765,
 	  Broadcom BCM57765 Fast Ethernet,
 	  },
@@ -728,6 +732,7 @@ static const struct bge_revision bge_maj
 	{ BGE_ASICREV_BCM57780, unknown BCM57780 },
 	{ BGE_ASICREV_BCM5717, unknown BCM5717 },
 	{ BGE_ASICREV_BCM57765, unknown BCM57765 },
+	{ BGE_ASICREV_BCM57766, unknown BCM57766 },
 
 	{ 0, NULL }
 };
@@ -1969,7 +1974,23 @@ bge_blockinit(struct bge_softc *sc)
 #else
 
 	/* new broadcom docs strongly recommend these: */
-	if (!BGE_IS_5705_PLUS(sc)) {
+	if (BGE_ASICREV(sc-bge_chipid) == BGE_ASICREV_BCM5717 ||
+	BGE_ASICREV(sc-bge_chipid) == BGE_ASICREV_BCM57765 ||
+	BGE_ASICREV(sc-bge_chipid) == BGE_ASICREV_BCM57766) {
+		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_READDMA_LOWAT, 0x0);
+		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_MACRX_LOWAT, 0x2a);
+		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_HIWAT, 0xa0);
+	} else if (BGE_IS_5705_PLUS(sc)) {
+		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_READDMA_LOWAT, 0x0);
+
+		if (BGE_ASICREV(sc-bge_chipid) == BGE_ASICREV_BCM5906) {
+			CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_MACRX_LOWAT, 0x04);
+			CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_HIWAT, 0x10);
+		} else {
+			CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_MACRX_LOWAT, 0x10);
+			CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_HIWAT, 0x60);
+		}
+	} else if (!BGE_IS_5705_PLUS(sc)) {
 		if (ifp-if_mtu  ETHER_MAX_LEN) {
 			CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_READDMA_LOWAT, 0x50);
 			CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_MACRX_LOWAT, 0x20);
@@ -1979,10 +2000,6 @@ bge_blockinit(struct bge_softc *sc)
 			CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_MACRX_LOWAT, 152);
 			CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_HIWAT, 380);
 		}
-	} else if (BGE_ASICREV(sc-bge_chipid) == BGE_ASICREV_BCM5906) {
-		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_READDMA_LOWAT, 0x0);
-		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_MACRX_LOWAT, 0x04);
-		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_HIWAT, 0x10);
 	} else {
 		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_READDMA_LOWAT, 0x0);
 		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_MACRX_LOWAT, 0x10);
@@ -2031,7 +2048,12 @@ bge_blockinit(struct bge_softc *sc)
 	/* Step 41: Initialize the standard RX ring control block */
 	rcb = sc-bge_rdata-bge_info.bge_std_rx_rcb;
 	

CVS commit: [netbsd-6] src/doc

2013-08-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 26 04:06:25 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1 CHANGES-6.2

Log Message:
Ticket 652.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.128 -r1.1.2.129 src/doc/CHANGES-6.1
cvs rdiff -u -r1.1.2.31 -r1.1.2.32 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.128 src/doc/CHANGES-6.1:1.1.2.129
--- src/doc/CHANGES-6.1:1.1.2.128	Sun May 12 23:51:22 2013
+++ src/doc/CHANGES-6.1	Mon Aug 26 04:06:25 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.128 2013/05/12 23:51:22 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.129 2013/08/26 04:06:25 msaitoh Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -651,14 +651,6 @@ dist/ipf/tools/ipmon_y.y			patch
 	Fix alignment issues in ipmon.  PR#47101.
 	[nakayama, ticket #651]
 
-sys/dev/mii/brgphy.c1.60
-sys/dev/pci/if_bge.c1.202
-sys/dev/pci/if_bgereg.h1.57
-
-	Add support for BCM57762 and BCM57765, found in Apple's Thunderbolt
-	to Gigabit Ethernet adapter.  PR kern/46961
-	[tsutsui, ticket #652]
-
 lib/libnpf/npf.c1.14
 usr.sbin/npf/npfctl/npf_var.h			1.5
 

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.31 src/doc/CHANGES-6.2:1.1.2.32
--- src/doc/CHANGES-6.2:1.1.2.31	Sat Aug 10 22:52:34 2013
+++ src/doc/CHANGES-6.2	Mon Aug 26 04:06:25 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.31 2013/08/10 22:52:34 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.32 2013/08/26 04:06:25 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -490,3 +490,10 @@ sys/dev/i2c/w83795greg.h			1.1
 	device, as used in the HP Microserver N36L/N40L/N54L.
 	[matt, ticket #929]
 
+sys/dev/mii/brgphy.c1.60
+sys/dev/pci/if_bge.c1.202
+sys/dev/pci/if_bgereg.h1.57
+
+	Add support for BCM57762 and BCM57765, found in Apple's Thunderbolt
+	to Gigabit Ethernet adapter.  PR kern/46961
+	[tsutsui, ticket #652]



CVS commit: [netbsd-6] src/sys/arch/i386/stand

2013-08-10 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Aug 10 22:42:29 UTC 2013

Modified Files:
src/sys/arch/i386/stand/boot [netbsd-6]: boot2.c
src/sys/arch/i386/stand/lib [netbsd-6]: bootmenu.c bootmenu.h

Log Message:
Pull up following revision(s) (requested by he in ticket #925):
sys/arch/i386/stand/lib/bootmenu.c: revision 1.11
sys/arch/i386/stand/lib/bootmenu.h: revision 1.3
sys/arch/i386/stand/boot/boot2.c: revision 1.59
Two changes for the i386 boot loader related to the boot menu which
can be defined in boot.cfg:
 * Add a menu command which re-displays the menu and initiates
   the timed countdown
 * Use any default command defined in boot.cfg as default args
   if the user runs boot with no arguments
This is useful in circumstances where you e.g. need to interrupt
the normal boot process to switch to serial console, and where
simply boot netbsd is no longer sufficient (e.g. as with install
media which needs the miniroot kernel module loaded).


To generate a diff of this commit:
cvs rdiff -u -r1.57.2.1 -r1.57.2.2 src/sys/arch/i386/stand/boot/boot2.c
cvs rdiff -u -r1.10 -r1.10.8.1 src/sys/arch/i386/stand/lib/bootmenu.c
cvs rdiff -u -r1.2 -r1.2.26.1 src/sys/arch/i386/stand/lib/bootmenu.h

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

Modified files:

Index: src/sys/arch/i386/stand/boot/boot2.c
diff -u src/sys/arch/i386/stand/boot/boot2.c:1.57.2.1 src/sys/arch/i386/stand/boot/boot2.c:1.57.2.2
--- src/sys/arch/i386/stand/boot/boot2.c:1.57.2.1	Sun Aug 12 18:56:54 2012
+++ src/sys/arch/i386/stand/boot/boot2.c	Sat Aug 10 22:42:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot2.c,v 1.57.2.1 2012/08/12 18:56:54 martin Exp $	*/
+/*	$NetBSD: boot2.c,v 1.57.2.2 2013/08/10 22:42:29 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -120,6 +120,9 @@ void	command_quit(char *);
 void	command_boot(char *);
 void	command_dev(char *);
 void	command_consdev(char *);
+#ifndef SMALL
+void	command_menu(char *);
+#endif
 void	command_modules(char *);
 void	command_multiboot(char *);
 
@@ -131,6 +134,9 @@ const struct bootblk_command commands[] 
 	{ boot,	command_boot },
 	{ dev,	command_dev },
 	{ consdev,	command_consdev },
+#ifndef SMALL
+	{ menu,	command_menu },
+#endif
 	{ modules,	command_modules },
 	{ load,	module_add },
 	{ multiboot,	command_multiboot },
@@ -394,6 +400,9 @@ command_help(char *arg)
 	   dev xd[N[x]]:\n
 	   consdev {pc|com[0123]|com[0123]kbd|auto}\n
 	   vesa {modenum|on|off|enabled|disabled|list}\n
+#ifndef SMALL
+	   menu (reenters boot menu, if defined in boot.cfg)\n
+#endif
 	   modules {on|off|enabled|disabled}\n
 	   load {path_to_module}\n
 	   multiboot [xdNx:][filename] [args]\n
@@ -439,6 +448,10 @@ command_boot(char *arg)
 		bootit(filename, howto, tell);
 	} else {
 		int i;
+
+#ifndef SMALL
+		bootdefault();
+#endif
 		for (i = 0; i  NUMNAMES; i++) {
 			bootit(names[i][0], howto, tell);
 			bootit(names[i][1], howto, tell);
@@ -504,6 +517,21 @@ command_consdev(char *arg)
 	printf(invalid console device.\n);
 }
 
+#ifndef SMALL
+/* ARGSUSED */
+void
+command_menu(char *arg)
+{
+
+	if (bootconf.nummenu  0) {
+		/* Does not return */
+		doboottypemenu();
+	} else {
+		printf(No menu defined in boot.cfg\n);
+	}
+}
+#endif /* !SMALL */
+
 void
 command_modules(char *arg)
 {

Index: src/sys/arch/i386/stand/lib/bootmenu.c
diff -u src/sys/arch/i386/stand/lib/bootmenu.c:1.10 src/sys/arch/i386/stand/lib/bootmenu.c:1.10.8.1
--- src/sys/arch/i386/stand/lib/bootmenu.c:1.10	Thu Aug 18 13:20:04 2011
+++ src/sys/arch/i386/stand/lib/bootmenu.c	Sat Aug 10 22:42:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootmenu.c,v 1.10 2011/08/18 13:20:04 christos Exp $	*/
+/*	$NetBSD: bootmenu.c,v 1.10.8.1 2013/08/10 22:42:29 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -41,6 +41,8 @@
 
 #define isnum(c) ((c) = '0'  (c) = '9')
 
+static void docommandchoice(int);
+
 extern struct x86_boot_params boot_params;
 extern	const char bootprog_name[], bootprog_rev[], bootprog_kernrev[];
 
@@ -297,11 +299,57 @@ getchoicefrominput(char *input, int def)
 	return choice;
 }
 
+static void
+docommandchoice(int choice)
+{
+	char input[80], *ic, *oc;
+
+	ic = bootconf.command[choice];
+	/* Split command string at ; into separate commands */
+	do {
+		oc = input;
+		/* Look for ; separator */
+		for (; *ic  *ic != COMMAND_SEPARATOR; ic++)
+			*oc++ = *ic;
+		if (*input == '\0')
+			continue;
+		/* Strip out any trailing spaces */
+		oc--;
+		for (; *oc == ' '  oc  input; oc--);
+		*++oc = '\0';
+		if (*ic == COMMAND_SEPARATOR)
+			ic++;
+		/* Stop silly command strings like ;;; */
+		if (*input != '\0')
+			docommand(input);
+		/* Skip leading spaces */
+		for (; *ic == ' '; ic++);
+	} while (*ic);
+}
+
+void
+bootdefault(void)
+{
+	int choice;
+	static int entered;
+
+	if (bootconf.nummenu  0) {
+		if (entered) {
+			printf(default boot twice, 

CVS commit: [netbsd-6] src/sys/dev/i2c

2013-08-10 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Aug 10 22:50:56 UTC 2013

Modified Files:
src/sys/dev/i2c [netbsd-6]: files.i2c
Added Files:
src/sys/dev/i2c [netbsd-6]: w83795g.c w83795greg.h

Log Message:
Pull up following revision(s) (requested by matt in ticket #929):
sys/dev/i2c/w83795g.c: revision 1.1
sys/dev/i2c/w83795greg.h: revision 1.1
sys/dev/i2c/files.i2c: revision 1.50
Add driver for Nuvoton W83795G voltage/temp/fan/gpio monitoring device.
As used in the HP Microserver N36L/N40L/N54L:
w83795g* at iic? addr 0x2f
gpio* at gpiobus?
Note that the gpio and watchdog functionality appears to be useless on
the Microserver, as the gpio pins don't affect the LED's and a watchdog
trigger does not cause a reset. Perhaps the reset pin just isn't wired.
There are quite flexible fan control options as well as just monitoring,
but it is not clear to me how best to export that function to userspace.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.45.6.1 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/i2c/w83795g.c \
src/sys/dev/i2c/w83795greg.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/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.45 src/sys/dev/i2c/files.i2c:1.45.6.1
--- src/sys/dev/i2c/files.i2c:1.45	Fri Nov 18 22:18:08 2011
+++ src/sys/dev/i2c/files.i2c	Sat Aug 10 22:50:56 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.45 2011/11/18 22:18:08 jmcneill Exp $
+#	$NetBSD: files.i2c,v 1.45.6.1 2013/08/10 22:50:56 riz Exp $
 
 obsolete defflag	opt_i2cbus.h		I2C_SCAN
 define	i2cbus { }
@@ -171,3 +171,8 @@ file	dev/i2c/g760a.c			g760a
 device	ibmhawk: sysmon_envsys
 attach	ibmhawk at iic
 file	dev/i2c/ibmhawk.c		ibmhawk
+ 
+# Nuvoton W83795G/ADG Hardware Monitor
+device	w83795g: gpiobus, sysmon_envsys, sysmon_wdog
+attach	w83795g at iic
+file	dev/i2c/w83795g.c 		w83795g

Added files:

Index: src/sys/dev/i2c/w83795g.c
diff -u /dev/null src/sys/dev/i2c/w83795g.c:1.1.2.2
--- /dev/null	Sat Aug 10 22:50:56 2013
+++ src/sys/dev/i2c/w83795g.c	Sat Aug 10 22:50:56 2013
@@ -0,0 +1,452 @@
+/*	$NetBSD: w83795g.c,v 1.1.2.2 2013/08/10 22:50:56 riz Exp $	*/
+
+/*
+ * Copyright (c) 2013 Soren S. Jorvang.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: w83795g.c,v 1.1.2.2 2013/08/10 22:50:56 riz Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+#include sys/conf.h
+#include sys/gpio.h
+#include sys/wdog.h
+
+#include dev/i2c/i2cvar.h
+#include dev/gpio/gpiovar.h
+#include dev/sysmon/sysmonvar.h
+
+#include dev/i2c/w83795greg.h
+
+#define NUM_SENSORS 53
+static const struct w83795g_sensor {
+	const char *desc;
+	enum envsys_units type;
+	uint8_t en_reg;
+	uint8_t en_mask;
+	uint8_t en_bits;
+	uint8_t msb;
+} sensors[NUM_SENSORS] = {
+#define _VOLT ENVSYS_SVOLTS_DC
+	{ VSEN1,   _VOLT, W83795G_V_CTRL1, 0x01, 0x01, W83795G_VSEN1 },
+	{ VSEN2,   _VOLT, W83795G_V_CTRL1, 0x02, 0x02, W83795G_VSEN2 },
+	{ VSEN3,   _VOLT, W83795G_V_CTRL1, 0x04, 0x04, W83795G_VSEN3 },
+	{ VSEN4,   _VOLT, W83795G_V_CTRL1, 0x08, 0x08, W83795G_VSEN4 },
+	{ VSEN5,   _VOLT, W83795G_V_CTRL1, 0x10, 0x10, W83795G_VSEN5 },
+	{ VSEN6,   _VOLT, W83795G_V_CTRL1, 0x20, 0x20, W83795G_VSEN6 },
+	{ VSEN7,   _VOLT, W83795G_V_CTRL1, 0x40, 0x40, W83795G_VSEN7 },
+	{ VSEN8,   _VOLT, W83795G_V_CTRL1, 0x80, 0x80, W83795G_VSEN8 },
+	{ VSEN9,   _VOLT, W83795G_V_CTRL2, 0x01, 0x01, W83795G_VSEN9 },
+	{ VSEN10,  _VOLT, W83795G_V_CTRL2, 0x02, 0x02, W83795G_VSEN10 },
+	{ VSEN11,  _VOLT, W83795G_V_CTRL2, 0x04, 0x04, W83795G_VSEN11 },
+	{ VTT, 

CVS commit: [netbsd-6] src/doc

2013-08-10 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Aug 10 22:52:34 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Tickets 925, 929.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.30 src/doc/CHANGES-6.2:1.1.2.31
--- src/doc/CHANGES-6.2:1.1.2.30	Thu Aug  8 21:59:43 2013
+++ src/doc/CHANGES-6.2	Sat Aug 10 22:52:34 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.30 2013/08/08 21:59:43 snj Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.31 2013/08/10 22:52:34 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -474,3 +474,19 @@ sys/netinet6/nd6_rtr.c1.86
 	PR/47576.
 	[msaitoh, ticket #926]
 
+sys/arch/i386/stand/boot/boot2.c		1.59
+sys/arch/i386/stand/lib/bootmenu.c		1.11
+sys/arch/i386/stand/lib/bootmenu.h		1.3
+
+	x86 bootloader changes:  add menu command, and allow
+	default command to be defined in boot.cfg.
+	[he, ticket #925]
+
+sys/dev/i2c/files.i2c1.50 via patch
+sys/dev/i2c/w83795g.c1.1
+sys/dev/i2c/w83795greg.h			1.1
+
+	Add driver for Nuvoton W83795G voltage/temp/fan/gpio monitoring
+	device, as used in the HP Microserver N36L/N40L/N54L.
+	[matt, ticket #929]
+



CVS commit: [netbsd-6] src/sys/netinet6

2013-08-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Aug  8 21:58:55 UTC 2013

Modified Files:
src/sys/netinet6 [netbsd-6]: nd6_rtr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #926):
sys/netinet6/nd6_rtr.c: revision 1.86
PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.


To generate a diff of this commit:
cvs rdiff -u -r1.82.4.2 -r1.82.4.3 src/sys/netinet6/nd6_rtr.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/netinet6/nd6_rtr.c
diff -u src/sys/netinet6/nd6_rtr.c:1.82.4.2 src/sys/netinet6/nd6_rtr.c:1.82.4.3
--- src/sys/netinet6/nd6_rtr.c:1.82.4.2	Fri Jul 12 11:18:15 2013
+++ src/sys/netinet6/nd6_rtr.c	Thu Aug  8 21:58:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.82.4.2 2013/07/12 11:18:15 jdc Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.82.4.3 2013/08/08 21:58:55 snj Exp $	*/
 /*	$KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nd6_rtr.c,v 1.82.4.2 2013/07/12 11:18:15 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: nd6_rtr.c,v 1.82.4.3 2013/08/08 21:58:55 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1038,10 +1038,12 @@ prelist_remove(struct nd_prefix *pr)
 		free(pfr, M_IP6NDP);
 	}
 
-	ext-nprefixes--;
-	if (ext-nprefixes  0) {
-		log(LOG_WARNING, prelist_remove: negative count on %s\n,
-		pr-ndpr_ifp-if_xname);
+	if (ext) {
+		ext-nprefixes--;
+		if (ext-nprefixes  0) {
+			log(LOG_WARNING, prelist_remove: negative count on 
+			%s\n, pr-ndpr_ifp-if_xname);
+		}
 	}
 	splx(s);
 



CVS commit: [netbsd-6] src/doc

2013-08-08 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Aug  8 21:59:43 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
926


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.29 src/doc/CHANGES-6.2:1.1.2.30
--- src/doc/CHANGES-6.2:1.1.2.29	Mon Aug  5 10:09:53 2013
+++ src/doc/CHANGES-6.2	Thu Aug  8 21:59:43 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.29 2013/08/05 10:09:53 martin Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.30 2013/08/08 21:59:43 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -468,3 +468,9 @@ sys/dev/pci/pci_subr.c		1.92-1.102, 1.10
 	Fix bug in comment.
 	[msaitoh, ticket #928]
 
+sys/netinet6/nd6_rtr.c1.86
+
+	Avoid crash destroying tap0 after deleting its link-local address.
+	PR/47576.
+	[msaitoh, ticket #926]
+



CVS commit: [netbsd-6] src

2013-08-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Aug  5 10:09:53 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2
src/sys/dev/pci [netbsd-6]: pci_subr.c pcireg.h

Log Message:
Pullup

sys/dev/pci/pcireg.h1.74-1.82 and 1.84 via patch
sys/dev/pci/pci_subr.c  1.92-1.102, 1.104-1.105 via patch

Add some PCI(e) register and bit definitions in pcireg.h.
Fix the definition of PCI_PCIE_SLCAP_PSN.
Fix a bug that IRQ(MSI) bits in PCIe capability register is incorrectly
decoded.
Print more registers in pcictl dump.
Fix bug in comment.

Requested by msaitoh in ticket #928


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-6.2
cvs rdiff -u -r1.90 -r1.90.2.1 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.73 -r1.73.8.1 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/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.28 src/doc/CHANGES-6.2:1.1.2.29
--- src/doc/CHANGES-6.2:1.1.2.28	Fri Aug  2 20:12:30 2013
+++ src/doc/CHANGES-6.2	Mon Aug  5 10:09:53 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.28 2013/08/02 20:12:30 martin Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.29 2013/08/05 10:09:53 martin Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -456,3 +456,15 @@ sys/kern/uipc_socket.c1.216
 	Fix an inversion in checking for authorization to drop TCP connections
 	found (and the obvious fix suggested) by Sander Bos.
 	[spz, ticket #927]
+
+sys/dev/pci/pcireg.h		1.74-1.82 and 1.84 via patch
+sys/dev/pci/pci_subr.c		1.92-1.102, 1.104-1.105 via patch
+
+	Add some PCI(e) register and bit definitions in pcireg.h.
+	Fix the definition of PCI_PCIE_SLCAP_PSN.
+	Fix a bug that IRQ(MSI) bits in PCIe capability register is incorrectly
+	decoded.
+	Print more registers in pcictl dump.
+	Fix bug in comment.
+	[msaitoh, ticket #928]
+

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.90 src/sys/dev/pci/pci_subr.c:1.90.2.1
--- src/sys/dev/pci/pci_subr.c:1.90	Sun Jan 29 11:31:38 2012
+++ src/sys/dev/pci/pci_subr.c	Mon Aug  5 10:09:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.90 2012/01/29 11:31:38 drochner Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.90.2.1 2013/08/05 10:09:53 martin 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.90 2012/01/29 11:31:38 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.90.2.1 2013/08/05 10:09:53 martin Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pci.h
@@ -90,6 +90,7 @@ static const struct pci_class pci_subcla
 	{ ATA,		PCI_SUBCLASS_MASS_STORAGE_ATA,	NULL,	},
 	{ SATA,		PCI_SUBCLASS_MASS_STORAGE_SATA,	NULL,	},
 	{ SAS,		PCI_SUBCLASS_MASS_STORAGE_SAS,	NULL,	},
+	{ NVM,		PCI_SUBCLASS_MASS_STORAGE_NVM,	NULL,	},
 	{ miscellaneous,	PCI_SUBCLASS_MASS_STORAGE_MISC,	NULL,	},
 	{ NULL,			0,NULL,	},
 };
@@ -118,6 +119,7 @@ static const struct pci_class pci_subcla
 	{ video,		PCI_SUBCLASS_MULTIMEDIA_VIDEO,	NULL,	},
 	{ audio,		PCI_SUBCLASS_MULTIMEDIA_AUDIO,	NULL,	},
 	{ telephony,		PCI_SUBCLASS_MULTIMEDIA_TELEPHONY, NULL,},
+	{ HD audio,		PCI_SUBCLASS_MULTIMEDIA_HDAUDIO, NULL,	},
 	{ miscellaneous,	PCI_SUBCLASS_MULTIMEDIA_MISC,	NULL,	},
 	{ NULL,			0,NULL,	},
 };
@@ -452,7 +454,7 @@ pci_aprint_devinfo_fancy(const struct pc
  * in a device attach routine like this:
  *
  *	#ifdef MYDEV_DEBUG
- *		printf(%s: , device_xname(sc-sc_dev));
+ *		printf(%s: , device_xname(sc-sc_dev));
  *		pci_conf_print(pa-pa_pc, pa-pa_tag, NULL);
  *	#endif
  */
@@ -807,24 +809,112 @@ pci_conf_print_type0(
 }
 
 static void
+pci_print_pcie_L0s_latency(uint32_t val)
+{
+
+	switch (val) {
+	case 0x0:
+		printf(Less than 64ns\n);
+		break;
+	case 0x1:
+	case 0x2:
+	case 0x3:
+		printf(%dns to less than %dns\n, 32  val, 32  (val + 1));
+		break;
+	case 0x4:
+		printf(512ns to less than 1us\n);
+		break;
+	case 0x5:
+		printf(1us to less than 2us\n);
+		break;
+	case 0x6:
+		printf(2us - 4us\n);
+		break;
+	case 0x7:
+		printf(More than 4us\n);
+		break;
+	}
+}
+
+static void
+pci_print_pcie_L1_latency(uint32_t val)
+{
+
+	switch (val) {
+	case 0x0:
+		printf(Less than 1us\n);
+		break;
+	case 0x6:
+		printf(32us - 64us\n);
+		break;
+	case 0x7:
+		printf(More than 64us\n);
+		break;
+	default:
+		printf(%dus to less than %dus\n, 1  (val - 1), 1  val);
+		break;
+	}
+}
+
+static void
+pci_print_pcie_compl_timeout(uint32_t val)
+{
+
+	switch (val) {
+	case 0x0:
+		printf(50us to 50ms\n);
+		break;
+	case 0x5:
+		printf(16ms to 55ms\n);
+		break;
+	case 0x6:
+		printf(65ms to 210ms\n);
+		break;
+	case 0x9:
+		printf(260ms to 900ms\n);
+		break;
+	case 0xa:
+		printf(1s to 3.5s\n);
+		break;
+	default:
+		printf(unknown %u value\n, val);
+		break;
+	}
+}
+
+static void
 

CVS commit: [netbsd-6] src

2013-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  2 20:12:30 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2
src/sys/kern [netbsd-6]: uipc_socket.c

Log Message:
Pullup ticket #927:

sys/kern/uipc_socket.c  1.216

Fix an inversion in checking for authorization to drop TCP connections
found (and the obvious fix suggested) by Sander Bos.

Requested by spz.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-6.2
cvs rdiff -u -r1.209.2.2 -r1.209.2.3 src/sys/kern/uipc_socket.c

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.27 src/doc/CHANGES-6.2:1.1.2.28
--- src/doc/CHANGES-6.2:1.1.2.27	Tue Jul 30 08:22:28 2013
+++ src/doc/CHANGES-6.2	Fri Aug  2 20:12:30 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.27 2013/07/30 08:22:28 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.28 2013/08/02 20:12:30 martin Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -451,3 +451,8 @@ include/res_update.h1.8
 
 	Restore libresolv missing bits, including NS updates.
 	[manu, ticket #887]
+
+sys/kern/uipc_socket.c1.216
+	Fix an inversion in checking for authorization to drop TCP connections
+	found (and the obvious fix suggested) by Sander Bos.
+	[spz, ticket #927]

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.209.2.2 src/sys/kern/uipc_socket.c:1.209.2.3
--- src/sys/kern/uipc_socket.c:1.209.2.2	Thu Feb 14 22:13:59 2013
+++ src/sys/kern/uipc_socket.c	Fri Aug  2 20:12:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.209.2.2 2013/02/14 22:13:59 jdc Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.209.2.3 2013/08/02 20:12:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.209.2.2 2013/02/14 22:13:59 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.209.2.3 2013/08/02 20:12:30 martin Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_sock_counters.h
@@ -416,7 +416,7 @@ socket_listener_cb(kauth_cred_t cred, ka
 		/* Normal users can only drop their own connections. */
 		struct socket *so = (struct socket *)arg1;
 
-		if (proc_uidmatch(cred, so-so_cred))
+		if (proc_uidmatch(cred, so-so_cred) == 0)
 			result = KAUTH_RESULT_ALLOW;
 
 		break;



CVS commit: [netbsd-6] src/doc

2013-07-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jul 30 07:00:06 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Fix minor typo in entry for #909


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.25 src/doc/CHANGES-6.2:1.1.2.26
--- src/doc/CHANGES-6.2:1.1.2.25	Tue Jul 30 04:07:25 2013
+++ src/doc/CHANGES-6.2	Tue Jul 30 07:00:06 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.25 2013/07/30 04:07:25 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.26 2013/07/30 07:00:06 martin Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -335,7 +335,7 @@ usr.sbin/pppd/pppd/sys-bsd.c			1.68
 
 sys/net/route.c	1.127
 
-	Fix creation of arp entries for pppd's proxarp option. Fixes PR#44032.
+	Fix creation of arp entries for pppd's proxyarp option. Fixes PR#44032.
 	[christos, ticket #909]
 
 sys/kern/subr_disk_mbr.c			1.46



CVS commit: [netbsd-6] src/doc

2013-07-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 08:22:28 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket #887.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.26 src/doc/CHANGES-6.2:1.1.2.27
--- src/doc/CHANGES-6.2:1.1.2.26	Tue Jul 30 07:00:06 2013
+++ src/doc/CHANGES-6.2	Tue Jul 30 08:22:28 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.26 2013/07/30 07:00:06 martin Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.27 2013/07/30 08:22:28 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -421,6 +421,7 @@ lib/libc/sys/msgsnd.21.19-1.20
 	[skrll, ticket #922]
 
 lib/libperfuse/ops.c1.61-1.62
+
 	One more explicit error log, and two bug fixes
 	1) with recent FUSE, when lookup returns a null ino, it means ENOENT
 	2) odd corner case that caused a bug on dd if=test of=test conv=notrunc
@@ -430,3 +431,23 @@ lib/libperfuse/ops.c1.61-1.62
 	   the read FH.
 	Catch open without FREAD|FWRITE (it should not happen)
 	[manu, ticket #923]
+
+lib/libc/nameser/ns_samedomain.c		1.7-1.8
+lib/libresolv/Makefile 1.12
+lib/libresolv/dst_api.c1.1-1.3
+lib/libresolv/dst_internal.h			1.1-1.2
+lib/libresolv/hmac_link.c			1.1-1.2
+lib/libresolv/ns_date.c1.1
+lib/libresolv/ns_sign.c1.1
+lib/libresolv/ns_verify.c			1.1-1.2
+lib/libresolv/res_findzonecut.c			1.1
+lib/libresolv/res_mkupdate.c			1.1-1.2
+lib/libresolv/res_mkupdate.h			1.1
+lib/libresolv/res_private.h			1.1
+lib/libresolv/res_sendsigned.c			1.1
+lib/libresolv/res_update.c			1.1
+lib/libresolv/support.c1.1
+include/res_update.h1.8
+
+	Restore libresolv missing bits, including NS updates.
+	[manu, ticket #887]



CVS commit: [netbsd-6] src/sys/kern

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 06:00:35 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_disk_mbr.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #910):
sys/kern/subr_disk_mbr.c: revision 1.46
If the MBR is a protective MBR, don't bother looking at it.


To generate a diff of this commit:
cvs rdiff -u -r1.42.8.1 -r1.42.8.2 src/sys/kern/subr_disk_mbr.c

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

Modified files:

Index: src/sys/kern/subr_disk_mbr.c
diff -u src/sys/kern/subr_disk_mbr.c:1.42.8.1 src/sys/kern/subr_disk_mbr.c:1.42.8.2
--- src/sys/kern/subr_disk_mbr.c:1.42.8.1	Sun Aug 12 19:02:33 2012
+++ src/sys/kern/subr_disk_mbr.c	Mon Jul 29 06:00:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_disk_mbr.c,v 1.42.8.1 2012/08/12 19:02:33 martin Exp $	*/
+/*	$NetBSD: subr_disk_mbr.c,v 1.42.8.2 2013/07/29 06:00:35 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -54,7 +54,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_disk_mbr.c,v 1.42.8.1 2012/08/12 19:02:33 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_disk_mbr.c,v 1.42.8.2 2013/07/29 06:00:35 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -160,6 +160,15 @@ scan_mbr(mbr_args_t *a, int (*actn)(mbr_
 		if (mbr-mbr_magic != htole16(MBR_MAGIC))
 			return SCAN_CONTINUE;
 
+		/*
+		 * If this is a protective MBR, bail now.
+		 */
+		if (mbr-mbr_parts[0].mbrp_type == MBR_PTYPE_PMBR
+		 mbr-mbr_parts[1].mbrp_type == MBR_PTYPE_UNUSED
+		 mbr-mbr_parts[2].mbrp_type == MBR_PTYPE_UNUSED
+		 mbr-mbr_parts[3].mbrp_type == MBR_PTYPE_UNUSED)
+			return SCAN_CONTINUE;
+
 		/* Copy data out of buffer so action can use bp */
 		memcpy(ptns, mbr-mbr_parts, sizeof ptns);
 



CVS commit: [netbsd-6] src/usr.bin/netstat

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 06:11:02 UTC 2013

Modified Files:
src/usr.bin/netstat [netbsd-6]: inet.c inet6.c main.c netstat.h

Log Message:
Pull up following revision(s) (requested by christos in ticket #912):
usr.bin/netstat/main.c: revision 1.86
usr.bin/netstat/netstat.h: revision 1.47
usr.bin/netstat/inet.c: revision 1.102
usr.bin/netstat/inet.c: revision 1.103
usr.bin/netstat/inet6.c: revision 1.61
usr.bin/netstat/inet6.c: revision 1.62
Don't use -P as a kmem printer, verify that the address points to a pcb first!
Not all pointers are 64bit - use uintptr_t instead of uint64_t.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.101.2.1 src/usr.bin/netstat/inet.c
cvs rdiff -u -r1.59 -r1.59.6.1 src/usr.bin/netstat/inet6.c
cvs rdiff -u -r1.81 -r1.81.4.1 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.43 -r1.43.4.1 src/usr.bin/netstat/netstat.h

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/inet.c
diff -u src/usr.bin/netstat/inet.c:1.101 src/usr.bin/netstat/inet.c:1.101.2.1
--- src/usr.bin/netstat/inet.c:1.101	Sat Dec 24 20:18:35 2011
+++ src/usr.bin/netstat/inet.c	Mon Jul 29 06:11:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: inet.c,v 1.101 2011/12/24 20:18:35 christos Exp $	*/
+/*	$NetBSD: inet.c,v 1.101.2.1 2013/07/29 06:11:02 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = from: @(#)inet.c	8.4 (Berkeley) 4/20/94;
 #else
-__RCSID($NetBSD: inet.c,v 1.101 2011/12/24 20:18:35 christos Exp $);
+__RCSID($NetBSD: inet.c,v 1.101.2.1 2013/07/29 06:11:02 msaitoh Exp $);
 #endif
 #endif /* not lint */
 
@@ -226,96 +226,72 @@ print_vtw_v4(const vtw_t *vtw)
 		 TCPS_TIME_WAIT, tcp, 0, vtw-expire);
 }
 
-void
-protopr(u_long off, const char *name)
-{
-	struct inpcbtable table;
-	struct inpcb *head, *next, *prev;
-	struct inpcb inpcb;
-	struct tcpcb tcpcb;
-	struct socket sockb;
-	int istcp = strcmp(name, tcp) == 0;
-	static int first = 1;
-
-	compact = 0;
-	if (Aflag) {
-		if (!numeric_addr)
-			width = 18;
-		else {
-			width = 21;
-			compact = 1;
-		}
-	} else
-		width = 22;
-
-	if (use_sysctl) {
-		struct kinfo_pcb *pcblist;
-		int mib[8];
-		size_t namelen = 0, size = 0, i;
-		char *mibname = NULL;
-
-		memset(mib, 0, sizeof(mib));
+struct kinfo_pcb *
+getpcblist_sysctl(const char *name, size_t *len) {
+	int mib[8];
+	size_t namelen = 0, size = 0;
+	char *mibname = NULL;
+	struct kinfo_pcb *pcblist;
 
-		if (asprintf(mibname, net.inet.%s.pcblist, name) == -1)
-			err(1, asprintf);
+	memset(mib, 0, sizeof(mib));
 
-		/* get dynamic pcblist node */
-		if (sysctlnametomib(mibname, mib, namelen) == -1)
-			err(1, sysctlnametomib: %s, mibname);
+	if (asprintf(mibname, net.inet%s.%s.pcblist, name + 3, name) == -1)
+		err(1, asprintf);
 
-		if (prog_sysctl(mib, __arraycount(mib),
-		NULL, size, NULL, 0) == -1)
-			err(1, sysctl (query));
+	/* get dynamic pcblist node */
+	if (sysctlnametomib(mibname, mib, namelen) == -1)
+		err(1, sysctlnametomib: %s, mibname);
 
-		if ((pcblist = malloc(size)) == NULL)
-			err(1, malloc);
-		memset(pcblist, 0, size);
+	free(mibname);
 
-	mib[6] = sizeof(*pcblist);
-	mib[7] = size / sizeof(*pcblist);
+	if (prog_sysctl(mib, __arraycount(mib), NULL, size, NULL, 0) == -1)
+		err(1, sysctl (query));
 
-		if (prog_sysctl(mib, __arraycount(mib),
-		pcblist, size, NULL, 0) == -1)
-			err(1, sysctl (copy));
+	if ((pcblist = malloc(size)) == NULL)
+		err(1, malloc);
+	memset(pcblist, 0, size);
 
-		for (i = 0; i  size / sizeof(*pcblist); i++) {
-			struct sockaddr_in src, dst;
+	mib[6] = sizeof(*pcblist);
+	mib[7] = size / sizeof(*pcblist);
 
-			memcpy(src, pcblist[i].ki_s, sizeof(src));
-			memcpy(dst, pcblist[i].ki_d, sizeof(dst));
+	if (prog_sysctl(mib, __arraycount(mib), pcblist, size, NULL, 0) == -1)
+		err(1, sysctl (copy));
 
-			if (!aflag 
-			inet_lnaof(dst.sin_addr) == INADDR_ANY)
-continue;
+	*len = size / sizeof(*pcblist);
+	return pcblist;
 
-			if (first) {
-protoprhdr();
-first = 0;
-			}
-
-	protopr0((intptr_t) pcblist[i].ki_ppcbaddr,
- pcblist[i].ki_rcvq, pcblist[i].ki_sndq,
- src.sin_addr, src.sin_port,
- dst.sin_addr, dst.sin_port,
- pcblist[i].ki_tstate, name,
- pcblist[i].ki_pflags, NULL);
-		}
+}
 
-		free(pcblist);
-		goto end;
+static struct kinfo_pcb *
+getpcblist_kmem(u_long off, const char *name, size_t *len) {
+	struct inpcbtable table;
+	struct inpcb *head, *next, *prev;
+	struct inpcb inpcb;
+	struct tcpcb tcpcb;
+	struct socket sockb;
+	int istcp = strcmp(name, tcp) == 0;
+	struct kinfo_pcb *pcblist;
+	size_t size = 100, i;
+	struct sockaddr_in sin; 
+
+	if (off == 0) {
+		*len = 0;
+		return NULL;
 	}
 
-	if (off == 0)
-		return;
 	kread(off, (char *)table, sizeof table);
 	prev = head =
 	(struct inpcb *)((struct 

CVS commit: [netbsd-6] src/doc

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 06:13:32 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 908, 909, 910 and 912.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.18 src/doc/CHANGES-6.2:1.1.2.19
--- src/doc/CHANGES-6.2:1.1.2.18	Mon Jul 29 02:16:15 2013
+++ src/doc/CHANGES-6.2	Mon Jul 29 06:13:32 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.18 2013/07/29 02:16:15 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.19 2013/07/29 06:13:32 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -324,3 +324,42 @@ external/bsd/bind/dist/lib/dns/rdata/gen
 
 	Fix for bind CVE-2013-4854.
 	[spz, ticket #924]
+
+usr.sbin/pppd/pppd/sys-bsd.c			1.68
+
+	Add a set_queue_size to avoid more code duplication, and set the queue
+	size of all tty fd's, not just the ones that we create (the ones that
+	we get passed in too). Fixes my iPhone - xl2tpd - pppd VPN from
+	corrupting packets with MTU  ~650.
+	[christos, ticket #908]
+
+sys/net/route.c	1.127
+
+	PR/44032: Proxy entries stopped working with pppd. The issue here is
+	that the route entry was added, but the RTF_LLINFO bit was not set,
+	making arp -a not showing the entry, but netstat -rn -f inet showing
+	it with the missing L bit. The order of resolution in ifa_ifwithroute()
+	is that if a destination address is found, then the interface chosen
+	for the route is that of the destination. This does not work for
+	link-level addresses since the ppp interface does not arp (uses
+	link_rtrequest, not arp_rtrequest), so the bit is never set. The easy
+	solution here is to check that the gateway is a link address, and use
+	the interface which we chose for the link address as opposed to the
+	interface that routes to the destination. This restores the previous
+	behavior, but is it correct?
+	[christos, ticket #909]
+
+sys/kern/subr_disk_mbr.c			1.46
+
+	If the MBR is a protective MBR, don't bother looking at it.
+	[matt, ticket #910]
+
+usr.bin/netstat/inet.c1.102-1.03
+usr.bin/netstat/inet6.c1.61-1.62
+usr.bin/netstat/main.c1.86
+usr.bin/netstat/netstat.h			1.47
+
+	Don't use -P as a kmem printer, verify that the address points to a
+	pcb first!
+	Not all pointers are 64bit - use uintptr_t instead of uint64_t.
+	[christos, ticket #912]



CVS commit: [netbsd-6] src/doc

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 06:47:57 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket #910 fixes PR#47743.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.19 src/doc/CHANGES-6.2:1.1.2.20
--- src/doc/CHANGES-6.2:1.1.2.19	Mon Jul 29 06:13:32 2013
+++ src/doc/CHANGES-6.2	Mon Jul 29 06:47:57 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.19 2013/07/29 06:13:32 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.20 2013/07/29 06:47:57 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -352,6 +352,7 @@ sys/net/route.c	1.127
 sys/kern/subr_disk_mbr.c			1.46
 
 	If the MBR is a protective MBR, don't bother looking at it.
+	Fixes PR#47743.
 	[matt, ticket #910]
 
 usr.bin/netstat/inet.c1.102-1.03



CVS commit: [netbsd-6] src

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 08:11:53 UTC 2013

Modified Files:
src/share/man/man4 [netbsd-6]: re.4
src/sys/dev/ic [netbsd-6]: rtl8169.c rtl81x9reg.h

Log Message:
Pull up following revision(s) (requested by khorben in ticket #913):
sys/dev/ic/rtl8169.c: revision 1.137
sys/dev/ic/rtl81x9reg.h: revision 1.44
share/man/man4/re.4: revision 1.14
Added support for the Realtek 8168F variant in re(4).
From FreeBSD; not tested on real hardware unfortunately. The manual page
was adjusted as well.
No objection from current-users@, commit it gdt@


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.10.1 src/share/man/man4/re.4
cvs rdiff -u -r1.134.4.1 -r1.134.4.2 src/sys/dev/ic/rtl8169.c
cvs rdiff -u -r1.42.4.1 -r1.42.4.2 src/sys/dev/ic/rtl81x9reg.h

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/re.4
diff -u src/share/man/man4/re.4:1.13 src/share/man/man4/re.4:1.13.10.1
--- src/share/man/man4/re.4:1.13	Fri Jan 15 19:24:49 2010
+++ src/share/man/man4/re.4	Mon Jul 29 08:11:53 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: re.4,v 1.13 2010/01/15 19:24:49 joerg Exp $
+.\	$NetBSD: re.4,v 1.13.10.1 2013/07/29 08:11:53 msaitoh Exp $
 .\
 .\ Copyright (c) 2003
 .\	Bill Paul wp...@windriver.com. All rights reserved.
@@ -32,12 +32,12 @@
 .\
 .\ $FreeBSD: src/share/man/man4/re.4,v 1.4 2004/03/04 06:42:46 sanpei Exp $
 .\
-.Dd January 8, 2007
+.Dd April 6, 2013
 .Dt RE 4
 .Os
 .Sh NAME
 .Nm re
-.Nd RealTek 8139C+/8169/8169S/8110S PCI Ethernet adapter driver
+.Nd RealTek 8139C+/8169/8169S/8168/8110S/8111 PCI Ethernet adapter driver
 .Sh SYNOPSIS
 .Cd re* at pci? dev ? function ?
 .Cd re* at cardbus? function ?
@@ -45,8 +45,8 @@
 The
 .Nm
 driver provides support for various NICs based on the RealTek RTL8139C+,
-RTL8169, RTL8169S, and RTL8110S PCI/Cardbus Ethernet controllers, including
-the following:
+RTL8169, RTL8169S, RTL8168, and RTL8110S PCI/Cardbus Ethernet controllers,
+including the following:
 .Pp
 .Bl -bullet -compact
 .It
@@ -73,7 +73,7 @@ Linksys EG1032 rev. 3 Gigabit Ethernet (
 .Pp
 NICs based on the 8139C+ are capable of 10 and 100Mbps speeds over
 CAT5 cable.
-NICs based on the 8169, 8169S, and 8110S are capable of 10, 100, and
+NICs based on the 8169, 8169S, 8168, and 8110S are capable of 10, 100, and
 1000Mbps operation.
 .Pp
 All NICs supported by the

Index: src/sys/dev/ic/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.134.4.1 src/sys/dev/ic/rtl8169.c:1.134.4.2
--- src/sys/dev/ic/rtl8169.c:1.134.4.1	Mon Mar  5 20:31:49 2012
+++ src/sys/dev/ic/rtl8169.c	Mon Jul 29 08:11:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl8169.c,v 1.134.4.1 2012/03/05 20:31:49 sborrill Exp $	*/
+/*	$NetBSD: rtl8169.c,v 1.134.4.2 2013/07/29 08:11:53 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,11 +33,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.134.4.1 2012/03/05 20:31:49 sborrill Exp $);
+__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.134.4.2 2013/07/29 08:11:53 msaitoh Exp $);
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
- * RealTek 8139C+/8169/8169S/8110S PCI NIC driver
+ * RealTek 8139C+/8169/8169S/8168/8110S PCI NIC driver
  *
  * Written by Bill Paul wp...@windriver.com
  * Senior Networking Software Engineer
@@ -47,8 +47,8 @@ __KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 
 /*
  * This driver is designed to support RealTek's next generation of
  * 10/100 and 10/100/1000 PCI ethernet controllers. There are currently
- * four devices in this family: the RTL8139C+, the RTL8169, the RTL8169S
- * and the RTL8110S.
+ * six devices in this family: the RTL8139C+, the RTL8169, the RTL8169S,
+ * RTL8110S, the RTL8168 and the RTL8111.
  *
  * The 8139C+ is a 10/100 ethernet chip. It is backwards compatible
  * with the older 8139 family, however it also supports a special
@@ -607,6 +607,7 @@ re_attach(struct rtk_softc *sc)
 			RTKQ_NOJUMBO;
 			break;
 		case RTK_HWREV_8168E_VL:
+		case RTK_HWREV_8168F:
 			sc-sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD |
 			RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_NOJUMBO;
 			break;

Index: src/sys/dev/ic/rtl81x9reg.h
diff -u src/sys/dev/ic/rtl81x9reg.h:1.42.4.1 src/sys/dev/ic/rtl81x9reg.h:1.42.4.2
--- src/sys/dev/ic/rtl81x9reg.h:1.42.4.1	Mon Mar  5 20:31:49 2012
+++ src/sys/dev/ic/rtl81x9reg.h	Mon Jul 29 08:11:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl81x9reg.h,v 1.42.4.1 2012/03/05 20:31:49 sborrill Exp $	*/
+/*	$NetBSD: rtl81x9reg.h,v 1.42.4.2 2013/07/29 08:11:53 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -164,6 +164,7 @@
 #define RTK_HWREV_8168DP	0x2880
 #define RTK_HWREV_8168E		0x2C00
 #define RTK_HWREV_8168E_VL	0x2C80
+#define RTK_HWREV_8168F		0x4800
 #define RTK_HWREV_8168_SPIN1	0x3000
 #define RTK_HWREV_8100E		0x3080
 #define RTK_HWREV_8101E		0x3400



CVS commit: [netbsd-6] src/usr.bin/mklocale

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 08:15:39 UTC 2013

Modified Files:
src/usr.bin/mklocale [netbsd-6]: mklocaledb.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #914):
usr.bin/mklocale/mklocaledb.c: revision 1.3
Swap order of _CITRUS_LC_MONETARY_SYM_INT_N_CS_PRECEDES and
_CITRUS_LC_MONETARY_SYM_INT_P_SEP_BY_SPACE to match data files.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.12.1 src/usr.bin/mklocale/mklocaledb.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/mklocale/mklocaledb.c
diff -u src/usr.bin/mklocale/mklocaledb.c:1.2 src/usr.bin/mklocale/mklocaledb.c:1.2.12.1
--- src/usr.bin/mklocale/mklocaledb.c:1.2	Mon Jan  5 02:55:34 2009
+++ src/usr.bin/mklocale/mklocaledb.c	Mon Jul 29 08:15:39 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mklocaledb.c,v 1.2 2009/01/05 02:55:34 dogcow Exp $ */
+/* $NetBSD: mklocaledb.c,v 1.2.12.1 2013/07/29 08:15:39 msaitoh Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -37,7 +37,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: mklocaledb.c,v 1.2 2009/01/05 02:55:34 dogcow Exp $);
+__RCSID($NetBSD: mklocaledb.c,v 1.2.12.1 2013/07/29 08:15:39 msaitoh Exp $);
 #endif /* not lint */
 
 #include assert.h
@@ -136,8 +136,8 @@ static const category_t lc_monetary = {
 	{ _CITRUS_LC_MONETARY_SYM_P_SIGN_POSN,save_as_uint8},
 	{ _CITRUS_LC_MONETARY_SYM_N_SIGN_POSN,save_as_uint8},
 	{ _CITRUS_LC_MONETARY_SYM_INT_P_CS_PRECEDES,  save_as_uint8},
-	{ _CITRUS_LC_MONETARY_SYM_INT_N_CS_PRECEDES,  save_as_uint8},
 	{ _CITRUS_LC_MONETARY_SYM_INT_P_SEP_BY_SPACE, save_as_uint8},
+	{ _CITRUS_LC_MONETARY_SYM_INT_N_CS_PRECEDES,  save_as_uint8},
 	{ _CITRUS_LC_MONETARY_SYM_INT_N_SEP_BY_SPACE, save_as_uint8},
 	{ _CITRUS_LC_MONETARY_SYM_INT_P_SIGN_POSN,save_as_uint8},
 	{ _CITRUS_LC_MONETARY_SYM_INT_N_SIGN_POSN,save_as_uint8},



CVS commit: [netbsd-6] src/sys/miscfs/procfs

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 08:17:55 UTC 2013

Modified Files:
src/sys/miscfs/procfs [netbsd-6]: procfs_map.c

Log Message:
Pull up following revision(s) (requested by ryo in ticket #917):
sys/miscfs/procfs/procfs_map.c: revision 1.43
PR/48048: Add a missing vm_map_unlock_read() and uvmspace_free() to the ENOMEM 
error case in procfs_domap()d


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.41.8.1 src/sys/miscfs/procfs/procfs_map.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/miscfs/procfs/procfs_map.c
diff -u src/sys/miscfs/procfs/procfs_map.c:1.41 src/sys/miscfs/procfs/procfs_map.c:1.41.8.1
--- src/sys/miscfs/procfs/procfs_map.c:1.41	Sun Oct 16 12:26:16 2011
+++ src/sys/miscfs/procfs/procfs_map.c	Mon Jul 29 08:17:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_map.c,v 1.41 2011/10/16 12:26:16 hannken Exp $	*/
+/*	$NetBSD: procfs_map.c,v 1.41.8.1 2013/07/29 08:17:55 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: procfs_map.c,v 1.41 2011/10/16 12:26:16 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: procfs_map.c,v 1.41.8.1 2013/07/29 08:17:55 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -207,6 +207,8 @@ again:
 			bufsize = 1;
 			if (bufsize  MAXBUFFERSIZE) {
 error = ENOMEM;
+vm_map_unlock_read(map);
+uvmspace_free(vm);
 goto out;
 			}
 			free(buffer, M_TEMP);



CVS commit: [netbsd-6] src/etc

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 08:29:35 UTC 2013

Modified Files:
src/etc [netbsd-6]: MAKEDEV.tmpl

Log Message:
Pull up following revision(s) (requested by martin in ticket #919):
etc/MAKEDEV.tmpl: revision 1.166
Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12. This fixes install issues on new setups.


To generate a diff of this commit:
cvs rdiff -u -r1.151.2.9 -r1.151.2.10 src/etc/MAKEDEV.tmpl

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

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.151.2.9 src/etc/MAKEDEV.tmpl:1.151.2.10
--- src/etc/MAKEDEV.tmpl:1.151.2.9	Wed Feb 13 01:36:06 2013
+++ src/etc/MAKEDEV.tmpl	Mon Jul 29 08:29:35 2013
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.151.2.9 2013/02/13 01:36:06 riz Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.151.2.10 2013/07/29 08:29:35 msaitoh Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -2160,6 +2160,37 @@ makedisk_p8()
 	mkdev r${name}${unit}h	c $chr $(($unit * 8 + 7))	640 $g_operator
 }
 
+makedisk_p12high()
+{
+	ho=524280	# offset for partition 9 to 11 (same as ...p16high)
+	name=$1; unit=$2; blk=$3; chr=$4
+
+	mkdev ${name}${unit}a	b $blk $(($unit * 8 + 0))	640 $g_operator
+	mkdev ${name}${unit}b	b $blk $(($unit * 8 + 1))	640 $g_operator
+	mkdev ${name}${unit}c	b $blk $(($unit * 8 + 2))	640 $g_operator
+	mkdev ${name}${unit}d	b $blk $(($unit * 8 + 3))	640 $g_operator
+	mkdev ${name}${unit}e	b $blk $(($unit * 8 + 4))	640 $g_operator
+	mkdev ${name}${unit}f	b $blk $(($unit * 8 + 5))	640 $g_operator
+	mkdev ${name}${unit}g	b $blk $(($unit * 8 + 6))	640 $g_operator
+	mkdev ${name}${unit}h	b $blk $(($unit * 8 + 7))	640 $g_operator
+	mkdev ${name}${unit}i	b $blk $(($unit * 8 + $ho + 8)) 640 $g_operator
+	mkdev ${name}${unit}j	b $blk $(($unit * 8 + $ho + 9)) 640 $g_operator
+	mkdev ${name}${unit}k	b $blk $(($unit * 8 + $ho + 10)) 640 $g_operator
+	mkdev ${name}${unit}l	b $blk $(($unit * 8 + $ho + 11)) 640 $g_operator
+	mkdev r${name}${unit}a	c $chr $(($unit * 8 + 0))	640 $g_operator
+	mkdev r${name}${unit}b	c $chr $(($unit * 8 + 1))	640 $g_operator
+	mkdev r${name}${unit}c	c $chr $(($unit * 8 + 2))	640 $g_operator
+	mkdev r${name}${unit}d	c $chr $(($unit * 8 + 3))	640 $g_operator
+	mkdev r${name}${unit}e	c $chr $(($unit * 8 + 4))	640 $g_operator
+	mkdev r${name}${unit}f	c $chr $(($unit * 8 + 5))	640 $g_operator
+	mkdev r${name}${unit}g	c $chr $(($unit * 8 + 6))	640 $g_operator
+	mkdev r${name}${unit}h	c $chr $(($unit * 8 + 7))	640 $g_operator
+	mkdev r${name}${unit}i	c $chr $(($unit * 8 + $ho + 8)) 640 $g_operator
+	mkdev r${name}${unit}j	c $chr $(($unit * 8 + $ho + 9)) 640 $g_operator
+	mkdev r${name}${unit}k	c $chr $(($unit * 8 + $ho + 10)) 640 $g_operator
+	mkdev r${name}${unit}l	c $chr $(($unit * 8 + $ho + 11)) 640 $g_operator
+}
+
 makedisk_p16()
 {
 	name=$1; unit=$2; blk=$3; chr=$4



CVS commit: [netbsd-6] src/doc

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 08:56:52 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 913, 914, 917 and 919.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.20 src/doc/CHANGES-6.2:1.1.2.21
--- src/doc/CHANGES-6.2:1.1.2.20	Mon Jul 29 06:47:57 2013
+++ src/doc/CHANGES-6.2	Mon Jul 29 08:56:52 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.20 2013/07/29 06:47:57 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.21 2013/07/29 08:56:52 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -364,3 +364,29 @@ usr.bin/netstat/netstat.h			1.47
 	pcb first!
 	Not all pointers are 64bit - use uintptr_t instead of uint64_t.
 	[christos, ticket #912]
+
+share/man/man4/re.41.14
+sys/dev/ic/rtl8169.c1.137
+sys/dev/ic/rtl81x9reg.h1.44
+
+	Added support for the Realtek 8168F variant in re(4).
+	The manual page was adjusted as well.
+	[khorben, ticket #913]
+
+usr.bin/mklocale/mklocaledb.c			1.3
+
+	Swap order of _CITRUS_LC_MONETARY_SYM_INT_N_CS_PRECEDES and
+	_CITRUS_LC_MONETARY_SYM_INT_P_SEP_BY_SPACE to match data files.
+	[joerg, ticket #914]
+
+sys/miscfs/procfs/procfs_map.c			1.43
+
+	Add a missing vm_map_unlock_read() and uvmspace_free() to the ENOMEM
+	error case in procfs_domap()d. Fixes PR#48048.
+	[ryo, ticket #917]
+
+etc/MAKEDEV.tmpl1.166
+
+	Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS
+	from 16 down to 12. This fixes install issues on new setups.
+	[martin, ticket #919]



CVS commit: [netbsd-6] src/sys/dev/pci

2013-07-29 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon Jul 29 20:24:04 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: if_wm.c if_wmreg.h

Log Message:
Pull up revisions:
  src/sys/dev/pci/if_wm.c revisions 1.259,1.260,1.261,1.262
  src/sys/dev/pci/if_wmreg.h revision 1.54
(requested by msaitoh in ticket #918).

 Fix MDIC write error bug for 82574 and 82583. For those chips, the semaphore
must be released after chip reset. Found and tested by Mark Davies.

 Sync the wm_enable_mng_pass_thru() function with FreeBSD. Don't check
MANC_EN_MAC_ADDR_FILTER bit. Add 82574 and 82583 specific check. This
modification may change the setting of WM_F_HAS_MANAGE flag on some machines.

 Sync the wm_release_manageablilty() fucntion with FreeBSD. Set MANC_ARP_EN.
This change enables HW ARP function when entering suspend.

 When the chip is 82580(ER) or I350, set WM_F_ASF_FIRMWARE_PRES flag and
check for the WM_F_ARC_SUBSYS_VALID flag. Same as FreeBSD.

 Move the location of wm_check_mng_mode() and wm_get_wakeup() in wm_attach().
Those functions access EEPROM, so they have to call after identifying EEPROM
access type. This modification may change the behavior of BMC(IPMI).

 Fix yet another NVM bank detect problem in wm(4). Use bank 0 if the detect
function failed. It's the same as FreeBSD. Observed and tested with Asus P8P67
Deluxe motherboard and tested by jnemeth.


To generate a diff of this commit:
cvs rdiff -u -r1.227.2.9 -r1.227.2.10 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.46.2.4 -r1.46.2.5 src/sys/dev/pci/if_wmreg.h

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.227.2.9 src/sys/dev/pci/if_wm.c:1.227.2.10
--- src/sys/dev/pci/if_wm.c:1.227.2.9	Sun Jul 14 20:39:13 2013
+++ src/sys/dev/pci/if_wm.c	Mon Jul 29 20:24:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.227.2.9 2013/07/14 20:39:13 riz Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.227.2.10 2013/07/29 20:24:04 jdc Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.227.2.9 2013/07/14 20:39:13 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.227.2.10 2013/07/29 20:24:04 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -570,6 +570,8 @@ static int	wm_get_swfw_semaphore(struct 
 static void	wm_put_swfw_semaphore(struct wm_softc *, uint16_t);
 static int	wm_get_swfwhw_semaphore(struct wm_softc *);
 static void	wm_put_swfwhw_semaphore(struct wm_softc *);
+static int	wm_get_hw_semaphore_82573(struct wm_softc *);
+static void	wm_put_hw_semaphore_82573(struct wm_softc *);
 
 static int	wm_read_eeprom_ich8(struct wm_softc *, int, int, uint16_t *);
 static int32_t	wm_ich8_cycle_init(struct wm_softc *);
@@ -1242,8 +1244,6 @@ wm_attach(device_t parent, device_t self
 		return;
 	}
 
-	wm_get_wakeup(sc);
-
 	/*
 	 * In addition, i82544 and later support I/O mapped indirect
 	 * register access.  It is not desirable (nor supported in
@@ -1538,26 +1538,6 @@ wm_attach(device_t parent, device_t self
 	 */
 	wm_reset(sc);
 
-	switch (sc-sc_type) {
-	case WM_T_82571:
-	case WM_T_82572:
-	case WM_T_82573:
-	case WM_T_82574:
-	case WM_T_82583:
-	case WM_T_80003:
-	case WM_T_ICH8:
-	case WM_T_ICH9:
-	case WM_T_ICH10:
-	case WM_T_PCH:
-	case WM_T_PCH2:
-	case WM_T_PCH_LPT:
-		if (wm_check_mng_mode(sc) != 0)
-			wm_get_hw_control(sc);
-		break;
-	default:
-		break;
-	}
-
 	/*
 	 * Get some information about the EEPROM.
 	 */
@@ -1694,6 +1674,28 @@ wm_attach(device_t parent, device_t self
 		sc-sc_ee_addrbits, eetype);
 	}
 
+	switch (sc-sc_type) {
+	case WM_T_82571:
+	case WM_T_82572:
+	case WM_T_82573:
+	case WM_T_82574:
+	case WM_T_82583:
+	case WM_T_80003:
+	case WM_T_ICH8:
+	case WM_T_ICH9:
+	case WM_T_ICH10:
+	case WM_T_PCH:
+	case WM_T_PCH2:
+	case WM_T_PCH_LPT:
+		if (wm_check_mng_mode(sc) != 0) {
+			printf (get hw control (1)\n);
+			wm_get_hw_control(sc);
+		}
+		break;
+	default:
+		break;
+	}
+	wm_get_wakeup(sc);
 	/*
 	 * Read the Ethernet address from the EEPROM, if not first found
 	 * in device properties.
@@ -4018,7 +4020,6 @@ wm_reset(struct wm_softc *sc)
 {
 	int phy_reset = 0;
 	uint32_t reg, mask;
-	int i;
 
 	/*
 	 * Allocate on-chip memory according to the MTU size.
@@ -4118,19 +4119,7 @@ wm_reset(struct wm_softc *sc)
 	case WM_T_82573:
 	case WM_T_82574:
 	case WM_T_82583:
-		i = 0;
-		reg = CSR_READ(sc, WMREG_EXTCNFCTR)
-		| EXTCNFCTR_MDIO_SW_OWNERSHIP;
-		do {
-			CSR_WRITE(sc, WMREG_EXTCNFCTR,
-			reg | EXTCNFCTR_MDIO_SW_OWNERSHIP);
-			reg = CSR_READ(sc, WMREG_EXTCNFCTR);
-			if ((reg  EXTCNFCTR_MDIO_SW_OWNERSHIP) != 0)
-break;
-			reg |= EXTCNFCTR_MDIO_SW_OWNERSHIP;
-			delay(2*1000);
-			i++;
-		} while (i  WM_MDIO_OWNERSHIP_TIMEOUT);
+		wm_get_hw_semaphore_82573(sc);
 		break;
 	default:
 		break;
@@ -4231,6 +4220,16 @@ wm_reset(struct wm_softc *sc)
 		break;
 	

CVS commit: [netbsd-6] src/sys/common/pmap/tlb

2013-07-29 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon Jul 29 20:26:32 UTC 2013

Modified Files:
src/sys/common/pmap/tlb [netbsd-6]: pmap_tlb.c

Log Message:
Add missing )). This patch fixes PR#46371.
  src/sys/common/pmap/tlb/pmap_tlb.c patch
(requested by msaitoh in ticket 920)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.8.1 src/sys/common/pmap/tlb/pmap_tlb.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/common/pmap/tlb/pmap_tlb.c
diff -u src/sys/common/pmap/tlb/pmap_tlb.c:1.11 src/sys/common/pmap/tlb/pmap_tlb.c:1.11.8.1
--- src/sys/common/pmap/tlb/pmap_tlb.c:1.11	Tue Sep 27 01:02:37 2011
+++ src/sys/common/pmap/tlb/pmap_tlb.c	Mon Jul 29 20:26:32 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.11 2011/09/27 01:02:37 jym Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.11.8.1 2013/07/29 20:26:32 jdc Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.11 2011/09/27 01:02:37 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.11.8.1 2013/07/29 20:26:32 jdc Exp $);
 
 /*
  * Manages address spaces in a TLB.
@@ -608,7 +608,7 @@ pmap_tlb_shootdown_bystanders(pmap_t pm)
 			ipi_sent = true;
 			continue;
 		}
-		if (!CPUSET_EMPTY_P(CPUSET_SUBSET(pm-pm_active, ti-ti_cpu_mask) {
+		if (!CPUSET_EMPTY_P(CPUSET_SUBSET(pm-pm_active, ti-ti_cpu_mask))) {
 			/*
 			 * If this pmap has an ASID assigned but it's not
 			 * currently running, nuke its ASID.  Next time the



CVS commit: [netbsd-6] src/doc

2013-07-29 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon Jul 29 20:27:08 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Tickets 915, 918, 920.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.21 src/doc/CHANGES-6.2:1.1.2.22
--- src/doc/CHANGES-6.2:1.1.2.21	Mon Jul 29 08:56:52 2013
+++ src/doc/CHANGES-6.2	Mon Jul 29 20:27:07 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.21 2013/07/29 08:56:52 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.22 2013/07/29 20:27:07 jdc Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -390,3 +390,33 @@ etc/MAKEDEV.tmpl1.166
 	Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS
 	from 16 down to 12. This fixes install issues on new setups.
 	[martin, ticket #919]
+
+src/doc/3RDPARTY1.1040 via patch
+src/share/zoneinfo/africa			1.1.1.35 via patch
+src/share/zoneinfo/asia1.1.1.60 via patch
+src/share/zoneinfo/australasia			1.32 via patch
+src/share/zoneinfo/europe			1.1.1.50 via patch
+src/share/zoneinfo/iso3166.tab			1.1.1.21 via patch
+src/share/zoneinfo/southamerica			1.1.1.55 via patch
+src/share/zoneinfo/zone.tab			1.1.1.45 via patch
+
+	Import tzdata2013d.
+	Changes for Morocco, Israel, Antarctica, metadata and documentation.
+	[apb, ticket #915]
+
+sys/dev/pci/if_wm.c1.259,1.260,1.261,1.262
+sys/dev/pci/if_wmreg.h1.54
+
+	Various fixes to wm(4):
+	  Fix MDIC write error bug for 82574 and 82583
+	  Sync the wm_enable_mng_pass_thru() function with FreeBSD
+	  Sync the wm_release_manageablilty() fucntion with FreeBSD
+	  For 82580(ER) or I350, set flags as per FreeBSD
+	  Move EEPROM-related calls to after identifying the EEPPROM
+	  Fix another NVM bank detect problem
+	[msaitoh, ticket #918]
+
+sys/common/pmap/tlb/pmap_tlb.c			patch
+
+	Add missing )). This patch fixes PR#46371.
+	[msaitoh, ticket #920]



CVS commit: [netbsd-6] src/doc

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 01:57:31 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Modify ticket 909.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.22 src/doc/CHANGES-6.2:1.1.2.23
--- src/doc/CHANGES-6.2:1.1.2.22	Mon Jul 29 20:27:07 2013
+++ src/doc/CHANGES-6.2	Tue Jul 30 01:57:31 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.22 2013/07/29 20:27:07 jdc Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.23 2013/07/30 01:57:31 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -335,18 +335,7 @@ usr.sbin/pppd/pppd/sys-bsd.c			1.68
 
 sys/net/route.c	1.127
 
-	PR/44032: Proxy entries stopped working with pppd. The issue here is
-	that the route entry was added, but the RTF_LLINFO bit was not set,
-	making arp -a not showing the entry, but netstat -rn -f inet showing
-	it with the missing L bit. The order of resolution in ifa_ifwithroute()
-	is that if a destination address is found, then the interface chosen
-	for the route is that of the destination. This does not work for
-	link-level addresses since the ppp interface does not arp (uses
-	link_rtrequest, not arp_rtrequest), so the bit is never set. The easy
-	solution here is to check that the gateway is a link address, and use
-	the interface which we chose for the link address as opposed to the
-	interface that routes to the destination. This restores the previous
-	behavior, but is it correct?
+	Fix creation of arp entries for pppd's proxarp option. Fixes PR#44032.
 	[christos, ticket #909]
 
 sys/kern/subr_disk_mbr.c			1.46



CVS commit: [netbsd-6] src/doc

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 02:02:28 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Modify ticket 918.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.23 src/doc/CHANGES-6.2:1.1.2.24
--- src/doc/CHANGES-6.2:1.1.2.23	Tue Jul 30 01:57:31 2013
+++ src/doc/CHANGES-6.2	Tue Jul 30 02:02:28 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.23 2013/07/30 01:57:31 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.24 2013/07/30 02:02:28 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -393,16 +393,14 @@ src/share/zoneinfo/zone.tab			1.1.1.45 v
 	Changes for Morocco, Israel, Antarctica, metadata and documentation.
 	[apb, ticket #915]
 
-sys/dev/pci/if_wm.c1.259,1.260,1.261,1.262
+sys/dev/pci/if_wm.c1.259-1.262
 sys/dev/pci/if_wmreg.h1.54
 
 	Various fixes to wm(4):
-	  Fix MDIC write error bug for 82574 and 82583
-	  Sync the wm_enable_mng_pass_thru() function with FreeBSD
-	  Sync the wm_release_manageablilty() fucntion with FreeBSD
-	  For 82580(ER) or I350, set flags as per FreeBSD
-	  Move EEPROM-related calls to after identifying the EEPPROM
-	  Fix another NVM bank detect problem
+	  Fix MDIC write error bug for 82574 and 82583.
+	  Sync some functions with FreeBSD to make IPMI/ASF stable.
+	  Move EEPROM-related calls to after identifying the EEPPROM.
+	  Fix another NVM bank detect problem.
 	[msaitoh, ticket #918]
 
 sys/common/pmap/tlb/pmap_tlb.c			patch



CVS commit: [netbsd-6] src/sys/net

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 03:05:39 UTC 2013

Modified Files:
src/sys/net [netbsd-6]: if_mpls.c

Log Message:
Pull up following revision(s) (requested by kefren in ticket #921):
sys/net/if_mpls.c: revision 1.9
stop abusing kmem during softint context to prevent panic


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.8.1 src/sys/net/if_mpls.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/if_mpls.c
diff -u src/sys/net/if_mpls.c:1.8 src/sys/net/if_mpls.c:1.8.8.1
--- src/sys/net/if_mpls.c:1.8	Sun Jul  3 18:46:12 2011
+++ src/sys/net/if_mpls.c	Tue Jul 30 03:05:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mpls.c,v 1.8 2011/07/03 18:46:12 kefren Exp $ */
+/*	$NetBSD: if_mpls.c,v 1.8.8.1 2013/07/30 03:05:39 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_mpls.c,v 1.8 2011/07/03 18:46:12 kefren Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_mpls.c,v 1.8.8.1 2013/07/30 03:05:39 msaitoh Exp $);
 
 #include opt_inet.h
 #include opt_mpls.h
@@ -38,7 +38,6 @@ __KERNEL_RCSID(0, $NetBSD: if_mpls.c,v 
 #include sys/param.h
 
 #include sys/errno.h
-#include sys/kmem.h
 #include sys/malloc.h
 #include sys/mbuf.h
 #include sys/sysctl.h
@@ -518,25 +517,21 @@ mpls_unlabel_inet(struct mbuf *m)
 static struct mbuf *
 mpls_label_inet(struct mbuf *m, union mpls_shim *ms, uint offset)
 {
-	struct ip *iphdr;
+	struct ip iphdr;
 
 	if (mpls_mapttl_inet || mpls_mapprec_inet) {
 		if ((m-m_len  sizeof(struct ip)) 
 		(m = m_pullup(m, offset + sizeof(struct ip))) == 0)
 			return NULL; /* XXX */
-		iphdr = kmem_alloc(sizeof(struct ip), KM_NOSLEEP);
-		if (iphdr == NULL)
-			return NULL;
-		m_copydata(m, offset, sizeof(struct ip), iphdr);
+		m_copydata(m, offset, sizeof(struct ip), iphdr);
 
 		/* Map TTL */
 		if (mpls_mapttl_inet)
-			ms-shim.ttl = iphdr-ip_ttl;
+			ms-shim.ttl = iphdr.ip_ttl;
 
 		/* Copy IP precedence to EXP */
 		if (mpls_mapprec_inet)
-			ms-shim.exp = ((u_int8_t)iphdr-ip_tos)  5;
-		kmem_free (iphdr, sizeof(struct ip));
+			ms-shim.exp = ((u_int8_t)iphdr.ip_tos)  5;
 	}
 
 	if ((m = mpls_prepend_shim(m, ms)) == NULL)
@@ -592,23 +587,19 @@ mpls_unlabel_inet6(struct mbuf *m)
 static struct mbuf *
 mpls_label_inet6(struct mbuf *m, union mpls_shim *ms, uint offset)
 {
-	struct ip6_hdr *ip6h;
+	struct ip6_hdr ip6h;
 
 	if (mpls_mapttl_inet6 || mpls_mapclass_inet6) {
 		if (m-m_len  sizeof(struct ip6_hdr) 
 		(m = m_pullup(m, offset + sizeof(struct ip6_hdr))) == 0)
 			return NULL;
-		ip6h = kmem_alloc(sizeof(struct ip6_hdr), KM_NOSLEEP);
-		if (ip6h == NULL)
-			return NULL;
-		m_copydata(m, offset, sizeof(struct ip6_hdr), ip6h);
+		m_copydata(m, offset, sizeof(struct ip6_hdr), ip6h);
 
 		if (mpls_mapttl_inet6)
-			ms-shim.ttl = ip6h-ip6_hlim;
+			ms-shim.ttl = ip6h.ip6_hlim;
 
 		if (mpls_mapclass_inet6)
-			ms-shim.exp = ip6h-ip6_vfc  1  5;
-		kmem_free(ip6h, sizeof(struct ip6_hdr));
+			ms-shim.exp = ip6h.ip6_vfc  1  5;
 	}
 
 	if ((m = mpls_prepend_shim(m, ms)) == NULL)



CVS commit: [netbsd-6] src

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 04:00:20 UTC 2013

Modified Files:
src/lib/libc/sys [netbsd-6]: msgrcv.2 msgsnd.2
src/tests/lib/libc/sys [netbsd-6]: t_msgrcv.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #922):
tests/lib/libc/sys/t_msgrcv.c   1.3
lib/libc/sys/msgrcv.2   1.21-1.22
lib/libc/sys/msgsnd.2   1.19-1.20
Fix msgsz confusion.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.10.1 src/lib/libc/sys/msgrcv.2
cvs rdiff -u -r1.18 -r1.18.8.1 src/lib/libc/sys/msgsnd.2
cvs rdiff -u -r1.2 -r1.2.2.1 src/tests/lib/libc/sys/t_msgrcv.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/sys/msgrcv.2
diff -u src/lib/libc/sys/msgrcv.2:1.19 src/lib/libc/sys/msgrcv.2:1.19.10.1
--- src/lib/libc/sys/msgrcv.2:1.19	Wed Jan 28 08:57:02 2009
+++ src/lib/libc/sys/msgrcv.2	Tue Jul 30 04:00:20 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: msgrcv.2,v 1.19 2009/01/28 08:57:02 wiz Exp $
+.\	$NetBSD: msgrcv.2,v 1.19.10.1 2013/07/30 04:00:20 msaitoh Exp $
 .\
 .\ Copyright (c) 1995 Frank van der Linden
 .\ All rights reserved.
@@ -29,7 +29,7 @@
 .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 26, 2009
+.Dd July 24, 2013
 .Dt MSGRCV 2
 .Os
 .Sh NAME
@@ -90,8 +90,10 @@ less than or equal to the absolute value
 will be received.
 .El
 .Pp
+The argument
 .Fa msgsz
-specifies the maximum length of the requested message.
+specifies the size in bytes of
+.Va mtext .
 If the received message has a length greater than
 .Fa msgsz
 it will be silently truncated if the

Index: src/lib/libc/sys/msgsnd.2
diff -u src/lib/libc/sys/msgsnd.2:1.18 src/lib/libc/sys/msgsnd.2:1.18.8.1
--- src/lib/libc/sys/msgsnd.2:1.18	Fri Apr 30 04:06:20 2010
+++ src/lib/libc/sys/msgsnd.2	Tue Jul 30 04:00:20 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: msgsnd.2,v 1.18 2010/04/30 04:06:20 jruoho Exp $
+.\	$NetBSD: msgsnd.2,v 1.18.8.1 2013/07/30 04:00:20 msaitoh Exp $
 .\
 .\ Copyright (c) 1995 Frank van der Linden
 .\ All rights reserved.
@@ -29,7 +29,7 @@
 .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd April 30, 2010
+.Dd July 24, 2013
 .Dt MSGSND 2
 .Os
 .Sh NAME
@@ -69,7 +69,9 @@ be used for selecting messages (see
 .Xr msgrcv 2 ) .
 The
 .Va mtext
-field is an array of bytes, with size up to the system limit
+field is an array of bytes of length
+.Fa msgsz ,
+with size up to the system limit
 .Dv MSGMAX .
 .Pp
 If the number of bytes already on the message queue plus

Index: src/tests/lib/libc/sys/t_msgrcv.c
diff -u src/tests/lib/libc/sys/t_msgrcv.c:1.2 src/tests/lib/libc/sys/t_msgrcv.c:1.2.2.1
--- src/tests/lib/libc/sys/t_msgrcv.c:1.2	Fri Nov 11 05:06:01 2011
+++ src/tests/lib/libc/sys/t_msgrcv.c	Tue Jul 30 04:00:20 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_msgrcv.c,v 1.2 2011/11/11 05:06:01 jruoho Exp $ */
+/* $NetBSD: t_msgrcv.c,v 1.2.2.1 2013/07/30 04:00:20 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_msgrcv.c,v 1.2 2011/11/11 05:06:01 jruoho Exp $);
+__RCSID($NetBSD: t_msgrcv.c,v 1.2.2.1 2013/07/30 04:00:20 msaitoh Exp $);
 
 #include sys/msg.h
 #include sys/stat.h
@@ -51,10 +51,11 @@ __RCSID($NetBSD: t_msgrcv.c,v 1.2 2011/
 #define MSG_MTYPE_1	0x41
 #define	MSG_MTYPE_2	0x42
 #define MSG_MTYPE_3	0x43
+#define MSG_LEN		3
 
 struct msg {
 	long		 mtype;
-	char		 buf[3];
+	char		 buf[MSG_LEN];
 };
 
 static void		clean(void);
@@ -83,8 +84,8 @@ ATF_TC_BODY(msgrcv_basic, tc)
 	id = msgget(MSG_KEY, IPC_CREAT | 0600);
 	ATF_REQUIRE(id != -1);
 
-	(void)msgsnd(id, msg1, sizeof(struct msg), IPC_NOWAIT);
-	(void)msgrcv(id, msg2, sizeof(struct msg), MSG_MTYPE_1, IPC_NOWAIT);
+	(void)msgsnd(id, msg1, MSG_LEN, IPC_NOWAIT);
+	(void)msgrcv(id, msg2, MSG_LEN, MSG_MTYPE_1, IPC_NOWAIT);
 
 	ATF_CHECK(msg1.buf[0] == msg2.buf[0]);
 	ATF_CHECK(msg1.buf[1] == msg2.buf[1]);
@@ -118,7 +119,7 @@ ATF_TC_BODY(msgrcv_block, tc)
 
 	if (pid == 0) {
 
-		if (msgrcv(id, msg, sizeof(struct msg), MSG_MTYPE_1, 0)  0)
+		if (msgrcv(id, msg, MSG_LEN, MSG_MTYPE_1, 0)  0)
 			_exit(EXIT_FAILURE);
 
 		_exit(EXIT_SUCCESS);
@@ -129,7 +130,7 @@ ATF_TC_BODY(msgrcv_block, tc)
 	 * and hence kill(2) should fail with ESRCH.
 	 */
 	(void)sleep(1);
-	(void)msgsnd(id, msg, sizeof(struct msg), IPC_NOWAIT);
+	(void)msgsnd(id, msg, MSG_LEN, IPC_NOWAIT);
 	(void)sleep(1);
 	(void)kill(pid, SIGKILL);
 	(void)wait(sta);
@@ -162,31 +163,31 @@ ATF_TC_BODY(msgrcv_err, tc)
 	errno = 0;
 
 	ATF_REQUIRE_ERRNO(ENOMSG, msgrcv(id, msg,
-		sizeof(struct msg), MSG_MTYPE_1, IPC_NOWAIT) == -1);
+		MSG_LEN, MSG_MTYPE_1, IPC_NOWAIT) == -1);
 
-	ATF_REQUIRE(msgsnd(id, msg, 

CVS commit: [netbsd-6] src/lib/libperfuse

2013-07-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 30 04:05:32 UTC 2013

Modified Files:
src/lib/libperfuse [netbsd-6]: ops.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #923):
lib/libperfuse/ops.c: revision 1.61
lib/libperfuse/ops.c: revision 1.62
One more explicit error log, and two bug fixes
1) with recent FUSE, when lookup returns a null ino, it means ENOENT
2) odd corner case that caused a bug on dd if=test of=test conv=notrunc
   This caused the file to be open first ro, then rw. A logic bug in
   perfuse_node_open caused it to skip the second operation, whereas
   it should open for writing, and store the write FH without touching
   the read FH.
Catch open without FREAD|FWRITE (it should not happen)


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.6 -r1.50.2.7 src/lib/libperfuse/ops.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/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.50.2.6 src/lib/libperfuse/ops.c:1.50.2.7
--- src/lib/libperfuse/ops.c:1.50.2.6	Sun Aug 12 13:13:20 2012
+++ src/lib/libperfuse/ops.c	Tue Jul 30 04:05:32 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.50.2.6 2012/08/12 13:13:20 martin Exp $ */
+/*  $NetBSD: ops.c,v 1.50.2.7 2013/07/30 04:05:32 msaitoh Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -1359,10 +1359,33 @@ perfuse_node_open(struct puffs_usermount
 	 * Do not open twice, and do not reopen for reading
 	 * if we already have write handle.
 	 */
-	if (((mode  FREAD)  (pnd-pnd_flags  PND_RFH)) ||
-	((mode  FREAD)  (pnd-pnd_flags  PND_WFH)) ||
-	((mode  FWRITE)  (pnd-pnd_flags  PND_WFH)))
+	switch (mode  (FREAD|FWRITE)) {
+	case FREAD:
+		if (pnd-pnd_flags  (PND_RFH|PND_WFH))
+			goto out;
+		break;
+	case FWRITE:
+		if (pnd-pnd_flags  PND_WFH)
+			goto out;
+		break;
+	case FREAD|FWRITE:
+		if (pnd-pnd_flags  PND_WFH)
+			goto out;
+
+		/*
+		 * Corner case: if already open for reading (PND_RFH)
+		 * and re-opening FREAD|FWRITE, we need to reopen, 
+		 * but only for writing. Note the change on mode 
+		 * will only affect perfuse_new_fh()
+		 */
+		if (pnd-pnd_flags  PND_RFH)
+			mode = ~FREAD;
+		break;
+	default:
+		DWARNX(open without either FREAD nor FWRITE);
+		error = EPERM;
 		goto out;
+	}
 	
 	/*
 	 * Queue open on a node so that we do not open
@@ -2713,8 +2736,8 @@ perfuse_node_reclaim(struct puffs_usermo
 #ifdef PERFUSE_DEBUG
 	if ((pnd-pnd_flags  PND_OPEN) ||
 	   !TAILQ_EMPTY(pnd-pnd_pcq))
-		DERRX(EX_SOFTWARE, %s: opc = %p: still open,
-		  __func__, opc);
+		DERRX(EX_SOFTWARE, %s: opc = %p \%s\: still open,
+		  __func__, opc, pnd-pnd_name);
 
 	if ((pnd-pnd_flags  PND_BUSY) ||
 	   !TAILQ_EMPTY(pnd-pnd_pcq))



CVS commit: [netbsd-6] src/external/bsd/bind/dist/lib/dns/rdata/generic

2013-07-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 02:05:57 UTC 2013

Modified Files:
src/external/bsd/bind/dist/lib/dns/rdata/generic [netbsd-6]:
keydata_65533.c

Log Message:
Patch for bind CVE-2013-4854.


To generate a diff of this commit:
cvs rdiff -u -r1.3.4.1 -r1.3.4.2 \
src/external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c

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/bind/dist/lib/dns/rdata/generic/keydata_65533.c
diff -u src/external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c:1.3.4.1 src/external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c:1.3.4.2
--- src/external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c:1.3.4.1	Tue Jun  5 21:15:11 2012
+++ src/external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c	Mon Jul 29 02:05:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: keydata_65533.c,v 1.3.4.1 2012/06/05 21:15:11 bouyer Exp $	*/
+/*	$NetBSD: keydata_65533.c,v 1.3.4.2 2013/07/29 02:05:56 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 2009, 2011, 2012  Internet Systems Consortium, Inc. (ISC)
@@ -196,7 +196,7 @@ fromwire_keydata(ARGS_FROMWIRE) {
 	UNUSED(options);
 
 	isc_buffer_activeregion(source, sr);
-	if (sr.length  4)
+	if (sr.length  16)
 		return (ISC_R_UNEXPECTEDEND);
 
 	isc_buffer_forward(source, sr.length);



CVS commit: [netbsd-6] src/doc

2013-07-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 02:16:15 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket #924


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.17 src/doc/CHANGES-6.2:1.1.2.18
--- src/doc/CHANGES-6.2:1.1.2.17	Sun Jul 14 20:39:55 2013
+++ src/doc/CHANGES-6.2	Mon Jul 29 02:16:15 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.17 2013/07/14 20:39:55 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.18 2013/07/29 02:16:15 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -320,3 +320,7 @@ sys/dev/pci/if_wmvar.h1.15-1.16
 	remove trailing whitespaces.
 	[msaitoh, ticket #907]
 
+external/bsd/bind/dist/lib/dns/rdata/generic/keydata_65533.c	patch
+
+	Fix for bind CVE-2013-4854.
+	[spz, ticket #924]



CVS commit: [netbsd-6] src/usr.sbin/pppd/pppd

2013-07-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 05:35:41 UTC 2013

Modified Files:
src/usr.sbin/pppd/pppd [netbsd-6]: sys-bsd.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #908):
usr.sbin/pppd/pppd/sys-bsd.c: revision 1.68
Add a set_queue_size to avoid more code duplication, and set the queue size
of all tty fd's, not just the ones that we create (the ones that we get
passed in too). Fixes my iPhone - xl2tpd - pppd VPN from corrupting packets
with MTU  ~650.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.65.4.1 src/usr.sbin/pppd/pppd/sys-bsd.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/pppd/pppd/sys-bsd.c
diff -u src/usr.sbin/pppd/pppd/sys-bsd.c:1.65 src/usr.sbin/pppd/pppd/sys-bsd.c:1.65.4.1
--- src/usr.sbin/pppd/pppd/sys-bsd.c:1.65	Sat Sep 24 20:19:39 2011
+++ src/usr.sbin/pppd/pppd/sys-bsd.c	Mon Jul 29 05:35:41 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys-bsd.c,v 1.65 2011/09/24 20:19:39 christos Exp $	*/
+/*	$NetBSD: sys-bsd.c,v 1.65.4.1 2013/07/29 05:35:41 msaitoh Exp $	*/
 
 /*
  * sys-bsd.c - System-dependent procedures for setting up
@@ -79,7 +79,7 @@
 #if 0
 #define RCSID	Id: sys-bsd.c,v 1.47 2000/04/13 12:04:23 paulus Exp 
 #else
-__RCSID($NetBSD: sys-bsd.c,v 1.65 2011/09/24 20:19:39 christos Exp $);
+__RCSID($NetBSD: sys-bsd.c,v 1.65.4.1 2013/07/29 05:35:41 msaitoh Exp $);
 #endif
 #endif
 
@@ -201,6 +201,27 @@ static int get_ether_addr(u_int32_t, str
 static void restore_loop(void);	/* Transfer ppp unit back to loopback */
 
 
+static void
+set_queue_size(const char *fmt, int fd) {
+#ifdef TIOCSQSIZE
+int oqsize, qsize = 32768;
+
+/* Only for ptys */
+if (ioctl(fd, TIOCGQSIZE, oqsize) == -1)
+	return;
+
+if (oqsize = qsize)
+	return;
+
+if (ioctl(fd, TIOCSQSIZE, qsize) == -1)
+	warn(%s: Cannot set tty queue size for %d from %d to %d, fmt, fd,
+	oqsize, qsize);
+else
+	notice(%s: Changed queue size of %d from %d to %d, fmt, fd, oqsize,
+	qsize);
+#endif
+}
+
 /
  *
  * Functions to read and set the flags value in the device driver
@@ -386,6 +407,7 @@ tty_establish_ppp(int fd)
 	fatal(%s: ioctl(transfer ppp unit): %m, __func__);
 }
 
+set_queue_size(__func__, fd);
 /*
  * Save the old line discipline of fd, and set it to PPP.
  */
@@ -443,6 +465,7 @@ restore_loop(void)
 {
 int x;
 
+set_queue_size(__func__, loop_slave);
 /*
  * Transfer the ppp interface back to the loopback.
  */
@@ -645,6 +668,7 @@ clean_check(void)
 }
 }
 
+
 /*
  * set_up_tty: Set up the serial port on `fd' for 8 bits, no parity,
  * at the requested speed, etc.  If `local' is true, set CLOCAL
@@ -665,6 +689,8 @@ set_up_tty(int fd, int local)
 	ioctl(fd, TIOCGWINSZ, wsinfo);
 }
 
+set_queue_size(__func__, fd);
+
 tios.c_cflag = ~(CSIZE | CSTOPB | PARENB | CLOCAL);
 if (crtscts  0  !local) {
 if (crtscts == 2) {
@@ -931,20 +957,13 @@ cif6addr(int unit, eui64_t our_eui64, eu
 int
 get_pty(int *master_fdp, int *slave_fdp, char *slave_name, int uid)
 {
-#ifdef TIOCSQSIZE
-int qsize = 32768;
-#endif
 struct termios tios;
 
 if (openpty(master_fdp, slave_fdp, slave_name, NULL, NULL)  0)
 	return 0;
 
-#ifdef TIOCSQSIZE
-if (ioctl(*master_fdp, TIOCSQSIZE, qsize) == -1)
-	warn(%s: couldn't set master queue size: %m, __func__);
-if (ioctl(*slave_fdp, TIOCSQSIZE, qsize) == -1)
-	warn(%s: couldn't set slave queue size: %m, __func__);
-#endif
+set_queue_size(__func__, *master_fdp);
+set_queue_size(__func__, *slave_fdp);
 fchown(*slave_fdp, uid, -1);
 fchmod(*slave_fdp, S_IRUSR | S_IWUSR);
 if (tcgetattr(*slave_fdp, tios) == 0) {



CVS commit: [netbsd-6] src/sys/net

2013-07-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 05:43:13 UTC 2013

Modified Files:
src/sys/net [netbsd-6]: route.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #909):
sys/net/route.c: revision 1.127
PR/44032: Proxy entries stopped working with pppd. The issue here is that
the route entry was added, but the RTF_LLINFO bit was not set, making arp -a
not showing the entry, but netstat -rn -f inet showing it with the missing
L bit. The order of resolution in ifa_ifwithroute() is that if a destination
address is found, then the interface chosen for the route is that of the
destination. This does not work for link-level addresses since the ppp
interface does not arp (uses link_rtrequest, not arp_rtrequest), so the
bit is never set. The easy solution here is to check that the gateway is
a link address, and use the interface which we chose for the link address
as opposed to the interface that routes to the destination. This restores
the previous behavior, but is it correct?


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.126.2.1 src/sys/net/route.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/route.c
diff -u src/sys/net/route.c:1.126 src/sys/net/route.c:1.126.2.1
--- src/sys/net/route.c:1.126	Mon Jan 30 20:01:08 2012
+++ src/sys/net/route.c	Mon Jul 29 05:43:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.126 2012/01/30 20:01:08 christos Exp $	*/
+/*	$NetBSD: route.c,v 1.126.2.1 2013/07/29 05:43:13 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -93,7 +93,7 @@
 #include opt_route.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: route.c,v 1.126 2012/01/30 20:01:08 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: route.c,v 1.126.2.1 2013/07/29 05:43:13 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/kmem.h
@@ -594,7 +594,7 @@ ifa_ifwithroute(int flags, const struct 
 		 * we can use the local address.
 		 */
 		ifa = NULL;
-		if (flags  RTF_HOST)
+		if ((flags  RTF_HOST)  gateway-sa_family != AF_LINK)
 			ifa = ifa_ifwithdstaddr(dst);
 		if (ifa == NULL)
 			ifa = ifa_ifwithaddr(gateway);
@@ -619,7 +619,7 @@ ifa_ifwithroute(int flags, const struct 
 	if (ifa-ifa_addr-sa_family != dst-sa_family) {
 		struct ifaddr *oifa = ifa;
 		ifa = ifaof_ifpforaddr(dst, ifa-ifa_ifp);
-		if (ifa == 0)
+		if (ifa == NULL)
 			ifa = oifa;
 	}
 	return ifa;



CVS commit: [netbsd-6] src/sys/dev/pci

2013-07-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Jul 14 20:33:07 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: pcidevs

Log Message:
Apply changes from msaitoh in ticket #906:
sys/dev/pci/pcidevs 1.1145, 1.1147, 1.1150-1.1158
sys/dev/pci/pcidevs.h   regen
sys/dev/pci/pcidevs_data.h  regen

Pull up pcidevs changes:
Intel Atom E600 PCI-LPC bridge, adds a watchdog + HPET support.
Update some Intel LPC devices.
Change from 3400 USB to 3400 USB EHCI for EHCI devices.
Fix BCM5785F entry. That is not gigabit Ethernet.
Add ALTIMA AC1003, BROADCOM BCM57782 and BCM57786.
Add Intel I21[0178] Ethernet.
Add IDs for Marvell Armada XP. Obtained from Marvell, Semihalf.
Add some Intel devices from document (Intel 8 Series / C220 Chipset
Family Platform Controller Hub (PCH) Datasheet).
Add some Intel devices from datasheets (4th Generation Intel Core
Processor, Intel Xeon Processor E3-1200 v3).
Add ATI RADEON_HD7340.
[msaitoh, ticket #906]


To generate a diff of this commit:
cvs rdiff -u -r1.1102.2.11 -r1.1102.2.12 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.1102.2.11 src/sys/dev/pci/pcidevs:1.1102.2.12
--- src/sys/dev/pci/pcidevs:1.1102.2.11	Thu Nov 22 17:46:09 2012
+++ src/sys/dev/pci/pcidevs	Sun Jul 14 20:33:07 2013
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1102.2.11 2012/11/22 17:46:09 riz Exp $
+$NetBSD: pcidevs,v 1.1102.2.12 2013/07/14 20:33:07 riz Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -924,6 +924,7 @@ product ALTERA EP4CGX15BF14C8N	0x4c15	EP
 product ALTIMA AC1000	0x03e8	AC1000 Gigabit Ethernet
 product ALTIMA AC1001	0x03e9	AC1001 Gigabit Ethernet
 product ALTIMA AC9100	0x03ea	AC9100 Gigabit Ethernet
+product ALTIMA AC1003	0x03eb	AC1003 Gigabit Ethernet
 
 /* AMD products */
 product AMD AMD64_HT	0x1100	K8 AMD64 HyperTransport Configuration
@@ -1465,6 +1466,7 @@ product ATI RADEON_HD6520G	0x9647	Radeon
 product ATI RADEON_HD4200	0x9712	Radeon HD4200 Mobility
 product ATI RADEON_HD4250	0x9715	Radeon HD4250 GPU (RS880)
 product ATI RADEON_HD6310	0x9802	Radeon HD6310 Graphics
+product ATI RADEON_HD7340	0x9808	Radeon HD7340 Graphics
 product ATI RADEON_HD2600_HD	0xaa08	Radeon HD2600 HD Audio Controller
 product ATI RADEON_HD5600_HDMI	0xaa60	Redwood HDMI Audio
 
@@ -1618,7 +1620,7 @@ product BROADCOM BCM5786	0x169a	BCM5786 
 product BROADCOM BCM5787	0x169b	BCM5787 NetLink 1000baseT Ethernet
 product BROADCOM BCM5788	0x169c	BCM5788 10/100/1000 Ethernet
 product BROADCOM BCM5789	0x169d	BCM5789 NetLink 1000baseT Ethernet
-product BROADCOM BCM5785F	0x16a0	BCM5785F 10/100/1000 Ethernet
+product BROADCOM BCM5785F	0x16a0	BCM5785F 10/100 Ethernet
 product BROADCOM BCM5702X	0x16a6	BCM5702X 10/100/1000 Ethernet
 product BROADCOM BCM5703X	0x16a7	BCM5703X 10/100/1000 Ethernet
 product BROADCOM BCM5704S	0x16a8	BCM5704S 1000baseSX Ethernet
@@ -1627,9 +1629,11 @@ product BROADCOM BCM5708S	0x16ac	BCM5708
 product BROADCOM BCM57761	0x16b0	BCM57761 10/100/1000 Ethernet
 product BROADCOM BCM57781	0x16b1	BCM57781 10/100/1000 Ethernet
 product BROADCOM BCM57791	0x16b2	BCM57791 10/100/1000 Ethernet
+product BROADCOM BCM57786	0x16b3	BCM57786 10/100/1000 Ethernet
 product BROADCOM BCM57765	0x16b4	BCM57765 Integrated Gigabit Ethernet
 product BROADCOM BCM57785	0x16b5	BCM57785 Integrated Gigabit Ethernet
 product BROADCOM BCM57795	0x16b6	BCM57795 10/100/1000 Ethernet
+product BROADCOM BCM57782	0x16b7	BCM57782 10/100/1000 Ethernet
 product BROADCOM BCM5702_ALT	0x16c6	BCM5702 10/100/1000 Ethernet
 product BROADCOM BCM5703_ALT	0x16c7	BCM5703 10/100/1000 Ethernet
 product BROADCOM BCM5781	0x16dd	BCM5781 Integrated Gigabit Ethernet
@@ -2232,7 +2236,12 @@ product MARVELL MV64360		0x6460	MV6436x 
 product MARVELL MV64460		0x6480	MV6446x System Controller
 product MARVELL 88SX7042	0x7042	88SX7042 SATA IIe
 product MARVELL MV78100		0x7810	MV78100 SoC Discovery Innovation
+product MARVELL MV78130		0x7813	MV78130 SoC Armada XP
+product MARVELL MV78160		0x7816	MV78160 SoC Armada XP
 product MARVELL MV78200		0x7820	MV78200 SoC Discovery Innovation
+product MARVELL MV78230		0x7823	MV78230 SoC Armada XP
+product MARVELL MV78260		0x7826	MV78260 SoC Armada XP
+product MARVELL MV78460		0x7846	MV78460 SoC Armada XP
 product MARVELL 88W8660		0x8660	88W8660 SoC Orion1
 
 product MARVELL2 88SE9123	0x9123	88SE9123 SATA II PCI-E AHCI Controller
@@ -2447,6 +2456,7 @@ product INTEL 6700PXH_PCIE1	0x032a	6700P
 product INTEL SRCZCRX		0x0407	RAID Controller
 product INTEL SRCU42E		0x0408	SCSI RAID Controller
 product INTEL SRCS28X		0x0409	SATA RAID Controller
+product INTEL HASWELL_IGD	0x0402	Haswell Integrated Graphics Device
 product INTEL PCEB		0x0482	82375EB/SB 

CVS commit: [netbsd-6] src/doc

2013-07-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Jul 14 20:35:48 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 906.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.15 src/doc/CHANGES-6.2:1.1.2.16
--- src/doc/CHANGES-6.2:1.1.2.15	Fri Jul 12 11:19:34 2013
+++ src/doc/CHANGES-6.2	Sun Jul 14 20:35:48 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.15 2013/07/12 11:19:34 jdc Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.16 2013/07/14 20:35:48 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -280,3 +280,22 @@ sys/netinet6/nd6_rtr.c1.83,1.84 via 
 Fix potentially uninitialised variable.
 	[christos, ticket #905]
 
+sys/dev/pci/pcidevs1.1145, 1.1147, 1.1150-1.1158
+sys/dev/pci/pcidevs.hregen
+sys/dev/pci/pcidevs_data.h			regen
+
+	Pull up pcidevs changes:
+	Intel Atom E600 PCI-LPC bridge, adds a watchdog + HPET support.
+	Update some Intel LPC devices.
+	Change from 3400 USB to 3400 USB EHCI for EHCI devices.
+	Fix BCM5785F entry. That is not gigabit Ethernet.
+	Add ALTIMA AC1003, BROADCOM BCM57782 and BCM57786.
+	Add Intel I21[0178] Ethernet.
+	Add IDs for Marvell Armada XP. Obtained from Marvell, Semihalf.
+	Add some Intel devices from document (Intel 8 Series / C220 Chipset
+	Family Platform Controller Hub (PCH) Datasheet).
+	Add some Intel devices from datasheets (4th Generation Intel Core
+	Processor, Intel Xeon Processor E3-1200 v3).
+	Add ATI RADEON_HD7340.
+	[msaitoh, ticket #906]
+



CVS commit: [netbsd-6] src/sys/dev/pci

2013-07-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Jul 14 20:39:13 UTC 2013

Modified Files:
src/sys/dev/pci [netbsd-6]: if_wm.c if_wmreg.h if_wmvar.h

Log Message:
Apply changes (requested by msaitoh in ticket #907):

sys/dev/pci/if_wm.c 1.238, 1.244-1.247, 1.249-1.258
sys/dev/pci/if_wmreg.h  1.50-1.51, 1.53
sys/dev/pci/if_wmvar.h  1.15-1.16

Various fixes to wm(4):
Add I21[0178] support.
Fix a bug that wm_attach() may fail on some PCH2 or newer system.
wm_valid_nvm_bank_detect_ich8lan() misunderstood the NVM's bank
number. Fixes PR#47878.
Fix a bug that the check of reset complete fails on Intel 8 series
with wm_lan_init_done: lan_init_done failed to complete message.
The broken code was used for ICH8, 9... and PCH2.
The wm_linkintr_gmii() function is called from interrupt. That's
not tick, so call mii_pollstat() instead of mii_tick().
Add ECC support for the packet buffer. Only 82571 and I21[78] support
ECC.
Fix a bug that wrong semaphore is used in wm_gmii_hv_{read,write}reg.
Change style, add comments, fix some comments, use macros and
remove trailing whitespaces.
[msaitoh, ticket #907]


To generate a diff of this commit:
cvs rdiff -u -r1.227.2.8 -r1.227.2.9 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.46.2.3 -r1.46.2.4 src/sys/dev/pci/if_wmreg.h
cvs rdiff -u -r1.12.10.2 -r1.12.10.3 src/sys/dev/pci/if_wmvar.h

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.227.2.8 src/sys/dev/pci/if_wm.c:1.227.2.9
--- src/sys/dev/pci/if_wm.c:1.227.2.8	Mon Feb 18 18:05:29 2013
+++ src/sys/dev/pci/if_wm.c	Sun Jul 14 20:39:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.227.2.8 2013/02/18 18:05:29 riz Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.227.2.9 2013/07/14 20:39:13 riz Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -37,32 +37,32 @@
 
 /***
 
-  Copyright (c) 2001-2005, Intel Corporation 
+  Copyright (c) 2001-2005, Intel Corporation
   All rights reserved.
-  
-  Redistribution and use in source and binary forms, with or without 
+ 
+  Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:
-  
-   1. Redistributions of source code must retain the above copyright notice, 
+ 
+   1. Redistributions of source code must retain the above copyright notice,
   this list of conditions and the following disclaimer.
-  
-   2. Redistributions in binary form must reproduce the above copyright 
-  notice, this list of conditions and the following disclaimer in the 
+ 
+   2. Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
-  
-   3. Neither the name of the Intel Corporation nor the names of its 
-  contributors may be used to endorse or promote products derived from 
+ 
+   3. Neither the name of the Intel Corporation nor the names of its
+  contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.
-  
+ 
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
-  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
-  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
-  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF SUCH DAMAGE.
 
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h

CVS commit: [netbsd-6] src/doc

2013-07-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Jul 14 20:39:56 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket #907.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.16 src/doc/CHANGES-6.2:1.1.2.17
--- src/doc/CHANGES-6.2:1.1.2.16	Sun Jul 14 20:35:48 2013
+++ src/doc/CHANGES-6.2	Sun Jul 14 20:39:55 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.16 2013/07/14 20:35:48 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.17 2013/07/14 20:39:55 riz Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -299,3 +299,24 @@ sys/dev/pci/pcidevs_data.h			regen
 	Add ATI RADEON_HD7340.
 	[msaitoh, ticket #906]
 
+sys/dev/pci/if_wm.c1.238, 1.244-1.247, 1.249-1.258
+sys/dev/pci/if_wmreg.h1.50-1.51, 1.53
+sys/dev/pci/if_wmvar.h1.15-1.16
+
+	Various fixes to wm(4):
+	Add I21[0178] support.
+	Fix a bug that wm_attach() may fail on some PCH2 or newer system.
+	wm_valid_nvm_bank_detect_ich8lan() misunderstood the NVM's bank
+	number. Fixes PR#47878.
+	Fix a bug that the check of reset complete fails on Intel 8 series
+	with wm_lan_init_done: lan_init_done failed to complete message.
+	The broken code was used for ICH8, 9... and PCH2.
+	The wm_linkintr_gmii() function is called from interrupt. That's
+	not tick, so call mii_pollstat() instead of mii_tick().
+	Add ECC support for the packet buffer. Only 82571 and I21[78] support
+	ECC.
+	Fix a bug that wrong semaphore is used in wm_gmii_hv_{read,write}reg.
+	Change style, add comments, fix some comments, use macros and
+	remove trailing whitespaces.
+	[msaitoh, ticket #907]
+



CVS commit: [netbsd-6] src/sys/netinet6

2013-07-12 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Jul 12 11:18:15 UTC 2013

Modified Files:
src/sys/netinet6 [netbsd-6]: nd6_rtr.c

Log Message:
Pull up revision 1.84 via patch to fix gcc 4.1 compilation error
(uninitialised variable):

Some fun in trying to work out what was broken with gcc-4.1 to
trigger the following warning when gcc-4.5 was silent:
  nd6_rtr.c: In function 'nd6_ra_input':
  nd6_rtr.c:788: warning: 'ext' may be used uninitialized in this function
Eventually determined that it was not unreasonable for gcc-4.1 to
bleat in this case as there is a nasty 'goto insert' which could
indeed have resulted in an uninitialised variable use. Yay gcc 4.1.


To generate a diff of this commit:
cvs rdiff -u -r1.82.4.1 -r1.82.4.2 src/sys/netinet6/nd6_rtr.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/netinet6/nd6_rtr.c
diff -u src/sys/netinet6/nd6_rtr.c:1.82.4.1 src/sys/netinet6/nd6_rtr.c:1.82.4.2
--- src/sys/netinet6/nd6_rtr.c:1.82.4.1	Mon Jul  8 07:40:07 2013
+++ src/sys/netinet6/nd6_rtr.c	Fri Jul 12 11:18:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.82.4.1 2013/07/08 07:40:07 jdc Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.82.4.2 2013/07/12 11:18:15 jdc Exp $	*/
 /*	$KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nd6_rtr.c,v 1.82.4.1 2013/07/08 07:40:07 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: nd6_rtr.c,v 1.82.4.2 2013/07/12 11:18:15 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -744,6 +744,7 @@ static struct nd_defrouter *
 defrtrlist_update(struct nd_defrouter *new)
 {
 	struct nd_defrouter *dr, *n;
+	struct in6_ifextra *ext = new-ifp-if_afdata[AF_INET6];
 	int s = splsoftnet();
 
 	if ((dr = defrouter_lookup(new-rtaddr, new-ifp)) != NULL) {
@@ -785,7 +786,6 @@ defrtrlist_update(struct nd_defrouter *n
 		return (dr);
 	}
 
-	struct in6_ifextra *ext = new-ifp-if_afdata[AF_INET6];
 	if (ip6_maxifdefrouters = 0 
 	ext-ndefrouters = ip6_maxifdefrouters) {
 		splx(s);



CVS commit: [netbsd-6] src/doc

2013-07-12 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Fri Jul 12 11:19:35 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Update entry for ticket 905.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.14 src/doc/CHANGES-6.2:1.1.2.15
--- src/doc/CHANGES-6.2:1.1.2.14	Mon Jul  8 07:41:28 2013
+++ src/doc/CHANGES-6.2	Fri Jul 12 11:19:34 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.14 2013/07/08 07:41:28 jdc Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.15 2013/07/12 11:19:34 jdc Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -274,8 +274,9 @@ sys/netinet6/ip6_input.c			1.139 via pat
 sys/netinet6/ip6_var.h1.59 via patch
 sys/netinet6/nd6.c1.143 via patch
 sys/netinet6/nd6.h1.57 via patch
-sys/netinet6/nd6_rtr.c1.83 via patch
+sys/netinet6/nd6_rtr.c1.83,1.84 via patch
 
-	4 new sysctls to avoid ipv6 DoS attacks from OpenBSD
+	4 new sysctls to avoid ipv6 DoS attacks from OpenBSD.
+Fix potentially uninitialised variable.
 	[christos, ticket #905]
 



CVS commit: [netbsd-6] src

2013-07-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon Jul  8 07:40:07 UTC 2013

Modified Files:
src/share/man/man7 [netbsd-6]: sysctl.7
src/sys/netinet6 [netbsd-6]: icmp6.c in6.c in6_proto.c in6_var.h
ip6_input.c ip6_var.h nd6.c nd6.h nd6_rtr.c

Log Message:
Pull up revisions:
  src/share/man/man7/sysctl.7 revision 1.73 via patch
  src/sys/netinet6/icmp6.c revision 1.161 via patch
  src/sys/netinet6/in6.c revision 1.161 via patch
  src/sys/netinet6/in6_proto.c revision 1.97 via patch
  src/sys/netinet6/in6_var.h revision 1.65 via patch
  src/sys/netinet6/ip6_input.c revision 1.139 via patch
  src/sys/netinet6/ip6_var.h revision 1.59 via patch
  src/sys/netinet6/nd6.c revision 1.143 via patch
  src/sys/netinet6/nd6.h revision 1.57 via patch
  src/sys/netinet6/nd6_rtr.c revision 1.83 via patch
(requested by christos in ticket #905).
Patch by Loganaden Velvindron.

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.68.2.1 src/share/man/man7/sysctl.7
cvs rdiff -u -r1.159 -r1.159.2.1 src/sys/netinet6/icmp6.c
cvs rdiff -u -r1.159 -r1.159.4.1 src/sys/netinet6/in6.c
cvs rdiff -u -r1.95 -r1.95.2.1 src/sys/netinet6/in6_proto.c
cvs rdiff -u -r1.64.20.1 -r1.64.20.2 src/sys/netinet6/in6_var.h
cvs rdiff -u -r1.136 -r1.136.2.1 src/sys/netinet6/ip6_input.c
cvs rdiff -u -r1.58 -r1.58.2.1 src/sys/netinet6/ip6_var.h
cvs rdiff -u -r1.141 -r1.141.2.1 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.56 -r1.56.4.1 src/sys/netinet6/nd6.h
cvs rdiff -u -r1.82 -r1.82.4.1 src/sys/netinet6/nd6_rtr.c

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.68 src/share/man/man7/sysctl.7:1.68.2.1
--- src/share/man/man7/sysctl.7:1.68	Thu Nov  3 00:29:00 2011
+++ src/share/man/man7/sysctl.7	Mon Jul  8 07:40:07 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysctl.7,v 1.68 2011/11/03 00:29:00 jym Exp $
+.\	$NetBSD: sysctl.7,v 1.68.2.1 2013/07/08 07:40:07 jdc 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 September 24, 2011
+.Dd June 22, 2012
 .Dt SYSCTL 7
 .Os
 .Sh NAME
@@ -1212,8 +1212,12 @@ The currently defined protocols and name
 .It ip	hostzerobroadcast	integer	yes
 .It ip	lowportmin	integer	yes
 .It ip	lowportmax	integer	yes
+.It ip6	maxdynroutes	integer	yes
+.It ip6	maxifprefixes	integer	yes
+.It ip6	maxifdefrouters	integer	yes
 .It ip	maxflows	integer	yes
 .It ip	maxfragpackets	integer	yes
+.It ip6	neighborgcthresh	integer	yes
 .It ip	mtudisc	integer	yes
 .It ip	mtudisctimeout	integer	yes
 .It ip	random_id	integer	yes
@@ -1687,6 +1691,18 @@ The lowest port number to use for TCP an
 This cannot be set to less than 0 or greater than 1024, and must
 be smaller than
 .Li ip6.lowportmax .
+.It Li ip6.maxdynroutes
+Maximum number of routes created by redirect.
+Set it to negative to disable.
+The default value is 4096.
+.It Li ip6.maxifprefixes
+Maximum number of prefixes created by route advertisements per interface.
+Set it to negative to disable.
+The default value is 16.
+.It Li ip6.maxifdefrouters 16
+Maximum number of default routers created by route advertisements per interface.
+Set it to negative to disable.
+The default value is 16.
 .It Li ip6.maxflows
 IPv6 Fast Forwarding is enabled by default.
 If set to 0, IPv6 Fast Forwarding is disabled.
@@ -1703,6 +1719,10 @@ The maximum number of fragments the node
 0 means that the node will not accept any fragments.
 \-1 means that the node will accept as many fragments as it receives.
 The flag is provided basically for avoiding possible DoS attacks.
+.It Li ip6.neighborgcthresh
+Maximum number of entries in neighbor cache.
+Set to negative to disable.
+The default value is 2048.
 .It Li ip6.redirect
 If set to 1, ICMPv6 redirects may be sent by the node.
 This option is ignored unless the node is routing IP packets,

Index: src/sys/netinet6/icmp6.c
diff -u src/sys/netinet6/icmp6.c:1.159 src/sys/netinet6/icmp6.c:1.159.2.1
--- src/sys/netinet6/icmp6.c:1.159	Sat Dec 31 20:41:59 2011
+++ src/sys/netinet6/icmp6.c	Mon Jul  8 07:40:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp6.c,v 1.159 2011/12/31 20:41:59 christos Exp $	*/
+/*	$NetBSD: icmp6.c,v 1.159.2.1 2013/07/08 07:40:07 jdc Exp $	*/
 /*	$KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: icmp6.c,v 1.159 2011/12/31 20:41:59 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: icmp6.c,v 1.159.2.1 2013/07/08 07:40:07 jdc Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2284,6 +2284,8 @@ icmp6_redirect_input(struct mbuf *m, int
 		 * (there will be additional hops, though).
 		 */
 		rtcount = rt_timer_count(icmp6_redirect_timeout_q);
+		if (0 = ip6_maxdynroutes  rtcount = ip6_maxdynroutes)
+			goto freeit;
 	

CVS commit: [netbsd-6] src/doc

2013-07-08 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon Jul  8 07:41:28 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 905.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.13 src/doc/CHANGES-6.2:1.1.2.14
--- src/doc/CHANGES-6.2:1.1.2.13	Thu Jun 27 01:19:36 2013
+++ src/doc/CHANGES-6.2	Mon Jul  8 07:41:28 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.13 2013/06/27 01:19:36 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.14 2013/07/08 07:41:28 jdc Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -264,3 +264,18 @@ external/gpl3/binutils/dist/ld/emultempl
 	PR 47922: Properly resolve DT_NEEDED entries under sysroot and don't
 	accidently try the installed system.
 	[joerg, ticket #911]
+
+share/man/man7/sysctl.71.73 via patch
+sys/netinet6/icmp6.c1.161 via patch
+sys/netinet6/in6.c1.161 via patch
+sys/netinet6/in6_proto.c			1.97 via patch
+sys/netinet6/in6_var.h1.65 via patch
+sys/netinet6/ip6_input.c			1.139 via patch
+sys/netinet6/ip6_var.h1.59 via patch
+sys/netinet6/nd6.c1.143 via patch
+sys/netinet6/nd6.h1.57 via patch
+sys/netinet6/nd6_rtr.c1.83 via patch
+
+	4 new sysctls to avoid ipv6 DoS attacks from OpenBSD
+	[christos, ticket #905]
+



CVS commit: [netbsd-6] src/external/gpl3/binutils/dist/ld/emultempl

2013-06-26 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun 27 01:18:32 UTC 2013

Modified Files:
src/external/gpl3/binutils/dist/ld/emultempl [netbsd-6]: elf32.em

Log Message:
Pull up following revision(s) (requested by joerg in ticket #911):
external/gpl3/binutils/dist/ld/emultempl/elf32.em: revision 1.6
PR 47922: Properly resolve DT_NEEDED entries under sysroot and don't
accidently try the installed system.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 \
src/external/gpl3/binutils/dist/ld/emultempl/elf32.em

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/binutils/dist/ld/emultempl/elf32.em
diff -u src/external/gpl3/binutils/dist/ld/emultempl/elf32.em:1.4 src/external/gpl3/binutils/dist/ld/emultempl/elf32.em:1.4.4.1
--- src/external/gpl3/binutils/dist/ld/emultempl/elf32.em:1.4	Sun Sep 25 04:32:43 2011
+++ src/external/gpl3/binutils/dist/ld/emultempl/elf32.em	Thu Jun 27 01:18:32 2013
@@ -452,15 +452,25 @@ fragment EOF
 
 static bfd_boolean
 gld${EMULATION_NAME}_search_needed (const char *path,
-struct dt_needed *n, int force)
+struct dt_needed *n, int force, int prepend_sysroot)
 {
   const char *s;
   const char *name = n-name;
   size_t len;
   struct dt_needed needed;
 
-  if (name[0] == '/')
+  if (name[0] == '/') {
+if (prepend_sysroot  ld_sysroot) {
+  bfd_boolean rv;
+  needed.by = n-by;
+  char *filename= concat(ld_sysroot, n-name, (const char *)NULL);
+  needed.name = filename;
+  rv = gld${EMULATION_NAME}_try_needed (needed, force);
+  free(filename);
+  return rv;
+}
 return gld${EMULATION_NAME}_try_needed (n, force);
+  }
 
   if (path == NULL || *path == '\0')
 return FALSE;
@@ -499,6 +509,13 @@ gld${EMULATION_NAME}_search_needed (cons
 	}
   strcpy (sset, name);
 
+  if (prepend_sysroot  filename[0] == '=')
+abort();
+  if (filename[0] == '/'  prepend_sysroot  ld_sysroot) {
+char *filename2 = concat(ld_sysroot, filename, (const char *)NULL);
+free(filename);
+filename = filename2;
+  }
   needed.name = filename;
   if (gld${EMULATION_NAME}_try_needed (needed, force))
 	return TRUE;
@@ -613,7 +630,7 @@ gld${EMULATION_NAME}_check_ld_elf_hints 
   needed.by = NULL;
   needed.name = name;
   return gld${EMULATION_NAME}_search_needed (ld_elf_hints,  needed,
-	 force);
+	 force, 0);
 }
 EOF
 # FreeBSD
@@ -824,7 +841,7 @@ gld${EMULATION_NAME}_check_ld_so_conf (c
 
   needed.by = NULL;
   needed.name = name;
-  return gld${EMULATION_NAME}_search_needed (ld_so_conf, needed, force);
+  return gld${EMULATION_NAME}_search_needed (ld_so_conf, needed, force, 0);
 }
 
 EOF
@@ -1256,13 +1273,13 @@ fi
 fragment EOF
 
 	  if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
-		  n, force))
+		  n, force, 0))
 	break;
 EOF
 if [ x${USE_LIBPATH} = xyes ] ; then
 fragment EOF
 	  if (gld${EMULATION_NAME}_search_needed (command_line.rpath,
-		  n, force))
+		  n, force, 1))
 	break;
 EOF
 fi
@@ -1273,11 +1290,11 @@ fragment EOF
 	{
 	  lib_path = (const char *) getenv (LD_RUN_PATH);
 	  if (gld${EMULATION_NAME}_search_needed (lib_path, n,
-		  force))
+		  force, 0))
 		break;
 	}
 	  lib_path = (const char *) getenv (LD_LIBRARY_PATH);
-	  if (gld${EMULATION_NAME}_search_needed (lib_path, n, force))
+	  if (gld${EMULATION_NAME}_search_needed (lib_path, n, force, 0))
 	break;
 EOF
 fi
@@ -1287,12 +1304,10 @@ fragment EOF
 	  rp = bfd_elf_get_runpath_list (link_info.output_bfd, link_info);
 	  for (; !found  rp != NULL; rp = rp-next)
 	{
-	  char *tmpname = gld${EMULATION_NAME}_add_sysroot (rp-name);
 	  found = (rp-by == l-by
-		gld${EMULATION_NAME}_search_needed (tmpname,
+		gld${EMULATION_NAME}_search_needed (rp-name,
 			  n,
-			  force));
-	  free (tmpname);
+			  force, 1));
 	}
 	  if (found)
 	break;



CVS commit: [netbsd-6] src/doc

2013-06-26 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun 27 01:19:36 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Ticket 911.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.12 src/doc/CHANGES-6.2:1.1.2.13
--- src/doc/CHANGES-6.2:1.1.2.12	Sun Jun 23 11:22:29 2013
+++ src/doc/CHANGES-6.2	Thu Jun 27 01:19:36 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.12 2013/06/23 11:22:29 bouyer Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.13 2013/06/27 01:19:36 msaitoh Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -259,3 +259,8 @@ sys/arch/i386/eisa/eisa_machdep.c		1.38
 	Patch from Felix Deichmann.
 	[uebayasi, ticket #904]
 
+external/gpl3/binutils/dist/ld/emultempl/elf32.em 1.6
+
+	PR 47922: Properly resolve DT_NEEDED entries under sysroot and don't
+	accidently try the installed system.
+	[joerg, ticket #911]



CVS commit: [netbsd-6] src/tests/lib/libm

2013-06-23 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jun 23 11:16:50 UTC 2013

Modified Files:
src/tests/lib/libm [netbsd-6]: t_atan.c

Log Message:
Pull up following revision(s) (requested by isaki in ticket #903):
tests/lib/libm/t_atan.c: revisions 1.4 - 1.7, 1.9 via patch
Fix and revive test of atan_inf_neg, atan_inf_pos and atan_tan on i386.
PR port-i386/46108.
The machine epsilon 1.0e-40 is too severe and nonsense for double
because DBL_EPSILON is about 2.2e-16 .  I think that 1.0e-15 is
enough good, in this case.
XXX However, test of atan_tan should be replaced for other reasons.
Remove header files which became unnecessary in 1.7.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.4.1 src/tests/lib/libm/t_atan.c

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

Modified files:

Index: src/tests/lib/libm/t_atan.c
diff -u src/tests/lib/libm/t_atan.c:1.1 src/tests/lib/libm/t_atan.c:1.1.4.1
--- src/tests/lib/libm/t_atan.c:1.1	Sat Sep 17 18:08:35 2011
+++ src/tests/lib/libm/t_atan.c	Sun Jun 23 11:16:50 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_atan.c,v 1.1 2011/09/17 18:08:35 jruoho Exp $ */
+/* $NetBSD: t_atan.c,v 1.1.4.1 2013/06/23 11:16:50 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@ ATF_TC_BODY(atan_inf_neg, tc)
 {
 #ifndef __vax__
 	const double x = -1.0L / 0.0L;
-	const float eps = 1.0e-40;
+	const double eps = 1.0e-15;
 
 	if (fabs(atan(x) + M_PI_2)  eps)
 		atf_tc_fail_nonfatal(atan(-Inf) != -pi/2);
@@ -78,7 +78,7 @@ ATF_TC_BODY(atan_inf_pos, tc)
 {
 #ifndef __vax__
 	const double x = +1.0L / 0.0L;
-	const float eps = 1.0e-40;
+	const double eps = 1.0e-15;
 
 	if (fabs(atan(x) - M_PI_2)  eps)
 		atf_tc_fail_nonfatal(atan(+Inf) != pi/2);
@@ -95,7 +95,7 @@ ATF_TC_BODY(atan_tan, tc)
 {
 #ifndef __vax__
 	const double x[] = { 0.0, 1.0, M_PI / 2, M_PI / 3, M_PI / 6 };
-	const double eps = 1.0e-40;
+	const double eps = 1.0e-15;
 	double y;
 	size_t i;
 



CVS commit: [netbsd-6] src/doc

2013-06-23 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jun 23 11:17:29 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
ticket 903


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.10 src/doc/CHANGES-6.2:1.1.2.11
--- src/doc/CHANGES-6.2:1.1.2.10	Wed Jun 19 07:35:18 2013
+++ src/doc/CHANGES-6.2	Sun Jun 23 11:17:29 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.10 2013/06/19 07:35:18 bouyer Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.11 2013/06/23 11:17:29 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -247,3 +247,9 @@ sys/netinet6/ip6_flow.c1.21
 	Clear mbuf's csum_flags in ip6flow_fastforward(). Fixes PR#47849.
 	[msaitoh, ticket #895]
 
+tests/lib/libm/t_atan.c1.4 - 1.7, 1.9 via patch
+
+	Fix test of atan_inf_neg, atan_inf_pos and atan_tan on i386.
+	PR port-i386/46108.
+	[isaki, ticket #903]
+



<    4   5   6   7   8   9   10   11   12   13   >