CVS commit: src/sys/net

2017-09-20 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Sep 21 04:44:32 UTC 2017

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

Log Message:
Remove unnecessary NULL check of rt_ifp

It's always non-NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 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.197 src/sys/net/route.c:1.198
--- src/sys/net/route.c:1.197	Wed Jun 28 04:10:47 2017
+++ src/sys/net/route.c	Thu Sep 21 04:44:32 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.197 2017/06/28 04:10:47 ozaki-r Exp $	*/
+/*	$NetBSD: route.c,v 1.198 2017/09/21 04:44:32 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.197 2017/06/28 04:10:47 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.198 2017/09/21 04:44:32 ozaki-r Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -2029,7 +2029,7 @@ retry:
 	}
 
 	RT_RLOCK();
-	if (rt != NULL && (rt->rt_flags & RTF_UP) != 0 && rt->rt_ifp != NULL) {
+	if (rt != NULL && (rt->rt_flags & RTF_UP) != 0) {
 #ifdef NET_MPSAFE
 		if (ISSET(rt->rt_flags, RTF_UPDATING)) {
 			if (rt_wait_ok()) {



CVS commit: src/usr.bin/sys_info

2017-09-20 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Sep 21 01:15:45 UTC 2017

Modified Files:
src/usr.bin/sys_info: sys_info.1 sys_info.sh

Log Message:
Update sys_info to 20170920

+ add a -d  option, which allows the versions of programs
in a directory tree rooted at "" to be reported on, rather
than the programs and libraries rooted under /. This is useful, for
example, for finding out the versions of utilities and libraries
after a build.sh run:

% sys_info
awk-20121220
bind-9.10.5pl2
bozohttpd-20170201
bzip2-1.0.6
calendar-20160601
dhcpcd-7.0.0-rc1
dtc-1.4.4
ftpd-20110904
g++-5.4.0
gcc-5.4.0
grep-2.5.1anb1
gzip-20170803
libc-12.208
...
% sys_info -d /data/8/build/dest/x86_64
awk-20121220
bind-9.10.5pl1
bozohttpd-20170201
bzip2-1.0.6
calendar-20160601
dhcpcd-7.0.0-rc1
ftpd-20110904
g++-5.4.0
gcc-5.4.0
grep-2.5.1anb1
gzip-20150113
libc-12.207
...
%


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/sys_info/sys_info.1
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/sys_info/sys_info.sh

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/sys_info/sys_info.1
diff -u src/usr.bin/sys_info/sys_info.1:1.6 src/usr.bin/sys_info/sys_info.1:1.7
--- src/usr.bin/sys_info/sys_info.1:1.6	Sun Aug 27 20:39:26 2017
+++ src/usr.bin/sys_info/sys_info.1	Thu Sep 21 01:15:45 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: sys_info.1,v 1.6 2017/08/27 20:39:26 wiz Exp $
+.\" $NetBSD: sys_info.1,v 1.7 2017/09/21 01:15:45 agc Exp $
 .\"
 .\" Copyright (c) 2016 Alistair Crooks <a...@netbsd.org>
 .\" All rights reserved.
@@ -23,7 +23,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 August 23, 2017
+.Dd September 20, 2017
 .Dt SYS_INFO 1
 .Os
 .Sh NAME
@@ -31,9 +31,10 @@
 .Nd script to show system version information
 .Sh SYNOPSIS
 .Nm
-.Op Fl v
 .Op Fl L Ar lib-path
 .Op Fl P Ar path
+.Op Fl d Ar destination-dir
+.Op Fl v
 .Op Ar component No ...
 .Sh DESCRIPTION
 The
@@ -66,6 +67,15 @@ via
 is used.
 To use the current value of $PATH from the caller, use:
 .Dl -P \*q$PATH\*q
+.It Fl d
+This option provides a destination directory, used
+as the root directory of an alternative set of programs
+and libraries.
+This can be useful for finding versions of utilities
+and libraries rooted in the file system directory,
+such as the destination directory from a
+.Dv build.sh
+run.
 .It Fl v
 Show the commands used to obtain the version information
 for each component

Index: src/usr.bin/sys_info/sys_info.sh
diff -u src/usr.bin/sys_info/sys_info.sh:1.14 src/usr.bin/sys_info/sys_info.sh:1.15
--- src/usr.bin/sys_info/sys_info.sh:1.14	Sat Sep  9 14:12:09 2017
+++ src/usr.bin/sys_info/sys_info.sh	Thu Sep 21 01:15:45 2017
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: sys_info.sh,v 1.14 2017/09/09 14:12:09 jmcneill Exp $
+# $NetBSD: sys_info.sh,v 1.15 2017/09/21 01:15:45 agc Exp $
 
 # Copyright (c) 2016 Alistair Crooks <a...@netbsd.org>
 # All rights reserved.
@@ -26,7 +26,7 @@
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-SYS_INFO_VERSION=20170909
+SYS_INFO_VERSION=20170920
 
 PATH=$(sysctl -n user.cs_path)
 export PATH
@@ -110,10 +110,10 @@ getversion() {
 		run "named -v | awk '{ gsub(\"-\", \"\", \$2); gsub(\"P\", \"pl\", \$2); print tolower(\$1) \"-\" \$2 }'"
 		$all || return 0 ;&
 	bozohttpd|httpd)
-		v=$(run "/usr/libexec/httpd -G" 2>/dev/null)
+		v=$(run "${destdir}/usr/libexec/httpd -G" 2>/dev/null)
 		case "${v}" in
 		"")
-			run  "strings -a /usr/libexec/httpd | awk -F/ '\$1 == \"bozohttpd\" && NF == 2 { print \$1 \"-\" \$2; exit }'"
+			run  "strings -a ${destdir}/usr/libexec/httpd | awk -F/ '\$1 == \"bozohttpd\" && NF == 2 { print \$1 \"-\" \$2; exit }'"
 			;;
 		*)
 			printf '%s\n' "bozohttpd-${v##*/}"
