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

2019-09-26 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Fri Sep 27 02:59:21 UTC 2019

Modified Files:
src/sys/arch/arm/imx: imx51_spi.c imxcspireg.h imxecspireg.h imxspi.c
imxspivar.h
src/sys/arch/arm/imx/fdt: imx6_spi.c

Log Message:
Add i.MX SPI device type.

IMX31_CSPI
IMX35_CSPI
IMX51_ECSPI


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imx51_spi.c \
src/sys/arch/arm/imx/imxspivar.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imxcspireg.h \
src/sys/arch/arm/imx/imxecspireg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/imxspi.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_spi.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/arm/imx

2019-09-26 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Fri Sep 27 02:59:21 UTC 2019

Modified Files:
src/sys/arch/arm/imx: imx51_spi.c imxcspireg.h imxecspireg.h imxspi.c
imxspivar.h
src/sys/arch/arm/imx/fdt: imx6_spi.c

Log Message:
Add i.MX SPI device type.

IMX31_CSPI
IMX35_CSPI
IMX51_ECSPI


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imx51_spi.c \
src/sys/arch/arm/imx/imxspivar.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imxcspireg.h \
src/sys/arch/arm/imx/imxecspireg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/imxspi.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_spi.c

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

Modified files:

Index: src/sys/arch/arm/imx/imx51_spi.c
diff -u src/sys/arch/arm/imx/imx51_spi.c:1.2 src/sys/arch/arm/imx/imx51_spi.c:1.3
--- src/sys/arch/arm/imx/imx51_spi.c:1.2	Mon Aug 19 11:41:36 2019
+++ src/sys/arch/arm/imx/imx51_spi.c	Fri Sep 27 02:59:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx51_spi.c,v 1.2 2019/08/19 11:41:36 hkenken Exp $	*/
+/*	$NetBSD: imx51_spi.c,v 1.3 2019/09/27 02:59:21 hkenken Exp $	*/
 
 /*-
  * Copyright (c) 2014  Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx51_spi.c,v 1.2 2019/08/19 11:41:36 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx51_spi.c,v 1.3 2019/09/27 02:59:21 hkenken Exp $");
 
 #include "locators.h"
 #include "opt_imx.h"
@@ -95,6 +95,10 @@ imxspi_attach(device_t parent, device_t 
 
 	sc->sc_iot = aa->aa_iot;
 	sc->sc_enhanced = cf_flags;
+	if (sc->sc_enhanced)
+		sc->sc_type = IMX51_ECSPI;
+	else
+		sc->sc_type = IMX35_CSPI;
 
 	sc->sc_nslaves = IMXSPINSLAVES;
 	sc->sc_freq = imx51_get_clock(IMX51CLK_CSPI_CLK_ROOT);
Index: src/sys/arch/arm/imx/imxspivar.h
diff -u src/sys/arch/arm/imx/imxspivar.h:1.2 src/sys/arch/arm/imx/imxspivar.h:1.3
--- src/sys/arch/arm/imx/imxspivar.h:1.2	Mon Aug 19 11:41:36 2019
+++ src/sys/arch/arm/imx/imxspivar.h	Fri Sep 27 02:59:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imxspivar.h,v 1.2 2019/08/19 11:41:36 hkenken Exp $	*/
+/*	$NetBSD: imxspivar.h,v 1.3 2019/09/27 02:59:21 hkenken Exp $	*/
 
 /*
  * Copyright (c) 2014  Genetec Corporation.  All rights reserved.
@@ -38,6 +38,12 @@ typedef struct spi_chipset_tag {
 	int (*spi_cs_disable)(void *, int);
 } *spi_chipset_tag_t;
 
+enum imxspi_type {
+	IMX31_CSPI,
+	IMX35_CSPI,
+	IMX51_ECSPI,
+};
+
 struct imxspi_softc {
 	device_t sc_dev;
 	int sc_phandle;
@@ -57,6 +63,7 @@ struct imxspi_softc {
 
 	int sc_nslaves;
 	int sc_enhanced;
+	enum imxspi_type sc_type;
 };
 
 int imxspi_attach_common(device_t);

Index: src/sys/arch/arm/imx/imxcspireg.h
diff -u src/sys/arch/arm/imx/imxcspireg.h:1.1 src/sys/arch/arm/imx/imxcspireg.h:1.2
--- src/sys/arch/arm/imx/imxcspireg.h:1.1	Sat Mar 22 09:28:08 2014
+++ src/sys/arch/arm/imx/imxcspireg.h	Fri Sep 27 02:59:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imxcspireg.h,v 1.1 2014/03/22 09:28:08 hkenken Exp $	*/
+/*	$NetBSD: imxcspireg.h,v 1.2 2019/09/27 02:59:21 hkenken Exp $	*/
 
 /*
  * Copyright (c) 2014  Genetec Corporation.  All rights reserved.
@@ -32,15 +32,12 @@
 #define	CSPI_RXDATA		0x00
 #define	CSPI_TXDATA		0x04
 #define	CSPI_CONREG		0x08
-#ifdef IMX51
-#define	 CSPI_CON_CS		__BITS(13, 12)
-#define	 CSPI_CON_DRCTL		__BITS( 9,  8)
-#define	 CSPI_CON_BITCOUNT	__BITS(31, 20)
-#else
-#define	 CSPI_CON_CS		__BITS(25, 24)
-#define	 CSPI_CON_DRCTL		__BITS(21, 20)
-#define	 CSPI_CON_BITCOUNT	__BITS(12,  8)
-#endif
+#define	 CSPI_IMX31_CON_CS		__BITS(25, 24)
+#define	 CSPI_IMX31_CON_DRCTL		__BITS(21, 20)
+#define	 CSPI_IMX31_CON_BITCOUNT	__BITS(12,  8)
+#define	 CSPI_IMX35_CON_CS		__BITS(13, 12)
+#define	 CSPI_IMX35_CON_DRCTL		__BITS( 9,  8)
+#define	 CSPI_IMX35_CON_BITCOUNT	__BITS(31, 20)
 #define	 CSPI_CON_DIV		__BITS(18, 16)
 #define	 CSPI_CON_SSPOL		__BIT(7)	/* SPI SS Polarity Select */
 #define	 CSPI_CON_SSCTL		__BIT(6)	/* In master mode, this bit
@@ -55,12 +52,9 @@
 #define	 CSPI_CON_ENABLE	__BIT(0)	/* EN */
 #define	CSPI_INTREG		0x0c
 #define	 CSPI_INTR_ALL_EN	0x01ff	/* All Intarruption Enabled */
-#ifdef IMX51
-#define	 CSPI_INTR_TC_EN	__BIT(7)	/* TX Complete */
-#else
-#define	 CSPI_INTR_TC_EN	__BIT(8)	/* TX Complete */
-#define	 CSPI_INTR_BO_EN	__BIT(7)	/* Bit Counter Overflow */
-#endif
+#define	 CSPI_IMX31_INTR_TC_EN	__BIT(8)	/* TX Complete */
+#define	 CSPI_IMX31_INTR_BO_EN	__BIT(7)	/* Bit Counter Overflow */
+#define	 CSPI_IMX35_INTR_TC_EN	__BIT(7)	/* TX Complete */
 #define	 CSPI_INTR_RO_EN	__BIT(6)	/* RXFIFO Overflow */
 #define	 CSPI_INTR_RF_EN	__BIT(5)	/* RXFIFO Full */
 #define	 CSPI_INTR_RH_EN	__BIT(4)	/* RXFIFO Half Full */
@@ -70,14 +64,11 @@
 #define	 CSPI_INTR_TE_EN	__BIT(0)	/* TXFIFO Empty */
 #define	CSPI_DMAREG		0x10
 #define	CSPI_STATREG		0x14
-#ifdef IMX51
-#define	 CSPI_STAT_CLR_TC	__BIT(7)	/* Clear TC of status register */
-#define  CSPI_STAT_CLR		CSPI_STAT_CLR_TC
-#

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

2019-09-26 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Fri Sep 27 02:54:57 UTC 2019

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_sdhc.c

Log Message:
Add SDHC_FLAG_NO_BUSY_INTR flag.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/imx6_sdhc.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/arm/imx/fdt

2019-09-26 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Fri Sep 27 02:54:57 UTC 2019

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_sdhc.c

Log Message:
Add SDHC_FLAG_NO_BUSY_INTR flag.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/imx6_sdhc.c

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

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx6_sdhc.c
diff -u src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.2 src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.3
--- src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.2	Mon Aug 19 03:48:41 2019
+++ src/sys/arch/arm/imx/fdt/imx6_sdhc.c	Fri Sep 27 02:54:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_sdhc.c,v 1.2 2019/08/19 03:48:41 hkenken Exp $	*/
+/*	$NetBSD: imx6_sdhc.c,v 1.3 2019/09/27 02:54:57 hkenken Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_sdhc.c,v 1.2 2019/08/19 03:48:41 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_sdhc.c,v 1.3 2019/09/27 02:54:57 hkenken Exp $");
 
 #include "opt_fdt.h"
 
@@ -119,7 +119,8 @@ imx6_sdhc_attach(device_t parent, device
 	SDHC_FLAG_HAVE_DVS |
 	SDHC_FLAG_32BIT_ACCESS |
 	SDHC_FLAG_USE_ADMA2 |
-	SDHC_FLAG_USDHC;
+	SDHC_FLAG_USDHC |
+	SDHC_FLAG_NO_BUSY_INTR;
 
 	if (bus_width == 8)
 		sc->sc_sdhc.sc_flags |= SDHC_FLAG_8BIT_MODE;



CVS commit: src/sys/arch/cesfic/cesfic

2019-09-26 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Sep 27 00:53:34 UTC 2019

Modified Files:
src/sys/arch/cesfic/cesfic: autoconf.c

Log Message:
do not clear "cold" in MD code, that is done in MI code.
this instance was missed when that was changed 20 years ago.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/cesfic/cesfic/autoconf.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/cesfic/cesfic/autoconf.c
diff -u src/sys/arch/cesfic/cesfic/autoconf.c:1.26 src/sys/arch/cesfic/cesfic/autoconf.c:1.27
--- src/sys/arch/cesfic/cesfic/autoconf.c:1.26	Sun Jul 29 18:05:40 2012
+++ src/sys/arch/cesfic/cesfic/autoconf.c	Fri Sep 27 00:53:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:40 mlelstv Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.27 2019/09/27 00:53:34 chs Exp $	*/
 
 /*
  * Copyright (c) 1997, 1999
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:40 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.27 2019/09/27 00:53:34 chs Exp $");
 
 #include 
 #include 
@@ -145,7 +145,6 @@ cpu_configure(void)
 		panic("no mainbus found");
 
 	(void)spl0();
-	cold = 0;
 }
 
 void



CVS commit: src/sys/arch/cesfic/cesfic

2019-09-26 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Sep 27 00:53:34 UTC 2019

Modified Files:
src/sys/arch/cesfic/cesfic: autoconf.c

Log Message:
do not clear "cold" in MD code, that is done in MI code.
this instance was missed when that was changed 20 years ago.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/cesfic/cesfic/autoconf.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-09-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Sep 27 00:32:04 UTC 2019

Modified Files:
src/sys/compat/common: kern_uipc_socket_50.c
src/sys/kern: uipc_socket.c
src/sys/sys: compat_stub.h param.h

Log Message:
Actually return the updated pointer-to-mbuf-pointer to the caller
rather than discarding-after-assignment.  Introduced from the
[pgoyette-compat] branch work.

Welcome to 9.99.14 !!!  (Module hook routine prototype changed.)

Found by the lgtm bot, reported via private Email from maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/kern_uipc_socket_50.c
cvs rdiff -u -r1.283 -r1.284 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.18 -r1.19 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.613 -r1.614 src/sys/sys/param.h

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



CVS commit: src/sys

2019-09-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Sep 27 00:32:04 UTC 2019

Modified Files:
src/sys/compat/common: kern_uipc_socket_50.c
src/sys/kern: uipc_socket.c
src/sys/sys: compat_stub.h param.h

Log Message:
Actually return the updated pointer-to-mbuf-pointer to the caller
rather than discarding-after-assignment.  Introduced from the
[pgoyette-compat] branch work.

Welcome to 9.99.14 !!!  (Module hook routine prototype changed.)

Found by the lgtm bot, reported via private Email from maxv@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/kern_uipc_socket_50.c
cvs rdiff -u -r1.283 -r1.284 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.18 -r1.19 src/sys/sys/compat_stub.h
cvs rdiff -u -r1.613 -r1.614 src/sys/sys/param.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/compat/common/kern_uipc_socket_50.c
diff -u src/sys/compat/common/kern_uipc_socket_50.c:1.2 src/sys/compat/common/kern_uipc_socket_50.c:1.3
--- src/sys/compat/common/kern_uipc_socket_50.c:1.2	Mon Apr 15 10:53:17 2019
+++ src/sys/compat/common/kern_uipc_socket_50.c	Fri Sep 27 00:32:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_uipc_socket_50.c,v 1.2 2019/04/15 10:53:17 pgoyette Exp $	*/
+/*	$NetBSD: kern_uipc_socket_50.c,v 1.3 2019/09/27 00:32:03 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_uipc_socket_50.c,v 1.2 2019/04/15 10:53:17 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_uipc_socket_50.c,v 1.3 2019/09/27 00:32:03 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -210,7 +210,7 @@ uipc_socket_50_setopt1(int opt, struct s
 }
 
 static int
-uipc_socket_50_sbts(int opt, struct mbuf **mp)
+uipc_socket_50_sbts(int opt, struct mbuf ***mp)
 {
 	struct timeval50 tv50;
 	struct timeval tv;
@@ -220,10 +220,10 @@ uipc_socket_50_sbts(int opt, struct mbuf
 	if (opt & SO_OTIMESTAMP) {
 
 		timeval_to_timeval50(&tv, &tv50);
-		*mp = sbcreatecontrol(&tv50, sizeof(tv50), SCM_OTIMESTAMP,
+		**mp = sbcreatecontrol(&tv50, sizeof(tv50), SCM_OTIMESTAMP,
 		SOL_SOCKET);
-		if (*mp)
-			mp = &(*mp)->m_next;
+		if (**mp)
+			*mp = &(**mp)->m_next;
 		return 0;
 	} else
 		return EPASSTHROUGH;

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.283 src/sys/kern/uipc_socket.c:1.284
--- src/sys/kern/uipc_socket.c:1.283	Sat Sep 14 15:06:33 2019
+++ src/sys/kern/uipc_socket.c	Fri Sep 27 00:32:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.283 2019/09/14 15:06:33 mlelstv Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.284 2019/09/27 00:32:03 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.283 2019/09/14 15:06:33 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.284 2019/09/27 00:32:03 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -2419,7 +2419,7 @@ sbsavetimestamp(int opt, struct mbuf **m
 
 	microtime(&tv);
 
-	MODULE_HOOK_CALL(uipc_socket_50_sbts_hook, (opt, mp), enosys(), error);
+	MODULE_HOOK_CALL(uipc_socket_50_sbts_hook, (opt, &mp), enosys(), error);
 	if (error == 0)
 		return mp;
 

Index: src/sys/sys/compat_stub.h
diff -u src/sys/sys/compat_stub.h:1.18 src/sys/sys/compat_stub.h:1.19
--- src/sys/sys/compat_stub.h:1.18	Sat Jul 20 20:59:05 2019
+++ src/sys/sys/compat_stub.h	Fri Sep 27 00:32:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_stub.h,v 1.18 2019/07/20 20:59:05 mrg Exp $	*/
+/*	$NetBSD: compat_stub.h,v 1.19 2019/09/27 00:32:03 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -231,7 +231,7 @@ MODULE_HOOK(uipc_socket_50_setopt1_hook,
 (int, struct socket *, const struct sockopt *));
 MODULE_HOOK(uipc_socket_50_getopt1_hook, int,
 (int, struct socket *, struct sockopt *));
-MODULE_HOOK(uipc_socket_50_sbts_hook, int, (int, struct mbuf **));
+MODULE_HOOK(uipc_socket_50_sbts_hook, int, (int, struct mbuf ***));
 
 /*
  * uipc_syscalls_50 compatibility

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.613 src/sys/sys/param.h:1.614
--- src/sys/sys/param.h:1.613	Sun Sep 22 22:59:40 2019
+++ src/sys/sys/param.h	Fri Sep 27 00:32:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.613 2019/09/22 22:59:40 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.614 2019/09/27 00:32:03 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	999001300	/* NetBSD 9.99.13 */
+#define	__NetBSD_Version__	999001400	/* NetBSD 9.99.14 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/rump

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 22:43:37 UTC 2019

Modified Files:
src/sys/rump: listsrcdirs

Log Message:
rtadvd needs expandm.[hc] from libwrap.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/rump/listsrcdirs

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

Modified files:

Index: src/sys/rump/listsrcdirs
diff -u src/sys/rump/listsrcdirs:1.46 src/sys/rump/listsrcdirs:1.47
--- src/sys/rump/listsrcdirs:1.46	Thu Sep 26 22:39:55 2019
+++ src/sys/rump/listsrcdirs	Thu Sep 26 22:43:36 2019
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: listsrcdirs,v 1.46 2019/09/26 22:39:55 bad Exp $
+#	$NetBSD: listsrcdirs,v 1.47 2019/09/26 22:43:36 bad Exp $
 #
 
 #
@@ -117,7 +117,7 @@ lsrc posix /usr.bin/		rump_server rump_a
 # dist directory consisting ~90% (50+MB) of tests unnecessary to us
 lsrc usr /lib/			i18n_module
 lsrc usr /lib/lib		crypt ipsec kvm m npf pci prop
