CVS commit: src/sys/arch/xen

2018-10-23 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Wed Oct 24 03:59:33 UTC 2018

Modified Files:
src/sys/arch/xen/x86: xen_ipi.c
src/sys/arch/xen/xen: clock.c if_xennet_xenbus.c pciback.c xbd_xenbus.c
xbdback_xenbus.c xencons.c xenevt.c xennetback_xenbus.c
xpci_xenbus.c
src/sys/arch/xen/xenbus: xenbus_comms.c

Log Message:
When using the intr_establish_xname() interface to register
XEN events, follow established x86/intr.c conventions - set
the 'legacy' irq value to -1, to indicate that the pic, pin
combination (_pic, port) is used for registration.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/xen/x86/xen_ipi.c
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/xen/xen/clock.c
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/xen/xen/if_xennet_xenbus.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/xen/xen/pciback.c
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/xen/xen/xbd_xenbus.c
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/xen/xen/xbdback_xenbus.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/xen/xen/xencons.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/xen/xen/xenevt.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/xen/xen/xennetback_xenbus.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/xen/xen/xpci_xenbus.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/xen/xenbus/xenbus_comms.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/xen/x86/xen_ipi.c
diff -u src/sys/arch/xen/x86/xen_ipi.c:1.26 src/sys/arch/xen/x86/xen_ipi.c:1.27
--- src/sys/arch/xen/x86/xen_ipi.c:1.26	Tue Jul 24 12:26:14 2018
+++ src/sys/arch/xen/x86/xen_ipi.c	Wed Oct 24 03:59:33 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_ipi.c,v 1.26 2018/07/24 12:26:14 bouyer Exp $ */
+/* $NetBSD: xen_ipi.c,v 1.27 2018/10/24 03:59:33 cherry Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,10 +33,10 @@
 
 /* 
  * Based on: x86/ipi.c
- * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.26 2018/07/24 12:26:14 bouyer Exp $");
+ * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.27 2018/10/24 03:59:33 cherry Exp $");
  */
 
-__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.26 2018/07/24 12:26:14 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.27 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_ddb.h"
 
@@ -137,7 +137,7 @@ xen_ipi_init(void)
 	snprintf(intr_xname, sizeof(intr_xname), "%s ipi",
 	device_xname(ci->ci_dev));
 