@@ -207,8 +207,8 @@ getversion() {
 		fi
 		$all || return 0 ;&
 	tzdata)
-		if [ -f /usr/share/zoneinfo/TZDATA_VERSION ]; then
-			run "cat /usr/share/zoneinfo/TZDATA_VERSION"
+		if [ -f ${destdir}/usr/share/zoneinfo/TZDATA_VERSION ]; then
+			run "cat ${destdir}/usr/share/zoneinfo/TZDATA_VERSION"
 		else
 			run "printf '%s\n' tzdata-too-old-to-matter"
 		fi
@@ -221,7 +221,7 @@ getversion() {
 		fi
 		$all || return 0 ;&
 	[uU]ser[lL]and|release)
-		run "sed &2 '%s\n' \
-		"Usage: $0 [-v] [-L lib-path] [-P path] [component ...]"
+		"Usage: $0 [-P path] [-L libdirs] [-d destdir] [-v] [system...]"
 		exit 2
 	esac
 done



CVS commit: src/share/misc

2017-09-20 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Thu Sep 21 00:40:10 UTC 2017

Modified Files:
src/share/misc: acronyms.comp

Log Message:
Add SDLC - software/system(s) development life cycle


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.185 src/share/misc/acronyms.comp:1.186
--- src/share/misc/acronyms.comp:1.185	Sun Sep 17 21:55:07 2017
+++ src/share/misc/acronyms.comp	Thu Sep 21 00:40:10 2017
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.185 2017/09/17 21:55:07 rtr Exp $
+$NetBSD: acronyms.comp,v 1.186 2017/09/21 00:40:10 ginsbach Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1157,6 +1157,7 @@ SDI	symbol deinterleave
 SDK	software development kit
 SDL	Simple Declarative Language
 SDL	Simple Direct-media Layer 
+SDLC	{software,system,systems} development life cycle
 SDRAM	synchronous dynamic random access memory
 SDT	syntax-directed translation
 SEGV	segmentation violation



CVS commit: src/sys/dev/i2c

2017-09-20 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Sep 20 22:44:28 UTC 2017

Modified Files:
src/sys/dev/i2c: adm1021.c

