CVS commit: src/sys/dev/pci

2019-11-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 21 06:22:09 UTC 2019

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

Log Message:
 Fix multicast handling. All Atheros controllers use big-endian form
when computing multicast hash. Same as OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/if_age.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/pci

2019-11-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 21 06:22:09 UTC 2019

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

Log Message:
 Fix multicast handling. All Atheros controllers use big-endian form
when computing multicast hash. Same as OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/if_age.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_age.c
diff -u src/sys/dev/pci/if_age.c:1.62 src/sys/dev/pci/if_age.c:1.63
--- src/sys/dev/pci/if_age.c:1.62	Wed Oct 30 07:26:28 2019
+++ src/sys/dev/pci/if_age.c	Thu Nov 21 06:22:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_age.c,v 1.62 2019/10/30 07:26:28 msaitoh Exp $ */
+/*	$NetBSD: if_age.c,v 1.63 2019/11/21 06:22:09 msaitoh Exp $ */
 /*	$OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $	*/
 
 /*-
@@ -31,7 +31,7 @@
 /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.62 2019/10/30 07:26:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.63 2019/11/21 06:22:09 msaitoh Exp $");
 
 #include "vlan.h"
 
@@ -2289,7 +2289,7 @@ age_rxfilter(struct age_softc *sc)
 		ETHER_LOCK(ec);
 		ETHER_FIRST_MULTI(step, ec, enm);
 		while (enm != NULL) {
-			crc = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN);
+			crc = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN);
 			mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f);
 			ETHER_NEXT_MULTI(step, enm);
 		}



CVS commit: src/sys/lib/libsa

2019-11-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 21 07:34:39 UTC 2019

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

Log Message:
from the new comment:

 * XXX Hack alert.  GCC 8.3 mis-compiles this function and calls
 * strncmp() with the wrong second pointer, as seen in PR#54703.
 *
 * Until the real cause is located, work around it by using -O1
 * for this function.

this hack is restricted to i386.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/lib/libsa/ustarfs.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/ustarfs.c
diff -u src/sys/lib/libsa/ustarfs.c:1.35 src/sys/lib/libsa/ustarfs.c:1.36
--- src/sys/lib/libsa/ustarfs.c:1.35	Thu Mar 20 03:13:18 2014
+++ src/sys/lib/libsa/ustarfs.c	Thu Nov 21 07:34:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ustarfs.c,v 1.35 2014/03/20 03:13:18 christos Exp $	*/
+/*	$NetBSD: ustarfs.c,v 1.36 2019/11/21 07:34:39 mrg Exp $	*/
 
 /* [Notice revision 2.2]
  * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -381,6 +381,16 @@ init_volzero_sig(struct open_file *f)
 	return 0;
 }
 
+/*
+ * XXX Hack alert.  GCC 8.3 mis-compiles this function and calls
+ * strncmp() with the wrong second pointer, as seen in PR#54703.
+ *
+ * Until the real cause is located, work around it by using -O1
+ * for this function.
+ */
+#ifdef __i386__
+__attribute__((__optimize__("O1")))
+#endif
 __compactcall int
 ustarfs_open(const char *path, struct open_file *f)
 {



CVS commit: src/sys/lib/libsa

2019-11-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 21 07:34:39 UTC 2019

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

Log Message:
from the new comment:

 * XXX Hack alert.  GCC 8.3 mis-compiles this function and calls
 * strncmp() with the wrong second pointer, as seen in PR#54703.
 *
 * Until the real cause is located, work around it by using -O1
 * for this function.

this hack is restricted to i386.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/lib/libsa/ustarfs.c

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



CVS commit: src/share/mk

2019-11-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 21 07:56:58 UTC 2019

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

Log Message:
switch riscv32/64 to GCC 8.


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

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1165 src/share/mk/bsd.own.mk:1.1166
--- src/share/mk/bsd.own.mk:1.1165	Mon Nov 18 15:38:07 2019
+++ src/share/mk/bsd.own.mk	Thu Nov 21 07:56:58 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1165 2019/11/18 15:38:07 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1166 2019/11/21 07:56:58 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -70,7 +70,8 @@ TOOLCHAIN_MISSING?=	no
 ${MACHINE} == "sparc" || \
 ${MACHINE} == "sparc64" || \
 ${MACHINE_CPU} == "aarch64" || \
-${MACHINE_CPU} == "arm"
+${MACHINE_CPU} == "arm" || \
+${MACHINE_CPU} == "riscv"
 HAVE_GCC?=	8
 .else
 HAVE_GCC?=	7



CVS commit: src/share/mk

2019-11-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Nov 21 07:56:58 UTC 2019

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

Log Message:
switch riscv32/64 to GCC 8.


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

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



CVS commit: src/sys/arch/amd64/amd64

2019-11-20 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Nov 20 10:57:08 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64: netbsd32_machdep.c

Log Message:
Fix netbsd32_process_write_dbregs() for amd64:

- Zero-clear regs64 so that random values are not written into the
  preserved registers.
- Cast 32-bit registers (int) to u_int, in order to avoid undesired
  sign extension when filled into 64-bit registers (long).

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/amd64/amd64/netbsd32_machdep.c

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



CVS commit: src/sys/net

2019-11-20 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Wed Nov 20 08:17:02 UTC 2019

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

Log Message:
"rss_symmetric_key" iniitalizer is too short. Pointed out by ryo@n.o, thanks.

It is not used yet.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/net/rss_config.c

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

Modified files:

Index: src/sys/net/rss_config.c
diff -u src/sys/net/rss_config.c:1.1 src/sys/net/rss_config.c:1.2
--- src/sys/net/rss_config.c:1.1	Fri Feb 16 04:48:32 2018
+++ src/sys/net/rss_config.c	Wed Nov 20 08:17:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rss_config.c,v 1.1 2018/02/16 04:48:32 knakahara Exp $  */
+/*	$NetBSD: rss_config.c,v 1.2 2019/11/20 08:17:01 knakahara Exp $  */
 
 /*
  * Copyright (c) 2018 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rss_config.c,v 1.1 2018/02/16 04:48:32 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rss_config.c,v 1.2 2019/11/20 08:17:01 knakahara Exp $");
 
 #include 
 #include 
@@ -62,6 +62,7 @@ static uint8_t rss_symmetric_key[RSS_KEY
 	0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a,
 	0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a,
 	0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a,
+	0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a,
 };
 #endif
 



CVS commit: src/sys/dev/nvmm/x86

2019-11-20 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Nov 20 10:26:56 UTC 2019

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_svm.c nvmm_x86_vmx.c

Log Message:
Hide XSAVES-specific stuff and the masked extended states.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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/nvmm/x86/nvmm_x86_svm.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.53 src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.54
--- src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.53	Mon Oct 28 08:30:49 2019
+++ src/sys/dev/nvmm/x86/nvmm_x86_svm.c	Wed Nov 20 10:26:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86_svm.c,v 1.53 2019/10/28 08:30:49 maxv Exp $	*/
+/*	$NetBSD: nvmm_x86_svm.c,v 1.54 2019/11/20 10:26:56 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.53 2019/10/28 08:30:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.54 2019/11/20 10:26:56 maxv Exp $");
 
 #include 
 #include 
@@ -826,7 +826,18 @@ svm_inkernel_handle_cpuid(struct nvmm_cp
 			cpudata->gprs[NVMM_X64_GPR_RDX] = svm_xcr0_mask >> 32;
 			break;
 		case 1:
-			cpudata->vmcb->state.rax &= ~CPUID_PES1_XSAVES;
+			cpudata->vmcb->state.rax &=
+			(CPUID_PES1_XSAVEOPT | CPUID_PES1_XSAVEC |
+			 CPUID_PES1_XGETBV);
+			cpudata->gprs[NVMM_X64_GPR_RBX] = 0;
+			cpudata->gprs[NVMM_X64_GPR_RCX] = 0;
+			cpudata->gprs[NVMM_X64_GPR_RDX] = 0;
+			break;
+		default:
+			cpudata->vmcb->state.rax = 0;
+			cpudata->gprs[NVMM_X64_GPR_RBX] = 0;
+			cpudata->gprs[NVMM_X64_GPR_RCX] = 0;
+			cpudata->gprs[NVMM_X64_GPR_RDX] = 0;
 			break;
 		}
 		break;

Index: src/sys/dev/nvmm/x86/nvmm_x86_vmx.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.44 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.45
--- src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.44	Mon Oct 28 08:30:49 2019
+++ src/sys/dev/nvmm/x86/nvmm_x86_vmx.c	Wed Nov 20 10:26:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86_vmx.c,v 1.44 2019/10/28 08:30:49 maxv Exp $	*/
+/*	$NetBSD: nvmm_x86_vmx.c,v 1.45 2019/11/20 10:26:56 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.44 2019/10/28 08:30:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.45 2019/11/20 10:26:56 maxv Exp $");
 
 #include 
 #include 
@@ -1201,7 +1201,18 @@ vmx_inkernel_handle_cpuid(struct nvmm_cp
 			cpudata->gprs[NVMM_X64_GPR_RDX] = vmx_xcr0_mask >> 32;
 			break;
 		case 1:
-			cpudata->gprs[NVMM_X64_GPR_RAX] &= ~CPUID_PES1_XSAVES;
+			cpudata->gprs[NVMM_X64_GPR_RAX] &=
+			(CPUID_PES1_XSAVEOPT | CPUID_PES1_XSAVEC |
+			 CPUID_PES1_XGETBV);
+			cpudata->gprs[NVMM_X64_GPR_RBX] = 0;
+			cpudata->gprs[NVMM_X64_GPR_RCX] = 0;
+			cpudata->gprs[NVMM_X64_GPR_RDX] = 0;
+			break;
+		default:
+			cpudata->gprs[NVMM_X64_GPR_RAX] = 0;
+			cpudata->gprs[NVMM_X64_GPR_RBX] = 0;
+			cpudata->gprs[NVMM_X64_GPR_RCX] = 0;
+			cpudata->gprs[NVMM_X64_GPR_RDX] = 0;
 			break;
 		}
 		break;



CVS commit: src/sys/dev/nvmm/x86

2019-11-20 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Nov 20 10:26:56 UTC 2019

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_svm.c nvmm_x86_vmx.c

Log Message:
Hide XSAVES-specific stuff and the masked extended states.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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/mii

2019-11-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Nov 20 08:51:00 UTC 2019

Modified Files:
src/sys/dev/mii: atphy.c mii_physubr.c miivar.h

Log Message:
 Fix a bug that atphy(4) can't negotiate correctly when the media setting is
neither auto nor 1000baseT. Use correct index for mii_media_table[].

 History: mii_anar() is first added in OpenBSD and ported to NetBSD. On NetBSD,
only atphy(4) use this function. mii_physubr.c rev. 1.75 changed mii_anar()
for simplify. It changed the argument from the ifmedia word to ifm_data used
in our MII API, but the caller have not been changed. And then, PR kern/50206
was reported and the caller was modified by me to prevent panic but it was not
correct fix.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/mii/miivar.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/mii

2019-11-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Nov 20 08:51:00 UTC 2019

Modified Files:
src/sys/dev/mii: atphy.c mii_physubr.c miivar.h

Log Message:
 Fix a bug that atphy(4) can't negotiate correctly when the media setting is
neither auto nor 1000baseT. Use correct index for mii_media_table[].

 History: mii_anar() is first added in OpenBSD and ported to NetBSD. On NetBSD,
only atphy(4) use this function. mii_physubr.c rev. 1.75 changed mii_anar()
for simplify. It changed the argument from the ifmedia word to ifm_data used
in our MII API, but the caller have not been changed. And then, PR kern/50206
was reported and the caller was modified by me to prevent panic but it was not
correct fix.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/mii/miivar.h

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

Modified files:

Index: src/sys/dev/mii/atphy.c
diff -u src/sys/dev/mii/atphy.c:1.24 src/sys/dev/mii/atphy.c:1.25
--- src/sys/dev/mii/atphy.c:1.24	Fri Oct 18 12:53:08 2019
+++ src/sys/dev/mii/atphy.c	Wed Nov 20 08:50:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.24 2019/10/18 12:53:08 hkenken Exp $ */
+/*	$NetBSD: atphy.c,v 1.25 2019/11/20 08:50:59 msaitoh Exp $ */
 /*	$OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.24 2019/10/18 12:53:08 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.25 2019/11/20 08:50:59 msaitoh Exp $");
 
 #include 
 #include 
@@ -273,7 +273,7 @@ atphy_service(struct mii_softc *sc, stru
 			return EINVAL;
 		}
 
-		anar = mii_anar(IFM_SUBTYPE(ife->ifm_media));
+		anar = mii_anar(ife);
 		if ((ife->ifm_media & IFM_FDX) != 0) {
 			bmcr |= BMCR_FDX;
 			/* Enable pause. */

Index: src/sys/dev/mii/mii_physubr.c
diff -u src/sys/dev/mii/mii_physubr.c:1.87 src/sys/dev/mii/mii_physubr.c:1.88
--- src/sys/dev/mii/mii_physubr.c:1.87	Tue Apr  9 11:28:45 2019
+++ src/sys/dev/mii/mii_physubr.c	Wed Nov 20 08:50:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii_physubr.c,v 1.87 2019/04/09 11:28:45 msaitoh Exp $	*/
+/*	$NetBSD: mii_physubr.c,v 1.88 2019/11/20 08:50:59 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.87 2019/04/09 11:28:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.88 2019/11/20 08:50:59 msaitoh Exp $");
 
 #include 
 #include 
@@ -697,19 +697,16 @@ mii_phy_resume(device_t dv, const pmf_qu
 
 
 /*
- * Given an ifmedia word, return the corresponding ANAR value.
+ * Given an ifmedia_entry, return the corresponding ANAR value.
  */
 uint16_t
-mii_anar(int media)
+mii_anar(struct ifmedia_entry *ife)
 {
-	int rv;
 
 #ifdef DIAGNOSTIC
-	if (/* media < 0 || */ media >= MII_NMEDIA)
+	if (ife->ifm_data >= MII_NMEDIA)
 		panic("mii_anar");
 #endif
 
-	rv = mii_media_table[media].mm_anar;
-
-	return rv;
+	return mii_media_table[ife->ifm_data].mm_anar;
 }

Index: src/sys/dev/mii/miivar.h
diff -u src/sys/dev/mii/miivar.h:1.68 src/sys/dev/mii/miivar.h:1.69
--- src/sys/dev/mii/miivar.h:1.68	Thu Apr 11 09:14:07 2019
+++ src/sys/dev/mii/miivar.h	Wed Nov 20 08:50:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: miivar.h,v 1.68 2019/04/11 09:14:07 msaitoh Exp $	*/
+/*	$NetBSD: miivar.h,v 1.69 2019/11/20 08:50:59 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -287,7 +287,7 @@ int	mii_mediachg(struct mii_data *);
 void	mii_tick(struct mii_data *);
 void	mii_pollstat(struct mii_data *);
 void	mii_down(struct mii_data *);
-uint16_t mii_anar(int);
+uint16_t mii_anar(struct ifmedia_entry *);
 
 int	mii_ifmedia_change(struct mii_data *);
 



CVS commit: src

2019-11-20 Thread Hikaru Abe
Module Name:src
Committed By:   hikaru
Date:   Wed Nov 20 09:37:46 UTC 2019

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/man: mi
src/doc: CHANGES
src/etc/mtree: NetBSD.dist.base
src/share/man/man4: Makefile
src/sys/arch/amd64/conf: ALL GENERIC
src/sys/dev/microcode: Makefile
src/sys/dev/pci: files.pci
Added Files:
src/share/man/man4: qat.4
src/sys/dev/microcode/qat: Makefile mmp_firmware_c2xxx.bin
mof_firmware_c2xxx.bin qat-license qat_c3xxx.bin qat_c3xxx_mmp.bin
qat_c62x.bin qat_c62x_mmp.bin qat_d15xx.bin qat_d15xx_mmp.bin
src/sys/dev/pci/qat: qat.c qat_ae.c qat_aevar.h qat_c2xxx.c
qat_c2xxxreg.h qat_c3xxx.c qat_c3xxxreg.h qat_c62x.c qat_c62xreg.h
qat_d15xx.c qat_d15xxreg.h qat_hw15.c qat_hw15reg.h qat_hw15var.h
qat_hw17.c qat_hw17reg.h qat_hw17var.h qatreg.h qatvar.h

Log Message:
Add opencrypto driver for Intel QuickAssist.


To generate a diff of this commit:
cvs rdiff -u -r1.1220 -r1.1221 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1662 -r1.1663 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.2614 -r1.2615 src/doc/CHANGES
cvs rdiff -u -r1.204 -r1.205 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.688 -r1.689 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/qat.4
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.546 -r1.547 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/microcode/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/dev/microcode/qat/Makefile \
src/sys/dev/microcode/qat/mmp_firmware_c2xxx.bin \
src/sys/dev/microcode/qat/mof_firmware_c2xxx.bin \
src/sys/dev/microcode/qat/qat-license \
src/sys/dev/microcode/qat/qat_c3xxx.bin \
src/sys/dev/microcode/qat/qat_c3xxx_mmp.bin \
src/sys/dev/microcode/qat/qat_c62x.bin \
src/sys/dev/microcode/qat/qat_c62x_mmp.bin \
src/sys/dev/microcode/qat/qat_d15xx.bin \
src/sys/dev/microcode/qat/qat_d15xx_mmp.bin
cvs rdiff -u -r1.415 -r1.416 src/sys/dev/pci/files.pci
cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/qat/qat.c src/sys/dev/pci/qat/qat_ae.c \
src/sys/dev/pci/qat/qat_aevar.h src/sys/dev/pci/qat/qat_c2xxx.c \
src/sys/dev/pci/qat/qat_c2xxxreg.h src/sys/dev/pci/qat/qat_c3xxx.c \
src/sys/dev/pci/qat/qat_c3xxxreg.h src/sys/dev/pci/qat/qat_c62x.c \
src/sys/dev/pci/qat/qat_c62xreg.h src/sys/dev/pci/qat/qat_d15xx.c \
src/sys/dev/pci/qat/qat_d15xxreg.h src/sys/dev/pci/qat/qat_hw15.c \
src/sys/dev/pci/qat/qat_hw15reg.h src/sys/dev/pci/qat/qat_hw15var.h \
src/sys/dev/pci/qat/qat_hw17.c src/sys/dev/pci/qat/qat_hw17reg.h \
src/sys/dev/pci/qat/qat_hw17var.h src/sys/dev/pci/qat/qatreg.h \
src/sys/dev/pci/qat/qatvar.h

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



CVS commit: src/sys/net

2019-11-20 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Wed Nov 20 08:17:02 UTC 2019

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

Log Message:
"rss_symmetric_key" iniitalizer is too short. Pointed out by ryo@n.o, thanks.

It is not used yet.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/net/rss_config.c

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



CVS commit: src/sys

2019-11-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 20 19:37:54 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: core_machdep.c netbsd32_machdep.c
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/alpha/alpha: core_machdep.c
src/sys/arch/amd64/amd64: netbsd32_machdep.c
src/sys/arch/arm/arm: core_machdep.c
src/sys/arch/arm/conf: files.arm
src/sys/arch/hppa/hppa: core_machdep.c
src/sys/arch/ia64/conf: files.ia64
src/sys/arch/m68k/m68k: core_machdep.c
src/sys/arch/mips/mips: core_machdep.c netbsd32_machdep.c vm_machdep.c
src/sys/arch/powerpc/powerpc: core_machdep.c
src/sys/arch/riscv/conf: files.riscv
src/sys/arch/riscv/riscv: core_machdep.c
src/sys/arch/sh3/sh3: coff_exec.c core_machdep.c process_machdep.c
src/sys/arch/sparc/sparc: core_machdep.c
src/sys/arch/sparc64/sparc64: core_machdep.c netbsd32_machdep.c
src/sys/arch/vax/vax: core_machdep.c
src/sys/arch/x86/x86: core_machdep.c
src/sys/compat/m68k4k: m68k4k_exec.c
src/sys/compat/netbsd32: netbsd32_core.c netbsd32_mod.c
src/sys/compat/vax1k: vax1k_exec.c
src/sys/kern: compat_stub.c core_elf32.c core_netbsd.c exec_aout.c
exec_ecoff.c exec_elf32.c exec_elf64.c files.kern kern_core.c
kern_sig.c
src/sys/modules/compat_aoutm68k: Makefile
src/sys/modules/compat_netbsd32: Makefile
src/sys/modules/coredump: Makefile
src/sys/modules/exec_aout: Makefile
src/sys/modules/exec_elf32: Makefile
src/sys/modules/exec_elf64: Makefile
src/sys/sys: compat_stub.h exec.h param.h signalvar.h
src/sys/uvm: files.uvm

Log Message:
Move all non-emulation-specific coredump code into the coredump module,
and remove all #ifdef COREDUMP conditional compilation.  Now, the
coredump module is completely separated from the emulation modules, and
they can all be independently loaded and unloaded.

Welcome to 9.99.18 !


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/core_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/alpha/core_machdep.c
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm/core_machdep.c
cvs rdiff -u -r1.148 -r1.149 src/sys/arch/arm/conf/files.arm
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/core_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/conf/files.ia64
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/core_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/mips/core_machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.159 -r1.160 src/sys/arch/mips/mips/vm_machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/powerpc/core_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/riscv/conf/files.riscv
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/riscv/core_machdep.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sh3/sh3/coff_exec.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sh3/sh3/core_machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sh3/sh3/process_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/sparc/core_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc64/sparc64/core_machdep.c
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/vax/vax/core_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/core_machdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/compat/m68k4k/m68k4k_exec.c
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/netbsd32/netbsd32_core.c
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/netbsd32/netbsd32_mod.c
cvs rdiff -u -r1.18 -r1.19 src/sys/compat/vax1k/vax1k_exec.c
cvs rdiff -u -r1.18 -r1.19 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/core_netbsd.c
cvs rdiff -u -r1.40 -r1.41 src/sys/kern/exec_aout.c
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/exec_ecoff.c
cvs rdiff -u -r1.142 -r1.143 src/sys/kern/exec_elf32.c
cvs rdiff -u -r1.7 -r1.8 src/sys/kern/exec_elf64.c
cvs rdiff -u -r1.37 -r1.38 src/sys/kern/files.kern
cvs rdiff -u -r1.27 -r1.28 src/sys/kern/kern_core.c
cvs rdiff -u -r1.378 -r1.379 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_aoutm68k/Makefile
cvs rdiff -u -r1.29 -r1.30 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/coredump/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/exec_aout/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/exec_elf32/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/exec_elf64/Makefile
cvs rdiff -u -r1.21 -r1.22 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.156 -r1.157 src/sys/sys/exec.h
cvs rdiff -u -r1.618 -r1.619 src/sys/sys/param.h
cvs rdiff -u -r1.99 -r1.100 

CVS commit: src/sys

2019-11-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 20 19:37:54 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: core_machdep.c netbsd32_machdep.c
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/alpha/alpha: core_machdep.c
src/sys/arch/amd64/amd64: netbsd32_machdep.c
src/sys/arch/arm/arm: core_machdep.c
src/sys/arch/arm/conf: files.arm
src/sys/arch/hppa/hppa: core_machdep.c
src/sys/arch/ia64/conf: files.ia64
src/sys/arch/m68k/m68k: core_machdep.c
src/sys/arch/mips/mips: core_machdep.c netbsd32_machdep.c vm_machdep.c
src/sys/arch/powerpc/powerpc: core_machdep.c
src/sys/arch/riscv/conf: files.riscv
src/sys/arch/riscv/riscv: core_machdep.c
src/sys/arch/sh3/sh3: coff_exec.c core_machdep.c process_machdep.c
src/sys/arch/sparc/sparc: core_machdep.c
src/sys/arch/sparc64/sparc64: core_machdep.c netbsd32_machdep.c
src/sys/arch/vax/vax: core_machdep.c
src/sys/arch/x86/x86: core_machdep.c
src/sys/compat/m68k4k: m68k4k_exec.c
src/sys/compat/netbsd32: netbsd32_core.c netbsd32_mod.c
src/sys/compat/vax1k: vax1k_exec.c
src/sys/kern: compat_stub.c core_elf32.c core_netbsd.c exec_aout.c
exec_ecoff.c exec_elf32.c exec_elf64.c files.kern kern_core.c
kern_sig.c
src/sys/modules/compat_aoutm68k: Makefile
src/sys/modules/compat_netbsd32: Makefile
src/sys/modules/coredump: Makefile
src/sys/modules/exec_aout: Makefile
src/sys/modules/exec_elf32: Makefile
src/sys/modules/exec_elf64: Makefile
src/sys/sys: compat_stub.h exec.h param.h signalvar.h
src/sys/uvm: files.uvm

Log Message:
Move all non-emulation-specific coredump code into the coredump module,
and remove all #ifdef COREDUMP conditional compilation.  Now, the
coredump module is completely separated from the emulation modules, and
they can all be independently loaded and unloaded.

Welcome to 9.99.18 !


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/core_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/alpha/core_machdep.c
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm/core_machdep.c
cvs rdiff -u -r1.148 -r1.149 src/sys/arch/arm/conf/files.arm
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/core_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/conf/files.ia64
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/core_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/mips/core_machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/mips/netbsd32_machdep.c
cvs rdiff -u -r1.159 -r1.160 src/sys/arch/mips/mips/vm_machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/powerpc/core_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/riscv/conf/files.riscv
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/riscv/core_machdep.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sh3/sh3/coff_exec.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sh3/sh3/core_machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sh3/sh3/process_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/sparc/core_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc64/sparc64/core_machdep.c
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/vax/vax/core_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/core_machdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/compat/m68k4k/m68k4k_exec.c
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/netbsd32/netbsd32_core.c
cvs rdiff -u -r1.15 -r1.16 src/sys/compat/netbsd32/netbsd32_mod.c
cvs rdiff -u -r1.18 -r1.19 src/sys/compat/vax1k/vax1k_exec.c
cvs rdiff -u -r1.18 -r1.19 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/core_netbsd.c
cvs rdiff -u -r1.40 -r1.41 src/sys/kern/exec_aout.c
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/exec_ecoff.c
cvs rdiff -u -r1.142 -r1.143 src/sys/kern/exec_elf32.c
cvs rdiff -u -r1.7 -r1.8 src/sys/kern/exec_elf64.c
cvs rdiff -u -r1.37 -r1.38 src/sys/kern/files.kern
cvs rdiff -u -r1.27 -r1.28 src/sys/kern/kern_core.c
cvs rdiff -u -r1.378 -r1.379 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/compat_aoutm68k/Makefile
cvs rdiff -u -r1.29 -r1.30 src/sys/modules/compat_netbsd32/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/modules/coredump/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/exec_aout/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/exec_elf32/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/exec_elf64/Makefile
cvs rdiff -u -r1.21 -r1.22 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.156 -r1.157 src/sys/sys/exec.h
cvs rdiff -u -r1.618 -r1.619 src/sys/sys/param.h
cvs rdiff -u -r1.99 -r1.100 

CVS commit: [netbsd-9] src/doc

2019-11-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 20 16:50:51 UTC 2019

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

Log Message:
Ticket #458


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.109 -r1.1.2.110 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.109 src/doc/CHANGES-9.0:1.1.2.110
--- src/doc/CHANGES-9.0:1.1.2.109	Tue Nov 19 13:38:30 2019
+++ src/doc/CHANGES-9.0	Wed Nov 20 16:50:50 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.109 2019/11/19 13:38:30 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.110 2019/11/20 16:50:50 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -6022,3 +6022,11 @@ sys/compat/sys/siginfo.h			1.9
 	dependencies in headers.
 	[rin, ticket #457]
 
+sys/arch/arm/rockchip/files.rockchip		1.20
+sys/arch/arm/rockchip/rk3399_cru.c		1.9
+sys/arch/arm/rockchip/rk_spi.c			1.1
+sys/arch/evbarm/conf/GENERIC64			1.104
+
+	Add SPI driver for Rockchip RK3399.
+	[tnn, ticket #458]
+



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

2019-11-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 20 16:49:58 UTC 2019

Modified Files:
src/sys/arch/arm/rockchip [netbsd-9]: files.rockchip rk3399_cru.c
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC64
Added Files:
src/sys/arch/arm/rockchip [netbsd-9]: rk_spi.c

Log Message:
Pull up following revision(s) (requested by tnn in ticket #458):

sys/arch/arm/rockchip/rk3399_cru.c: revision 1.9
sys/arch/arm/rockchip/rk_spi.c: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.104
sys/arch/arm/rockchip/files.rockchip: revision 1.20

rk3399_cru: add definitions for SPI clocks

rk_spi: Rockchip SPI driver

Match only on RK3399 for now, but should work on RK3328 as well with
the proper CRU support. If you can, please test and enable for RK3328.

rkspi* at fdt?


To generate a diff of this commit:
cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/sys/arch/arm/rockchip/files.rockchip
cvs rdiff -u -r1.8.4.1 -r1.8.4.2 src/sys/arch/arm/rockchip/rk3399_cru.c
cvs rdiff -u -r0 -r1.3.2.2 src/sys/arch/arm/rockchip/rk_spi.c
cvs rdiff -u -r1.103.2.5 -r1.103.2.6 src/sys/arch/evbarm/conf/GENERIC64

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

Modified files:

Index: src/sys/arch/arm/rockchip/files.rockchip
diff -u src/sys/arch/arm/rockchip/files.rockchip:1.19.2.1 src/sys/arch/arm/rockchip/files.rockchip:1.19.2.2
--- src/sys/arch/arm/rockchip/files.rockchip:1.19.2.1	Sat Nov 16 16:48:25 2019
+++ src/sys/arch/arm/rockchip/files.rockchip	Wed Nov 20 16:49:58 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.rockchip,v 1.19.2.1 2019/11/16 16:48:25 martin Exp $
+#	$NetBSD: files.rockchip,v 1.19.2.2 2019/11/20 16:49:58 martin Exp $
 #
 # Configuration info for Rockchip family SoCs
 #
@@ -42,6 +42,11 @@ device	rkiic: i2cbus, i2cexec
 attach	rkiic at fdt with rk_i2c
 file	arch/arm/rockchip/rk_i2c.c		rk_i2c
 
+# SPI
+device	rkspi: spibus
+attach	rkspi at fdt with rk_spi
+file	arch/arm/rockchip/rk_spi.c		rk_spi
+
 # USB PHY
 device	rkusb { }
 attach	rkusb at fdt with rk_usb

Index: src/sys/arch/arm/rockchip/rk3399_cru.c
diff -u src/sys/arch/arm/rockchip/rk3399_cru.c:1.8.4.1 src/sys/arch/arm/rockchip/rk3399_cru.c:1.8.4.2
--- src/sys/arch/arm/rockchip/rk3399_cru.c:1.8.4.1	Sat Nov 16 16:48:25 2019
+++ src/sys/arch/arm/rockchip/rk3399_cru.c	Wed Nov 20 16:49:58 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3399_cru.c,v 1.8.4.1 2019/11/16 16:48:25 martin Exp $ */
+/* $NetBSD: rk3399_cru.c,v 1.8.4.2 2019/11/20 16:49:58 martin Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: rk3399_cru.c,v 1.8.4.1 2019/11/16 16:48:25 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: rk3399_cru.c,v 1.8.4.2 2019/11/20 16:49:58 martin Exp $");
 
 #include 
 #include 
@@ -771,6 +771,50 @@ static struct rk_cru_clk rk3399_cru_clks
 	RK_GATE(RK3399_PCLK_I2C2, "pclk_rki2c2", "pclk_perilp1", CLKGATE_CON(22), 9),
 	RK_GATE(RK3399_PCLK_I2C3, "pclk_rki2c3", "pclk_perilp1", CLKGATE_CON(22), 10),
 
+	/*
+	 * SPI
+	 */
+	RK_COMPOSITE(RK3399_SCLK_SPI0, "clk_spi0", mux_pll_src_cpll_gpll_parents,
+		 CLKSEL_CON(59),	/* muxdiv_reg */
+		 __BIT(7),		/* mux_mask */
+		 __BITS(6,0),	/* div_mask */
+		 CLKGATE_CON(9),	/* gate_reg */
+		 __BIT(12),		/* gate_mask */
+		 0),
+	RK_COMPOSITE(RK3399_SCLK_SPI1, "clk_spi1", mux_pll_src_cpll_gpll_parents,
+		 CLKSEL_CON(59),	/* muxdiv_reg */
+		 __BIT(15),		/* mux_mask */
+		 __BITS(14,8),	/* div_mask */
+		 CLKGATE_CON(9),	/* gate_reg */
+		 __BIT(13),		/* gate_mask */
+		 0),
+	RK_COMPOSITE(RK3399_SCLK_SPI2, "clk_spi2", mux_pll_src_cpll_gpll_parents,
+		 CLKSEL_CON(60),	/* muxdiv_reg */
+		 __BIT(7),		/* mux_mask */
+		 __BITS(6,0),	/* div_mask */
+		 CLKGATE_CON(9),	/* gate_reg */
+		 __BIT(14),		/* gate_mask */
+		 0),
+	RK_COMPOSITE(RK3399_SCLK_SPI4, "clk_spi4", mux_pll_src_cpll_gpll_parents,
+		 CLKSEL_CON(60),	/* muxdiv_reg */
+		 __BIT(15),		/* mux_mask */
+		 __BITS(14,8),	/* div_mask */
+		 CLKGATE_CON(9),	/* gate_reg */
+		 __BIT(15),		/* gate_mask */
+		 0),
+	RK_COMPOSITE(RK3399_SCLK_SPI5, "clk_spi5", mux_pll_src_cpll_gpll_parents,
+		 CLKSEL_CON(58),	/* muxdiv_reg */
+		 __BIT(15),		/* mux_mask */
+		 __BITS(14,8),	/* div_mask */
+		 CLKGATE_CON(13),	/* gate_reg */
+		 __BIT(13),		/* gate_mask */
+		 0),
+	RK_GATE(RK3399_PCLK_SPI0, "pclk_rkspi0", "pclk_perilp1", CLKGATE_CON(23), 10),
+	RK_GATE(RK3399_PCLK_SPI1, "pclk_rkspi1", "pclk_perilp1", CLKGATE_CON(23), 11),
+	RK_GATE(RK3399_PCLK_SPI2, "pclk_rkspi2", "pclk_perilp1", CLKGATE_CON(23), 12),
+	RK_GATE(RK3399_PCLK_SPI4, "pclk_rkspi4", "pclk_perilp1", CLKGATE_CON(23), 13),
+	RK_GATE(RK3399_PCLK_SPI5, "pclk_rkspi5", "hclk_perilp1", CLKGATE_CON(34), 5),
+
 	/* PCIe */
 	RK_GATE(RK3399_ACLK_PERF_PCIE, "aclk_perf_pcie", "aclk_perihp", CLKGATE_CON(20), 2),
 	RK_GATE(RK3399_ACLK_PCIE, "aclk_pcie", 

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

2019-11-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 20 16:49:58 UTC 2019

Modified Files:
src/sys/arch/arm/rockchip [netbsd-9]: files.rockchip rk3399_cru.c
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC64
Added Files:
src/sys/arch/arm/rockchip [netbsd-9]: rk_spi.c

Log Message:
Pull up following revision(s) (requested by tnn in ticket #458):

sys/arch/arm/rockchip/rk3399_cru.c: revision 1.9
sys/arch/arm/rockchip/rk_spi.c: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.104
sys/arch/arm/rockchip/files.rockchip: revision 1.20

rk3399_cru: add definitions for SPI clocks

rk_spi: Rockchip SPI driver

Match only on RK3399 for now, but should work on RK3328 as well with
the proper CRU support. If you can, please test and enable for RK3328.

rkspi* at fdt?


To generate a diff of this commit:
cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/sys/arch/arm/rockchip/files.rockchip
cvs rdiff -u -r1.8.4.1 -r1.8.4.2 src/sys/arch/arm/rockchip/rk3399_cru.c
cvs rdiff -u -r0 -r1.3.2.2 src/sys/arch/arm/rockchip/rk_spi.c
cvs rdiff -u -r1.103.2.5 -r1.103.2.6 src/sys/arch/evbarm/conf/GENERIC64

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



CVS commit: [netbsd-8] src/doc

2019-11-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 20 16:37:46 UTC 2019

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

Log Message:
Ticket #1453


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.68 -r1.1.2.69 src/doc/CHANGES-8.2

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



CVS commit: [netbsd-8] src/doc

2019-11-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 20 16:37:46 UTC 2019

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

Log Message:
Ticket #1453


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.68 -r1.1.2.69 src/doc/CHANGES-8.2

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

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.68 src/doc/CHANGES-8.2:1.1.2.69
--- src/doc/CHANGES-8.2:1.1.2.68	Tue Nov 19 10:51:52 2019
+++ src/doc/CHANGES-8.2	Wed Nov 20 16:37:46 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.68 2019/11/19 10:51:52 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.69 2019/11/20 16:37:46 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -1658,3 +1658,8 @@ sys/kern/sys_ptrace_common.c			1.72
 	ptrace(2): fix PIOD_READ_AUXV for COMPAT_NETBSD32.
 	[rin, ticket #1452]
 
+sys/arch/x86/pci/msipic.c			1.19
+
+	Disable MSI-X before writing the MSI-X table.
+	[hikaru, ticket #1453]
+



CVS commit: [netbsd-8] src/sys/arch/x86/pci

2019-11-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 20 16:36:47 UTC 2019

Modified Files:
src/sys/arch/x86/pci [netbsd-8]: msipic.c

Log Message:
Pull up following revision(s) (requested by hikaru in ticket #1453):

sys/arch/x86/pci/msipic.c: revision 1.19

Disable MSI-X before writing the MSI-X table.

That fixes MSI-X interrupt lost on VMware ESXi 6.7 PCI passthrough devices.

ok knakahara@


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.2.1 src/sys/arch/x86/pci/msipic.c

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



CVS commit: [netbsd-8] src/sys/arch/x86/pci

2019-11-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 20 16:36:47 UTC 2019

Modified Files:
src/sys/arch/x86/pci [netbsd-8]: msipic.c

Log Message:
Pull up following revision(s) (requested by hikaru in ticket #1453):

sys/arch/x86/pci/msipic.c: revision 1.19

Disable MSI-X before writing the MSI-X table.

That fixes MSI-X interrupt lost on VMware ESXi 6.7 PCI passthrough devices.

ok knakahara@


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.2.1 src/sys/arch/x86/pci/msipic.c

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

Modified files:

Index: src/sys/arch/x86/pci/msipic.c
diff -u src/sys/arch/x86/pci/msipic.c:1.10 src/sys/arch/x86/pci/msipic.c:1.10.2.1
--- src/sys/arch/x86/pci/msipic.c:1.10	Thu Jun  1 02:45:08 2017
+++ src/sys/arch/x86/pci/msipic.c	Wed Nov 20 16:36:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msipic.c,v 1.10 2017/06/01 02:45:08 chs Exp $	*/
+/*	$NetBSD: msipic.c,v 1.10.2.1 2019/11/20 16:36:47 martin Exp $	*/
 
 /*
  * Copyright (c) 2015 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.10 2017/06/01 02:45:08 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.10.2.1 2019/11/20 16:36:47 martin Exp $");
 
 #include "opt_intrdebug.h"
 
@@ -538,6 +538,11 @@ msix_addroute(struct pic *pic, struct cp
 	err = pci_get_capability(pc, tag, PCI_CAP_MSIX, , NULL);
 	KASSERT(err != 0);
 
+	/* Disable MSI-X before writing MSI-X table */
+	ctl = pci_conf_read(pc, tag, off + PCI_MSIX_CTL);
+	ctl &= ~PCI_MSIX_CTL_ENABLE;
+	pci_conf_write(pc, tag, off + PCI_MSIX_CTL, ctl);
+
 	entry_base = PCI_MSIX_TABLE_ENTRY_SIZE * msix_vec;
 
 	/*



CVS commit: [netbsd-9] src/doc

2019-11-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 20 16:50:51 UTC 2019

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

Log Message:
Ticket #458


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.109 -r1.1.2.110 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: src/sbin/mount_autofs

2019-11-20 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Wed Nov 20 17:18:35 UTC 2019

Modified Files:
src/sbin/mount_autofs: mount_autofs.c

Log Message:
mount_autofs: Remove blank line with trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/mount_autofs/mount_autofs.c

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



CVS commit: src/sbin/mount_autofs

2019-11-20 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Wed Nov 20 17:18:35 UTC 2019

Modified Files:
src/sbin/mount_autofs: mount_autofs.c

Log Message:
mount_autofs: Remove blank line with trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/mount_autofs/mount_autofs.c

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

Modified files:

Index: src/sbin/mount_autofs/mount_autofs.c
diff -u src/sbin/mount_autofs/mount_autofs.c:1.3 src/sbin/mount_autofs/mount_autofs.c:1.4
--- src/sbin/mount_autofs/mount_autofs.c:1.3	Tue Jan 23 15:02:03 2018
+++ src/sbin/mount_autofs/mount_autofs.c	Wed Nov 20 17:18:35 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount_autofs.c,v 1.3 2018/01/23 15:02:03 wiz Exp $	*/
+/*	$NetBSD: mount_autofs.c,v 1.4 2019/11/20 17:18:35 tkusumi Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 #include 
 #ifndef lint
-__RCSID("$NetBSD: mount_autofs.c,v 1.3 2018/01/23 15:02:03 wiz Exp $");
+__RCSID("$NetBSD: mount_autofs.c,v 1.4 2019/11/20 17:18:35 tkusumi Exp $");
 #endif /* not lint */
 
 #include 
@@ -91,7 +91,6 @@ mount_autofs_parseargs(int argc, char *a
 		case 'p':
 			strlcpy(am->master_prefix, optarg, MAXPATHLEN);
 			break;
-			
 		case '?':
 		default:
 			usage();



CVS commit: src/sbin/mount_autofs

2019-11-20 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Wed Nov 20 17:29:51 UTC 2019

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

Log Message:
mount_autofs: Sync man page with DragonFlyBSD

Taken-from: DragonFlyBSD


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/mount_autofs/mount_autofs.8

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

Modified files:

Index: src/sbin/mount_autofs/mount_autofs.8
diff -u src/sbin/mount_autofs/mount_autofs.8:1.6 src/sbin/mount_autofs/mount_autofs.8:1.7
--- src/sbin/mount_autofs/mount_autofs.8:1.6	Wed Jan 24 12:04:47 2018
+++ src/sbin/mount_autofs/mount_autofs.8	Wed Nov 20 17:29:51 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: mount_autofs.8,v 1.6 2018/01/24 12:04:47 uwe Exp $
+.\" $NetBSD: mount_autofs.8,v 1.7 2019/11/20 17:29:51 tkusumi Exp $
 .\"
 .\" Copyright (c) 2018 The DragonFly Project
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 23, 2018
+.Dd November 21, 2019
 .Dt MOUNT_AUTOFS 8
 .Os
 .Sh NAME
@@ -33,9 +33,9 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl f Ar from
-.Op Fl O Ar master_options
 .Op Fl o Ar options
-.Op Fl p Ar prefix
+.Op Fl O Ar master_options
+.Op Fl p Ar master_prefix
 .Ar autofs
 .Ar mount_point
 .Sh DESCRIPTION
@@ -45,6 +45,16 @@ command should not usually be called by 
 Use
 .Xr automount 8
 instead.
+.Xr autofs 5
+is mountable using
+.Xr automount 8
+which incorporates
+.Xr auto_master 5
+parser, without having to specify
+.Xr autofs 5
+mount options via command line.
+.\" and that was the original intention of FreeBSD/autofs.
+.\" This is a low level version without auto_master(5) involved.
 .Pp
 The
 .Nm
@@ -93,6 +103,7 @@ prefix, below which the file system(s) w
 .El
 .Sh SEE ALSO
 .Xr autofs 5 ,
+.Xr auto_master 5 ,
 .Xr fstab 5 ,
 .Xr automount 8 ,
 .Xr mount 8



CVS commit: src/sbin/mount_autofs

2019-11-20 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Wed Nov 20 17:29:51 UTC 2019

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

Log Message:
mount_autofs: Sync man page with DragonFlyBSD

Taken-from: DragonFlyBSD


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/mount_autofs/mount_autofs.8

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



CVS commit: src/sys/kern

2019-11-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Nov 20 21:49:00 UTC 2019

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

Log Message:
- Put back a microoptimisation that was accidentally removed.
- Comments.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/kern/kern_condvar.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_condvar.c
diff -u src/sys/kern/kern_condvar.c:1.41 src/sys/kern/kern_condvar.c:1.42
--- src/sys/kern/kern_condvar.c:1.41	Tue Jan 30 07:52:22 2018
+++ src/sys/kern/kern_condvar.c	Wed Nov 20 21:49:00 2019
@@ -1,7 +1,7 @@
-/*	$NetBSD: kern_condvar.c,v 1.41 2018/01/30 07:52:22 ozaki-r Exp $	*/
+/*	$NetBSD: kern_condvar.c,v 1.42 2019/11/20 21:49:00 ad Exp $	*/
 
 /*-
- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.41 2018/01/30 07:52:22 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.42 2019/11/20 21:49:00 ad Exp $");
 
 #include 
 #include 
@@ -210,10 +210,10 @@ cv_exit(kcondvar_t *cv, kmutex_t *mtx, l
  *	Remove an LWP from the condition variable and sleep queue.  This
  *	is called when the LWP has not been awoken normally but instead
  *	interrupted: for example, when a signal is received.  Must be
- *	called with the LWP locked, and must return it unlocked.
+ *	called with the LWP locked.  Will unlock if "unlock" is true.
  */
 static void
-cv_unsleep(lwp_t *l, bool cleanup)
+cv_unsleep(lwp_t *l, bool unlock)
 {
 	kcondvar_t *cv __diagused;
 
@@ -224,7 +224,7 @@ cv_unsleep(lwp_t *l, bool cleanup)
 	KASSERT(cv_is_valid(cv));
 	KASSERT(cv_has_waiters(cv));
 
-	sleepq_unsleep(l, cleanup);
+	sleepq_unsleep(l, unlock);
 }
 
 /*
@@ -490,7 +490,14 @@ cv_signal(kcondvar_t *cv)
 		cv_wakeup_one(cv);
 }
 
-static inline void
+/*
+ * cv_wakeup_one:
+ *
+ *	Slow path for cv_signal().  Deliberately marked __noinline to
+ *	prevent the compiler pulling it in to cv_signal(), which adds
+ *	extra prologue and epilogue code.
+ */
+static __noinline void
 cv_wakeup_one(kcondvar_t *cv)
 {
 	sleepq_t *sq;
@@ -502,7 +509,7 @@ cv_wakeup_one(kcondvar_t *cv)
 	mp = sleepq_hashlock(cv);
 	sq = CV_SLEEPQ(cv);
 	l = TAILQ_FIRST(sq);
-	if (l == NULL) {
+	if (__predict_false(l == NULL)) {
 		mutex_spin_exit(mp);
 		return;
 	}
@@ -533,7 +540,14 @@ cv_broadcast(kcondvar_t *cv)
 		cv_wakeup_all(cv);
 }
 
-static inline void
+/*
+ * cv_wakeup_all:
+ *
+ *	Slow path for cv_broadcast().  Deliberately marked __noinline to
+ *	prevent the compiler pulling it in to cv_broadcast(), which adds
+ *	extra prologue and epilogue code.
+ */
+static __noinline void
 cv_wakeup_all(kcondvar_t *cv)
 {
 	sleepq_t *sq;



CVS commit: src/sys/kern

2019-11-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Nov 20 21:49:00 UTC 2019

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

Log Message:
- Put back a microoptimisation that was accidentally removed.
- Comments.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/kern/kern_condvar.c

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



CVS commit: src/sbin/mount_autofs

2019-11-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov 20 21:56:19 UTC 2019

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

Log Message:
Sort options and SEE ALSO. Improve a sentence.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/mount_autofs/mount_autofs.8

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

Modified files:

Index: src/sbin/mount_autofs/mount_autofs.8
diff -u src/sbin/mount_autofs/mount_autofs.8:1.7 src/sbin/mount_autofs/mount_autofs.8:1.8
--- src/sbin/mount_autofs/mount_autofs.8:1.7	Wed Nov 20 17:29:51 2019
+++ src/sbin/mount_autofs/mount_autofs.8	Wed Nov 20 21:56:19 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: mount_autofs.8,v 1.7 2019/11/20 17:29:51 tkusumi Exp $
+.\" $NetBSD: mount_autofs.8,v 1.8 2019/11/20 21:56:19 wiz Exp $
 .\"
 .\" Copyright (c) 2018 The DragonFly Project
 .\" All rights reserved.
@@ -33,8 +33,8 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl f Ar from
-.Op Fl o Ar options
 .Op Fl O Ar master_options
+.Op Fl o Ar options
 .Op Fl p Ar master_prefix
 .Ar autofs
 .Ar mount_point
@@ -47,8 +47,8 @@ Use
 instead.
 .Xr autofs 5
 is mountable using
-.Xr automount 8
-which incorporates
+.Xr automount 8 ,
+which incorporates an
 .Xr auto_master 5
 parser, without having to specify
 .Xr autofs 5
@@ -102,8 +102,8 @@ Set the
 prefix, below which the file system(s) will be mounted.
 .El
 .Sh SEE ALSO
-.Xr autofs 5 ,
 .Xr auto_master 5 ,
+.Xr autofs 5 ,
 .Xr fstab 5 ,
 .Xr automount 8 ,
 .Xr mount 8



CVS commit: src/sbin/mount_autofs

2019-11-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov 20 21:56:19 UTC 2019

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

Log Message:
Sort options and SEE ALSO. Improve a sentence.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/mount_autofs/mount_autofs.8

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



CVS commit: src/sys/dev/pci

2019-11-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 21 02:59:44 UTC 2019

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

Log Message:
- Set duplex correctly when user setting is not IFM_AUTO.
- When the link is up, set VGE_DIAGCTL not from user media setting but from
  the current active link status.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/if_vge.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_vge.c
diff -u src/sys/dev/pci/if_vge.c:1.76 src/sys/dev/pci/if_vge.c:1.77
--- src/sys/dev/pci/if_vge.c:1.76	Tue Nov 19 09:54:07 2019
+++ src/sys/dev/pci/if_vge.c	Thu Nov 21 02:59:43 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vge.c,v 1.76 2019/11/19 09:54:07 msaitoh Exp $ */
+/* $NetBSD: if_vge.c,v 1.77 2019/11/21 02:59:43 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.76 2019/11/19 09:54:07 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.77 2019/11/21 02:59:43 msaitoh Exp $");
 
 /*
  * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
@@ -1928,33 +1928,34 @@ vge_miibus_statchg(struct ifnet *ifp)
 	 * always implied, so we turn on the forced mode bit but leave
 	 * the FDX bit cleared.
 	 */
-
 	dctl = CSR_READ_1(sc, VGE_DIAGCTL);
 
-	switch (IFM_SUBTYPE(ife->ifm_media)) {
-	case IFM_AUTO:
+	if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) {
 		dctl &= ~VGE_DIAGCTL_MACFORCE;
 		dctl &= ~VGE_DIAGCTL_FDXFORCE;
-		break;
-	case IFM_1000_T:
-		dctl |= VGE_DIAGCTL_MACFORCE;
-		dctl &= ~VGE_DIAGCTL_FDXFORCE;
-		dctl |= VGE_DIAGCTL_GMII;
-		break;
-	case IFM_100_TX:
-	case IFM_10_T:
+	} else {
+		u_int ifmword;
+
+		/* If the link is up, use the current active media. */
+		if ((mii->mii_media_status & IFM_ACTIVE) != 0)
+			ifmword = mii->mii_media_active;
+		else
+			ifmword = ife->ifm_media;
+
 		dctl |= VGE_DIAGCTL_MACFORCE;
-		dctl &= ~VGE_DIAGCTL_GMII;
-		if ((ife->ifm_media & IFM_FDX) != 0)
+		if ((ifmword & IFM_FDX) != 0)
 			dctl |= VGE_DIAGCTL_FDXFORCE;
 		else
 			dctl &= ~VGE_DIAGCTL_FDXFORCE;
-		break;
-	default:
-		printf("%s: unknown media type: %x\n",
-		device_xname(sc->sc_dev),
-		IFM_SUBTYPE(ife->ifm_media));
-		break;
+
+		if (IFM_SUBTYPE(ifmword) == IFM_1000_T) {
+			/*
+			 * It means the user setting is not auto but it's
+			 * 1000baseT-FDX or 1000baseT.
+			 */
+			dctl |= VGE_DIAGCTL_GMII;
+		} else
+			dctl &= ~VGE_DIAGCTL_GMII;
 	}
 
 	CSR_WRITE_1(sc, VGE_DIAGCTL, dctl);



CVS commit: src/sys/dev/pci

2019-11-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 21 02:59:44 UTC 2019

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

Log Message:
- Set duplex correctly when user setting is not IFM_AUTO.
- When the link is up, set VGE_DIAGCTL not from user media setting but from
  the current active link status.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/if_vge.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/mii

2019-11-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 21 03:04:22 UTC 2019

Modified Files:
src/sys/dev/mii: ipgphy.c ipgphyreg.h

Log Message:
 Add missing NetBSD RCS Id. Reported by Andrius V.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/mii/ipgphy.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/mii/ipgphyreg.h

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

Modified files:

Index: src/sys/dev/mii/ipgphy.c
diff -u src/sys/dev/mii/ipgphy.c:1.4 src/sys/dev/mii/ipgphy.c:1.5
--- src/sys/dev/mii/ipgphy.c:1.4	Thu Nov 14 09:06:21 2019
+++ src/sys/dev/mii/ipgphy.c	Thu Nov 21 03:04:21 2019
@@ -1,3 +1,4 @@
+/*	$NetBSD: ipgphy.c,v 1.5 2019/11/21 03:04:21 msaitoh Exp $ */
 /*	$OpenBSD: ipgphy.c,v 1.19 2015/07/19 06:28:12 yuo Exp $	*/
 
 /*-
@@ -32,7 +33,7 @@
  * Driver for the IC Plus IP1000A/IP1001 10/100/1000 PHY.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipgphy.c,v 1.4 2019/11/14 09:06:21 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipgphy.c,v 1.5 2019/11/21 03:04:21 msaitoh Exp $");
 
 #include 
 #include 

Index: src/sys/dev/mii/ipgphyreg.h
diff -u src/sys/dev/mii/ipgphyreg.h:1.2 src/sys/dev/mii/ipgphyreg.h:1.3
--- src/sys/dev/mii/ipgphyreg.h:1.2	Tue Nov 12 14:07:09 2019
+++ src/sys/dev/mii/ipgphyreg.h	Thu Nov 21 03:04:21 2019
@@ -1,3 +1,4 @@
+/*	$NetBSD: ipgphyreg.h,v 1.3 2019/11/21 03:04:21 msaitoh Exp $ */
 /*	$OpenBSD: ipgphyreg.h,v 1.3 2015/07/19 06:28:12 yuo Exp $	*/
 
 /*-



CVS commit: src/sys/dev/mii

2019-11-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 21 03:04:22 UTC 2019

Modified Files:
src/sys/dev/mii: ipgphy.c ipgphyreg.h

Log Message:
 Add missing NetBSD RCS Id. Reported by Andrius V.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/mii/ipgphy.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/mii/ipgphyreg.h

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