CVS commit: src/share/installboot/evbarm

2020-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 27 07:48:59 UTC 2020

Modified Files:
src/share/installboot/evbarm: boards.plist

Log Message:
Add Rock64 and Pinebook Pro to list of known boards.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/installboot/evbarm/boards.plist

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



CVS commit: src/share/installboot/evbarm

2020-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 27 07:48:59 UTC 2020

Modified Files:
src/share/installboot/evbarm: boards.plist

Log Message:
Add Rock64 and Pinebook Pro to list of known boards.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/installboot/evbarm/boards.plist

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

Modified files:

Index: src/share/installboot/evbarm/boards.plist
diff -u src/share/installboot/evbarm/boards.plist:1.4 src/share/installboot/evbarm/boards.plist:1.5
--- src/share/installboot/evbarm/boards.plist:1.4	Wed Jun  5 07:22:49 2019
+++ src/share/installboot/evbarm/boards.plist	Mon Jan 27 07:48:59 2020
@@ -1,4 +1,4 @@
-
+
 
+	pine64,rock64
+	
+		description
+		Pine64 Rock64
+		u-boot-pkg
+		rock64
+	
 	pine64,rockpro64
 	
 		description
@@ -68,6 +75,13 @@
 		u-boot-pkg
 		rockpro64
 	
+	pine64,pinebook-pro
+	
+		description
+		Pine64 Pinebook Pro
+		u-boot-pkg
+		pinebook-pro
+	
 
 	