Log Message:
add MAX6690 which seems to be a straight up ADM1032 clone


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/i2c/adm1021.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/adm1021.c
diff -u src/sys/dev/i2c/adm1021.c:1.14 src/sys/dev/i2c/adm1021.c:1.15
--- src/sys/dev/i2c/adm1021.c:1.14	Wed Sep 13 21:15:11 2017
+++ src/sys/dev/i2c/adm1021.c	Wed Sep 20 22:44:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: adm1021.c,v 1.14 2017/09/13 21:15:11 macallan Exp $ */
+/*	$NetBSD: adm1021.c,v 1.15 2017/09/20 22:44:28 macallan Exp $ */
 /*	$OpenBSD: adm1021.c,v 1.27 2007/06/24 05:34:35 dlg Exp $	*/
 
 /*
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.14 2017/09/13 21:15:11 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.15 2017/09/20 22:44:28 macallan Exp $");
 
 #include 
 #include 
@@ -146,6 +146,7 @@ CFATTACH_DECL_NEW(admtemp, sizeof(struct
 static const char * admtemp_compats[] = {
 	"i2c-max1617",
 	"max6642",
+	"max6690",
 	NULL
 };
 
@@ -240,6 +241,12 @@ admtemp_setflags(struct admtemp_softc *s
 			strlcpy(name, "MAX6642", ADMTEMP_NAMELEN);
 			return;
 		}
+		if (strcmp("max6690", ia->ia_compat[i]) == 0) {
+			sc->sc_noneg = 0;
+			sc->sc_ext11 = 1;
+			strlcpy(name, "MAX6690", ADMTEMP_NAMELEN);
+			return;
+		}
 	}
 
 	/* Indirect config */
@@ -266,6 +273,9 @@ admtemp_setflags(struct admtemp_softc *s
 			sc->sc_therm = 0;	/* */
 			sc->sc_nolow = 1;
 			strlcpy(name, "MAX6642", ADMTEMP_NAMELEN);
+		} else if (*rev == 0) {
+			strlcpy(name, "MAX6690", ADMTEMP_NAMELEN);
+			sc->sc_ext11 = 1;
 		} else {
 			strlcpy(name, "MAX1617A", ADMTEMP_NAMELEN);
 		}



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

2017-09-20 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Sep 20 21:59:23 UTC 2017

Modified Files:
src/sys/arch/arm/nvidia: tegra210_xusbpad.c

