CVS commit: src/lib/libcurses

2021-06-05 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sun Jun  6 05:06:44 UTC 2021

Modified Files:
src/lib/libcurses: addbytes.c

Log Message:
Fix for PR lib/56224
Correct addstr behaviour so it truncates the string in the case where
a string is added on the bottom line of a window where scrolling is
disabled as per the SUSv2 specification.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/lib/libcurses/addbytes.c

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

Modified files:

Index: src/lib/libcurses/addbytes.c
diff -u src/lib/libcurses/addbytes.c:1.54 src/lib/libcurses/addbytes.c:1.55
--- src/lib/libcurses/addbytes.c:1.54	Sat Feb 13 14:30:37 2021
+++ src/lib/libcurses/addbytes.c	Sun Jun  6 05:06:44 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: addbytes.c,v 1.54 2021/02/13 14:30:37 rillig Exp $	*/
+/*	$NetBSD: addbytes.c,v 1.55 2021/06/06 05:06:44 blymn Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)addbytes.c	8.4 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: addbytes.c,v 1.54 2021/02/13 14:30:37 rillig Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.55 2021/06/06 05:06:44 blymn Exp $");
 #endif
 #endif/* not lint */
 
@@ -170,6 +170,15 @@ _cursesi_waddbytes(WINDOW *win, const ch
 		} else if (wc == 0) {
 			break;
 		}
