CVS commit: src/sys/netipsec

2017-07-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul 19 06:31:54 UTC 2017

Modified Files:
src/sys/netipsec: ipsec.c

Log Message:
Look up sav instead of relying on unstable sp->req->sav

This code is executed only in an error path so an additional lookup
doesn't matter.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/netipsec/ipsec.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/netipsec/ipsec.c
diff -u src/sys/netipsec/ipsec.c:1.105 src/sys/netipsec/ipsec.c:1.106
--- src/sys/netipsec/ipsec.c:1.105	Wed Jul 19 06:30:32 2017
+++ src/sys/netipsec/ipsec.c	Wed Jul 19 06:31:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec.c,v 1.105 2017/07/19 06:30:32 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec.c,v 1.106 2017/07/19 06:31:54 ozaki-r Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $	*/
 /*	$KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.105 2017/07/19 06:30:32 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.106 2017/07/19 06:31:54 ozaki-r Exp $");
 
 /*
  * IPsec controller part.
@@ -826,11 +826,15 @@ ipsec4_forward(struct mbuf *m, int *dest
 	/*
 	 * Find the correct route for outer IPv4 header, compute tunnel MTU.
 	 */
-	if (sp->req && sp->req->sav) {
+	if (sp->req) {
 		struct route *ro;
 		struct rtentry *rt;
+		struct secasvar *sav = NULL;
 
-		ro = &sp->req->sav->sah->sa_route;
+		error = key_checkrequest(sp->req, &sav);
+		if (error != 0)
+			return error;
+		ro = &sav->sah->sa_route;
 		rt = rtcache_validate(ro);
 		if (rt && rt->rt_ifp) {
 			*destmtu = rt->rt_rmx.rmx_mtu ?
@@ -838,6 +842,7 @@ ipsec4_forward(struct mbuf *m, int *dest
 			*destmtu -= ipsechdr;
 		}
 		rtcache_unref(rt, ro);
+		KEY_FREESAV(&sav);
 	}
 	KEY_FREESP(&sp);
 	return 0;



CVS commit: src/sys/netipsec

2017-07-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul 19 06:30:33 UTC 2017

Modified Files:
src/sys/netipsec: ipsec.c

Log Message:
Remove invalid M_AUTHIPDGM check on ESP isr->sav

M_AUTHIPDGM flag is set to a mbuf in ah_input_cb. An sav of ESP can
have AH authentication as sav->tdb_authalgxform. However, in that
case esp_input and esp_input_cb are used to do ESP decryption and
AH authentication and M_AUTHIPDGM never be set to a mbuf. So
checking M_AUTHIPDGM of a mbuf on isr->sav of ESP is meaningless.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/netipsec/ipsec.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/netipsec/ipsec.c
diff -u src/sys/netipsec/ipsec.c:1.104 src/sys/netipsec/ipsec.c:1.105
--- src/sys/netipsec/ipsec.c:1.104	Tue Jul 18 09:00:55 2017
+++ src/sys/netipsec/ipsec.c	Wed Jul 19 06:30:32 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec.c,v 1.104 2017/07/18 09:00:55 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec.c,v 1.105 2017/07/19 06:30:32 ozaki-r Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $	*/
 /*	$KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.104 2017/07/18 09:00:55 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.105 2017/07/19 06:30:32 ozaki-r Exp $");
 
 /*
  * IPsec controller part.
@@ -1737,7 +1737,6 @@ int
 ipsec_in_reject(const struct secpolicy *sp, const struct mbuf *m)
 {
 	struct ipsecrequest *isr;
-	int need_auth;
 
 	if (KEYDEBUG_ON(KEYDEBUG_IPSEC_DATA)) {
 		printf("%s: using SP\n", __func__);
@@ -1758,7 +1757,6 @@ ipsec_in_reject(const struct secpolicy *
 
 	/* XXX should compare policy against ipsec header history */
 
-	need_auth = 0;
 	for (isr = sp->req; isr != NULL; isr = isr->next) {
 		if (ipsec_get_reqlevel(isr) != IPSEC_LEVEL_REQUIRE)
 			continue;
@@ -1769,18 +1767,8 @@ ipsec_in_reject(const struct secpolicy *
 "ESP m_flags:%x\n", m->m_flags);
 return 1;
 			}
-
-			if (!need_auth &&
-isr->sav != NULL &&
-isr->sav->tdb_authalgxform != NULL &&
-(m->m_flags & M_AUTHIPDGM) == 0) {
-KEYDEBUG_PRINTF(KEYDEBUG_IPSEC_DUMP,
-"ESP/AH m_flags:%x\n", m->m_flags);
-return 1;
-			}
 			break;
 		case IPPROTO_AH:
-			need_auth = 1;
 			if ((m->m_flags & M_AUTHIPHDR) == 0) {
 KEYDEBUG_PRINTF(KEYDEBUG_IPSEC_DUMP,
 "AH m_flags:%x\n", m->m_flags);



CVS commit: src/tests/net/ipsec

2017-07-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul 19 02:06:47 UTC 2017

Modified Files:
src/tests/net/ipsec: t_ipsec_misc.sh

Log Message:
Add tests that explicitly delete SAs instead of waiting for expirations


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/net/ipsec/t_ipsec_misc.sh

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

Modified files:

Index: src/tests/net/ipsec/t_ipsec_misc.sh
diff -u src/tests/net/ipsec/t_ipsec_misc.sh:1.12 src/tests/net/ipsec/t_ipsec_misc.sh:1.13
--- src/tests/net/ipsec/t_ipsec_misc.sh:1.12	Wed Jul 19 02:06:11 2017
+++ src/tests/net/ipsec/t_ipsec_misc.sh	Wed Jul 19 02:06:47 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ipsec_misc.sh,v 1.12 2017/07/19 02:06:11 ozaki-r Exp $
+#	$NetBSD: t_ipsec_misc.sh,v 1.13 2017/07/19 02:06:47 ozaki-r Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -418,6 +418,34 @@ add_sa()
 	#check_sa_entries $SOCK_PEER $ip_local $ip_peer
 }
 
+delete_sa()
+{
+	local proto=$1
+	local ip_local=$2
+	local ip_peer=$3
+	local spi=$4
+	local tmpfile=./tmp
+	local extra=
+
+	export RUMP_SERVER=$SOCK_LOCAL
+	cat > $tmpfile <<-EOF
+	delete $ip_local $ip_peer $proto $((spi));
+	delete $ip_peer $ip_local $proto $((spi + 1));
+	EOF
+	$DEBUG && cat $tmpfile
+	atf_check -s exit:0 -o empty $HIJACKING setkey -c < $tmpfile
+	$DEBUG && $HIJACKING setkey -D
+
+	export RUMP_SERVER=$SOCK_PEER
+	cat > $tmpfile <<-EOF
+	delete $ip_local $ip_peer $proto $((spi));
+	delete $ip_peer $ip_local $proto $((spi + 1));
+	EOF
+	$DEBUG && cat $tmpfile
+	atf_check -s exit:0 -o empty $HIJACKING setkey -c < $tmpfile
+	$DEBUG && $HIJACKING setkey -D
+}
+
 check_packet_spi()
 {
 	local outfile=$1
@@ -468,6 +496,7 @@ test_spi()
 	local proto=$1
 	local algo=$2
 	local preferred=$3
+	local method=$4
 	local ip_local=10.0.0.1
 	local ip_peer=10.0.0.2
 	local algo_args="$(generate_algo_args $proto $algo)"
@@ -529,7 +558,11 @@ test_spi()
 		check_packet_spi $outfile $ip_local $ip_peer $proto_cap 10020
 	fi
 
-	wait_sa_disappeared 10020
+	if [ $method = delete ]; then
+		delete_sa $proto $ip_local $ip_peer 10020
+	else
+		wait_sa_disappeared 10020
+	fi
 
 	export RUMP_SERVER=$SOCK_LOCAL
 	atf_check -s exit:0 -o ignore rump.ping -c 1 -n -w 3 $ip_peer
@@ -541,7 +574,11 @@ test_spi()
 		check_packet_spi $outfile $ip_local $ip_peer $proto_cap 10010
 	fi
 
-	wait_sa_disappeared 10010
+	if [ $method = delete ]; then
+		delete_sa $proto $ip_local $ip_peer 10010
+	else
+		wait_sa_disappeared 10010
+	fi
 
 	export RUMP_SERVER=$SOCK_LOCAL
 	atf_check -s exit:0 -o ignore rump.ping -c 1 -n -w 3 $ip_peer
@@ -559,11 +596,12 @@ add_test_spi()
 	local proto=$1
 	local algo=$2
 	local preferred=$3
+	local method=$4
 	local _algo=$(echo $algo | sed 's/-//g')
 	local name= desc=
 
-	desc="Tests SAs with different SPIs of $proto ($algo) ($preferred SA preferred)"
-	name="ipsec_spi_${proto}_${_algo}_preferred_${preferred}"
+	desc="Tests SAs with different SPIs of $proto ($algo) ($preferred SA preferred) ($method)"
+	name="ipsec_spi_${proto}_${_algo}_preferred_${preferred}_${method}"
 
 	atf_test_case ${name} cleanup
 	eval "\
@@ -572,7 +610,7 @@ add_test_spi()
 	atf_set \"require.progs\" \"rump_server\" \"setkey\";	\
 	};\
 	${name}_body() {		\
-	test_spi $proto $algo $preferred;			\
+	test_spi $proto $algo $preferred $method;		\
 	rump_server_destroy_ifaces;\
 	};\
 	${name}_cleanup() {		\
@@ -592,15 +630,19 @@ atf_init_test_cases()
 		add_test_lifetime ipv6 esp $algo
 		add_test_update esp $algo sa
 		add_test_update esp $algo sp
-		add_test_spi esp $algo new
-		add_test_spi esp $algo old
+		add_test_spi esp $algo new delete
+		add_test_spi esp $algo old delete
+		add_test_spi esp $algo new timeout
+		add_test_spi esp $algo old timeout
 	done
 	for algo in $AH_AUTHENTICATION_ALGORITHMS_MINIMUM; do
 		add_test_lifetime ipv4 ah $algo
 		add_test_lifetime ipv6 ah $algo
 		add_test_update ah $algo sa
 		add_test_update ah $algo sp
-		add_test_spi ah $algo new
-		add_test_spi ah $algo old
+		add_test_spi ah $algo new delete
+		add_test_spi ah $algo old delete
+		add_test_spi ah $algo new timeout
+		add_test_spi ah $algo old timeout
 	done
 }



CVS commit: src/tests/net/ipsec

2017-07-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jul 19 02:06:11 UTC 2017

Modified Files:
src/tests/net/ipsec: t_ipsec_misc.sh

Log Message:
Make tests more stable

sleep command seems to wait longer than expected on anita so
use polling to wait for a state change.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/net/ipsec/t_ipsec_misc.sh

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

Modified files:

Index: src/tests/net/ipsec/t_ipsec_misc.sh
diff -u src/tests/net/ipsec/t_ipsec_misc.sh:1.11 src/tests/net/ipsec/t_ipsec_misc.sh:1.12
--- src/tests/net/ipsec/t_ipsec_misc.sh:1.11	Tue Jul 18 02:16:07 2017
+++ src/tests/net/ipsec/t_ipsec_misc.sh	Wed Jul 19 02:06:11 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ipsec_misc.sh,v 1.11 2017/07/18 02:16:07 ozaki-r Exp $
+#	$NetBSD: t_ipsec_misc.sh,v 1.12 2017/07/19 02:06:11 ozaki-r Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -438,6 +438,31 @@ check_packet_spi()
 	cat $outfile
 }
 
+wait_sa_disappeared()
+{
+	local spi=$1
+	local i=
+
+	export RUMP_SERVER=$SOCK_LOCAL
+	for i in $(seq 1 10); do
+		$HIJACKING setkey -D |grep -q "spi=$spi"
+		[ $? != 0 ] && break
+		sleep 1
+	done
+	if [ $i -eq 10 ]; then
+		atf_fail "SA (spi=$spi) didn't disappear in 10s"
+	fi
+	export RUMP_SERVER=$SOCK_PEER
+	for i in $(seq 1 10); do
+		$HIJACKING setkey -D |grep -q "spi=$spi"
+		[ $? != 0 ] && break
+		sleep 1
+	done
+	if [ $i -eq 10 ]; then
+		atf_fail "SA (spi=$spi) didn't disappear in 10s"
+	fi
+}
+
 test_spi()
 {
 	local proto=$1
@@ -504,7 +529,7 @@ test_spi()
 		check_packet_spi $outfile $ip_local $ip_peer $proto_cap 10020
 	fi
 
-	sleep $((3 + 1))
+	wait_sa_disappeared 10020
 
 	export RUMP_SERVER=$SOCK_LOCAL
 	atf_check -s exit:0 -o ignore rump.ping -c 1 -n -w 3 $ip_peer
@@ -516,7 +541,7 @@ test_spi()
 		check_packet_spi $outfile $ip_local $ip_peer $proto_cap 10010
 	fi
 
-	sleep $((6 + 1 - (3 + 1)))
+	wait_sa_disappeared 10010
 
 	export RUMP_SERVER=$SOCK_LOCAL
 	atf_check -s exit:0 -o ignore rump.ping -c 1 -n -w 3 $ip_peer



CVS commit: [netbsd-8] src/doc

2017-07-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jul 19 00:19:51 UTC 2017

Modified Files:
src/doc [netbsd-8]: CHANGES-8.0

Log Message:
144


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

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-8.0
diff -u src/doc/CHANGES-8.0:1.1.2.26 src/doc/CHANGES-8.0:1.1.2.27
--- src/doc/CHANGES-8.0:1.1.2.26	Tue Jul 18 19:29:43 2017
+++ src/doc/CHANGES-8.0	Wed Jul 19 00:19:51 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.0,v 1.1.2.26 2017/07/18 19:29:43 snj Exp $
+# $NetBSD: CHANGES-8.0,v 1.1.2.27 2017/07/19 00:19:51 snj Exp $
 
 A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04
 until the 8.0 release:
@@ -4495,3 +4495,8 @@ usr.bin/config/mkmakefile.c			1.69-1.70
 	- config: Allow multiline makeoptions to work by quoting the newline.
 	[jmcneill, ticket #114]
 
+sys/arch/evbarm/include/bootconfig.h		1.8
+
+	Build fix for ticket #114.
+	[jmcneill, ticket #144]
+



CVS commit: [netbsd-8] src/sys/arch/evbarm/include

2017-07-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jul 19 00:19:10 UTC 2017

Modified Files:
src/sys/arch/evbarm/include [netbsd-8]: bootconfig.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #144):
sys/arch/evbarm/include/bootconfig.h: revision 1.8
Wrap include of opt_machdep.h in ifdef _KERNEL_OPT


To generate a diff of this commit:
cvs rdiff -u -r1.6.152.1 -r1.6.152.2 src/sys/arch/evbarm/include/bootconfig.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/evbarm/include/bootconfig.h
diff -u src/sys/arch/evbarm/include/bootconfig.h:1.6.152.1 src/sys/arch/evbarm/include/bootconfig.h:1.6.152.2
--- src/sys/arch/evbarm/include/bootconfig.h:1.6.152.1	Tue Jul 18 19:13:09 2017
+++ src/sys/arch/evbarm/include/bootconfig.h	Wed Jul 19 00:19:10 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootconfig.h,v 1.6.152.1 2017/07/18 19:13:09 snj Exp $	*/
+/*	$NetBSD: bootconfig.h,v 1.6.152.2 2017/07/19 00:19:10 snj Exp $	*/
 
 /*
  * Copyright (c) 1994 Mark Brinicombe.
@@ -36,7 +36,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef _KERNEL_OPT
 #include "opt_machdep.h"
+#endif
 
 #include 
 



CVS commit: src/distrib/cobalt/ramdisk

2017-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 18 23:12:24 UTC 2017

Modified Files:
src/distrib/cobalt/ramdisk: Makefile

Log Message:
bump


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/cobalt/ramdisk/Makefile

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

Modified files:

Index: src/distrib/cobalt/ramdisk/Makefile
diff -u src/distrib/cobalt/ramdisk/Makefile:1.11 src/distrib/cobalt/ramdisk/Makefile:1.12
--- src/distrib/cobalt/ramdisk/Makefile:1.11	Tue Jan 24 13:04:01 2017
+++ src/distrib/cobalt/ramdisk/Makefile	Tue Jul 18 19:12:24 2017
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.11 2017/01/24 18:04:01 christos Exp $
+#	$NetBSD: Makefile,v 1.12 2017/07/18 23:12:24 christos Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	3500k
+IMAGESIZE=	3600k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1



CVS commit: src/sys/dev/usb

2017-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 18 23:11:01 UTC 2017

Modified Files:
src/sys/dev/usb: ualea.c

Log Message:
don't subtract uninitialized pktsize in error path.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/ualea.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/ualea.c
diff -u src/sys/dev/usb/ualea.c:1.7 src/sys/dev/usb/ualea.c:1.8
--- src/sys/dev/usb/ualea.c:1.7	Sat Jul 15 01:46:09 2017
+++ src/sys/dev/usb/ualea.c	Tue Jul 18 19:11:01 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ualea.c,v 1.7 2017/07/15 05:46:09 riastradh Exp $	*/
+/*	$NetBSD: ualea.c,v 1.8 2017/07/18 23:11:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.7 2017/07/15 05:46:09 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.8 2017/07/18 23:11:01 christos Exp $");
 
 #include 
 #include 
@@ -248,7 +248,7 @@ ualea_xfer_done(struct usbd_xfer *xfer, 
 	/* Check the transfer status.  */
 	if (status) {
 		aprint_error_dev(sc->sc_dev, "xfer failed: %d\n", status);
-		goto out;
+		return;
 	}
 
 	/* Get and sanity-check the transferred size.  */



CVS commit: src/distrib/newsmips/floppies/ramdisk

2017-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 18 23:07:20 UTC 2017

Modified Files:
src/distrib/newsmips/floppies/ramdisk: Makefile

Log Message:
bump


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/distrib/newsmips/floppies/ramdisk/Makefile

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

Modified files:

Index: src/distrib/newsmips/floppies/ramdisk/Makefile
diff -u src/distrib/newsmips/floppies/ramdisk/Makefile:1.33 src/distrib/newsmips/floppies/ramdisk/Makefile:1.34
--- src/distrib/newsmips/floppies/ramdisk/Makefile:1.33	Tue Jan 24 13:04:03 2017
+++ src/distrib/newsmips/floppies/ramdisk/Makefile	Tue Jul 18 19:07:20 2017
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.33 2017/01/24 18:04:03 christos Exp $
+#	$NetBSD: Makefile,v 1.34 2017/07/18 23:07:20 christos Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2660k
+IMAGESIZE=	2800k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1



CVS commit: src/sbin/modload

2017-07-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 18 19:50:54 UTC 2017

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

Log Message:
rgument.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sbin/modload/modload.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/modload/modload.8
diff -u src/sbin/modload/modload.8:1.46 src/sbin/modload/modload.8:1.47
--- src/sbin/modload/modload.8:1.46	Tue Jul 18 13:00:00 2017
+++ src/sbin/modload/modload.8	Tue Jul 18 19:50:54 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: modload.8,v 1.46 2017/07/18 13:00:00 christos Exp $
+.\" $NetBSD: modload.8,v 1.47 2017/07/18 19:50:54 wiz Exp $
 .\"
 .\" Copyright (c) 1993 Christopher G. Demetriou
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" <>
 .\"
-.Dd JUly 18, 2017
+.Dd July 18, 2017
 .Dt MODLOAD 8
 .Os
 .Sh NAME



CVS commit: [netbsd-8] src/doc

2017-07-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jul 18 18:35:43 UTC 2017

Modified Files:
src/doc [netbsd-8]: 3RDPARTY

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #114):
doc/3RDPARTY: 1.1453
Add entry for dts


To generate a diff of this commit:
cvs rdiff -u -r1.1444.2.3 -r1.1444.2.4 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1444.2.3 src/doc/3RDPARTY:1.1444.2.4
--- src/doc/3RDPARTY:1.1444.2.3	Tue Jul 18 18:09:42 2017
+++ src/doc/3RDPARTY	Tue Jul 18 18:35:43 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1444.2.3 2017/07/18 18:09:42 snj Exp $
+#	$NetBSD: 3RDPARTY,v 1.1444.2.4 2017/07/18 18:35:43 snj Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1702,3 +1702,14 @@ Responsible:	christos
 Location:	usr.bin/dc
 Notes:
 		Uses OpenSSL's bignum
+
+Package:	dts
+Version:	4.11.5
+Current Vers:	4.11.5
+Maintainer:	https://www.kernel.org/
+Archive Site:	https://cdn.kernel.org/pub/linux/kernel/v4.x/
+Home Page:	https://www.kernel.org/
+Mailing List:	mailto:devicet...@vger.kernel.org
+Responsible:	jmcneill
+License:	GPLv2 and dual GPLv2/X11 license
+Location:	sys/external/gpl2/dts



CVS commit: [netbsd-8] src

2017-07-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jul 18 18:09:44 UTC 2017

Modified Files:
src/doc [netbsd-8]: 3RDPARTY
src/external/bsd/byacc [netbsd-8]: byacc2netbsd
src/external/bsd/byacc/bin [netbsd-8]: Makefile
src/external/bsd/byacc/dist [netbsd-8]: CHANGES MANIFEST VERSION
btyaccpar.c btyaccpar.skel config.guess config.sub defs.h main.c
output.c yaccpar.c yaccpar.skel
src/external/bsd/byacc/dist/package [netbsd-8]: byacc.spec
mingw-byacc.spec
src/external/bsd/byacc/dist/package/debian [netbsd-8]: changelog
src/external/bsd/byacc/dist/package/pkgsrc [netbsd-8]: Makefile
src/external/bsd/byacc/dist/test/btyacc [netbsd-8]: btyacc_calc1.tab.c
btyacc_demo.tab.c btyacc_destroy1.tab.c btyacc_destroy2.tab.c
btyacc_destroy3.tab.c calc.tab.c calc1.tab.c calc2.tab.c
calc3.tab.c code_calc.code.c code_error.code.c empty.tab.c
err_inherit3.tab.c err_inherit4.tab.c err_syntax10.tab.c
err_syntax11.tab.c err_syntax12.tab.c err_syntax18.tab.c
err_syntax20.tab.c error.tab.c expr.oxout.tab.c grammar.tab.c
inherit0.tab.c inherit1.tab.c inherit2.tab.c ok_syntax1.tab.c
pure_calc.tab.c pure_error.tab.c quote_calc-s.tab.c
quote_calc.tab.c quote_calc2-s.tab.c quote_calc2.tab.c
quote_calc3-s.tab.c quote_calc3.tab.c quote_calc4-s.tab.c
quote_calc4.tab.c rename_debug.c varsyntax_calc1.tab.c
src/external/bsd/byacc/dist/test/yacc [netbsd-8]: big_l.output
calc3.tab.c ok_syntax1.tab.c pure_calc.tab.c pure_error.tab.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #114):
doc/3RDPARTY: 1.1445
external/bsd/byacc/bin/Makefile: up to 1.7
external/bsd/byacc/byacc2netbsd: up to 1.5
external/bsd/byacc/dist/CHANGES: up to 1.1.1.8
external/bsd/byacc/dist/MANIFEST: up to 1.1.1.4
external/bsd/byacc/dist/VERSION: up to 1.1.1.8
external/bsd/byacc/dist/btyaccpar.c: up to 1.4
external/bsd/byacc/dist/btyaccpar.skel: up to 1.4
external/bsd/byacc/dist/config.guess: up to 1.3
external/bsd/byacc/dist/config.sub: up to 1.3
external/bsd/byacc/dist/defs.h: up to 1.12
external/bsd/byacc/dist/main.c: up to 1.14
external/bsd/byacc/dist/output.c: up to 1.18
external/bsd/byacc/dist/package/byacc.spec: up to 1.1.1.7
external/bsd/byacc/dist/package/debian/changelog: up to 1.1.1.7
external/bsd/byacc/dist/package/mingw-byacc.spec: up to 1.1.1.4
external/bsd/byacc/dist/package/pkgsrc/Makefile: up to 1.1.1.7
external/bsd/byacc/dist/test/btyacc/btyacc_calc1.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/btyacc_demo.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/btyacc_destroy1.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/btyacc_destroy2.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/btyacc_destroy3.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/calc.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/calc1.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/calc2.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/calc3.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/code_calc.code.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/code_error.code.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/empty.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/err_inherit3.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/err_inherit4.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/err_syntax10.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/err_syntax11.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/err_syntax12.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/err_syntax18.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/err_syntax20.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/error.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/expr.oxout.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/grammar.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/inherit0.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/inherit1.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/inherit2.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/ok_syntax1.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/pure_calc.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/pure_error.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/quote_calc-s.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/quote_calc.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/quote_calc2-s.tab.c: up to 1.3
external/bsd/byacc/dist/test/btyacc/quote_ca

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

2017-07-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 18 18:02:37 UTC 2017

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

Log Message:
Fix encoding of LSDA entries. .eh_frame references in non-PIC mode can
use plain pointers. For PIC, any references to global objects must be
indirect, but the .eh_frame entries themselve should be pcrel.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/arm/arm.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.13 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.14
--- src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.13	Tue Jun  7 06:14:17 2016
+++ src/external/gpl3/gcc/dist/gcc/config/arm/arm.h	Tue Jul 18 18:02:37 2017
@@ -964,10 +964,8 @@ extern int arm_arch_crc;
 /* DWARF unwinding uses the normal indirect/pcrel vs absptr format
for 32bit platforms. */
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
-((flag_pic \
- && ((GLOBAL) || (CODE))) \
- ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \
- : DW_EH_PE_absptr)
+  (flag_pic ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
+: DW_EH_PE_absptr)
 #else
 /* ttype entries (the only interesting data references used)
use TARGET2 relocations.  */



CVS commit: [netbsd-8] src

2017-07-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jul 18 17:32:50 UTC 2017

Modified Files:
src/distrib/sets [netbsd-8]: mkvars.mk
src/distrib/sets/lists/comp [netbsd-8]: mi
src/distrib/sets/lists/debug [netbsd-8]: mi
src/external/gpl2 [netbsd-8]: Makefile
src/share/mk [netbsd-8]: bsd.own.mk
src/tools [netbsd-8]: Makefile
Added Files:
src/tools/dtc [netbsd-8]: Makefile
src/tools/libfdt [netbsd-8]: Makefile

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #114):
distrib/sets/lists/comp/mi: revision 1.2139
distrib/sets/lists/debug/mi: revision 1.217
distrib/sets/mkvars.mk: revision 1.32
external/gpl2/Makefile: revision 1.14
share/mk/bsd.own.mk: revision 1.1010
tools/Makefile: revisions 1.188, 1.189
tools/dtc/Makefile: revisions 1.1, 1.2
tools/libfdt/Makefile: revisions 1.1, 1.2
Add libfdt
--
New libfdt location
--
tools build glue.
--
Add dtc
--
add MKDTC
--
Add dtc
--
add DTC
--
add DTC
--
No need to set dtc twice.
--
Update for new libfdt location


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.4.1 src/distrib/sets/mkvars.mk
cvs rdiff -u -r1.2138 -r1.2138.2.1 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.216 -r1.216.2.1 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.13 -r1.13.8.1 src/external/gpl2/Makefile
cvs rdiff -u -r1.1009 -r1.1009.2.1 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.187 -r1.187.6.1 src/tools/Makefile
cvs rdiff -u -r0 -r1.2.4.2 src/tools/dtc/Makefile
cvs rdiff -u -r0 -r1.2.4.2 src/tools/libfdt/Makefile

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

Modified files:

Index: src/distrib/sets/mkvars.mk
diff -u src/distrib/sets/mkvars.mk:1.31 src/distrib/sets/mkvars.mk:1.31.4.1
--- src/distrib/sets/mkvars.mk:1.31	Fri Apr 21 22:46:26 2017
+++ src/distrib/sets/mkvars.mk	Tue Jul 18 17:32:50 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mkvars.mk,v 1.31 2017/04/21 22:46:26 christos Exp $
+# $NetBSD: mkvars.mk,v 1.31.4.1 2017/07/18 17:32:50 snj Exp $
 
 MKEXTRAVARS= \
 	MACHINE \
@@ -18,6 +18,7 @@ MKEXTRAVARS= \
 	MKCOMPAT \
 	MKCOMPATTESTS \
 	MKCOMPATMODULES \
+	MKDTC \
 	MKDYNAMICROOT \
 	MKMANPAGES \
 	MKSLJIT \

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2138 src/distrib/sets/lists/comp/mi:1.2138.2.1
--- src/distrib/sets/lists/comp/mi:1.2138	Sat May 27 21:02:54 2017
+++ src/distrib/sets/lists/comp/mi	Tue Jul 18 17:32:50 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2138 2017/05/27 21:02:54 bouyer Exp $
+#	$NetBSD: mi,v 1.2138.2.1 2017/07/18 17:32:50 snj Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -26,6 +26,7 @@
 ./usr/bin/cvs	comp-cvs-bin		cvs
 ./usr/bin/cvsbugcomp-cvs-bin		cvs
 ./usr/bin/cvslatestcomp-cvs-bin
+./usr/bin/dtc	comp-util-bin		dtc
 ./usr/bin/elfeditcomp-util-bin		binutils
 ./usr/bin/f77	comp-obsolete	obsolete
 ./usr/bin/fgen	comp-util-bin

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.216 src/distrib/sets/lists/debug/mi:1.216.2.1
--- src/distrib/sets/lists/debug/mi:1.216	Thu Jun  1 15:45:02 2017
+++ src/distrib/sets/lists/debug/mi	Tue Jul 18 17:32:50 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.216 2017/06/01 15:45:02 perseant Exp $
+# $NetBSD: mi,v 1.216.2.1 2017/07/18 17:32:50 snj Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -510,6 +510,7 @@
 ./usr/libdata/debug/usr/bin/dig.debug		comp-netutil-debug	debug
 ./usr/libdata/debug/usr/bin/dirname.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/dns-sd.debug	comp-mdns-debug		mdns,debug
+./usr/libdata/debug/usr/bin/dtc.debug		comp-dtc-debug		dtc,debug
 ./usr/libdata/debug/usr/bin/du.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/eject.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/ekermit.debug	comp-util-debug		debug

Index: src/external/gpl2/Makefile
diff -u src/external/gpl2/Makefile:1.13 src/external/gpl2/Makefile:1.13.8.1
--- src/external/gpl2/Makefile:1.13	Thu Jan 14 21:13:54 2016
+++ src/external/gpl2/Makefile	Tue Jul 18 17:32:50 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2016/01/14 21:13:54 christos Exp $
+#	$NetBSD: Makefile,v 1.13.8.1 2017/07/18 17:32:50 snj Exp $
 
 .include 
 
@@ -17,6 +17,10 @@ SUBDIR+= grep
 SUBDIR+=groff
 .endif
 
+.if ${MKDTC} != "no"
+SUBDIR+=	dtc
+.endif
+
 SUBDIR+= gettext diffutils texinfo rcs send-pr
 
 .include 

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1009 src/share/mk/bsd.own.mk:1.1009.2.1
--- src/share/mk/bsd.own.mk:1.1009	Sun May 21 15:28:42 2017
+++ src/share/mk/bsd.own.mk	Tue Jul 18 17:32:50 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1009 2017/05/21 15:28:42 riastradh Exp $
+#	$NetBSD: bsd

CVS commit: src/usr.sbin/sysinst/arch/landisk

2017-07-18 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Jul 18 17:15:45 UTC 2017

Modified Files:
src/usr.sbin/sysinst/arch/landisk: md.c

Log Message:
Clear the screen after running installboot.  If we don't, there will
be a leftover line saying "Status: Finished" at the top of subsequent
screens, and the message "Hit enter to continue" will be redrawn after
the set selection is complete, which confuses literal-minded robotic
users such as anita.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/landisk/md.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/sysinst/arch/landisk/md.c
diff -u src/usr.sbin/sysinst/arch/landisk/md.c:1.2 src/usr.sbin/sysinst/arch/landisk/md.c:1.3
--- src/usr.sbin/sysinst/arch/landisk/md.c:1.2	Sun Aug  3 16:09:40 2014
+++ src/usr.sbin/sysinst/arch/landisk/md.c	Tue Jul 18 17:15:45 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.2 2014/08/03 16:09:40 martin Exp $	*/
+/*	$NetBSD: md.c,v 1.3 2017/07/18 17:15:45 gson Exp $	*/
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -128,7 +128,7 @@ md_post_newfs(void)
 	cp_to_target("/usr/mdec/boot", "/boot");
 	bootxx = bootxx_name();
 	if (bootxx != NULL) {
-		error = run_program(RUN_DISPLAY | RUN_NO_CLEAR,
+		error = run_program(RUN_DISPLAY,
 		"/usr/sbin/installboot -v /dev/r%sa %s", pm->diskdev, bootxx);
 		free(bootxx);
 	} else



CVS commit: [netbsd-8] src/doc

2017-07-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jul 18 17:09:06 UTC 2017

Modified Files:
src/doc [netbsd-8]: CHANGES-8.0

Log Message:
113


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

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-8.0
diff -u src/doc/CHANGES-8.0:1.1.2.24 src/doc/CHANGES-8.0:1.1.2.25
--- src/doc/CHANGES-8.0:1.1.2.24	Fri Jul 14 08:42:07 2017
+++ src/doc/CHANGES-8.0	Tue Jul 18 17:09:06 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.0,v 1.1.2.24 2017/07/14 08:42:07 martin Exp $
+# $NetBSD: CHANGES-8.0,v 1.1.2.25 2017/07/18 17:09:06 snj Exp $
 
 A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04
 until the 8.0 release:
@@ -1964,3 +1964,9 @@ sys/arch/x86/x86/lapic.c			1.60
 	Before access MSR[APICBASE], need to check if APIC is present.
 	[nonaka, ticket #135]
 
+usr.bin/make/main.c1.266-1.272
+usr.bin/make/make.11.267
+
+	Add "-v variable" flag that prints a fully-expanded variable.
+	[jmcneill, ticket #113]
+



CVS commit: [netbsd-8] src/sys/external/bsd/libfdt/dist

2017-07-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jul 18 17:08:08 UTC 2017

Modified Files:
src/sys/external/bsd/libfdt/dist [netbsd-8]: Makefile.libfdt fdt.c
fdt.h fdt_addresses.c fdt_empty_tree.c fdt_ro.c fdt_rw.c
fdt_strerror.c fdt_sw.c fdt_wip.c libfdt.h libfdt_env.h
libfdt_internal.h version.lds
Added Files:
src/sys/external/bsd/libfdt/dist [netbsd-8]: fdt_overlay.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/external/bsd/libfdt/dist/Makefile.libfdt: up to 1.1.1.2
sys/external/bsd/libfdt/dist/fdt.c: up to 1.1.1.2
sys/external/bsd/libfdt/dist/fdt.h: up to 1.1.1.2
sys/external/bsd/libfdt/dist/fdt_addresses.c: up to 1.1.1.2
sys/external/bsd/libfdt/dist/fdt_empty_tree.c: up to 1.1.1.2
sys/external/bsd/libfdt/dist/fdt_overlay.c: up to 1.1.1.1
sys/external/bsd/libfdt/dist/fdt_ro.c: up to 1.1.1.2
sys/external/bsd/libfdt/dist/fdt_rw.c: up to 1.1.1.2
sys/external/bsd/libfdt/dist/fdt_strerror.c: up to 1.1.1.2
sys/external/bsd/libfdt/dist/fdt_sw.c: up to 1.1.1.2
sys/external/bsd/libfdt/dist/fdt_wip.c: up to 1.1.1.2
sys/external/bsd/libfdt/dist/libfdt.h: up to 1.1.1.2
sys/external/bsd/libfdt/dist/libfdt_env.h: up to 1.3
sys/external/bsd/libfdt/dist/libfdt_internal.h: up to 1.1.1.2
sys/external/bsd/libfdt/dist/version.lds: up to 1.1.1.2
Import of libfdt from DTC version 1.4.4


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.12.1 \
src/sys/external/bsd/libfdt/dist/Makefile.libfdt \
src/sys/external/bsd/libfdt/dist/fdt.c \
src/sys/external/bsd/libfdt/dist/fdt.h \
src/sys/external/bsd/libfdt/dist/fdt_addresses.c \
src/sys/external/bsd/libfdt/dist/fdt_empty_tree.c \
src/sys/external/bsd/libfdt/dist/fdt_ro.c \
src/sys/external/bsd/libfdt/dist/fdt_rw.c \
src/sys/external/bsd/libfdt/dist/fdt_strerror.c \
src/sys/external/bsd/libfdt/dist/fdt_sw.c \
src/sys/external/bsd/libfdt/dist/fdt_wip.c \
src/sys/external/bsd/libfdt/dist/libfdt.h \
src/sys/external/bsd/libfdt/dist/libfdt_internal.h \
src/sys/external/bsd/libfdt/dist/version.lds
cvs rdiff -u -r0 -r1.1.1.1.4.2 src/sys/external/bsd/libfdt/dist/fdt_overlay.c
cvs rdiff -u -r1.2 -r1.2.12.1 src/sys/external/bsd/libfdt/dist/libfdt_env.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/external/bsd/libfdt/dist/Makefile.libfdt
diff -u src/sys/external/bsd/libfdt/dist/Makefile.libfdt:1.1.1.1 src/sys/external/bsd/libfdt/dist/Makefile.libfdt:1.1.1.1.12.1
--- src/sys/external/bsd/libfdt/dist/Makefile.libfdt:1.1.1.1	Sun Dec 13 16:45:07 2015
+++ src/sys/external/bsd/libfdt/dist/Makefile.libfdt	Tue Jul 18 17:08:08 2017
@@ -7,5 +7,5 @@ LIBFDT_soname = libfdt.$(SHAREDLIB_EXT).
 LIBFDT_INCLUDES = fdt.h libfdt.h libfdt_env.h
 LIBFDT_VERSION = version.lds
 LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empty_tree.c \
-	fdt_addresses.c
+	fdt_addresses.c fdt_overlay.c
 LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)
Index: src/sys/external/bsd/libfdt/dist/fdt.c
diff -u src/sys/external/bsd/libfdt/dist/fdt.c:1.1.1.1 src/sys/external/bsd/libfdt/dist/fdt.c:1.1.1.1.12.1
--- src/sys/external/bsd/libfdt/dist/fdt.c:1.1.1.1	Sun Dec 13 16:45:07 2015
+++ src/sys/external/bsd/libfdt/dist/fdt.c	Tue Jul 18 17:08:08 2017
@@ -1,3 +1,5 @@
+/*	$NetBSD: fdt.c,v 1.1.1.1.12.1 2017/07/18 17:08:08 snj Exp $	*/
+
 /*
  * libfdt - Flat Device Tree manipulation
  * Copyright (C) 2006 David Gibson, IBM Corporation.
@@ -76,18 +78,19 @@ int fdt_check_header(const void *fdt)
 
 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len)
 {
-	const char *p;
+	unsigned absoffset = offset + fdt_off_dt_struct(fdt);
+
+	if ((absoffset < offset)
+	|| ((absoffset + len) < absoffset)
+	|| (absoffset + len) > fdt_totalsize(fdt))
+		return NULL;
 
 	if (fdt_version(fdt) >= 0x11)
 		if (((offset + len) < offset)
 		|| ((offset + len) > fdt_size_dt_struct(fdt)))
 			return NULL;
 
-	p = _fdt_offset_ptr(fdt, offset);
-
-	if (p + len < p)
-		return NULL;
-	return p;
+	return _fdt_offset_ptr(fdt, offset);
 }
 
 uint32_t fdt_next_tag(const void *fdt, int startoffset, int *nextoffset)
Index: src/sys/external/bsd/libfdt/dist/fdt.h
diff -u src/sys/external/bsd/libfdt/dist/fdt.h:1.1.1.1 src/sys/external/bsd/libfdt/dist/fdt.h:1.1.1.1.12.1
--- src/sys/external/bsd/libfdt/dist/fdt.h:1.1.1.1	Sun Dec 13 16:45:07 2015
+++ src/sys/external/bsd/libfdt/dist/fdt.h	Tue Jul 18 17:08:08 2017
@@ -1,3 +1,5 @@
+/*	$NetBSD: fdt.h,v 1.1.1.1.12.1 2017/07/18 17:08:08 snj Exp $	*/
+
 #ifndef _FDT_H
 #define _FDT_H
 /*
Index: src/sys/external/bsd/libfdt/dist/fdt_addresses.c
diff -u src/sys/external/bsd/libfdt/dist/fdt_addresses.c:1.1.1.1 src/sys/external/bsd/libfdt/dist/fdt_addresses.c:1.1.1.1.12.1
--- src/sys/external/bsd/libfdt/

CVS commit: [netbsd-8] src/usr.bin/make

2017-07-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jul 18 15:26:14 UTC 2017

Modified Files:
src/usr.bin/make [netbsd-8]: main.c make.1

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #113):
usr.bin/make/main.c: 1.266-1.272
usr.bin/make/make.1: revision 1.267
move some code out of the gigantic main function; no functional change.
--
-V: try to expand the variable again if the value contains a variable.
--
simplify
--
a variable that starts with \\ is not expanded.
--
Remove previous variable expansion code; sjg had already added the code to
do it. Note that the manual page already documents this behavior and does
not need to change:
-dV -V VAR: prints the raw variable
-V VAR: prints the expanded variable
--
make the code look like to 1.266
--
Add -v variable that always expands variables; restore -V the way it was.


To generate a diff of this commit:
cvs rdiff -u -r1.265 -r1.265.2.1 src/usr.bin/make/main.c
cvs rdiff -u -r1.266 -r1.266.4.1 src/usr.bin/make/make.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/make/main.c
diff -u src/usr.bin/make/main.c:1.265 src/usr.bin/make/main.c:1.265.2.1
--- src/usr.bin/make/main.c:1.265	Wed May 10 22:26:14 2017
+++ src/usr.bin/make/main.c	Tue Jul 18 15:26:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $	*/
+/*	$NetBSD: main.c,v 1.265.2.1 2017/07/18 15:26:14 snj Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.265.2.1 2017/07/18 15:26:14 snj Exp $";
 #else
 #include 
 #ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = "@(#)main.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.265.2.1 2017/07/18 15:26:14 snj Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -155,7 +155,9 @@ Boolean			deleteOnError;	/* .DELETE_ON_E
 
 static Boolean		noBuiltins;	/* -r flag */
 static Lst		makefiles;	/* ordered list of makefiles to read */
-static Boolean		printVars;	/* print value of one or more vars */
+static int		printVars;	/* -[vV] argument */
+#define COMPAT_VARS 1
+#define EXPAND_VARS 2
 static Lst		variables;	/* list of variables to print */
 int			maxJobs;	/* -j argument */
 static int		maxJobTokens;	/* -j argument */
@@ -408,7 +410,7 @@ MainParseArgs(int argc, char **argv)
 	Boolean inOption, dashDash = FALSE;
 	char found_path[MAXPATHLEN + 1];	/* for searching for sys.mk */
 
-#define OPTFLAGS "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrstw"
+#define OPTFLAGS "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrstv:w"
 /* Can't actually use getopt(3) because rescanning is not portable */
 
 	getopt_def = OPTFLAGS;
@@ -533,8 +535,9 @@ rearg:	
 			Var_Append(MAKEFLAGS, argvalue, VAR_GLOBAL);
 			break;
 		case 'V':
+		case 'v':
 			if (argvalue == NULL) goto noarg;
-			printVars = TRUE;
+			printVars = c == 'v' ? EXPAND_VARS : COMPAT_VARS;
 			(void)Lst_AtEnd(variables, argvalue);
 			Var_Append(MAKEFLAGS, "-V", VAR_GLOBAL);
 			Var_Append(MAKEFLAGS, argvalue, VAR_GLOBAL);
@@ -846,6 +849,89 @@ MakeMode(const char *mode)
 free(mp);
 }
 
+static void
+doPrintVars(void)
+{
+	LstNode ln;
+	Boolean expandVars;
+
+	if (printVars == EXPAND_VARS)
+		expandVars = TRUE;
+	else if (debugVflag)
+		expandVars = FALSE;
+	else
+		expandVars = getBoolean(".MAKE.EXPAND_VARIABLES", FALSE);
+
+	for (ln = Lst_First(variables); ln != NULL;
+	ln = Lst_Succ(ln)) {
+		char *var = (char *)Lst_Datum(ln);
+		char *value;
+		char *p1;
+		
+		if (strchr(var, '$')) {
+			value = p1 = Var_Subst(NULL, var, VAR_GLOBAL,
+			VARF_WANTRES);
+		} else if (expandVars) {
+			char tmp[128];
+			int len = snprintf(tmp, sizeof(tmp), "${%s}", var);
+			
+			if (len >= (int)sizeof(tmp))
+Fatal("%s: variable name too big: %s",
+progname, var);
+			value = p1 = Var_Subst(NULL, tmp, VAR_GLOBAL,
+			VARF_WANTRES);
+		} else {
+			value = Var_Value(var, VAR_GLOBAL, &p1);
+		}
+		printf("%s\n", value ? value : "");
+		free(p1);
+	}
+}
+
+static Boolean
+runTargets(void)
+{
+	Lst targs;	/* target nodes to create -- passed to Make_Init */
+	Boolean outOfDate; 	/* FALSE if all targets up to date */
+
+	/*
+	 * Have now read the entire graph and need to make a list of
+	 * targets to create. If none was given on the command line,
+	 * we consult the parsing module to find the main target(s)
+	 * to create.
+	 */
+	if (Lst_IsEmpty(create))
+		targs = Parse_MainName();
+	else
+		targs = Targ_FindList(create, TARG_CREATE);
+
+	if (!compatMake) {
+		/*
+		 * Initialize job module before traversing the graph
+		 * now that any .BEGIN and .END targets have been read.
+		 * This is done only if the -q flag wasn't 

CVS commit: [perseant-stdc-iso10646] src/distrib/sets/lists

2017-07-18 Thread Konrad Schroder
Module Name:src
Committed By:   perseant
Date:   Tue Jul 18 14:55:29 UTC 2017

Modified Files:
src/distrib/sets/lists/debug [perseant-stdc-iso10646]: mi
src/distrib/sets/lists/tests [perseant-stdc-iso10646]: mi

Log Message:
Add t_ducet test


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.220.2.1 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.757 -r1.757.2.1 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.220 src/distrib/sets/lists/debug/mi:1.220.2.1
--- src/distrib/sets/lists/debug/mi:1.220	Fri Jul 14 14:57:43 2017
+++ src/distrib/sets/lists/debug/mi	Tue Jul 18 14:55:29 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.220 2017/07/14 14:57:43 perseant Exp $
+# $NetBSD: mi,v 1.220.2.1 2017/07/18 14:55:29 perseant Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -1947,6 +1947,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/locale/t_ctype2.debug		tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/locale/t_btowc.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/locale/t_digittoint.debug	tests-lib-debug		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libc/locale/t_ducet.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/locale/t_io.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/locale/t_mbrtowc.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/locale/t_mbsnrtowcs.debug	tests-lib-debug		debug,atf,compattestfile

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.757 src/distrib/sets/lists/tests/mi:1.757.2.1
--- src/distrib/sets/lists/tests/mi:1.757	Tue Jul 18 02:16:07 2017
+++ src/distrib/sets/lists/tests/mi	Tue Jul 18 14:55:29 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.757 2017/07/18 02:16:07 ozaki-r Exp $
+# $NetBSD: mi,v 1.757.2.1 2017/07/18 14:55:29 perseant Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2544,6 +2544,7 @@
 ./usr/tests/lib/libc/locale/t_ctype2		tests-obsolete		obsolete
 ./usr/tests/lib/libc/locale/t_btowc		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/locale/t_digittoint	tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libc/locale/t_ducet		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/locale/t_io		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/locale/t_mbrtowc		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/locale/t_mbsnrtowcs	tests-lib-tests		compattestfile,atf



CVS commit: src/share/mk

2017-07-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 18 14:36:43 UTC 2017

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Build PIC libs on MIPS and PPC64. While the normal calling convention is
position-independent, real PIC defaults to Global Dynamic as TLS model,
while non-PIC and PIE code can use more restrictive models like Initial
Exec. This is most visible with the thread_local destructor code now
using TLS in libc as it would be clobbered by any other shared library
with TLS due to static offset assignment by ld.


To generate a diff of this commit:
cvs rdiff -u -r1.1010 -r1.1011 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1010 src/share/mk/bsd.own.mk:1.1011
--- src/share/mk/bsd.own.mk:1.1010	Mon Jun  5 23:41:52 2017
+++ src/share/mk/bsd.own.mk	Tue Jul 18 14:36:43 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1010 2017/06/05 23:41:52 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1011 2017/07/18 14:36:43 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -788,22 +788,9 @@ MKLINT.ia64=	no
 MKGDB.ia64=	no
 
 #
-# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
-# not just shared libraries, so don't build the _pic version.
-#
-.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
-${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
-MKPICLIB:=	no
-.endif
-
-.if !defined(COMMON_MACHINE_ARCH)
-# Native PowerPC64 ABI is PIC.
-MKPICLIB.powerpc64:=	no
-.endif
-
-#
 # On VAX using ELF, all objects are PIC, not just shared libraries,
-# so don't build the _pic version.
+# so don't build the _pic version. VAX has no native TLS support either,
+# so differences between TLS models are not relevant.
 #
 MKPICLIB.vax=	no
 



CVS commit: src/lib/csu

2017-07-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jul 18 14:34:19 UTC 2017

Modified Files:
src/lib/csu/arch/mips: crtend.S
src/lib/csu/common: crtbegin.c

Log Message:
.eh_frame should be read-only on MIPS too.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/csu/arch/mips/crtend.S
cvs rdiff -u -r1.13 -r1.14 src/lib/csu/common/crtbegin.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/csu/arch/mips/crtend.S
diff -u src/lib/csu/arch/mips/crtend.S:1.3 src/lib/csu/arch/mips/crtend.S:1.4
--- src/lib/csu/arch/mips/crtend.S:1.3	Thu Sep  5 00:28:11 2013
+++ src/lib/csu/arch/mips/crtend.S	Tue Jul 18 14:34:19 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: crtend.S,v 1.3 2013/09/05 00:28:11 matt Exp $	*/
+/*	$NetBSD: crtend.S,v 1.4 2017/07/18 14:34:19 joerg Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
 
 #include 
 
-RCSID("$NetBSD: crtend.S,v 1.3 2013/09/05 00:28:11 matt Exp $")
+RCSID("$NetBSD: crtend.S,v 1.4 2017/07/18 14:34:19 joerg Exp $")
 
 	.section	.ctors, "aw", @progbits
 	.p2align 	PTR_SCALESHIFT
@@ -46,7 +46,7 @@ __CTOR_LIST_END__:
 __DTOR_LIST_END__:
 	.word		0
 
-	.section	.eh_frame, "aw", @progbits
+	.section	.eh_frame, "a", @progbits
 	.p2align	 PTR_SCALESHIFT
 	.space		_MIPS_SZPTR / 8
 

Index: src/lib/csu/common/crtbegin.c
diff -u src/lib/csu/common/crtbegin.c:1.13 src/lib/csu/common/crtbegin.c:1.14
--- src/lib/csu/common/crtbegin.c:1.13	Wed Jun 29 11:16:47 2016
+++ src/lib/csu/common/crtbegin.c	Tue Jul 18 14:34:19 2017
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: crtbegin.c,v 1.13 2016/06/29 11:16:47 joerg Exp $");
+__RCSID("$NetBSD: crtbegin.c,v 1.14 2017/07/18 14:34:19 joerg Exp $");
 
 #include "crtbegin.h"
 
@@ -57,11 +57,7 @@ __dso_hidden void *__dso_handle;
 #endif
 
 #if !defined(__ARM_EABI__) || defined(__ARM_DWARF_EH__)
-__dso_hidden
-#if !defined(__mips__)
-	const
-#endif
-	long __EH_FRAME_LIST__[0] __section(".eh_frame");
+__dso_hidden const long __EH_FRAME_LIST__[0] __section(".eh_frame");
 
 __weakref_visible void register_frame_info(const void *, const void *)
 	__weak_reference(__register_frame_info);



CVS commit: src/tests/usr.bin/mixerctl

2017-07-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jul 18 13:17:37 UTC 2017

Modified Files:
src/tests/usr.bin/mixerctl: t_mixerctl.sh

Log Message:
NFC: Typo in a comment corrected.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/mixerctl/t_mixerctl.sh

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

Modified files:

Index: src/tests/usr.bin/mixerctl/t_mixerctl.sh
diff -u src/tests/usr.bin/mixerctl/t_mixerctl.sh:1.7 src/tests/usr.bin/mixerctl/t_mixerctl.sh:1.8
--- src/tests/usr.bin/mixerctl/t_mixerctl.sh:1.7	Tue Jul 18 12:40:57 2017
+++ src/tests/usr.bin/mixerctl/t_mixerctl.sh	Tue Jul 18 13:17:37 2017
@@ -1,4 +1,4 @@
-# $NetBSD: t_mixerctl.sh,v 1.7 2017/07/18 12:40:57 kre Exp $
+# $NetBSD: t_mixerctl.sh,v 1.8 2017/07/18 13:17:37 kre Exp $
 
 audio_setup() {
 	# Open /dev/pad0 so we have a configured audio device.
@@ -17,7 +17,7 @@ audio_setup() {
 	# ATF appears to killpg() the process after the test finishes
 	# which is a good thing, otherwise a test that is skipped/fails
 	# would not kill the cat (doing it in a cleanup function is not
-	# convenient as it is a different execution environment, so shared
+	# convenient as it is a different execution environment, no shared
 	# variables, we would need to put $padpid in a file.)
 
 	unset padpid



CVS commit: src/sbin/modload

2017-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 18 13:00:00 UTC 2017

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

Log Message:
PR/52417: Edgar Pettijohn: modules.conf(5) not mentioned in related manuals


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sbin/modload/modload.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/modload/modload.8
diff -u src/sbin/modload/modload.8:1.45 src/sbin/modload/modload.8:1.46
--- src/sbin/modload/modload.8:1.45	Mon Sep 12 02:52:59 2016
+++ src/sbin/modload/modload.8	Tue Jul 18 09:00:00 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: modload.8,v 1.45 2016/09/12 06:52:59 wiz Exp $
+.\" $NetBSD: modload.8,v 1.46 2017/07/18 13:00:00 christos Exp $
 .\"
 .\" Copyright (c) 1993 Christopher G. Demetriou
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" <>
 .\"
-.Dd September 12, 2016
+.Dd JUly 18, 2017
 .Dt MODLOAD 8
 .Os
 .Sh NAME
@@ -129,6 +129,7 @@ utility exits with a status of 0 on succ
 and with a nonzero status if an error occurs.
 .Sh SEE ALSO
 .Xr modctl 2 ,
+.Xr modules.conf 5 ,
 .Xr module 7 ,
 .Xr modstat 8 ,
 .Xr modunload 8



CVS commit: src/tests/usr.bin/mixerctl

2017-07-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jul 18 12:40:57 UTC 2017

Modified Files:
src/tests/usr.bin/mixerctl: t_mixerctl.sh

Log Message:
Make sure that the open of /dev/pad0 has succeeded (or at the very
least been attempted) before attempting to open /dev/mixer to determine
if the system being tested has audio or not.  Leaving this for the background
cat command to do causes a race between that command and the parent sh.
Move this code to a helper function to avoid duplicating it.

Also avoid attempting to kill the background cat if it was never created.
The kill is likely unnecessary anyway, ATF seems to clean up processes
like that one without assistance.   Which is a good thing, as the kill
does not happen if the test is skipped, or fails.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/mixerctl/t_mixerctl.sh

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

Modified files:

Index: src/tests/usr.bin/mixerctl/t_mixerctl.sh
diff -u src/tests/usr.bin/mixerctl/t_mixerctl.sh:1.6 src/tests/usr.bin/mixerctl/t_mixerctl.sh:1.7
--- src/tests/usr.bin/mixerctl/t_mixerctl.sh:1.6	Mon Jul  3 09:08:35 2017
+++ src/tests/usr.bin/mixerctl/t_mixerctl.sh	Tue Jul 18 12:40:57 2017
@@ -1,17 +1,43 @@
-# $NetBSD: t_mixerctl.sh,v 1.6 2017/07/03 09:08:35 nat Exp $
+# $NetBSD: t_mixerctl.sh,v 1.7 2017/07/18 12:40:57 kre Exp $
+
+audio_setup() {
+	# Open /dev/pad0 so we have a configured audio device.
+	# Do it in a way that guarantees the open happens before
+	# we proceed to the (/dev/null & } < /dev/pad0 ; } 2>/dev/null && padpid=$!
+
+	(/dev/null 2>&1 ||
+	atf_skip "no audio mixer available in kernel"
+}
 
 atf_test_case noargs_usage
 noargs_usage_head() {
 	atf_set "descr" "Ensure mixerctl(1) with no args prints a usage message"
 }
 noargs_usage_body() {
-	cat /dev/pad0 > /dev/null 2>&1 &
-	padpid=$!
+	audio_setup
 
 	atf_check -s exit:0 -o not-empty -e ignore \
 		mixerctl
 
-	kill -HUP ${padpid} 2>/dev/null
+	${padpid+kill -HUP ${padpid}} 2>/dev/null || :
 }
 
 atf_test_case showvalue
@@ -19,18 +45,14 @@ showvalue_head() {
 	atf_set "descr" "Ensure mixerctl(1) can print the value for all variables"
 }
 showvalue_body() {
-	cat /dev/pad0 > /dev/null 2>&1 &
-	padpid=$!
-
-	(/dev/null 2>&1 ||
-	atf_skip "no audio mixer available in kernel"
+	audio_setup
 
 	for var in $(mixerctl -a | awk -F= '{print $1}'); do
 		atf_check -s exit:0 -e ignore -o match:"^${var}=" \
 			mixerctl ${var}
 	done
 
-	kill -HUP ${padpid} 2>/dev/null		# may have exited already
+	${padpid+kill -HUP ${padpid}} 2>/dev/null || :
 }
 
 atf_test_case nflag
@@ -38,11 +60,7 @@ nflag_head() {
 	atf_set "descr" "Ensure 'mixerctl -n' actually suppresses some output"
 }
 nflag_body() {
-	cat /dev/pad0 > /dev/null 2>&1 &
-	padpid=$!
-
-	(/dev/null 2>&1 ||
-	atf_skip "no audio mixer available in kernel"
+	audio_setup
 
 	varname="$(mixerctl -a | sed -e 's/=.*//' -e q)"
 
@@ -52,7 +70,7 @@ nflag_body() {
 	atf_check -s exit:0 -o not-match:"${varname}" -e ignore \
 		mixerctl -n ${varname}
 
-	kill -HUP ${padpid} 2>/dev/null
+	${padpid+kill -HUP ${padpid}} 2>/dev/null || :
 }
 
 atf_test_case nonexistant_device



CVS commit: src/sys/netipsec

2017-07-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul 18 09:00:55 UTC 2017

Modified Files:
src/sys/netipsec: ipsec.c

Log Message:
Restore a comment removed in previous

The comment is valid for the below code.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/netipsec/ipsec.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/netipsec/ipsec.c
diff -u src/sys/netipsec/ipsec.c:1.103 src/sys/netipsec/ipsec.c:1.104
--- src/sys/netipsec/ipsec.c:1.103	Tue Jul 18 08:55:10 2017
+++ src/sys/netipsec/ipsec.c	Tue Jul 18 09:00:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec.c,v 1.103 2017/07/18 08:55:10 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec.c,v 1.104 2017/07/18 09:00:55 ozaki-r Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $	*/
 /*	$KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.103 2017/07/18 08:55:10 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.104 2017/07/18 09:00:55 ozaki-r Exp $");
 
 /*
  * IPsec controller part.
@@ -787,6 +787,10 @@ ipsec4_input(struct mbuf *m, int flags)
 		return 0;
 	}
 
+	/*
+	 * Peek at the outbound SP for this packet to determine if
+	 * it is a Fast Forward candidate.
+	 */
 	s = splsoftnet();
 	sp = ipsec4_checkpolicy(m, IPSEC_DIR_OUTBOUND, flags, &error, NULL);
 	if (sp != NULL) {



CVS commit: src/sys/netipsec

2017-07-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul 18 08:55:10 UTC 2017

Modified Files:
src/sys/netipsec: ipsec.c

Log Message:
Remove m_tag_find(PACKET_TAG_IPSEC_PENDING_TDB) because nobody sets the tag


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/netipsec/ipsec.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/netipsec/ipsec.c
diff -u src/sys/netipsec/ipsec.c:1.102 src/sys/netipsec/ipsec.c:1.103
--- src/sys/netipsec/ipsec.c:1.102	Wed Jul 12 07:00:40 2017
+++ src/sys/netipsec/ipsec.c	Tue Jul 18 08:55:10 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec.c,v 1.102 2017/07/12 07:00:40 ozaki-r Exp $	*/
+/*	$NetBSD: ipsec.c,v 1.103 2017/07/18 08:55:10 ozaki-r Exp $	*/
 /*	$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $	*/
 /*	$KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.102 2017/07/12 07:00:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.103 2017/07/18 08:55:10 ozaki-r Exp $");
 
 /*
  * IPsec controller part.
@@ -787,16 +787,6 @@ ipsec4_input(struct mbuf *m, int flags)
 		return 0;
 	}
 
-	/*
-	 * Peek at the outbound SP for this packet to determine if
-	 * it is a Fast Forward candidate.
-	 */
-	mtag = m_tag_find(m, PACKET_TAG_IPSEC_PENDING_TDB, NULL);
-	if (mtag != NULL) {
-		m->m_flags &= ~M_CANFASTFWD;
-		return 0;
-	}
-
 	s = splsoftnet();
 	sp = ipsec4_checkpolicy(m, IPSEC_DIR_OUTBOUND, flags, &error, NULL);
 	if (sp != NULL) {



CVS commit: src/sys/dev

2017-07-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 18 08:22:55 UTC 2017

Modified Files:
src/sys/dev/mii: ihphyreg.h
src/sys/dev/pci: if_wm.c

Log Message:
- Add wm_write_smbus_addr() to set SMBus address by software.
- Modify wm_gmii_hv_{read,write}reg_locked() to make them access HV_SMB_ADDR
  correctly.
- Enable wm_init_lcd_from_nvm() again. Tested by Thinkpad X220.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/mii/ihphyreg.h
cvs rdiff -u -r1.527 -r1.528 src/sys/dev/pci/if_wm.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/mii/ihphyreg.h
diff -u src/sys/dev/mii/ihphyreg.h:1.1 src/sys/dev/mii/ihphyreg.h:1.2
--- src/sys/dev/mii/ihphyreg.h:1.1	Sat Nov 27 20:15:27 2010
+++ src/sys/dev/mii/ihphyreg.h	Tue Jul 18 08:22:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ihphyreg.h,v 1.1 2010/11/27 20:15:27 christos Exp $	*/
+/*	$NetBSD: ihphyreg.h,v 1.2 2017/07/18 08:22:55 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -108,4 +108,15 @@
 /* Diagnostics Status Register */
 #define	IHPHY_MII_DSR		BME1000_REG(0, 31)
 
+/*
+ * XXX I21[789] documents say that the SMBus Address register is at
+ * PHY address 01, Page 0 (not 768), Register 26.
+ */
+#define HV_SMB_ADDR		BME1000_REG(768, 26)
+#define HV_SMB_ADDR_ADDR	0x007f
+#define HV_SMB_ADDR_VALID	(1 << 7)
+#define HV_SMB_ADDR_FREQ_LOW	(1 << 8)
+#define HV_SMB_ADDR_PEC_EN	(1 << 9)
+#define HV_SMB_ADDR_FREQ_HIGH	(1 << 12)
+
 #endif /* _DEV_IHPHY_MIIREG_H_ */

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.527 src/sys/dev/pci/if_wm.c:1.528
--- src/sys/dev/pci/if_wm.c:1.527	Tue Jul 18 08:05:03 2017
+++ src/sys/dev/pci/if_wm.c	Tue Jul 18 08:22:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.527 2017/07/18 08:05:03 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.528 2017/07/18 08:22:55 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.527 2017/07/18 08:05:03 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.528 2017/07/18 08:22:55 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -134,6 +134,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -679,6 +680,7 @@ static void	wm_get_auto_rd_done(struct w
 static void	wm_lan_init_done(struct wm_softc *);
 static void	wm_get_cfg_done(struct wm_softc *);
 static void	wm_phy_post_reset(struct wm_softc *);
+static void	wm_write_smbus_addr(struct wm_softc *);
 static void	wm_init_lcd_from_nvm(struct wm_softc *);
 static void	wm_initialize_hardware_bits(struct wm_softc *);
 static uint32_t	wm_rxpbs_adjust_82580(uint32_t);
@@ -3705,16 +3707,57 @@ wm_phy_post_reset(struct wm_softc *sc)
 	/* Configure the LCD with the OEM bits in NVM */
 }
 
+/* Only for PCH and newer */
+static void
+wm_write_smbus_addr(struct wm_softc *sc)
+{
+	uint32_t strap, freq;
+	uint32_t phy_data;
+
+	DPRINTF(WM_DEBUG_INIT, ("%s: %s called\n",
+		device_xname(sc->sc_dev), __func__));
+
+	strap = CSR_READ(sc, WMREG_STRAP);
+	freq = __SHIFTOUT(strap, STRAP_FREQ);
+
+	phy_data = wm_gmii_hv_readreg_locked(sc->sc_dev, 2, HV_SMB_ADDR);
+
+	phy_data &= ~HV_SMB_ADDR_ADDR;
+	phy_data |= __SHIFTOUT(strap, STRAP_SMBUSADDR);
+	phy_data |= HV_SMB_ADDR_PEC_EN | HV_SMB_ADDR_VALID;
+
+	if (sc->sc_phytype == WMPHY_I217) {
+		/* Restore SMBus frequency */
+		if (freq --) {
+			phy_data &= ~(HV_SMB_ADDR_FREQ_LOW
+			| HV_SMB_ADDR_FREQ_HIGH);
+			phy_data |= __SHIFTIN((freq & 0x01) != 0,
+			HV_SMB_ADDR_FREQ_LOW);
+			phy_data |= __SHIFTIN((freq & 0x02) != 0,
+			HV_SMB_ADDR_FREQ_HIGH);
+		} else {
+			DPRINTF(WM_DEBUG_INIT,
+			("%s: %s Unsupported SMB frequency in PHY\n",
+device_xname(sc->sc_dev), __func__));
+		}
+	}
+
+	wm_gmii_hv_writereg_locked(sc->sc_dev, 2, HV_SMB_ADDR, phy_data);
+}
+
 void
 wm_init_lcd_from_nvm(struct wm_softc *sc)
 {
-#if 0
 	uint32_t extcnfctr, sw_cfg_mask, cnf_size, word_addr, i, reg;
 	uint16_t phy_page = 0;
 
+	DPRINTF(WM_DEBUG_INIT, ("%s: %s called\n",
+		device_xname(sc->sc_dev), __func__));
+
 	switch (sc->sc_type) {
 	case WM_T_ICH8:
-		if (sc->sc_phytype != WMPHY_IGP_3)
+		if ((sc->sc_phytype == WMPHY_UNKNOWN)
+		|| (sc->sc_phytype != WMPHY_IGP_3))
 			return;
 
 		if ((sc->sc_pcidevid == PCI_PRODUCT_INTEL_82801H_AMT)
@@ -3748,6 +3791,8 @@ wm_init_lcd_from_nvm(struct wm_softc *sc
 	&& ((extcnfctr & EXTCNFCTR_PCIE_WRITE_ENABLE) != 0))
 		goto release;
 
+	DPRINTF(WM_DEBUG_INIT, ("%s: %s: Configure LCD by software\n",
+		device_xname(sc->sc_dev), __func__));
 	/* word_addr is in DWORD */
 	word_addr = __SHIFTOUT(extcnfctr, EXTCNFCTR_EXT_CNF_POINTER) << 1;
 	
@@ -3762,8 +3807,9 @@ wm_init_lcd_from_nvm(struct wm_softc *sc
 		 * LCD Write Enable bits are set in the NVM. When both NVM bits
 		 * are cleared, SW will configure the

CVS commit: src/sys/dev/pci

2017-07-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 18 08:05:03 UTC 2017

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

Log Message:
 Move some initialization stuff in wm_attach() before wm_reset(). Some flags
and callback function is required to set correctly before wm_reset() because
wm_reset() and some helper functions refer them.


To generate a diff of this commit:
cvs rdiff -u -r1.526 -r1.527 src/sys/dev/pci/if_wm.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/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.526 src/sys/dev/pci/if_wm.c:1.527
--- src/sys/dev/pci/if_wm.c:1.526	Tue Jul 18 08:01:07 2017
+++ src/sys/dev/pci/if_wm.c	Tue Jul 18 08:05:03 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.526 2017/07/18 08:01:07 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.527 2017/07/18 08:05:03 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.526 2017/07/18 08:01:07 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.527 2017/07/18 08:05:03 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2188,9 +2188,6 @@ alloc_retry:
 		break;
 	}
 
-	/* Reset the chip to a known state. */
-	wm_reset(sc);
-
 	/* Ensure the SMBI bit is clear before first NVM or PHY access */
 	switch (sc->sc_type) {
 	case WM_T_82571:
@@ -2237,9 +2234,6 @@ alloc_retry:
 			sc->sc_flags |= WM_F_EEPROM_INVALID;
 	}
 
-	/* Set device properties (macflags) */
-	prop_dictionary_set_uint32(dict, "macflags", sc->sc_flags);
-
 	if (sc->sc_flags & WM_F_EEPROM_INVALID)
 		aprint_verbose_dev(sc->sc_dev, "No EEPROM");
 	else {
@@ -2263,6 +2257,15 @@ alloc_retry:
 	wm_nvm_version(sc);
 	aprint_verbose("\n");
 
+	/*
+	 * XXX The first call of wm_gmii_setup_phytype. The result might be
+	 * incorrect.
+	 */
+	wm_gmii_setup_phytype(sc, 0, 0);
+
+	/* Reset the chip to a known state. */
+	wm_reset(sc);
+
 	/* Check for I21[01] PLL workaround */
 	if (sc->sc_type == WM_T_I210)
 		sc->sc_flags |= WM_F_PLL_WA_I210;
@@ -2575,6 +2578,9 @@ alloc_retry:
 	snprintb(buf, sizeof(buf), WM_FLAGS, sc->sc_flags);
 	aprint_verbose_dev(sc->sc_dev, "%s\n", buf);
 
+	/* Set device properties (macflags) */
+	prop_dictionary_set_uint32(dict, "macflags", sc->sc_flags);
+
 	ifp = &sc->sc_ethercom.ec_if;
 	xname = device_xname(sc->sc_dev);
 	strlcpy(ifp->if_xname, xname, IFNAMSIZ);
@@ -9416,12 +9422,6 @@ wm_gmii_mediainit(struct wm_softc *sc, p
 	/* Initialize our media structures and probe the GMII. */
 	mii->mii_ifp = ifp;
 
-	/*
-	 * The first call of wm_mii_setup_phytype. The result might be
-	 * incorrect.
-	 */
-	wm_gmii_setup_phytype(sc, 0, 0);
-
 	mii->mii_statchg = wm_gmii_statchg;
 
 	/* get PHY control from SMBus to PCIe */
@@ -9514,7 +9514,7 @@ wm_gmii_mediainit(struct wm_softc *sc, p
 
 		/*
 		 * PHY Found! Check PHY type again by the second call of
-		 * wm_mii_setup_phytype.
+		 * wm_gmii_setup_phytype.
 		 */
 		wm_gmii_setup_phytype(sc, child->mii_mpd_oui,
 		child->mii_mpd_model);



CVS commit: src/sys/dev/pci

2017-07-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jul 18 08:01:07 UTC 2017

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

Log Message:
 Remove wrong semaphore access in wm_nvm_{read,write}_{ich8,spt} to prevent
hungup. A semaphore is get/put in wm_nvm_{read,write}.


To generate a diff of this commit:
cvs rdiff -u -r1.525 -r1.526 src/sys/dev/pci/if_wm.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/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.525 src/sys/dev/pci/if_wm.c:1.526
--- src/sys/dev/pci/if_wm.c:1.525	Fri Jul 14 04:34:29 2017
+++ src/sys/dev/pci/if_wm.c	Tue Jul 18 08:01:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.525 2017/07/14 04:34:29 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.526 2017/07/18 08:01:07 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.525 2017/07/14 04:34:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.526 2017/07/18 08:01:07 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -11964,13 +11964,6 @@ wm_nvm_read_ich8(struct wm_softc *sc, in
 	 */
 	bank_offset = flash_bank * (sc->sc_ich8_flash_bank_size * 2);
 
-	error = wm_get_swfwhw_semaphore(sc);
-	if (error) {
-		aprint_error_dev(sc->sc_dev, "%s: failed to get semaphore\n",
-		__func__);
-		return error;
-	}
-
 	for (i = 0; i < words; i++) {
 		/* The NVM part needs a byte offset, hence * 2 */
 		act_offset = bank_offset + ((offset + i) * 2);
@@ -11983,7 +11976,6 @@ wm_nvm_read_ich8(struct wm_softc *sc, in
 		data[i] = word;
 	}
 
-	wm_put_swfwhw_semaphore(sc);
 	return error;
 }
 
@@ -12028,13 +12020,6 @@ wm_nvm_read_spt(struct wm_softc *sc, int
 	 */
 	bank_offset = flash_bank * (sc->sc_ich8_flash_bank_size * 2);
 
-	error = wm_get_swfwhw_semaphore(sc);
-	if (error) {
-		aprint_error_dev(sc->sc_dev, "%s: failed to get semaphore\n",
-		__func__);
-		return error;
-	}
-
 	for (i = 0; i < words; i++) {
 		/* The NVM part needs a byte offset, hence * 2 */
 		act_offset = bank_offset + ((offset + i) * 2);
@@ -12052,7 +12037,6 @@ wm_nvm_read_spt(struct wm_softc *sc, int
 			data[i] = (uint16_t)((dword >> 16) & 0x);
 	}
 
-	wm_put_swfwhw_semaphore(sc);
 	return error;
 }