-lsrc usr /lib/lib		pthread rmt y z
+lsrc usr /lib/lib		pthread rmt wrap y z
 lsrc usr /libexec/		ld.elf_so
 lsrc usr /bin/			chmod cp dd df ed ln ls mkdir mv pax
 lsrc usr /bin/			rm rmdir



CVS commit: src/sys/rump

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 22:43:37 UTC 2019

Modified Files:
src/sys/rump: listsrcdirs

Log Message:
rtadvd needs expandm.[hc] from libwrap.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/rump/listsrcdirs

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



CVS commit: src/sys/rump

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 22:39:55 UTC 2019

Modified Files:
src/sys/rump: listsrcdirs

Log Message:
revert r1.35-r1.40 of sys/rump/listsrcdirs.

addressed differently in tools/Makefile r1.204.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/rump/listsrcdirs

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

Modified files:

Index: src/sys/rump/listsrcdirs
diff -u src/sys/rump/listsrcdirs:1.45 src/sys/rump/listsrcdirs:1.46
--- src/sys/rump/listsrcdirs:1.45	Thu Sep 12 21:37:06 2019
+++ src/sys/rump/listsrcdirs	Thu Sep 26 22:39:55 2019
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: listsrcdirs,v 1.45 2019/09/12 21:37:06 bad Exp $
+#	$NetBSD: listsrcdirs,v 1.46 2019/09/26 22:39:55 bad Exp $
 #
 
 #
@@ -99,14 +99,12 @@ lsrc sys /lib/lib		c util
 lsrc sys /external/bsd/		flex mdocml byacc
 lsrc sys /external/cddl/	osnet
 lsrc sys /external/historical/	nawk
-lsrc sys /external/public-domain/	xz
-lsrc sys /bin/			cat pax
+lsrc sys /bin/			cat
 lsrc sys /usr.bin/		make xinstall config mktemp sed tsort
 lsrc sys /usr.bin/		lorder join cksum m4 mkdep Makefile.inc
 lsrc sys /usr.bin/		rpcgen rump_wmd
-lsrc sys /usr.bin/		genassym grep stat uname
+lsrc sys /usr.bin/		genassym stat uname
 lsrc sys /usr.sbin/		mtree
-lsrc sys /sbin/			mknod
 
 # sources hosted in the NetBSD tree that are required/useful
 # when targeting POSIX-y platforms
@@ -121,12 +119,12 @@ lsrc usr /lib/			i18n_module
 lsrc usr /lib/lib		crypt ipsec kvm m npf pci prop
 lsrc usr /lib/lib		pthread rmt y z
 lsrc usr /libexec/		ld.elf_so
-lsrc usr /bin/			chmod cp dd df ed ln ls mkdir mv
+lsrc usr /bin/			chmod cp dd df ed ln ls mkdir mv pax
 lsrc usr /bin/			rm rmdir
 lsrc usr /sbin/			brconfig cgdconfig chown
 lsrc usr /sbin/			disklabel dump fdisk
 lsrc usr /sbin/			fsck fsck_ext2fs fsck_ffs fsck_msdos
-lsrc usr /sbin/			ifconfig
+lsrc usr /sbin/			ifconfig mknod
 lsrc usr /sbin/			modstat mount
 lsrc usr /sbin/			mount_ext2fs mount_ffs mount_msdos mount_tmpfs
 lsrc usr /sbin/			newfs newfs_ext2fs newfs_msdos



CVS commit: src/sys/rump

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 22:39:55 UTC 2019

Modified Files:
src/sys/rump: listsrcdirs

Log Message:
revert r1.35-r1.40 of sys/rump/listsrcdirs.

addressed differently in tools/Makefile r1.204.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/rump/listsrcdirs

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



CVS commit: src/usr.bin/make

2019-09-26 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Thu Sep 26 21:09:55 UTC 2019

Modified Files:
src/usr.bin/make: parse.c

Log Message:
Do not assume safe to pass NULL to realpath(3).