+
+		/* if scrollok is false and we are at the bottom of
+		 * screen and this character would take us past the
+		 * end of the line then we are done.
+		 */
+		if ((win->curx + n >= win->maxx) && 
+		(!(win->flags & __SCROLLOK)) &&
+		(win->cury == win->scr_b))
+			break;
 #ifdef DEBUG
 		__CTRACE(__CTRACE_INPUT,
 		"ADDBYTES WIDE(0x%x [%s], %x) at (%d, %d), ate %d bytes\n",
@@ -214,6 +223,19 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
 		case '\t':
 			tabsize = win->screen->TABSIZE;
 			newx = tabsize - (*x % tabsize);
+			/* if at the bottom of the window and
+			   not allowed to scroll then just do
+			   what we can */
+			if ((*y == win->scr_b) &&
+			!(win->flags & __SCROLLOK)) {
+if ((*lp)->flags & __ISPASTEOL) {
+	return OK;
+}
+
+if (*x + newx > win->maxx - 1)
+	newx = win->maxx - *x - 1;
+			}
+
 			for (i = 0; i < newx; i++) {
 if (waddbytes(win, blank, 1) == ERR)
 	return ERR;
@@ -366,6 +388,20 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 			cc.attributes = win->wattr;
 			tabsize = win->screen->TABSIZE;
 			newx = tabsize - (*x % tabsize);
+
+			/* if at the bottom of the window and
+			   not allowed to scroll then just do
+			   what we can */
+			if ((*y == win->scr_b) &&
+			!(win->flags & __SCROLLOK)) {
+if ((*lnp)->flags & __ISPASTEOL) {
+	return OK;
+}
+
+if (*x + newx > win->maxx - 1)
+	newx = win->maxx - *x - 1;
+			}
+
 			for (i = 0; i < newx; i++) {
 if (wadd_wch(win, ) == ERR)
 	return ERR;



CVS commit: src/distrib/sets/lists/tests

2021-06-05 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sun Jun  6 04:59:36 UTC 2021

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
New check files added for the libcurses addstr test.


To generate a diff of this commit:
cvs rdiff -u -r1.1055 -r1.1056 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1055 src/distrib/sets/lists/tests/mi:1.1056
--- src/distrib/sets/lists/tests/mi:1.1055	Sat Jun  5 22:17:15 2021
+++ src/distrib/sets/lists/tests/mi	Sun Jun  6 04:59:36 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1055 2021/06/05 22:17:15 blymn Exp $
+# $NetBSD: mi,v 1.1056 2021/06/06 04:59:36 blymn Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3270,6 +3270,8 @@
 ./usr/tests/lib/libcurses/check_files/addnwstr1.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/addnwstr2.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/addstr.chk		tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libcurses/check_files/addstr2.chk		tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libcurses/check_files/addstr3.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/addwstr1.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/addwstr2.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/addwstr3.chk		tests-lib-tests		compattestfile,atf



CVS commit: src/tests/lib/libcurses

2021-06-05 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sun Jun  6 04:57:58 UTC 2021

Modified Files:
src/tests/lib/libcurses/check_files: Makefile slk1.chk slk3.chk
slk5.chk slk6.chk slk_init.chk
src/tests/lib/libcurses/tests: addstr slk
Added Files:
src/tests/lib/libcurses/check_files: addstr2.chk addstr3.chk

Log Message:
New tests and updates for corrected behaviour due to fix for PR56224
* Added extra testing to the addstr test to demonstrate bug described
  in PR#56224 and validate case when scrolling enabled still works.
* Fixed slk test, the slk_init output changed due to corrected wrapping,
  slk_restore no longer returns ERR probably due to addwchar no longer
  returning ERR when an implicit scroll was attempted when scrolling
  disabled.  Commented out the slk_wset test, this is now returning ERR
  instead of misbehaving, needs investigation.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/check_files/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/check_files/addstr2.chk \
src/tests/lib/libcurses/check_files/addstr3.chk
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/check_files/slk1.chk \
src/tests/lib/libcurses/check_files/slk3.chk \
src/tests/lib/libcurses/check_files/slk5.chk \
src/tests/lib/libcurses/check_files/slk6.chk \
src/tests/lib/libcurses/check_files/slk_init.chk
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/tests/addstr
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/slk

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

Modified files:

Index: src/tests/lib/libcurses/check_files/Makefile
diff -u src/tests/lib/libcurses/check_files/Makefile:1.6 src/tests/lib/libcurses/check_files/Makefile:1.7
--- src/tests/lib/libcurses/check_files/Makefile:1.6	Sat Jun  5 06:11:09 2021
+++ src/tests/lib/libcurses/check_files/Makefile	Sun Jun  6 04:57:58 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2021/06/05 06:11:09 blymn Exp $
+# $NetBSD: Makefile,v 1.7 2021/06/06 04:57:58 blymn Exp $
 
 NOMAN=		# defined
 
@@ -21,6 +21,8 @@ FILES+=		addnstr.chk
 FILES+=		addnwstr1.chk
 FILES+=		addnwstr2.chk
 FILES+=		addstr.chk
+FILES+=		addstr2.chk
+FILES+=		addstr3.chk
 FILES+=		addwstr1.chk
 FILES+=		addwstr2.chk
 FILES+=		addwstr3.chk

Index: src/tests/lib/libcurses/check_files/slk1.chk
diff -u src/tests/lib/libcurses/check_files/slk1.chk:1.1 src/tests/lib/libcurses/check_files/slk1.chk:1.2
--- src/tests/lib/libcurses/check_files/slk1.chk:1.1	Sat Oct 24 04:46:16 2020
+++ src/tests/lib/libcurses/check_files/slk1.chk	Sun Jun  6 04:57:58 2021
@@ -1 +1 @@
-cup24;1Xrevone sgr0smsosmulrev  one   rmsormulsgr0smsorev onermsosgr0cup24;42Xsmulrev  five  cup24;73Xeight!!rmam!smamcup24;50Xrmulsgr0
\ No newline at end of file
+cup24;1Xrevone sgr0smsosmulrev  one   rmsormulsgr0smsorev onermsosgr0cup24;42Xsmulrev  five  cup24;73Xeight!!cup24;50Xrmulsgr0
\ No newline at end of file
Index: src/tests/lib/libcurses/check_files/slk3.chk
diff -u src/tests/lib/libcurses/check_files/slk3.chk:1.1 src/tests/lib/libcurses/check_files/slk3.chk:1.2
--- src/tests/lib/libcurses/check_files/slk3.chk:1.1	Sat Oct 24 04:46:16 2020
+++ src/tests/lib/libcurses/check_files/slk3.chk	Sun Jun  6 04:57:58 2021
@@ -1 +1 @@
-smulrev one  five  eight!!rmam!smamcup24;1Xrmulsgr0
\ No newline at end of file
+smulrev one  five  eight!!rmulsgr0
\ No newline at end of file
Index: src/tests/lib/libcurses/check_files/slk5.chk
diff -u src/tests/lib/libcurses/check_files/slk5.chk:1.1 src/tests/lib/libcurses/check_files/slk5.chk:1.2
--- src/tests/lib/libcurses/check_files/slk5.chk:1.1	Sat Oct 24 04:46:16 2020
+++ src/tests/lib/libcurses/check_files/slk5.chk	Sun Jun  6 04:57:58 2021
@@ -1 +1 @@
-cup24;1Xsmulrev onesgr0 smulrev  two   sgr0 smulrevsgr0 smulrevsgr0  smulrev  five  sgr0 smulrevsgr0 smulrevsgr0 smulreveight!!rmam!smamcup24;18Xrmulsgr0
\ No newline at end of file
+cup24;1Xsmulrev onesgr0 smulrev  two   sgr0 smulrevsgr0 smulrevsgr0  smulrev  five  sgr0 smulrevsgr0 smulrevsgr0 smulreveight!!rmulsgr0elcup24;18X
\ No newline at end of file
Index: src/tests/lib/libcurses/check_files/slk6.chk
diff -u src/tests/lib/libcurses/check_files/slk6.chk:1.1 src/tests/lib/libcurses/check_files/slk6.chk:1.2
--- src/tests/lib/libcurses/check_files/slk6.chk:1.1	Sat Oct 24 04:46:16 2020
+++ src/tests/lib/libcurses/check_files/slk6.chk	Sun Jun  6 04:57:58 2021
@@ -1 +1 @@
-opsetaf7Xsetab0Xsmulrev onesgr0setaf7Xsetab0X smulrev  two   sgr0setaf7Xsetab0X smulrevsgr0setaf7Xsetab0X setaf1Xsetab2Xsmulrevfoursgr0setaf7Xsetab0X  smulrev  five  sgr0setaf7Xsetab0X smulrevsgr0setaf7Xsetab0X smulrevsgr0setaf7Xsetab0X 

CVS commit: src/external/gpl3/gcc

2021-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  6 01:09:08 UTC 2021

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el: c++config.h
symver-config.h
src/external/gpl3/gcc/usr.bin/gcc/arch/mipsn64el: auto-host.h
configargs.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/mipsn64el: config.h

Log Message:
regen mipsn64el


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/symver-config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/usr.bin/gcc/arch/mipsn64el/auto-host.h \
src/external/gpl3/gcc/usr.bin/gcc/arch/mipsn64el/configargs.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/usr.bin/libcpp/arch/mipsn64el/config.h

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

Modified files:

Index: src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h
diff -u src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h:1.1 src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h:1.2
--- src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h:1.1	Mon Apr 26 13:29:25 2021
+++ src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h	Sat Jun  5 21:09:08 2021
@@ -85,7 +85,7 @@
 #define HAVE_UNISTD_H 1
 
 /* Define if -lz is available. */
-/* #undef HAVE_ZLIB */
+#define HAVE_ZLIB 1
 
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
*/

Index: src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h:1.1 src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h:1.2
--- src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h:1.1	Mon Apr 26 13:29:26 2021
+++ src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h	Sat Jun  5 21:09:08 2021
@@ -702,10 +702,10 @@ namespace std
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* Define to 1 if you have the `acosf' function. */
-/* #undef _GLIBCXX_HAVE_ACOSF */
+#define _GLIBCXX_HAVE_ACOSF 1
 
 /* Define to 1 if you have the `acosl' function. */
-/* #undef _GLIBCXX_HAVE_ACOSL */
+#define _GLIBCXX_HAVE_ACOSL 1
 
 /* Define to 1 if you have the `aligned_alloc' function. */
 #define _GLIBCXX_HAVE_ALIGNED_ALLOC 1
@@ -714,25 +714,25 @@ namespace std
 #define _GLIBCXX_HAVE_ARPA_INET_H 1
 
 /* Define to 1 if you have the `asinf' function. */
-/* #undef _GLIBCXX_HAVE_ASINF */
+#define _GLIBCXX_HAVE_ASINF 1
 
 /* Define to 1 if you have the `asinl' function. */
-/* #undef _GLIBCXX_HAVE_ASINL */
+#define _GLIBCXX_HAVE_ASINL 1
 
 /* Define to 1 if the target assembler supports .symver directive. */
 #define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
 
 /* Define to 1 if you have the `atan2f' function. */
-/* #undef _GLIBCXX_HAVE_ATAN2F */
+#define _GLIBCXX_HAVE_ATAN2F 1
 
 /* Define to 1 if you have the `atan2l' function. */
-/* #undef _GLIBCXX_HAVE_ATAN2L */
+#define _GLIBCXX_HAVE_ATAN2L 1
 
 /* Define to 1 if you have the `atanf' function. */
-/* #undef _GLIBCXX_HAVE_ATANF */
+#define _GLIBCXX_HAVE_ATANF 1
 
 /* Define to 1 if you have the `atanl' function. */
-/* #undef _GLIBCXX_HAVE_ATANL */
+#define _GLIBCXX_HAVE_ATANL 1
 
 /* Defined if shared_ptr reference counting should use atomic operations. */
 #define _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY 1
@@ -744,25 +744,25 @@ namespace std
 /* #undef _GLIBCXX_HAVE_CC_TLS */
 
 /* Define to 1 if you have the `ceilf' function. */
-/* #undef _GLIBCXX_HAVE_CEILF */
+#define _GLIBCXX_HAVE_CEILF 1
 
 /* Define to 1 if you have the `ceill' function. */
-/* #undef _GLIBCXX_HAVE_CEILL */
+#define _GLIBCXX_HAVE_CEILL 1
 
 /* Define to 1 if you have the  header file. */
 #define _GLIBCXX_HAVE_COMPLEX_H 1
 
 /* Define to 1 if you have the `cosf' function. */
-/* #undef _GLIBCXX_HAVE_COSF */
+#define _GLIBCXX_HAVE_COSF 1
 
 /* Define to 1 if you have the `coshf' function. */
-/* #undef _GLIBCXX_HAVE_COSHF */
+#define _GLIBCXX_HAVE_COSHF 1
 
 /* Define to 1 if you have the `coshl' function. */
-/* #undef _GLIBCXX_HAVE_COSHL */
+#define _GLIBCXX_HAVE_COSHL 1
 
 /* Define to 1 if you have the `cosl' function. */
-/* #undef _GLIBCXX_HAVE_COSL */
+#define _GLIBCXX_HAVE_COSL 1
 
 /* Define to 1 if you have the  header file. */
 #define _GLIBCXX_HAVE_DIRENT_H 1
@@ -780,16 +780,16 @@ namespace std
 #define _GLIBCXX_HAVE_EXECINFO_H 1
 
 /* Define to 1 if you have the `expf' function. */
-/* #undef _GLIBCXX_HAVE_EXPF */
+#define _GLIBCXX_HAVE_EXPF 1
 
 /* Define to 1 if you have the `expl' function. */
-/* #undef _GLIBCXX_HAVE_EXPL */
+#define _GLIBCXX_HAVE_EXPL 1
 
 /* Define to 1 if you have the `fabsf' function. */
-/* 

CVS commit: src/sys/dev/mii

2021-06-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jun  5 22:45:03 UTC 2021

Modified Files:
src/sys/dev/mii: mii_verbose.c

Log Message:
Ooopppsss - typo!


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

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

Modified files:

Index: src/sys/dev/mii/mii_verbose.c
diff -u src/sys/dev/mii/mii_verbose.c:1.7 src/sys/dev/mii/mii_verbose.c:1.8
--- src/sys/dev/mii/mii_verbose.c:1.7	Sat Jun  5 22:21:15 2021
+++ src/sys/dev/mii/mii_verbose.c	Sat Jun  5 22:45:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii_verbose.c,v 1.7 2021/06/05 22:21:15 pgoyette Exp $ */
+/*	$NetBSD: mii_verbose.c,v 1.8 2021/06/05 22:45:03 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.7 2021/06/05 22:21:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.8 2021/06/05 22:45:03 pgoyette Exp $");
 
 #include 
 #include 
@@ -81,7 +81,7 @@ miiverbose_modcmd(modcmd_t cmd, void *ar
 		mii_get_descr = saved_mii_get_descr;
 		mii_verbose_loaded = 0;
 		return 0;
-	casce MODULE_CMD_AUTOUNLOAD:
+	case MODULE_CMD_AUTOUNLOAD:
 		return EBUSY;
 	default:
 		return ENOTTY;



CVS commit: src/sys/arch/sbmips/stand/netboot

2021-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  5 22:26:51 UTC 2021

Modified Files:
src/sys/arch/sbmips/stand/netboot: dev_net.c

Log Message:
Use the libsa dev_net.c (fixes the build since this defined netmask
which has moved to a different file in libsa).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sbmips/stand/netboot/dev_net.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/sbmips/stand/netboot/dev_net.c
diff -u src/sys/arch/sbmips/stand/netboot/dev_net.c:1.6 src/sys/arch/sbmips/stand/netboot/dev_net.c:1.7
--- src/sys/arch/sbmips/stand/netboot/dev_net.c:1.6	Sun Jul 17 16:54:46 2011
+++ src/sys/arch/sbmips/stand/netboot/dev_net.c	Sat Jun  5 18:26:51 2021
@@ -1,251 +1 @@
-/* $NetBSD: dev_net.c,v 1.6 2011/07/17 20:54:46 joerg Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * This module implements a "raw device" interface suitable for
- * use by the stand-alone I/O library NFS code.  This interface
- * does not support any "block" access, and exists only for the
- * purpose of initializing the network interface, getting boot
- * parameters, and performing the NFS mount.
- *
- * At open time, this does:
- *
- * find interface  - netif_open()
- * RARP for IP address - rarp_getipaddress()
- * RPC/bootparams  - callrpc(d, RPC_BOOTPARAMS, ...)
- * RPC/mountd  - nfs_mount(sock, ip, path)
- *
- * the root file handle from mountd is saved in a global
- * for use by the NFS open code (NFS/lookup).
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#include 
-
-#ifndef SUN_BOOTPARAMS
-void bootp(int);
-#endif
-
-extern int debug;
-extern int nfs_root_node[];	/* XXX - get from nfs_mount() */
-
-/*
- * Various globals needed by the network code:
- */
-
-#if 0
-/* for arp.c, rarp.c */
-u_char bcea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-#endif
-
-struct	in_addr myip;		/* my ip address */
-struct	in_addr rootip;		/* root ip address */
-struct	in_addr gateip;		/* swap ip address */
-n_long	netmask;		/* subnet or net mask */
-
-char rootpath[FNAME_SIZE];
-char hostname[FNAME_SIZE];
-
-/*
- * Local things...
- */
-static int netdev_sock = -1;
-static int netdev_opens;
-
-int net_getparams(int);
-
-/*
- * Called by devopen after it sets f->f_dev to our devsw entry.
- * This opens the low-level device and sets f->f_devdata.
- * This is declared with variable arguments...
- */
-int
-net_open(struct open_file *f, ...)
-{
-	va_list ap;
-	char *devname;		/* Device part of file name (or NULL). */
-	int error = 0;
-
-	va_start(ap, f);
-	devname = va_arg(ap, char*);
-	va_end(ap);
-
-#ifdef	NETIF_DEBUG
-	if (debug)
-		printf("net_open: %s\n", devname);
-#endif
-
-	/* On first open, do netif open, mount, etc. */
-	if (netdev_opens == 0) {
-		/* Find network interface. */
-		if (netdev_sock < 0) {
-			netdev_sock = netif_open(devname);
-			if (netdev_sock < 0) {
-printf("net_open: netif_open() failed\n");
-return (ENXIO);
-			}
-			if (debug)
-printf("net_open: netif_open() succeeded\n");
-		}
-		if (rootip.s_addr == 0) {
-			/* Get root IP address, and path, etc. */
-			error = net_getparams(netdev_sock);
-			if (error) {
-/* getparams makes its own noise */
-goto fail;
-			}
-			/* Get the NFS file handle (mountd). */
-			error = nfs_mount(netdev_sock, rootip, rootpath);
-			if (error) {
-error = errno;
-printf("net_open: NFS mount error=%d\n", error);
-rootip.s_addr = 0;
-			fail:
-netif_close(netdev_sock);
-netdev_sock = -1;
-return 

CVS commit: src/sys/dev

2021-06-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jun  5 22:21:15 UTC 2021

Modified Files:
src/sys/dev/mii: mii_verbose.c
src/sys/dev/scsipi: scsipi_verbose.c

Log Message:
As with usbverbose and pciverbose, these modules are not safe to be
auto-unloaded.  Disable for now.

All of these need to be updated with an appropriate refcount mechanism
to ensure that the code and/or tables aren't unloaded while they are
being used.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/mii/mii_verbose.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/scsipi/scsipi_verbose.c

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

Modified files:

Index: src/sys/dev/mii/mii_verbose.c
diff -u src/sys/dev/mii/mii_verbose.c:1.6 src/sys/dev/mii/mii_verbose.c:1.7
--- src/sys/dev/mii/mii_verbose.c:1.6	Mon Mar 25 09:46:24 2019
+++ src/sys/dev/mii/mii_verbose.c	Sat Jun  5 22:21:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii_verbose.c,v 1.6 2019/03/25 09:46:24 msaitoh Exp $ */
+/*	$NetBSD: mii_verbose.c,v 1.7 2021/06/05 22:21:15 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.6 2019/03/25 09:46:24 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.7 2021/06/05 22:21:15 pgoyette Exp $");
 
 #include 
 #include 
@@ -81,6 +81,8 @@ miiverbose_modcmd(modcmd_t cmd, void *ar
 		mii_get_descr = saved_mii_get_descr;
 		mii_verbose_loaded = 0;
 		return 0;
+	casce MODULE_CMD_AUTOUNLOAD:
+		return EBUSY;
 	default:
 		return ENOTTY;
 	}

Index: src/sys/dev/scsipi/scsipi_verbose.c
diff -u src/sys/dev/scsipi/scsipi_verbose.c:1.34 src/sys/dev/scsipi/scsipi_verbose.c:1.35
--- src/sys/dev/scsipi/scsipi_verbose.c:1.34	Sun Sep 16 23:20:18 2018
+++ src/sys/dev/scsipi/scsipi_verbose.c	Sat Jun  5 22:21:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsipi_verbose.c,v 1.34 2018/09/16 23:20:18 mrg Exp $	*/
+/*	$NetBSD: scsipi_verbose.c,v 1.35 2021/06/05 22:21:15 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scsipi_verbose.c,v 1.34 2018/09/16 23:20:18 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_verbose.c,v 1.35 2021/06/05 22:21:15 pgoyette Exp $");
 
 #include 
 #include 
@@ -853,6 +853,8 @@ scsiverbose_modcmd(modcmd_t cmd, void *a
 		scsipi_print_sense_data = saved_print_sense_data;
 		scsi_verbose_loaded = 0;
 		return 0;
+	case MODULE_CMD_AUTOUNLOAD:
+		return EBUSY;
 	default:
 		return ENOTTY;
 	}



CVS commit: src/distrib/sets/lists/tests

2021-06-05 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sat Jun  5 22:17:15 UTC 2021

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
New check file for libcurses clear test.


To generate a diff of this commit:
cvs rdiff -u -r1.1054 -r1.1055 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1054 src/distrib/sets/lists/tests/mi:1.1055
--- src/distrib/sets/lists/tests/mi:1.1054	Tue May 25 19:22:18 2021
+++ src/distrib/sets/lists/tests/mi	Sat Jun  5 22:17:15 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1054 2021/05/25 19:22:18 rillig Exp $
+# $NetBSD: mi,v 1.1055 2021/06/05 22:17:15 blymn Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3290,6 +3290,7 @@
 ./usr/tests/lib/libcurses/check_files/chgat1.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/chgat2.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/chgat3.chk		tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libcurses/check_files/clear0.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/clear1.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/clear10.chk		tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libcurses/check_files/clear2.chk		tests-lib-tests		compattestfile,atf



CVS commit: src/sys/arch/playstation2

2021-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  5 21:38:37 UTC 2021

Modified Files:
src/sys/arch/playstation2/ee: timer.c
src/sys/arch/playstation2/playstation2: interrupt.c

Log Message:
Make this compile again; there is no SPL_SOFT, so use SPL_SOFTBIO. This
does not matter since we don't do __HAVE_FAST_SOFTINTS...


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/playstation2/ee/timer.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/playstation2/playstation2/interrupt.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/playstation2/ee/timer.c
diff -u src/sys/arch/playstation2/ee/timer.c:1.8 src/sys/arch/playstation2/ee/timer.c:1.9
--- src/sys/arch/playstation2/ee/timer.c:1.8	Mon Mar 31 07:25:49 2014
+++ src/sys/arch/playstation2/ee/timer.c	Sat Jun  5 17:38:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer.c,v 1.8 2014/03/31 11:25:49 martin Exp $	*/
+/*	$NetBSD: timer.c,v 1.9 2021/06/05 21:38:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.8 2014/03/31 11:25:49 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.9 2021/06/05 21:38:37 christos Exp $");
 
 #include "debug_playstation2.h"
 
@@ -116,7 +116,7 @@ timer1_intr(void *arg)
 	_reg_write_4(T1_MODE_REG, T_MODE_EQUF | T_MODE_OVFF);
 
 #ifdef __HAVE_FAST_SOFTINTS
-	softintr_dispatch(0); /* IPL_SOFT */
+	softintr_dispatch(0); /* IPL_SOFTCLOCK */
 #endif
 
 	return (1);
@@ -129,7 +129,7 @@ timer2_intr(void *arg)
 	_reg_write_4(T2_MODE_REG, T_MODE_EQUF | T_MODE_OVFF);
 
 #ifdef __HAVE_FAST_SOFTINTS
-	softintr_dispatch(1); /* IPL_SOFTCLOCK */
+	softintr_dispatch(1); /* IPL_SOFTBIO */
 #endif
 	return (1);
 }

Index: src/sys/arch/playstation2/playstation2/interrupt.c
diff -u src/sys/arch/playstation2/playstation2/interrupt.c:1.16 src/sys/arch/playstation2/playstation2/interrupt.c:1.17
--- src/sys/arch/playstation2/playstation2/interrupt.c:1.16	Thu Feb  8 04:05:18 2018
+++ src/sys/arch/playstation2/playstation2/interrupt.c	Sat Jun  5 17:38:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: interrupt.c,v 1.16 2018/02/08 09:05:18 dholland Exp $	*/
+/*	$NetBSD: interrupt.c,v 1.17 2021/06/05 21:38:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.16 2018/02/08 09:05:18 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.17 2021/06/05 21:38:37 christos Exp $");
 
 #include "debug_playstation2.h"
 #if defined INTR_DEBUG && !defined GSFB_DEBUG_MONITOR
@@ -105,8 +105,8 @@ interrupt_init(void)
 	evcnt_attach_static(&_playstation2_evcnt.dmac);
 
 	/* install software interrupt handler */
-	intc_intr_establish(I_CH10_TIMER1, IPL_SOFT, timer1_intr, 0);
-	intc_intr_establish(I_CH11_TIMER2, IPL_SOFTCLOCK, timer2_intr, 0);
+	intc_intr_establish(I_CH10_TIMER1, IPL_SOFTCLOCK, timer1_intr, 0);
+	intc_intr_establish(I_CH11_TIMER2, IPL_SOFTBIO, timer2_intr, 0);
 
 	/* IPL_SOFTNET and IPL_SOFTSERIAL are shared interrupt. */
 	intc_intr_establish(I_CH12_TIMER3, IPL_SOFTNET, timer3_intr, 0);



CVS commit: src/sys/arch

2021-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  5 21:24:17 UTC 2021

Modified Files:
src/sys/arch/epoc32/include: intr.h
src/sys/arch/hpcarm/include: intr.h
src/sys/arch/zaurus/include: intr.h

Log Message:
there is no SPL_SOFT


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/include/intr.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hpcarm/include/intr.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/zaurus/include/intr.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/epoc32/include/intr.h
diff -u src/sys/arch/epoc32/include/intr.h:1.2 src/sys/arch/epoc32/include/intr.h:1.3
--- src/sys/arch/epoc32/include/intr.h:1.2	Thu Jul 23 15:25:14 2020
+++ src/sys/arch/epoc32/include/intr.h	Sat Jun  5 17:24:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.2 2020/07/23 19:25:14 skrll Exp $	*/
+/*	$NetBSD: intr.h,v 1.3 2021/06/05 21:24:16 christos Exp $	*/
 
 /*
  * Copyright (c) 2001, 2003 Wasabi Systems, Inc.
@@ -71,8 +71,6 @@
 
 #include 
 
-#define	splsoft()	_splraise(IPL_SOFT)
-
 typedef uint8_t ipl_t;
 typedef struct {
 	ipl_t _ipl;

Index: src/sys/arch/hpcarm/include/intr.h
diff -u src/sys/arch/hpcarm/include/intr.h:1.21 src/sys/arch/hpcarm/include/intr.h:1.22
--- src/sys/arch/hpcarm/include/intr.h:1.21	Mon Jul 27 08:32:54 2020
+++ src/sys/arch/hpcarm/include/intr.h	Sat Jun  5 17:24:17 2021
@@ -1,4 +1,4 @@
-/* 	$NetBSD: intr.h,v 1.21 2020/07/27 12:32:54 skrll Exp $	*/
+/* 	$NetBSD: intr.h,v 1.22 2021/06/05 21:24:17 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -124,8 +124,6 @@ void	splx(int);
 
 #endif	/* ARM_INTR_IMPL */
 
-#define splsoft()	_splraise(IPL_SOFT)
-
 #endif /* _MODULE */
 
 typedef uint8_t ipl_t;

Index: src/sys/arch/zaurus/include/intr.h
diff -u src/sys/arch/zaurus/include/intr.h:1.11 src/sys/arch/zaurus/include/intr.h:1.12
--- src/sys/arch/zaurus/include/intr.h:1.11	Mon Jul 27 08:32:54 2020
+++ src/sys/arch/zaurus/include/intr.h	Sat Jun  5 17:24:17 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.11 2020/07/27 12:32:54 skrll Exp $	*/
+/*	$NetBSD: intr.h,v 1.12 2021/06/05 21:24:17 christos Exp $	*/
 
 /*
  * Copyright (c) 2001, 2003 Wasabi Systems, Inc.
@@ -119,8 +119,6 @@ void	splx(int);
 
 #endif	/* ARM_INTR_IMPL */
 
-#define	splsoft()	_splraise(IPL_SOFT)
-
 #endif /* _MODULE */
 
 typedef uint8_t ipl_t;



CVS commit: src/sys/dev/pci

2021-06-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jun  5 14:28:28 UTC 2021

Modified Files:
src/sys/dev/pci: if_ti.c if_tireg.h

Log Message:
Back out the following changes:

  http://mail-index.netbsd.org/source-changes/2020/02/29/msg114581.html
  http://mail-index.netbsd.org/source-changes/2020/02/29/msg114583.html

They have reportedly caused some issues with link detection, and will
be revisited later.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/pci/if_ti.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/if_tireg.h

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

Modified files:

Index: src/sys/dev/pci/if_ti.c
diff -u src/sys/dev/pci/if_ti.c:1.120 src/sys/dev/pci/if_ti.c:1.121
--- src/sys/dev/pci/if_ti.c:1.120	Thu Mar  5 15:45:48 2020
+++ src/sys/dev/pci/if_ti.c	Sat Jun  5 14:28:28 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.120 2020/03/05 15:45:48 msaitoh Exp $ */
+/* $NetBSD: if_ti.c,v 1.121 2021/06/05 14:28:28 thorpej Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.120 2020/03/05 15:45:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.121 2021/06/05 14:28:28 thorpej Exp $");
 
 #include "opt_inet.h"
 
@@ -123,16 +123,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.
 #include 
 #include 
 
-#define	TI_HOSTADDR(x, y)		\
-	do {\
-		(x).ti_addr_lo = (uint32_t)(y);\
-		if (sizeof(bus_addr_t) == 8)\
-			(x).ti_addr_hi =\
-			(uint32_t)(((uint64_t)(y) >> 32));		\
-		else			\
-			(x).ti_addr_hi = 0;\
-	} while (/*CONSTCOND*/0)
-
 /*
  * Various supported device vendors/types and their names.
  */
@@ -752,7 +742,7 @@ ti_newbuf_std(struct ti_softc *sc, int i
 
 	sc->ti_cdata.ti_rx_std_chain[i] = m_new;
 	r = >ti_rdata->ti_rx_std_ring[i];
-	TI_HOSTADDR(r->ti_addr, dmamap->dm_segs[0].ds_addr);
+	TI_HOSTADDR(r->ti_addr) = dmamap->dm_segs[0].ds_addr;
 	r->ti_type = TI_BDTYPE_RECV_BD;
 	r->ti_flags = 0;
 	if (sc->ethercom.ec_if.if_capenable & IFCAP_CSUM_IPv4_Rx)
@@ -819,7 +809,7 @@ ti_newbuf_mini(struct ti_softc *sc, int 
 
 	r = >ti_rdata->ti_rx_mini_ring[i];
 	sc->ti_cdata.ti_rx_mini_chain[i] = m_new;
-	TI_HOSTADDR(r->ti_addr, dmamap->dm_segs[0].ds_addr);
+	TI_HOSTADDR(r->ti_addr) = dmamap->dm_segs[0].ds_addr;
 	r->ti_type = TI_BDTYPE_RECV_BD;
 	r->ti_flags = TI_BDFLAG_MINI_RING;
 	if (sc->ethercom.ec_if.if_capenable & IFCAP_CSUM_IPv4_Rx)
@@ -878,8 +868,8 @@ ti_newbuf_jumbo(struct ti_softc *sc, int
 	/* Set up the descriptor. */
 	r = >ti_rdata->ti_rx_jumbo_ring[i];
 	sc->ti_cdata.ti_rx_jumbo_chain[i] = m_new;
-	TI_HOSTADDR(r->ti_addr, sc->jumbo_dmaaddr +
-	(mtod(m_new, char *) - (char *)sc->ti_cdata.ti_jumbo_buf));
+	TI_HOSTADDR(r->ti_addr) = sc->jumbo_dmaaddr +
+		(mtod(m_new, char *) - (char *)sc->ti_cdata.ti_jumbo_buf);
 	r->ti_type = TI_BDTYPE_RECV_JUMBO_BD;
 	r->ti_flags = TI_BDFLAG_JUMBO_RING;
 	if (sc->ethercom.ec_if.if_capenable & IFCAP_CSUM_IPv4_Rx)
@@ -1426,10 +1416,10 @@ ti_gibinit(struct ti_softc *sc)
 	/* Set up the event ring and producer pointer. */
 	rcb = >ti_rdata->ti_info.ti_ev_rcb;
 
-	TI_HOSTADDR(rcb->ti_hostaddr, TI_CDEVENTADDR(sc, 0));
+	TI_HOSTADDR(rcb->ti_hostaddr) = TI_CDEVENTADDR(sc, 0);
 	rcb->ti_flags = 0;
-	TI_HOSTADDR(sc->ti_rdata->ti_info.ti_ev_prodidx_ptr,
-	TI_CDEVPRODADDR(sc));
+	TI_HOSTADDR(sc->ti_rdata->ti_info.ti_ev_prodidx_ptr) =
+	TI_CDEVPRODADDR(sc);
 
 	sc->ti_ev_prodidx.ti_idx = 0;
 	CSR_WRITE_4(sc, TI_GCR_EVENTCONS_IDX, 0);
@@ -1438,7 +1428,7 @@ ti_gibinit(struct ti_softc *sc)
 	/* Set up the command ring and producer mailbox. */
 	rcb = >ti_rdata->ti_info.ti_cmd_rcb;
 
-	TI_HOSTADDR(rcb->ti_hostaddr, TI_GCR_NIC_ADDR(TI_GCR_CMDRING));
+	TI_HOSTADDR(rcb->ti_hostaddr) = TI_GCR_NIC_ADDR(TI_GCR_CMDRING);
 	rcb->ti_flags = 0;
 	rcb->ti_max_len = 0;
 	for (i = 0; i < TI_CMD_RING_CNT; i++) {
@@ -1453,12 +1443,12 @@ ti_gibinit(struct ti_softc *sc)
 	 * We re-use the current stats buffer for this to
 	 * conserve memory.
 	 */
-	TI_HOSTADDR(sc->ti_rdata->ti_info.ti_refresh_stats_ptr,
-	TI_CDSTATSADDR(sc));
+	TI_HOSTADDR(sc->ti_rdata->ti_info.ti_refresh_stats_ptr) =
+	TI_CDSTATSADDR(sc);
 
 	/* Set up the standard receive ring. */
 	rcb = >ti_rdata->ti_info.ti_std_rx_rcb;
-	TI_HOSTADDR(rcb->ti_hostaddr, TI_CDRXSTDADDR(sc, 0));
+	TI_HOSTADDR(rcb->ti_hostaddr) = TI_CDRXSTDADDR(sc, 0);
 	rcb->ti_max_len = ETHER_MAX_LEN;
 	rcb->ti_flags = 0;
 	if (ifp->if_capenable & IFCAP_CSUM_IPv4_Rx)
@@ -1470,7 +1460,7 @@ ti_gibinit(struct ti_softc *sc)
 
 	/* Set up the jumbo receive ring. */
 	rcb = >ti_rdata->ti_info.ti_jumbo_rx_rcb;
-	TI_HOSTADDR(rcb->ti_hostaddr, TI_CDRXJUMBOADDR(sc, 0));
+	TI_HOSTADDR(rcb->ti_hostaddr) = TI_CDRXJUMBOADDR(sc, 0);
 	rcb->ti_max_len = ETHER_MAX_LEN_JUMBO;
 	rcb->ti_flags = 0;
 	if (ifp->if_capenable & IFCAP_CSUM_IPv4_Rx)
@@ -1486,7 +1476,7 @@ ti_gibinit(struct ti_softc *sc)
 	 * still there on the Tigon 

CVS commit: [netbsd-8] src/doc

2021-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  5 10:58:28 UTC 2021

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

Log Message:
Tickets #1680 - #1682


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.89 -r1.1.2.90 src/doc/CHANGES-8.3

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.3
diff -u src/doc/CHANGES-8.3:1.1.2.89 src/doc/CHANGES-8.3:1.1.2.90
--- src/doc/CHANGES-8.3:1.1.2.89	Wed May 19 17:21:13 2021
+++ src/doc/CHANGES-8.3	Sat Jun  5 10:58:28 2021
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.89 2021/05/19 17:21:13 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.90 2021/06/05 10:58:28 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -1932,3 +1932,20 @@ xsrc/external/mit/libX11/dist/src/xlibi1
 	Reject string longer than USHRT_MAX before sending them on the wire.
 	Fix out-of-bound access in KeySymToUcs4().
 	[mrg, ticket #1679]
+
+sys/arch/hp300/conf/INSTALL			1.67,1.68
+
+	Add missing 'nhpib at intio' for internal HP-IB.
+	Reduce maxusers to 8 (same as GENERIC).
+	[tsutsui, ticket #1680]
+
+distrib/miniroot/install.sub			1.60
+
+	Handle recent ifconfig(8) output in the miniroot installation script.
+	[tsutsui, ticket #1681]
+
+sys/dev/pci/if_iwmreg.h1.8
+
+	iwm(4): fix various bit declarations - use unsigned for 2^32.
+	[nia, ticket #1682]
+



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

2021-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  5 10:57:11 UTC 2021

Modified Files:
src/sys/dev/pci [netbsd-8]: if_iwmreg.h

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

sys/dev/pci/if_iwmreg.h: revision 1.8

Can't left shift a signed int by 31. Found by kubsan.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.6.1 src/sys/dev/pci/if_iwmreg.h

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

Modified files:

Index: src/sys/dev/pci/if_iwmreg.h
diff -u src/sys/dev/pci/if_iwmreg.h:1.6 src/sys/dev/pci/if_iwmreg.h:1.6.6.1
--- src/sys/dev/pci/if_iwmreg.h:1.6	Tue Mar 14 23:59:26 2017
+++ src/sys/dev/pci/if_iwmreg.h	Sat Jun  5 10:57:11 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwmreg.h,v 1.6 2017/03/14 23:59:26 nonaka Exp $	*/
+/*	$NetBSD: if_iwmreg.h,v 1.6.6.1 2021/06/05 10:57:11 martin Exp $	*/
 /*	OpenBSD: if_iwmreg.h,v 1.19 2016/09/20 11:46:09 stsp Exp 	*/
 
 /*-
@@ -191,7 +191,7 @@
 
 /* interrupt flags in INTA, set by uCode or hardware (e.g. dma),
  * acknowledged (reset) by host writing "1" to flagged bits. */
-#define IWM_CSR_INT_BIT_FH_RX	(1 << 31) /* Rx DMA, cmd responses, FH_INT[17:16] */
+#define IWM_CSR_INT_BIT_FH_RX	(1U << 31) /* Rx DMA, cmd responses, FH_INT[17:16] */
 #define IWM_CSR_INT_BIT_HW_ERR	(1 << 29) /* DMA hardware error FH_INT[31] */
 #define IWM_CSR_INT_BIT_RX_PERIODIC	(1 << 28) /* Rx periodic */
 #define IWM_CSR_INT_BIT_FH_TX	(1 << 27) /* Tx DMA FH_INT[1:0] */
@@ -214,7 +214,7 @@
  IWM_CSR_INT_BIT_RX_PERIODIC)
 
 /* interrupt flags in FH (flow handler) (PCI busmaster DMA) */
-#define IWM_CSR_FH_INT_BIT_ERR   (1 << 31) /* Error */
+#define IWM_CSR_FH_INT_BIT_ERR   (1U << 31) /* Error */
 #define IWM_CSR_FH_INT_BIT_HI_PRIOR  (1 << 30) /* High priority Rx, bypass coalescing */
 #define IWM_CSR_FH_INT_BIT_RX_CHNL1  (1 << 17) /* Rx channel 1 */
 #define IWM_CSR_FH_INT_BIT_RX_CHNL0  (1 << 16) /* Rx channel 0 */
@@ -405,7 +405,7 @@
 #define IWM_CSR_DBG_HPET_MEM_REG_VAL	(0x)
 
 /* DRAM INT TABLE */
-#define IWM_CSR_DRAM_INT_TBL_ENABLE		(1 << 31)
+#define IWM_CSR_DRAM_INT_TBL_ENABLE		(1U << 31)
 #define IWM_CSR_DRAM_INIT_TBL_WRITE_POINTER	(1 << 28)
 #define IWM_CSR_DRAM_INIT_TBL_WRAP_CHECK	(1 << 27)
 
@@ -558,7 +558,7 @@ enum iwm_secure_load_status_reg {
 #define IWM_HOST_INT_TIMEOUT_MAX	(0xFF)
 #define IWM_HOST_INT_TIMEOUT_DEF	(0x40)
 #define IWM_HOST_INT_TIMEOUT_MIN	(0x0)
-#define IWM_HOST_INT_OPER_MODE		(1 << 31)
+#define IWM_HOST_INT_OPER_MODE		(1U << 31)
 
 /*
  *7000/3000 series SHR DTS addresses *
@@ -643,7 +643,7 @@ enum iwm_ucode_tlv_flag {
 	IWM_UCODE_TLV_FLAGS_P2P_PS_UAPSD	= (1 << 26),
 	IWM_UCODE_TLV_FLAGS_BCAST_FILTERING	= (1 << 29),
 	IWM_UCODE_TLV_FLAGS_GO_UAPSD		= (1 << 30),
-	IWM_UCODE_TLV_FLAGS_LTE_COEX		= (1 << 31),
+	IWM_UCODE_TLV_FLAGS_LTE_COEX		= (1U << 31),
 };
 #define IWM_UCODE_TLV_FLAG_BITS \
 	"\020\1PAN\2NEWSCAN\3MFP\4P2P\5DW_BC_TABLE\6NEWBT_COEX\7PM_CMD\10SHORT_BL\11RX_ENERGY\12TIME_EVENT_V2\13D3_6_IPV6\14BF_UPDATED\15NO_BASIC_SSID\17D3_CONTINUITY\20NEW_NSOFFL_S\21NEW_NSOFFL_L\22SCHED_SCAN\24STA_KEY_CMD\25DEVICE_PS_CMD\26P2P_PS\27P2P_PS_DCM\30P2P_PS_SCM\31UAPSD_SUPPORT\32EBS\33P2P_PS_UAPSD\36BCAST_FILTERING\37GO_UAPSD\40LTE_COEX"
@@ -4369,7 +4369,7 @@ enum iwm_tx_flags {
 	IWM_TX_CMD_FLG_FW_DROP		= (1 << 26),
 	IWM_TX_CMD_FLG_EXEC_PAPD	= (1 << 27),
 	IWM_TX_CMD_FLG_PAPD_TYPE	= (1 << 28),
-	IWM_TX_CMD_FLG_HCCA_CHUNK	= (1 << 31)
+	IWM_TX_CMD_FLG_HCCA_CHUNK	= (1U << 31)
 }; /* IWM_TX_FLAGS_BITS_API_S_VER_1 */
 
 /**



CVS commit: [netbsd-9] src/doc

2021-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  5 10:56:18 UTC 2021

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

Log Message:
Tickets #1278 - #1282


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/doc/CHANGES-9.3

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.3
diff -u src/doc/CHANGES-9.3:1.1.2.4 src/doc/CHANGES-9.3:1.1.2.5
--- src/doc/CHANGES-9.3:1.1.2.4	Tue Jun  1 10:41:23 2021
+++ src/doc/CHANGES-9.3	Sat Jun  5 10:56:18 2021
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.3,v 1.1.2.4 2021/06/01 10:41:23 martin Exp $
+# $NetBSD: CHANGES-9.3,v 1.1.2.5 2021/06/05 10:56:18 martin Exp $
 
 A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3
 release:
@@ -56,3 +56,29 @@ sys/arch/aarch64/aarch64/netbsd32_machde
 	in VFP-optimized codes running on COMPAT_NETBSD32.
 	[rin, ticket #1277]
 
+sys/arch/aarch64/aarch64/aarch64_machdep.c	1.50,1.60,1.61
+
+	Minor fix for aarch64 memory detection.
+	[skrll, ticket #1278]
+
+sys/arch/arm/arm32/arm32_boot.c			1.42,1.43
+
+	Minor fix for ARM memory detection.
+	[skrll, ticket #1279]
+
+sys/arch/hp300/conf/INSTALL			1.67,1.68
+
+	Add missing 'nhpib at intio' for internal HP-IB.
+	Reduce maxusers to 8 (same as GENERIC).
+	[tsutsui, ticket #1280]
+
+distrib/miniroot/install.sub			1.60
+
+	Handle recent ifconfig(8) output in the miniroot installation script.
+	[tsutsui, ticket #1281]
+
+sys/dev/pci/if_iwmreg.h1.8
+
+	iwm(4): fix various bit declarations - use unsigned for 2^32.
+	[nia, ticket #1282]
+



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

2021-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  5 10:51:41 UTC 2021

Modified Files:
src/sys/dev/pci [netbsd-9]: if_iwmreg.h

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

sys/dev/pci/if_iwmreg.h: revision 1.8

Can't left shift a signed int by 31. Found by kubsan.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.8.1 src/sys/dev/pci/if_iwmreg.h

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

Modified files:

Index: src/sys/dev/pci/if_iwmreg.h
diff -u src/sys/dev/pci/if_iwmreg.h:1.7 src/sys/dev/pci/if_iwmreg.h:1.7.8.1
--- src/sys/dev/pci/if_iwmreg.h:1.7	Thu Apr 19 21:50:09 2018
+++ src/sys/dev/pci/if_iwmreg.h	Sat Jun  5 10:51:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwmreg.h,v 1.7 2018/04/19 21:50:09 christos Exp $	*/
+/*	$NetBSD: if_iwmreg.h,v 1.7.8.1 2021/06/05 10:51:41 martin Exp $	*/
 /*	OpenBSD: if_iwmreg.h,v 1.19 2016/09/20 11:46:09 stsp Exp 	*/
 
 /*-
@@ -191,7 +191,7 @@
 
 /* interrupt flags in INTA, set by uCode or hardware (e.g. dma),
  * acknowledged (reset) by host writing "1" to flagged bits. */
-#define IWM_CSR_INT_BIT_FH_RX	(1 << 31) /* Rx DMA, cmd responses, FH_INT[17:16] */
+#define IWM_CSR_INT_BIT_FH_RX	(1U << 31) /* Rx DMA, cmd responses, FH_INT[17:16] */
 #define IWM_CSR_INT_BIT_HW_ERR	(1 << 29) /* DMA hardware error FH_INT[31] */
 #define IWM_CSR_INT_BIT_RX_PERIODIC	(1 << 28) /* Rx periodic */
 #define IWM_CSR_INT_BIT_FH_TX	(1 << 27) /* Tx DMA FH_INT[1:0] */
@@ -214,7 +214,7 @@
  IWM_CSR_INT_BIT_RX_PERIODIC)
 
 /* interrupt flags in FH (flow handler) (PCI busmaster DMA) */
-#define IWM_CSR_FH_INT_BIT_ERR   (1 << 31) /* Error */
+#define IWM_CSR_FH_INT_BIT_ERR   (1U << 31) /* Error */
 #define IWM_CSR_FH_INT_BIT_HI_PRIOR  (1 << 30) /* High priority Rx, bypass coalescing */
 #define IWM_CSR_FH_INT_BIT_RX_CHNL1  (1 << 17) /* Rx channel 1 */
 #define IWM_CSR_FH_INT_BIT_RX_CHNL0  (1 << 16) /* Rx channel 0 */
@@ -405,7 +405,7 @@
 #define IWM_CSR_DBG_HPET_MEM_REG_VAL	(0x)
 
 /* DRAM INT TABLE */
-#define IWM_CSR_DRAM_INT_TBL_ENABLE		(1 << 31)
+#define IWM_CSR_DRAM_INT_TBL_ENABLE		(1U << 31)
 #define IWM_CSR_DRAM_INIT_TBL_WRITE_POINTER	(1 << 28)
 #define IWM_CSR_DRAM_INIT_TBL_WRAP_CHECK	(1 << 27)
 
@@ -558,7 +558,7 @@ enum iwm_secure_load_status_reg {
 #define IWM_HOST_INT_TIMEOUT_MAX	(0xFF)
 #define IWM_HOST_INT_TIMEOUT_DEF	(0x40)
 #define IWM_HOST_INT_TIMEOUT_MIN	(0x0)
-#define IWM_HOST_INT_OPER_MODE		(1 << 31)
+#define IWM_HOST_INT_OPER_MODE		(1U << 31)
 
 /*
  *7000/3000 series SHR DTS addresses *
@@ -643,7 +643,7 @@ enum iwm_ucode_tlv_flag {
 	IWM_UCODE_TLV_FLAGS_P2P_PS_UAPSD	= (1 << 26),
 	IWM_UCODE_TLV_FLAGS_BCAST_FILTERING	= (1 << 29),
 	IWM_UCODE_TLV_FLAGS_GO_UAPSD		= (1 << 30),
-	IWM_UCODE_TLV_FLAGS_LTE_COEX		= (1 << 31),
+	IWM_UCODE_TLV_FLAGS_LTE_COEX		= (1U << 31),
 };
 #define IWM_UCODE_TLV_FLAG_BITS \
 	"\020\1PAN\2NEWSCAN\3MFP\4P2P\5DW_BC_TABLE\6NEWBT_COEX\7PM_CMD\10SHORT_BL\11RX_ENERGY\12TIME_EVENT_V2\13D3_6_IPV6\14BF_UPDATED\15NO_BASIC_SSID\17D3_CONTINUITY\20NEW_NSOFFL_S\21NEW_NSOFFL_L\22SCHED_SCAN\24STA_KEY_CMD\25DEVICE_PS_CMD\26P2P_PS\27P2P_PS_DCM\30P2P_PS_SCM\31UAPSD_SUPPORT\32EBS\33P2P_PS_UAPSD\36BCAST_FILTERING\37GO_UAPSD\40LTE_COEX"
@@ -4369,7 +4369,7 @@ enum iwm_tx_flags {
 	IWM_TX_CMD_FLG_FW_DROP		= (1 << 26),
 	IWM_TX_CMD_FLG_EXEC_PAPD	= (1 << 27),
 	IWM_TX_CMD_FLG_PAPD_TYPE	= (1 << 28),
-	IWM_TX_CMD_FLG_HCCA_CHUNK	= (1 << 31)
+	IWM_TX_CMD_FLG_HCCA_CHUNK	= (1U << 31)
 }; /* IWM_TX_FLAGS_BITS_API_S_VER_1 */
 
 /**



CVS commit: [netbsd-8] src/distrib/miniroot

2021-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  5 10:41:20 UTC 2021

Modified Files:
src/distrib/miniroot [netbsd-8]: install.sub

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1681):

distrib/miniroot/install.sub: revision 1.60

Handle recent ifconfig(8) outputs in the miniroot installation script.

- Remove netmask slash notation for IP addresses,
  which has been changed between NetBSD 7.x and 8.0:
  http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ifconfig/af_inet.c#rev1.24

- Ignore inet6 entries, which miniroot scripts don't support

Should be pulled up to netbsd-9 and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.45.56.2 -r1.45.56.3 src/distrib/miniroot/install.sub

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

Modified files:

Index: src/distrib/miniroot/install.sub
diff -u src/distrib/miniroot/install.sub:1.45.56.2 src/distrib/miniroot/install.sub:1.45.56.3
--- src/distrib/miniroot/install.sub:1.45.56.2	Sat Dec 19 19:02:52 2020
+++ src/distrib/miniroot/install.sub	Sat Jun  5 10:41:20 2021
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: install.sub,v 1.45.56.2 2020/12/19 19:02:52 martin Exp $
+#	$NetBSD: install.sub,v 1.45.56.3 2021/06/05 10:41:20 martin Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -403,8 +403,9 @@ configure_ifs() {
 	fi
 
 	set -- $(ifconfig $_interface_name | sed -n '
-		/^[ 	]*inet/{
+		/^[ 	]*inet /{
 		s/inet//
+		s,/[0-9]*,,
 		s/--> [0-9.][0-9.]*//
 		s/netmask//
 		s/broadcast//



CVS commit: [netbsd-9] src/distrib/miniroot

2021-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  5 10:40:09 UTC 2021

Modified Files:
src/distrib/miniroot [netbsd-9]: install.sub

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1281):

distrib/miniroot/install.sub: revision 1.60

Handle recent ifconfig(8) outputs in the miniroot installation script.

- Remove netmask slash notation for IP addresses,
  which has been changed between NetBSD 7.x and 8.0:
  http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ifconfig/af_inet.c#rev1.24

- Ignore inet6 entries, which miniroot scripts don't support

Should be pulled up to netbsd-9 and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.48.2.4 -r1.48.2.5 src/distrib/miniroot/install.sub

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

Modified files:

Index: src/distrib/miniroot/install.sub
diff -u src/distrib/miniroot/install.sub:1.48.2.4 src/distrib/miniroot/install.sub:1.48.2.5
--- src/distrib/miniroot/install.sub:1.48.2.4	Mon Dec 14 17:26:36 2020
+++ src/distrib/miniroot/install.sub	Sat Jun  5 10:40:08 2021
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: install.sub,v 1.48.2.4 2020/12/14 17:26:36 martin Exp $
+#	$NetBSD: install.sub,v 1.48.2.5 2021/06/05 10:40:08 martin Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -403,8 +403,9 @@ configure_ifs() {
 	fi
 
 	set -- $(ifconfig $_interface_name | sed -n '
-		/^[ 	]*inet/{
+		/^[ 	]*inet /{
 		s/inet//
+		s,/[0-9]*,,
 		s/--> [0-9.][0-9.]*//
 		s/netmask//
 		s/broadcast//



CVS commit: [netbsd-8] src/sys/arch/hp300/conf

2021-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  5 10:37:10 UTC 2021

Modified Files:
src/sys/arch/hp300/conf [netbsd-8]: INSTALL

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1680):

sys/arch/hp300/conf/INSTALL: revision 1.67
sys/arch/hp300/conf/INSTALL: revision 1.68

Add missed 'nhpib at intio' for internal HP-IB.  Found on testing HPDisk.
Also fix comments for HP-IB devices.
Should be pulled up to netbsd-8 and netbsd-9.

Reduce maxusers to 8 as GENERIC.
Should be pulled up to netbsd-9 and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.60.12.1 src/sys/arch/hp300/conf/INSTALL

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/hp300/conf/INSTALL
diff -u src/sys/arch/hp300/conf/INSTALL:1.60 src/sys/arch/hp300/conf/INSTALL:1.60.12.1
--- src/sys/arch/hp300/conf/INSTALL:1.60	Sat Aug 23 20:26:58 2014
+++ src/sys/arch/hp300/conf/INSTALL	Sat Jun  5 10:37:10 2021
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.60 2014/08/23 20:26:58 dholland Exp $
+# $NetBSD: INSTALL,v 1.60.12.1 2021/06/05 10:37:10 martin Exp $
 #
 # INSTALL machine description file
 #
@@ -39,7 +39,7 @@ options 	HP433
 options 	FPSP		# floating point interface for 68040
 
 # Need to set locally
-maxusers	32
+maxusers	8
 
 # Standard system options
 #options 	COMPAT_43	# compatibility with 4.3BSD interfaces
@@ -202,10 +202,11 @@ dcm*		at dio? scode ?	flags 0xe # DCM 4-
 
 le*		at dio? scode ?		# LANCE ethernet interfaces
 
-nhpib0		at dio? scode 7		# slow internal HP-IB
+nhpib*		at intio?		# internal HP-IB
+nhpib0		at dio? scode 7		# 98624A HP-IB
 nhpib*		at dio? scode ?
 
-fhpib*		at dio? scode ?		# `fast' HP-IB
+fhpib*		at dio? scode ?		# 98625A/98625B HP-IB
 
 hpibbus0	at nhpib0
 hpibbus*	at nhpib?



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

2021-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  5 10:35:28 UTC 2021

Modified Files:
src/sys/arch/hp300/conf [netbsd-9]: INSTALL

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1280):

sys/arch/hp300/conf/INSTALL: revision 1.67
sys/arch/hp300/conf/INSTALL: revision 1.68

Add missed 'nhpib at intio' for internal HP-IB.  Found on testing HPDisk.
Also fix comments for HP-IB devices.
Should be pulled up to netbsd-8 and netbsd-9.

Reduce maxusers to 8 as GENERIC.
Should be pulled up to netbsd-9 and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.64.4.1 -r1.64.4.2 src/sys/arch/hp300/conf/INSTALL

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/hp300/conf/INSTALL
diff -u src/sys/arch/hp300/conf/INSTALL:1.64.4.1 src/sys/arch/hp300/conf/INSTALL:1.64.4.2
--- src/sys/arch/hp300/conf/INSTALL:1.64.4.1	Mon Dec 14 17:29:35 2020
+++ src/sys/arch/hp300/conf/INSTALL	Sat Jun  5 10:35:28 2021
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.64.4.1 2020/12/14 17:29:35 martin Exp $
+# $NetBSD: INSTALL,v 1.64.4.2 2021/06/05 10:35:28 martin Exp $
 #
 # INSTALL machine description file
 #
@@ -40,7 +40,7 @@ options 	HP433
 options 	FPSP		# floating point interface for 68040
 
 # Need to set locally
-maxusers	32
+maxusers	8
 
 # Standard system options
 #include 	"conf/compat_netbsd09.config"
@@ -183,10 +183,11 @@ dcm*		at dio? scode ?	flags 0xe # DCM 4-
 
 le*		at dio? scode ?		# LANCE ethernet interfaces
 
-nhpib0		at dio? scode 7		# slow internal HP-IB
+nhpib*		at intio?		# internal HP-IB
+nhpib0		at dio? scode 7		# 98624A HP-IB
 nhpib*		at dio? scode ?
 
-fhpib*		at dio? scode ?		# `fast' HP-IB
+fhpib*		at dio? scode ?		# 98625A/98625B HP-IB
 
 hpibbus0	at nhpib0
 hpibbus*	at nhpib?



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

2021-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  5 10:27:10 UTC 2021

Modified Files:
src/sys/arch/arm/arm32 [netbsd-9]: arm32_boot.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1279):

sys/arch/arm/arm32/arm32_boot.c: revision 1.42
sys/arch/arm/arm32/arm32_boot.c: revision 1.43

G/C

 -

Mirror the changes around passing pages to UVM in aarch64_machdep.c:

Two fixes for loading free pages into UVM

- Only consider a boot_physmem (inner loop) range that has its end
   (bp_end) after the bootconfig.dram (outer loop) range start (start).
   This was harmless as a later condition correctly checks there is only
   something to do if start < bp_end.

- Stop processing boot_physmem ranges if all the bootconfig.dram range has
   been passed to UVM.  This fixes a boot problem for simon@

Copy a comment over and do the VPRINTF before the uvm_page_physload in
the same way as aarch64_machdep.c as well.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.33.4.1 src/sys/arch/arm/arm32/arm32_boot.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/arm32/arm32_boot.c
diff -u src/sys/arch/arm/arm32/arm32_boot.c:1.33 src/sys/arch/arm/arm32/arm32_boot.c:1.33.4.1
--- src/sys/arch/arm/arm32/arm32_boot.c:1.33	Sat Mar 16 10:05:40 2019
+++ src/sys/arch/arm/arm32/arm32_boot.c	Sat Jun  5 10:27:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_boot.c,v 1.33 2019/03/16 10:05:40 skrll Exp $	*/
+/*	$NetBSD: arm32_boot.c,v 1.33.4.1 2021/06/05 10:27:10 martin Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -122,7 +122,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: arm32_boot.c,v 1.33 2019/03/16 10:05:40 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: arm32_boot.c,v 1.33.4.1 2021/06/05 10:27:10 martin Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cputypes.h"
@@ -264,15 +264,21 @@ initarm_common(vaddr_t kvm_base, vsize_t
 			continue;
 		}
 		VPRINTF("\n");
+
+		/*
+		 * This assumes the bp list is sorted in ascending
+		 * order.
+		 */
 		paddr_t segend = end;
-		for (size_t j = 0; j < nbp; j++ /*, start = segend, segend = end */) {
+		for (size_t j = 0; j < nbp && start < end; j++) {
 			paddr_t bp_start = bp[j].bp_start;
 			paddr_t bp_end = bp_start + bp[j].bp_pages;
 
 			VPRINTF("   bp %2zu start %08lx  end %08lx\n",
 			j, ptoa(bp_start), ptoa(bp_end));
+
 			KASSERT(bp_start < bp_end);
-			if (start > bp_end || segend < bp_start)
+			if (start >= bp_end || segend < bp_start)
 continue;
 
 			if (start < bp_start)
@@ -284,11 +290,13 @@ initarm_common(vaddr_t kvm_base, vsize_t
 }
 vm_freelist = bp[j].bp_freelist;
 
-uvm_page_physload(start, segend, start, segend,
-vm_freelist);
 VPRINTF(" start %08lx  end %08lx"
 "... loading in freelist %d\n", ptoa(start),
 ptoa(segend), vm_freelist);
+
+uvm_page_physload(start, segend, start, segend,
+vm_freelist);
+
 start = segend;
 segend = end;
 			}



CVS commit: src/usr.sbin/mountd

2021-06-05 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Jun  5 08:26:34 UTC 2021

Modified Files:
src/usr.sbin/mountd: mountd.c

Log Message:
Fix typo, its the element not the array ...


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/usr.sbin/mountd/mountd.c

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

Modified files:

Index: src/usr.sbin/mountd/mountd.c
diff -u src/usr.sbin/mountd/mountd.c:1.136 src/usr.sbin/mountd/mountd.c:1.137
--- src/usr.sbin/mountd/mountd.c:1.136	Fri Jun  4 10:46:57 2021
+++ src/usr.sbin/mountd/mountd.c	Sat Jun  5 08:26:34 2021
@@ -1,4 +1,4 @@
-/* 	$NetBSD: mountd.c,v 1.136 2021/06/04 10:46:57 hannken Exp $	 */
+/* 	$NetBSD: mountd.c,v 1.137 2021/06/05 08:26:34 hannken Exp $	 */
 
 /*
  * Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)mountd.c  8.15 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: mountd.c,v 1.136 2021/06/04 10:46:57 hannken Exp $");
+__RCSID("$NetBSD: mountd.c,v 1.137 2021/06/05 08:26:34 hannken Exp $");
 #endif
 #endif/* not lint */
 
@@ -1294,7 +1294,7 @@ get_exportlist(int n)
 		(mel->mel_nexports > 0 || errno != EOPNOTSUPP))
 			syslog(LOG_ERR, "Can't update exports for %s (%m)",
 			mel_tab[i].mel_path);
-		for (j = 0; j < (int)mel_tab->mel_nexports; j++) {
+		for (j = 0; j < (int)mel->mel_nexports; j++) {
 			struct export_args *export = >mel_exports[j];
 
 			if (export->ex_indexfile)



CVS commit: src/tests/fs/tmpfs

2021-06-05 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Jun  5 06:40:59 UTC 2021

Modified Files:
src/tests/fs/tmpfs: t_vnd.sh

Log Message:
Use the correct pathname when cleaning up the inner mount on test
failure.  Fixes the ATF crash reported in PR bin/56221, but not
the issue causing the test to fail in the first place.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/fs/tmpfs/t_vnd.sh

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

Modified files:

Index: src/tests/fs/tmpfs/t_vnd.sh
diff -u src/tests/fs/tmpfs/t_vnd.sh:1.10 src/tests/fs/tmpfs/t_vnd.sh:1.11
--- src/tests/fs/tmpfs/t_vnd.sh:1.10	Thu Mar 23 08:18:17 2017
+++ src/tests/fs/tmpfs/t_vnd.sh	Sat Jun  5 06:40:59 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_vnd.sh,v 1.10 2017/03/23 08:18:17 martin Exp $
+# $NetBSD: t_vnd.sh,v 1.11 2021/06/05 06:40:59 gson Exp $
 #
 # Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -69,7 +69,7 @@ basic_body() {
 }
 basic_cleanup() {
 	if [ ! -f done ]; then
-		umount mnt 2>/dev/null 1>&2
+		umount mntpt/mnt 2>/dev/null 1>&2
 		vndconfig -u ${vnddev} 2>/dev/null 1>&2
 	fi
 }



CVS commit: src/tests/lib/libcurses

2021-06-05 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sat Jun  5 06:23:48 UTC 2021

Modified Files:
src/tests/lib/libcurses: chk_gen

Log Message:
Convert % into %% in input string so printf won't barf


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/chk_gen

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

Modified files:

Index: src/tests/lib/libcurses/chk_gen
diff -u src/tests/lib/libcurses/chk_gen:1.1 src/tests/lib/libcurses/chk_gen:1.2
--- src/tests/lib/libcurses/chk_gen:1.1	Sun Jun  9 07:54:55 2019
+++ src/tests/lib/libcurses/chk_gen	Sat Jun  5 06:23:48 2021
@@ -8,7 +8,7 @@
 OUT=""
 while read -r line
 do
-	next=`echo $line | sed -e 's/\n//' -e 's/\\015/\\r/g' -e 's/\\012/\\n/g'`
+	next=`echo $line | sed -e 's/%/%%/g' -e 's/\n//' -e 's/\\015/\\r/g' -e 's/\\012/\\n/g'`
 	OUT="${OUT}${next}"
 done
 OUT=`echo "${OUT}" | sed 's/\n//'`



CVS commit: src/tests/lib/libcurses/tests

2021-06-05 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sat Jun  5 06:13:37 UTC 2021

Modified Files:
src/tests/lib/libcurses/tests: clear

Log Message:
Decouple the clear test from the addstr test, they should not be linked
together because they are not really related.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/clear

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

Modified files:

Index: src/tests/lib/libcurses/tests/clear
diff -u src/tests/lib/libcurses/tests/clear:1.1 src/tests/lib/libcurses/tests/clear:1.2
--- src/tests/lib/libcurses/tests/clear:1.1	Sun Apr 10 09:55:10 2011
+++ src/tests/lib/libcurses/tests/clear	Sat Jun  5 06:13:36 2021
@@ -1,4 +1,10 @@
-include addstr
+include start
+call OK addstr "abcde\n"
+call OK addstr "\n"
+call OK addstr "\t8\n"
+call OK addstr "0123456\t8\n"
+call OK refresh
+compare clear0.chk
 call OK clear
 call OK refresh
 compare clear1.chk



CVS commit: src/tests/lib/libcurses/check_files

2021-06-05 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sat Jun  5 06:11:09 UTC 2021

Modified Files:
src/tests/lib/libcurses/check_files: Makefile
Added Files:
src/tests/lib/libcurses/check_files: clear0.chk

Log Message:
Add new check file for the clear test.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libcurses/check_files/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/check_files/clear0.chk

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

Modified files:

Index: src/tests/lib/libcurses/check_files/Makefile
diff -u src/tests/lib/libcurses/check_files/Makefile:1.5 src/tests/lib/libcurses/check_files/Makefile:1.6
--- src/tests/lib/libcurses/check_files/Makefile:1.5	Sun Feb  7 01:53:54 2021
+++ src/tests/lib/libcurses/check_files/Makefile	Sat Jun  5 06:11:09 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2021/02/07 01:53:54 rillig Exp $
+# $NetBSD: Makefile,v 1.6 2021/06/05 06:11:09 blymn Exp $
 
 NOMAN=		# defined
 
@@ -41,6 +41,7 @@ FILES+=		box_standout.chk
 FILES+=		chgat1.chk
 FILES+=		chgat2.chk
 FILES+=		chgat3.chk
+FILES+=		clear0.chk
 FILES+=		clear1.chk
 FILES+=		clear10.chk
 FILES+=		clear2.chk

Added files:

Index: src/tests/lib/libcurses/check_files/clear0.chk
diff -u /dev/null src/tests/lib/libcurses/check_files/clear0.chk:1.1
--- /dev/null	Sat Jun  5 06:11:09 2021
+++ src/tests/lib/libcurses/check_files/clear0.chk	Sat Jun  5 06:11:09 2021
@@ -0,0 +1,2 @@
+abcdecup3;9X8
+0123456 8