Log Message:
parse ports node and configure usb2/usb3/hsic ports


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra210_xusbpad.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/nvidia/tegra210_xusbpad.c
diff -u src/sys/arch/arm/nvidia/tegra210_xusbpad.c:1.1 src/sys/arch/arm/nvidia/tegra210_xusbpad.c:1.2
--- src/sys/arch/arm/nvidia/tegra210_xusbpad.c:1.1	Tue Sep 19 23:18:01 2017
+++ src/sys/arch/arm/nvidia/tegra210_xusbpad.c	Wed Sep 20 21:59:23 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra210_xusbpad.c,v 1.1 2017/09/19 23:18:01 jmcneill Exp $ */
+/* $NetBSD: tegra210_xusbpad.c,v 1.2 2017/09/20 21:59:23 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra210_xusbpad.c,v 1.1 2017/09/19 23:18:01 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra210_xusbpad.c,v 1.2 2017/09/20 21:59:23 jmcneill Exp $");
 
 #include 
 #include 
@@ -97,6 +97,40 @@ static const struct tegra210_xusbpad_lan
 	XUSBPAD_LANE("sata-0", 0x28, __BITS(31,30), tegra210_xusbpad_pcie_func),
 };
 
+#define	XUSBPAD_PORT(n, r, m, im)		\
+	{	\
+		.name = (n),			\
+		.reg = (r),			\
+		.mask = (m),			\
+		.internal_mask = (im)		\
+	}
+
+struct tegra210_xusbpad_port {
+	const char		*name;
+	bus_size_t		reg;
+	uint32_t		mask;
+	uint32_t		internal_mask;
+};
+
+static const struct tegra210_xusbpad_port tegra210_xusbpad_usb2_ports[] = {
+	XUSBPAD_PORT("usb2-0", 0x08, __BITS(1,0), __BIT(2)),
+	XUSBPAD_PORT("usb2-1", 0x08, __BITS(5,4), __BIT(6)),
+	XUSBPAD_PORT("usb2-2", 0x08, __BITS(9,8), __BIT(10)),
+	XUSBPAD_PORT("usb2-3", 0x08, __BITS(13,12), __BIT(14)),
+};
+
+static const struct tegra210_xusbpad_port tegra210_xusbpad_usb3_ports[] = {
+	XUSBPAD_PORT("usb3-0", 0x14, __BITS(3,0), __BIT(4)),
+	XUSBPAD_PORT("usb3-1", 0x14, __BITS(8,5), __BIT(9)),
+	XUSBPAD_PORT("usb3-2", 0x14, __BITS(13,10), __BIT(14)),
+	XUSBPAD_PORT("usb3-3", 0x14, __BITS(18,15), __BIT(19)),
+}; 
+
+static const struct tegra210_xusbpad_port tegra210_xusbpad_hsic_ports[] = {
+	XUSBPAD_PORT("hsic-0", 0, 0, 0),
+	XUSBPAD_PORT("hsic-1", 0, 0, 0),
+};
+
 static int
 tegra210_xusbpad_find_func(const struct tegra210_xusbpad_lane *lane,
 const char *func)
@@ -146,7 +180,7 @@ tegra210_xusbpad_configure_lane(struct t
 		return;
 	}
 
-	aprint_debug_dev(sc->sc_dev, "[%s] set func %s\n", name, function);
+	aprint_normal_dev(sc->sc_dev, "lane %s: set func %s\n", name, function);
 	SETCLR4(sc, lane->reg, __SHIFTIN(func, lane->mask), lane->mask);
 }
 
@@ -198,6 +232,143 @@ tegra210_xusbpad_configure_pads(struct t
 	}
 }
 
+static const struct tegra210_xusbpad_port *
+tegra210_xusbpad_find_port(const char *name, const struct tegra210_xusbpad_port *ports,
+int nports)
+{
+	for (int n = 0; n < nports; n++)
+		if (strcmp(name, ports[n].name) == 0)
+			return [n];
+	return NULL;
+}
+
+static const struct tegra210_xusbpad_port *
+tegra210_xusbpad_find_usb2_port(const char *name)
+{
+	return tegra210_xusbpad_find_port(name, tegra210_xusbpad_usb2_ports,
+	__arraycount(tegra210_xusbpad_usb2_ports));
+}
+
+static const struct tegra210_xusbpad_port *
+tegra210_xusbpad_find_usb3_port(const char *name)
+{
+	return tegra210_xusbpad_find_port(name, tegra210_xusbpad_usb3_ports,
+	__arraycount(tegra210_xusbpad_usb3_ports));
+}
+
+static const struct tegra210_xusbpad_port *
+tegra210_xusbpad_find_hsic_port(const char *name)
+{
+	return tegra210_xusbpad_find_port(name, tegra210_xusbpad_hsic_ports,
+	__arraycount(tegra210_xusbpad_hsic_ports));
+}
+
+static void
+tegra210_xusbpad_configure_usb2_port(struct tegra210_xusbpad_softc *sc,
+int phandle, const struct tegra210_xusbpad_port *port)
+{
+	struct fdtbus_regulator *vbus_reg;
+	const char *mode;
+	u_int modeval, internal;
+
+	mode = fdtbus_get_string(phandle, "mode");
+	if (mode == NULL) {
+		aprint_error_dev(sc->sc_dev, "no 'mode' property on port %s\n", port->name);
+		return;
+	}
+	if (strcmp(mode, "host") == 0)
+		modeval = 1;
+	else if (strcmp(mode, "device") == 0)
+		modeval = 2;
+	else if (strcmp(mode, "otg") == 0)
+		modeval = 3;
+	else {
+		aprint_error_dev(sc->sc_dev, "unsupported mode '%s' on port %s\n", mode, port->name);
+		return;
+	}
+
+	internal = of_hasprop(phandle, "nvidia,internal");
+
+	vbus_reg = fdtbus_regulator_acquire(phandle, "vbus-supply");
+	if (vbus_reg && fdtbus_regulator_enable(vbus_reg) != 0) {
+		aprint_error_dev(sc->sc_dev,
+		"couldn't enable vbus regulator for port %s\n",
+		port->name);
+	}
+
+	aprint_normal_dev(sc->sc_dev, "port %s: set mode %s, %s\n", port->name, mode,
+	internal ? "internal" : "external");
+	SETCLR4(sc, port->reg, __SHIFTIN(internal, port->internal_mask), 

CVS commit: [jdolecek-ncq] src/sys/dev/isa

2017-09-20 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Sep 20 19:59:22 UTC 2017

Modified Files:
src/sys/dev/isa [jdolecek-ncq]: wdc_isa.c

Log Message:
deallocate the channel structures properly in wdc_isa_probe() also when
already the initial bus_space_map() fails


To generate a diff of this commit:
cvs rdiff -u -r1.59.28.2 -r1.59.28.3 src/sys/dev/isa/wdc_isa.c

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

Modified files:

Index: src/sys/dev/isa/wdc_isa.c
diff -u src/sys/dev/isa/wdc_isa.c:1.59.28.2 src/sys/dev/isa/wdc_isa.c:1.59.28.3
--- src/sys/dev/isa/wdc_isa.c:1.59.28.2	Wed Sep 20 19:44:38 2017
+++ src/sys/dev/isa/wdc_isa.c	Wed Sep 20 19:59:22 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc_isa.c,v 1.59.28.2 2017/09/20 19:44:38 jdolecek Exp $ */
+/*	$NetBSD: wdc_isa.c,v 1.59.28.3 2017/09/20 19:59:22 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.59.28.2 2017/09/20 19:44:38 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.59.28.3 2017/09/20 19:59:22 jdolecek Exp $");
 
 #include 
 #include 
@@ -143,9 +143,9 @@ wdc_isa_probe(device_t parent, cfdata_t 
 	bus_space_unmap(wdr.ctl_iot, wdr.ctl_ioh, WDC_ISA_AUXREG_NPORTS);
 outunmap:
 	bus_space_unmap(wdr.cmd_iot, wdr.cmd_baseioh, WDC_ISA_REG_NPORTS);
+out:
 	ata_queue_free(ch.ch_queue);
 	ata_channel_destroy();
-out:
 	return (result);
 }
 



CVS commit: [jdolecek-ncq] src/sys/dev/ata

2017-09-20 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Sep 20 19:45:37 UTC 2017

Modified Files:
src/sys/dev/ata [jdolecek-ncq]: TODO.ncq

Log Message:
MVSATA_WITHOUTDMA seems to work fine


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/sys/dev/ata/TODO.ncq

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.1.2.42 src/sys/dev/ata/TODO.ncq:1.1.2.43
--- src/sys/dev/ata/TODO.ncq:1.1.2.42	Tue Sep 19 21:06:25 2017
+++ src/sys/dev/ata/TODO.ncq	Wed Sep 20 19:45:37 2017
@@ -2,8 +2,6 @@ Bugs
 
 test wd* at umass?, confirm the ata_channel kludge works
 
-mvsata - resest MVSATA_WITHOUTDMA
-
 Other random notes (do outside the NCQ branch):
 -
 do biodone() in wddone() starting the dump to not leak bufs when dumping from



CVS commit: [jdolecek-ncq] src/sys/dev/isa

2017-09-20 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Sep 20 19:44:39 UTC 2017

Modified Files:
src/sys/dev/isa [jdolecek-ncq]: wdc_isa.c

Log Message:
initialize properly ata_channel during probe


To generate a diff of this commit:
cvs rdiff -u -r1.59.28.1 -r1.59.28.2 src/sys/dev/isa/wdc_isa.c

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

Modified files:

Index: src/sys/dev/isa/wdc_isa.c
diff -u src/sys/dev/isa/wdc_isa.c:1.59.28.1 src/sys/dev/isa/wdc_isa.c:1.59.28.2
--- src/sys/dev/isa/wdc_isa.c:1.59.28.1	Wed Jun 21 19:21:25 2017
+++ src/sys/dev/isa/wdc_isa.c	Wed Sep 20 19:44:38 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc_isa.c,v 1.59.28.1 2017/06/21 19:21:25 jdolecek Exp $ */
+/*	$NetBSD: wdc_isa.c,v 1.59.28.2 2017/09/20 19:44:38 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.59.28.1 2017/06/21 19:21:25 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.59.28.2 2017/09/20 19:44:38 jdolecek Exp $");
 
 #include 
 #include 
@@ -107,7 +107,9 @@ wdc_isa_probe(device_t parent, cfdata_t 
 
 	memset(, 0, sizeof(wdc));
 	memset(, 0, sizeof(ch));
+	ata_channel_init();
 	ch.ch_atac = _atac;
+	ch.ch_queue = ata_queue_alloc(1);
 	wdc.regs = 
 
 	wdr.cmd_iot = ia->ia_iot;
@@ -141,6 +143,8 @@ wdc_isa_probe(device_t parent, cfdata_t 
 	bus_space_unmap(wdr.ctl_iot, wdr.ctl_ioh, WDC_ISA_AUXREG_NPORTS);
 outunmap:
 	bus_space_unmap(wdr.cmd_iot, wdr.cmd_baseioh, WDC_ISA_REG_NPORTS);
+	ata_queue_free(ch.ch_queue);
+	ata_channel_destroy();
 out:
 	return (result);
 }



CVS commit: [jdolecek-ncq] src/sys/dev/ata

2017-09-20 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Sep 20 19:39:36 UTC 2017

Modified Files:
src/sys/dev/ata [jdolecek-ncq]: ata.c

Log Message:
add forgotten destroy of queue_idle cv in ata_queue_free()


To generate a diff of this commit:
cvs rdiff -u -r1.132.8.33 -r1.132.8.34 src/sys/dev/ata/ata.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/ata.c
diff -u src/sys/dev/ata/ata.c:1.132.8.33 src/sys/dev/ata/ata.c:1.132.8.34
--- src/sys/dev/ata/ata.c:1.132.8.33	Tue Sep 19 21:06:25 2017
+++ src/sys/dev/ata/ata.c	Wed Sep 20 19:39:36 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata.c,v 1.132.8.33 2017/09/19 21:06:25 jdolecek Exp $	*/
+/*	$NetBSD: ata.c,v 1.132.8.34 2017/09/20 19:39:36 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.132.8.33 2017/09/19 21:06:25 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.132.8.34 2017/09/20 19:39:36 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -328,6 +328,7 @@ ata_queue_free(struct ata_queue *chq)
 
 	cv_destroy(>queue_busy);
 	cv_destroy(>queue_drain);
+	cv_destroy(>queue_idle);
 
 	free(chq, M_DEVBUF);
 }



CVS commit: src/sys/arch/macppc/stand/fixcoff

2017-09-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 20 18:44:22 UTC 2017

Modified Files:
src/sys/arch/macppc/stand/fixcoff: elf32_powerpc_merge.x

Log Message:
PR/52564: Scole Mail: current ofwboot.xcf crashes because of .eh_frame* in .text


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x

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

Modified files:

Index: src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x
diff -u src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.4 src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.5
--- src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.4	Thu Apr 20 14:53:12 2017
+++ src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x	Wed Sep 20 14:44:22 2017
@@ -32,6 +32,9 @@ SECTIONS
 *(.rodata.*)
 *(.rodata1)
 *(.got1)
+  }
+  .eh_frame  :
+  {
 *(.eh_frame_hdr)
 *(.eh_frame)
   }



CVS commit: [jdolecek-ncq] src/sys/dev/ic

2017-09-20 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Sep 20 18:35:37 UTC 2017

Modified Files:
src/sys/dev/ic [jdolecek-ncq]: mvsata.c

Log Message:
make compile again with MVSATA_WITHOUTDMA


To generate a diff of this commit:
cvs rdiff -u -r1.35.6.26 -r1.35.6.27 src/sys/dev/ic/mvsata.c

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

Modified files:

Index: src/sys/dev/ic/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.35.6.26 src/sys/dev/ic/mvsata.c:1.35.6.27
--- src/sys/dev/ic/mvsata.c:1.35.6.26	Tue Sep 19 21:06:25 2017
+++ src/sys/dev/ic/mvsata.c	Wed Sep 20 18:35:37 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata.c,v 1.35.6.26 2017/09/19 21:06:25 jdolecek Exp $	*/
+/*	$NetBSD: mvsata.c,v 1.35.6.27 2017/09/20 18:35:37 jdolecek Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.35.6.26 2017/09/19 21:06:25 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.35.6.27 2017/09/20 18:35:37 jdolecek Exp $");
 
 #include "opt_mvsata.h"
 
@@ -107,10 +107,11 @@ int	mvsata_debug = 0;
 
 
 static void mvsata_probe_drive(struct ata_channel *);
+static void mvsata_reset_channel(struct ata_channel *, int);
+
 #ifndef MVSATA_WITHOUTDMA
 static int mvsata_bio(struct ata_drive_datas *, struct ata_xfer *);
 static void mvsata_reset_drive(struct ata_drive_datas *, int, uint32_t *);
-static void mvsata_reset_channel(struct ata_channel *, int);
 static int mvsata_exec_command(struct ata_drive_datas *, struct ata_xfer *);
 static int mvsata_addref(struct ata_drive_datas *);
 static void mvsata_delref(struct ata_drive_datas *);
@@ -731,6 +732,7 @@ mvsata_reset_drive(struct ata_drive_data
 
 	return;
 }
+#endif /* MVSATA_WITHOUTDMA */
 
 static void
 mvsata_reset_channel(struct ata_channel *chp, int flags)