PR: 54574
Reviewed by: buhrow


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/usr.bin/make/parse.c

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

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.232 src/usr.bin/make/parse.c:1.233
--- src/usr.bin/make/parse.c:1.232	Tue Apr  9 18:28:10 2019
+++ src/usr.bin/make/parse.c	Thu Sep 26 21:09:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.232 2019/04/09 18:28:10 sjg Exp $	*/
+/*	$NetBSD: parse.c,v 1.233 2019/09/26 21:09:55 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.232 2019/04/09 18:28:10 sjg Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.233 2019/09/26 21:09:55 sjg Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.232 2019/04/09 18:28:10 sjg Exp $");
+__RCSID("$NetBSD: parse.c,v 1.233 2019/09/26 21:09:55 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -670,6 +670,7 @@ ParseVErrorInternal(FILE *f, const char 
 const char *fmt, va_list ap)
 {
 	static Boolean fatal_warning_error_printed = FALSE;
+	char dirbuf[MAXPATHLEN+1];
 
 	(void)fprintf(f, "%s: ", progname);
 
@@ -688,9 +689,7 @@ ParseVErrorInternal(FILE *f, const char 
 			if (dir == NULL)
 dir = ".";
 			if (*dir != '/') {
-dir = cp2 = realpath(dir, NULL);
-free(cp);
-cp = cp2; /* cp2 set to NULL by Var_Value */
+dir = realpath(dir, dirbuf);
 			}
 			fname = Var_Value(".PARSEFILE", VAR_GLOBAL, &cp2);
 			if (fname == NULL) {



CVS commit: src/usr.bin/make

2019-09-26 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Thu Sep 26 21:09:55 UTC 2019

Modified Files:
src/usr.bin/make: parse.c

Log Message:
Do not assume safe to pass NULL to realpath(3).

PR: 54574
Reviewed by: buhrow


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/usr.bin/make/parse.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-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 20:57:19 UTC 2019

Modified Files:
src/sys/fs/ptyfs: ptyfs_vnops.c
src/sys/sys: vnode.h

Log Message:
provide VNOVALSIZE and VNOVALFLAGS to avoid casting in source.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/fs/ptyfs/ptyfs_vnops.c
cvs rdiff -u -r1.281 -r1.282 src/sys/sys/vnode.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/fs/ptyfs/ptyfs_vnops.c
diff -u src/sys/fs/ptyfs/ptyfs_vnops.c:1.56 src/sys/fs/ptyfs/ptyfs_vnops.c:1.57
--- src/sys/fs/ptyfs/ptyfs_vnops.c:1.56	Thu Sep 26 14:35:48 2019
+++ src/sys/fs/ptyfs/ptyfs_vnops.c	Thu Sep 26 16:57:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_vnops.c,v 1.56 2019/09/26 18:35:48 christos Exp $	*/
+/*	$NetBSD: ptyfs_vnops.c,v 1.57 2019/09/26 20:57:19 christos Exp $	*/
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.56 2019/09/26 18:35:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.57 2019/09/26 20:57:19 christos Exp $");
 
 #include 
 #include 
@@ -405,7 +405,7 @@ ptyfs_setattr(void *v)
 	kauth_action_t action = KAUTH_VNODE_WRITE_FLAGS;
 	bool changing_sysflags = false;
 
-	if (vap->va_size != (u_quad_t)VNOVAL) {
+	if (vap->va_size != VNOVALSIZE) {
  		switch (ptyfs->ptyfs_type) {
  		case PTYFSroot:
  			return EISDIR;
@@ -417,7 +417,7 @@ ptyfs_setattr(void *v)
 		}
 	}
 
-	if (vap->va_flags != (u_quad_t)VNOVAL) {
+	if (vap->va_flags != VNOVALFLAGS) {
 		if (vp->v_mount->mnt_flag & MNT_RDONLY)
 			return EROFS;
 

Index: src/sys/sys/vnode.h
diff -u src/sys/sys/vnode.h:1.281 src/sys/sys/vnode.h:1.282
--- src/sys/sys/vnode.h:1.281	Tue Jan  1 05:06:54 2019
+++ src/sys/sys/vnode.h	Thu Sep 26 16:57:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode.h,v 1.281 2019/01/01 10:06:54 hannken Exp $	*/
+/*	$NetBSD: vnode.h,v 1.282 2019/09/26 20:57:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -277,6 +277,8 @@ struct vattr {
  * Token indicating no attribute value yet assigned.
  */
 #define	VNOVAL	(-1)
+#define VNOVALSIZE ((u_quad_t)-1)
+#define VNOVALFLAGS ((u_long)-1)
 
 /*
  * Convert between vnode types and inode formats (since POSIX.1



CVS commit: src/sys

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 20:57:19 UTC 2019

Modified Files:
src/sys/fs/ptyfs: ptyfs_vnops.c
src/sys/sys: vnode.h

Log Message:
provide VNOVALSIZE and VNOVALFLAGS to avoid casting in source.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/fs/ptyfs/ptyfs_vnops.c
cvs rdiff -u -r1.281 -r1.282 src/sys/sys/vnode.h

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 20:11:10 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: arm-nbsd-nat.c

Log Message:
Validate register number before fetching/storing it (Gopikrishnan Sidhardhan)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 20:11:10 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: arm-nbsd-nat.c

Log Message:
Validate register number before fetching/storing it (Gopikrishnan Sidhardhan)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.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/gpl3/gdb/dist/gdb/arm-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.12 src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.13
--- src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.12	Sat Aug 31 16:16:25 2019
+++ src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c	Thu Sep 26 16:11:10 2019
@@ -49,6 +49,24 @@ public:
 
 static arm_nbsd_nat_target the_arm_nbsd_nat_target;
 
+/* Determine if PT_GETREGS fetches REGNUM.  */
+
+static bool
+getregs_supplies (int regnum)
+{
+  return ((regnum >= ARM_A1_REGNUM && regnum <= ARM_PC_REGNUM)
+	  || regnum == ARM_PS_REGNUM);
+}
+
+/* Determine if PT_GETFPREGS fetches REGNUM.  */
+
+static bool
+getfpregs_supplies (int regnum)
+{
+  return ((regnum >= ARM_D0_REGNUM && regnum <= ARM_D31_REGNUM)
+	  || regnum == ARM_FPSCR_REGNUM);
+}
+
 extern int arm_apcs_32;
 
 #define FPSCR(r) ((char *) &(r)->fpr_vfp.vfp_fpscr)
@@ -256,10 +274,12 @@ arm_nbsd_nat_target::fetch_registers (st
 {
   if (regno >= 0)
 {
-  if (regno >= ARM_D0_REGNUM && regno <= ARM_FPSCR_REGNUM)
+  if (getregs_supplies (regno))
+	fetch_register (regcache, regno);
+  else if (getfpregs_supplies (regno))
 	fetch_fp_register (regcache, regno);
   else
-	fetch_register (regcache, regno);
+warning (_("unable to fetch register %d"), regno);
 }
   else
 {
@@ -442,10 +462,12 @@ arm_nbsd_nat_target::store_registers (st
 {
   if (regno >= 0)
 {
-  if (regno >= ARM_D0_REGNUM && regno <= ARM_FPSCR_REGNUM)
+  if (getregs_supplies (regno))
+	store_register (regcache, regno);
+  else if (getfpregs_supplies (regno))
 	store_fp_register (regcache, regno);
   else
-	store_register (regcache, regno);
+warning (_("unable to store register %d"), regno);
 }
   else
 {



CVS commit: [netbsd-9] src/doc

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:16:40 UTC 2019

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

Log Message:
Tickets #241 - #249


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.60 -r1.1.2.61 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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:16:40 UTC 2019

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

Log Message:
Tickets #241 - #249


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.60 -r1.1.2.61 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.60 src/doc/CHANGES-9.0:1.1.2.61
--- src/doc/CHANGES-9.0:1.1.2.60	Wed Sep 25 15:47:36 2019
+++ src/doc/CHANGES-9.0	Thu Sep 26 19:16:40 2019
@@ -1,5 +1,5 @@
 
-# $NetBSD: CHANGES-9.0,v 1.1.2.60 2019/09/25 15:47:36 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.61 2019/09/26 19:16:40 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -3969,3 +3969,87 @@ usr.sbin/postinstall/postinstall.in		1.6
 	(instead of host directory).
 	[nakayama, ticket #240]
 
+sys/arch/x86/include/specialreg.h		1.151-1.153
+sys/arch/x86/x86/spectre.c			1.30
+usr.sbin/cpuctl/arch/i386.c			1.105
+
+	Decode AMD Processor Capacity Parameters and Extended Features
+	(CPUID Fn8000_0008 %ebx).
+	[msaitoh, ticket #241]
+
+sys/arch/x86/x86/identcpu.c			1.94
+usr.sbin/cpuctl/arch/i386.c			1.106
+
+	Call cpu_dcp_cacheinfo() only when the cpuid Topology Extension flag is
+	set on AMD processors.
+	[msaitoh, ticket #242]
+
+sys/dev/pci/pci_subr.c1.216,1.217
+
+	Print some DPC register values not with %04x but with %08x
+	because those are 32bit.
+	[msaitoh, ticket #243]
+
+sys/dev/i2c/ihidev.c1.8
+
+	Abort attach if acpi_intr_establish() fails.
+	[bouyer, ticket #244]
+
+distrib/sets/lists/base/mi			1.1211
+sys/dev/microcode/radeon/BONAIRE_uvd.bin	1.2
+sys/dev/microcode/radeon/Makefile		1.4
+sys/dev/microcode/radeon/R600_uvd.bin		1.1
+sys/dev/microcode/radeon/RS780_uvd.bin		1.1
+sys/dev/microcode/radeon/RV770_uvd.bin		1.1
+sys/dev/microcode/radeon/TAHITI_vce.bin		1.1
+
+	Update radeon firmware:
+	 - BONAIRE_uvd.bin updated to latest
+	 - add TAHITI_vce.bin, RV770_uvd.bin, RS780_uvd.bin and R600_uvd.bin.
+	[msaitoh, ticket #245]
+
+sys/dev/pci/ixgbe/ixgbe_type.h			1.42-1.43
+sys/dev/pci/ixgbe/ixgbe.c			1.209-1.213
+sys/dev/pci/ixgbe/ixgbe_x550.c			1.16
+sys/dev/pci/ixgbe/ixv.c1.131-1.138
+sys/dev/pci/ixgbe/ixgbe_vf.c			1.19-1.22
+sys/dev/pci/ixgbe/ixgbe_vf.h			1.14
+sys/dev/pci/ixgbe/ixgbe.h			1.57-1.58
+share/man/man4/ixv.41.5
+
+	- Fix a bug that MBSDC (Bad SFD Count) isn't counted on X550EM_X and
+	  X550EM_A. The register is for X550 and newer.
+	- ixv(4): Make SIOCADDMULTI returns ENOSPC and print error message
+	  when the Ethernet multicast address list exceeds the limit(30) and
+	  can't be ALLMULTI.
+	- ixv(4): SIOCZIFDATA clear the event counters as ixgbe.c.
+	- Reduce ixv(4)'s multicast table array size in ixv_set_multi from
+	  MAX_NUM_MULTICAST_ADDRESSES(128) to IXGBE_MAX_VF_MC(30).
+	- ixv(4): Add support ALLMULTI and PROMISC.
+	- if_flags is neither int nor short. It's unsigned short.
+	- ixg(4): Fix a bug that the multicast filter isn't correctly
+	  initialized when the total number of the Ethernet multicast
+	  addresses is just 128.
+	- Make ixv_set_multi() work correctly (especially for PROMISC) when the
+	  function is called from if_init().
+	- Remove *_set_promisc() and use *_set_multi(). And then, rename
+	  *_set_multi() to *_set_rxfilter().
+	- ixv(4): If a multicast entry has range, use ALLMULTI like others.
+	- Fix typo in comment. Found by Wataru Ashihara.
+	[msaitoh, ticket #246]
+
+sys/dev/pci/if_mcx.c1.2
+
+	Use IFM_50G_SR2.
+	[msaitoh, ticket #247]
+
+sys/dev/ic/nvme.c1.46
+
+	nvme(4): don't attach the device if namespace is not found.
+	[nonaka, ticket #248]
+
+sys/stand/efiboot/efiboot.c			1.17
+
+	Do a full reset of the console at startup.
+	[jmcneill, ticket #249]
+



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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:15:18 UTC 2019

Modified Files:
src/sys/stand/efiboot [netbsd-9]: efiboot.c

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

sys/stand/efiboot/efiboot.c: revision 1.17

Do a full reset of the console at startup


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/stand/efiboot/efiboot.c

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

Modified files:

Index: src/sys/stand/efiboot/efiboot.c
diff -u src/sys/stand/efiboot/efiboot.c:1.16 src/sys/stand/efiboot/efiboot.c:1.16.4.1
--- src/sys/stand/efiboot/efiboot.c:1.16	Sun Apr 21 22:30:41 2019
+++ src/sys/stand/efiboot/efiboot.c	Thu Sep 26 19:15:18 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: efiboot.c,v 1.16 2019/04/21 22:30:41 thorpej Exp $ */
+/* $NetBSD: efiboot.c,v 1.16.4.1 2019/09/26 19:15:18 martin Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -68,7 +68,10 @@ efi_main(EFI_HANDLE imageHandle, EFI_SYS
 
 	InitializeLib(imageHandle, systemTable);
 
-	(void)uefi_call_wrapper(ST->ConOut->Reset, 2, ST->ConOut, FALSE);
+	uefi_call_wrapper(ST->ConOut->Reset, 2, ST->ConOut, TRUE);
+	uefi_call_wrapper(ST->ConOut->SetMode, 2, ST->ConOut, 0);
+	uefi_call_wrapper(ST->ConOut->EnableCursor, 2, ST->ConOut, TRUE);
+	uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
 
 	status = uefi_call_wrapper(BS->AllocatePages, 4, AllocateAnyPages, EfiLoaderData, sz, &heap_start);
 	if (EFI_ERROR(status))



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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:15:18 UTC 2019

Modified Files:
src/sys/stand/efiboot [netbsd-9]: efiboot.c

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

sys/stand/efiboot/efiboot.c: revision 1.17

Do a full reset of the console at startup


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/stand/efiboot/efiboot.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/ic

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:13:14 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-9]: nvme.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #248):

sys/dev/ic/nvme.c: revision 1.46

nvme(4): Don't attach the device, if namespace not found.


To generate a diff of this commit:
cvs rdiff -u -r1.44.2.1 -r1.44.2.2 src/sys/dev/ic/nvme.c

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

Modified files:

Index: src/sys/dev/ic/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.44.2.1 src/sys/dev/ic/nvme.c:1.44.2.2
--- src/sys/dev/ic/nvme.c:1.44.2.1	Sun Sep 22 12:18:56 2019
+++ src/sys/dev/ic/nvme.c	Thu Sep 26 19:13:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme.c,v 1.44.2.1 2019/09/22 12:18:56 martin Exp $	*/
+/*	$NetBSD: nvme.c,v 1.44.2.2 2019/09/26 19:13:14 martin Exp $	*/
 /*	$OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.44.2.1 2019/09/22 12:18:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.44.2.2 2019/09/26 19:13:14 martin Exp $");
 
 #include 
 #include 
@@ -399,6 +399,10 @@ nvme_attach(struct nvme_softc *sc)
 		aprint_error_dev(sc->sc_dev, "unable to identify controller\n");
 		goto disable;
 	}
+	if (sc->sc_nn == 0) {
+		aprint_error_dev(sc->sc_dev, "namespace not found\n");
+		goto disable;
+	}
 
 	/* we know how big things are now */
 	sc->sc_max_sgl = sc->sc_mdts / sc->sc_mps;



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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:13:14 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-9]: nvme.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #248):

sys/dev/ic/nvme.c: revision 1.46

nvme(4): Don't attach the device, if namespace not found.


To generate a diff of this commit:
cvs rdiff -u -r1.44.2.1 -r1.44.2.2 src/sys/dev/ic/nvme.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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:09:58 UTC 2019

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

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

sys/dev/pci/if_mcx.c: revision 1.2

Use IFM_50G_SR2.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:09:58 UTC 2019

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

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

sys/dev/pci/if_mcx.c: revision 1.2

Use IFM_50G_SR2.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 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.2 src/sys/dev/pci/if_mcx.c:1.1.2.3
--- src/sys/dev/pci/if_mcx.c:1.1.2.2	Mon Sep 23 07:04:40 2019
+++ src/sys/dev/pci/if_mcx.c	Thu Sep 26 19:09:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mcx.c,v 1.1.2.2 2019/09/23 07:04:40 martin Exp $ */
+/*	$NetBSD: if_mcx.c,v 1.1.2.3 2019/09/26 19:09:57 martin Exp $ */
 /*	$OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
 
 /*
@@ -2159,7 +2159,7 @@ static const uint64_t mcx_eth_cap_map[] 
 	IFM_40G_SR4,
 	IFM_40G_LR4,
 	0,
-	0, /* IFM_50G_SR2 */
+	IFM_50G_SR2,
 	0,
 	IFM_100G_CR4,
 	IFM_100G_SR4,



CVS commit: [netbsd-9] src

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:07:23 UTC 2019

Modified Files:
src/share/man/man4 [netbsd-9]: ixv.4
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c ixgbe.h ixgbe_type.h
ixgbe_vf.c ixgbe_vf.h ixgbe_x550.c ixv.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #246:

sys/dev/pci/ixgbe/ixgbe_type.h  1.42-1.43
sys/dev/pci/ixgbe/ixgbe.c   1.209-1.213
sys/dev/pci/ixgbe/ixgbe_x550.c  1.16
sys/dev/pci/ixgbe/ixv.c 1.131-1.138
sys/dev/pci/ixgbe/ixgbe_vf.c1.19-1.22
sys/dev/pci/ixgbe/ixgbe_vf.h1.14
sys/dev/pci/ixgbe/ixgbe.h   1.57-1.58
share/man/man4/ixv.41.5

- Fix a bug that MBSDC (Bad SFD Count) isn't counted on X550EM_X and
  X550EM_A. The register is for X550 and newer.
- ixv(4): Make SIOCADDMULTI returns ENOSPC and print error message
  when the Ethernet multicast address list exceeds the limit(30) and
  can't be ALLMULTI.
- ixv(4): SIOCZIFDATA clear the event counters as ixgbe.c.
- Reduce ixv(4)'s multicast table array size in ixv_set_multi from
  MAX_NUM_MULTICAST_ADDRESSES(128) to IXGBE_MAX_VF_MC(30).
- ixv(4): Add support ALLMULTI and PROMISC.
- if_flags is neither int nor short. It's unsigned short.
- ixg(4): Fix a bug that the multicast filter isn't correctly
  initialized when the total number of the Ethernet multicast
  addresses is just 128.
- Make ixv_set_multi() work correctly (especially for PROMISC) when the
  function is called from if_init().
- Remove *_set_promisc() and use *_set_multi(). And then, rename
  *_set_multi() to *_set_rxfilter().
- ixv(4): If a multicast entry has range, use ALLMULTI like others.
- Fix typo in comment. Found by Wataru Ashihara.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/share/man/man4/ixv.4
cvs rdiff -u -r1.199.2.4 -r1.199.2.5 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.56 -r1.56.2.1 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.13 -r1.13.8.1 src/sys/dev/pci/ixgbe/ixgbe_vf.h
cvs rdiff -u -r1.15 -r1.15.2.1 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.125.2.3 -r1.125.2.4 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/share/man/man4/ixv.4
diff -u src/share/man/man4/ixv.4:1.4 src/share/man/man4/ixv.4:1.4.2.1
--- src/share/man/man4/ixv.4:1.4	Thu Jul 18 03:52:26 2019
+++ src/share/man/man4/ixv.4	Thu Sep 26 19:07:23 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ixv.4,v 1.4 2019/07/18 03:52:26 msaitoh Exp $
+.\"	$NetBSD: ixv.4,v 1.4.2.1 2019/09/26 19:07:23 martin Exp $
 .\"
 .\" Copyright (c) 2018 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 18, 2019
+.Dd September 5, 2019
 .Dt IXV 4
 .Os
 .Sh NAME
@@ -61,3 +61,20 @@ The
 .Nm
 driver was written by
 .An Intel Corporation Aq Mt freebsd...@mailbox.intel.com .
+.Sh BUGS
+The following event counters are not cleared by
+.Dv SIOCZIFDATA
+because the corresponding registers are read only and not cleared on read:
+.Pp
+.Bl -item -offset indent -compact
+.It
+Good Packets Received
+.It
+Good Octets Received
+.It
+Multicast Packets Received
+.It
+Good Packets Transmitted
+.It
+Good Octets Transmitted
+.El

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.4 src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.5
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.4	Thu Sep  5 09:11:03 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Sep 26 19:07:22 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.199.2.4 2019/09/05 09:11:03 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199.2.5 2019/09/26 19:07:22 martin Exp $ */
 
 /**
 
@@ -211,8 +211,7 @@ static void	ixgbe_initialize_rss_mapping
 static void	ixgbe_enable_intr(struct adapter *);
 static void	ixgbe_disable_intr(struct adapter *);
 static void	ixgbe_update_stats_counters(struct adapter *);
-static void	ixgbe_set_promisc(struct adapter *);
-static void	ixgbe_set_multi(struct adapter *);
+static void	ixgbe_set_rxfilter(struct adapter *);
 static void	ixgbe_update_link_status(struct adapter *);
 static void	ixgbe_set_ivar(struct adapter *, u8, u8, s8);
 static void	ixgbe_configure_ivars(struct adapter *);
@@ -1571,7 +1570,7 @@ ixgbe_update_stats_counters(struct adapt
 	stats->illerrc.ev_count += IXGBE_READ_REG(hw, IXGBE_ILLERRC);
 	stats->errbc.ev_count += IXGBE_READ_REG(hw, IXGBE_ERRBC);
 	stats->mspdc.ev_count += IXGBE_READ_REG(hw, IXGBE_MSPDC);
-	if (hw->mac.type == ixgbe_mac_X

CVS commit: [netbsd-9] src

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:07:23 UTC 2019

Modified Files:
src/share/man/man4 [netbsd-9]: ixv.4
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c ixgbe.h ixgbe_type.h
ixgbe_vf.c ixgbe_vf.h ixgbe_x550.c ixv.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #246:

sys/dev/pci/ixgbe/ixgbe_type.h  1.42-1.43
sys/dev/pci/ixgbe/ixgbe.c   1.209-1.213
sys/dev/pci/ixgbe/ixgbe_x550.c  1.16
sys/dev/pci/ixgbe/ixv.c 1.131-1.138
sys/dev/pci/ixgbe/ixgbe_vf.c1.19-1.22
sys/dev/pci/ixgbe/ixgbe_vf.h1.14
sys/dev/pci/ixgbe/ixgbe.h   1.57-1.58
share/man/man4/ixv.41.5

- Fix a bug that MBSDC (Bad SFD Count) isn't counted on X550EM_X and
  X550EM_A. The register is for X550 and newer.
- ixv(4): Make SIOCADDMULTI returns ENOSPC and print error message
  when the Ethernet multicast address list exceeds the limit(30) and
  can't be ALLMULTI.
- ixv(4): SIOCZIFDATA clear the event counters as ixgbe.c.
- Reduce ixv(4)'s multicast table array size in ixv_set_multi from
  MAX_NUM_MULTICAST_ADDRESSES(128) to IXGBE_MAX_VF_MC(30).
- ixv(4): Add support ALLMULTI and PROMISC.
- if_flags is neither int nor short. It's unsigned short.
- ixg(4): Fix a bug that the multicast filter isn't correctly
  initialized when the total number of the Ethernet multicast
  addresses is just 128.
- Make ixv_set_multi() work correctly (especially for PROMISC) when the
  function is called from if_init().
- Remove *_set_promisc() and use *_set_multi(). And then, rename
  *_set_multi() to *_set_rxfilter().
- ixv(4): If a multicast entry has range, use ALLMULTI like others.
- Fix typo in comment. Found by Wataru Ashihara.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/share/man/man4/ixv.4
cvs rdiff -u -r1.199.2.4 -r1.199.2.5 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.56 -r1.56.2.1 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.13 -r1.13.8.1 src/sys/dev/pci/ixgbe/ixgbe_vf.h
cvs rdiff -u -r1.15 -r1.15.2.1 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.125.2.3 -r1.125.2.4 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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:04:00 UTC 2019

Modified Files:
src/distrib/sets/lists/base [netbsd-9]: mi
src/sys/dev/microcode/radeon [netbsd-9]: Makefile
Added Files:
src/sys/dev/microcode/radeon [netbsd-9]: R600_uvd.bin RS780_uvd.bin
RV770_uvd.bin TAHITI_vce.bin

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

sys/dev/microcode/radeon/R600_uvd.bin: revision 1.1
sys/dev/microcode/radeon/RV770_uvd.bin: revision 1.1
sys/dev/microcode/radeon/Makefile: revision 1.4
distrib/sets/lists/base/mi: revision 1.1211
sys/dev/microcode/radeon/TAHITI_vce.bin: revision 1.1
sys/dev/microcode/radeon/RS780_uvd.bin: revision 1.1
sys/dev/microcode/radeon/BONAIRE_uvd.bin: revision 1.2

Update BONAIRE_uvd.bin to the latest.

 -

Add missing TAHITI_vce.bin, RV770_uvd.bin, RS780_uvd.bin and R600_uvd.bin.

Fix panic on my own HP EliteDesk 705 G1 SFF. It also fixes PR kern/53988
reported by Onno van der Linden.


To generate a diff of this commit:
cvs rdiff -u -r1.1209.2.2 -r1.1209.2.3 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.3 -r1.3.24.1 src/sys/dev/microcode/radeon/Makefile
cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/microcode/radeon/R600_uvd.bin \
src/sys/dev/microcode/radeon/RS780_uvd.bin \
src/sys/dev/microcode/radeon/RV770_uvd.bin \
src/sys/dev/microcode/radeon/TAHITI_vce.bin

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



CVS commit: [netbsd-9] src

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 19:04:00 UTC 2019

Modified Files:
src/distrib/sets/lists/base [netbsd-9]: mi
src/sys/dev/microcode/radeon [netbsd-9]: Makefile
Added Files:
src/sys/dev/microcode/radeon [netbsd-9]: R600_uvd.bin RS780_uvd.bin
RV770_uvd.bin TAHITI_vce.bin

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

sys/dev/microcode/radeon/R600_uvd.bin: revision 1.1
sys/dev/microcode/radeon/RV770_uvd.bin: revision 1.1
sys/dev/microcode/radeon/Makefile: revision 1.4
distrib/sets/lists/base/mi: revision 1.1211
sys/dev/microcode/radeon/TAHITI_vce.bin: revision 1.1
sys/dev/microcode/radeon/RS780_uvd.bin: revision 1.1
sys/dev/microcode/radeon/BONAIRE_uvd.bin: revision 1.2

Update BONAIRE_uvd.bin to the latest.

 -

Add missing TAHITI_vce.bin, RV770_uvd.bin, RS780_uvd.bin and R600_uvd.bin.

Fix panic on my own HP EliteDesk 705 G1 SFF. It also fixes PR kern/53988
reported by Onno van der Linden.


To generate a diff of this commit:
cvs rdiff -u -r1.1209.2.2 -r1.1209.2.3 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.3 -r1.3.24.1 src/sys/dev/microcode/radeon/Makefile
cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/microcode/radeon/R600_uvd.bin \
src/sys/dev/microcode/radeon/RS780_uvd.bin \
src/sys/dev/microcode/radeon/RV770_uvd.bin \
src/sys/dev/microcode/radeon/TAHITI_vce.bin

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1209.2.2 src/distrib/sets/lists/base/mi:1.1209.2.3
--- src/distrib/sets/lists/base/mi:1.1209.2.2	Sun Sep  1 10:44:23 2019
+++ src/distrib/sets/lists/base/mi	Thu Sep 26 19:04:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1209.2.2 2019/09/01 10:44:23 martin Exp $
+# $NetBSD: mi,v 1.1209.2.3 2019/09/26 19:04:00 martin Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -369,6 +369,7 @@
 ./libdata/firmware/radeon/R600_me.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/R600_pfp.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/R600_rlc.bin		base-firmware-usr	radeonfirmware
+./libdata/firmware/radeon/R600_uvd.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/R700_rlc.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/REDWOOD_me.bin	base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/REDWOOD_pfp.bin	base-firmware-usr	radeonfirmware
@@ -378,6 +379,7 @@
 ./libdata/firmware/radeon/RS690_cp.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/RS780_me.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/RS780_pfp.bin		base-firmware-usr	radeonfirmware
+./libdata/firmware/radeon/RS780_uvd.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/RV610_me.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/RV610_pfp.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/RV620_me.bin		base-firmware-usr	radeonfirmware
@@ -399,6 +401,7 @@
 ./libdata/firmware/radeon/RV770_me.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/RV770_pfp.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/RV770_smc.bin		base-firmware-usr	radeonfirmware
+./libdata/firmware/radeon/RV770_uvd.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/SUMO2_me.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/SUMO2_pfp.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/SUMO_me.bin		base-firmware-usr	radeonfirmware
@@ -413,6 +416,7 @@
 ./libdata/firmware/radeon/TAHITI_rlc.bin	base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/TAHITI_smc.bin	base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/TAHITI_uvd.bin	base-firmware-usr	radeonfirmware
+./libdata/firmware/radeon/TAHITI_vce.bin	base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/TURKS_mc.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/TURKS_me.bin		base-firmware-usr	radeonfirmware
 ./libdata/firmware/radeon/TURKS_pfp.bin		base-firmware-usr	radeonfirmware

Index: src/sys/dev/microcode/radeon/Makefile
diff -u src/sys/dev/microcode/radeon/Makefile:1.3 src/sys/dev/microcode/radeon/Makefile:1.3.24.1
--- src/sys/dev/microcode/radeon/Makefile:1.3	Sun Apr 26 21:37:22 2015
+++ src/sys/dev/microcode/radeon/Makefile	Thu Sep 26 19:04:00 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2015/04/26 21:37:22 mrg Exp $
+#	$NetBSD: Makefile,v 1.3.24.1 2019/09/26 19:04:00 martin Exp $
 
 NOMAN=	# defined
 
@@ -14,8 +14,8 @@ FILES=	\
 	R520_cp.bin \
 	RS600_cp.bin \
 	RS690_cp.bin \
-	R600_me.bin R600_pfp.bin R600_rlc.bin \
-	RS780_me.bin RS780_pfp.bin \
+	R600_me.bin R600_pfp.bin R600_rlc.bin R600_uvd.bin \
+	RS780_me.bin RS780_pfp.bin RS780_uvd.bin \
 	RV610_me.bin RV610_pfp.bin \
 	RV620_me

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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:56:06 UTC 2019

Modified Files:
src/sys/dev/i2c [netbsd-9]: ihidev.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #244):

sys/dev/i2c/ihidev.c: revision 1.8

Abort attach if acpi_intr_establish() fails. From K. Schreiner on
current-users@.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.4.1 src/sys/dev/i2c/ihidev.c

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

Modified files:

Index: src/sys/dev/i2c/ihidev.c
diff -u src/sys/dev/i2c/ihidev.c:1.7 src/sys/dev/i2c/ihidev.c:1.7.4.1
--- src/sys/dev/i2c/ihidev.c:1.7	Fri Nov 16 23:05:50 2018
+++ src/sys/dev/i2c/ihidev.c	Thu Sep 26 18:56:05 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ihidev.c,v 1.7 2018/11/16 23:05:50 jmcneill Exp $ */
+/* $NetBSD: ihidev.c,v 1.7.4.1 2019/09/26 18:56:05 martin Exp $ */
 /* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */
 
 /*-
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.7 2018/11/16 23:05:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.7.4.1 2019/09/26 18:56:05 martin Exp $");
 
 #include 
 #include 
@@ -210,8 +210,10 @@ ihidev_attach(device_t parent, device_t 
 
 		sc->sc_ih = acpi_intr_establish(self, sc->sc_phandle, IPL_TTY,
 		false, ihidev_intr, sc, device_xname(self));
-		if (sc->sc_ih == NULL)
+		if (sc->sc_ih == NULL) {
 			aprint_error_dev(self, "can't establish interrupt\n");
+			return;
+		}
 		aprint_normal_dev(self, "interrupting at %s\n",
 		acpi_intr_string(sc->sc_ih, buf, sizeof(buf)));
 	}



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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:56:06 UTC 2019

Modified Files:
src/sys/dev/i2c [netbsd-9]: ihidev.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #244):

sys/dev/i2c/ihidev.c: revision 1.8

Abort attach if acpi_intr_establish() fails. From K. Schreiner on
current-users@.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.4.1 src/sys/dev/i2c/ihidev.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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:52:58 UTC 2019

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

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

sys/dev/pci/pci_subr.c: revision 1.216
sys/dev/pci/pci_subr.c: revision 1.217

Whitespace fixes. No functional change.

 -

Print some DPC register values not with %04x but with %08x because those
are 32bit.


To generate a diff of this commit:
cvs rdiff -u -r1.215 -r1.215.2.1 src/sys/dev/pci/pci_subr.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/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.215 src/sys/dev/pci/pci_subr.c:1.215.2.1
--- src/sys/dev/pci/pci_subr.c:1.215	Thu Jul 18 07:49:26 2019
+++ src/sys/dev/pci/pci_subr.c	Thu Sep 26 18:52:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.215 2019/07/18 07:49:26 msaitoh Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.215.2.1 2019/09/26 18:52:57 martin Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.215 2019/07/18 07:49:26 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.215.2.1 2019/09/26 18:52:57 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -209,7 +209,7 @@ static const struct pci_class pci_subcla
 
 /* PCI bridge programming interface */
 static const struct pci_class pci_interface_pcibridge[] = {
-	{ "",			PCI_INTERFACE_BRIDGE_PCI_PCI, NULL,	},
+	{ "",			PCI_INTERFACE_BRIDGE_PCI_PCI,	NULL,	},
 	{ "subtractive decode",	PCI_INTERFACE_BRIDGE_PCI_SUBDEC, NULL,	},
 	{ NULL,			0,NULL,	},
 };
@@ -223,8 +223,8 @@ static const struct pci_class pci_interf
 
 /* Advanced Switching programming interface */
 static const struct pci_class pci_interface_advsw[] = {
-	{ "custom interface",	PCI_INTERFACE_ADVSW_CUSTOM, NULL, },
-	{ "ASI-SIG",		PCI_INTERFACE_ADVSW_ASISIG, NULL, },
+	{ "custom interface",	PCI_INTERFACE_ADVSW_CUSTOM,	NULL, },
+	{ "ASI-SIG",		PCI_INTERFACE_ADVSW_ASISIG,	NULL, },
 	{ NULL,			0,NULL,	},
 };
 
@@ -304,7 +304,7 @@ static const struct pci_class pci_subcla
 /*
  * Class 0x08.
  * Base system peripheral.
- */ 
+ */
 
 /* PIC programming interface */
 static const struct pci_class pci_interface_pic[] = {
@@ -429,10 +429,10 @@ static const struct pci_class pci_interf
 
 /* IPMI programming interface */
 static const struct pci_class pci_interface_ipmi[] = {
-	{ "SMIC",		PCI_INTERFACE_IPMI_SMIC,		NULL,},
-	{ "keyboard",		PCI_INTERFACE_IPMI_KBD,			NULL,},
-	{ "block transfer",	PCI_INTERFACE_IPMI_BLOCKXFER,		NULL,},
-	{ NULL,			0,	NULL,},
+	{ "SMIC",		PCI_INTERFACE_IPMI_SMIC,	NULL,	},
+	{ "keyboard",		PCI_INTERFACE_IPMI_KBD,		NULL,	},
+	{ "block transfer",	PCI_INTERFACE_IPMI_BLOCKXFER,	NULL,	},
+	{ NULL,			0,NULL,	},
 };
 
 /* Subclasses */
@@ -478,8 +478,8 @@ static const struct pci_class pci_subcla
 
 /* Intelligent IO programming interface */
 static const struct pci_class pci_interface_i2o[] = {
-	{ "FIFO at offset 0x40", PCI_INTERFACE_I2O_FIFOAT40,		NULL,},
-	{ NULL,			0,	NULL,},
+	{ "FIFO at offset 0x40", PCI_INTERFACE_I2O_FIFOAT40,	NULL,	},
+	{ NULL,			0,NULL,	},
 };
 
 /* Subclasses */
@@ -494,9 +494,9 @@ static const struct pci_class pci_subcla
  * Satellite communication controller.
  */
 static const struct pci_class pci_subclass_satcom[] = {
-	{ "TV",			PCI_SUBCLASS_SATCOM_TV,	 	NULL,	},
-	{ "audio",		PCI_SUBCLASS_SATCOM_AUDIO, 	NULL,	},
-	{ "voice",		PCI_SUBCLASS_SATCOM_VOICE, 	NULL,	},
+	{ "TV",			PCI_SUBCLASS_SATCOM_TV,		NULL,	},
+	{ "audio",		PCI_SUBCLASS_SATCOM_AUDIO,	NULL,	},
+	{ "voice",		PCI_SUBCLASS_SATCOM_VOICE,	NULL,	},
 	{ "data",		PCI_SUBCLASS_SATCOM_DATA,	NULL,	},
 	{ "miscellaneous",	PCI_SUBCLASS_SATCOM_MISC,	NULL,	},
 	{ NULL,			0,NULL,	},
@@ -507,9 +507,9 @@ static const struct pci_class pci_subcla
  * Encryption/Decryption controller.
  */
 static const struct pci_class pci_subclass_crypto[] = {
-	{ "network/computing",	PCI_SUBCLASS_CRYPTO_NETCOMP, 	NULL,	},
+	{ "network/computing",	PCI_SUBCLASS_CRYPTO_NETCOMP,	NULL,	},
 	{ "entertainment",	PCI_SUBCLASS_CRYPTO_ENTERTAINMENT, NULL,},
-	{ "miscellaneous",	PCI_SUBCLASS_CRYPTO_MISC, 	NULL,	},
+	{ "miscellaneous",	PCI_SUBCLASS_CRYPTO_MISC,	NULL,	},
 	{ NULL,			0,NULL,	},
 };
 
@@ -585,7 +585,7 @@ DEV_VERBOSE_DEFINE(pci);
  * a positive value if the dest buffer would have overflowed.
  */
 
-static int __printflike(3,4)
+static int __printflike(3, 4)
 snappendf(char **dest, size_t *len, const char * restrict fmt, ...)
 {
 	va_list	ap;
@@ -609,7 +609,7 @@ snappendf(char **dest, size_t *len, cons
 	/* Update dest & len to point at trailing NUL */
 	*dest += count;
 	*len -= count;
-		
+
 	return 0;
 }
 
@@ -1285,7 +1285,7 @@ pci_conf_print_pcix_cap_2ndbusmode(int n
 		printf("PCI-X 266 (Mode 2)\n");
 	else
 		printf("PCI-X 533 (Mode 2)\n");
-	
+
 	printf("  Error

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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:52:58 UTC 2019

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

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

sys/dev/pci/pci_subr.c: revision 1.216
sys/dev/pci/pci_subr.c: revision 1.217

Whitespace fixes. No functional change.

 -

Print some DPC register values not with %04x but with %08x because those
are 32bit.


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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:50:18 UTC 2019

Modified Files:
src/sys/arch/x86/x86 [netbsd-9]: identcpu.c
src/usr.sbin/cpuctl/arch [netbsd-9]: i386.c

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

usr.sbin/cpuctl/arch/i386.c: revision 1.106
sys/arch/x86/x86/identcpu.c: revision 1.94

Call cpu_dcp_cacheinfo() only when the cpuid Topology Extension flag is set
on AMD processor.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.93.2.1 src/sys/arch/x86/x86/identcpu.c
cvs rdiff -u -r1.104.2.1 -r1.104.2.2 src/usr.sbin/cpuctl/arch/i386.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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:50:18 UTC 2019

Modified Files:
src/sys/arch/x86/x86 [netbsd-9]: identcpu.c
src/usr.sbin/cpuctl/arch [netbsd-9]: i386.c

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

usr.sbin/cpuctl/arch/i386.c: revision 1.106
sys/arch/x86/x86/identcpu.c: revision 1.94

Call cpu_dcp_cacheinfo() only when the cpuid Topology Extension flag is set
on AMD processor.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.93.2.1 src/sys/arch/x86/x86/identcpu.c
cvs rdiff -u -r1.104.2.1 -r1.104.2.2 src/usr.sbin/cpuctl/arch/i386.c

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

Modified files:

Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.93 src/sys/arch/x86/x86/identcpu.c:1.93.2.1
--- src/sys/arch/x86/x86/identcpu.c:1.93	Fri Jul 26 10:03:40 2019
+++ src/sys/arch/x86/x86/identcpu.c	Thu Sep 26 18:50:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.93 2019/07/26 10:03:40 msaitoh Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.93.2.1 2019/09/26 18:50:18 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.93 2019/07/26 10:03:40 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.93.2.1 2019/09/26 18:50:18 martin Exp $");
 
 #include "opt_xen.h"
 
@@ -357,7 +357,8 @@ cpu_probe_amd_cache(struct cpu_info *ci)
 	if (lfunc < 0x801d)
 		return;
 
-	cpu_dcp_cacheinfo(ci, 0x801d);
+	if (ci->ci_feat_val[3] & CPUID_TOPOEXT)
+		cpu_dcp_cacheinfo(ci, 0x801d);
 }
 
 static void

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.104.2.1 src/usr.sbin/cpuctl/arch/i386.c:1.104.2.2
--- src/usr.sbin/cpuctl/arch/i386.c:1.104.2.1	Thu Sep 26 18:47:14 2019
+++ src/usr.sbin/cpuctl/arch/i386.c	Thu Sep 26 18:50:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.104.2.1 2019/09/26 18:47:14 martin Exp $	*/
+/*	$NetBSD: i386.c,v 1.104.2.2 2019/09/26 18:50:18 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.104.2.1 2019/09/26 18:47:14 martin Exp $");
+__RCSID("$NetBSD: i386.c,v 1.104.2.2 2019/09/26 18:50:18 martin Exp $");
 #endif /* not lint */
 
 #include 
@@ -1433,7 +1433,8 @@ amd_cpu_cacheinfo(struct cpu_info *ci)
 	if (lfunc < 0x801d)
 		return;
 
-	cpu_dcp_cacheinfo(ci, 0x801d);
+	if (ci->ci_feat_val[3] & CPUID_TOPOEXT)
+		cpu_dcp_cacheinfo(ci, 0x801d);
 }
 
 static void



CVS commit: [netbsd-9] src

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:47:14 UTC 2019

Modified Files:
src/sys/arch/x86/include [netbsd-9]: specialreg.h
src/sys/arch/x86/x86 [netbsd-9]: spectre.c
src/usr.sbin/cpuctl/arch [netbsd-9]: i386.c

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

sys/arch/x86/include/specialreg.h: revision 1.152
sys/arch/x86/include/specialreg.h: revision 1.153
usr.sbin/cpuctl/arch/i386.c: revision 1.105
sys/arch/x86/x86/spectre.c: revision 1.30
sys/arch/x86/include/specialreg.h: revision 1.151

Add definitions of AMD's CPUID Fn8000_0008 %ebx.
Decode AMD's CPUID Fn8000_0008 %ebx.
Use macro.
Add MCOMMIT instruction.
Define CPUID_CAPEX_FLAGS's bit 10 correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.150.2.1 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.29 -r1.29.2.1 src/sys/arch/x86/x86/spectre.c
cvs rdiff -u -r1.104 -r1.104.2.1 src/usr.sbin/cpuctl/arch/i386.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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:47:14 UTC 2019

Modified Files:
src/sys/arch/x86/include [netbsd-9]: specialreg.h
src/sys/arch/x86/x86 [netbsd-9]: spectre.c
src/usr.sbin/cpuctl/arch [netbsd-9]: i386.c

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

sys/arch/x86/include/specialreg.h: revision 1.152
sys/arch/x86/include/specialreg.h: revision 1.153
usr.sbin/cpuctl/arch/i386.c: revision 1.105
sys/arch/x86/x86/spectre.c: revision 1.30
sys/arch/x86/include/specialreg.h: revision 1.151

Add definitions of AMD's CPUID Fn8000_0008 %ebx.
Decode AMD's CPUID Fn8000_0008 %ebx.
Use macro.
Add MCOMMIT instruction.
Define CPUID_CAPEX_FLAGS's bit 10 correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.150.2.1 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.29 -r1.29.2.1 src/sys/arch/x86/x86/spectre.c
cvs rdiff -u -r1.104 -r1.104.2.1 src/usr.sbin/cpuctl/arch/i386.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/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.150 src/sys/arch/x86/include/specialreg.h:1.150.2.1
--- src/sys/arch/x86/include/specialreg.h:1.150	Fri Jul 26 10:03:40 2019
+++ src/sys/arch/x86/include/specialreg.h	Thu Sep 26 18:47:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.150 2019/07/26 10:03:40 msaitoh Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.150.2.1 2019/09/26 18:47:14 martin Exp $	*/
 
 /*
  * Copyright (c) 2014-2019 The NetBSD Foundation, Inc.
@@ -712,6 +712,39 @@
 	"\11" "TSC"	"\12" "CPB"	"\13" "EffFreq"	"\14" "PROCFI"	  \
 	"\15" "PROCPR"	"\16" "CONNSTBY" "\17" "RAPL"
 
+/*
+ * AMD Processor Capacity Parameters and Extended Features
+ * CPUID Fn8000_0008
+ * %eax: Long Mode Size Identifiers
+ * %ebx: Extended Feature Identifiers
+ * %ecx: Size Identifiers
+ */
+
+/* %ebx */
+#define CPUID_CAPEX_CLZERO	__BIT(0)	/* CLZERO instruction */
+#define CPUID_CAPEX_IRPERF	__BIT(1)	/* InstRetCntMsr */
+#define CPUID_CAPEX_XSAVEERPTR	__BIT(2)	/* RstrFpErrPtrs by XRSTOR */
+#define CPUID_CAPEX_RDPRU	__BIT(4)	/* RDPRU instruction */
+#define CPUID_CAPEX_MCOMMIT	__BIT(8)	/* MCOMMIT instruction */
+#define CPUID_CAPEX_WBNOINVD	__BIT(9)	/* WBNOINVD instruction */
+#define CPUID_CAPEX_IBPB	__BIT(12)	/* Speculation Control IBPB */
+#define CPUID_CAPEX_IBRS	__BIT(14)	/* Speculation Control IBRS */
+#define CPUID_CAPEX_STIBP	__BIT(15)	/* Speculation Control STIBP */
+#define CPUID_CAPEX_IBRS_ALWAYSON __BIT(16)	/* IBRS always on mode */
+#define CPUID_CAPEX_STIBP_ALWAYSON __BIT(17)	/* STIBP always on mode */
+#define CPUID_CAPEX_PREFER_IBRS	__BIT(18)	/* IBRS preferred */
+#define CPUID_CAPEX_SSBD	__BIT(24)	/* Speculation Control SSBD */
+#define CPUID_CAPEX_VIRT_SSBD	__BIT(25)	/* Virt Spec Control SSBD */
+#define CPUID_CAPEX_SSB_NO	__BIT(26)	/* SSBD not required */
+
+#define CPUID_CAPEX_FLAGS	"\20"	 \
+	"\1CLZERO"	"\2IRPERF"	"\3XSAVEERPTR"			 \
+	"\5RDPRU"			"\7B6" \
+	"\11MCOMMIT"	"\12WBNOINVD"	"\13B10"			 \
+	"\15IBPB"	"\16B13"	"\17IBRS"	"\20STIBP"	 \
+	"\21IBRS_ALWAYSON" "\22STIBP_ALWAYSON" "\23PREFER_IBRS"	"\24B19" \
+	"\31SSBD"	"\32VIRT_SSBD"	"\33SSB_NO"
+
 /* AMD Fn800a %edx features (SVM features) */
 #define CPUID_AMD_SVM_NP		0x0001
 #define CPUID_AMD_SVM_LbrVirt		0x0002

Index: src/sys/arch/x86/x86/spectre.c
diff -u src/sys/arch/x86/x86/spectre.c:1.29 src/sys/arch/x86/x86/spectre.c:1.29.2.1
--- src/sys/arch/x86/x86/spectre.c:1.29	Sat Jun  1 06:54:28 2019
+++ src/sys/arch/x86/x86/spectre.c	Thu Sep 26 18:47:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: spectre.c,v 1.29 2019/06/01 06:54:28 maxv Exp $	*/
+/*	$NetBSD: spectre.c,v 1.29.2.1 2019/09/26 18:47:14 martin Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.29 2019/06/01 06:54:28 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.29.2.1 2019/09/26 18:47:14 martin Exp $");
 
 #include "opt_spectre.h"
 
@@ -435,7 +435,7 @@ v4_detect_method(void)
 break;
 			}
 	 		x86_cpuid(0x8008, descs);
-			if (descs[1] & __BIT(26)) {
+			if (descs[1] & CPUID_CAPEX_SSB_NO) {
 /* Not vulnerable to SpectreV4. */
 v4_mitigation_method = V4_MITIGATION_AMD_SSB_NO;
 return;

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.104 src/usr.sbin/cpuctl/arch/i386.c:1.104.2.1
--- src/usr.sbin/cpuctl/arch/i386.c:1.104	Fri Jul 26 10:03:40 2019
+++ src/usr.sbin/cpuctl/arch/i386.c	Thu Sep 26 18:47:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.104 2019/07/26 10:03:40 msaitoh Exp $	*/
+/*	$NetBSD: i386.c,v 1.104.2.1 2019/09/26 18:47:14 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.104 2019/07/26 10:03:40 

CVS commit: src/sys/modules/npf

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 18:45:00 UTC 2019

Modified Files:
src/sys/modules/npf: Makefile

Log Message:
kill WARNS = 3


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/modules/npf/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/modules/npf/Makefile
diff -u src/sys/modules/npf/Makefile:1.24 src/sys/modules/npf/Makefile:1.25
--- src/sys/modules/npf/Makefile:1.24	Wed Jul 24 19:49:08 2019
+++ src/sys/modules/npf/Makefile	Thu Sep 26 14:45:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2019/07/24 23:49:08 rmind Exp $
+# $NetBSD: Makefile,v 1.25 2019/09/26 18:45:00 christos Exp $
 #
 # Public Domain.
 #
@@ -21,6 +21,4 @@ SRCS+=		nvlist.c nvpair.c nv_kern_netbsd
 CPPFLAGS+=	-DINET6
 CPPFLAGS+=	-I${S}/external/bsd/libnv/dist
 
-WARNS=		3
-
 .include 



CVS commit: src/sys/modules/npf

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 18:45:00 UTC 2019

Modified Files:
src/sys/modules/npf: Makefile

Log Message:
kill WARNS = 3


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/modules/npf/Makefile

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



CVS commit: src/sys/net/npf

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 18:44:45 UTC 2019

Modified Files:
src/sys/net/npf: npf_mbuf.c

Log Message:
Cast m_mbuflen() result to "size_t". It could also be "u_int" since it is
assigned to "u_int", but all the other "standalone" equivalent functions return
"size_t".


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/net/npf/npf_mbuf.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/npf

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 18:44:45 UTC 2019

Modified Files:
src/sys/net/npf: npf_mbuf.c

Log Message:
Cast m_mbuflen() result to "size_t". It could also be "u_int" since it is
assigned to "u_int", but all the other "standalone" equivalent functions return
"size_t".


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/net/npf/npf_mbuf.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/npf/npf_mbuf.c
diff -u src/sys/net/npf/npf_mbuf.c:1.22 src/sys/net/npf/npf_mbuf.c:1.23
--- src/sys/net/npf/npf_mbuf.c:1.22	Thu Nov 15 05:23:56 2018
+++ src/sys/net/npf/npf_mbuf.c	Thu Sep 26 14:44:45 2019
@@ -36,7 +36,7 @@
 
 #ifdef _KERNEL
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.22 2018/11/15 10:23:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.23 2019/09/26 18:44:45 christos Exp $");
 
 #include 
 #include 
@@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v
 #define	m_flags_p(m,f)		true
 #else
 #define	m_next_ptr(m)		(m)->m_next
-#define	m_buflen(m)		(m)->m_len
+#define	m_buflen(m)		((size_t)(m)->m_len)
 #define	m_flags_p(m,f)		(((m)->m_flags & (f)) != 0)
 #endif
 



CVS commit: src/sys/modules/ptyfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 18:36:08 UTC 2019

Modified Files:
src/sys/modules/ptyfs: Makefile

Log Message:
kill WARNS = 3


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/ptyfs/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/modules/ptyfs/Makefile
diff -u src/sys/modules/ptyfs/Makefile:1.2 src/sys/modules/ptyfs/Makefile:1.3
--- src/sys/modules/ptyfs/Makefile:1.2	Sat Feb 16 23:05:56 2019
+++ src/sys/modules/ptyfs/Makefile	Thu Sep 26 14:36:08 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2019/02/17 04:05:56 rin Exp $
+#	$NetBSD: Makefile,v 1.3 2019/09/26 18:36:08 christos Exp $
 
 .include "../Makefile.inc"
 
@@ -8,6 +8,4 @@
 KMOD=	ptyfs
 SRCS=	ptyfs_vfsops.c ptyfs_vnops.c ptyfs_subr.c
 
-WARNS=	3
-
 .include 



CVS commit: src/sys/modules/ptyfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 18:36:08 UTC 2019

Modified Files:
src/sys/modules/ptyfs: Makefile

Log Message:
kill WARNS = 3


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/ptyfs/Makefile

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



CVS commit: src/sys/fs/ptyfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 18:35:48 UTC 2019

Modified Files:
src/sys/fs/ptyfs: ptyfs_vnops.c

Log Message:
cast VNOVAL to the the va_size type which is u_quad_t... I think it is time
to change this to uint64_t...


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/fs/ptyfs/ptyfs_vnops.c

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



CVS commit: src/sys/fs/ptyfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 18:35:48 UTC 2019

Modified Files:
src/sys/fs/ptyfs: ptyfs_vnops.c

Log Message:
cast VNOVAL to the the va_size type which is u_quad_t... I think it is time
to change this to uint64_t...


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/fs/ptyfs/ptyfs_vnops.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/fs/ptyfs/ptyfs_vnops.c
diff -u src/sys/fs/ptyfs/ptyfs_vnops.c:1.55 src/sys/fs/ptyfs/ptyfs_vnops.c:1.56
--- src/sys/fs/ptyfs/ptyfs_vnops.c:1.55	Mon Sep  3 12:29:35 2018
+++ src/sys/fs/ptyfs/ptyfs_vnops.c	Thu Sep 26 14:35:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_vnops.c,v 1.55 2018/09/03 16:29:35 riastradh Exp $	*/
+/*	$NetBSD: ptyfs_vnops.c,v 1.56 2019/09/26 18:35:48 christos Exp $	*/
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.56 2019/09/26 18:35:48 christos Exp $");
 
 #include 
 #include 
@@ -405,7 +405,7 @@ ptyfs_setattr(void *v)
 	kauth_action_t action = KAUTH_VNODE_WRITE_FLAGS;
 	bool changing_sysflags = false;
 
-	if (vap->va_size != VNOVAL) {
+	if (vap->va_size != (u_quad_t)VNOVAL) {
  		switch (ptyfs->ptyfs_type) {
  		case PTYFSroot:
  			return EISDIR;
@@ -417,7 +417,7 @@ ptyfs_setattr(void *v)
 		}
 	}
 
-	if (vap->va_flags != VNOVAL) {
+	if (vap->va_flags != (u_quad_t)VNOVAL) {
 		if (vp->v_mount->mnt_flag & MNT_RDONLY)
 			return EROFS;
 



CVS commit: [netbsd-8] src/doc

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:25:17 UTC 2019

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

Log Message:
Tickets #1387 - #1390


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.43 -r1.1.2.44 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-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:25:17 UTC 2019

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

Log Message:
Tickets #1387 - #1390


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.43 -r1.1.2.44 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.43 src/doc/CHANGES-8.2:1.1.2.44
--- src/doc/CHANGES-8.2:1.1.2.43	Wed Sep 25 15:49:45 2019
+++ src/doc/CHANGES-8.2	Thu Sep 26 18:25:17 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.43 2019/09/25 15:49:45 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.44 2019/09/26 18:25:17 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -1140,3 +1140,54 @@ sys/dev/ic/nvme.c1.45
 	don't set Phase Tag bit of Completion Queue entry at nvme_poll_done().
 	[nonaka, ticket #1386]
 
+sys/arch/sparc/include/ctlreg.h			1.30
+sys/dev/pci/if_xgereg.h1.3
+
+	Add missing NUL to prevent buffer overrun.
+	[msaitoh, ticket #1387]
+
+sys/dev/pci/pcireg.h1.147 via patch
+sys/dev/pci/pci_subr.c1.212, 1.215-1.217 via patch
+
+	- Change fast back-to-back "capable" to "enable" in pci_subr.c.
+	- Print Primary Discard Timer, Secondary Discard Timer, Discard
+	  Timer Status and Discard Timer SERR# Enable bit in pci_subr.c.
+	- Print some DPC register values not with %04x but with %08x because
+	  those are 32bit.
+	- Remove whitespace for consistency.
+	- Use macro.
+	- Whitespace fixes.
+	[msaitoh, ticket #1388]
+
+sys/dev/pci/ixgbe/ixgbe_type.h			1.42-1.43
+sys/dev/pci/ixgbe/ixgbe.c			1.209-1.213 via patch
+sys/dev/pci/ixgbe/ixv.c1.131-1.138 via patch
+sys/dev/pci/ixgbe/ixgbe_vf.c			1.19-1.22
+sys/dev/pci/ixgbe/ixgbe_vf.h			1.14
+sys/dev/pci/ixgbe/ixgbe.h			1.57-1.58 via patch
+share/man/man4/ixv.41.5 via patch
+
+	- Fix a bug that MBSDC (Bad SFD Count) isn't counted on X550EM_X and
+	  X550EM_A. The register is for X550 and newer.
+	- ixv(4): Make SIOCADDMULTI returns ENOSPC and print error message
+	  when the Ethernet multicast address list exceeds the limit(30) and
+	  can't be ALLMULTI.
+	- ixv(4): SIOCZIFDATA clear the event counters as ixgbe.c.
+	- Reduce ixv(4)'s multicast table array size in ixv_set_multi from
+	  MAX_NUM_MULTICAST_ADDRESSES(128) to IXGBE_MAX_VF_MC(30).
+	- ixv(4): Add support ALLMULTI and PROMISC.
+	- if_flags is neither int nor short. It's unsigned short.
+	- Fix a bug that the multicast filter isn't correctly initialized when
+	  the total number of the Ethernet multicast addresses is just 128.
+	- Make ixv_set_multi() work correctly (especially for PROMISC) when the
+	  function is called from if_init().
+	- Remove *_set_promisc() and use *_set_multi(). And then, rename
+	  *_set_multi() to *_set_rxfilter().
+	- ixv(4): If a multicast entry has range, use ALLMULTI like others.
+	[msaitoh, ticket #1389]
+
+sys/dev/ic/nvme.c1.46
+
+	nvme(4): don't attach the device if namespace is not found.
+	[nonaka, ticket #1390]
+



CVS commit: [netbsd-8] src/sys/dev/ic

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:23:13 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-8]: nvme.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #1390):

sys/dev/ic/nvme.c: revision 1.46

nvme(4): Don't attach the device, if namespace not found.


To generate a diff of this commit:
cvs rdiff -u -r1.30.2.5 -r1.30.2.6 src/sys/dev/ic/nvme.c

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

Modified files:

Index: src/sys/dev/ic/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.30.2.5 src/sys/dev/ic/nvme.c:1.30.2.6
--- src/sys/dev/ic/nvme.c:1.30.2.5	Wed Sep 25 15:49:16 2019
+++ src/sys/dev/ic/nvme.c	Thu Sep 26 18:23:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme.c,v 1.30.2.5 2019/09/25 15:49:16 martin Exp $	*/
+/*	$NetBSD: nvme.c,v 1.30.2.6 2019/09/26 18:23:13 martin Exp $	*/
 /*	$OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.30.2.5 2019/09/25 15:49:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.30.2.6 2019/09/26 18:23:13 martin Exp $");
 
 #include 
 #include 
@@ -397,6 +397,10 @@ nvme_attach(struct nvme_softc *sc)
 		aprint_error_dev(sc->sc_dev, "unable to identify controller\n");
 		goto disable;
 	}
+	if (sc->sc_nn == 0) {
+		aprint_error_dev(sc->sc_dev, "namespace not found\n");
+		goto disable;
+	}
 
 	/* we know how big things are now */
 	sc->sc_max_sgl = sc->sc_mdts / sc->sc_mps;



CVS commit: [netbsd-8] src/sys/dev/ic

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:23:13 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-8]: nvme.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #1390):

sys/dev/ic/nvme.c: revision 1.46

nvme(4): Don't attach the device, if namespace not found.


To generate a diff of this commit:
cvs rdiff -u -r1.30.2.5 -r1.30.2.6 src/sys/dev/ic/nvme.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

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:19:27 UTC 2019

Modified Files:
src/share/man/man4 [netbsd-8]: ixv.4
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c ixgbe.h ixgbe_type.h
ixgbe_vf.c ixgbe_vf.h ixv.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1389:

sys/dev/pci/ixgbe/ixgbe_type.h  1.42-1.43
sys/dev/pci/ixgbe/ixgbe.c   1.209-1.213 via patch
sys/dev/pci/ixgbe/ixv.c 1.131-1.138 via patch
sys/dev/pci/ixgbe/ixgbe_vf.c1.19-1.22
sys/dev/pci/ixgbe/ixgbe_vf.h1.14
sys/dev/pci/ixgbe/ixgbe.h   1.57-1.58 via patch
share/man/man4/ixv.41.5 via patch

- Fix a bug that MBSDC (Bad SFD Count) isn't counted on X550EM_X and
  X550EM_A. The register is for X550 and newer.
- ixv(4): Make SIOCADDMULTI returns ENOSPC and print error message
  when the Ethernet multicast address list exceeds the limit(30) and
  can't be ALLMULTI.
- ixv(4): SIOCZIFDATA clear the event counters as ixgbe.c.
- Reduce ixv(4)'s multicast table array size in ixv_set_multi from
  MAX_NUM_MULTICAST_ADDRESSES(128) to IXGBE_MAX_VF_MC(30).
- ixv(4): Add support ALLMULTI and PROMISC.
- if_flags is neither int nor short. It's unsigned short.
- Fix a bug that the multicast filter isn't correctly initialized when
  the total number of the Ethernet multicast addresses is just 128.
- Make ixv_set_multi() work correctly (especially for PROMISC) when the
  function is called from if_init().
- Remove *_set_promisc() and use *_set_multi(). And then, rename
  *_set_multi() to *_set_rxfilter().
- ixv(4): If a multicast entry has range, use ALLMULTI like others.


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/share/man/man4/ixv.4
cvs rdiff -u -r1.88.2.34 -r1.88.2.35 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.24.6.17 -r1.24.6.18 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.22.2.10 -r1.22.2.11 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.12.8.3 -r1.12.8.4 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.8.6.3 -r1.8.6.4 src/sys/dev/pci/ixgbe/ixgbe_vf.h
cvs rdiff -u -r1.56.2.24 -r1.56.2.25 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/share/man/man4/ixv.4
diff -u src/share/man/man4/ixv.4:1.3.2.2 src/share/man/man4/ixv.4:1.3.2.3
--- src/share/man/man4/ixv.4:1.3.2.2	Sat May 12 10:35:45 2018
+++ src/share/man/man4/ixv.4	Thu Sep 26 18:19:27 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ixv.4,v 1.3.2.2 2018/05/12 10:35:45 martin Exp $
+.\"	$NetBSD: ixv.4,v 1.3.2.3 2019/09/26 18:19:27 martin Exp $
 .\"
 .\" Copyright (c) 2018 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 9, 2018
+.Dd September 5, 2019
 .Dt IXV 4
 .Os
 .Sh NAME
@@ -60,6 +60,23 @@ The
 driver was written by
 .An Intel Corporation Aq Mt freebsd...@mailbox.intel.com .
 .Sh BUGS
+The following event counters are not cleared by
+.Dv SIOCZIFDATA
+because the corresponding registers are read only and not cleared on read:
+.Pp
+.Bl -item -offset indent -compact
+.It
+Good Packets Received
+.It
+Good Octets Received
+.It
+Multicast Packets Received
+.It
+Good Packets Transmitted
+.It
+Good Octets Transmitted
+.El
+.Sh BUGS
 VLAN over
 .Nm
 won't work because VLAN hardware filter function is not currently implemented

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.34 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.35
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.34	Fri Sep  6 13:44:36 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Sep 26 18:19:26 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.34 2019/09/06 13:44:36 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.35 2019/09/26 18:19:26 martin Exp $ */
 
 /**
 
@@ -209,8 +209,7 @@ static void	ixgbe_initialize_rss_mapping
 static void	ixgbe_enable_intr(struct adapter *);
 static void	ixgbe_disable_intr(struct adapter *);
 static void	ixgbe_update_stats_counters(struct adapter *);
-static void	ixgbe_set_promisc(struct adapter *);
-static void	ixgbe_set_multi(struct adapter *);
+static void	ixgbe_set_rxfilter(struct adapter *);
 static void	ixgbe_update_link_status(struct adapter *);
 static void	ixgbe_set_ivar(struct adapter *, u8, u8, s8);
 static void	ixgbe_configure_ivars(struct adapter *);
@@ -1579,7 +1578,7 @@ ixgbe_update_stats_counters(struct adapt
 	stats->illerrc.ev_count += IXGBE_READ_REG(hw, IXGBE_ILLERRC);
 	stats->errbc.ev_count += IXGBE_READ_REG(hw, IXGBE_ERRBC);
 	stats->mspdc.ev_count += IXGBE_READ_REG(hw, IXGBE_MSPDC);
-	if (hw->mac.type == ixgbe_mac_X550)
+	if (hw->mac.type >= 

CVS commit: [netbsd-8] src

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:19:27 UTC 2019

Modified Files:
src/share/man/man4 [netbsd-8]: ixv.4
src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c ixgbe.h ixgbe_type.h
ixgbe_vf.c ixgbe_vf.h ixv.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1389:

sys/dev/pci/ixgbe/ixgbe_type.h  1.42-1.43
sys/dev/pci/ixgbe/ixgbe.c   1.209-1.213 via patch
sys/dev/pci/ixgbe/ixv.c 1.131-1.138 via patch
sys/dev/pci/ixgbe/ixgbe_vf.c1.19-1.22
sys/dev/pci/ixgbe/ixgbe_vf.h1.14
sys/dev/pci/ixgbe/ixgbe.h   1.57-1.58 via patch
share/man/man4/ixv.41.5 via patch

- Fix a bug that MBSDC (Bad SFD Count) isn't counted on X550EM_X and
  X550EM_A. The register is for X550 and newer.
- ixv(4): Make SIOCADDMULTI returns ENOSPC and print error message
  when the Ethernet multicast address list exceeds the limit(30) and
  can't be ALLMULTI.
- ixv(4): SIOCZIFDATA clear the event counters as ixgbe.c.
- Reduce ixv(4)'s multicast table array size in ixv_set_multi from
  MAX_NUM_MULTICAST_ADDRESSES(128) to IXGBE_MAX_VF_MC(30).
- ixv(4): Add support ALLMULTI and PROMISC.
- if_flags is neither int nor short. It's unsigned short.
- Fix a bug that the multicast filter isn't correctly initialized when
  the total number of the Ethernet multicast addresses is just 128.
- Make ixv_set_multi() work correctly (especially for PROMISC) when the
  function is called from if_init().
- Remove *_set_promisc() and use *_set_multi(). And then, rename
  *_set_multi() to *_set_rxfilter().
- ixv(4): If a multicast entry has range, use ALLMULTI like others.


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/share/man/man4/ixv.4
cvs rdiff -u -r1.88.2.34 -r1.88.2.35 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.24.6.17 -r1.24.6.18 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.22.2.10 -r1.22.2.11 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.12.8.3 -r1.12.8.4 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.8.6.3 -r1.8.6.4 src/sys/dev/pci/ixgbe/ixgbe_vf.h
cvs rdiff -u -r1.56.2.24 -r1.56.2.25 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-8] src/sys/dev/pci

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:14:54 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-8]: pci_subr.c pcireg.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1388:

sys/dev/pci/pcireg.h1.147 via patch
sys/dev/pci/pci_subr.c  1.212, 1.215-1.217 via 
patch

- Change fast back-to-back "capable" to "enable" in pci_subr.c.
- Print Primary Discard Timer, Secondary Discard Timer, Discard
  Timer Status and Discard Timer SERR# Enable bit in pci_subr.c.
- Print some DPC register values not with %04x but with %08x because
  those are 32bit.
- Remove whitespace for consistency.
- Use macro.
- Whitespace fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.183.2.11 -r1.183.2.12 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.130.2.8 -r1.130.2.9 src/sys/dev/pci/pcireg.h

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/dev/pci

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:14:54 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-8]: pci_subr.c pcireg.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1388:

sys/dev/pci/pcireg.h1.147 via patch
sys/dev/pci/pci_subr.c  1.212, 1.215-1.217 via 
patch

- Change fast back-to-back "capable" to "enable" in pci_subr.c.
- Print Primary Discard Timer, Secondary Discard Timer, Discard
  Timer Status and Discard Timer SERR# Enable bit in pci_subr.c.
- Print some DPC register values not with %04x but with %08x because
  those are 32bit.
- Remove whitespace for consistency.
- Use macro.
- Whitespace fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.183.2.11 -r1.183.2.12 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.130.2.8 -r1.130.2.9 src/sys/dev/pci/pcireg.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/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.183.2.11 src/sys/dev/pci/pci_subr.c:1.183.2.12
--- src/sys/dev/pci/pci_subr.c:1.183.2.11	Wed Jul 17 15:55:31 2019
+++ src/sys/dev/pci/pci_subr.c	Thu Sep 26 18:14:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.183.2.11 2019/07/17 15:55:31 martin Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.183.2.12 2019/09/26 18:14:54 martin Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.183.2.11 2019/07/17 15:55:31 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.183.2.12 2019/09/26 18:14:54 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -209,7 +209,7 @@ static const struct pci_class pci_subcla
 
 /* PCI bridge programming interface */
 static const struct pci_class pci_interface_pcibridge[] = {
-	{ "",			PCI_INTERFACE_BRIDGE_PCI_PCI, NULL,	},
+	{ "",			PCI_INTERFACE_BRIDGE_PCI_PCI,	NULL,	},
 	{ "subtractive decode",	PCI_INTERFACE_BRIDGE_PCI_SUBDEC, NULL,	},
 	{ NULL,			0,NULL,	},
 };
@@ -223,8 +223,8 @@ static const struct pci_class pci_interf
 
 /* Advanced Switching programming interface */
 static const struct pci_class pci_interface_advsw[] = {
-	{ "custom interface",	PCI_INTERFACE_ADVSW_CUSTOM, NULL, },
-	{ "ASI-SIG",		PCI_INTERFACE_ADVSW_ASISIG, NULL, },
+	{ "custom interface",	PCI_INTERFACE_ADVSW_CUSTOM,	NULL, },
+	{ "ASI-SIG",		PCI_INTERFACE_ADVSW_ASISIG,	NULL, },
 	{ NULL,			0,NULL,	},
 };
 
@@ -304,7 +304,7 @@ static const struct pci_class pci_subcla
 /*
  * Class 0x08.
  * Base system peripheral.
- */ 
+ */
 
 /* PIC programming interface */
 static const struct pci_class pci_interface_pic[] = {
@@ -429,10 +429,10 @@ static const struct pci_class pci_interf
 
 /* IPMI programming interface */
 static const struct pci_class pci_interface_ipmi[] = {
-	{ "SMIC",		PCI_INTERFACE_IPMI_SMIC,		NULL,},
-	{ "keyboard",		PCI_INTERFACE_IPMI_KBD,			NULL,},
-	{ "block transfer",	PCI_INTERFACE_IPMI_BLOCKXFER,		NULL,},
-	{ NULL,			0,	NULL,},
+	{ "SMIC",		PCI_INTERFACE_IPMI_SMIC,	NULL,	},
+	{ "keyboard",		PCI_INTERFACE_IPMI_KBD,		NULL,	},
+	{ "block transfer",	PCI_INTERFACE_IPMI_BLOCKXFER,	NULL,	},
+	{ NULL,			0,NULL,	},
 };
 
 /* Subclasses */
@@ -478,8 +478,8 @@ static const struct pci_class pci_subcla
 
 /* Intelligent IO programming interface */
 static const struct pci_class pci_interface_i2o[] = {
-	{ "FIFO at offset 0x40", PCI_INTERFACE_I2O_FIFOAT40,		NULL,},
-	{ NULL,			0,	NULL,},
+	{ "FIFO at offset 0x40", PCI_INTERFACE_I2O_FIFOAT40,	NULL,	},
+	{ NULL,			0,NULL,	},
 };
 
 /* Subclasses */
@@ -494,9 +494,9 @@ static const struct pci_class pci_subcla
  * Satellite communication controller.
  */
 static const struct pci_class pci_subclass_satcom[] = {
-	{ "TV",			PCI_SUBCLASS_SATCOM_TV,	 	NULL,	},
-	{ "audio",		PCI_SUBCLASS_SATCOM_AUDIO, 	NULL,	},
-	{ "voice",		PCI_SUBCLASS_SATCOM_VOICE, 	NULL,	},
+	{ "TV",			PCI_SUBCLASS_SATCOM_TV,		NULL,	},
+	{ "audio",		PCI_SUBCLASS_SATCOM_AUDIO,	NULL,	},
+	{ "voice",		PCI_SUBCLASS_SATCOM_VOICE,	NULL,	},
 	{ "data",		PCI_SUBCLASS_SATCOM_DATA,	NULL,	},
 	{ "miscellaneous",	PCI_SUBCLASS_SATCOM_MISC,	NULL,	},
 	{ NULL,			0,NULL,	},
@@ -507,9 +507,9 @@ static const struct pci_class pci_subcla
  * Encryption/Decryption controller.
  */
 static const struct pci_class pci_subclass_crypto[] = {
-	{ "network/computing",	PCI_SUBCLASS_CRYPTO_NETCOMP, 	NULL,	},
+	{ "network/computing",	PCI_SUBCLASS_CRYPTO_NETCOMP,	NULL,	},
 	{ "entertainment",	PCI_SUBCLASS_CRYPTO_ENTERTAINMENT, NULL,},
-	{ "miscellaneous",	PCI_SUBCLASS_CRYPTO_MISC, 	NULL,	},
+	{ "miscellaneous",	PCI_SUBCLASS_CRYPTO_MISC,	NULL,	},
 	{ NULL,			0,NULL,	},
 };
 
@@ -585,7 +585,7 @@ DEV_VERBOSE_DEFINE(pci);
  * a positive value if the dest buffer would have overflowed.
  */
 
-static int __printflike(3,4)
+static int __printflike(3, 4)
 snappendf(char **dest, size_t *len,

CVS commit: [netbsd-8] src/sys

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:11:02 UTC 2019

Modified Files:
src/sys/arch/sparc/include [netbsd-8]: ctlreg.h
src/sys/dev/pci [netbsd-8]: if_xgereg.h

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

sys/arch/sparc/include/ctlreg.h: revision 1.30
sys/dev/pci/if_xgereg.h: revision 1.3

Add missing NUL to prevent buffer overrun.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.22.1 src/sys/arch/sparc/include/ctlreg.h
cvs rdiff -u -r1.2 -r1.2.158.1 src/sys/dev/pci/if_xgereg.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/sparc/include/ctlreg.h
diff -u src/sys/arch/sparc/include/ctlreg.h:1.29 src/sys/arch/sparc/include/ctlreg.h:1.29.22.1
--- src/sys/arch/sparc/include/ctlreg.h:1.29	Wed Dec  4 18:44:14 2013
+++ src/sys/arch/sparc/include/ctlreg.h	Thu Sep 26 18:11:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ctlreg.h,v 1.29 2013/12/04 18:44:14 jdc Exp $ */
+/*	$NetBSD: ctlreg.h,v 1.29.22.1 2019/09/26 18:11:02 martin Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -376,7 +376,7 @@
 #define	SFSR_BITS	"\177\020"		\
 	"b\21EM\0b\20CS\0b\17SB\0f\15\2PERR\0"	\
 	"b\14UC\0b\13TO\0b\12BE\0f\10\2LVL\0"	\
-	"f\05\3AT\0f\02\3FT\0b\01FAV\0b\01OW"
+	"f\05\3AT\0f\02\3FT\0b\01FAV\0b\01OW\0"
 
 /* [4m] Synchronous Fault Types */
 #define SFSR_FT_NONE		(0 << 2) 	/* no fault */

Index: src/sys/dev/pci/if_xgereg.h
diff -u src/sys/dev/pci/if_xgereg.h:1.2 src/sys/dev/pci/if_xgereg.h:1.2.158.1
--- src/sys/dev/pci/if_xgereg.h:1.2	Sun Dec 11 12:22:50 2005
+++ src/sys/dev/pci/if_xgereg.h	Thu Sep 26 18:11:02 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_xgereg.h,v 1.2 2005/12/11 12:22:50 christos Exp $ */
+/*  $NetBSD: if_xgereg.h,v 1.2.158.1 2019/09/26 18:11:02 martin Exp $ */
 
 /*
  * Copyright (c) 2004, SUNET, Swedish University Computer Network.
@@ -85,7 +85,7 @@
 	"\177\20b\x3fTDMA_READY\0b\x3eRDMA_READY\0b\x3dPFC_READY\0" \
 	"b\x3cTMAC_BUF_EMPTY\0b\x3aPIC_QUIESCENT\0\x39RMAC_REMOTE_FAULT\0" \
 	"b\x38RMAC_LOCAL_FAULT\0b\x27MC_DRAM_READY\0b\x26MC_QUEUES_READY\0" \
-	"b\x21M_PLL_LOCK\0b\x20P_PLL_LOCK"
+	"b\x21M_PLL_LOCK\0b\x20P_PLL_LOCK\0"
 
 /*
  * PCI-X registers



CVS commit: [netbsd-8] src/sys

2019-09-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 26 18:11:02 UTC 2019

Modified Files:
src/sys/arch/sparc/include [netbsd-8]: ctlreg.h
src/sys/dev/pci [netbsd-8]: if_xgereg.h

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

sys/arch/sparc/include/ctlreg.h: revision 1.30
sys/dev/pci/if_xgereg.h: revision 1.3

Add missing NUL to prevent buffer overrun.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.22.1 src/sys/arch/sparc/include/ctlreg.h
cvs rdiff -u -r1.2 -r1.2.158.1 src/sys/dev/pci/if_xgereg.h

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



CVS commit: src/sys/rump/librump/rumpkern

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 17:52:51 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
Provide a weak alias for vnode_to_path to be used unless librumpvfs is present.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/rump/librump/rumpkern/emul.c

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



CVS commit: src/sys/rump/librump/rumpkern

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 17:52:51 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
Provide a weak alias for vnode_to_path to be used unless librumpvfs is present.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/rump/librump/rumpkern/emul.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/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.191 src/sys/rump/librump/rumpkern/emul.c:1.192
--- src/sys/rump/librump/rumpkern/emul.c:1.191	Sun Jun  2 19:41:51 2019
+++ src/sys/rump/librump/rumpkern/emul.c	Thu Sep 26 17:52:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.191 2019/06/02 19:41:51 kre Exp $	*/
+/*	$NetBSD: emul.c,v 1.192 2019/09/26 17:52:50 bad Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.191 2019/06/02 19:41:51 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.192 2019/09/26 17:52:50 bad Exp $");
 
 #include 
 #include 
@@ -269,6 +269,20 @@ rump_getcwd_common(struct vnode *lvp, st
 }
 __weak_alias(getcwd_common,rump_getcwd_common);
 
+/* Weak alias for vnode_to_path to be used unless librumpvfs is present. */
+
+int rump_vnode_to_path(char *, size_t, struct vnode *, struct lwp *,
+struct proc *);
+int
+rump_vnode_to_path(char *path, size_t len, struct vnode *vp, struct lwp *curl,
+struct proc *p)
+{
+
+	return ENOENT; /* pretend getcwd_common() failed. */
+}
+__weak_alias(vnode_to_path,rump_vnode_to_path);
+
+
 /* Weak aliases for fstrans to be used unless librumpvfs is present. */
 
 void rump_fstrans_start(struct mount *);



CVS commit: src/sys/modules/procfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 17:34:56 UTC 2019

Modified Files:
src/sys/modules/procfs: Makefile

Log Message:
Kill WARNS = 3


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/modules/procfs/Makefile

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



CVS commit: src/sys/modules/procfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 17:34:56 UTC 2019

Modified Files:
src/sys/modules/procfs: Makefile

Log Message:
Kill WARNS = 3


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/modules/procfs/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/modules/procfs/Makefile
diff -u src/sys/modules/procfs/Makefile:1.6 src/sys/modules/procfs/Makefile:1.7
--- src/sys/modules/procfs/Makefile:1.6	Sat Mar 30 22:24:47 2019
+++ src/sys/modules/procfs/Makefile	Thu Sep 26 13:34:56 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2019/03/31 02:24:47 christos Exp $
+#	$NetBSD: Makefile,v 1.7 2019/09/26 17:34:56 christos Exp $
 
 .include "../Makefile.inc"
 
@@ -16,6 +16,4 @@ SRCS=	procfs_note.c procfs_status.c proc
 	procfs_machdep.c procfs_map.c procfs_regs.c procfs_fpregs.c \
 	procfs_mem.c procfs_fd.c procfs_auxv.c
 
-WARNS=	3
-
 .include 



CVS commit: src/sys/miscfs/procfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 17:34:08 UTC 2019

Modified Files:
src/sys/miscfs/procfs: procfs_auxv.c procfs_cmdline.c procfs_limit.c
procfs_map.c procfs_subr.c

Log Message:
fix sign-compare issues: uio->uio_offset (off_t) is compared with (size_t):
cast the offset to size_t.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/miscfs/procfs/procfs_auxv.c
cvs rdiff -u -r1.30 -r1.31 src/sys/miscfs/procfs/procfs_cmdline.c
cvs rdiff -u -r1.1 -r1.2 src/sys/miscfs/procfs/procfs_limit.c
cvs rdiff -u -r1.45 -r1.46 src/sys/miscfs/procfs/procfs_map.c
cvs rdiff -u -r1.113 -r1.114 src/sys/miscfs/procfs/procfs_subr.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/miscfs/procfs/procfs_auxv.c
diff -u src/sys/miscfs/procfs/procfs_auxv.c:1.2 src/sys/miscfs/procfs/procfs_auxv.c:1.3
--- src/sys/miscfs/procfs/procfs_auxv.c:1.2	Thu Mar 30 16:21:00 2017
+++ src/sys/miscfs/procfs/procfs_auxv.c	Thu Sep 26 13:34:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_auxv.c,v 1.2 2017/03/30 20:21:00 christos Exp $	*/
+/*	$NetBSD: procfs_auxv.c,v 1.3 2019/09/26 17:34:08 christos Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_auxv.c,v 1.2 2017/03/30 20:21:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_auxv.c,v 1.3 2019/09/26 17:34:08 christos Exp $");
 
 #include 
 #include 
@@ -52,7 +52,7 @@ procfs_doauxv(struct lwp *curl, struct p
 	if ((error = proc_getauxv(p, &buffer, &bufsize)) != 0)
 		return error;
 
-	if (uio->uio_offset < bufsize)
+	if ((size_t)uio->uio_offset < bufsize)
 		error = uiomove((char *)buffer + uio->uio_offset,
 		bufsize - uio->uio_offset, uio);
 	else

Index: src/sys/miscfs/procfs/procfs_cmdline.c
diff -u src/sys/miscfs/procfs/procfs_cmdline.c:1.30 src/sys/miscfs/procfs/procfs_cmdline.c:1.31
--- src/sys/miscfs/procfs/procfs_cmdline.c:1.30	Sat Dec 30 22:29:18 2017
+++ src/sys/miscfs/procfs/procfs_cmdline.c	Thu Sep 26 13:34:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_cmdline.c,v 1.30 2017/12/31 03:29:18 christos Exp $	*/
+/*	$NetBSD: procfs_cmdline.c,v 1.31 2019/09/26 17:34:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1999 Jaromir Dolecek 
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_cmdline.c,v 1.30 2017/12/31 03:29:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_cmdline.c,v 1.31 2019/09/26 17:34:08 christos Exp $");
 
 #include 
 #include 
@@ -52,7 +52,7 @@ procfs_doprocargs_helper(void *cookie, c
 	char *buf = __UNCONST(src);
 
 	buf += uio->uio_offset - off;
-	if (off + len <= uio->uio_offset)
+	if (off + len <= (size_t)uio->uio_offset)
 		return 0;
 	return uiomove(buf, off + len - uio->uio_offset, cookie);
 }
@@ -90,13 +90,13 @@ procfs_doprocargs(
 return error;
 		}
 		len = strlen(p->p_comm);
-		if (len >= uio->uio_offset) {
+		if (len >= (size_t)uio->uio_offset) {
 			start = uio->uio_offset - 1;
 			error = uiomove(p->p_comm + start, len - start, uio);
 			if (error)
 return error;
 		}
-		if (len + 2 >= uio->uio_offset) {
+		if (len + 2 >= (size_t)uio->uio_offset) {
 			start = uio->uio_offset - 1 - len;
 			error = uiomove(msg + 1 + start, 2 - start, uio);
 		}

Index: src/sys/miscfs/procfs/procfs_limit.c
diff -u src/sys/miscfs/procfs/procfs_limit.c:1.1 src/sys/miscfs/procfs/procfs_limit.c:1.2
--- src/sys/miscfs/procfs/procfs_limit.c:1.1	Sat Mar 30 19:28:30 2019
+++ src/sys/miscfs/procfs/procfs_limit.c	Thu Sep 26 13:34:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_limit.c,v 1.1 2019/03/30 23:28:30 christos Exp $	*/
+/*	$NetBSD: procfs_limit.c,v 1.2 2019/09/26 17:34:08 christos Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_limit.c,v 1.1 2019/03/30 23:28:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_limit.c,v 1.2 2019/09/26 17:34:08 christos Exp $");
 
 #include 
 #include 
@@ -81,7 +81,7 @@ procfs_dolimit(struct lwp *curl, struct 
 		pos += prl(buffer + pos, bufsize - pos, rl[i].rlim_max, '\n');
 	}
 
-	if (uio->uio_offset < pos)
+	if ((size_t)uio->uio_offset < pos)
 		error = uiomove(buffer + uio->uio_offset,
 		pos - uio->uio_offset, uio);
 	else

Index: src/sys/miscfs/procfs/procfs_map.c
diff -u src/sys/miscfs/procfs/procfs_map.c:1.45 src/sys/miscfs/procfs/procfs_map.c:1.46
--- src/sys/miscfs/procfs/procfs_map.c:1.45	Fri Oct 17 16:49:22 2014
+++ src/sys/miscfs/procfs/procfs_map.c	Thu Sep 26 13:34:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_map.c,v 1.45 2014/10/17 20:49:22 christos Exp $	*/
+/*	$NetBSD: procfs_map.c,v 1.46 2019/09/26 17:34:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_map.c,v 1.45 2014/10/17 20:49:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_map.c,v 1.

CVS commit: src/sys/miscfs/procfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 17:34:08 UTC 2019

Modified Files:
src/sys/miscfs/procfs: procfs_auxv.c procfs_cmdline.c procfs_limit.c
procfs_map.c procfs_subr.c

Log Message:
fix sign-compare issues: uio->uio_offset (off_t) is compared with (size_t):
cast the offset to size_t.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/miscfs/procfs/procfs_auxv.c
cvs rdiff -u -r1.30 -r1.31 src/sys/miscfs/procfs/procfs_cmdline.c
cvs rdiff -u -r1.1 -r1.2 src/sys/miscfs/procfs/procfs_limit.c
cvs rdiff -u -r1.45 -r1.46 src/sys/miscfs/procfs/procfs_map.c
cvs rdiff -u -r1.113 -r1.114 src/sys/miscfs/procfs/procfs_subr.c

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



CVS commit: src/sys/miscfs/procfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 17:33:18 UTC 2019

Modified Files:
src/sys/miscfs/procfs: procfs.h

Log Message:
Rewrite the procfs_fileno as an inline function to make it more clear what
it does...


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/miscfs/procfs/procfs.h

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



CVS commit: src/sys/miscfs/procfs

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 17:33:18 UTC 2019

Modified Files:
src/sys/miscfs/procfs: procfs.h

Log Message:
Rewrite the procfs_fileno as an inline function to make it more clear what
it does...


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/miscfs/procfs/procfs.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/miscfs/procfs/procfs.h
diff -u src/sys/miscfs/procfs/procfs.h:1.76 src/sys/miscfs/procfs/procfs.h:1.77
--- src/sys/miscfs/procfs/procfs.h:1.76	Thu Apr 25 18:48:42 2019
+++ src/sys/miscfs/procfs/procfs.h	Thu Sep 26 13:33:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs.h,v 1.76 2019/04/25 22:48:42 mlelstv Exp $	*/
+/*	$NetBSD: procfs.h,v 1.77 2019/09/26 17:33:18 christos Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -164,12 +164,27 @@ struct procfs_args {
 
 #define UIO_MX 32
 
-#define PROCFS_FILENO(pid, type, fd) \
-	(  (type) == PFSroot ? 2 \
-	 : (type) == PFScurproc ? 3 \
-	 : (type) == PFSself ? 4 \
- : (fd) == -1 ? ((pid)+1) * PFSlast + (type) \
- : ((uint64_t)((pid)+1) << 32 | (fd)) * PFSlast + (type))
+static __inline ino_t
+procfs_fileno(pid_t _pid, pfstype _type, int _fd)
+{
+	ino_t _ino;
+	switch (_type) {
+	case PFSroot:
+		return 2;
+	case PFScurproc:
+		return 3;
+	case PFSself:
+		return 4;
+	default:
+		_ino = _pid + 1;
+		if (_fd != -1)
+			_ino = _ino << 32 | _fd;
+		return _ino * PFSlast + _type;
+	}
+}
+
+#define PROCFS_FILENO(pid, type, fd) procfs_fileno(pid, type, fd)
+
 #define PROCFS_TYPE(type)	((type) % PFSlast)
 
 struct procfsmount {



CVS commit: src/lib/libc/sys

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 17:13:52 UTC 2019

Modified Files:
src/lib/libc/sys: fcntl.2

Log Message:
document errors returned by F_GETPATH


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/lib/libc/sys/fcntl.2

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

Modified files:

Index: src/lib/libc/sys/fcntl.2
diff -u src/lib/libc/sys/fcntl.2:1.43 src/lib/libc/sys/fcntl.2:1.44
--- src/lib/libc/sys/fcntl.2:1.43	Mon Sep 16 00:49:46 2019
+++ src/lib/libc/sys/fcntl.2	Thu Sep 26 13:13:52 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fcntl.2,v 1.43 2019/09/16 04:49:46 wiz Exp $
+.\"	$NetBSD: fcntl.2,v 1.44 2019/09/26 17:13:52 christos Exp $
 .\"
 .\" Copyright (c) 1983, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)fcntl.2	8.2 (Berkeley) 1/12/94
 .\"
-.Dd September 15, 2019
+.Dd September 26, 2019
 .Dt FCNTL 2
 .Os
 .Sh NAME
@@ -537,6 +537,31 @@ is
 .Dv F_SETOWN
 and
 the process ID given as argument is not in use.
+.It Bq Er EACCES
+The argument
+.Fa cmd
+is
+.Dv F_GETPATH 
+and read or search permission was denied for a component of the pathname.
+.It Bq Er ENOENT
+The argument
+.Fa cmd
+is
+.Dv F_GETPATH 
+and a component of the pathname no longer exists.
+.It Bq Er ENOMEM
+The argument
+.Fa cmd
+is
+.Dv F_GETPATH 
+and insufficient memory is available.
+.It Bq Er ERANGE
+The argument
+.Fa cmd
+is
+.Dv F_GETPATH 
+and the resulting path would be greater than
+.Dv MAXPATHLEN .
 .El
 .Sh SEE ALSO
 .Xr close 2 ,



CVS commit: src/lib/libc/sys

2019-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 26 17:13:52 UTC 2019

Modified Files:
src/lib/libc/sys: fcntl.2

Log Message:
document errors returned by F_GETPATH


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/lib/libc/sys/fcntl.2

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



CVS commit: src/sys/stand/efiboot

2019-09-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 26 14:28:14 UTC 2019

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

Log Message:
Do a full reset of the console at startup


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/stand/efiboot/efiboot.c

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



CVS commit: src/sys/stand/efiboot

2019-09-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 26 14:28:14 UTC 2019

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

Log Message:
Do a full reset of the console at startup


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/stand/efiboot/efiboot.c

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

Modified files:

Index: src/sys/stand/efiboot/efiboot.c
diff -u src/sys/stand/efiboot/efiboot.c:1.16 src/sys/stand/efiboot/efiboot.c:1.17
--- src/sys/stand/efiboot/efiboot.c:1.16	Sun Apr 21 22:30:41 2019
+++ src/sys/stand/efiboot/efiboot.c	Thu Sep 26 14:28:14 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: efiboot.c,v 1.16 2019/04/21 22:30:41 thorpej Exp $ */
+/* $NetBSD: efiboot.c,v 1.17 2019/09/26 14:28:14 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -68,7 +68,10 @@ efi_main(EFI_HANDLE imageHandle, EFI_SYS
 
 	InitializeLib(imageHandle, systemTable);
 
-	(void)uefi_call_wrapper(ST->ConOut->Reset, 2, ST->ConOut, FALSE);
+	uefi_call_wrapper(ST->ConOut->Reset, 2, ST->ConOut, TRUE);
+	uefi_call_wrapper(ST->ConOut->SetMode, 2, ST->ConOut, 0);
+	uefi_call_wrapper(ST->ConOut->EnableCursor, 2, ST->ConOut, TRUE);
+	uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
 
 	status = uefi_call_wrapper(BS->AllocatePages, 4, AllocateAnyPages, EfiLoaderData, sz, &heap_start);
 	if (EFI_ERROR(status))



CVS commit: src/sys/arch/i386/stand/efiboot

2019-09-26 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Sep 26 12:21:03 UTC 2019

Modified Files:
src/sys/arch/i386/stand/efiboot: boot.c conf.c dev_net.c devopen.c
devopen.h

Log Message:
x86 efiboot: pass a filename to BOOTP and parse a DHCP server provided filename.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/stand/efiboot/boot.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/efiboot/conf.c \
src/sys/arch/i386/stand/efiboot/dev_net.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/stand/efiboot/devopen.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/i386/stand/efiboot/devopen.h

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



CVS commit: src/sys/arch/i386/stand/efiboot

2019-09-26 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Sep 26 12:21:03 UTC 2019

Modified Files:
src/sys/arch/i386/stand/efiboot: boot.c conf.c dev_net.c devopen.c
devopen.h

Log Message:
x86 efiboot: pass a filename to BOOTP and parse a DHCP server provided filename.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/stand/efiboot/boot.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/efiboot/conf.c \
src/sys/arch/i386/stand/efiboot/dev_net.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/stand/efiboot/devopen.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/i386/stand/efiboot/devopen.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/i386/stand/efiboot/boot.c
diff -u src/sys/arch/i386/stand/efiboot/boot.c:1.16 src/sys/arch/i386/stand/efiboot/boot.c:1.17
--- src/sys/arch/i386/stand/efiboot/boot.c:1.16	Fri Sep 13 02:19:45 2019
+++ src/sys/arch/i386/stand/efiboot/boot.c	Thu Sep 26 12:21:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.16 2019/09/13 02:19:45 manu Exp $	*/
+/*	$NetBSD: boot.c,v 1.17 2019/09/26 12:21:03 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -111,6 +111,7 @@ const struct bootblk_command commands[] 
 	{ NULL,		NULL },
 };
 
+static char *default_fsname;
 static char *default_devname;
 static int default_unit, default_partition;
 static const char *default_filename;
@@ -125,8 +126,11 @@ parsebootfile(const char *fname, char **
 {
 	const char *col;
 	static char savedevname[MAXDEVNAME+1];
+#if defined(SUPPORT_NFS) || defined(SUPPORT_TFTP)
+	const struct netboot_fstab *nf;
+#endif
 
-	*fsname = "ufs";
+	*fsname = default_fsname;
 	if (default_part_name == NULL) {
 		*devname = default_devname;
 	} else {
@@ -152,6 +156,7 @@ parsebootfile(const char *fname, char **
 
 		if (strstr(fname, "NAME=") == fname) {
 			strlcpy(savedevname, fname, devlen + 1);
+			*fsname = "ufs";
 			*devname = savedevname;
 			*unit = -1;
 			*partition = -1;
@@ -188,6 +193,13 @@ parsebootfile(const char *fname, char **
 		if (i != devlen)
 			return ENXIO;
 
+#if defined(SUPPORT_NFS) || defined(SUPPORT_TFTP)
+		nf = netboot_fstab_find(savedevname);
+		if (nf != NULL)
+			*fsname = (char *)nf->name;
+		else
+#endif
+		*fsname = "ufs";
 		*devname = savedevname;
 		*unit = u;
 		*partition = p;
@@ -278,6 +290,9 @@ boot(void)
 {
 	int currname;
 	int c;
+#if defined(SUPPORT_NFS) || defined(SUPPORT_TFTP)
+	const struct netboot_fstab *nf;
+#endif
 
 	boot_modules_enabled = !(boot_params.bp_flags & X86_BP_FLAGS_NOMODULES);
 
@@ -288,6 +303,14 @@ boot(void)
 	/* if the user types "boot" without filename */
 	default_filename = DEFFILENAME;
 
+#if defined(SUPPORT_NFS) || defined(SUPPORT_TFTP)
+	nf = netboot_fstab_find(default_devname);
+	if (nf != NULL)
+		default_fsname = (char *)nf->name;
+	else
+#endif
+	default_fsname = "ufs";
+
 	if (!(boot_params.bp_flags & X86_BP_FLAGS_NOBOOTCONF)) {
 #ifdef EFIBOOTCFG_FILENAME
 		int rv = EINVAL;
@@ -456,7 +479,7 @@ command_dev(char *arg)
 {
 	static char savedevname[MAXDEVNAME + 1];
 	char buf[80];
-	char *fsname, *devname;
+	char *devname;
 	const char *file; /* dummy */
 
 	if (*arg == '\0') {
@@ -474,7 +497,7 @@ command_dev(char *arg)
 	}
 
 	if (strchr(arg, ':') == NULL ||
-	parsebootfile(arg, &fsname, &devname, &default_unit,
+	parsebootfile(arg, &default_fsname, &devname, &default_unit,
 	  &default_partition, &file)) {
 		command_help(NULL);
 		return;

Index: src/sys/arch/i386/stand/efiboot/conf.c
diff -u src/sys/arch/i386/stand/efiboot/conf.c:1.2 src/sys/arch/i386/stand/efiboot/conf.c:1.3
--- src/sys/arch/i386/stand/efiboot/conf.c:1.2	Wed Apr 11 10:32:09 2018
+++ src/sys/arch/i386/stand/efiboot/conf.c	Thu Sep 26 12:21:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: conf.c,v 1.2 2018/04/11 10:32:09 nonaka Exp $	 */
+/*	$NetBSD: conf.c,v 1.3 2019/09/26 12:21:03 nonaka Exp $	 */
 
 /*
  * Copyright (c) 1997
@@ -54,20 +54,23 @@
 #endif
 #endif
 #include 
+#include "devopen.h"
 #include "efinet.h"
 
 struct devsw devsw[] = {
 	{ "disk", biosdisk_strategy, biosdisk_open, biosdisk_close, biosdisk_ioctl },
+#if defined(SUPPORT_NFS) || defined(SUPPORT_TFTP)
 	{ "net", net_strategy, net_open, net_close, net_ioctl },
+#endif
 };
 int ndevs = __arraycount(devsw);
 
-#if defined(SUPPORT_NFS) || defined(SUPPORT_TFTP)
 struct netif_driver *netif_drivers[] = {
+#if defined(SUPPORT_NFS) || defined(SUPPORT_TFTP)
 	&efinetif,
+#endif
 };
 int n_netif_drivers = __arraycount(netif_drivers);
-#endif
 
 struct fs_ops file_system[] = {
 #ifdef SUPPORT_CD9660
@@ -113,3 +116,15 @@ struct fs_ops file_system_nfs = FS_OPS(n
 #ifdef SUPPORT_TFTP
 struct fs_ops file_system_tftp = FS_OPS(tftp);
 #endif
+
+#if defined(SUPPORT_NFS) || defined(SUPPORT_TFTP)
+const struct netboot_fstab netboot_fstab[] = {
+#ifdef SUPPORT_NFS
+	{ "nfs", &file_system_nfs },
+#endif
+#ifdef SUPPORT_TFTP
+	{ "tftp", &file_system_tftp },
+#endif
+};
+const 

CVS commit: src/sys/dev/ic

2019-09-26 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Sep 26 11:50:32 UTC 2019

Modified Files:
src/sys/dev/ic: nvme.c

Log Message:
nvme(4): Don't attach the device, if namespace not found.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/nvme.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/ic

2019-09-26 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Sep 26 11:50:32 UTC 2019

Modified Files:
src/sys/dev/ic: nvme.c

Log Message:
nvme(4): Don't attach the device, if namespace not found.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/nvme.c

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

Modified files:

Index: src/sys/dev/ic/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.45 src/sys/dev/ic/nvme.c:1.46
--- src/sys/dev/ic/nvme.c:1.45	Fri Sep 20 05:32:42 2019
+++ src/sys/dev/ic/nvme.c	Thu Sep 26 11:50:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme.c,v 1.45 2019/09/20 05:32:42 nonaka Exp $	*/
+/*	$NetBSD: nvme.c,v 1.46 2019/09/26 11:50:32 nonaka Exp $	*/
 /*	$OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.45 2019/09/20 05:32:42 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.46 2019/09/26 11:50:32 nonaka Exp $");
 
 #include 
 #include 
@@ -399,6 +399,10 @@ nvme_attach(struct nvme_softc *sc)
 		aprint_error_dev(sc->sc_dev, "unable to identify controller\n");
 		goto disable;
 	}
+	if (sc->sc_nn == 0) {
+		aprint_error_dev(sc->sc_dev, "namespace not found\n");
+		goto disable;
+	}
 
 	/* we know how big things are now */
 	sc->sc_max_sgl = sc->sc_mdts / sc->sc_mps;



CVS commit: src/sys/dev

2019-09-26 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Thu Sep 26 11:47:38 UTC 2019

Modified Files:
src/sys/dev: cgd_crypto.c

Log Message:
cgd_crypto.c: fix minor typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/cgd_crypto.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

2019-09-26 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Thu Sep 26 11:47:38 UTC 2019

Modified Files:
src/sys/dev: cgd_crypto.c

Log Message:
cgd_crypto.c: fix minor typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/cgd_crypto.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/cgd_crypto.c
diff -u src/sys/dev/cgd_crypto.c:1.15 src/sys/dev/cgd_crypto.c:1.16
--- src/sys/dev/cgd_crypto.c:1.15	Mon Jan  2 14:28:29 2017
+++ src/sys/dev/cgd_crypto.c	Thu Sep 26 11:47:38 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd_crypto.c,v 1.15 2017/01/02 14:28:29 alnsn Exp $ */
+/* $NetBSD: cgd_crypto.c,v 1.16 2019/09/26 11:47:38 gutteridge Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cgd_crypto.c,v 1.15 2017/01/02 14:28:29 alnsn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd_crypto.c,v 1.16 2019/09/26 11:47:38 gutteridge Exp $");
 
 #include 
 #include 
@@ -57,7 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: cgd_crypto.c
 
 /*
  * The general framework provides only one generic function.
- * It takes the name of an algorith and returns a struct cryptfuncs *
+ * It takes the name of an algorithm and returns a struct cryptfuncs *
  * for it.  It is up to the initialisation routines of the algorithm
  * to check key size and block size.
  */



CVS commit: src/bin/ksh

2019-09-26 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Sep 26 11:01:09 UTC 2019

Modified Files:
src/bin/ksh: eval.c lex.c

Log Message:
Fix FALLTHROUGH comments.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/bin/ksh/eval.c
cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/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/bin/ksh/eval.c
diff -u src/bin/ksh/eval.c:1.25 src/bin/ksh/eval.c:1.26
--- src/bin/ksh/eval.c:1.25	Tue Jun 12 14:13:55 2018
+++ src/bin/ksh/eval.c	Thu Sep 26 11:01:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.25 2018/06/12 14:13:55 kamil Exp $	*/
+/*	$NetBSD: eval.c,v 1.26 2019/09/26 11:01:09 mlelstv Exp $	*/
 
 /*
  * Expansion - quoting, separation, substitution, globbing
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: eval.c,v 1.25 2018/06/12 14:13:55 kamil Exp $");
+__RCSID("$NetBSD: eval.c,v 1.26 2019/09/26 11:01:09 mlelstv Exp $");
 #endif
 
 #include 
@@ -493,6 +493,7 @@ expand(cp, wp, f)
 		  case XARGSEP:
 			type = XARG;
 			quote = 1;
+			/* FALLTHROUGH */
 		  case XARG:
 			if ((c = *x.str++) == '\0') {
 /* force null words to be created so

Index: src/bin/ksh/lex.c
diff -u src/bin/ksh/lex.c:1.23 src/bin/ksh/lex.c:1.24
--- src/bin/ksh/lex.c:1.23	Tue May  8 16:37:59 2018
+++ src/bin/ksh/lex.c	Thu Sep 26 11:01:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: lex.c,v 1.23 2018/05/08 16:37:59 kamil Exp $	*/
+/*	$NetBSD: lex.c,v 1.24 2019/09/26 11:01:09 mlelstv Exp $	*/
 
 /*
  * lexical analysis and source input
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: lex.c,v 1.23 2018/05/08 16:37:59 kamil Exp $");
+__RCSID("$NetBSD: lex.c,v 1.24 2019/09/26 11:01:09 mlelstv Exp $");
 #endif
 
 
@@ -254,7 +254,7 @@ yylex(cf)
 		*wp++ = QCHAR, *wp++ = c;
 		break;
 	}
-	/* FALLTROUGH */
+	/* FALLTHROUGH */
   default:
 	Xcheck(ws, wp);
 	if (c) { /* trailing \ is lost */



CVS commit: src/bin/ksh

2019-09-26 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Sep 26 11:01:09 UTC 2019

Modified Files:
src/bin/ksh: eval.c lex.c

Log Message:
Fix FALLTHROUGH comments.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/bin/ksh/eval.c
cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/lex.c

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



CVS commit: src/sbin/raidctl

2019-09-26 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Sep 26 10:47:30 UTC 2019

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

Log Message:
Need MIN in userland. Also some more signed/unsigned clashes.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sbin/raidctl/raidctl.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/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.70 src/sbin/raidctl/raidctl.c:1.71
--- src/sbin/raidctl/raidctl.c:1.70	Thu Sep 26 10:33:30 2019
+++ src/sbin/raidctl/raidctl.c	Thu Sep 26 10:47:30 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: raidctl.c,v 1.70 2019/09/26 10:33:30 mlelstv Exp $   */
+/*  $NetBSD: raidctl.c,v 1.71 2019/09/26 10:47:30 mlelstv Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: raidctl.c,v 1.70 2019/09/26 10:33:30 mlelstv Exp $");
+__RCSID("$NetBSD: raidctl.c,v 1.71 2019/09/26 10:47:30 mlelstv Exp $");
 #endif
 
 
@@ -442,7 +442,7 @@ rf_get_device_status(int fd)
 		   device_status(device_config.devs[i].status));
 	}
 
-	nspares = uimin(device_config.nspares,
+	nspares = MIN(device_config.nspares,
 	__arraycount(device_config.spares));
 
 	if (nspares > 0) {
@@ -607,7 +607,7 @@ rf_output_configuration(int fd, const ch
 {
 	RF_DeviceConfig_t device_config;
 	void *cfg_ptr;
-	int i;
+	int i, nspares;
 	RF_ComponentLabel_t component_label;
 	void *label_ptr;
 	int component_num;
@@ -619,6 +619,9 @@ rf_output_configuration(int fd, const ch
 	printf("\n");
 	do_ioctl(fd, RAIDFRAME_GET_INFO, &cfg_ptr, "RAIDFRAME_GET_INFO");
 
+	nspares = MIN(device_config.nspares,
+	__arraycount(device_config.spares));
+	
 	/*
 	 * After NetBSD 9, convert this to not output the numRow's value,
 	 * which is no longer required or ever used.
@@ -635,9 +638,9 @@ rf_output_configuration(int fd, const ch
 		rf_output_devname(device_config.devs[i].devname));
 	printf("\n");
 
-	if (device_config.nspares > 0) {
+	if (nspares > 0) {
 		printf("START spare\n");
-		for(i=0; i < device_config.nspares; i++)
+		for(i=0; i < nspares; i++)
 			printf("%s\n", device_config.spares[i].devname);
 		printf("\n");
 	}
@@ -679,7 +682,7 @@ get_component_number(int fd, char *compo
 {
 	RF_DeviceConfig_t device_config;
 	void *cfg_ptr;
-	int i;
+	int i, nspares;
 	int found;
 
 	*component_number = -1;
@@ -690,6 +693,9 @@ get_component_number(int fd, char *compo
 		 "RAIDFRAME_GET_INFO");
 
 	*num_columns = device_config.cols;
+
+	nspares = MIN(device_config.nspares,
+	__arraycount(device_config.spares));
 	
 	found = 0;
 	for(i=0; i < device_config.ndevs; i++) {
@@ -700,7 +706,7 @@ get_component_number(int fd, char *compo
 		}
 	}
 	if (!found) { /* maybe it's a spare? */
-		for(i=0; i < device_config.nspares; i++) {
+		for(i=0; i < nspares; i++) {
 			if (strncmp(component_name, 
 device_config.spares[i].devname,
 PATH_MAX)==0) {



CVS commit: src/sbin/raidctl

2019-09-26 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Sep 26 10:47:30 UTC 2019

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

Log Message:
Need MIN in userland. Also some more signed/unsigned clashes.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sbin/raidctl/raidctl.c

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



CVS commit: src/sbin/raidctl

2019-09-26 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Sep 26 10:33:30 UTC 2019

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

Log Message:
nspares is now unsigned. Validate and use as positive integer.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sbin/raidctl/raidctl.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/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.69 src/sbin/raidctl/raidctl.c:1.70
--- src/sbin/raidctl/raidctl.c:1.69	Wed Feb  6 22:38:10 2019
+++ src/sbin/raidctl/raidctl.c	Thu Sep 26 10:33:30 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: raidctl.c,v 1.69 2019/02/06 22:38:10 oster Exp $   */
+/*  $NetBSD: raidctl.c,v 1.70 2019/09/26 10:33:30 mlelstv Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: raidctl.c,v 1.69 2019/02/06 22:38:10 oster Exp $");
+__RCSID("$NetBSD: raidctl.c,v 1.70 2019/09/26 10:33:30 mlelstv Exp $");
 #endif
 
 
@@ -430,7 +430,7 @@ rf_get_device_status(int fd)
 	RF_DeviceConfig_t device_config;
 	void *cfg_ptr;
 	int is_clean;
-	int i;
+	int i, nspares;
 
 	cfg_ptr = &device_config;
 
@@ -441,9 +441,13 @@ rf_get_device_status(int fd)
 		printf("%20s: %s\n", device_config.devs[i].devname, 
 		   device_status(device_config.devs[i].status));
 	}
-	if (device_config.nspares > 0) {
+
+	nspares = uimin(device_config.nspares,
+	__arraycount(device_config.spares));
+
+	if (nspares > 0) {
 		printf("Spares:\n");
-		for(i=0; i < device_config.nspares; i++) {
+		for(i=0; i < nspares; i++) {
 			printf("%20s: %s\n",
 			   device_config.spares[i].devname, 
 			   device_status(device_config.spares[i].status));
@@ -461,8 +465,8 @@ rf_get_device_status(int fd)
 		}
 	}
 
-	if (device_config.nspares > 0) {
-		for(i=0; i < device_config.nspares; i++) {
+	if (nspares > 0) {
+		for(i=0; i < nspares; i++) {
 			if ((device_config.spares[i].status == 
 			 rf_ds_optimal) ||
 			(device_config.spares[i].status == 



CVS commit: src/sbin/raidctl

2019-09-26 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Thu Sep 26 10:33:30 UTC 2019

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

Log Message:
nspares is now unsigned. Validate and use as positive integer.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sbin/raidctl/raidctl.c

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



CVS commit: src/tools

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 09:21:34 UTC 2019

Modified Files:
src/tools: Makefile

Log Message:
Exclude more subdirs if TOOLS_BUILDRUMP=yes.

Exclude subdirs added in the last 3 years but not need for rumpkernel builds.


To generate a diff of this commit:
cvs rdiff -u -r1.203 -r1.204 src/tools/Makefile

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



CVS commit: src/tools

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 09:21:34 UTC 2019

Modified Files:
src/tools: Makefile

Log Message:
Exclude more subdirs if TOOLS_BUILDRUMP=yes.

Exclude subdirs added in the last 3 years but not need for rumpkernel builds.


To generate a diff of this commit:
cvs rdiff -u -r1.203 -r1.204 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.203 src/tools/Makefile:1.204
--- src/tools/Makefile:1.203	Tue May  7 10:22:54 2019
+++ src/tools/Makefile	Thu Sep 26 09:21:34 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.203 2019/05/07 10:22:54 hannken Exp $
+#	$NetBSD: Makefile,v 1.204 2019/09/26 09:21:34 bad Exp $
 
 .include 
 .include 
@@ -100,10 +100,10 @@ SUBDIR+= cap_mkdb crunchgen ctags gencat
 		makewhatis mtree nbperf .WAIT uudecode
 .endif
 
-SUBDIR+= cat rpcgen join lorder m4 mkdep tsort xz-include .WAIT yacc .WAIT awk .WAIT lex
-SUBDIR+= grep xz-lib pax .WAIT libprop
-
+SUBDIR+= cat rpcgen join lorder m4 mkdep tsort .WAIT yacc .WAIT awk .WAIT lex
 .if ${TOOLS_BUILDRUMP} == "no"
+SUBDIR+= xz-include .WAIT grep xz-lib pax .WAIT libprop
+
 SUBDIR += .WAIT texinfo \
 	.WAIT tic \
 	.WAIT ${TOOLCHAIN_BITS} \
@@ -118,7 +118,10 @@ SUBDIR += .WAIT texinfo \
 		.WAIT installboot \
 		pwd_mkdb strfile sunlabel vgrind zic
 .endif
-SUBDIR+= stat .WAIT config xz-bin
+SUBDIR+= stat .WAIT config
+.if ${TOOLS_BUILDRUMP} == "no"
+SUBDIR+= xz-bin
+.endif
 
 .if ${MKLLVM} != "no" || ${MKLLVMRT} != "no"
 SUBDIR+= \



CVS commit: src/sys/dev/i2c

2019-09-26 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Sep 26 08:16:26 UTC 2019

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

Log Message:
Abort attach if acpi_intr_establish() fails. From K. Schreiner on
current-users@.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/i2c/ihidev.c

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

Modified files:

Index: src/sys/dev/i2c/ihidev.c
diff -u src/sys/dev/i2c/ihidev.c:1.7 src/sys/dev/i2c/ihidev.c:1.8
--- src/sys/dev/i2c/ihidev.c:1.7	Fri Nov 16 23:05:50 2018
+++ src/sys/dev/i2c/ihidev.c	Thu Sep 26 08:16:26 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ihidev.c,v 1.7 2018/11/16 23:05:50 jmcneill Exp $ */
+/* $NetBSD: ihidev.c,v 1.8 2019/09/26 08:16:26 bouyer Exp $ */
 /* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */
 
 /*-
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.7 2018/11/16 23:05:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.8 2019/09/26 08:16:26 bouyer Exp $");
 
 #include 
 #include 
@@ -210,8 +210,10 @@ ihidev_attach(device_t parent, device_t 
 
 		sc->sc_ih = acpi_intr_establish(self, sc->sc_phandle, IPL_TTY,
 		false, ihidev_intr, sc, device_xname(self));
-		if (sc->sc_ih == NULL)
+		if (sc->sc_ih == NULL) {
 			aprint_error_dev(self, "can't establish interrupt\n");
+			return;
+		}
 		aprint_normal_dev(self, "interrupting at %s\n",
 		acpi_intr_string(sc->sc_ih, buf, sizeof(buf)));
 	}



CVS commit: src/sys/dev/i2c

2019-09-26 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Sep 26 08:16:26 UTC 2019

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

Log Message:
Abort attach if acpi_intr_establish() fails. From K. Schreiner on
current-users@.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/i2c/ihidev.c

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