CVS commit: [netbsd-9] src/doc

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:29:56 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #657 - #660


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.166 -r1.1.2.167 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/doc

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:29:56 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #657 - #660


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.166 -r1.1.2.167 src/doc/CHANGES-9.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-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.166 src/doc/CHANGES-9.0:1.1.2.167
--- src/doc/CHANGES-9.0:1.1.2.166	Sun Jan 26 11:29:39 2020
+++ src/doc/CHANGES-9.0	Mon Jan 27 07:29:56 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.166 2020/01/26 11:29:39 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.167 2020/01/27 07:29:56 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -7988,3 +7988,367 @@ sys/ddb/db_command.c1.162-1.164
 	cosmetic/code cleanup changes.
 	[uwe, ticket #656]
 
+sys/arch/amd64/conf/GENERIC			1.559
+sys/arch/evbarm/conf/GENERIC			1.71
+sys/arch/evbarm/conf/GENERIC64			1.134
+sys/dev/audio/audiodef.h			1.8
+sys/dev/files.audio1.13,1.14
+
+	Reduce audio latency defaults on some architectures.
+	[nia, ticket #657]
+
+sys/dev/hdaudio/hdaudiodevs			1.3
+sys/dev/hdaudio/hdaudiodevs.h			(regen)
+sys/dev/hdaudio/hdaudiodevs_data.h		(regen)
+
+	Make sure that all vendor strings are shorter than
+	16 (MAX_AUDIO_DEV_LEN).
+	[jmcneill, ticket #658]
+
+sys/arch/evbarm/fdt/fdt_memory.c		1.4
+
+	Save 400KB of RAM by fixing a bug in sizing of the fdt memory pool.
+	[jmcneill, ticket #659]
+
+crypto/external/bsd/openssl/dist/doc/man3/CRYPTO_memcmp.pod up to 1.1.1.1
+crypto/external/bsd/openssl/dist/doc/man3/X509_cmp.pod up to 1.1.1.1
+crypto/external/bsd/openssl/dist/test/certs/server-pss-restrict-cert.pem up to 1.1.1.1
+crypto/external/bsd/openssl/dist/test/certs/server-pss-restrict-key.pem up to 1.1.1.1
+crypto/external/bsd/openssl/dist/test/recipes/80-test_cms_data/bad_signtime_attr.cms up to 1.1.1.1
+crypto/external/bsd/openssl/dist/test/recipes/80-test_cms_data/ct_multiple_attr.cms up to 1.1.1.1
+crypto/external/bsd/openssl/dist/test/recipes/80-test_cms_data/no_ct_attr.cms up to 1.1.1.1
+crypto/external/bsd/openssl/dist/test/recipes/80-test_cms_data/no_md_attr.cms up to 1.1.1.1
+crypto/external/bsd/openssl/dist/test/testutil/random.c up to 1.1.1.1
+crypto/external/bsd/openssl/dist/util/perl/TLSProxy/CertificateRequest.pm up to 1.1.1.1
+crypto/external/bsd/openssl/dist/crypto/aes/asm/aes-586.pl delete
+crypto/external/bsd/openssl/dist/crypto/aes/asm/aes-x86_64.pl delete
+crypto/external/bsd/openssl/dist/crypto/aes/asm/bsaes-x86_64.pl delete
+crypto/external/bsd/openssl/dist/CHANGESup to 1.21
+crypto/external/bsd/openssl/dist/Configure  up to 1.25
+crypto/external/bsd/openssl/dist/INSTALLup to 1.1.1.11
+crypto/external/bsd/openssl/dist/NEWS   up to 1.21
+crypto/external/bsd/openssl/dist/NOTES.WIN  up to 1.1.1.3
+crypto/external/bsd/openssl/dist/README up to 1.21
+crypto/external/bsd/openssl/dist/config up to 1.1.1.10
+crypto/external/bsd/openssl/dist/e_os.h up to 1.15
+crypto/external/bsd/openssl/dist/Configurations/00-base-templates.conf up to 1.1.1.5
+crypto/external/bsd/openssl/dist/Configurations/10-main.conf up to 1.1.1.6
+crypto/external/bsd/openssl/dist/Configurations/15-ios.conf up to 1.1.1.3
+crypto/external/bsd/openssl/dist/Configurations/50-win-onecore.conf up to 1.1.1.3
+crypto/external/bsd/openssl/dist/Configurations/common0.tmpl up to 1.1.1.3
+crypto/external/bsd/openssl/dist/Configurations/unix-Makefile.tmpl up to 1.1.1.8
+crypto/external/bsd/openssl/dist/apps/apps.cup to 1.1.1.20
+crypto/external/bsd/openssl/dist/apps/apps.hup to 1.1.1.14
+crypto/external/bsd/openssl/dist/apps/ca.c  up to 1.19
+crypto/external/bsd/openssl/dist/apps/dgst.cup to 1.1.1.14
+crypto/external/bsd/openssl/dist/apps/enc.c up to 1.1.1.15
+crypto/external/bsd/openssl/dist/apps/ocsp.cup to 1.20
+crypto/external/bsd/openssl/dist/apps/openssl.c up to 1.5
+crypto/external/bsd/openssl/dist/apps/pkcs12.c  up to 1.1.1.14
+crypto/external/bsd/openssl/dist/apps/req.c up to 1.3
+crypto/external/bsd/openssl/dist/apps/s_apps.h  up to 1.1.1.7
+crypto/external/bsd/openssl/dist/apps/s_cb.cup to 1.1.1.17
+crypto/external/bsd/openssl/dist/apps/s_client.c up to 1.20
+crypto/external/bsd/openssl/dist/apps/speed.c   up to 1.19
+crypto/external/bsd/openssl/dist/apps/storeutl.c up to 1.1.1.2
+crypto/external/bsd/openssl/dist/crypto/arm_arch.h up to 1.7
+crypto/external/bsd/openssl/dist/crypto/ctype.c up to 1.1.1.2
+crypto/external/bsd/openssl/dist/crypto/init.c  up to 1.1.1.7
+crypto/external/bsd/openssl/dist/crypto/o_str.c up to 1.1.1.8
+crypto/external/bsd/openssl/dist/crypto/s390xcap.c up to 1.1.1.7
+crypto/external/bsd/openssl/dist/crypto/threads_none.c up to 1.1.1.3
+crypto/external/bsd/openssl/dist/crypto/threads_pthread.c up to 1.4

CVS commit: [netbsd-9] src/doc

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:26:41 UTC 2020

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

Log Message:
Update for ticket #660


To generate a diff of this commit:
cvs rdiff -u -r1.1640.2.10 -r1.1640.2.11 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.1640.2.10 src/doc/3RDPARTY:1.1640.2.11
--- src/doc/3RDPARTY:1.1640.2.10	Sun Jan  5 09:51:45 2020
+++ src/doc/3RDPARTY	Mon Jan 27 07:26:41 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1640.2.10 2020/01/05 09:51:45 martin Exp $
+#	$NetBSD: 3RDPARTY,v 1.1640.2.11 2020/01/27 07:26:41 martin Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1101,12 +1101,12 @@ markus is very cooperative about it):
 - adjust the DEFAULT_PKCS11_WHITELIST for ssh-agent
 
 Package:	OpenSSL
-Version:	1.0.2o/1.1.1c
-Current Vers:	1.0.2r/1.1.1c
+Version:	1.0.2o/1.1.1d
+Current Vers:	1.0.2t/1.1.1d
 Maintainer:	The OpenSSL Project
 Archive Site:	ftp://ftp.openssl.org/source/
 Home Page:	http://www.openssl.org/
-Date:		2019-06-09
+Date:		2019-10-09
 Mailing List:	openssl-annou...@openssl.org
 Responsible:	christos, mjf, tls, riastradh, spz
 License:	OpenSSL and SSLeay license (both BSD-like)



CVS commit: [netbsd-9] src/doc

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:26:41 UTC 2020

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

Log Message:
Update for ticket #660


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

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



CVS commit: [netbsd-9] src/crypto/external/bsd/openssl

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:21:48 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist [netbsd-9]: CHANGES Configure
INSTALL NEWS NOTES.WIN README config e_os.h
src/crypto/external/bsd/openssl/dist/Configurations [netbsd-9]:
00-base-templates.conf 10-main.conf 15-ios.conf 50-win-onecore.conf
common0.tmpl unix-Makefile.tmpl
src/crypto/external/bsd/openssl/dist/apps [netbsd-9]: apps.c apps.h
ca.c dgst.c enc.c ocsp.c openssl.c pkcs12.c req.c s_apps.h s_cb.c
s_client.c speed.c storeutl.c
src/crypto/external/bsd/openssl/dist/crypto [netbsd-9]: arm_arch.h
ctype.c init.c o_str.c s390xcap.c threads_none.c threads_pthread.c
threads_win.c uid.c
src/crypto/external/bsd/openssl/dist/crypto/aes/asm [netbsd-9]:
aes-s390x.pl
src/crypto/external/bsd/openssl/dist/crypto/asn1 [netbsd-9]: a_time.c
a_type.c x_bignum.c
src/crypto/external/bsd/openssl/dist/crypto/bio [netbsd-9]: b_addr.c
bss_dgram.c bss_file.c bss_mem.c
src/crypto/external/bsd/openssl/dist/crypto/bn [netbsd-9]: bn_div.c
bn_lcl.h bn_lib.c bn_prime.c bn_rand.c bn_sqrt.c
src/crypto/external/bsd/openssl/dist/crypto/bn/asm [netbsd-9]: mips.pl
src/crypto/external/bsd/openssl/dist/crypto/cms [netbsd-9]: cms_att.c
cms_env.c cms_err.c cms_lcl.h cms_sd.c cms_smime.c
src/crypto/external/bsd/openssl/dist/crypto/conf [netbsd-9]: conf_sap.c
src/crypto/external/bsd/openssl/dist/crypto/dh [netbsd-9]: dh_check.c
dh_gen.c dh_key.c dh_lib.c
src/crypto/external/bsd/openssl/dist/crypto/dsa [netbsd-9]: dsa_ameth.c
dsa_err.c dsa_ossl.c
src/crypto/external/bsd/openssl/dist/crypto/dso [netbsd-9]: dso_dlfcn.c
src/crypto/external/bsd/openssl/dist/crypto/ec [netbsd-9]: ec_asn1.c
ec_curve.c ec_lcl.h ec_lib.c ecdh_ossl.c ecdsa_ossl.c
ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c
ecx_meth.c
src/crypto/external/bsd/openssl/dist/crypto/ec/asm [netbsd-9]:
ecp_nistz256-sparcv9.pl ecp_nistz256-x86_64.pl x25519-ppc64.pl
src/crypto/external/bsd/openssl/dist/crypto/engine [netbsd-9]:
eng_devcrypto.c eng_openssl.c
src/crypto/external/bsd/openssl/dist/crypto/err [netbsd-9]: err.c
openssl.txt
src/crypto/external/bsd/openssl/dist/crypto/evp [netbsd-9]: bio_ok.c
e_aes.c e_aria.c e_chacha20_poly1305.c e_rc5.c evp_err.c evp_lib.c
m_sha3.c
src/crypto/external/bsd/openssl/dist/crypto/include/internal [netbsd-9]:
ctype.h rand_int.h sm2err.h
src/crypto/external/bsd/openssl/dist/crypto/lhash [netbsd-9]: lhash.c
src/crypto/external/bsd/openssl/dist/crypto/pem [netbsd-9]: pvkfmt.c
src/crypto/external/bsd/openssl/dist/crypto/pkcs7 [netbsd-9]:
pk7_doit.c
src/crypto/external/bsd/openssl/dist/crypto/rand [netbsd-9]: drbg_lib.c
rand_err.c rand_lcl.h rand_lib.c rand_unix.c rand_win.c
src/crypto/external/bsd/openssl/dist/crypto/rsa [netbsd-9]: rsa_ameth.c
rsa_err.c rsa_gen.c rsa_lib.c rsa_ossl.c
src/crypto/external/bsd/openssl/dist/crypto/sha/asm [netbsd-9]:
keccak1600-armv4.pl keccak1600-armv8.pl sha512-sparcv9.pl
src/crypto/external/bsd/openssl/dist/crypto/sm2 [netbsd-9]: sm2_sign.c
src/crypto/external/bsd/openssl/dist/crypto/store [netbsd-9]:
loader_file.c store_lib.c
src/crypto/external/bsd/openssl/dist/crypto/ui [netbsd-9]: ui_lib.c
ui_openssl.c
src/crypto/external/bsd/openssl/dist/crypto/whrlpool [netbsd-9]:
wp_block.c
src/crypto/external/bsd/openssl/dist/crypto/x509 [netbsd-9]: by_dir.c
t_req.c x509_att.c x509_cmp.c x509_err.c x509_lu.c x509_vfy.c
src/crypto/external/bsd/openssl/dist/crypto/x509v3 [netbsd-9]: v3_alt.c
v3_purp.c
src/crypto/external/bsd/openssl/dist/demos/bio [netbsd-9]: descrip.mms
src/crypto/external/bsd/openssl/dist/demos/evp [netbsd-9]: aesgcm.c
src/crypto/external/bsd/openssl/dist/doc/HOWTO [netbsd-9]:
proxy_certificates.txt
src/crypto/external/bsd/openssl/dist/doc/man1 [netbsd-9]: engine.pod
errstr.pod pkcs12.pod pkeyparam.pod s_client.pod s_server.pod
src/crypto/external/bsd/openssl/dist/doc/man3 [netbsd-9]:
ADMISSIONS.pod ASYNC_start_job.pod BIO_connect.pod BIO_f_ssl.pod
BIO_find_type.pod BIO_new.pod BIO_s_accept.pod BIO_s_bio.pod
BIO_s_connect.pod BIO_s_fd.pod BIO_s_mem.pod BIO_set_callback.pod
BN_generate_prime.pod BN_mod_mul_montgomery.pod BN_new.pod
CMS_final.pod CRYPTO_THREAD_run_once.pod DES_random_key.pod
DSA_generate_key.pod DSA_sign.pod 

CVS commit: [netbsd-9] src/sys/arch/evbarm/fdt

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:12:41 UTC 2020

Modified Files:
src/sys/arch/evbarm/fdt [netbsd-9]: fdt_memory.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #659):

sys/arch/evbarm/fdt/fdt_memory.c: revision 1.4

Save 400KB of RAM by fixing a really dumb bug in sizing of the fdt memory
pool.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.8.1 src/sys/arch/evbarm/fdt/fdt_memory.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/evbarm/fdt/fdt_memory.c
diff -u src/sys/arch/evbarm/fdt/fdt_memory.c:1.3 src/sys/arch/evbarm/fdt/fdt_memory.c:1.3.8.1
--- src/sys/arch/evbarm/fdt/fdt_memory.c:1.3	Thu Nov  1 10:48:48 2018
+++ src/sys/arch/evbarm/fdt/fdt_memory.c	Mon Jan 27 07:12:41 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_memory.c,v 1.3 2018/11/01 10:48:48 jmcneill Exp $ */
+/* $NetBSD: fdt_memory.c,v 1.3.8.1 2020/01/27 07:12:41 martin Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "opt_bootconfig.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.3 2018/11/01 10:48:48 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.3.8.1 2020/01/27 07:12:41 martin Exp $");
 
 #include 
 #include 
@@ -48,7 +48,7 @@ struct fdt_memory_range {
 static TAILQ_HEAD(fdt_memory_rangehead, fdt_memory_range) fdt_memory_ranges =
 TAILQ_HEAD_INITIALIZER(fdt_memory_ranges);
 
-static struct fdt_memory_range fdt_memory_range_pool[sizeof(struct fdt_memory_range) * DRAM_BLOCKS];
+static struct fdt_memory_range fdt_memory_range_pool[DRAM_BLOCKS];
 
 static struct fdt_memory_range *
 fdt_memory_range_alloc(void)



CVS commit: [netbsd-9] src/sys/arch/evbarm/fdt

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:12:41 UTC 2020

Modified Files:
src/sys/arch/evbarm/fdt [netbsd-9]: fdt_memory.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #659):

sys/arch/evbarm/fdt/fdt_memory.c: revision 1.4

Save 400KB of RAM by fixing a really dumb bug in sizing of the fdt memory
pool.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.8.1 src/sys/arch/evbarm/fdt/fdt_memory.c

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



CVS commit: [netbsd-9] src/sys/dev/hdaudio

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:10:17 UTC 2020

Modified Files:
src/sys/dev/hdaudio [netbsd-9]: hdaudiodevs.h hdaudiodevs_data.h

Log Message:
regen (for ticket #658)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.26.1 src/sys/dev/hdaudio/hdaudiodevs.h \
src/sys/dev/hdaudio/hdaudiodevs_data.h

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

Modified files:

Index: src/sys/dev/hdaudio/hdaudiodevs.h
diff -u src/sys/dev/hdaudio/hdaudiodevs.h:1.2 src/sys/dev/hdaudio/hdaudiodevs.h:1.2.26.1
--- src/sys/dev/hdaudio/hdaudiodevs.h:1.2	Sat May 30 14:12:57 2015
+++ src/sys/dev/hdaudio/hdaudiodevs.h	Mon Jan 27 07:10:17 2020
@@ -1,10 +1,10 @@
-/*	$NetBSD: hdaudiodevs.h,v 1.2 2015/05/30 14:12:57 jmcneill Exp $	*/
+/*	$NetBSD: hdaudiodevs.h,v 1.2.26.1 2020/01/27 07:10:17 martin Exp $	*/
 
 /*
- * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
+ * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: hdaudiodevs,v 1.2 2015/05/30 14:12:42 jmcneill Exp
+ *	NetBSD: hdaudiodevs,v 1.2.26.1 2020/01/27 07:09:31 martin Exp
  */
 
 /*
@@ -35,16 +35,21 @@
  * SUCH DAMAGE.
  */
 
-/* The following is duplicated from pci except SIGMATEL* and CMEDIA */
-#define	HDAUDIO_VENDOR_ATI	0x1002		/* ATI Technologies */
+/*
+ * Try to keep vendor and product names 15 characters or less. They are
+ * used by the AUDIO_GETDEV ioctl and copied into buffers that are
+ * constrained by MAX_AUDIO_DEV_LEN (sys/audioio.h).
+ */
+
+#define	HDAUDIO_VENDOR_ATI	0x1002		/* ATI */
 #define	HDAUDIO_VENDOR_NVIDIA	0x10de		/* NVIDIA */
-#define	HDAUDIO_VENDOR_REALTEK	0x10ec		/* Realtek Semiconductor */
-#define	HDAUDIO_VENDOR_VIATECH	0x1106		/* VIA TeCHnologies */
+#define	HDAUDIO_VENDOR_REALTEK	0x10ec		/* Realtek */
+#define	HDAUDIO_VENDOR_VIATECH	0x1106		/* VIA */
 #define	HDAUDIO_VENDOR_SIGMATEL2	0x111d		/* Sigmatel */
 #define	HDAUDIO_VENDOR_ANALOG	0x11d4		/* Analog Devices */
-#define	HDAUDIO_VENDOR_CONEXANT	0x14f1		/* Conexant Systems */
+#define	HDAUDIO_VENDOR_CONEXANT	0x14f1		/* Conexant */
 #define	HDAUDIO_VENDOR_VMWARE	0x15ad		/* VMware */
-#define	HDAUDIO_VENDOR_CMEDIA	0x434d		/* C-Media Electronics */
+#define	HDAUDIO_VENDOR_CMEDIA	0x434d		/* C-Media */
 #define	HDAUDIO_VENDOR_INTEL	0x8086		/* Intel */
 #define	HDAUDIO_VENDOR_SIGMATEL	0x8384		/* Sigmatel */
 
Index: src/sys/dev/hdaudio/hdaudiodevs_data.h
diff -u src/sys/dev/hdaudio/hdaudiodevs_data.h:1.2 src/sys/dev/hdaudio/hdaudiodevs_data.h:1.2.26.1
--- src/sys/dev/hdaudio/hdaudiodevs_data.h:1.2	Sat May 30 14:12:57 2015
+++ src/sys/dev/hdaudio/hdaudiodevs_data.h	Mon Jan 27 07:10:17 2020
@@ -1,10 +1,10 @@
-/*	$NetBSD: hdaudiodevs_data.h,v 1.2 2015/05/30 14:12:57 jmcneill Exp $	*/
+/*	$NetBSD: hdaudiodevs_data.h,v 1.2.26.1 2020/01/27 07:10:17 martin Exp $	*/
 
 /*
- * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
+ * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: hdaudiodevs,v 1.2 2015/05/30 14:12:42 jmcneill Exp
+ *	NetBSD: hdaudiodevs,v 1.2.26.1 2020/01/27 07:09:31 martin Exp
  */
 
 /*
@@ -36,551 +36,546 @@
  */
 
 static const uint16_t hdaudio_vendors[] = {
-	HDAUDIO_VENDOR_ATI, 1, 5, 0,
-	HDAUDIO_VENDOR_NVIDIA, 18, 0,
-	HDAUDIO_VENDOR_REALTEK, 25, 33, 0,
-	HDAUDIO_VENDOR_VIATECH, 47, 51, 0,
-	HDAUDIO_VENDOR_SIGMATEL2, 64, 0,
-	HDAUDIO_VENDOR_ANALOG, 73, 80, 0,
-	HDAUDIO_VENDOR_CONEXANT, 88, 97, 0,
-	HDAUDIO_VENDOR_VMWARE, 105, 0,
-	HDAUDIO_VENDOR_CMEDIA, 112, 120, 0,
-	HDAUDIO_VENDOR_INTEL, 132, 0,
-	HDAUDIO_VENDOR_SIGMATEL, 64, 0,
+	HDAUDIO_VENDOR_ATI, 1, 0,
+	HDAUDIO_VENDOR_NVIDIA, 5, 0,
+	HDAUDIO_VENDOR_REALTEK, 12, 0,
+	HDAUDIO_VENDOR_VIATECH, 20, 0,
+	HDAUDIO_VENDOR_SIGMATEL2, 24, 0,
+	HDAUDIO_VENDOR_ANALOG, 33, 40, 0,
+	HDAUDIO_VENDOR_CONEXANT, 48, 0,
+	HDAUDIO_VENDOR_VMWARE, 57, 0,
+	HDAUDIO_VENDOR_CMEDIA, 64, 0,
+	HDAUDIO_VENDOR_INTEL, 72, 0,
+	HDAUDIO_VENDOR_SIGMATEL, 24, 0,
 };
 
 static const uint16_t hdaudio_products[] = {
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_RS600_HDMI_1, 
-	138, 144, 0,
+	78, 84, 0,
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_RS600_HDMI_2, 
-	138, 144, 0,
+	78, 84, 0,
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_RS690_780_HDMI, 
-	149, 144, 0,
+	89, 84, 0,
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_R6xx_HDMI, 
-	159, 144, 0,
+	99, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_2, 
-	164, 144, 0,
+	104, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_3, 
-	164, 144, 0,
+	104, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_5, 
-	164, 144, 0,
+	104, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_6, 
-	164, 144, 0,
+	104, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, 

CVS commit: [netbsd-9] src/sys/dev/hdaudio

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:10:17 UTC 2020

Modified Files:
src/sys/dev/hdaudio [netbsd-9]: hdaudiodevs.h hdaudiodevs_data.h

Log Message:
regen (for ticket #658)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.26.1 src/sys/dev/hdaudio/hdaudiodevs.h \
src/sys/dev/hdaudio/hdaudiodevs_data.h

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



CVS commit: [netbsd-9] src/sys/dev/hdaudio

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:09:31 UTC 2020

Modified Files:
src/sys/dev/hdaudio [netbsd-9]: hdaudiodevs

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #658):

sys/dev/hdaudio/hdaudiodevs: revision 1.3

Make sure that all vendor strings are shorter than 16 (MAX_AUDIO_DEV_LEN)
characters as the values are used in the AUDIO_GETDEV ioctl.
regen


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.26.1 src/sys/dev/hdaudio/hdaudiodevs

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/hdaudio/hdaudiodevs
diff -u src/sys/dev/hdaudio/hdaudiodevs:1.2 src/sys/dev/hdaudio/hdaudiodevs:1.2.26.1
--- src/sys/dev/hdaudio/hdaudiodevs:1.2	Sat May 30 14:12:42 2015
+++ src/sys/dev/hdaudio/hdaudiodevs	Mon Jan 27 07:09:31 2020
@@ -1,4 +1,4 @@
-$NetBSD: hdaudiodevs,v 1.2 2015/05/30 14:12:42 jmcneill Exp $
+$NetBSD: hdaudiodevs,v 1.2.26.1 2020/01/27 07:09:31 martin Exp $
 
 /*
  * Copyright (c) 2010 Jared D. McNeill 
@@ -28,16 +28,21 @@ $NetBSD: hdaudiodevs,v 1.2 2015/05/30 14
  * SUCH DAMAGE.
  */
 
-/* The following is duplicated from pci except SIGMATEL* and CMEDIA */
-vendor	ATI		0x1002	ATI Technologies
+/*
+ * Try to keep vendor and product names 15 characters or less. They are
+ * used by the AUDIO_GETDEV ioctl and copied into buffers that are
+ * constrained by MAX_AUDIO_DEV_LEN (sys/audioio.h).
+ */
+
+vendor	ATI		0x1002	ATI
 vendor	NVIDIA		0x10de	NVIDIA
-vendor	REALTEK		0x10ec	Realtek Semiconductor
-vendor	VIATECH		0x1106	VIA TeCHnologies
+vendor	REALTEK		0x10ec	Realtek
+vendor	VIATECH		0x1106	VIA
 vendor	SIGMATEL2	0x111d	Sigmatel
 vendor	ANALOG		0x11d4	Analog Devices
-vendor	CONEXANT	0x14f1	Conexant Systems
+vendor	CONEXANT	0x14f1	Conexant
 vendor	VMWARE		0x15ad	VMware
-vendor	CMEDIA		0x434d	C-Media Electronics
+vendor	CMEDIA		0x434d	C-Media
 vendor	INTEL		0x8086	Intel
 vendor	SIGMATEL	0x8384	Sigmatel
 



CVS commit: [netbsd-9] src/sys/dev/hdaudio

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:09:31 UTC 2020

Modified Files:
src/sys/dev/hdaudio [netbsd-9]: hdaudiodevs

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #658):

sys/dev/hdaudio/hdaudiodevs: revision 1.3

Make sure that all vendor strings are shorter than 16 (MAX_AUDIO_DEV_LEN)
characters as the values are used in the AUDIO_GETDEV ioctl.
regen


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.26.1 src/sys/dev/hdaudio/hdaudiodevs

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



CVS commit: [netbsd-9] src/sys

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:06:02 UTC 2020

Modified Files:
src/sys/arch/amd64/conf [netbsd-9]: GENERIC
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC GENERIC64
src/sys/dev [netbsd-9]: files.audio
src/sys/dev/audio [netbsd-9]: audiodef.h

Log Message:
Pull up following revision(s) (requested by nia in ticket #657):

sys/dev/files.audio: revision 1.13
sys/dev/files.audio: revision 1.14
sys/arch/amd64/conf/GENERIC: revision 1.559
sys/arch/evbarm/conf/GENERIC: revision 1.71
sys/arch/evbarm/conf/GENERIC64: revision 1.134
sys/dev/audio/audiodef.h: revision 1.8

Set AUDIO_BLK_MS=4 - unlikely to cause significant overhead on non-m68k.

Several of us have been setting this in /etc/sysctl.conf for months, to
get better performance from applications that require synced audio, etc.
It's also mentioned as a good value with low overhead on most archs here:
href="https://mail-index.netbsd.org/tech-kern/2019/12/07/msg025830.html

We could probably go lower, but this is low enough to make most/all
software run well, removing frame drops. It's also low enough to get
emulators/mednafen to stop complaining in the console.

defopt AUDIO_BLK_MS

Follow amd64 and set AUDIO_BLK_MS=4 by default

defopt -> defparam (oops)


To generate a diff of this commit:
cvs rdiff -u -r1.531.2.7 -r1.531.2.8 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.48.2.5 -r1.48.2.6 src/sys/arch/evbarm/conf/GENERIC
cvs rdiff -u -r1.103.2.7 -r1.103.2.8 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.12 -r1.12.2.1 src/sys/dev/files.audio
cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/dev/audio/audiodef.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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.531.2.7 src/sys/arch/amd64/conf/GENERIC:1.531.2.8
--- src/sys/arch/amd64/conf/GENERIC:1.531.2.7	Tue Jan 21 11:55:57 2020
+++ src/sys/arch/amd64/conf/GENERIC	Mon Jan 27 07:06:02 2020
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.531.2.7 2020/01/21 11:55:57 martin Exp $
+# $NetBSD: GENERIC,v 1.531.2.8 2020/01/27 07:06:02 martin Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.531.2.7 $"
+#ident		"GENERIC-$Revision: 1.531.2.8 $"
 
 maxusers	64		# estimated number of users
 
@@ -55,6 +55,9 @@ maxusers	64		# estimated number of users
 
 options 	INSECURE	# disable kernel security levels - X needs this
 
+options		AUDIO_BLK_MS=4	# make software with low latency needs performant
+# no substantial CPU overhead on this platform
+
 options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
 options 	NTP		# NTP phase/frequency locked loop
 

Index: src/sys/arch/evbarm/conf/GENERIC
diff -u src/sys/arch/evbarm/conf/GENERIC:1.48.2.5 src/sys/arch/evbarm/conf/GENERIC:1.48.2.6
--- src/sys/arch/evbarm/conf/GENERIC:1.48.2.5	Sun Dec  8 12:57:21 2019
+++ src/sys/arch/evbarm/conf/GENERIC	Mon Jan 27 07:06:02 2020
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC,v 1.48.2.5 2019/12/08 12:57:21 martin Exp $
+#	$NetBSD: GENERIC,v 1.48.2.6 2020/01/27 07:06:02 martin Exp $
 #
 #	GENERIC ARM (aarch32) kernel
 #
@@ -614,6 +614,7 @@ sun8icodec* 	at fdt?			# Audio codec (su
 sunxicodec* 	at fdt?			# Allwinner audio codec
 sunxii2s* 	at fdt?			# I2S/PCM
 audio* 		at audiobus?
+options 	AUDIO_BLK_MS=4
 spkr* 		at audio?
 
 # SDMMC

Index: src/sys/arch/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.103.2.7 src/sys/arch/evbarm/conf/GENERIC64:1.103.2.8
--- src/sys/arch/evbarm/conf/GENERIC64:1.103.2.7	Tue Jan 21 10:39:58 2020
+++ src/sys/arch/evbarm/conf/GENERIC64	Mon Jan 27 07:06:02 2020
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC64,v 1.103.2.7 2020/01/21 10:39:58 martin Exp $
+#	$NetBSD: GENERIC64,v 1.103.2.8 2020/01/27 07:06:02 martin Exp $
 #
 #	GENERIC ARM (aarch64) kernel
 #
@@ -426,6 +426,7 @@ h3codec*	at fdt?			# Allwinner H3 audio 
 a64acodec*	at fdt?			# Allwinner A64 audio codec (analog part)
 sunxii2s*	at fdt?			# Allwinner I2S/PCM
 audio*		at audiobus?
+options 	AUDIO_BLK_MS=4
 
 spkr*		at audio?		# PC speaker (synthesized)
 

Index: src/sys/dev/files.audio
diff -u src/sys/dev/files.audio:1.12 src/sys/dev/files.audio:1.12.2.1
--- src/sys/dev/files.audio:1.12	Wed May  8 13:40:17 2019
+++ src/sys/dev/files.audio	Mon Jan 27 07:06:02 2020
@@ -1,4 +1,6 @@
-#	$NetBSD: files.audio,v 1.12 2019/05/08 13:40:17 isaki Exp $
+#	$NetBSD: files.audio,v 1.12.2.1 2020/01/27 07:06:02 martin Exp $
+
+defparam opt_audio.h	AUDIO_BLK_MS
 
 define	audiobus	{ }
 define	midibus		{ }

Index: src/sys/dev/audio/audiodef.h
diff -u src/sys/dev/audio/audiodef.h:1.7 src/sys/dev/audio/audiodef.h:1.7.2.1
--- src/sys/dev/audio/audiodef.h:1.7	Sat Jul  6 12:58:58 2019
+++ src/sys/dev/audio/audiodef.h	Mon Jan 27 07:06:02 2020
@@ 

CVS commit: [netbsd-9] src/sys

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 27 07:06:02 UTC 2020

Modified Files:
src/sys/arch/amd64/conf [netbsd-9]: GENERIC
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC GENERIC64
src/sys/dev [netbsd-9]: files.audio
src/sys/dev/audio [netbsd-9]: audiodef.h

Log Message:
Pull up following revision(s) (requested by nia in ticket #657):

sys/dev/files.audio: revision 1.13
sys/dev/files.audio: revision 1.14
sys/arch/amd64/conf/GENERIC: revision 1.559
sys/arch/evbarm/conf/GENERIC: revision 1.71
sys/arch/evbarm/conf/GENERIC64: revision 1.134
sys/dev/audio/audiodef.h: revision 1.8

Set AUDIO_BLK_MS=4 - unlikely to cause significant overhead on non-m68k.

Several of us have been setting this in /etc/sysctl.conf for months, to
get better performance from applications that require synced audio, etc.
It's also mentioned as a good value with low overhead on most archs here:
href="https://mail-index.netbsd.org/tech-kern/2019/12/07/msg025830.html

We could probably go lower, but this is low enough to make most/all
software run well, removing frame drops. It's also low enough to get
emulators/mednafen to stop complaining in the console.

defopt AUDIO_BLK_MS

Follow amd64 and set AUDIO_BLK_MS=4 by default

defopt -> defparam (oops)


To generate a diff of this commit:
cvs rdiff -u -r1.531.2.7 -r1.531.2.8 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.48.2.5 -r1.48.2.6 src/sys/arch/evbarm/conf/GENERIC
cvs rdiff -u -r1.103.2.7 -r1.103.2.8 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.12 -r1.12.2.1 src/sys/dev/files.audio
cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/dev/audio/audiodef.h

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



CVS commit: src/sys/opencrypto

2020-01-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 27 02:56:15 UTC 2020

Modified Files:
src/sys/opencrypto: cryptodev.c

Log Message:
If we get an error from devsw_attach(), don't destroy the error value,
since we need to return it to our caller.  While we're here, improve
the value of the debug message by actually printing the error value.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/opencrypto/cryptodev.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/opencrypto/cryptodev.c
diff -u src/sys/opencrypto/cryptodev.c:1.103 src/sys/opencrypto/cryptodev.c:1.104
--- src/sys/opencrypto/cryptodev.c:1.103	Thu Jan 16 15:29:24 2020
+++ src/sys/opencrypto/cryptodev.c	Mon Jan 27 02:56:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptodev.c,v 1.103 2020/01/16 15:29:24 christos Exp $ */
+/*	$NetBSD: cryptodev.c,v 1.104 2020/01/27 02:56:15 pgoyette Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $	*/
 /*	$OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $	*/
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.103 2020/01/16 15:29:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.104 2020/01/27 02:56:15 pgoyette Exp $");
 
 #include 
 #include 
@@ -2201,6 +2201,7 @@ crypto_modcmd(modcmd_t cmd, void *arg)
 {
 	int error = 0;
 #ifdef _MODULE
+	int error2;
 	devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR;
 #endif
 
@@ -2235,14 +2236,14 @@ crypto_modcmd(modcmd_t cmd, void *arg)
 		error = devsw_attach(crypto_cd.cd_name, NULL, ,
 		_cdevsw, );
 		if (error) {
-			error = config_cfdata_detach(crypto_cfdata);
-			if (error) {
-return error;
+			error2 = config_cfdata_detach(crypto_cfdata);
+			if (error2) {
+return error2;
 			}
 			config_cfattach_detach(crypto_cd.cd_name, _ca);
 			config_cfdriver_detach(_cd);
-			aprint_error("%s: unable to register devsw\n",
-crypto_cd.cd_name);
+			aprint_error("%s: unable to register devsw, error %d\n",
+crypto_cd.cd_name, error);
 
 			return error;
 		}



CVS commit: src/sys/opencrypto

2020-01-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 27 02:56:15 UTC 2020

Modified Files:
src/sys/opencrypto: cryptodev.c

Log Message:
If we get an error from devsw_attach(), don't destroy the error value,
since we need to return it to our caller.  While we're here, improve
the value of the debug message by actually printing the error value.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/opencrypto/cryptodev.c

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



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

2020-01-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 27 01:15:09 UTC 2020

Modified Files:
src/sys/arch/evbarm/fdt: fdt_memory.c

Log Message:
Save 400KB of RAM by fixing a really dumb bug in sizing of the fdt memory
pool.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/fdt/fdt_memory.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/evbarm/fdt/fdt_memory.c
diff -u src/sys/arch/evbarm/fdt/fdt_memory.c:1.3 src/sys/arch/evbarm/fdt/fdt_memory.c:1.4
--- src/sys/arch/evbarm/fdt/fdt_memory.c:1.3	Thu Nov  1 10:48:48 2018
+++ src/sys/arch/evbarm/fdt/fdt_memory.c	Mon Jan 27 01:15:09 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_memory.c,v 1.3 2018/11/01 10:48:48 jmcneill Exp $ */
+/* $NetBSD: fdt_memory.c,v 1.4 2020/01/27 01:15:09 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "opt_bootconfig.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.3 2018/11/01 10:48:48 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.4 2020/01/27 01:15:09 jmcneill Exp $");
 
 #include 
 #include 
@@ -48,7 +48,7 @@ struct fdt_memory_range {
 static TAILQ_HEAD(fdt_memory_rangehead, fdt_memory_range) fdt_memory_ranges =
 TAILQ_HEAD_INITIALIZER(fdt_memory_ranges);
 
-static struct fdt_memory_range fdt_memory_range_pool[sizeof(struct fdt_memory_range) * DRAM_BLOCKS];
+static struct fdt_memory_range fdt_memory_range_pool[DRAM_BLOCKS];
 
 static struct fdt_memory_range *
 fdt_memory_range_alloc(void)



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

2020-01-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 27 01:15:09 UTC 2020

Modified Files:
src/sys/arch/evbarm/fdt: fdt_memory.c

Log Message:
Save 400KB of RAM by fixing a really dumb bug in sizing of the fdt memory
pool.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/fdt/fdt_memory.c

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



CVS commit: src/sys/dev/hdaudio

2020-01-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 27 00:51:40 UTC 2020

Modified Files:
src/sys/dev/hdaudio: hdaudiodevs.h hdaudiodevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hdaudio/hdaudiodevs.h \
src/sys/dev/hdaudio/hdaudiodevs_data.h

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



CVS commit: src/sys/dev/hdaudio

2020-01-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 27 00:51:40 UTC 2020

Modified Files:
src/sys/dev/hdaudio: hdaudiodevs.h hdaudiodevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hdaudio/hdaudiodevs.h \
src/sys/dev/hdaudio/hdaudiodevs_data.h

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

Modified files:

Index: src/sys/dev/hdaudio/hdaudiodevs.h
diff -u src/sys/dev/hdaudio/hdaudiodevs.h:1.2 src/sys/dev/hdaudio/hdaudiodevs.h:1.3
--- src/sys/dev/hdaudio/hdaudiodevs.h:1.2	Sat May 30 14:12:57 2015
+++ src/sys/dev/hdaudio/hdaudiodevs.h	Mon Jan 27 00:51:40 2020
@@ -1,10 +1,10 @@
-/*	$NetBSD: hdaudiodevs.h,v 1.2 2015/05/30 14:12:57 jmcneill Exp $	*/
+/*	$NetBSD: hdaudiodevs.h,v 1.3 2020/01/27 00:51:40 jmcneill Exp $	*/
 
 /*
- * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
+ * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: hdaudiodevs,v 1.2 2015/05/30 14:12:42 jmcneill Exp
+ *	NetBSD: hdaudiodevs,v 1.3 2020/01/27 00:51:15 jmcneill Exp
  */
 
 /*
@@ -35,16 +35,21 @@
  * SUCH DAMAGE.
  */
 
-/* The following is duplicated from pci except SIGMATEL* and CMEDIA */
-#define	HDAUDIO_VENDOR_ATI	0x1002		/* ATI Technologies */
+/*
+ * Try to keep vendor and product names 15 characters or less. They are
+ * used by the AUDIO_GETDEV ioctl and copied into buffers that are
+ * constrained by MAX_AUDIO_DEV_LEN (sys/audioio.h).
+ */
+
+#define	HDAUDIO_VENDOR_ATI	0x1002		/* ATI */
 #define	HDAUDIO_VENDOR_NVIDIA	0x10de		/* NVIDIA */
-#define	HDAUDIO_VENDOR_REALTEK	0x10ec		/* Realtek Semiconductor */
-#define	HDAUDIO_VENDOR_VIATECH	0x1106		/* VIA TeCHnologies */
+#define	HDAUDIO_VENDOR_REALTEK	0x10ec		/* Realtek */
+#define	HDAUDIO_VENDOR_VIATECH	0x1106		/* VIA */
 #define	HDAUDIO_VENDOR_SIGMATEL2	0x111d		/* Sigmatel */
 #define	HDAUDIO_VENDOR_ANALOG	0x11d4		/* Analog Devices */
-#define	HDAUDIO_VENDOR_CONEXANT	0x14f1		/* Conexant Systems */
+#define	HDAUDIO_VENDOR_CONEXANT	0x14f1		/* Conexant */
 #define	HDAUDIO_VENDOR_VMWARE	0x15ad		/* VMware */
-#define	HDAUDIO_VENDOR_CMEDIA	0x434d		/* C-Media Electronics */
+#define	HDAUDIO_VENDOR_CMEDIA	0x434d		/* C-Media */
 #define	HDAUDIO_VENDOR_INTEL	0x8086		/* Intel */
 #define	HDAUDIO_VENDOR_SIGMATEL	0x8384		/* Sigmatel */
 
Index: src/sys/dev/hdaudio/hdaudiodevs_data.h
diff -u src/sys/dev/hdaudio/hdaudiodevs_data.h:1.2 src/sys/dev/hdaudio/hdaudiodevs_data.h:1.3
--- src/sys/dev/hdaudio/hdaudiodevs_data.h:1.2	Sat May 30 14:12:57 2015
+++ src/sys/dev/hdaudio/hdaudiodevs_data.h	Mon Jan 27 00:51:40 2020
@@ -1,10 +1,10 @@
-/*	$NetBSD: hdaudiodevs_data.h,v 1.2 2015/05/30 14:12:57 jmcneill Exp $	*/
+/*	$NetBSD: hdaudiodevs_data.h,v 1.3 2020/01/27 00:51:40 jmcneill Exp $	*/
 
 /*
- * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
+ * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: hdaudiodevs,v 1.2 2015/05/30 14:12:42 jmcneill Exp
+ *	NetBSD: hdaudiodevs,v 1.3 2020/01/27 00:51:15 jmcneill Exp
  */
 
 /*
@@ -36,551 +36,546 @@
  */
 
 static const uint16_t hdaudio_vendors[] = {
-	HDAUDIO_VENDOR_ATI, 1, 5, 0,
-	HDAUDIO_VENDOR_NVIDIA, 18, 0,
-	HDAUDIO_VENDOR_REALTEK, 25, 33, 0,
-	HDAUDIO_VENDOR_VIATECH, 47, 51, 0,
-	HDAUDIO_VENDOR_SIGMATEL2, 64, 0,
-	HDAUDIO_VENDOR_ANALOG, 73, 80, 0,
-	HDAUDIO_VENDOR_CONEXANT, 88, 97, 0,
-	HDAUDIO_VENDOR_VMWARE, 105, 0,
-	HDAUDIO_VENDOR_CMEDIA, 112, 120, 0,
-	HDAUDIO_VENDOR_INTEL, 132, 0,
-	HDAUDIO_VENDOR_SIGMATEL, 64, 0,
+	HDAUDIO_VENDOR_ATI, 1, 0,
+	HDAUDIO_VENDOR_NVIDIA, 5, 0,
+	HDAUDIO_VENDOR_REALTEK, 12, 0,
+	HDAUDIO_VENDOR_VIATECH, 20, 0,
+	HDAUDIO_VENDOR_SIGMATEL2, 24, 0,
+	HDAUDIO_VENDOR_ANALOG, 33, 40, 0,
+	HDAUDIO_VENDOR_CONEXANT, 48, 0,
+	HDAUDIO_VENDOR_VMWARE, 57, 0,
+	HDAUDIO_VENDOR_CMEDIA, 64, 0,
+	HDAUDIO_VENDOR_INTEL, 72, 0,
+	HDAUDIO_VENDOR_SIGMATEL, 24, 0,
 };
 
 static const uint16_t hdaudio_products[] = {
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_RS600_HDMI_1, 
-	138, 144, 0,
+	78, 84, 0,
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_RS600_HDMI_2, 
-	138, 144, 0,
+	78, 84, 0,
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_RS690_780_HDMI, 
-	149, 144, 0,
+	89, 84, 0,
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_R6xx_HDMI, 
-	159, 144, 0,
+	99, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_2, 
-	164, 144, 0,
+	104, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_3, 
-	164, 144, 0,
+	104, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_5, 
-	164, 144, 0,
+	104, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_6, 
-	164, 144, 0,
+	104, 84, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP79_7A_HDMI_7, 
-	173, 144, 0,
+	113, 84, 0,
 	

CVS commit: src/sys/dev/hdaudio

2020-01-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 27 00:51:15 UTC 2020

Modified Files:
src/sys/dev/hdaudio: hdaudiodevs

Log Message:
Make sure that all vendor strings are shorter than 16 (MAX_AUDIO_DEV_LEN)
characters as the values are used in the AUDIO_GETDEV ioctl.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hdaudio/hdaudiodevs

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



CVS commit: src/sys/dev/hdaudio

2020-01-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Jan 27 00:51:15 UTC 2020

Modified Files:
src/sys/dev/hdaudio: hdaudiodevs

Log Message:
Make sure that all vendor strings are shorter than 16 (MAX_AUDIO_DEV_LEN)
characters as the values are used in the AUDIO_GETDEV ioctl.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hdaudio/hdaudiodevs

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/hdaudio/hdaudiodevs
diff -u src/sys/dev/hdaudio/hdaudiodevs:1.2 src/sys/dev/hdaudio/hdaudiodevs:1.3
--- src/sys/dev/hdaudio/hdaudiodevs:1.2	Sat May 30 14:12:42 2015
+++ src/sys/dev/hdaudio/hdaudiodevs	Mon Jan 27 00:51:15 2020
@@ -1,4 +1,4 @@
-$NetBSD: hdaudiodevs,v 1.2 2015/05/30 14:12:42 jmcneill Exp $
+$NetBSD: hdaudiodevs,v 1.3 2020/01/27 00:51:15 jmcneill Exp $
 
 /*
  * Copyright (c) 2010 Jared D. McNeill 
@@ -28,16 +28,21 @@ $NetBSD: hdaudiodevs,v 1.2 2015/05/30 14
  * SUCH DAMAGE.
  */
 
-/* The following is duplicated from pci except SIGMATEL* and CMEDIA */
-vendor	ATI		0x1002	ATI Technologies
+/*
+ * Try to keep vendor and product names 15 characters or less. They are
+ * used by the AUDIO_GETDEV ioctl and copied into buffers that are
+ * constrained by MAX_AUDIO_DEV_LEN (sys/audioio.h).
+ */
+
+vendor	ATI		0x1002	ATI
 vendor	NVIDIA		0x10de	NVIDIA
-vendor	REALTEK		0x10ec	Realtek Semiconductor
-vendor	VIATECH		0x1106	VIA TeCHnologies
+vendor	REALTEK		0x10ec	Realtek
+vendor	VIATECH		0x1106	VIA
 vendor	SIGMATEL2	0x111d	Sigmatel
 vendor	ANALOG		0x11d4	Analog Devices
-vendor	CONEXANT	0x14f1	Conexant Systems
+vendor	CONEXANT	0x14f1	Conexant
 vendor	VMWARE		0x15ad	VMware
-vendor	CMEDIA		0x434d	C-Media Electronics
+vendor	CMEDIA		0x434d	C-Media
 vendor	INTEL		0x8086	Intel
 vendor	SIGMATEL	0x8384	Sigmatel
 



CVS commit: src/external/bsd/dhcpcd/dist/src

2020-01-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 26 22:57:52 UTC 2020

Modified Files:
src/external/bsd/dhcpcd/dist/src: script.c

Log Message:
prevent coredump when state == NULL


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12 -r1.2 src/external/bsd/dhcpcd/dist/src/script.c

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

Modified files:

Index: src/external/bsd/dhcpcd/dist/src/script.c
diff -u src/external/bsd/dhcpcd/dist/src/script.c:1.1.1.12 src/external/bsd/dhcpcd/dist/src/script.c:1.2
--- src/external/bsd/dhcpcd/dist/src/script.c:1.1.1.12	Wed Nov 13 05:49:20 2019
+++ src/external/bsd/dhcpcd/dist/src/script.c	Sun Jan 26 17:57:52 2020
@@ -453,7 +453,7 @@ make_env(const struct interface *ifp, co
 dumplease:
 #ifdef INET
 #ifdef IPV4LL
-	if (protocol == PROTO_IPV4LL) {
+	if (protocol == PROTO_IPV4LL && istate) {
 		if (ipv4ll_env(fp, istate->down ? "old" : "new", ifp) == -1)
 			goto eexit;
 	}



CVS commit: src/external/bsd/dhcpcd/dist/src

2020-01-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 26 22:57:52 UTC 2020

Modified Files:
src/external/bsd/dhcpcd/dist/src: script.c

Log Message:
prevent coredump when state == NULL


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12 -r1.2 src/external/bsd/dhcpcd/dist/src/script.c

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



CVS commit: src/sys/dev/usb

2020-01-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jan 26 22:34:17 UTC 2020

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

Log Message:
Use __BIT.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/uatp.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/uatp.c
diff -u src/sys/dev/usb/uatp.c:1.22 src/sys/dev/usb/uatp.c:1.23
--- src/sys/dev/usb/uatp.c:1.22	Sun Jan 26 22:19:54 2020
+++ src/sys/dev/usb/uatp.c	Sun Jan 26 22:34:17 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uatp.c,v 1.22 2020/01/26 22:19:54 riastradh Exp $	*/
+/*	$NetBSD: uatp.c,v 1.23 2020/01/26 22:34:17 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 The NetBSD Foundation, Inc.
@@ -146,7 +146,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.22 2020/01/26 22:19:54 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.23 2020/01/26 22:34:17 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -184,22 +184,22 @@ __KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.2
 	}\
 } while (0)
 
-#define UATP_DEBUG_ATTACH	(1 << 0)
-#define UATP_DEBUG_MISC		(1 << 1)
-#define UATP_DEBUG_WSMOUSE	(1 << 2)
-#define UATP_DEBUG_IOCTL	(1 << 3)
-#define UATP_DEBUG_RESET	(1 << 4)
-#define UATP_DEBUG_INTR		(1 << 5)
-#define UATP_DEBUG_PARSE	(1 << 6)
-#define UATP_DEBUG_TAP		(1 << 7)
-#define UATP_DEBUG_EMUL_BUTTON	(1 << 8)
-#define UATP_DEBUG_ACCUMULATE	(1 << 9)
-#define UATP_DEBUG_STATUS	(1 << 10)
-#define UATP_DEBUG_SPURINTR	(1 << 11)
-#define UATP_DEBUG_MOVE		(1 << 12)
-#define UATP_DEBUG_ACCEL	(1 << 13)
-#define UATP_DEBUG_TRACK_DIST	(1 << 14)
-#define UATP_DEBUG_PALM		(1 << 15)
+#define UATP_DEBUG_ATTACH	__BIT(0)
+#define UATP_DEBUG_MISC		__BIT(1)
+#define UATP_DEBUG_WSMOUSE	__BIT(2)
+#define UATP_DEBUG_IOCTL	__BIT(3)
+#define UATP_DEBUG_RESET	__BIT(4)
+#define UATP_DEBUG_INTR		__BIT(5)
+#define UATP_DEBUG_PARSE	__BIT(6)
+#define UATP_DEBUG_TAP		__BIT(7)
+#define UATP_DEBUG_EMUL_BUTTON	__BIT(8)
+#define UATP_DEBUG_ACCUMULATE	__BIT(9)
+#define UATP_DEBUG_STATUS	__BIT(10)
+#define UATP_DEBUG_SPURINTR	__BIT(11)
+#define UATP_DEBUG_MOVE		__BIT(12)
+#define UATP_DEBUG_ACCEL	__BIT(13)
+#define UATP_DEBUG_TRACK_DIST	__BIT(14)
+#define UATP_DEBUG_PALM		__BIT(15)
 
 /*
  * Unconditionally enable the debug output so you don't have to
@@ -246,9 +246,9 @@ __KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.2
 #define UATP_MAX_MOTION_MULTIPLIER	16
 
 /* Status bits transmitted in the last byte of an input packet.  */
-#define UATP_STATUS_BUTTON	(1 << 0)	/* Button pressed */
-#define UATP_STATUS_BASE	(1 << 2)	/* Base sensor data */
-#define UATP_STATUS_POST_RESET	(1 << 4)	/* Post-reset */
+#define UATP_STATUS_BUTTON	__BIT(0)	/* Button pressed */
+#define UATP_STATUS_BASE	__BIT(2)	/* Base sensor data */
+#define UATP_STATUS_POST_RESET	__BIT(4)	/* Post-reset */
 
 /* Forward declarations */
 
@@ -514,9 +514,9 @@ struct uatp_softc {
 	unsigned int sc_track_distance;	/* Distance^2 finger has tracked,
 	 * squared to avoid sqrt in kernel.  */
 	uint32_t sc_status;		/* Status flags:  */
-#define UATP_ENABLED	(1 << 0)	/* . Is the wsmouse enabled?  */
-#define UATP_DYING	(1 << 1)	/* . Have we been deactivated?  */
-#define UATP_VALID	(1 << 2)	/* . Do we have valid sensor data?  */
+#define UATP_ENABLED	__BIT(0)	/* . Is the wsmouse enabled?  */
+#define UATP_DYING	__BIT(1)	/* . Have we been deactivated?  */
+#define UATP_VALID	__BIT(2)	/* . Do we have valid sensor data?  */
 	struct usb_task sc_reset_task;	/* Task for resetting device.  */
 
 	callout_t sc_untap_callout;	/* Releases button after tap.  */



CVS commit: src/sys/dev/usb

2020-01-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jan 26 22:34:17 UTC 2020

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

Log Message:
Use __BIT.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/uatp.c

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



CVS commit: src/sys/dev/usb

2020-01-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jan 26 22:19:54 UTC 2020

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

Log Message:
Unconditionally enable UATP_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/uatp.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/uatp.c
diff -u src/sys/dev/usb/uatp.c:1.21 src/sys/dev/usb/uatp.c:1.22
--- src/sys/dev/usb/uatp.c:1.21	Sun Jan 26 22:19:39 2020
+++ src/sys/dev/usb/uatp.c	Sun Jan 26 22:19:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uatp.c,v 1.21 2020/01/26 22:19:39 riastradh Exp $	*/
+/*	$NetBSD: uatp.c,v 1.22 2020/01/26 22:19:54 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 The NetBSD Foundation, Inc.
@@ -146,7 +146,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.21 2020/01/26 22:19:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.22 2020/01/26 22:19:54 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -201,6 +201,13 @@ __KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.2
 #define UATP_DEBUG_TRACK_DIST	(1 << 14)
 #define UATP_DEBUG_PALM		(1 << 15)
 
+/*
+ * Unconditionally enable the debug output so you don't have to
+ * recompile the kernel to diagnose it.  This is not a high-throughput
+ * NIC driver or anything that will be hurt by a few conditionals.
+ */
+#define	UATP_DEBUG	1
+
 #if UATP_DEBUG
 #  define DPRINTF(sc, flags, format) do {\
 	if ((flags) & (sc)->sc_debug_flags) {\



CVS commit: src/sys/dev/usb

2020-01-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jan 26 22:19:39 UTC 2020

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

Log Message:
Downgrade noisy message from aprint_verbose to DPRINTF.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/usb/uatp.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/uatp.c
diff -u src/sys/dev/usb/uatp.c:1.20 src/sys/dev/usb/uatp.c:1.21
--- src/sys/dev/usb/uatp.c:1.20	Sun Jan 26 22:19:27 2020
+++ src/sys/dev/usb/uatp.c	Sun Jan 26 22:19:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uatp.c,v 1.20 2020/01/26 22:19:27 riastradh Exp $	*/
+/*	$NetBSD: uatp.c,v 1.21 2020/01/26 22:19:39 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 The NetBSD Foundation, Inc.
@@ -146,7 +146,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.20 2020/01/26 22:19:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.21 2020/01/26 22:19:39 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1446,8 +1446,8 @@ uatp_intr(struct uhidev *addr, void *ibu
 	sc->sc_input_index += len;
 	if (sc->sc_input_index != sc->sc_input_size) {
 		/* Wait until packet is complete.  */
-		aprint_verbose_dev(uatp_dev(sc), "partial packet: %u bytes\n",
-		len);
+		DPRINTF(sc, UATP_DEBUG_INTR, ("partial packet: %u bytes\n",
+		len));
 		return;
 	}
 



CVS commit: src/sys/dev/usb

2020-01-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jan 26 22:19:27 UTC 2020

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

Log Message:
Work around quirk of Fountain and Geyser 1 trackpads.

Sometimes they get desynchronized, but we know the last packet is a
17-byte packet, so if we get one early then stop here.

Tested by macallan on an iBook and a PowerBook.  This code path
shouldn't break anything on MacBooks because they have different
total numbers of sensors so this branch won't be reached.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/usb/uatp.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/uatp.c
diff -u src/sys/dev/usb/uatp.c:1.19 src/sys/dev/usb/uatp.c:1.20
--- src/sys/dev/usb/uatp.c:1.19	Tue Jan 22 06:47:20 2019
+++ src/sys/dev/usb/uatp.c	Sun Jan 26 22:19:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uatp.c,v 1.19 2019/01/22 06:47:20 skrll Exp $	*/
+/*	$NetBSD: uatp.c,v 1.20 2020/01/26 22:19:27 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 The NetBSD Foundation, Inc.
@@ -146,7 +146,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.19 2019/01/22 06:47:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.20 2020/01/26 22:19:27 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1416,6 +1416,19 @@ uatp_intr(struct uhidev *addr, void *ibu
 		(sc->sc_input_index + len));
 		sc->sc_input_index = 0;
 		return;
+	} else if (sc->sc_input_size == 81 && len == 17 &&
+	sc->sc_input_index != 64) {
+		/*
+		 * Quirk of Fountain and Geyser 1 devices: a 17-byte
+		 * packet seems to mean the last one, but sometimes we
+		 * get desynchronized, so drop this one and start over
+		 * if we see a 17-byte packet that's not at the end.
+		 */
+		aprint_error_dev(uatp_dev(sc),
+		"discarding 17-byte nonterminal input at %u\n",
+		sc->sc_input_index);
+		sc->sc_input_index = 0;
+		return;
 	}
 
 #if UATP_DEBUG



CVS commit: src/sys/dev/usb

2020-01-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jan 26 22:19:27 UTC 2020

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

Log Message:
Work around quirk of Fountain and Geyser 1 trackpads.

Sometimes they get desynchronized, but we know the last packet is a
17-byte packet, so if we get one early then stop here.

Tested by macallan on an iBook and a PowerBook.  This code path
shouldn't break anything on MacBooks because they have different
total numbers of sensors so this branch won't be reached.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/usb/uatp.c

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



CVS commit: src/sys/dev/usb

2020-01-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jan 26 22:19:39 UTC 2020

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

Log Message:
Downgrade noisy message from aprint_verbose to DPRINTF.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/usb/uatp.c

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



CVS commit: src/sys/dev/usb

2020-01-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jan 26 22:19:54 UTC 2020

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

Log Message:
Unconditionally enable UATP_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/uatp.c

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



CVS commit: src/sys/dev/ofw

2020-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan 26 21:43:52 UTC 2020

Modified Files:
src/sys/dev/ofw: ofdisk.c

Log Message:
Fix __HAVE_OLD_DISKLABEL bits so they at least compile.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ofw/ofdisk.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/ofw/ofdisk.c
diff -u src/sys/dev/ofw/ofdisk.c:1.53 src/sys/dev/ofw/ofdisk.c:1.54
--- src/sys/dev/ofw/ofdisk.c:1.53	Wed Mar 27 19:13:34 2019
+++ src/sys/dev/ofw/ofdisk.c	Sun Jan 26 21:43:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofdisk.c,v 1.53 2019/03/27 19:13:34 martin Exp $	*/
+/*	$NetBSD: ofdisk.c,v 1.54 2020/01/26 21:43:52 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.53 2019/03/27 19:13:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.54 2020/01/26 21:43:52 thorpej Exp $");
 
 #include 
 #include 
@@ -404,11 +404,11 @@ ofdisk_ioctl(dev_t dev, u_long cmd, void
 		error = setdisklabel(of->sc_dk.dk_label,
 		lp, /*of->sc_dk.dk_openmask */0,
 		of->sc_dk.dk_cpulabel);
-		if (error == 0 && cmd == DIOCWDINFO
+		if (error == 0 && (cmd == DIOCWDINFO
 #ifdef __HAVE_OLD_DISKLABEL
-		|| xfer == ODIOCWDINFO
+		|| cmd == ODIOCWDINFO
 #endif
-		)
+		))
 			error = writedisklabel(MAKEDISKDEV(major(dev),
 			DISKUNIT(dev), RAW_PART), ofdisk_strategy,
 			of->sc_dk.dk_label, of->sc_dk.dk_cpulabel);
@@ -422,7 +422,7 @@ ofdisk_ioctl(dev_t dev, u_long cmd, void
 		ofdisk_getdefaultlabel(of, (struct disklabel *)data);
 		return 0;
 #ifdef __HAVE_OLD_DISKLABEL
-	case DIOCGDEFLABEL:
+	case ODIOCGDEFLABEL:
 		ofdisk_getdefaultlabel(of, );
 		if (newlabel.d_npartitions > OLDMAXPARTITIONS)
 			return ENOTTY;



CVS commit: src/sys/dev/ofw

2020-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan 26 21:43:52 UTC 2020

Modified Files:
src/sys/dev/ofw: ofdisk.c

Log Message:
Fix __HAVE_OLD_DISKLABEL bits so they at least compile.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ofw/ofdisk.c

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



CVS commit: src/sys

2020-01-26 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jan 26 19:08:09 UTC 2020

Modified Files:
src/sys/compat/netbsd32: netbsd32_lwp.c
src/sys/kern: sys_lwp.c

Log Message:
Correction to previous: don't leak newuc if copyout() fails.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/compat/netbsd32/netbsd32_lwp.c
cvs rdiff -u -r1.72 -r1.73 src/sys/kern/sys_lwp.c

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_lwp.c
diff -u src/sys/compat/netbsd32/netbsd32_lwp.c:1.20 src/sys/compat/netbsd32/netbsd32_lwp.c:1.21
--- src/sys/compat/netbsd32/netbsd32_lwp.c:1.20	Sat Jan 25 15:41:52 2020
+++ src/sys/compat/netbsd32/netbsd32_lwp.c	Sun Jan 26 19:08:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_lwp.c,v 1.20 2020/01/25 15:41:52 ad Exp $	*/
+/*	$NetBSD: netbsd32_lwp.c,v 1.21 2020/01/26 19:08:09 ad Exp $	*/
 
 /*
  *  Copyright (c) 2005, 2006, 2007, 2020 The NetBSD Foundation.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_lwp.c,v 1.20 2020/01/25 15:41:52 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_lwp.c,v 1.21 2020/01/26 19:08:09 ad Exp $");
 
 #include 
 #include 
@@ -84,12 +84,11 @@ netbsd32__lwp_create(struct lwp *l, cons
 
 	error = copyout(>l_lid, SCARG_P32(uap, new_lwp),
 	sizeof(l2->l_lid));
-	if (error != 0)
-		lwp_exit(l2);
-	else
+	if (error == 0) { 
 		lwp_start(l2, SCARG(uap, flags));
-	return error;
-
+		return 0;
+	}
+	lwp_exit(l2);
  fail:
 	kmem_free(newuc, sizeof(ucontext_t));
 	return error;

Index: src/sys/kern/sys_lwp.c
diff -u src/sys/kern/sys_lwp.c:1.72 src/sys/kern/sys_lwp.c:1.73
--- src/sys/kern/sys_lwp.c:1.72	Sat Jan 25 15:41:52 2020
+++ src/sys/kern/sys_lwp.c	Sun Jan 26 19:08:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_lwp.c,v 1.72 2020/01/25 15:41:52 ad Exp $	*/
+/*	$NetBSD: sys_lwp.c,v 1.73 2020/01/26 19:08:09 ad Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.72 2020/01/25 15:41:52 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.73 2020/01/26 19:08:09 ad Exp $");
 
 #include 
 #include 
@@ -156,12 +156,11 @@ sys__lwp_create(struct lwp *l, const str
 		goto fail;
 
 	error = copyout(>l_lid, SCARG(uap, new_lwp), sizeof(l2->l_lid));
-	if (error != 0)
-		lwp_exit(l2);
-	else
+	if (error == 0) {
 		lwp_start(l2, SCARG(uap, flags));
-	return error;
-
+		return 0;
+	}
+	lwp_exit(l2);
  fail:
 	kmem_free(newuc, sizeof(ucontext_t));
 	return error;



CVS commit: src/sys

2020-01-26 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jan 26 19:08:09 UTC 2020

Modified Files:
src/sys/compat/netbsd32: netbsd32_lwp.c
src/sys/kern: sys_lwp.c

Log Message:
Correction to previous: don't leak newuc if copyout() fails.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/compat/netbsd32/netbsd32_lwp.c
cvs rdiff -u -r1.72 -r1.73 src/sys/kern/sys_lwp.c

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



CVS commit: src/sys/kern

2020-01-26 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jan 26 19:06:24 UTC 2020

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

Log Message:
Update a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/sys/kern/kern_lwp.c

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



CVS commit: src/sys/kern

2020-01-26 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jan 26 19:06:24 UTC 2020

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

Log Message:
Update a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/sys/kern/kern_lwp.c

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

Modified files:

Index: src/sys/kern/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.220 src/sys/kern/kern_lwp.c:1.221
--- src/sys/kern/kern_lwp.c:1.220	Wed Jan 22 12:23:04 2020
+++ src/sys/kern/kern_lwp.c	Sun Jan 26 19:06:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.220 2020/01/22 12:23:04 ad Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.221 2020/01/26 19:06:24 ad Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020
@@ -176,7 +176,8 @@
  *	LSSLEEP:
  *
  *		Covered by a lock associated with the sleep queue (sometimes
- *		a turnstile sleep queue) that the LWP resides on.
+ *		a turnstile sleep queue) that the LWP resides on.  This can
+ *		be spc_lwplock for SOBJ_SLEEPQ_NULL (an "untracked" sleep).
  *
  *	LSSTOP:
  *
@@ -210,7 +211,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.220 2020/01/22 12:23:04 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.221 2020/01/26 19:06:24 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"



CVS commit: src/sys

2020-01-26 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jan 26 19:01:56 UTC 2020

Modified Files:
src/sys/kern: kern_sleepq.c
src/sys/sys: syncobj.h

Log Message:
Add SOBJ_SLEEPQ_NULL: means there is no TAILQ and the caller tracks the
sleeping LWPs some other way, which sleepq_*() doesn't know about.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/kern_sleepq.c
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/syncobj.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/kern/kern_sleepq.c
diff -u src/sys/kern/kern_sleepq.c:1.58 src/sys/kern/kern_sleepq.c:1.59
--- src/sys/kern/kern_sleepq.c:1.58	Sun Jan 12 13:08:32 2020
+++ src/sys/kern/kern_sleepq.c	Sun Jan 26 19:01:56 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: kern_sleepq.c,v 1.58 2020/01/12 13:08:32 ad Exp $	*/
+/*	$NetBSD: kern_sleepq.c,v 1.59 2020/01/26 19:01:56 ad Exp $	*/
 
 /*-
- * Copyright (c) 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
+ * Copyright (c) 2006, 2007, 2008, 2009, 2019, 2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.58 2020/01/12 13:08:32 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.59 2020/01/26 19:01:56 ad Exp $");
 
 #include 
 #include 
@@ -114,7 +114,13 @@ sleepq_remove(sleepq_t *sq, lwp_t *l)
 
 	KASSERT(lwp_locked(l, NULL));
 
-	TAILQ_REMOVE(sq, l, l_sleepchain);
+	if ((l->l_syncobj->sobj_flag & SOBJ_SLEEPQ_NULL) == 0) {
+		KASSERT(sq != NULL);
+		TAILQ_REMOVE(sq, l, l_sleepchain);
+	} else {
+		KASSERT(sq == NULL);
+	}
+
 	l->l_syncobj = _syncobj;
 	l->l_wchan = NULL;
 	l->l_sleepq = NULL;
@@ -175,6 +181,12 @@ static void
 sleepq_insert(sleepq_t *sq, lwp_t *l, syncobj_t *sobj)
 {
 
+	if ((sobj->sobj_flag & SOBJ_SLEEPQ_NULL) != 0) {
+		KASSERT(sq == NULL); 
+		return;
+	}
+	KASSERT(sq != NULL);
+
 	if ((sobj->sobj_flag & SOBJ_SLEEPQ_SORTED) != 0) {
 		lwp_t *l2;
 		const int pri = lwp_eprio(l);
@@ -441,7 +453,7 @@ sleepq_reinsert(sleepq_t *sq, lwp_t *l)
 {
 
 	KASSERT(l->l_sleepq == sq);
-	if ((l->l_syncobj->sobj_flag & SOBJ_SLEEPQ_SORTED) == 0) {
+	if ((l->l_syncobj->sobj_flag & SOBJ_SLEEPQ_SORTED) == 0) { 
 		return;
 	}
 

Index: src/sys/sys/syncobj.h
diff -u src/sys/sys/syncobj.h:1.8 src/sys/sys/syncobj.h:1.9
--- src/sys/sys/syncobj.h:1.8	Wed Oct 21 21:12:07 2009
+++ src/sys/sys/syncobj.h	Sun Jan 26 19:01:56 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: syncobj.h,v 1.8 2009/10/21 21:12:07 rmind Exp $	*/
+/*	$NetBSD: syncobj.h,v 1.9 2020/01/26 19:01:56 ad Exp $	*/
 
 /*-
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007, 2008, 2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -54,11 +54,13 @@ struct lwp *syncobj_noowner(wchan_t);
 #define	SOBJ_SLEEPQ_SORTED	0x01
 #define	SOBJ_SLEEPQ_FIFO	0x02
 #define	SOBJ_SLEEPQ_LIFO	0x04
+#define	SOBJ_SLEEPQ_NULL	0x08
 
 extern syncobj_t	sched_syncobj;
 extern syncobj_t	mutex_syncobj;
 extern syncobj_t	rw_syncobj;
 extern syncobj_t	sleep_syncobj;
+extern syncobj_t	lwp_park_syncobj;
 
 #endif /* defined(_KERNEL) */
 



CVS commit: src/sys

2020-01-26 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jan 26 19:01:56 UTC 2020

Modified Files:
src/sys/kern: kern_sleepq.c
src/sys/sys: syncobj.h

Log Message:
Add SOBJ_SLEEPQ_NULL: means there is no TAILQ and the caller tracks the
sleeping LWPs some other way, which sleepq_*() doesn't know about.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/kern_sleepq.c
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/syncobj.h

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



CVS commit: src/sys/kern

2020-01-26 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jan 26 18:52:55 UTC 2020

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

Log Message:
softint_dispatch(): replace the KASSERT for LW_RUNNING with a big printf()
plus panic() that dumps lots of info.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/kern_softint.c

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



CVS commit: src/sys/kern

2020-01-26 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jan 26 18:52:55 UTC 2020

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

Log Message:
softint_dispatch(): replace the KASSERT for LW_RUNNING with a big printf()
plus panic() that dumps lots of info.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/kern_softint.c

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

Modified files:

Index: src/sys/kern/kern_softint.c
diff -u src/sys/kern/kern_softint.c:1.58 src/sys/kern/kern_softint.c:1.59
--- src/sys/kern/kern_softint.c:1.58	Sat Jan 25 15:12:47 2020
+++ src/sys/kern/kern_softint.c	Sun Jan 26 18:52:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.58 2020/01/25 15:12:47 ad Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.59 2020/01/26 18:52:55 ad Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.58 2020/01/25 15:12:47 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.59 2020/01/26 18:52:55 ad Exp $");
 
 #include 
 #include 
@@ -841,7 +841,24 @@ softint_dispatch(lwp_t *pinned, int s)
 	u_int timing;
 	lwp_t *l;
 
-	KASSERT((pinned->l_flag & LW_RUNNING) != 0);
+#ifdef DIAGNOSTIC
+	if ((pinned->l_flag & LW_RUNNING) == 0 || curlwp->l_stat != LSIDL) {
+		struct lwp *onproc = curcpu()->ci_onproc;
+		int s2 = splhigh();
+		printf("curcpu=%d, spl=%d curspl=%d\n"
+			"onproc=%p => l_stat=%d l_flag=%08x l_cpu=%d\n"
+			"curlwp=%p => l_stat=%d l_flag=%08x l_cpu=%d\n"
+			"pinned=%p => l_stat=%d l_flag=%08x l_cpu=%d\n",
+			cpu_index(curcpu()), s, s2, onproc, onproc->l_stat,
+			onproc->l_flag, cpu_index(onproc->l_cpu), curlwp,
+			curlwp->l_stat, curlwp->l_flag,
+			cpu_index(curlwp->l_cpu), pinned, pinned->l_stat,
+			pinned->l_flag, cpu_index(pinned->l_cpu));
+		splx(s2);
+		panic("softint screwup");
+	}
+#endif
+
 	l = curlwp;
 	si = l->l_private;
 



CVS commit: src/sys/arch/aarch64/include

2020-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 26 15:52:00 UTC 2020

Modified Files:
src/sys/arch/aarch64/include: pmap.h

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/aarch64/include/pmap.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/aarch64/include/pmap.h
diff -u src/sys/arch/aarch64/include/pmap.h:1.30 src/sys/arch/aarch64/include/pmap.h:1.31
--- src/sys/arch/aarch64/include/pmap.h:1.30	Mon Jan  6 08:29:08 2020
+++ src/sys/arch/aarch64/include/pmap.h	Sun Jan 26 15:52:00 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.30 2020/01/06 08:29:08 skrll Exp $ */
+/* $NetBSD: pmap.h,v 1.31 2020/01/26 15:52:00 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -242,7 +242,7 @@ aarch64_mmap_flags(paddr_t mdpgno)
 	 * aarch64 arch has 5 memory attribute:
 	 *
 	 *  WriteBack  - write back cache
-	 *  WriteThru  - wite through cache
+	 *  WriteThru  - write through cache
 	 *  NoCache- no cache
 	 *  Device(nGnRE)  - no Gathering, no Reordering, Early write ack
 	 *  Device(nGnRnE) - no Gathering, no Reordering, no Early write ack



CVS commit: src/sys/arch/aarch64/include

2020-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 26 15:52:00 UTC 2020

Modified Files:
src/sys/arch/aarch64/include: pmap.h

Log Message:
Typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/aarch64/include/pmap.h

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



CVS commit: src/usr.sbin/sysinst

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 14:37:29 UTC 2020

Modified Files:
src/usr.sbin/sysinst: util.c

Log Message:
When retrying sets during extraction, reset the relevant statistics
to avoid counting retried sets multiple times.

Reported by kim.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/sysinst/util.c

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



CVS commit: src/usr.sbin/sysinst

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 14:37:29 UTC 2020

Modified Files:
src/usr.sbin/sysinst: util.c

Log Message:
When retrying sets during extraction, reset the relevant statistics
to avoid counting retried sets multiple times.

Reported by kim.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/sysinst/util.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/util.c
diff -u src/usr.sbin/sysinst/util.c:1.41 src/usr.sbin/sysinst/util.c:1.42
--- src/usr.sbin/sysinst/util.c:1.41	Mon Jan 20 21:26:35 2020
+++ src/usr.sbin/sysinst/util.c	Sun Jan 26 14:37:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.41 2020/01/20 21:26:35 martin Exp $	*/
+/*	$NetBSD: util.c,v 1.42 2020/01/26 14:37:29 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1085,7 +1085,7 @@ get_and_unpack_sets(int update, msg setu
 {
 	distinfo *dist;
 	int status;
-	int set;
+	int set, olderror, oldfound;
 
 	/* Ensure mountpoint for distribution files exists in current root. */
 	(void)mkdir("/mnt2", S_IRWXU| S_IRGRP|S_IXGRP | S_IROTH|S_IXOTH);
@@ -1115,6 +1115,10 @@ get_and_unpack_sets(int update, msg setu
 		if (set_status[set] != (SET_VALID | SET_SELECTED))
 			continue;
 
+		/* save stats, in case we will retry */
+		oldfound = tarstats.nfound;
+		olderror = tarstats.nerror;
+
 		if (status != SET_OK) {
 			/* This might force a redraw */
 			clearok(curscr, 1);
@@ -1151,8 +1155,14 @@ get_and_unpack_sets(int update, msg setu
 
 		/* Try to extract this set */
 		status = extract_file(dist, update);
-		if (status == SET_RETRY)
+		if (status == SET_RETRY) {
+			/* do this set again */
 			dist--;
+			/* and reset statistics to what we had before this
+			 * set */
+			tarstats.nfound = oldfound;
+			tarstats.nerror = olderror;
+		}
 	}
 
 #ifdef MD_SET_EXTRACT_FINALIZE



CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2020-01-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jan 26 14:36:36 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon.h radeon_device.c

Log Message:
Zero the dummy page


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/radeon/radeon.h \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon.h
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:1.6 src/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:1.7
--- src/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:1.6	Mon Aug 27 06:38:51 2018
+++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon.h	Sun Jan 26 14:36:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeon.h,v 1.6 2018/08/27 06:38:51 riastradh Exp $	*/
+/*	$NetBSD: radeon.h,v 1.7 2020/01/26 14:36:35 jmcneill Exp $	*/
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -259,6 +259,7 @@ struct radeon_dummy_page {
 #ifdef __NetBSD__
 	bus_dma_segment_t	rdp_seg;
 	bus_dmamap_t		rdp_map;
+	void		*rdp_addr;
 #else
 	struct page	*page;
 #endif
Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c:1.6 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c:1.7
--- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c:1.6	Mon Aug 27 07:48:40 2018
+++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c	Sun Jan 26 14:36:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeon_device.c,v 1.6 2018/08/27 07:48:40 riastradh Exp $	*/
+/*	$NetBSD: radeon_device.c,v 1.7 2020/01/26 14:36:35 jmcneill Exp $	*/
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *  Jerome Glisse
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: radeon_device.c,v 1.6 2018/08/27 07:48:40 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_device.c,v 1.7 2020/01/26 14:36:35 jmcneill Exp $");
 
 #include 
 #include 
@@ -835,10 +835,17 @@ int radeon_dummy_page_init(struct radeon
 	BUS_DMA_WAITOK, >dummy_page.rdp_map);
 	if (error)
 		goto fail1;
-	error = bus_dmamap_load_raw(rdev->ddev->dmat, rdev->dummy_page.rdp_map,
-	>dummy_page.rdp_seg, 1, PAGE_SIZE, BUS_DMA_WAITOK);
+	error = bus_dmamem_map(rdev->ddev->dmat, >dummy_page.rdp_seg, 1,
+	PAGE_SIZE, >dummy_page.rdp_addr,
+	BUS_DMA_WAITOK|BUS_DMA_NOCACHE);
 	if (error)
 		goto fail2;
+	error = bus_dmamap_load(rdev->ddev->dmat, rdev->dummy_page.rdp_map,
+	rdev->dummy_page.rdp_addr, PAGE_SIZE, NULL, BUS_DMA_WAITOK);
+	if (error)
+		goto fail3;
+
+	memset(rdev->dummy_page.rdp_addr, 0, PAGE_SIZE);
 
 	/* Success!  */
 	rdev->dummy_page.addr = rdev->dummy_page.rdp_map->dm_segs[0].ds_addr;
@@ -846,8 +853,10 @@ int radeon_dummy_page_init(struct radeon
 		rdev->dummy_page.addr, RADEON_GART_PAGE_DUMMY);
 	return 0;
 
-fail3: __unused
+fail4: __unused
 	bus_dmamap_unload(rdev->ddev->dmat, rdev->dummy_page.rdp_map);
+fail3:	bus_dmamem_unmap(rdev->ddev->dmat, rdev->dummy_page.rdp_addr,
+	PAGE_SIZE);
 fail2:	bus_dmamap_destroy(rdev->ddev->dmat, rdev->dummy_page.rdp_map);
 fail1:	bus_dmamem_free(rdev->ddev->dmat, >dummy_page.rdp_seg, 1);
 fail0:	KASSERT(error);
@@ -888,6 +897,8 @@ void radeon_dummy_page_fini(struct radeo
 	if (rdev->dummy_page.rdp_map == NULL)
 		return;
 	bus_dmamap_unload(rdev->ddev->dmat, rdev->dummy_page.rdp_map);
+	bus_dmamem_unmap(rdev->ddev->dmat, rdev->dummy_page.rdp_addr,
+	PAGE_SIZE);
 	bus_dmamap_destroy(rdev->ddev->dmat, rdev->dummy_page.rdp_map);
 	bus_dmamem_free(rdev->ddev->dmat, >dummy_page.rdp_seg, 1);
 	rdev->dummy_page.rdp_map = NULL;



CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2020-01-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jan 26 14:36:36 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon.h radeon_device.c

Log Message:
Zero the dummy page


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/radeon/radeon.h \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c

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



CVS commit: [netbsd-9] src/doc

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:29:39 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Ticket #647 - #656


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.165 -r1.1.2.166 src/doc/CHANGES-9.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-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.165 src/doc/CHANGES-9.0:1.1.2.166
--- src/doc/CHANGES-9.0:1.1.2.165	Fri Jan 24 20:21:53 2020
+++ src/doc/CHANGES-9.0	Sun Jan 26 11:29:39 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.165 2020/01/24 20:21:53 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.166 2020/01/26 11:29:39 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -7886,3 +7886,105 @@ sbin/route/route.c1.164,1.165
 	and show them instead of interface flags.
 	[roy, ticket #646]
 
+lib/libpthread/pthread.c			1.154
+lib/libpthread/pthread_cond.c			1.66
+lib/libpthread/pthread_int.h			1.98
+lib/libpthread/pthread_misc.c			1.16
+lib/libpthread/pthread_mutex.c			1.66
+lib/libpthread/pthread_rwlock.c			1.37 (patch)
+
+	Remove some ery ambitious optimisations around pthread_mutex
+	that do not by much and were likely buggy.
+	[ad, ticket #647]
+
+sys/dev/pci/ixgbe/if_bypass.c		1.5
+sys/dev/pci/ixgbe/ixgbe_osdep.c		1.5
+sys/dev/pci/ixgbe/ix_txrx.c		1.58-1.60
+sys/dev/pci/ixgbe/ixgbe.c		1.220-1.221
+sys/dev/pci/ixgbe/ixgbe.h		1.60-1.2
+sys/dev/pci/ixgbe/ixgbe_api.c		1.24
+sys/dev/pci/ixgbe/ixgbe_common.c	1.26
+sys/dev/pci/ixgbe/ixgbe_netbsd.c	1.11-1.12
+sys/dev/pci/ixgbe/ixgbe_osdep.h		1.24
+sys/dev/pci/ixgbe/ixgbe_phy.c		1.19
+sys/dev/pci/ixgbe/ixgbe_82598.c		1.14
+sys/dev/pci/ixgbe/ixv.c			1.142,1.144
+
+	- Free RX structure correctly when detaching.
+	- Remove unused code.
+	- Fix some typos in comment.
+	- Remove extra spaces.
+	- KNF.
+	[msaitoh, ticket #648]
+
+sys/dev/mii/ihphy.c1.15
+
+	Remove extra 10ms delay in ihphy_reset() to reduce the
+	possibility of packet drop.
+	[msaitoh, ticket #649]
+
+sys/dev/pci/if_wm.c			1.650, 1.652-1.654
+sys/dev/pci/if_wmreg.h			1.116-1.117
+
+	- Set CTRL_ILOS(Invert loss of signal) bit correctly on 82580
+	  port 1, 2, 3 and newer chips. This change fixes a bug that some
+	  fiber, serdes or SFP devices don't detect the link status correctly.
+	- Simplify code by using "struct mii_data *mii" more. No functional
+	  change.
+	- MSI-X doesn't use sc->sc_icr variable, so move the code into
+	  non-MSI-X part. No functional change intended.
+	- Modify debug printfs a bit.
+	- Rename macro.
+	- Use __BIT()
+	- Fix comment. Add comment.
+	- KNF.
+	[msaitoh, ticket #650]
+
+sys/dev/pci/if_mcx.c1.8
+sys/dev/pci/if_mcx.c1.9
+
+	mcx(4):
+	- Change IFM_10G_T(10GBase-T) entry to IFM_10G_CR1(10GBASE-CR1)
+	- Add the following entries: 20GBASE-KR2, 56GBASE-R4, 100GBASE-LR4,
+	  100BaseTX, 1000baseT, 10GBase-T
+	- Set if_baudrate.
+	[msaitoh, ticket #651]
+
+distrib/notes/Makefile.inc			1.54
+distrib/notes/common/main			1.561,1.562
+share/tmac/doc2html1.71
+
+	Use better html titles for the install docs.
+	[uwe, ticket #652]
+
+sys/stand/efiboot/Makefile.efiboot		1.10
+sys/stand/efiboot/boot.c			1.20
+sys/stand/efiboot/bootaa64/Makefile		1.7
+sys/stand/efiboot/bootarm/Makefile		1.4
+sys/stand/efiboot/efiacpi.c			1.6
+sys/stand/efiboot/exec.c			1.13
+sys/stand/efiboot/prompt.c			1.6
+
+	Fix for disappearing counters on graphics consoles.
+	Hide the twiddle while loading efiboot plist.
+	Clean up the banner so it fits in 80 columns and add some extra details
+	to the "version" command output.
+	[jmcneill, ticket #653]
+
+sys/ddb/db_output.c1.35,1.36
+
+	db_putchar - check if we need to wrap at $maxwidth after whitespace.
+	[uwe, ticket #654]
+
+sys/ddb/db_input.c1.27
+sys/ddb/db_lex.c1.23
+
+	Print db> prompt in db_read_line(), not db_readline().
+	[uwe, ticket #655]
+
+sys/ddb/db_command.c1.162-1.164
+
+	db_command - make sure count is always initialized and other
+	cosmetic/code cleanup changes.
+	[uwe, ticket #656]
+



CVS commit: [netbsd-9] src/doc

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:29:39 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Ticket #647 - #656


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.165 -r1.1.2.166 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/sys/ddb

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:28:11 UTC 2020

Modified Files:
src/sys/ddb [netbsd-9]: db_command.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #656):

sys/ddb/db_command.c: revision 1.162
sys/ddb/db_command.c: revision 1.163
sys/ddb/db_command.c: revision 1.164

db_command - make sure count is always initialized.
db_command - make setting have_addr more clear.
Don't set it to false that it's already initialized to.
db_command - don't hide local static variable in the middle of other
local variable definitions.  While here, get rid of the alignment of
variable names.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.160.4.1 src/sys/ddb/db_command.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/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.160 src/sys/ddb/db_command.c:1.160.4.1
--- src/sys/ddb/db_command.c:1.160	Mon Sep 17 01:49:54 2018
+++ src/sys/ddb/db_command.c	Sun Jan 26 11:28:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.160 2018/09/17 01:49:54 kre Exp $	*/
+/*	$NetBSD: db_command.c,v 1.160.4.1 2020/01/26 11:28:11 martin Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.160 2018/09/17 01:49:54 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.160.4.1 2020/01/26 11:28:11 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -820,16 +820,18 @@ db_read_command(void)
 static void
 db_command(const struct db_command **last_cmdp)
 {
-	const struct db_command *command;
 	static db_expr_t last_count = 0;
-	db_expr_t	addr, count;
-	char		modif[TOK_STRING_SIZE];
-	
-	int			t;
-	bool		have_addr = false;
+
+	int t;
+	const struct db_command *command;
+	db_expr_t addr, count;
+	bool have_addr;
+	char modif[TOK_STRING_SIZE];
 
 	command = NULL;
-	
+	have_addr = false;
+	count = -1;
+
 	t = db_read_token();
 	if ((t == tEOL) || (t == tCOMMA)) {
 		/*
@@ -850,7 +852,6 @@ db_command(const struct db_command **las
 			}
 		} else
 			count = last_count;
-		have_addr = false;
 		modif[0] = '\0';
 		db_skip_to_eol();
 
@@ -897,7 +898,6 @@ db_command(const struct db_command **las
 have_addr = true;
 			} else {
 addr = (db_expr_t) db_dot;
-have_addr = false;
 			}
 
 			t = db_read_token();
@@ -909,7 +909,6 @@ db_command(const struct db_command **las
 }
 			} else {
 db_unread_token(t);
-count = -1;
 			}
 			if ((command->flag & CS_MORE) == 0) {
 db_skip_to_eol();



CVS commit: [netbsd-9] src/sys/ddb

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:28:11 UTC 2020

Modified Files:
src/sys/ddb [netbsd-9]: db_command.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #656):

sys/ddb/db_command.c: revision 1.162
sys/ddb/db_command.c: revision 1.163
sys/ddb/db_command.c: revision 1.164

db_command - make sure count is always initialized.
db_command - make setting have_addr more clear.
Don't set it to false that it's already initialized to.
db_command - don't hide local static variable in the middle of other
local variable definitions.  While here, get rid of the alignment of
variable names.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.160.4.1 src/sys/ddb/db_command.c

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



CVS commit: [netbsd-9] src/sys/ddb

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:25:22 UTC 2020

Modified Files:
src/sys/ddb [netbsd-9]: db_input.c db_lex.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #655):

sys/ddb/db_input.c: revision 1.27
sys/ddb/db_lex.c: revision 1.23

Print db> prompt in db_read_line(), not db_readline().
The former is what DDB repl calls.  The latter performs the actual
input so let other code use it without the unwanted db> prompt.  It's
already used by ACPI (and AcpiOsWaitCommandReady supplies its own
prompt).  I also use it for my uncommitted Forth scripting for DDB.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.64.1 src/sys/ddb/db_input.c
cvs rdiff -u -r1.22 -r1.22.60.1 src/sys/ddb/db_lex.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/ddb/db_input.c
diff -u src/sys/ddb/db_input.c:1.26 src/sys/ddb/db_input.c:1.26.64.1
--- src/sys/ddb/db_input.c:1.26	Tue Aug 31 07:48:23 2010
+++ src/sys/ddb/db_input.c	Sun Jan 26 11:25:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_input.c,v 1.26 2010/08/31 07:48:23 enami Exp $	*/
+/*	$NetBSD: db_input.c,v 1.26.64.1 2020/01/26 11:25:22 martin Exp $	*/
 
 /*
  * Mach Operating System
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_input.c,v 1.26 2010/08/31 07:48:23 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_input.c,v 1.26.64.1 2020/01/26 11:25:22 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddbparam.h"
@@ -38,7 +38,6 @@ __KERNEL_RCSID(0, "$NetBSD: db_input.c,v
 
 #include 
 #include 
-#include 
 
 #include 
 
@@ -352,11 +351,6 @@ int
 db_readline(char *lstart, int lsize)
 {
 
-# ifdef MULTIPROCESSOR
-	db_printf("db{%ld}> ", (long)cpu_number());
-# else
-	db_printf("db> ");
-# endif
 	db_force_whitespace();	/* synch output position */
 
 	db_lbuf_start = lstart;

Index: src/sys/ddb/db_lex.c
diff -u src/sys/ddb/db_lex.c:1.22 src/sys/ddb/db_lex.c:1.22.60.1
--- src/sys/ddb/db_lex.c:1.22	Thu May 26 15:34:14 2011
+++ src/sys/ddb/db_lex.c	Sun Jan 26 11:25:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_lex.c,v 1.22 2011/05/26 15:34:14 joerg Exp $	*/
+/*	$NetBSD: db_lex.c,v 1.22.60.1 2020/01/26 11:25:22 martin Exp $	*/
 
 /*
  * Mach Operating System
@@ -34,10 +34,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.22 2011/05/26 15:34:14 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.22.60.1 2020/01/26 11:25:22 martin Exp $");
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -61,6 +62,11 @@ db_read_line(void)
 {
 	int	i;
 
+#ifdef MULTIPROCESSOR
+	db_printf("db{%ld}> ", (long)cpu_number());
+#else
+	db_printf("db> ");
+#endif
 	i = db_readline(db_line, sizeof(db_line));
 	if (i == 0)
 		return (0);	/* EOI */



CVS commit: [netbsd-9] src/sys/ddb

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:25:22 UTC 2020

Modified Files:
src/sys/ddb [netbsd-9]: db_input.c db_lex.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #655):

sys/ddb/db_input.c: revision 1.27
sys/ddb/db_lex.c: revision 1.23

Print db> prompt in db_read_line(), not db_readline().
The former is what DDB repl calls.  The latter performs the actual
input so let other code use it without the unwanted db> prompt.  It's
already used by ACPI (and AcpiOsWaitCommandReady supplies its own
prompt).  I also use it for my uncommitted Forth scripting for DDB.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.64.1 src/sys/ddb/db_input.c
cvs rdiff -u -r1.22 -r1.22.60.1 src/sys/ddb/db_lex.c

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



CVS commit: [netbsd-9] src/sys/ddb

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:23:41 UTC 2020

Modified Files:
src/sys/ddb [netbsd-9]: db_output.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #654):

sys/ddb/db_output.c: revision 1.35
sys/ddb/db_output.c: revision 1.36

db_putchar - check if we need to wrap at $maxwidth after whitespace.

That fixes orphaned first character in something like:
|Stopped in ... longsymbol+0xf00:  |
|i
|nsn

Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.4.1 src/sys/ddb/db_output.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/ddb/db_output.c
diff -u src/sys/ddb/db_output.c:1.34 src/sys/ddb/db_output.c:1.34.4.1
--- src/sys/ddb/db_output.c:1.34	Sun Sep 16 23:18:55 2018
+++ src/sys/ddb/db_output.c	Sun Jan 26 11:23:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_output.c,v 1.34 2018/09/16 23:18:55 mrg Exp $	*/
+/*	$NetBSD: db_output.c,v 1.34.4.1 2020/01/26 11:23:41 martin Exp $	*/
 
 /*
  * Mach Operating System
@@ -35,7 +35,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_output.c,v 1.34 2018/09/16 23:18:55 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_output.c,v 1.34.4.1 2020/01/26 11:23:41 martin Exp $");
 
 #include 
 #include 
@@ -103,6 +103,24 @@ db_force_whitespace(void)
 	db_last_non_space = db_output_position;
 }
 
+
+/*
+ * End the current line if it exceeds $maxwidth
+ */
+static void
+db_check_wrap(void)
+{
+
+	if (db_max_width >= DB_MIN_MAX_WIDTH
+	&& db_output_position >= db_max_width) {
+		cnputc('\n');
+		db_output_position = 0;
+		db_last_non_space = 0;
+		db_output_line++;
+	}
+}
+
+
 static void
 db_more(void)
 {
@@ -148,16 +166,10 @@ db_putchar(int c)
 		 * Use tabs if possible.
 		 */
 		db_force_whitespace();
+		db_check_wrap();
 		cnputc(c);
 		db_output_position++;
-		if (db_max_width >= DB_MIN_MAX_WIDTH
-		&& db_output_position >= db_max_width) {
-			/* auto new line */
-			cnputc('\n');
-			db_output_position = 0;
-			db_last_non_space = 0;
-			db_output_line++;
-		}
+		db_check_wrap();
 		db_last_non_space = db_output_position;
 	} else if (c == '\n') {
 		/* Return */



CVS commit: [netbsd-9] src/sys/ddb

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:23:41 UTC 2020

Modified Files:
src/sys/ddb [netbsd-9]: db_output.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #654):

sys/ddb/db_output.c: revision 1.35
sys/ddb/db_output.c: revision 1.36

db_putchar - check if we need to wrap at $maxwidth after whitespace.

That fixes orphaned first character in something like:
|Stopped in ... longsymbol+0xf00:  |
|i
|nsn

Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.4.1 src/sys/ddb/db_output.c

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



CVS commit: [netbsd-9] src/sys/stand/efiboot

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:21:59 UTC 2020

Modified Files:
src/sys/stand/efiboot [netbsd-9]: Makefile.efiboot boot.c efiacpi.c
exec.c prompt.c
src/sys/stand/efiboot/bootaa64 [netbsd-9]: Makefile
src/sys/stand/efiboot/bootarm [netbsd-9]: Makefile

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #653):

sys/stand/efiboot/prompt.c: revision 1.6
sys/stand/efiboot/boot.c: revision 1.20
sys/stand/efiboot/bootarm/Makefile: revision 1.4
sys/stand/efiboot/efiacpi.c: revision 1.6
sys/stand/efiboot/exec.c: revision 1.13
sys/stand/efiboot/Makefile.efiboot: revision 1.10
sys/stand/efiboot/bootaa64/Makefile: revision 1.7

Fix for disappearing counters on graphics consoles

Hide the twiddle while loading efiboot plist

Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.


To generate a diff of this commit:
cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/sys/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.18 -r1.18.4.1 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r1.3.6.2 -r1.3.6.3 src/sys/stand/efiboot/efiacpi.c
cvs rdiff -u -r1.11 -r1.11.2.1 src/sys/stand/efiboot/exec.c
cvs rdiff -u -r1.4 -r1.4.6.1 src/sys/stand/efiboot/prompt.c
cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/stand/efiboot/bootaa64/Makefile
cvs rdiff -u -r1.1 -r1.1.6.1 src/sys/stand/efiboot/bootarm/Makefile

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



CVS commit: [netbsd-9] src/sys/stand/efiboot

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:21:59 UTC 2020

Modified Files:
src/sys/stand/efiboot [netbsd-9]: Makefile.efiboot boot.c efiacpi.c
exec.c prompt.c
src/sys/stand/efiboot/bootaa64 [netbsd-9]: Makefile
src/sys/stand/efiboot/bootarm [netbsd-9]: Makefile

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #653):

sys/stand/efiboot/prompt.c: revision 1.6
sys/stand/efiboot/boot.c: revision 1.20
sys/stand/efiboot/bootarm/Makefile: revision 1.4
sys/stand/efiboot/efiacpi.c: revision 1.6
sys/stand/efiboot/exec.c: revision 1.13
sys/stand/efiboot/Makefile.efiboot: revision 1.10
sys/stand/efiboot/bootaa64/Makefile: revision 1.7

Fix for disappearing counters on graphics consoles

Hide the twiddle while loading efiboot plist

Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.


To generate a diff of this commit:
cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/sys/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.18 -r1.18.4.1 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r1.3.6.2 -r1.3.6.3 src/sys/stand/efiboot/efiacpi.c
cvs rdiff -u -r1.11 -r1.11.2.1 src/sys/stand/efiboot/exec.c
cvs rdiff -u -r1.4 -r1.4.6.1 src/sys/stand/efiboot/prompt.c
cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/stand/efiboot/bootaa64/Makefile
cvs rdiff -u -r1.1 -r1.1.6.1 src/sys/stand/efiboot/bootarm/Makefile

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

Modified files:

Index: src/sys/stand/efiboot/Makefile.efiboot
diff -u src/sys/stand/efiboot/Makefile.efiboot:1.8.2.1 src/sys/stand/efiboot/Makefile.efiboot:1.8.2.2
--- src/sys/stand/efiboot/Makefile.efiboot:1.8.2.1	Sun Dec  8 13:13:06 2019
+++ src/sys/stand/efiboot/Makefile.efiboot	Sun Jan 26 11:21:58 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.8.2.1 2019/12/08 13:13:06 martin Exp $
+# $NetBSD: Makefile.efiboot,v 1.8.2.2 2020/01/26 11:21:58 martin Exp $
 
 S=		${.CURDIR}/../../..
 
@@ -8,7 +8,7 @@ NOLIBCSANITIZER=# defined
 NOSANITIZER=	# defined
 NORELRO=	# defined
 PROG?=		boot.efi
-NEWVERSWHAT?=	"EFI Boot"
+NEWVERSWHAT?=	"efiboot"
 
 EFIDIR= ${S}/external/bsd/gnu-efi/dist
 GNUEFIARCH?= ${MACHINE_CPU}

Index: src/sys/stand/efiboot/boot.c
diff -u src/sys/stand/efiboot/boot.c:1.18 src/sys/stand/efiboot/boot.c:1.18.4.1
--- src/sys/stand/efiboot/boot.c:1.18	Sun Apr 21 22:30:41 2019
+++ src/sys/stand/efiboot/boot.c	Sun Jan 26 11:21:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.18 2019/04/21 22:30:41 thorpej Exp $	*/
+/*	$NetBSD: boot.c,v 1.18.4.1 2020/01/26 11:21:58 martin Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -112,6 +112,7 @@ const struct boot_command commands[] = {
 	{ "reboot",	command_reset,		"reboot|reset" },
 	{ "reset",	command_reset,		NULL },
 	{ "version",	command_version,	"version" },
+	{ "ver",	command_version,	NULL },
 	{ "help",	command_help,		"help|?" },
 	{ "?",		command_help,		NULL },
 	{ "quit",	command_quit,		"quit" },
@@ -262,12 +263,13 @@ command_version(char *arg)
 	char *ufirmware;
 	int rv;
 
-	printf("EFI version: %d.%02d\n",
+	printf("Version: %s (%s)\n", bootprog_rev, bootprog_kernrev);
+	printf("EFI: %d.%02d\n",
 	ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0x);
 	ufirmware = NULL;
 	rv = ucs2_to_utf8(ST->FirmwareVendor, );
 	if (rv == 0) {
-		printf("EFI Firmware: %s (rev 0x%x)\n", ufirmware,
+		printf("Firmware: %s (rev 0x%x)\n", ufirmware,
 		ST->FirmwareRevision);
 		FreePool(ufirmware);
 	}
@@ -369,8 +371,8 @@ void
 print_banner(void)
 {
 	printf("\n\n"
-	">> %s, Revision %s (from NetBSD %s)\n",
-	bootprog_name, bootprog_rev, bootprog_kernrev);
+	">> %s, Revision %s\n",
+	bootprog_name, bootprog_rev);
 }
 
 static void

Index: src/sys/stand/efiboot/efiacpi.c
diff -u src/sys/stand/efiboot/efiacpi.c:1.3.6.2 src/sys/stand/efiboot/efiacpi.c:1.3.6.3
--- src/sys/stand/efiboot/efiacpi.c:1.3.6.2	Sun Dec  8 13:13:06 2019
+++ src/sys/stand/efiboot/efiacpi.c	Sun Jan 26 11:21:58 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: efiacpi.c,v 1.3.6.2 2019/12/08 13:13:06 martin Exp $ */
+/* $NetBSD: efiacpi.c,v 1.3.6.3 2020/01/26 11:21:58 martin Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,6 +34,18 @@
 #include "efifdt.h"
 #include "smbios.h"
 
+struct acpi_rdsp {
+	char signature[8];
+	uint8_t checksum;
+	char oemid[6];
+	uint8_t revision;
+	uint32_t rsdtphys;
+	uint32_t length;
+	uint64_t xsdtphys;
+	uint8_t extcsum;
+	uint8_t reserved[3];
+};
+
 #include 
 
 #define	ACPI_FDT_SIZE	(128 * 1024)
@@ -66,18 +78,6 @@ efi_acpi_available(void)
 	return acpi_root != NULL;
 }
 
-void
-efi_acpi_show(void)
-{
-	if (!efi_acpi_available())
-		return;
-
-	printf("ACPI: RSDP %p", acpi_root);
-	if (smbios3_table)
-		printf(", SMBIOS %p", smbios3_table);
-	printf("\n");
-}
-
 static char model_buf[128];
 
 static const char *
@@ -111,6 +111,22 @@ efi_acpi_get_model(void)
 	

CVS commit: [netbsd-9] src

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:19:36 UTC 2020

Modified Files:
src/distrib/notes [netbsd-9]: Makefile.inc
src/distrib/notes/common [netbsd-9]: main
src/share/tmac [netbsd-9]: doc2html

Log Message:
Pull up following revision(s) (requested by uwe in ticket #652):

distrib/notes/Makefile.inc: revision 1.54
distrib/notes/common/main: revision 1.561
distrib/notes/common/main: revision 1.562
share/tmac/doc2html: revision 1.71

Use .Os NetBSD/\*M \*V to get more informative footer.

Provide ability to override 

If \*[title-section] is non-empty, use it to override the title
instead of appending it.  Nothing in the tree uses title-section
currently, so it shouldn't affect any existing document.

This override will be used by the installation notes where the default
title is less than helpful.

Override HTML  to something more informative.
Requested by martin@

Use -mdoc2html to generate HTML TOC to avoids warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.43.18.6 -r1.43.18.7 src/distrib/notes/Makefile.inc
cvs rdiff -u -r1.551.2.7 -r1.551.2.8 src/distrib/notes/common/main
cvs rdiff -u -r1.67.16.2 -r1.67.16.3 src/share/tmac/doc2html

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

Modified files:

Index: src/distrib/notes/Makefile.inc
diff -u src/distrib/notes/Makefile.inc:1.43.18.6 src/distrib/notes/Makefile.inc:1.43.18.7
--- src/distrib/notes/Makefile.inc:1.43.18.6	Wed Jan  8 07:53:30 2020
+++ src/distrib/notes/Makefile.inc	Sun Jan 26 11:19:36 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.43.18.6 2020/01/08 07:53:30 msaitoh Exp $
+#	$NetBSD: Makefile.inc,v 1.43.18.7 2020/01/26 11:19:36 martin Exp $
 #
 
 # Ross Harvey 
@@ -118,7 +118,7 @@ ${TARG}.ASCII.toc: ${SRCS}
 	mv -f $@.tmp $@
 
 ${TARG}.HTML.toc: ${SRCS}
-	${TOOL_GROFF} -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} > /dev/null
+	${TOOL_GROFF} -dTOC=1 ${ARGS_HTML} -mdoc2html ${MAIN} > /dev/null
 	mv -f $@.tmp $@
 
 ${TARG}.more.toc: ${SRCS}

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.551.2.7 src/distrib/notes/common/main:1.551.2.8
--- src/distrib/notes/common/main:1.551.2.7	Mon Dec  2 15:08:52 2019
+++ src/distrib/notes/common/main	Sun Jan 26 11:19:36 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.551.2.7 2019/12/02 15:08:52 martin Exp $
+.\"	$NetBSD: main,v 1.551.2.8 2020/01/26 11:19:36 martin Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -72,9 +72,11 @@
 .as MACHINE_LIST " sgimips shark sparc sparc64 sun2 sun3 vax x68k zaurus .
 .so \*[.CURDIR]/../common/macros
 .
+.\" Override  for HTML output
+.if rHTML .ds title-section Installation procedure for NetBSD/\*M \*V
 .Dd \*[cur_date]
 .Dt INSTALL 8
-.Os NetBSD
+.Os NetBSD/\*M \*V
 .Sh NAME
 .Nm INSTALL
 .Nd Installation procedure for

Index: src/share/tmac/doc2html
diff -u src/share/tmac/doc2html:1.67.16.2 src/share/tmac/doc2html:1.67.16.3
--- src/share/tmac/doc2html:1.67.16.2	Mon Dec  9 12:46:32 2019
+++ src/share/tmac/doc2html	Sun Jan 26 11:19:36 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: doc2html,v 1.67.16.2 2019/12/09 12:46:32 martin Exp $
+.\" $NetBSD: doc2html,v 1.67.16.3 2020/01/26 11:19:36 martin Exp $
 .\"
 .\" Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -275,8 +275,8 @@ TODO:
 
 	
 	
-		\\*[document-title]\\$*
-		\\*[title-section]
+.ie '\\*[title-section]'' \\*[document-title]\\$*
+.el  \\*[title-section]
 	
 	

CVS commit: [netbsd-9] src

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:19:36 UTC 2020

Modified Files:
src/distrib/notes [netbsd-9]: Makefile.inc
src/distrib/notes/common [netbsd-9]: main
src/share/tmac [netbsd-9]: doc2html

Log Message:
Pull up following revision(s) (requested by uwe in ticket #652):

distrib/notes/Makefile.inc: revision 1.54
distrib/notes/common/main: revision 1.561
distrib/notes/common/main: revision 1.562
share/tmac/doc2html: revision 1.71

Use .Os NetBSD/\*M \*V to get more informative footer.

Provide ability to override 

If \*[title-section] is non-empty, use it to override the title
instead of appending it.  Nothing in the tree uses title-section
currently, so it shouldn't affect any existing document.

This override will be used by the installation notes where the default
title is less than helpful.

Override HTML  to something more informative.
Requested by martin@

Use -mdoc2html to generate HTML TOC to avoids warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.43.18.6 -r1.43.18.7 src/distrib/notes/Makefile.inc
cvs rdiff -u -r1.551.2.7 -r1.551.2.8 src/distrib/notes/common/main
cvs rdiff -u -r1.67.16.2 -r1.67.16.3 src/share/tmac/doc2html

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



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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:17:12 UTC 2020

Modified Files:
src/sys/dev/pci [netbsd-9]: if_mcx.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #651):

sys/dev/pci/if_mcx.c: revision 1.8
sys/dev/pci/if_mcx.c: revision 1.9

- Change IFM_10G_T(10GBase-T) entry to IFM_10G_CR1(10GBASE-CR1)
- Add the following entries:
20GBASE-KR2
56GBASE-R4
100GBASE-LR4
100BaseTX
1000baseT
10GBase-T
Set if_baudrate.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/dev/pci/if_mcx.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_mcx.c
diff -u src/sys/dev/pci/if_mcx.c:1.1.2.6 src/sys/dev/pci/if_mcx.c:1.1.2.7
--- src/sys/dev/pci/if_mcx.c:1.1.2.6	Tue Nov 26 18:30:57 2019
+++ src/sys/dev/pci/if_mcx.c	Sun Jan 26 11:17:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mcx.c,v 1.1.2.6 2019/11/26 18:30:57 martin Exp $ */
+/*	$NetBSD: if_mcx.c,v 1.1.2.7 2020/01/26 11:17:11 martin Exp $ */
 /*	$OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
 
 /*
@@ -159,8 +159,10 @@
 #define MCX_ETHER_CAP_10G_CX4	(1 << 2)
 #define MCX_ETHER_CAP_10G_KX4	(1 << 3)
 #define MCX_ETHER_CAP_10G_KR	(1 << 4)
+#define MCX_ETHER_CAP_20G_KR2	(1 << 5)
 #define MCX_ETHER_CAP_40G_CR4	(1 << 6)
 #define MCX_ETHER_CAP_40G_KR4	(1 << 7)
+#define MCX_ETHER_CAP_56G_R4	(1 << 8)
 #define MCX_ETHER_CAP_10G_CR	(1 << 12)
 #define MCX_ETHER_CAP_10G_SR	(1 << 13)
 #define MCX_ETHER_CAP_10G_LR	(1 << 14)
@@ -170,6 +172,10 @@
 #define MCX_ETHER_CAP_100G_CR4	(1 << 20)
 #define MCX_ETHER_CAP_100G_SR4	(1 << 21)
 #define MCX_ETHER_CAP_100G_KR4	(1 << 22)
+#define MCX_ETHER_CAP_100G_LR4	(1 << 23)
+#define MCX_ETHER_CAP_100_TX	(1 << 24)
+#define MCX_ETHER_CAP_1000_T	(1 << 25)
+#define MCX_ETHER_CAP_10G_T	(1 << 26)
 #define MCX_ETHER_CAP_25G_CR	(1 << 27)
 #define MCX_ETHER_CAP_25G_KR	(1 << 28)
 #define MCX_ETHER_CAP_25G_SR	(1 << 29)
@@ -2146,14 +2152,14 @@ static const uint64_t mcx_eth_cap_map[] 
 	IFM_10G_CX4,
 	IFM_10G_KX4,
 	IFM_10G_KR,
-	0,
+	IFM_20G_KR2,
 	IFM_40G_CR4,
 	IFM_40G_KR4,
+	IFM_56G_R4,
 	0,
 	0,
 	0,
-	0,
-	IFM_10G_T,
+	IFM_10G_CR1,
 	IFM_10G_SR,
 	IFM_10G_LR,
 	IFM_40G_SR4,
@@ -2164,10 +2170,10 @@ static const uint64_t mcx_eth_cap_map[] 
 	IFM_100G_CR4,
 	IFM_100G_SR4,
 	IFM_100G_KR4,
-	0,
-	0,
-	0,
-	0,
+	IFM_100G_LR4,
+	IFM_100_TX,
+	IFM_1000_T,
+	IFM_10G_T,
 	IFM_25G_CR,
 	IFM_25G_KR,
 	IFM_25G_SR,
@@ -6647,6 +6653,7 @@ mcx_port_change(struct work *wk, void *x
 	struct ifnet *ifp = >sc_ec.ec_if;
 	struct mcx_reg_paos paos;
 	int link_state = LINK_STATE_DOWN;
+	struct ifmediareq ifmr;
 
 	memset(, 0, sizeof(paos));
 	paos.rp_local_port = 1;
@@ -6654,6 +6661,8 @@ mcx_port_change(struct work *wk, void *x
 	sizeof(paos)) == 0) {
 		if (paos.rp_oper_status == MCX_REG_PAOS_OPER_STATUS_UP)
 			link_state = LINK_STATE_UP;
+		mcx_media_status(ifp, );
+		ifp->if_baudrate = ifmedia_baudrate(ifmr.ifm_active);
 	}
 
 	if (link_state != ifp->if_link_state) {



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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:17:12 UTC 2020

Modified Files:
src/sys/dev/pci [netbsd-9]: if_mcx.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #651):

sys/dev/pci/if_mcx.c: revision 1.8
sys/dev/pci/if_mcx.c: revision 1.9

- Change IFM_10G_T(10GBase-T) entry to IFM_10G_CR1(10GBASE-CR1)
- Add the following entries:
20GBASE-KR2
56GBASE-R4
100GBASE-LR4
100BaseTX
1000baseT
10GBase-T
Set if_baudrate.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/dev/pci/if_mcx.c

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



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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:13:28 UTC 2020

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

Log Message:
Pull up the following (via patch), requested by msaitoh in ticket #650:

sys/dev/pci/if_wm.c 1.650, 1.652-1.654
sys/dev/pci/if_wmreg.h  1.116-1.117

- Set CTRL_ILOS(Invert loss of signal) bit correctly on 82580
  port 1, 2, 3 and newer chips. This change fixes a bug that some
  fiber, serdes or SFP devices don't detect the link status correctly.
- Simplify code by using "struct mii_data *mii" more. No functional
  change.
- MSI-X doesn't use sc->sc_icr variable, so move the code into
  non-MSI-X part. No functional change intended.
- Modify debug printfs a bit.
- Rename macro.
- Use __BIT()
- Fix comment. Add comment.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.645.2.3 -r1.645.2.4 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.115 -r1.115.2.1 src/sys/dev/pci/if_wmreg.h

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.645.2.3 src/sys/dev/pci/if_wm.c:1.645.2.4
--- src/sys/dev/pci/if_wm.c:1.645.2.3	Thu Jan 23 10:10:57 2020
+++ src/sys/dev/pci/if_wm.c	Sun Jan 26 11:13:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.645.2.3 2020/01/23 10:10:57 martin Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.645.2.4 2020/01/26 11:13:27 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.3 2020/01/23 10:10:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.4 2020/01/26 11:13:27 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2656,10 +2656,11 @@ alloc_retry:
 		}
 	}
 
-	/* XXX For other than 82580? */
-	if (sc->sc_type == WM_T_82580) {
-		wm_nvm_read(sc, NVM_OFF_CFG3_PORTA, 1, );
-		if (nvmword & __BIT(13))
+	if ((sc->sc_type >= WM_T_82580) && (sc->sc_type <= WM_T_I211)) {
+		wm_nvm_read(sc,
+		NVM_OFF_LAN_FUNC_82580(sc->sc_funcid) + NVM_OFF_CFG3_PORTA,
+		1, );
+		if (nvmword & NVM_CFG3_ILOS)
 			sc->sc_ctrl |= CTRL_ILOS;
 	}
 
@@ -6047,8 +6048,7 @@ wm_init_locked(struct ifnet *ifp)
 
 	/* Set up the interrupt registers. */
 	CSR_WRITE(sc, WMREG_IMC, 0xU);
-	sc->sc_icr = ICR_TXDW | ICR_LSC | ICR_RXSEQ | ICR_RXDMT0 |
-	ICR_RXO | ICR_RXT0;
+
 	if (wm_is_using_msix(sc)) {
 		uint32_t mask;
 		struct wm_queue *wmq;
@@ -6088,8 +6088,11 @@ wm_init_locked(struct ifnet *ifp)
 			CSR_WRITE(sc, WMREG_IMS, ICR_LSC);
 			break;
 		}
-	} else
+	} else {
+		sc->sc_icr = ICR_TXDW | ICR_LSC | ICR_RXSEQ | ICR_RXDMT0 |
+		ICR_RXO | ICR_RXT0;
 		CSR_WRITE(sc, WMREG_IMS, sc->sc_icr);
+	}
 
 	/* Set up the inter-packet gap. */
 	CSR_WRITE(sc, WMREG_TIPG, sc->sc_tipg);
@@ -9286,7 +9289,7 @@ wm_linkintr_serdes(struct wm_softc *sc, 
 {
 	struct ifnet *ifp = >sc_ethercom.ec_if;
 	struct mii_data *mii = >sc_mii;
-	struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur;
+	struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
 	uint32_t pcs_adv, pcs_lpab, reg;
 
 	DPRINTF(WM_DEBUG_LINK, ("%s: %s:\n", device_xname(sc->sc_dev),
@@ -9629,11 +9632,12 @@ wm_linkintr_msix(void *arg)
 	uint32_t reg;
 	bool has_rxo;
 
-	DPRINTF(WM_DEBUG_LINK,
-	("%s: LINK: got link intr\n", device_xname(sc->sc_dev)));
-
 	reg = CSR_READ(sc, WMREG_ICR);
 	WM_CORE_LOCK(sc);
+	DPRINTF(WM_DEBUG_LINK,
+	("%s: LINK: got link intr. ICR = %08x\n",
+		device_xname(sc->sc_dev), reg));
+
 	if (sc->sc_core_stopping)
 		goto out;
 
@@ -11411,7 +11415,7 @@ wm_gmii_statchg(struct ifnet *ifp)
 			sc->sc_ctrl |= CTRL_RFCE;
 	}
 
-	if (sc->sc_mii.mii_media_active & IFM_FDX) {
+	if (mii->mii_media_active & IFM_FDX) {
 		DPRINTF(WM_DEBUG_LINK,
 		("%s: LINK: statchg: FDX\n", ifp->if_xname));
 		sc->sc_tctl |= TCTL_COLD(TX_COLLISION_DISTANCE_FDX);
@@ -11426,7 +11430,7 @@ wm_gmii_statchg(struct ifnet *ifp)
 	CSR_WRITE(sc, (sc->sc_type < WM_T_82543) ? WMREG_OLD_FCRTL
 		 : WMREG_FCRTL, sc->sc_fcrtl);
 	if (sc->sc_type == WM_T_80003) {
-		switch (IFM_SUBTYPE(sc->sc_mii.mii_media_active)) {
+		switch (IFM_SUBTYPE(mii->mii_media_active)) {
 		case IFM_1000_T:
 			wm_kmrn_writereg(sc, KUMCTRLSTA_OFFSET_HD_CTRL,
 			KUMCTRLSTA_HD_CTRL_1000_DEFAULT);
@@ -12085,7 +12089,8 @@ wm_tbi_tick(struct wm_softc *sc)
 		if ((IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO)
 		&& (++sc->sc_tbi_serdes_ticks
 			>= sc->sc_tbi_serdes_anegticks)) {
-			DPRINTF(WM_DEBUG_LINK, ("EXPIRE\n"));
+			DPRINTF(WM_DEBUG_LINK, ("%s: %s: EXPIRE\n",
+device_xname(sc->sc_dev), __func__));
 			sc->sc_tbi_serdes_ticks = 0;
 			/*
 			 * Reset the link, and let autonegotiation do
@@ -12192,7 +12197,7 @@ wm_serdes_mediastatus(struct ifnet *ifp,
 {
 	struct wm_softc *sc = ifp->if_softc;
 	struct mii_data *mii = >sc_mii;
-	struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur;

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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:13:28 UTC 2020

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

Log Message:
Pull up the following (via patch), requested by msaitoh in ticket #650:

sys/dev/pci/if_wm.c 1.650, 1.652-1.654
sys/dev/pci/if_wmreg.h  1.116-1.117

- Set CTRL_ILOS(Invert loss of signal) bit correctly on 82580
  port 1, 2, 3 and newer chips. This change fixes a bug that some
  fiber, serdes or SFP devices don't detect the link status correctly.
- Simplify code by using "struct mii_data *mii" more. No functional
  change.
- MSI-X doesn't use sc->sc_icr variable, so move the code into
  non-MSI-X part. No functional change intended.
- Modify debug printfs a bit.
- Rename macro.
- Use __BIT()
- Fix comment. Add comment.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.645.2.3 -r1.645.2.4 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.115 -r1.115.2.1 src/sys/dev/pci/if_wmreg.h

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



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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:11:13 UTC 2020

Modified Files:
src/sys/dev/mii [netbsd-9]: ihphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #649):

sys/dev/mii/ihphy.c: revision 1.15

 Remove extra 10ms delay in ihphy_reset(). The delay are in if_wm.c side.
It's required for hardware full reset and it't not requred on soft reset.

 When ihphy.c was added in 9 years ago, some workaround code were not in
if_wm.c yet and the initialization code was not good.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.4.1 src/sys/dev/mii/ihphy.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/ihphy.c
diff -u src/sys/dev/mii/ihphy.c:1.14 src/sys/dev/mii/ihphy.c:1.14.4.1
--- src/sys/dev/mii/ihphy.c:1.14	Mon Mar 25 07:34:13 2019
+++ src/sys/dev/mii/ihphy.c	Sun Jan 26 11:11:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ihphy.c,v 1.14 2019/03/25 07:34:13 msaitoh Exp $	*/
+/*	$NetBSD: ihphy.c,v 1.14.4.1 2020/01/26 11:11:13 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.14 2019/03/25 07:34:13 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.14.4.1 2020/01/26 11:11:13 martin Exp $");
 
 #include 
 #include 
@@ -291,14 +291,6 @@ ihphy_reset(struct mii_softc *sc)
 
 	PHY_WRITE(sc, MII_BMCR, BMCR_RESET | BMCR_ISO);
 
-	/*
-	 * Regarding reset, the data sheet specifies (page 55):
-	 *
-	 * "After PHY reset, a delay of 10 ms is required before
-	 *  any register access using MDIO."
-	 */
-	delay(1);
-
 	/* Wait another 100ms for it to complete. */
 	for (i = 0; i < 100; i++) {
 		PHY_READ(sc, MII_BMCR, );



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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:11:13 UTC 2020

Modified Files:
src/sys/dev/mii [netbsd-9]: ihphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #649):

sys/dev/mii/ihphy.c: revision 1.15

 Remove extra 10ms delay in ihphy_reset(). The delay are in if_wm.c side.
It's required for hardware full reset and it't not requred on soft reset.

 When ihphy.c was added in 9 years ago, some workaround code were not in
if_wm.c yet and the initialization code was not good.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.4.1 src/sys/dev/mii/ihphy.c

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



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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:03:17 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: if_bypass.c ix_txrx.c ixgbe.c ixgbe.h
ixgbe_82598.c ixgbe_api.c ixgbe_common.c ixgbe_netbsd.c
ixgbe_osdep.c ixgbe_osdep.h ixgbe_phy.c ixv.c

Log Message:
Pull up the following (via patch), requested by msaitoh in ticket #648

sys/dev/pci/ixgbe/if_bypass.c   1.5
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.5
sys/dev/pci/ixgbe/ix_txrx.c 1.58-1.60
sys/dev/pci/ixgbe/ixgbe.c   1.220-1.221
sys/dev/pci/ixgbe/ixgbe.h   1.60-1.2
sys/dev/pci/ixgbe/ixgbe_api.c   1.24
sys/dev/pci/ixgbe/ixgbe_common.c1.26
sys/dev/pci/ixgbe/ixgbe_netbsd.c1.11-1.12
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.24
sys/dev/pci/ixgbe/ixgbe_phy.c   1.19
sys/dev/pci/ixgbe/ixgbe_82598.c 1.14
sys/dev/pci/ixgbe/ixv.c 1.142,1.144

- Free RX structure correctly when detaching.
- Remove unused code.
- Fix some typos in comment.
- Remove extra spaces.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.8.1 src/sys/dev/pci/ixgbe/if_bypass.c
cvs rdiff -u -r1.54.2.2 -r1.54.2.3 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.199.2.8 -r1.199.2.9 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.56.2.1 -r1.56.2.2 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.12 -r1.12.8.1 src/sys/dev/pci/ixgbe/ixgbe_82598.c
cvs rdiff -u -r1.23 -r1.23.2.1 src/sys/dev/pci/ixgbe/ixgbe_api.c
cvs rdiff -u -r1.25 -r1.25.2.1 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c
cvs rdiff -u -r1.4.8.1 -r1.4.8.2 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.23.6.1 -r1.23.6.2 src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.18 -r1.18.4.1 src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.125.2.8 -r1.125.2.9 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/if_bypass.c
diff -u src/sys/dev/pci/ixgbe/if_bypass.c:1.4 src/sys/dev/pci/ixgbe/if_bypass.c:1.4.8.1
--- src/sys/dev/pci/ixgbe/if_bypass.c:1.4	Wed Apr  4 08:13:07 2018
+++ src/sys/dev/pci/ixgbe/if_bypass.c	Sun Jan 26 11:03:17 2020
@@ -101,7 +101,7 @@ ixgbe_get_bypass_time(u32 *year, u32 *se
 	nanotime();
 	*sec = current.tv_sec;
 
-	while(*sec > SEC_THIS_YEAR(*year)) {
+	while (*sec > SEC_THIS_YEAR(*year)) {
 		*sec -= SEC_THIS_YEAR(*year);
 		(*year)++;
 	}

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.2 src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.3
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.2	Fri Nov  1 09:34:27 2019
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Sun Jan 26 11:03:17 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.54.2.2 2019/11/01 09:34:27 martin Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.54.2.3 2020/01/26 11:03:17 martin Exp $ */
 
 /**
 
@@ -148,7 +148,7 @@ ixgbe_legacy_start_locked(struct ifnet *
 		return (ENETDOWN);
 	if (txr->txr_no_space)
 		return (ENETDOWN);
-	
+
 	while (!IFQ_IS_EMPTY(>if_snd)) {
 		if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE)
 			break;
@@ -1693,6 +1693,10 @@ ixgbe_free_receive_buffers(struct rx_rin
 rxbuf->pmap = NULL;
 			}
 		}
+
+		/* NetBSD specific. See ixgbe_netbsd.c */
+		ixgbe_jcl_destroy(adapter, rxr);
+
 		if (rxr->rx_buffers != NULL) {
 			free(rxr->rx_buffers, M_DEVBUF);
 			rxr->rx_buffers = NULL;
@@ -2379,3 +2383,24 @@ tx_fail:
 fail:
 	return (error);
 } /* ixgbe_allocate_queues */
+
+/
+ * ixgbe_free_queues
+ *
+ *   Free descriptors for the transmit and receive rings, and then
+ *   the memory associated with each.
+ /
+void
+ixgbe_free_queues(struct adapter *adapter)
+{
+	struct ix_queue *que;
+	int i;
+
+	ixgbe_free_transmit_structures(adapter);
+	ixgbe_free_receive_structures(adapter);
+	for (i = 0; i < adapter->num_queues; i++) {
+		que = >queues[i];
+		mutex_destroy(>dc_mtx);
+	}
+	free(adapter->queues, M_DEVBUF);
+} /* ixgbe_free_queues */

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.8 src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.9
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.8	Tue Dec 24 17:44:22 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Sun Jan 26 11:03:17 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.199.2.8 2019/12/24 17:44:22 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199.2.9 2020/01/26 11:03:17 martin Exp $ */
 
 /**
 
@@ -353,7 +353,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix
  * Number of Queues, can be set to 0,
  * it then autoconfigures based on 

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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 11:03:17 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: if_bypass.c ix_txrx.c ixgbe.c ixgbe.h
ixgbe_82598.c ixgbe_api.c ixgbe_common.c ixgbe_netbsd.c
ixgbe_osdep.c ixgbe_osdep.h ixgbe_phy.c ixv.c

Log Message:
Pull up the following (via patch), requested by msaitoh in ticket #648

sys/dev/pci/ixgbe/if_bypass.c   1.5
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.5
sys/dev/pci/ixgbe/ix_txrx.c 1.58-1.60
sys/dev/pci/ixgbe/ixgbe.c   1.220-1.221
sys/dev/pci/ixgbe/ixgbe.h   1.60-1.2
sys/dev/pci/ixgbe/ixgbe_api.c   1.24
sys/dev/pci/ixgbe/ixgbe_common.c1.26
sys/dev/pci/ixgbe/ixgbe_netbsd.c1.11-1.12
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.24
sys/dev/pci/ixgbe/ixgbe_phy.c   1.19
sys/dev/pci/ixgbe/ixgbe_82598.c 1.14
sys/dev/pci/ixgbe/ixv.c 1.142,1.144

- Free RX structure correctly when detaching.
- Remove unused code.
- Fix some typos in comment.
- Remove extra spaces.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.8.1 src/sys/dev/pci/ixgbe/if_bypass.c
cvs rdiff -u -r1.54.2.2 -r1.54.2.3 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.199.2.8 -r1.199.2.9 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.56.2.1 -r1.56.2.2 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.12 -r1.12.8.1 src/sys/dev/pci/ixgbe/ixgbe_82598.c
cvs rdiff -u -r1.23 -r1.23.2.1 src/sys/dev/pci/ixgbe/ixgbe_api.c
cvs rdiff -u -r1.25 -r1.25.2.1 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c
cvs rdiff -u -r1.4.8.1 -r1.4.8.2 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.23.6.1 -r1.23.6.2 src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.18 -r1.18.4.1 src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.125.2.8 -r1.125.2.9 src/sys/dev/pci/ixgbe/ixv.c

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



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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 10:55:16 UTC 2020

Modified Files:
src/lib/libpthread [netbsd-9]: pthread.c pthread_cond.c pthread_int.h
pthread_misc.c pthread_mutex.c pthread_rwlock.c

Log Message:
Pull up following revision(s) (requested by ad in ticket #647):

lib/libpthread/pthread_rwlock.c: revision 1.37 (patch)
lib/libpthread/pthread_misc.c: revision 1.16
lib/libpthread/pthread.c: revision 1.154
lib/libpthread/pthread_int.h: revision 1.98
lib/libpthread/pthread_cond.c: revision 1.66
lib/libpthread/pthread_mutex.c: revision 1.66

Rip out some very ambitious optimisations around pthread_mutex that are
don't buy much.  This stuff is hard enough to get right in the kernel let
alone userspace, and I don't trust that it's right.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.153.2.1 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.65 -r1.65.6.1 src/lib/libpthread/pthread_cond.c
cvs rdiff -u -r1.95.2.1 -r1.95.2.2 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.15 -r1.15.32.1 src/lib/libpthread/pthread_misc.c
cvs rdiff -u -r1.65 -r1.65.2.1 src/lib/libpthread/pthread_mutex.c
cvs rdiff -u -r1.34 -r1.34.18.1 src/lib/libpthread/pthread_rwlock.c

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

Modified files:

Index: src/lib/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.153 src/lib/libpthread/pthread.c:1.153.2.1
--- src/lib/libpthread/pthread.c:1.153	Tue Mar  5 01:35:52 2019
+++ src/lib/libpthread/pthread.c	Sun Jan 26 10:55:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread.c,v 1.153 2019/03/05 01:35:52 christos Exp $	*/
+/*	$NetBSD: pthread.c,v 1.153.2.1 2020/01/26 10:55:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: pthread.c,v 1.153 2019/03/05 01:35:52 christos Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.153.2.1 2020/01/26 10:55:16 martin Exp $");
 
 #define	__EXPOSE_STACK	1
 
@@ -319,7 +319,6 @@ pthread__initthread(pthread_t t)
 	t->pt_havespecific = 0;
 	t->pt_early = NULL;
 	t->pt_lwpctl = __dummy_lwpctl;
-	t->pt_blocking = 0;
 	t->pt_droplock = NULL;
 
 	memcpy(>pt_lockops, pthread__lock_ops, sizeof(t->pt_lockops));
@@ -1157,15 +1156,9 @@ pthread__park(pthread_t self, pthread_mu
 	int rv, error;
 	void *obj;
 
-	/*
-	 * For non-interlocked release of mutexes we need a store
-	 * barrier before incrementing pt_blocking away from zero. 
-	 * This is provided by pthread_mutex_unlock().
-	 */
 	self->pt_willpark = 1;
 	pthread_mutex_unlock(lock);
 	self->pt_willpark = 0;
-	self->pt_blocking++;
 
 	/*
 	 * Wait until we are awoken by a pending unpark operation,
@@ -1239,8 +1232,6 @@ pthread__park(pthread_t self, pthread_mu
 		pthread_mutex_unlock(lock);
 	}
 	self->pt_early = NULL;
-	self->pt_blocking--;
-	membar_sync();
 
 	return rv;
 }

Index: src/lib/libpthread/pthread_cond.c
diff -u src/lib/libpthread/pthread_cond.c:1.65 src/lib/libpthread/pthread_cond.c:1.65.6.1
--- src/lib/libpthread/pthread_cond.c:1.65	Fri Dec  8 03:08:19 2017
+++ src/lib/libpthread/pthread_cond.c	Sun Jan 26 10:55:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_cond.c,v 1.65 2017/12/08 03:08:19 christos Exp $	*/
+/*	$NetBSD: pthread_cond.c,v 1.65.6.1 2020/01/26 10:55:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: pthread_cond.c,v 1.65 2017/12/08 03:08:19 christos Exp $");
+__RCSID("$NetBSD: pthread_cond.c,v 1.65.6.1 2020/01/26 10:55:16 martin Exp $");
 
 #include 
 #include 
@@ -164,7 +164,6 @@ pthread_cond_timedwait(pthread_cond_t *c
 		self->pt_willpark = 1;
 		pthread_mutex_unlock(mutex);
 		self->pt_willpark = 0;
-		self->pt_blocking++;
 		do {
 			retval = _lwp_park(clkid, TIMER_ABSTIME,
 			__UNCONST(abstime), self->pt_unpark,
@@ -172,8 +171,6 @@ pthread_cond_timedwait(pthread_cond_t *c
 			__UNVOLATILE(>ptm_waiters));
 			self->pt_unpark = 0;
 		} while (retval == -1 && errno == ESRCH);
-		self->pt_blocking--;
-		membar_sync();
 		pthread_mutex_lock(mutex);
 
 		/*

Index: src/lib/libpthread/pthread_int.h
diff -u src/lib/libpthread/pthread_int.h:1.95.2.1 src/lib/libpthread/pthread_int.h:1.95.2.2
--- src/lib/libpthread/pthread_int.h:1.95.2.1	Wed Dec 18 20:18:20 2019
+++ src/lib/libpthread/pthread_int.h	Sun Jan 26 10:55:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_int.h,v 1.95.2.1 2019/12/18 20:18:20 martin Exp $	*/
+/*	$NetBSD: pthread_int.h,v 1.95.2.2 2020/01/26 10:55:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -131,7 +131,6 @@ struct	__pthread_st {
 	 */
 	int		pt_dummy1 __aligned(128);
 	struct lwpctl 	*pt_lwpctl;	/* Kernel/user comms area */
-	volatile int	pt_blocking;	/* Blocking in userspace */
 	volatile int	pt_rwlocked;	/* Handed rwlock successfully */

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

2020-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 26 10:55:16 UTC 2020

Modified Files:
src/lib/libpthread [netbsd-9]: pthread.c pthread_cond.c pthread_int.h
pthread_misc.c pthread_mutex.c pthread_rwlock.c

Log Message:
Pull up following revision(s) (requested by ad in ticket #647):

lib/libpthread/pthread_rwlock.c: revision 1.37 (patch)
lib/libpthread/pthread_misc.c: revision 1.16
lib/libpthread/pthread.c: revision 1.154
lib/libpthread/pthread_int.h: revision 1.98
lib/libpthread/pthread_cond.c: revision 1.66
lib/libpthread/pthread_mutex.c: revision 1.66

Rip out some very ambitious optimisations around pthread_mutex that are
don't buy much.  This stuff is hard enough to get right in the kernel let
alone userspace, and I don't trust that it's right.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.153.2.1 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.65 -r1.65.6.1 src/lib/libpthread/pthread_cond.c
cvs rdiff -u -r1.95.2.1 -r1.95.2.2 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.15 -r1.15.32.1 src/lib/libpthread/pthread_misc.c
cvs rdiff -u -r1.65 -r1.65.2.1 src/lib/libpthread/pthread_mutex.c
cvs rdiff -u -r1.34 -r1.34.18.1 src/lib/libpthread/pthread_rwlock.c

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



CVS commit: src/sys/lib/libsa

2020-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 26 10:13:10 UTC 2020

Modified Files:
src/sys/lib/libsa: nfs.c

Log Message:
Make a debug printf compile for all platforms


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/lib/libsa/nfs.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/lib/libsa/nfs.c
diff -u src/sys/lib/libsa/nfs.c:1.49 src/sys/lib/libsa/nfs.c:1.50
--- src/sys/lib/libsa/nfs.c:1.49	Sun Mar 31 20:08:45 2019
+++ src/sys/lib/libsa/nfs.c	Sun Jan 26 10:13:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs.c,v 1.49 2019/03/31 20:08:45 christos Exp $	*/
+/*	$NetBSD: nfs.c,v 1.50 2020/01/26 10:13:10 skrll Exp $	*/
 
 /*-
  *  Copyright (c) 1993 John Brezak
@@ -566,7 +566,7 @@ nfs_read(struct open_file *f, void *buf,
 
 #ifdef NFS_DEBUG
 	if (debug)
-		printf("%s: size=%zu off=%td\n", __func__, size, fp->off);
+		printf("%s: size=%zu off=%" PRIx64 "\n", __func__, size, fp->off);
 #endif
 	while ((int)size > 0) {
 #if !defined(LIBSA_NO_TWIDDLE)



CVS commit: src/sys/arch/ia64/stand/efi/libefi

2020-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 26 10:12:29 UTC 2020

Modified Files:
src/sys/arch/ia64/stand/efi/libefi: efiboot.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/efi/libefi/efiboot.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/ia64/stand/efi/libefi/efiboot.h
diff -u src/sys/arch/ia64/stand/efi/libefi/efiboot.h:1.3 src/sys/arch/ia64/stand/efi/libefi/efiboot.h:1.4
--- src/sys/arch/ia64/stand/efi/libefi/efiboot.h:1.3	Thu Aug  4 16:22:40 2016
+++ src/sys/arch/ia64/stand/efi/libefi/efiboot.h	Sun Jan 26 10:12:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: efiboot.h,v 1.3 2016/08/04 16:22:40 scole Exp $	*/
+/*	$NetBSD: efiboot.h,v 1.4 2020/01/26 10:12:29 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1996
@@ -65,7 +65,7 @@ typedef unsigned long physaddr_t;
 
 /* exported devices XXX rename? */
 extern struct devsw devsw[];
-extern struct netif_driver efi_net; 
+extern struct netif_driver efi_net;
 
 /* Find EFI network resources */
 extern void efinet_init_driver(void);



CVS commit: src/sys/lib/libsa

2020-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 26 10:13:10 UTC 2020

Modified Files:
src/sys/lib/libsa: nfs.c

Log Message:
Make a debug printf compile for all platforms


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/lib/libsa/nfs.c

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



CVS commit: src/sys/arch/ia64/stand/efi/libefi

2020-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 26 10:12:29 UTC 2020

Modified Files:
src/sys/arch/ia64/stand/efi/libefi: efiboot.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/efi/libefi/efiboot.h

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