-	if (intr_establish_xname(0, _pic, evtchn, IST_LEVEL, IPL_HIGH,
+	if (intr_establish_xname(-1, _pic, evtchn, IST_LEVEL, IPL_HIGH,
 		xen_ipi_handler, ci, true, intr_xname) == NULL) {
 		panic("%s: unable to register ipi handler\n", __func__);
 		/* NOTREACHED */

Index: src/sys/arch/xen/xen/clock.c
diff -u src/sys/arch/xen/xen/clock.c:1.70 src/sys/arch/xen/xen/clock.c:1.71
--- src/sys/arch/xen/xen/clock.c:1.70	Sat Jun 30 14:59:38 2018
+++ src/sys/arch/xen/xen/clock.c	Wed Oct 24 03:59:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.70 2018/06/30 14:59:38 riastradh Exp $	*/
+/*	$NetBSD: clock.c,v 1.71 2018/10/24 03:59:33 cherry Exp $	*/
 
 /*-
  * Copyright (c) 2017, 2018 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.70 2018/06/30 14:59:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.71 2018/10/24 03:59:33 cherry Exp $");
 
 #include 
 #include 
@@ -763,7 +763,7 @@ xen_resumeclocks(struct cpu_info *ci)
 	snprintf(intr_xname, sizeof(intr_xname), "%s clock",
 	device_xname(ci->ci_dev));
 	/* XXX sketchy function pointer cast -- fix the API, please */
-	ci->ci_xen_timer_intrhand = intr_establish_xname(0, _pic, evtch,
+	ci->ci_xen_timer_intrhand = intr_establish_xname(-1, _pic, evtch,
 	IST_LEVEL, IPL_CLOCK, (int (*)(void *))xen_timer_handler, ci, true,
 	intr_xname);
 	if (ci->ci_xen_timer_intrhand == NULL)

Index: src/sys/arch/xen/xen/if_xennet_xenbus.c
diff -u src/sys/arch/xen/xen/if_xennet_xenbus.c:1.79 src/sys/arch/xen/xen/if_xennet_xenbus.c:1.80
--- src/sys/arch/xen/xen/if_xennet_xenbus.c:1.79	Mon Sep  3 16:29:29 2018
+++ src/sys/arch/xen/xen/if_xennet_xenbus.c	Wed Oct 24 03:59:33 2018
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_xennet_xenbus.c,v 1.79 2018/09/03 16:29:29 riastradh Exp $  */
+/*  $NetBSD: if_xennet_xenbus.c,v 1.80 2018/10/24 03:59:33 cherry Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -84,7 +84,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.79 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.80 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
@@ -517,7 +517,7 @@ xennet_xenbus_resume(device_t dev, const
 		goto abort_resume;
 	aprint_verbose_dev(dev, "using event channel %d\n",
 	sc->sc_evtchn);
-	sc->sc_ih = intr_establish_xname(0, _pic, sc->sc_evtchn, IST_LEVEL,
+	sc->sc_ih = intr_establish_xname(-1, _pic, sc->sc_evtchn, IST_LEVEL,
 	IPL_NET, _handler, sc, false, 

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

2018-10-23 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Wed Oct 24 03:51:21 UTC 2018

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

Log Message:
When returning a cached shared irq event value, DTRT


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/x86/x86/intr.c

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

Modified files:

Index: src/sys/arch/x86/x86/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.134 src/sys/arch/x86/x86/intr.c:1.135
--- src/sys/arch/x86/x86/intr.c:1.134	Mon Oct  8 08:05:08 2018
+++ src/sys/arch/x86/x86/intr.c	Wed Oct 24 03:51:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.134 2018/10/08 08:05:08 cherry Exp $	*/
+/*	$NetBSD: intr.c,v 1.135 2018/10/24 03:51:21 cherry Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.134 2018/10/08 08:05:08 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.135 2018/10/24 03:51:21 cherry Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -1294,7 +1294,7 @@ intr_establish_xname(int legacy_irq, str
 		 * Shared interrupt - we can't rebind.
 		 * The port is shared instead.
 		 */
-		evtchn = irq2port[gsi];
+		evtchn = irq2port[gsi] - 1;
 	}
 
 	pih = pirq_establish(gsi, evtchn, handler, arg, level,



CVS commit: src/external/cddl/osnet/sys/sys

2018-10-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 23 22:26:14 UTC 2018

Added Files:
src/external/cddl/osnet/sys/sys: nvnamespace.h

Log Message:
Avoid conflicts with "our" (the FreeBSD) nvpair/nvlist implementation by
prefixing all symbols with "opensolaris_".


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/sys/sys/nvnamespace.h

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

Added files:

Index: src/external/cddl/osnet/sys/sys/nvnamespace.h
diff -u /dev/null src/external/cddl/osnet/sys/sys/nvnamespace.h:1.1
--- /dev/null	Tue Oct 23 18:26:14 2018
+++ src/external/cddl/osnet/sys/sys/nvnamespace.h	Tue Oct 23 18:26:14 2018
@@ -0,0 +1,201 @@
+/*-
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+#ifndef _OPENSOLARIS_SYS_NVNAMESPACE_H_
+#define _OPENSOLARIS_SYS_NVNAMESPACE_H_
+
+#define	fm_nvlist_create	opensolaris_fm_nvlist_create
+#define	fm_nvlist_destroy	opensolaris_fm_nvlist_destroy
+#define	fnvlist_add_boolean	opensolaris_fnvlist_add_boolean
+#define	fnvlist_add_boolean_array	opensolaris_fnvlist_add_boolean_array
+#define	fnvlist_add_boolean_value	opensolaris_fnvlist_add_boolean_value
+#define	fnvlist_add_byte	opensolaris_fnvlist_add_byte
+#define	fnvlist_add_byte_array	opensolaris_fnvlist_add_byte_array
+#define	fnvlist_add_int16	opensolaris_fnvlist_add_int16
+#define	fnvlist_add_int16_array	opensolaris_fnvlist_add_int16_array
+#define	fnvlist_add_int32	opensolaris_fnvlist_add_int32
+#define	fnvlist_add_int32_array	opensolaris_fnvlist_add_int32_array
+#define	fnvlist_add_int64	opensolaris_fnvlist_add_int64
+#define	fnvlist_add_int64_array	opensolaris_fnvlist_add_int64_array
+#define	fnvlist_add_int8	opensolaris_fnvlist_add_int8
+#define	fnvlist_add_int8_array	opensolaris_fnvlist_add_int8_array
+#define	fnvlist_add_nvlist	opensolaris_fnvlist_add_nvlist
+#define	fnvlist_add_nvlist_array	opensolaris_fnvlist_add_nvlist_array
+#define	fnvlist_add_nvpair	opensolaris_fnvlist_add_nvpair
+#define	fnvlist_add_string	opensolaris_fnvlist_add_string
+#define	fnvlist_add_string_array	opensolaris_fnvlist_add_string_array
+#define	fnvlist_add_uint16	opensolaris_fnvlist_add_uint16
+#define	fnvlist_add_uint16_array	opensolaris_fnvlist_add_uint16_array
+#define	fnvlist_add_uint32	opensolaris_fnvlist_add_uint32
+#define	fnvlist_add_uint32_array	opensolaris_fnvlist_add_uint32_array
+#define	fnvlist_add_uint64	opensolaris_fnvlist_add_uint64
+#define	fnvlist_add_uint64_array	opensolaris_fnvlist_add_uint64_array
+#define	fnvlist_add_uint8	opensolaris_fnvlist_add_uint8
+#define	fnvlist_add_uint8_array	opensolaris_fnvlist_add_uint8_array
+#define	fnvlist_alloc	opensolaris_fnvlist_alloc
+#define	fnvlist_dup	opensolaris_fnvlist_dup
+#define	fnvlist_free	opensolaris_fnvlist_free
+#define	fnvlist_lookup_boolean	opensolaris_fnvlist_lookup_boolean
+#define	fnvlist_lookup_boolean_value	opensolaris_fnvlist_lookup_boolean_value
+#define	fnvlist_lookup_byte	opensolaris_fnvlist_lookup_byte
+#define	fnvlist_lookup_int16	opensolaris_fnvlist_lookup_int16
+#define	fnvlist_lookup_int32	opensolaris_fnvlist_lookup_int32
+#define	fnvlist_lookup_int64	opensolaris_fnvlist_lookup_int64
+#define	fnvlist_lookup_int8	opensolaris_fnvlist_lookup_int8
+#define	fnvlist_lookup_nvlist	opensolaris_fnvlist_lookup_nvlist
+#define	fnvlist_lookup_nvpair	opensolaris_fnvlist_lookup_nvpair
+#define	fnvlist_lookup_string	opensolaris_fnvlist_lookup_string
+#define	fnvlist_lookup_uint16	

CVS commit: src/external/cddl/osnet/dist/uts/common/sys

2018-10-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 23 22:25:21 UTC 2018

Modified Files:
src/external/cddl/osnet/dist/uts/common/sys: nvpair.h

Log Message:
prefix all nv* symbols with opensolaris_


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/cddl/osnet/dist/uts/common/sys/nvpair.h

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/sys/nvpair.h
diff -u src/external/cddl/osnet/dist/uts/common/sys/nvpair.h:1.1.1.3 src/external/cddl/osnet/dist/uts/common/sys/nvpair.h:1.2
--- src/external/cddl/osnet/dist/uts/common/sys/nvpair.h:1.1.1.3	Mon May 28 16:53:03 2018
+++ src/external/cddl/osnet/dist/uts/common/sys/nvpair.h	Tue Oct 23 18:25:21 2018
@@ -30,6 +30,8 @@
 #include 
 #include 
 
+#include 
+
 #if defined(_KERNEL) && !defined(_BOOT)
 #include 
 #endif



CVS commit: src/sys/dev/ata

2018-10-23 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Oct 23 22:05:01 UTC 2018

Modified Files:
src/sys/dev/ata: TODO.ncq ld_ataraid.c

Log Message:
add support for DIOCCACHESYNC (!), and DIOCGCACHE; code adapted from ccd(4)

tested with Intel ATA Raid


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ata/TODO.ncq
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/ata/ld_ataraid.c

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

Modified files:

Index: src/sys/dev/ata/TODO.ncq
diff -u src/sys/dev/ata/TODO.ncq:1.9 src/sys/dev/ata/TODO.ncq:1.10
--- src/sys/dev/ata/TODO.ncq:1.9	Mon Oct 22 21:25:23 2018
+++ src/sys/dev/ata/TODO.ncq	Tue Oct 23 22:05:01 2018
@@ -15,4 +15,5 @@ set 
 
 add support for the NCQ TRIM if supported by device?
 
-implement DIOCGCACHE/DIOCCACHESYNC for ld@ataraid? just passthrough, like ccd
+ahcisata(4)/siisata(4) - enable detach on shutdown, and fix the issue
+with atabus being detached several times

Index: src/sys/dev/ata/ld_ataraid.c
diff -u src/sys/dev/ata/ld_ataraid.c:1.47 src/sys/dev/ata/ld_ataraid.c:1.48
--- src/sys/dev/ata/ld_ataraid.c:1.47	Mon Oct 22 19:36:28 2018
+++ src/sys/dev/ata/ld_ataraid.c	Tue Oct 23 22:05:01 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_ataraid.c,v 1.47 2018/10/22 19:36:28 jdolecek Exp $ */
+/*	$NetBSD: ld_ataraid.c,v 1.48 2018/10/23 22:05:01 jdolecek Exp $ */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.47 2018/10/22 19:36:28 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.48 2018/10/23 22:05:01 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bio.h"
@@ -102,6 +102,8 @@ static int	ld_ataraid_match(device_t, cf
 static void	ld_ataraid_attach(device_t, device_t, void *);
 
 static int	ld_ataraid_dump(struct ld_softc *, void *, int, int);
+static int	ld_ataraid_ioctl(struct ld_softc *, u_long, void *, int32_t,
+bool);
 
 static int cbufpool_ctor(void *, void *, int);
 static voidcbufpool_dtor(void *, void *);
@@ -170,6 +172,7 @@ ld_ataraid_attach(device_t parent, devic
 	ld->sc_secsize = 512;/* XXX */
 	ld->sc_maxqueuecnt = 128;			/* XXX */
 	ld->sc_dump = ld_ataraid_dump;
+	ld->sc_ioctl = ld_ataraid_ioctl;
 
 	switch (aai->aai_level) {
 	case AAI_L_SPAN:
@@ -715,6 +718,72 @@ ld_ataraid_biodisk(struct ld_ataraid_sof
 }
 #endif /* NBIO > 0 */
 
+static int
+ld_ataraid_ioctl(struct ld_softc *ld, u_long cmd, void *addr, int32_t flag,
+bool poll)
+{
+	struct ld_ataraid_softc *sc = (void *)ld;
+	int error, i, j;
+	kauth_cred_t uc;
+
+	uc = kauth_cred_get();
+
+	switch (cmd) {
+	case DIOCGCACHE:
+	{
+		int dkcache = 0;
+
+		/*
+		 * We pass this call down to all components and report
+		 * intersection of the flags returned by the components.
+		 * If any errors out, we return error. ATA RAID components
+		 * can only change via BIOS, device feature flags will remain
+		 * static. RCE/WCE can change if set directly on underlying
+		 * device.
+		 */
+		for (error = 0, i = 0; i < sc->sc_aai->aai_ndisks; i++) {
+			KASSERT(sc->sc_vnodes[i] != NULL);
+
+			error = VOP_IOCTL(sc->sc_vnodes[i], cmd, ,
+  flag, uc);
+			if (error)
+break;
+
+			if (i == 0)
+dkcache = j;
+			else
+dkcache = DKCACHE_COMBINE(dkcache, j);
+		}
+
+		*((int *)addr) = dkcache;
+		break;
+	}
+
+	case DIOCCACHESYNC:
+	{
+		/*
+		 * We pass this call down to all components and report
+		 * the first error we encounter.
+		 */
+		for (error = 0, i = 0; i < sc->sc_aai->aai_ndisks; i++) {
+			KASSERT(sc->sc_vnodes[i] != NULL);
+
+			j = VOP_IOCTL(sc->sc_vnodes[i], cmd, addr,
+  flag, uc);
+			if (j != 0 && error == 0)
+error = j;
+		}
+		break;
+	}
+
+	default:
+		error = EPASSTHROUGH;
+		break;
+	}
+
+	return error;
+}
+
 MODULE(MODULE_CLASS_DRIVER, ld_ataraid, "ld,ataraid");
 
 #ifdef _MODULE



CVS commit: src/share/man/man4

2018-10-23 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Oct 23 20:09:40 UTC 2018

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

Log Message:
make the section about In-System umass a 'NOTES' rather than 'BUGS'


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/share/man/man4/umass.4

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

Modified files:

Index: src/share/man/man4/umass.4
diff -u src/share/man/man4/umass.4:1.25 src/share/man/man4/umass.4:1.26
--- src/share/man/man4/umass.4:1.25	Mon Oct 22 20:23:28 2018
+++ src/share/man/man4/umass.4	Tue Oct 23 20:09:40 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: umass.4,v 1.25 2018/10/22 20:23:28 jdolecek Exp $
+.\" $NetBSD: umass.4,v 1.26 2018/10/23 20:09:40 jdolecek Exp $
 .\"
 .\" Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 22, 2018
+.Dd October 23, 2018
 .Dt UMASS 4
 .Os
 .Sh NAME
@@ -79,7 +79,7 @@ driver.  The
 driver
 appeared in
 .Nx 1.5 .
-.Sh BUGS
+.Sh NOTES
 The driver has some support for certain adapters from In-System
 Design that use the (non-standardized) ATA protocol over Bulk-Only.
 This hardware is very rare, and the support very likely no longer



CVS commit: src/sys

2018-10-23 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Oct 23 19:58:53 UTC 2018

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0
src/sys/arch/evbarm/conf: ARMADAXP BCM5301X BCM56340 BEAGLEBOARDXM
BEAGLEBONE CUBOX DUOVERO GEMINI GUMSTIX HDL_G HPT5325 IGEPV2
MARVELL_NAS MINI2440 MMNET_GENERIC MPCSA_GENERIC N900 NSLU2
OMAP5EVM OPENBLOCKS_A6 OPENBLOCKS_AX3 OVERO PANDABOARD PEPPER
SHEEVAPLUG SMDK2410 TISDP2420 TISDP2430 TS7200 TWINTAIL VTC100
src/sys/arch/evbmips/conf: ADM5120-USB RB153 SBMIPS XLSATX
src/sys/arch/evbppc/conf: OPENBLOCKS266_OPT PMPPC
src/sys/arch/hpcarm/conf: NETBOOKPRO WZERO3
src/sys/arch/hppa/conf: GENERIC
src/sys/arch/i386/conf: GENERIC_TINY XEN3PAE_DOM0
src/sys/arch/iyonix/conf: GENERIC
src/sys/arch/landisk/conf: GENERIC
src/sys/arch/ofppc/conf: GENERIC
src/sys/arch/sandpoint/conf: GENERIC
src/sys/arch/sbmips/conf: GENERIC
src/sys/arch/sgimips/conf: GENERIC32_IP3x
src/sys/arch/sparc64/conf: GENERIC
src/sys/arch/x68k/conf: GENERIC
src/sys/arch/zaurus/conf: GENERIC INSTALL_C700
src/sys/dev/usb: usbdevices.config

Log Message:
remove the 'wd* at umass?' for the non-standardized and rare (extinct?)
In-System Design ATA protocol over Bulk-Only devices from most kernels,
leave only in i386/amd64 ALL; it's unmaintained and likely currently broken,
lack of test hardware makes it impossible to support


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/conf/ARMADAXP
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/conf/BCM5301X \
src/sys/arch/evbarm/conf/MARVELL_NAS
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/BCM56340
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbarm/conf/BEAGLEBOARDXM \
src/sys/arch/evbarm/conf/PANDABOARD
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbarm/conf/BEAGLEBONE
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/CUBOX
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/DUOVERO
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/evbarm/conf/GEMINI
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/evbarm/conf/GUMSTIX
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/evbarm/conf/HDL_G
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/evbarm/conf/HPT5325 \
src/sys/arch/evbarm/conf/TISDP2420
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbarm/conf/IGEPV2 \
src/sys/arch/evbarm/conf/OPENBLOCKS_A6
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbarm/conf/MINI2440
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/evbarm/conf/MMNET_GENERIC
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/evbarm/conf/MPCSA_GENERIC
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbarm/conf/N900
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/evbarm/conf/NSLU2
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/conf/OMAP5EVM
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/conf/OPENBLOCKS_AX3
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/evbarm/conf/OVERO
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/PEPPER
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/evbarm/conf/SHEEVAPLUG
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/evbarm/conf/SMDK2410
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/evbarm/conf/TISDP2430
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/evbarm/conf/TS7200
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/evbarm/conf/TWINTAIL
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/conf/VTC100
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbmips/conf/ADM5120-USB
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbmips/conf/RB153
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/conf/SBMIPS
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbmips/conf/XLSATX
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbppc/conf/OPENBLOCKS266_OPT
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/evbppc/conf/PMPPC
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hpcarm/conf/NETBOOKPRO
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/hpcarm/conf/WZERO3
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hppa/conf/GENERIC
cvs rdiff -u -r1.160 -r1.161 src/sys/arch/i386/conf/GENERIC_TINY
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/i386/conf/XEN3PAE_DOM0
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/iyonix/conf/GENERIC
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/landisk/conf/GENERIC
cvs rdiff -u -r1.167 -r1.168 src/sys/arch/ofppc/conf/GENERIC
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/sandpoint/conf/GENERIC
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/sbmips/conf/GENERIC
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/sgimips/conf/GENERIC32_IP3x
cvs rdiff -u -r1.208 -r1.209 src/sys/arch/sparc64/conf/GENERIC
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/x68k/conf/GENERIC
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/zaurus/conf/GENERIC
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/zaurus/conf/INSTALL_C700
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/usb/usbdevices.config

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

Modified files:

Index: src/sys/arch/amd64/conf/XEN3_DOM0
diff -u 

CVS commit: src/lib/libedit

2018-10-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 23 16:49:13 UTC 2018

Modified Files:
src/lib/libedit: refresh.c

Log Message:
Apply revisions 1.21, 1.22 from OpenBSD:

In re_fastputc(), set lastline to the new line, not the previous
line so it gets initialized properly.  Fixes a crash in bc with
MALLOC_OPTIONS=UJ.  OK deraadt@, committing on behalf of yasuoka@

Initialize "old" screen buffer lines before use; otherwise, they would
never get NUL-terminated and cause read buffer overruns.
This fixes for example segfaults in sftp(1) that could be triggered
by typing in an extremely long string (more than one line - the longer,
the likelier to crash), then hitting backspace once.
Problem reported and patch OK'ed by sthen@.

XXX: pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/lib/libedit/refresh.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/libedit/refresh.c
diff -u src/lib/libedit/refresh.c:1.54 src/lib/libedit/refresh.c:1.55
--- src/lib/libedit/refresh.c:1.54	Fri Jun 30 16:26:52 2017
+++ src/lib/libedit/refresh.c	Tue Oct 23 12:49:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: refresh.c,v 1.54 2017/06/30 20:26:52 kre Exp $	*/
+/*	$NetBSD: refresh.c,v 1.55 2018/10/23 16:49:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: refresh.c,v 1.54 2017/06/30 20:26:52 kre Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.55 2018/10/23 16:49:13 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -1090,7 +1090,10 @@ re_refresh_cursor(EditLine *el)
 static void
 re_fastputc(EditLine *el, wint_t c)
 {
-	int w = wcwidth(c);
+	wchar_t *lastline;
+	int w;
+
+	w = wcwidth(c);
 	while (w > 1 && el->el_cursor.h + w > el->el_terminal.t_size.h)
 	re_fastputc(el, ' ');
 
@@ -1112,17 +1115,19 @@ re_fastputc(EditLine *el, wint_t c)
 		 */
 		if (el->el_cursor.v + 1 >= el->el_terminal.t_size.v) {
 			int i, lins = el->el_terminal.t_size.v;
-			wchar_t *firstline = el->el_display[0];
 
+			lastline = el->el_display[0];
 			for(i = 1; i < lins; i++)
 el->el_display[i - 1] = el->el_display[i];
 
-			re__copy_and_pad(firstline, L"", (size_t)0);
-			el->el_display[i - 1] = firstline;
+			el->el_display[i - 1] = lastline;
 		} else {
 			el->el_cursor.v++;
 			el->el_refresh.r_oldcv++;
+			lastline = el->el_display[++el->el_refresh.r_oldcv];
 		}
+		re__copy_and_pad(lastline, L"", (size_t)el->el_terminal.t_size.h);
+
 		if (EL_HAS_AUTO_MARGINS) {
 			if (EL_HAS_MAGIC_MARGINS) {
 terminal__putc(el, ' ');



CVS commit: src

2018-10-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Oct 23 15:44:42 UTC 2018

Modified Files:
src: README.md

Log Message:
Tidy up a bit.

- Quote the opening paragraph from netbsd.org.
- Set the suggested commands in teletype.
- Give pointers in a more active voice.
- Omit trailing whitespace.
- Mention the relation of the Git mirror to the main CVS repository.
- Use a list rather than juxtaposition for the final links.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/README.md

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

Modified files:

Index: src/README.md
diff -u src/README.md:1.3 src/README.md:1.4
--- src/README.md:1.3	Mon Oct 22 08:49:00 2018
+++ src/README.md	Tue Oct 23 15:44:42 2018
@@ -1,15 +1,17 @@
 NetBSD
 --
 
-NetBSD is a complete operating system.  
-It supports a wide range of machines from recent aarch64 and amd64
-machines to VAX and M68k.
+NetBSD is a free, fast, secure, and highly portable Unix-like Open
+Source operating system.  It is available for a [wide range of
+platforms](https://wiki.NetBSD.org/ports/), from large-scale servers
+and powerful desktop systems to handheld and embedded devices.
 
 Building
 
 
-Cross-building is possible from most UNIX-like operating systems.  
-To build for amd64 (x86_64), in the src directory:  
+You can cross-build NetBSD from most UNIX-like operating systems.
+To build for amd64 (x86_64), in the src directory:
+
 ./build.sh -U -u -j4 -m amd64 -O ~/obj release
 
 Additional build information available in the [BUILDING](BUILDING) file.
@@ -17,32 +19,38 @@ Additional build information available i
 Binaries
 
 
-- [Daily builds](https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/)  
+- [Daily builds](https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/)
 - [Releases](https://cdn.netbsd.org/pub/NetBSD/)
 
 Testing
 ---
 
-On a running NetBSD system  
+On a running NetBSD system:
+
 cd /usr/tests; atf-run | atf-report
 
 Troubleshooting
 ---
 
-- Bugs and patches can be sent [via web form](https://www.netbsd.org/cgi-bin/sendpr.cgi?gndb=netbsd).  
-- Several [mailing lists](https://www.netbsd.org/mailinglists/) exist.  
-  The [netbsd-users](https://netbsd.org/mailinglists/#netbsd-users) list is a good choice for many problems.  
-- A community IRC channel exist on [#netbsd @ freenode](https://webchat.freenode.net/?channels=#netbsd)
+- Send bugs and patches [via web form](https://www.netbsd.org/cgi-bin/sendpr.cgi?gndb=netbsd).
+- Subscribe to the [mailing lists](https://www.netbsd.org/mailinglists/).
+  The [netbsd-users](https://netbsd.org/mailinglists/#netbsd-users) list is a good choice for many problems; watch [current-users](https://netbsd.org/mailinglists/#current-users) if you follow the bleeding edge of NetBSD-current.
+- Join the community IRC channel [#netbsd @ freenode](https://webchat.freenode.net/?channels=#netbsd).
 
 Latest sources
 --
 
-To fetch the main CVS repository:  
+To fetch the main CVS repository:
+
 cvs -d anon...@anoncvs.netbsd.org:/cvsroot checkout -P src
 
+To work in the Git mirror, which is updated every few hours from CVS:
+
+git clone https://github.com/NetBSD/src.git
+
 Additional Links
 
 
-[The NetBSD Guide](https://www.netbsd.org/docs/guide/en/)
-[NetBSD manual pages](http://man.netbsd.org/)
-[NetBSD Cross-Reference](https://nxr.netbsd.org/)
+- [The NetBSD Guide](https://www.netbsd.org/docs/guide/en/)
+- [NetBSD manual pages](http://man.netbsd.org/)
+- [NetBSD Cross-Reference](https://nxr.netbsd.org/)



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

2018-10-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Oct 23 10:13:34 UTC 2018

Modified Files:
src/sys/arch/arm/fdt: acpi_fdt.c

Log Message:
Expose SMBIOS table pointer via machdep.smbios sysctl


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/fdt/acpi_fdt.c

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

Modified files:

Index: src/sys/arch/arm/fdt/acpi_fdt.c
diff -u src/sys/arch/arm/fdt/acpi_fdt.c:1.5 src/sys/arch/arm/fdt/acpi_fdt.c:1.6
--- src/sys/arch/arm/fdt/acpi_fdt.c:1.5	Sun Oct 21 12:06:22 2018
+++ src/sys/arch/arm/fdt/acpi_fdt.c	Tue Oct 23 10:13:34 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_fdt.c,v 1.5 2018/10/21 12:06:22 jmcneill Exp $ */
+/* $NetBSD: acpi_fdt.c,v 1.6 2018/10/23 10:13:34 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.5 2018/10/21 12:06:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.6 2018/10/23 10:13:34 jmcneill Exp $");
 
 #include 
 #include 
@@ -38,6 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -53,8 +54,12 @@ static void	acpi_fdt_attach(device_t, de
 
 static void	acpi_fdt_poweroff(device_t);
 
+static void	acpi_fdt_sysctl_init(void);
+
 static struct acpi_pci_context acpi_fdt_pci_context;
 
+static uint64_t smbios_table = 0;
+
 static const char * const compatible[] = {
 	"netbsd,acpi",
 	NULL
@@ -109,6 +114,8 @@ acpi_fdt_attach(device_t parent, device_
 	aa.aa_dmat64 = faa->faa_dmat;
 #endif
 	config_found_ia(self, "acpibus", , 0);
+
+	acpi_fdt_sysctl_init();
 }
 
 static void
@@ -118,3 +125,28 @@ acpi_fdt_poweroff(device_t dev)
 	if (psci_available())
 		psci_system_off();
 }
+
+static void
+acpi_fdt_sysctl_init(void)
+{
+	const struct sysctlnode *rnode;
+	int error;
+
+	const int chosen = OF_finddevice("/chosen");
+	if (chosen >= 0)
+		of_getprop_uint64(chosen, "netbsd,smbios-table", _table);
+
+	error = sysctl_createv(NULL, 0, NULL, ,
+	CTLFLAG_PERMANENT, CTLTYPE_NODE, "machdep", NULL,
+	NULL, 0, NULL, 0, CTL_MACHDEP, CTL_EOL);
+	if (error)
+		return;
+
+	if (smbios_table != 0) {
+		(void)sysctl_createv(NULL, 0, , NULL,
+		CTLFLAG_PERMANENT | CTLFLAG_READONLY | CTLFLAG_HEX, CTLTYPE_QUAD,
+		"smbios", SYSCTL_DESCR("SMBIOS table pointer"),
+		NULL, 0, _table, sizeof(smbios_table),
+		CTL_CREATE, CTL_EOL);
+	}
+}



CVS commit: src/sys/stand/efiboot

2018-10-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Oct 23 10:13:00 UTC 2018

Modified Files:
src/sys/stand/efiboot: efiacpi.c

Log Message:
If an SMBIOS3 table is found, pass the address to the kernel via /chosen
"netbsd,smbios-table" property.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/stand/efiboot/efiacpi.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/stand/efiboot/efiacpi.c
diff -u src/sys/stand/efiboot/efiacpi.c:1.1 src/sys/stand/efiboot/efiacpi.c:1.2
--- src/sys/stand/efiboot/efiacpi.c:1.1	Fri Oct 12 22:08:04 2018
+++ src/sys/stand/efiboot/efiacpi.c	Tue Oct 23 10:12:59 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: efiacpi.c,v 1.1 2018/10/12 22:08:04 jmcneill Exp $ */
+/* $NetBSD: efiacpi.c,v 1.2 2018/10/23 10:12:59 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -38,8 +38,10 @@
 #define	ACPI_FDT_SIZE	(64 * 1024)
 
 static EFI_GUID Acpi20TableGuid = ACPI_20_TABLE_GUID;
+static EFI_GUID Smbios3TableGuid = SMBIOS3_TABLE_GUID;
 
 static void *acpi_root = NULL;
+static void *smbios3_table = NULL;
 
 int
 efi_acpi_probe(void)
@@ -50,6 +52,10 @@ efi_acpi_probe(void)
 	if (EFI_ERROR(status))
 		return EIO;
 
+	status = LibGetSystemConfigurationTable(, _table);
+	if (EFI_ERROR(status))
+		smbios3_table = NULL;
+
 	return 0;
 }
 
@@ -65,7 +71,10 @@ efi_acpi_show(void)
 	if (!efi_acpi_available())
 		return;
 
-	printf("ACPI: RSDP %p\n", acpi_root);
+	printf("ACPI: RSDP %p", acpi_root);
+	if (smbios3_table)
+		printf(", SMBIOS %p", smbios3_table);
+	printf("\n");
 }
 
 int
@@ -92,6 +101,8 @@ efi_acpi_create_fdt(void)
 
 	fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"), "chosen");
 	fdt_setprop_u64(fdt, fdt_path_offset(fdt, "/chosen"), "netbsd,acpi-root-table", (uint64_t)(uintptr_t)acpi_root);
+	if (smbios3_table)
+		fdt_setprop_u64(fdt, fdt_path_offset(fdt, "/chosen"), "netbsd,smbios-table", (uint64_t)(uintptr_t)smbios3_table);
 
 	fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"), "acpi");
 	fdt_setprop_string(fdt, fdt_path_offset(fdt, "/acpi"), "compatible", "netbsd,acpi");



CVS commit: src/share/man/man8

2018-10-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct 23 09:30:09 UTC 2018

Modified Files:
src/share/man/man8: diskless.8

Log Message:
note that rc.conf:flushroutes may be useful.  bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/share/man/man8/diskless.8

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/man8/diskless.8
diff -u src/share/man/man8/diskless.8:1.32 src/share/man/man8/diskless.8:1.33
--- src/share/man/man8/diskless.8:1.32	Mon Jul  3 21:31:00 2017
+++ src/share/man/man8/diskless.8	Tue Oct 23 09:30:09 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: diskless.8,v 1.32 2017/07/03 21:31:00 wiz Exp $
+.\"	$NetBSD: diskless.8,v 1.33 2018/10/23 09:30:09 mrg Exp $
 .\"
 .\" Copyright (c) 1994 Gordon W. Ross, Theo de Raadt
 .\" All rights reserved.
@@ -25,7 +25,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 October 7, 2006
+.Dd October 23, 2018
 .Dt DISKLESS 8
 .Os
 .Sh NAME
@@ -790,6 +790,13 @@ specify the swap file in
 or it will not be used!
 See
 .Xr swapctl 8 .
+.Pp
+It may be useful to set
+.Dq flushroutes=NO
+in
+.Pa /etc/rc.conf
+to avoid the default route supplied by the boot setup
+disappearing mid-boot.
 .Sh FILES
 .Bl -tag -width /usr/mdec/rbootd -compact
 .It Pa /etc/hosts



CVS commit: src/etc/rc.d

2018-10-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct 23 09:25:33 UTC 2018

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

Log Message:
only flush routes in stop routine if flushroutes is true, same as
the start up.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/etc/rc.d/network

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

Modified files:

Index: src/etc/rc.d/network
diff -u src/etc/rc.d/network:1.75 src/etc/rc.d/network:1.76
--- src/etc/rc.d/network:1.75	Fri Jul 27 15:31:02 2018
+++ src/etc/rc.d/network	Tue Oct 23 09:25:33 2018
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: network,v 1.75 2018/07/27 15:31:02 roy Exp $
+# $NetBSD: network,v 1.76 2018/10/23 09:25:33 mrg Exp $
 #
 
 # PROVIDE: network
@@ -567,8 +567,9 @@ network_stop_route()
 {
 	# flush routes
 	#
-	/sbin/route -qn flush
-
+	if checkyesno flushroutes; then
+		/sbin/route -qn flush
+	fi
 }
 
 load_rc_config $name



CVS commit: src/share/man/man4

2018-10-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct 23 09:23:46 UTC 2018

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

Log Message:
update the BUGS statement to say that xhci is mostly functional.


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

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

Modified files:

Index: src/share/man/man4/xhci.4
diff -u src/share/man/man4/xhci.4:1.2 src/share/man/man4/xhci.4:1.3
--- src/share/man/man4/xhci.4:1.2	Sat Jan 21 20:29:38 2017
+++ src/share/man/man4/xhci.4	Tue Oct 23 09:23:45 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: xhci.4,v 1.2 2017/01/21 20:29:38 jdolecek Exp $
+.\" $NetBSD: xhci.4,v 1.3 2018/10/23 09:23:45 mrg Exp $
 .\"
 .\" Copyright (c) 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 21, 2017
+.Dd September 30, 2018
 .Dt XHCI 4
 .Os
 .Sh NAME
@@ -51,4 +51,4 @@ driver appeared in
 .Nx 7.0 .
 .Sh BUGS
 .Nm
-driver is at best experimental.
+driver is mostly working, but still in development.



CVS commit: src/sys/dev/acpi

2018-10-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Oct 23 09:19:02 UTC 2018

Modified Files:
src/sys/dev/acpi: plgpio_acpi.c

Log Message:
Do not complain if the _AEI method is not found, just skip installing the
interrupt handler.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/plgpio_acpi.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/acpi/plgpio_acpi.c
diff -u src/sys/dev/acpi/plgpio_acpi.c:1.3 src/sys/dev/acpi/plgpio_acpi.c:1.4
--- src/sys/dev/acpi/plgpio_acpi.c:1.3	Mon Oct 22 22:29:35 2018
+++ src/sys/dev/acpi/plgpio_acpi.c	Tue Oct 23 09:19:02 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: plgpio_acpi.c,v 1.3 2018/10/22 22:29:35 jmcneill Exp $ */
+/* $NetBSD: plgpio_acpi.c,v 1.4 2018/10/23 09:19:02 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: plgpio_acpi.c,v 1.3 2018/10/22 22:29:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plgpio_acpi.c,v 1.4 2018/10/23 09:19:02 jmcneill Exp $");
 
 #include 
 #include 
@@ -123,8 +123,10 @@ plgpio_acpi_attach(device_t parent, devi
 
 	plgpio_attach(sc);
 
-	if (ACPI_FAILURE(acpi_event_create_gpio(self, asc->sc_handle, plgpio_acpi_register_event, asc))) {
-		aprint_error_dev(self, "failed to create events\n");
+	rv = acpi_event_create_gpio(self, asc->sc_handle, plgpio_acpi_register_event, asc);
+	if (ACPI_FAILURE(rv)) {
+		if (rv != AE_NOT_FOUND)
+			aprint_error_dev(self, "failed to create events: %s\n", AcpiFormatException(rv));
 		goto done;
 	}
 



CVS commit: src/sys/arch

2018-10-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Oct 23 09:15:36 UTC 2018

Modified Files:
src/sys/arch/arm/fdt: plcom_fdt.c
src/sys/arch/arm/imx: imx23_plcom.c
src/sys/arch/evbarm/dev: plcom.c
src/sys/arch/evbarm/ifpga: plcom_ifpga.c

Log Message:
Fix blank line printed at attach on ACPI


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/fdt/plcom_fdt.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imx23_plcom.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/evbarm/dev/plcom.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/ifpga/plcom_ifpga.c

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

Modified files:

Index: src/sys/arch/arm/fdt/plcom_fdt.c
diff -u src/sys/arch/arm/fdt/plcom_fdt.c:1.2 src/sys/arch/arm/fdt/plcom_fdt.c:1.3
--- src/sys/arch/arm/fdt/plcom_fdt.c:1.2	Fri Sep  7 12:50:58 2018
+++ src/sys/arch/arm/fdt/plcom_fdt.c	Tue Oct 23 09:15:35 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: plcom_fdt.c,v 1.2 2018/09/07 12:50:58 jmcneill Exp $ */
+/* $NetBSD: plcom_fdt.c,v 1.3 2018/10/23 09:15:35 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: plcom_fdt.c,v 1.2 2018/09/07 12:50:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plcom_fdt.c,v 1.3 2018/10/23 09:15:35 jmcneill Exp $");
 
 #include 
 #include 
@@ -102,6 +102,10 @@ plcom_fdt_attach(device_t parent, device
 		aprint_error(": couldn't map device\n");
 		return;
 	}
+
+	aprint_naive("\n");
+	aprint_normal(": ARM PL011 UART\n");
+
 	plcom_attach_subr(sc);
 
 	aprint_normal_dev(self, "interrupting on %s\n", intrstr);

Index: src/sys/arch/arm/imx/imx23_plcom.c
diff -u src/sys/arch/arm/imx/imx23_plcom.c:1.1 src/sys/arch/arm/imx/imx23_plcom.c:1.2
--- src/sys/arch/arm/imx/imx23_plcom.c:1.1	Tue Nov 20 19:06:13 2012
+++ src/sys/arch/arm/imx/imx23_plcom.c	Tue Oct 23 09:15:35 2018
@@ -1,4 +1,4 @@
-/* $Id: imx23_plcom.c,v 1.1 2012/11/20 19:06:13 jkunz Exp $ */
+/* $Id: imx23_plcom.c,v 1.2 2018/10/23 09:15:35 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -83,6 +83,9 @@ imx23_plcom_attach(device_t parent, devi
 	if (plcom_attached)
 		return;
 
+	aprint_naive("\n");
+	aprint_normal("\n");
+
 	sc->sc_dev = self;
 	sc->sc_frequency = IMX23_UART_CLK;
 	sc->sc_hwflags = PLCOM_HW_TXFIFO_DISABLE;

Index: src/sys/arch/evbarm/dev/plcom.c
diff -u src/sys/arch/evbarm/dev/plcom.c:1.55 src/sys/arch/evbarm/dev/plcom.c:1.56
--- src/sys/arch/evbarm/dev/plcom.c:1.55	Fri Oct 12 23:57:00 2018
+++ src/sys/arch/evbarm/dev/plcom.c	Tue Oct 23 09:15:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: plcom.c,v 1.55 2018/10/12 23:57:00 jmcneill Exp $	*/
+/*	$NetBSD: plcom.c,v 1.56 2018/10/23 09:15:36 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2001 ARM Ltd
@@ -94,7 +94,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.55 2018/10/12 23:57:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.56 2018/10/23 09:15:36 jmcneill Exp $");
 
 #include "opt_plcom.h"
 #include "opt_ddb.h"
@@ -438,8 +438,6 @@ plcom_attach_subr(struct plcom_softc *sc
 	struct plcom_instance *pi = >sc_pi;
 	struct tty *tp;
 
-	aprint_naive("\n");
-
 	callout_init(>sc_diag_callout, 0);
 	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_HIGH);
 
@@ -500,7 +498,6 @@ plcom_attach_subr(struct plcom_softc *sc
 			break;
 		}
 	}
-	aprint_normal("\n");
 
 	if (ISSET(sc->sc_hwflags, PLCOM_HW_TXFIFO_DISABLE)) {
 		sc->sc_fifolen = 1;

Index: src/sys/arch/evbarm/ifpga/plcom_ifpga.c
diff -u src/sys/arch/evbarm/ifpga/plcom_ifpga.c:1.16 src/sys/arch/evbarm/ifpga/plcom_ifpga.c:1.17
--- src/sys/arch/evbarm/ifpga/plcom_ifpga.c:1.16	Tue Feb 19 10:57:10 2013
+++ src/sys/arch/evbarm/ifpga/plcom_ifpga.c	Tue Oct 23 09:15:36 2018
@@ -1,4 +1,4 @@
-/*  $NetBSD: plcom_ifpga.c,v 1.16 2013/02/19 10:57:10 skrll Exp $ */
+/*  $NetBSD: plcom_ifpga.c,v 1.17 2018/10/23 09:15:36 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2001 ARM Ltd
@@ -32,7 +32,7 @@
 /* Interface to plcom (PL010) serial driver. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: plcom_ifpga.c,v 1.16 2013/02/19 10:57:10 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plcom_ifpga.c,v 1.17 2018/10/23 09:15:36 jmcneill Exp $");
 
 #include 
 #include 
@@ -97,6 +97,9 @@ plcom_ifpga_attach(device_t parent, devi
 		return;
 	}
 
+	aprint_naive("\n");
+	aprint_normal("\n");
+
 	plcom_attach_subr(sc);
 	isc->sc_ih = ifpga_intr_establish(ifa->ifa_irq, IPL_SERIAL,
 	plcomintr, sc);



CVS commit: src/sys/arch

2018-10-23 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Oct 23 08:38:18 UTC 2018

Modified Files:
src/sys/arch/arm/footbridge: footbridge_pci.c
src/sys/arch/evbarm/ifpga: ifpga_pci.c
src/sys/arch/evbarm/iq80310: iq80310_pci.c
src/sys/arch/evbarm/ixdp425: ixdp425_pci.c
src/sys/arch/evbarm/ixm1200: ixm1200_pci.c

Log Message:
Fix printf format strings - pci_intr_handle_t is uint64_t now on arm


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/footbridge/footbridge_pci.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/ifpga/ifpga_pci.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/iq80310/iq80310_pci.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/ixdp425/ixdp425_pci.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/ixm1200/ixm1200_pci.c

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

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_pci.c
diff -u src/sys/arch/arm/footbridge/footbridge_pci.c:1.29 src/sys/arch/arm/footbridge/footbridge_pci.c:1.30
--- src/sys/arch/arm/footbridge/footbridge_pci.c:1.29	Wed Apr 19 08:30:00 2017
+++ src/sys/arch/arm/footbridge/footbridge_pci.c	Tue Oct 23 08:38:18 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_pci.c,v 1.29 2017/04/19 08:30:00 skrll Exp $	*/
+/*	$NetBSD: footbridge_pci.c,v 1.30 2018/10/23 08:38:18 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: footbridge_pci.c,v 1.29 2017/04/19 08:30:00 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge_pci.c,v 1.30 2018/10/23 08:38:18 jmcneill Exp $");
 
 #include 
 #include 
@@ -314,18 +314,18 @@ const char *
 footbridge_pci_intr_string(void *pcv, pci_intr_handle_t ih, char *buf, size_t len)
 {
 #ifdef PCI_DEBUG
-	printf("footbridge_pci_intr_string(pcv=%p, ih=0x%lx)\n", pcv, ih);
+	printf("footbridge_pci_intr_string(pcv=%p, ih=0x%" PRIx64 ")\n", pcv, ih);
 #endif
 	if (ih == 0)
-		panic("footbridge_pci_intr_string: bogus handle 0x%lx", ih);
+		panic("footbridge_pci_intr_string: bogus handle 0x%" PRIx64, ih);
 
 #if NISA > 0
 	if (ih >= 0x80 && ih <= 0x8f) {
-		snprintf(buf, len, "isairq %ld", (ih & 0x0f));
+		snprintf(buf, len, "isairq %" PRIu64, (ih & 0x0f));
 		return buf;
 	}
 #endif
-	snprintf(buf, len, "irq %ld", ih);
+	snprintf(buf, len, "irq %" PRIu64, ih);
 	return buf;	
 }
 
@@ -342,7 +342,7 @@ footbridge_pci_intr_establish(
 	const char *intrstr;
 
 #ifdef PCI_DEBUG
-	printf("footbridge_pci_intr_establish(pcv=%p, ih=0x%lx, level=%d, func=%p, arg=%p)\n",
+	printf("footbridge_pci_intr_establish(pcv=%p, ih=0x%" PRIx64 ", level=%d, func=%p, arg=%p)\n",
 	pcv, ih, level, func, arg);
 #endif
 

Index: src/sys/arch/evbarm/ifpga/ifpga_pci.c
diff -u src/sys/arch/evbarm/ifpga/ifpga_pci.c:1.20 src/sys/arch/evbarm/ifpga/ifpga_pci.c:1.21
--- src/sys/arch/evbarm/ifpga/ifpga_pci.c:1.20	Fri Apr 21 12:18:59 2017
+++ src/sys/arch/evbarm/ifpga/ifpga_pci.c	Tue Oct 23 08:38:18 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifpga_pci.c,v 1.20 2017/04/21 12:18:59 jmcneill Exp $	*/
+/*	$NetBSD: ifpga_pci.c,v 1.21 2018/10/23 08:38:18 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2001 ARM Ltd
@@ -64,7 +64,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ifpga_pci.c,v 1.20 2017/04/21 12:18:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ifpga_pci.c,v 1.21 2018/10/23 08:38:18 jmcneill Exp $");
 
 #include 
 #include 
@@ -340,7 +340,7 @@ ifpga_pci_intr_string(void *pcv, pci_int
 	if (ih == 0)
 		panic("ifpga_pci_intr_string: bogus handle 0x%lx", ih);
 
-	snprintf(buf, len, "pciint%ld", ih - IFPGA_INTRNUM_PCIINT0);
+	snprintf(buf, len, "pciint%" PRIu64, ih - IFPGA_INTRNUM_PCIINT0);
 	return buf;	
 }
 

Index: src/sys/arch/evbarm/iq80310/iq80310_pci.c
diff -u src/sys/arch/evbarm/iq80310/iq80310_pci.c:1.13 src/sys/arch/evbarm/iq80310/iq80310_pci.c:1.14
--- src/sys/arch/evbarm/iq80310/iq80310_pci.c:1.13	Sat Mar 29 19:28:27 2014
+++ src/sys/arch/evbarm/iq80310/iq80310_pci.c	Tue Oct 23 08:38:18 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: iq80310_pci.c,v 1.13 2014/03/29 19:28:27 christos Exp $	*/
+/*	$NetBSD: iq80310_pci.c,v 1.14 2018/10/23 08:38:18 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: iq80310_pci.c,v 1.13 2014/03/29 19:28:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iq80310_pci.c,v 1.14 2018/10/23 08:38:18 jmcneill Exp $");
 
 #include 
 #include 
@@ -232,7 +232,7 @@ iq80310_pci_intr_map(const struct pci_at
 const char *
 iq80310_pci_intr_string(void *v, pci_intr_handle_t ih, char *buf, size_t len)
 {
-	snprintf(buf, len, "iq80310 irq %ld", ih);
+	snprintf(buf, len, "iq80310 irq %" PRIu64, ih);
 	return buf;
 }
 

Index: src/sys/arch/evbarm/ixdp425/ixdp425_pci.c
diff -u src/sys/arch/evbarm/ixdp425/ixdp425_pci.c:1.11 src/sys/arch/evbarm/ixdp425/ixdp425_pci.c:1.12
---