@@ -768,16 +770,18 @@ mvsata_reset_channel(struct ata_channel 
 
 	ata_kill_active(chp, KILL_RESET, flags);
 
+#ifndef MVSATA_WITHOUTDMA
 	mvsata_edma_config(mvport, mvport->port_edmamode_curr);
 	mvsata_edma_reset_qptr(mvport);
 	mvsata_edma_enable(mvport);
+#endif
 
 	ata_channel_unlock(chp);
 
 	return;
 }
 
-
+#ifndef MVSATA_WITHOUTDMA
 static int
 mvsata_addref(struct ata_drive_datas *drvp)
 {



CVS commit: src/usr.bin/stat

2017-09-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Sep 20 17:45:25 UTC 2017

Modified Files:
src/usr.bin/stat: stat.c

Log Message:
Set the default time format for linux mode (-x) in the correct place,
so it only applies to -x (in particular, not to -s) and only if another
time format has not been explicitly selected (earlier in the arg list).

With luck, this will make lots of tests, which depended upon "stat -s"
actually generating correct sh assignment statements, go back to working again.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/stat/stat.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/stat/stat.c
diff -u src/usr.bin/stat/stat.c:1.40 src/usr.bin/stat/stat.c:1.41
--- src/usr.bin/stat/stat.c:1.40	Wed Sep 20 01:23:37 2017
+++ src/usr.bin/stat/stat.c	Wed Sep 20 17:45:25 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.c,v 1.40 2017/09/20 01:23:37 christos Exp $ */
+/*	$NetBSD: stat.c,v 1.41 2017/09/20 17:45:25 kre Exp $ */
 
 /*
  * Copyright (c) 2002-2011 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: stat.c,v 1.40 2017/09/20 01:23:37 christos Exp $");
+__RCSID("$NetBSD: stat.c,v 1.41 2017/09/20 17:45:25 kre Exp $");
 #endif
 
 #if ! HAVE_NBTOOL_CONFIG_H
@@ -265,7 +265,6 @@ main(int argc, char *argv[])
 errx(1, "can't use format '%c' with '%c'",
 fmtchar, ch);
 			fmtchar = ch;
-			timefmt = "%Y-%m-%d %H:%M:%S.%f %z";
 			break;
 		case 't':
 			timefmt = optarg;
@@ -311,7 +310,7 @@ main(int argc, char *argv[])
 	case 'x':
 		statfmt = LINUX_FORMAT;
 		if (timefmt == NULL)
-			timefmt = "%c";
+			timefmt = "%Y-%m-%d %H:%M:%S.%f %z";
 		break;
 	default:
 		usage(synopsis);



CVS commit: src

2017-09-20 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Sep 20 09:36:20 UTC 2017

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/net/route: Makefile
Added Files:
src/tests/net/route: t_rtcache.sh

Log Message:
Add tests of rtcache invalidation


To generate a diff of this commit:
cvs rdiff -u -r1.761 -r1.762 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.5 -r1.6 src/tests/net/route/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/route/t_rtcache.sh

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.761 src/distrib/sets/lists/tests/mi:1.762
--- src/distrib/sets/lists/tests/mi:1.761	Wed Aug 16 13:53:20 2017
+++ src/distrib/sets/lists/tests/mi	Wed Sep 20 09:36:20 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.761 2017/08/16 13:53:20 joerg Exp $
+# $NetBSD: mi,v 1.762 2017/09/20 09:36:20 ozaki-r Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3379,6 +3379,7 @@
 ./usr/tests/net/route/t_flags			tests-net-tests		atf,rump
 ./usr/tests/net/route/t_flags6			tests-net-tests		atf,rump
 ./usr/tests/net/route/t_route			tests-net-tests		atf,rump
+./usr/tests/net/route/t_rtcache			tests-net-tests		atf,rump
 ./usr/tests/net/systests-net-tests		compattestfile,atf
 ./usr/tests/net/sys/Atffile			tests-net-tests		compattestfile,atf
 ./usr/tests/net/sys/Kyuafile			tests-net-tests		compattestfile,atf,kyua

Index: src/tests/net/route/Makefile
diff -u src/tests/net/route/Makefile:1.5 src/tests/net/route/Makefile:1.6
--- src/tests/net/route/Makefile:1.5	Thu Nov 24 09:05:17 2016
+++ src/tests/net/route/Makefile	Wed Sep 20 09:36:20 2017
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.5 2016/11/24 09:05:17 ozaki-r Exp $
+#	$NetBSD: Makefile,v 1.6 2017/09/20 09:36:20 ozaki-r Exp $
 #
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/net/route
 
-.for name in change flags flags6 route
+.for name in change flags flags6 route rtcache
 TESTS_SH+=		t_${name}
 TESTS_SH_SRC_t_${name}=	../net_common.sh t_${name}.sh
 .endfor

Added files:

Index: src/tests/net/route/t_rtcache.sh
diff -u /dev/null src/tests/net/route/t_rtcache.sh:1.1
--- /dev/null	Wed Sep 20 09:36:20 2017
+++ src/tests/net/route/t_rtcache.sh	Wed Sep 20 09:36:20 2017
@@ -0,0 +1,167 @@
+#	$NetBSD: t_rtcache.sh,v 1.1 2017/09/20 09:36:20 ozaki-r Exp $
+#
+# Copyright (c) 2017 Internet Initiative Japan Inc.
+# 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 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.
+#
+
+SOCK_SRC=unix://rtcache_src
+SOCK_FWD=unix://rtcache_fwd
+SOCK_DST1=unix://rtcache_dst1
+SOCK_DST2=unix://rtcache_dst2
+
+BUS_SRC=./src
+BUS_DST1=./dst1
+BUS_DST2=./dst2
+
+DEBUG=${DEBUG:-false}
+
+atf_test_case rtcache_invalidation cleanup
+rtcache_invalidation_head()
+{
+
+	atf_set "descr" "Tests for rtcache invalidation"
+	atf_set "require.progs" "rump_server"
+}
+
+rtcache_invalidation_body()
+{
+	local ip_src=10.0.0.2
+	local ip_gwsrc=10.0.0.1
+	local ip_gwdst1=10.0.1.1
+	local ip_gwdst2=10.0.2.1
+	local ip_dst1=10.0.1.2
+	local ip_dst2=10.0.2.2
+	local ip_dst=10.0.3.1
+	local subnet_src=10.0.0.0
+	local subnet_dst=10.0.3.0
+
+	rump_server_start $SOCK_SRC
+	rump_server_start $SOCK_FWD
+	rump_server_start $SOCK_DST1
+	rump_server_start $SOCK_DST2
+
+	rump_server_add_iface $SOCK_SRC shmif0 $BUS_SRC
+
+	rump_server_add_iface $SOCK_FWD shmif0 $BUS_SRC
+	rump_server_add_iface $SOCK_FWD shmif1 $BUS_DST1
+	rump_server_add_iface $SOCK_FWD shmif2 $BUS_DST2
+
+	rump_server_add_iface $SOCK_DST1 shmif0 $BUS_DST1
+	rump_server_add_iface $SOCK_DST2 shmif0 $BUS_DST2
+
+	export RUMP_SERVER=$SOCK_SRC
+	atf_check -s exit:0 rump.sysctl -q -w 

CVS commit: src/usr.bin/stat

2017-09-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Sep 20 08:57:02 UTC 2017

Modified Files:
src/usr.bin/stat: stat.1

Log Message:
whitespace fixes, use Xr.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/stat/stat.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/stat/stat.1
diff -u src/usr.bin/stat/stat.1:1.39 src/usr.bin/stat/stat.1:1.40
--- src/usr.bin/stat/stat.1:1.39	Tue Sep 19 21:45:28 2017
+++ src/usr.bin/stat/stat.1	Wed Sep 20 08:57:02 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: stat.1,v 1.39 2017/09/19 21:45:28 christos Exp $
+.\"	$NetBSD: stat.1,v 1.40 2017/09/20 08:57:02 wiz Exp $
 .\"
 .\" Copyright (c) 2002-2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -183,7 +183,7 @@ output remains valid.
 Display timestamps using the specified format.
 This format is
 passed directly to
-.Xr strftime 3 
+.Xr strftime 3
 with the extension that %f prints nanoseconds if available.
 .It Fl v
 Turn off quiet mode.
@@ -275,8 +275,9 @@ applicable, should be in string format.
 May be used in combination with
 .Bl -tag -width Ds
 .It Cm amc
-Display date in strftime(3) format
-with the extension that %f prints nanoseconds if available.
+Display date in
+.Xr strftime 3
+format with the extension that %f prints nanoseconds if available.
 .It Cm dr
 Display actual device name.
 .It Cm gu
@@ -412,7 +413,7 @@ The time
 .Ar file
 was last accessed or modified, or when the inode was last changed, or
 the birth time of the inode
-.Pq Fa st_atime , st_mtime , st_ctime, st_birthtime .
+.Pq Fa st_atime , st_mtime , st_ctime , st_birthtime .
 .It Cm z
 The size of
 .Ar file