CVS commit: src/doc

2024-06-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun 20 19:09:22 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
doc: gcc 12.4 is out; mention that NetBSD sometimes uses 12.3 now


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

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



CVS commit: src/doc

2024-06-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun 20 19:09:22 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
doc: gcc 12.4 is out; mention that NetBSD sometimes uses 12.3 now


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.2014 src/doc/3RDPARTY:1.2015
--- src/doc/3RDPARTY:1.2014	Tue Jun 18 19:41:08 2024
+++ src/doc/3RDPARTY	Thu Jun 20 19:09:22 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.2014 2024/06/18 19:41:08 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.2015 2024/06/20 19:09:22 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -452,8 +452,8 @@ Notes:
 There is a flex2netbsd script to help newer imports.
 
 Package:	gcc
-Version:	10.5.0
-Current Vers:	10.5.0/12.3.0/13.1.0/14.1
+Version:	10.5.0/12.3.0
+Current Vers:	10.5.0/12.4.0/13.1.0/14.1
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/gcc/
 Home Page:	https://www.gnu.org/software/gcc/



CVS commit: src/usr.sbin/sysinst

2024-06-20 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 20 19:00:35 UTC 2024

Modified Files:
src/usr.sbin/sysinst: msg.mi.de

Log Message:
sysinst: fix umlaut in German translation


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/sysinst/msg.mi.de

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

Modified files:

Index: src/usr.sbin/sysinst/msg.mi.de
diff -u src/usr.sbin/sysinst/msg.mi.de:1.49 src/usr.sbin/sysinst/msg.mi.de:1.50
--- src/usr.sbin/sysinst/msg.mi.de:1.49	Thu Jun 20 05:46:22 2024
+++ src/usr.sbin/sysinst/msg.mi.de	Thu Jun 20 19:00:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.de,v 1.49 2024/06/20 05:46:22 nia Exp $	*/
+/*	$NetBSD: msg.mi.de,v 1.50 2024/06/20 19:00:35 rillig Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -643,7 +643,7 @@ message net_defroute
 {IPv4-Gateway}
 
 message net_media
-{Art der Netzwerkverbindung (fuer Automatik leer lassen)}
+{Art der Netzwerkverbindung (für Automatik leer lassen)}
 
 message net_ssid
 {WLAN-SSID?}



CVS commit: src/usr.sbin/sysinst

2024-06-20 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jun 20 19:00:35 UTC 2024

Modified Files:
src/usr.sbin/sysinst: msg.mi.de

Log Message:
sysinst: fix umlaut in German translation


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/sysinst/msg.mi.de

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



CVS commit: src/sys/arch/sparc64/dev

2024-06-20 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Thu Jun 20 18:41:45 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: change some debug printf() to DPRINTF()


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc64/dev/vdsk.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/sparc64/dev/vdsk.c
diff -u src/sys/arch/sparc64/dev/vdsk.c:1.17 src/sys/arch/sparc64/dev/vdsk.c:1.18
--- src/sys/arch/sparc64/dev/vdsk.c:1.17	Thu Jun 20 17:49:46 2024
+++ src/sys/arch/sparc64/dev/vdsk.c	Thu Jun 20 18:41:45 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: vdsk.c,v 1.17 2024/06/20 17:49:46 palle Exp $	*/
+/*	$NetBSD: vdsk.c,v 1.18 2024/06/20 18:41:45 palle Exp $	*/
 /*	$OpenBSD: vdsk.c,v 1.46 2015/01/25 21:42:13 kettenis Exp $	*/
 /*
  * Copyright (c) 2009, 2011 Mark Kettenis
@@ -1098,27 +1098,27 @@ vdsk_scsi_cmd(struct vdsk_softc *sc, str
 			return;
 			
 		case SCSI_MODE_SENSE_6:
-			printf("SCSI_MODE_SENSE_6 (not implemented)\n");
+			DPRINTF(("SCSI_MODE_SENSE_6 (not implemented)\n"));
 			vdsk_scsi_done(xs, XS_DRIVER_STUFFUP);
 			return;
 
 		case SCSI_MODE_SELECT_6:
-			printf("MODE_SELECT_6 (not implemented)\n");
+DPRINTF(("MODE_SELECT_6 (not implemented)\n"));
 			vdsk_scsi_done(xs, XS_DRIVER_STUFFUP);
 			return;
 
 		case SCSI_MAINTENANCE_IN:
-			printf("MAINTENANCE_IN\n");
+			DPRINTF(("MAINTENANCE_IN\n"));
 			vdsk_scsi_done(xs, XS_NOERROR);
 			return;
 
 		case SCSI_MODE_SENSE_10:
-			printf("SCSI_MODE_SENSE_10 (not implemented)\n");
+			DPRINTF(("SCSI_MODE_SENSE_10 (not implemented)\n"));
 			vdsk_scsi_done(xs, XS_DRIVER_STUFFUP);
 			return;
 			
 		case READ_TOC:
-			printf("READ_TOC (not implemented)\n");
+			DPRINTF(("READ_TOC (not implemented)\n"));
 			vdsk_scsi_done(xs, XS_DRIVER_STUFFUP);
 			return;
 



CVS commit: src/sys/arch/sparc64/dev

2024-06-20 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Thu Jun 20 18:41:45 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: change some debug printf() to DPRINTF()


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc64/dev/vdsk.c

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



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:25:16 UTC 2024

Modified Files:
src/sys/dev/mii [netbsd-10]: miidevs.h miidevs_data.h

Log Message:
Regen for ticket #712


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.166.10.1 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.155 -r1.155.10.1 src/sys/dev/mii/miidevs_data.h

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

Modified files:

Index: src/sys/dev/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.166 src/sys/dev/mii/miidevs.h:1.166.10.1
--- src/sys/dev/mii/miidevs.h:1.166	Tue Jun 29 21:04:02 2021
+++ src/sys/dev/mii/miidevs.h	Thu Jun 20 18:25:16 2024
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.166 2021/06/29 21:04:02 pgoyette Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.166.10.1 2024/06/20 18:25:16 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.168 2020/06/23 14:35:36 msaitoh Exp
+ *	NetBSD: miidevs,v 1.168.20.1 2024/06/20 18:24:44 martin Exp
  */
 
 /*-
@@ -99,6 +99,8 @@
 #define	MII_OUI_TI	0x080028		/* Texas Instruments */
 #define	MII_OUI_BROADCOM4	0x18c086		/* Broadcom Corporation */
 #define	MII_OUI_RENESAS	0x749050		/* Renesas */
+#define	MII_OUI_INTEL2	0x984fee		/* Intel */
+#define	MII_OUI_MAXLINEAR	0xac9a96		/* MaxLinear */
 
 /* Unregistered or wrong OUI */
 #define	MII_OUI_yyREALTEK	0x04		/* Realtek */
@@ -123,6 +125,7 @@
 #define	MII_OUI_xxPMCSIERRA2	0x009057		/* PMC-Sierra */
 #define	MII_OUI_xxCICADA	0x00c08f		/* Cicada Semiconductor */
 #define	MII_OUI_xxRDC	0x00d02d		/* RDC Semiconductor */
+#define	MII_OUI_xxMAXLINEAR	0x0c32ab		/* MaxLinear */
 #define	MII_OUI_xxNATSEMI	0x1000e8		/* National Semiconductor */
 #define	MII_OUI_xxLEVEL1	0x782000		/* Level 1 */
 #define	MII_OUI_xxXAQTI	0xace000		/* XaQti Corp. */
@@ -405,7 +408,17 @@
 #define	MII_STR_xxMARVELL_I82563	"i82563 10/100/1000 media interface"
 #define	MII_MODEL_ATTANSIC_I82578	0x0004		/* Intel 82578 10/100/1000 media interface */
 #define	MII_STR_ATTANSIC_I82578	"Intel 82578 10/100/1000 media interface"
-
+/* Acquired by MaxLinear */
+#define	MII_MODEL_INTEL2_GPY211	0x		/* MaxLinear GPY21[125] 2.5G media interface */
+#define	MII_STR_INTEL2_GPY211	"MaxLinear GPY21[125] 2.5G media interface"
+#define	MII_MODEL_INTEL2_I226_1	0x0001		/* I226 2.5G media interface (1) */
+#define	MII_STR_INTEL2_I226_1	"I226 2.5G media interface (1)"
+#define	MII_MODEL_INTEL2_I226_2	0x0005		/* I226 2.5G media interface (2) */
+#define	MII_STR_INTEL2_I226_2	"I226 2.5G media interface (2)"
+#define	MII_MODEL_INTEL2_I225	0x000c		/* I225 2.5G media interface */
+#define	MII_STR_INTEL2_I225	"I225 2.5G media interface"
+#define	MII_MODEL_INTEL2_GPY115	0x0030		/* MaxLinear GPY115 Gigabit PHY */
+#define	MII_STR_INTEL2_GPY115	"MaxLinear GPY115 Gigabit PHY"
 
 /* JMicron PHYs */
 #define	MII_MODEL_JMICRON_JMP211	0x0021		/* JMP211 10/100/1000 media interface */

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.155 src/sys/dev/mii/miidevs_data.h:1.155.10.1
--- src/sys/dev/mii/miidevs_data.h:1.155	Tue Jun 29 21:04:02 2021
+++ src/sys/dev/mii/miidevs_data.h	Thu Jun 20 18:25:16 2024
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs_data.h,v 1.155 2021/06/29 21:04:02 pgoyette Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.155.10.1 2024/06/20 18:25:16 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.168 2020/06/23 14:35:36 msaitoh Exp
+ *	NetBSD: miidevs,v 1.168.20.1 2024/06/20 18:24:44 martin Exp
  */
 
 /*-
@@ -81,28 +81,31 @@ static const uint32_t mii_vendors[] = {
 	MII_OUI_TI, 393, 399, 0,
 	MII_OUI_BROADCOM4, 109, 118, 0,
 	MII_OUI_RENESAS, 411, 0,
-	MII_OUI_yyREALTEK, 419, 0,
+	MII_OUI_INTEL2, 305, 0,
+	MII_OUI_MAXLINEAR, 419, 0,
+	MII_OUI_yyREALTEK, 429, 0,
 	MII_OUI_yyAMD, 1, 10, 16, 0,
-	MII_OUI_xxVIA, 427, 66, 0,
+	MII_OUI_xxVIA, 437, 66, 0,
 	MII_OUI_xxMYSON, 315, 43, 0,
 	MII_OUI_xxTSC, 311, 186, 0,
-	MII_OUI_xxASIX, 431, 186, 0,
+	MII_OUI_xxASIX, 441, 186, 0,
 	MII_OUI_xxDAVICOM, 260, 186, 0,
 	MII_OUI_xxAMLOGIC, 252, 0,
 	MII_OUI_xxQUALSEMI, 244, 186, 0,
-	MII_OUI_xxREALTEK, 419, 0,
+	MII_OUI_xxREALTEK, 429, 0,
 	MII_OUI_xxBROADCOM, 109, 118, 0,
 	MII_OUI_xxPMCSIERRA, 338, 0,
-	MII_OUI_xxICPLUS, 436, 439, 378, 0,
+	MII_OUI_xxICPLUS, 446, 449, 378, 0,
 	MII_OUI_xxMARVELL, 236, 186, 0,
 	MII_OUI_xxINTEL, 305, 0,
 	MII_OUI_xxBROADCOM_ALT1, 109, 118, 0,
 	MII_OUI_yyINTEL, 305, 0,
-	MII_OUI_yyASIX, 431, 186, 0,
-	MII_OUI_xxVITESSE, 444, 186, 0,
+	MII_OUI_yyASIX, 441, 186, 0,
+	MII_OUI_xxVITESSE, 454, 186, 0,
 	MII_OUI_xxPMCSIERRA2, 338, 0,
-	MII_OUI_xxCICADA, 452, 186, 0,
-	MII_OUI_xxRDC, 459, 186, 0,
+	MII_OUI_xxCICADA, 462, 186, 0,
+	MII_OUI_xxRDC, 469, 186, 0,
+	MII_OUI_xxMAXLINEAR, 

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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:25:16 UTC 2024

Modified Files:
src/sys/dev/mii [netbsd-10]: miidevs.h miidevs_data.h

Log Message:
Regen for ticket #712


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.166.10.1 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.155 -r1.155.10.1 src/sys/dev/mii/miidevs_data.h

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



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:24:44 UTC 2024

Modified Files:
src/sys/dev/mii [netbsd-10]: miidevs

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

sys/dev/mii/miidevs: revision 1.170
sys/dev/mii/miidevs: revision 1.171
sys/dev/mii/miidevs: revision 1.169

Add MaxLinear GPY21[125] 2.5G PHY.

miidevs: Update I22[56]
 - Add model 0x0001 and 0x0005 for I226 and 0x000c for I225.
   Need more info to write better descriptions.
 - Modify GPY211's description a little.

miidevs: Add MaxLinear GPY115.


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.168.20.1 src/sys/dev/mii/miidevs

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/miidevs
diff -u src/sys/dev/mii/miidevs:1.168 src/sys/dev/mii/miidevs:1.168.20.1
--- src/sys/dev/mii/miidevs:1.168	Tue Jun 23 14:35:36 2020
+++ src/sys/dev/mii/miidevs	Thu Jun 20 18:24:44 2024
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.168 2020/06/23 14:35:36 msaitoh Exp $
+$NetBSD: miidevs,v 1.168.20.1 2024/06/20 18:24:44 martin Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -92,6 +92,8 @@ oui NATSEMI			0x080017	National Semicond
 oui TI0x080028	Texas Instruments
 oui BROADCOM4			0x18c086	Broadcom Corporation
 oui RENESAS			0x749050	Renesas
+oui INTEL2			0x984fee	Intel
+oui MAXLINEAR			0xac9a96	MaxLinear
 
 /* Unregistered or wrong OUI */
 oui yyREALTEK			0x04	Realtek
@@ -116,6 +118,7 @@ oui xxVITESSE			0x008083	Vitesse Semicon
 oui xxPMCSIERRA2		0x009057	PMC-Sierra
 oui xxCICADA			0x00c08f	Cicada Semiconductor
 oui xxRDC			0x00d02d	RDC Semiconductor
+oui xxMAXLINEAR			0x0c32ab	MaxLinear
 oui xxNATSEMI			0x1000e8	National Semiconductor
 oui xxLEVEL1			0x782000	Level 1
 oui xxXAQTI			0xace000	XaQti Corp.
@@ -276,7 +279,12 @@ model INTEL I350		0x003b I350 10/100/100
 model xxMARVELL I210		0x I210 10/100/1000 media interface
 model xxMARVELL I82563		0x000a i82563 10/100/1000 media interface
 model ATTANSIC I82578		0x0004 Intel 82578 10/100/1000 media interface
-
+/* Acquired by MaxLinear */
+model INTEL2 GPY211		0x MaxLinear GPY21[125] 2.5G media interface
+model INTEL2 I226_1		0x0001 I226 2.5G media interface (1)
+model INTEL2 I226_2		0x0005 I226 2.5G media interface (2)
+model INTEL2 I225		0x000c I225 2.5G media interface
+model INTEL2 GPY115		0x0030 MaxLinear GPY115 Gigabit PHY
 
 /* JMicron PHYs */
 model JMICRON JMP211		0x0021 JMP211 10/100/1000 media interface



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:24:44 UTC 2024

Modified Files:
src/sys/dev/mii [netbsd-10]: miidevs

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

sys/dev/mii/miidevs: revision 1.170
sys/dev/mii/miidevs: revision 1.171
sys/dev/mii/miidevs: revision 1.169

Add MaxLinear GPY21[125] 2.5G PHY.

miidevs: Update I22[56]
 - Add model 0x0001 and 0x0005 for I226 and 0x000c for I225.
   Need more info to write better descriptions.
 - Modify GPY211's description a little.

miidevs: Add MaxLinear GPY115.


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.168.20.1 src/sys/dev/mii/miidevs

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



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:22:48 UTC 2024

Modified Files:
src/lib/libpthread [netbsd-10]: pthread.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #711):

lib/libpthread/pthread.c: revision 1.185

Fix resource leak in pthread_create().  Pthread field "pt_lwpctl"
must not be accessed after _lwp_exit() as the kernel may free
it, attach it to another thread and change its "lc_curcpu".

The "pthread__deadqueue" will fill up with pthreads with
an invalid "pt_lwpctl" and allocated stack that never get
reused.

Replace the test "lc_curcpu == LWPCTL_CPU_EXITED" with
test "_lwp_kill(newthread->pt_lid, 0) == -1 && errno == ESRCH"
to make sure this thread has finished its _lwp_exit().

PR lib/57831 "Memory leaks in libpthread/libc"


To generate a diff of this commit:
cvs rdiff -u -r1.181.2.1 -r1.181.2.2 src/lib/libpthread/pthread.c

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

Modified files:

Index: src/lib/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.181.2.1 src/lib/libpthread/pthread.c:1.181.2.2
--- src/lib/libpthread/pthread.c:1.181.2.1	Tue Nov 28 13:17:11 2023
+++ src/lib/libpthread/pthread.c	Thu Jun 20 18:22:47 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread.c,v 1.181.2.1 2023/11/28 13:17:11 martin Exp $	*/
+/*	$NetBSD: pthread.c,v 1.181.2.2 2024/06/20 18:22:47 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: pthread.c,v 1.181.2.1 2023/11/28 13:17:11 martin Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.181.2.2 2024/06/20 18:22:47 martin Exp $");
 
 #define	__EXPOSE_STACK	1
 
@@ -462,9 +462,9 @@ pthread_create(pthread_t *thread, const 
 	if (!PTQ_EMPTY(__deadqueue)) {
 		pthread_mutex_lock(__deadqueue_lock);
 		PTQ_FOREACH(newthread, __deadqueue, pt_deadq) {
-			/* Still busily exiting, or finished? */
-			if (newthread->pt_lwpctl->lc_curcpu ==
-			LWPCTL_CPU_EXITED)
+			/* Still running? */
+			if (_lwp_kill(newthread->pt_lid, 0) == -1 &&
+			errno == ESRCH)
 break;
 		}
 		if (newthread)



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:22:48 UTC 2024

Modified Files:
src/lib/libpthread [netbsd-10]: pthread.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #711):

lib/libpthread/pthread.c: revision 1.185

Fix resource leak in pthread_create().  Pthread field "pt_lwpctl"
must not be accessed after _lwp_exit() as the kernel may free
it, attach it to another thread and change its "lc_curcpu".

The "pthread__deadqueue" will fill up with pthreads with
an invalid "pt_lwpctl" and allocated stack that never get
reused.

Replace the test "lc_curcpu == LWPCTL_CPU_EXITED" with
test "_lwp_kill(newthread->pt_lid, 0) == -1 && errno == ESRCH"
to make sure this thread has finished its _lwp_exit().

PR lib/57831 "Memory leaks in libpthread/libc"


To generate a diff of this commit:
cvs rdiff -u -r1.181.2.1 -r1.181.2.2 src/lib/libpthread/pthread.c

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



CVS commit: [netbsd-10] src/usr.sbin

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:20:56 UTC 2024

Modified Files:
src/usr.sbin/envstat [netbsd-10]: prog_ops.h
src/usr.sbin/powerd [netbsd-10]: prog_ops.h
src/usr.sbin/traceroute [netbsd-10]: prog_ops.h

Log Message:
Pull up following revision(s) (requested by rin in ticket #710):

usr.sbin/traceroute/prog_ops.h: revision 1.3
usr.sbin/powerd/prog_ops.h: revision 1.2
usr.sbin/envstat/prog_ops.h: revision 1.3

envstat(8), powerd(8), traceroute(8): Add support to CRUNCHOPS

Now, all rump-fied programs can be built as crunched binaries.

Thanks ozaki-r@ for discussion.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.56.1 src/usr.sbin/envstat/prog_ops.h
cvs rdiff -u -r1.1 -r1.1.56.1 src/usr.sbin/powerd/prog_ops.h
cvs rdiff -u -r1.2 -r1.2.8.1 src/usr.sbin/traceroute/prog_ops.h

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



CVS commit: [netbsd-10] src/usr.sbin

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:20:56 UTC 2024

Modified Files:
src/usr.sbin/envstat [netbsd-10]: prog_ops.h
src/usr.sbin/powerd [netbsd-10]: prog_ops.h
src/usr.sbin/traceroute [netbsd-10]: prog_ops.h

Log Message:
Pull up following revision(s) (requested by rin in ticket #710):

usr.sbin/traceroute/prog_ops.h: revision 1.3
usr.sbin/powerd/prog_ops.h: revision 1.2
usr.sbin/envstat/prog_ops.h: revision 1.3

envstat(8), powerd(8), traceroute(8): Add support to CRUNCHOPS

Now, all rump-fied programs can be built as crunched binaries.

Thanks ozaki-r@ for discussion.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.56.1 src/usr.sbin/envstat/prog_ops.h
cvs rdiff -u -r1.1 -r1.1.56.1 src/usr.sbin/powerd/prog_ops.h
cvs rdiff -u -r1.2 -r1.2.8.1 src/usr.sbin/traceroute/prog_ops.h

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/envstat/prog_ops.h
diff -u src/usr.sbin/envstat/prog_ops.h:1.2 src/usr.sbin/envstat/prog_ops.h:1.2.56.1
--- src/usr.sbin/envstat/prog_ops.h:1.2	Wed Dec 15 15:07:54 2010
+++ src/usr.sbin/envstat/prog_ops.h	Thu Jun 20 18:20:56 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: prog_ops.h,v 1.2 2010/12/15 15:07:54 pooka Exp $	*/
+/*  $NetBSD: prog_ops.h,v 1.2.56.1 2024/06/20 18:20:56 martin Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,6 +31,8 @@
 
 #include 
 
+#ifndef CRUNCHOPS
+
 struct prog_ops {
 	int (*op_init)(void);
 
@@ -43,4 +45,12 @@ extern const struct prog_ops prog_ops;
 #define prog_open prog_ops.op_open
 #define prog_close prog_ops.op_close
 
+#else
+
+#define prog_init ((int (*)(void))NULL)
+#define prog_open open
+#define prog_close close
+
+#endif /* CRUNCHOPS */
+
 #endif /* _PROG_OPS_H_ */

Index: src/usr.sbin/powerd/prog_ops.h
diff -u src/usr.sbin/powerd/prog_ops.h:1.1 src/usr.sbin/powerd/prog_ops.h:1.1.56.1
--- src/usr.sbin/powerd/prog_ops.h:1.1	Sun Dec 19 22:52:08 2010
+++ src/usr.sbin/powerd/prog_ops.h	Thu Jun 20 18:20:56 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: prog_ops.h,v 1.1 2010/12/19 22:52:08 pgoyette Exp $ */
+/*  $NetBSD: prog_ops.h,v 1.1.56.1 2024/06/20 18:20:56 martin Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -33,6 +33,8 @@
 #include 
 #include 
 
+#ifndef CRUNCHOPS
+
 struct prog_ops {
 	int (*op_init)(void);
 
@@ -56,4 +58,17 @@ extern const struct prog_ops prog_ops;
 #define prog_fcntl prog_ops.op_fcntl
 #define prog_kqueue prog_ops.op_kqueue
 
+#else
+
+#define prog_init ((int (*)(void))NULL)
+#define prog_open open
+#define prog_close close
+#define prog_read read
+#define prog_kevent kevent
+#define prog_ioctl ioctl
+#define prog_fcntl fcntl
+#define prog_kqueue kqueue
+
+#endif /* CRUNCHOPS */
+
 #endif /* _PROG_OPS_H_ */

Index: src/usr.sbin/traceroute/prog_ops.h
diff -u src/usr.sbin/traceroute/prog_ops.h:1.2 src/usr.sbin/traceroute/prog_ops.h:1.2.8.1
--- src/usr.sbin/traceroute/prog_ops.h:1.2	Sun Aug 18 04:12:07 2019
+++ src/usr.sbin/traceroute/prog_ops.h	Thu Jun 20 18:20:56 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: prog_ops.h,v 1.2 2019/08/18 04:12:07 kamil Exp $	*/
+/*  $NetBSD: prog_ops.h,v 1.2.8.1 2024/06/20 18:20:56 martin Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -34,6 +34,8 @@
 #include 
 #include 
 
+#ifndef CRUNCHOPS
+
 struct prog_ops {
 	int (*op_init)(void);
 
@@ -75,4 +77,21 @@ extern const struct prog_ops prog_ops;
 #define prog_sysctl prog_ops.op_sysctl
 #define prog_getifaddrs prog_ops.op_getifaddrs
 
+#else
+
+#define prog_init ((int (*)(void))NULL)
+#define prog_socket socket
+#define prog_setsockopt setsockopt
+#define prog_shutdown shutdown
+#define prog_poll poll
+#define prog_recvfrom recvfrom
+#define prog_sendto sendto
+#define prog_close close
+#define prog_connect connect
+#define prog_getsockname getsockname
+#define prog_sysctl sysctl
+#define prog_getifaddrs getifaddrs
+
+#endif /* CRUNCHOPS */
+
 #endif /* _PROG_OPS_H_ */



CVS commit: [netbsd-10] src/crypto/external/bsd/openssh/bin

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:18:44 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/bin [netbsd-10]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by rin in ticket #709):

crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.5

openssh/bin: Use ${EXTERNAL_OPENSSL_SUBDIR} instead of `openssl`

NFC at the moment; for consistency in the future, when
we use `openssl.old` again.


To generate a diff of this commit:
cvs rdiff -u -r1.3.26.1 -r1.3.26.2 \
src/crypto/external/bsd/openssh/bin/Makefile.inc

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

Modified files:

Index: src/crypto/external/bsd/openssh/bin/Makefile.inc
diff -u src/crypto/external/bsd/openssh/bin/Makefile.inc:1.3.26.1 src/crypto/external/bsd/openssh/bin/Makefile.inc:1.3.26.2
--- src/crypto/external/bsd/openssh/bin/Makefile.inc:1.3.26.1	Mon Dec 25 12:22:55 2023
+++ src/crypto/external/bsd/openssh/bin/Makefile.inc	Thu Jun 20 18:18:44 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.3.26.1 2023/12/25 12:22:55 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.3.26.2 2024/06/20 18:18:44 martin Exp $
 
 CPPFLAGS+=-DWITH_OPENSSL
 
@@ -6,7 +6,7 @@ CRYPTOBSD=${NETBSDSRCDIR}/crypto/externa
 
 PROGDPLIBS+= \
 ssh ${CRYPTOBSD}/openssh/lib \
-crypto ${CRYPTOBSD}/openssl/lib/libcrypto \
+crypto ${CRYPTOBSD}/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto \
 crypt ${NETBSDSRCDIR}/lib/libcrypt \
 z ${NETBSDSRCDIR}/lib/libz
 



CVS commit: [netbsd-10] src/crypto/external/bsd/openssh/bin

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:18:44 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/bin [netbsd-10]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by rin in ticket #709):

crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.5

openssh/bin: Use ${EXTERNAL_OPENSSL_SUBDIR} instead of `openssl`

NFC at the moment; for consistency in the future, when
we use `openssl.old` again.


To generate a diff of this commit:
cvs rdiff -u -r1.3.26.1 -r1.3.26.2 \
src/crypto/external/bsd/openssh/bin/Makefile.inc

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/arch

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:16:22 UTC 2024

Modified Files:
src/sys/arch/mac68k/dev [netbsd-9]: aed.c
src/sys/arch/macppc/dev [netbsd-9]: aed.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #1847):

sys/arch/macppc/dev/aed.c: revision 1.35
sys/arch/mac68k/dev/aed.c: revision 1.39

Pass event up to adb device.

While here do the same for macppc.

Addresses PR/58303


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.8.1 src/sys/arch/mac68k/dev/aed.c
cvs rdiff -u -r1.30 -r1.30.8.1 src/sys/arch/macppc/dev/aed.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/mac68k/dev/aed.c
diff -u src/sys/arch/mac68k/dev/aed.c:1.34 src/sys/arch/mac68k/dev/aed.c:1.34.8.1
--- src/sys/arch/mac68k/dev/aed.c:1.34	Wed Oct 25 08:12:37 2017
+++ src/sys/arch/mac68k/dev/aed.c	Thu Jun 20 18:16:22 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aed.c,v 1.34 2017/10/25 08:12:37 maya Exp $	*/
+/*	$NetBSD: aed.c,v 1.34.8.1 2024/06/20 18:16:22 martin Exp $	*/
 
 /*
  * Copyright (C) 1994	Bradley A. Grantham
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.34 2017/10/25 08:12:37 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.34.8.1 2024/06/20 18:16:22 martin Exp $");
 
 #include "opt_adb.h"
 
@@ -164,6 +164,7 @@ aed_input(adb_event_t *event)
 			aed_dokeyupdown(_event);
 		break;
 	case ADBADDR_MS:
+		event->u.m.buttons |= aed_sc->sc_buttons;
 		new_event.u.m.buttons |= aed_sc->sc_buttons;
 		aed_handoff(_event);
 		break;

Index: src/sys/arch/macppc/dev/aed.c
diff -u src/sys/arch/macppc/dev/aed.c:1.30 src/sys/arch/macppc/dev/aed.c:1.30.8.1
--- src/sys/arch/macppc/dev/aed.c:1.30	Wed Oct 25 08:12:37 2017
+++ src/sys/arch/macppc/dev/aed.c	Thu Jun 20 18:16:22 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aed.c,v 1.30 2017/10/25 08:12:37 maya Exp $	*/
+/*	$NetBSD: aed.c,v 1.30.8.1 2024/06/20 18:16:22 martin Exp $	*/
 
 /*
  * Copyright (C) 1994	Bradley A. Grantham
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.30 2017/10/25 08:12:37 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.30.8.1 2024/06/20 18:16:22 martin Exp $");
 
 #include 
 #include 
@@ -167,6 +167,7 @@ aed_input(adb_event_t *event)
 			aed_dokeyupdown(_event);
 		break;
 	case ADBADDR_MS:
+		event->u.m.buttons |= aed_sc->sc_buttons;
 		new_event.u.m.buttons |= aed_sc->sc_buttons;
 		aed_handoff(_event);
 		break;



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:16:22 UTC 2024

Modified Files:
src/sys/arch/mac68k/dev [netbsd-9]: aed.c
src/sys/arch/macppc/dev [netbsd-9]: aed.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #1847):

sys/arch/macppc/dev/aed.c: revision 1.35
sys/arch/mac68k/dev/aed.c: revision 1.39

Pass event up to adb device.

While here do the same for macppc.

Addresses PR/58303


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.8.1 src/sys/arch/mac68k/dev/aed.c
cvs rdiff -u -r1.30 -r1.30.8.1 src/sys/arch/macppc/dev/aed.c

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



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:15:15 UTC 2024

Modified Files:
src/sys/arch/mac68k/dev [netbsd-10]: aed.c
src/sys/arch/macppc/dev [netbsd-10]: aed.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #708):

sys/arch/macppc/dev/aed.c: revision 1.35
sys/arch/mac68k/dev/aed.c: revision 1.39

Pass event up to adb device.

While here do the same for macppc.

Addresses PR/58303


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.38.4.1 src/sys/arch/mac68k/dev/aed.c
cvs rdiff -u -r1.34 -r1.34.4.1 src/sys/arch/macppc/dev/aed.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/mac68k/dev/aed.c
diff -u src/sys/arch/mac68k/dev/aed.c:1.38 src/sys/arch/mac68k/dev/aed.c:1.38.4.1
--- src/sys/arch/mac68k/dev/aed.c:1.38	Sun Sep 26 16:36:18 2021
+++ src/sys/arch/mac68k/dev/aed.c	Thu Jun 20 18:15:15 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aed.c,v 1.38 2021/09/26 16:36:18 thorpej Exp $	*/
+/*	$NetBSD: aed.c,v 1.38.4.1 2024/06/20 18:15:15 martin Exp $	*/
 
 /*
  * Copyright (C) 1994	Bradley A. Grantham
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.38 2021/09/26 16:36:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.38.4.1 2024/06/20 18:15:15 martin Exp $");
 
 #include "opt_adb.h"
 
@@ -164,6 +164,7 @@ aed_input(adb_event_t *event)
 			aed_dokeyupdown(_event);
 		break;
 	case ADBADDR_MS:
+		event->u.m.buttons |= aed_sc->sc_buttons;
 		new_event.u.m.buttons |= aed_sc->sc_buttons;
 		aed_handoff(_event);
 		break;

Index: src/sys/arch/macppc/dev/aed.c
diff -u src/sys/arch/macppc/dev/aed.c:1.34 src/sys/arch/macppc/dev/aed.c:1.34.4.1
--- src/sys/arch/macppc/dev/aed.c:1.34	Sun Sep 26 16:36:19 2021
+++ src/sys/arch/macppc/dev/aed.c	Thu Jun 20 18:15:15 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aed.c,v 1.34 2021/09/26 16:36:19 thorpej Exp $	*/
+/*	$NetBSD: aed.c,v 1.34.4.1 2024/06/20 18:15:15 martin Exp $	*/
 
 /*
  * Copyright (C) 1994	Bradley A. Grantham
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.34 2021/09/26 16:36:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.34.4.1 2024/06/20 18:15:15 martin Exp $");
 
 #include 
 #include 
@@ -167,6 +167,7 @@ aed_input(adb_event_t *event)
 			aed_dokeyupdown(_event);
 		break;
 	case ADBADDR_MS:
+		event->u.m.buttons |= aed_sc->sc_buttons;
 		new_event.u.m.buttons |= aed_sc->sc_buttons;
 		aed_handoff(_event);
 		break;



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:15:15 UTC 2024

Modified Files:
src/sys/arch/mac68k/dev [netbsd-10]: aed.c
src/sys/arch/macppc/dev [netbsd-10]: aed.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #708):

sys/arch/macppc/dev/aed.c: revision 1.35
sys/arch/mac68k/dev/aed.c: revision 1.39

Pass event up to adb device.

While here do the same for macppc.

Addresses PR/58303


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.38.4.1 src/sys/arch/mac68k/dev/aed.c
cvs rdiff -u -r1.34 -r1.34.4.1 src/sys/arch/macppc/dev/aed.c

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



CVS commit: [netbsd-10] src/sys/arch/macppc/macppc

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:11:53 UTC 2024

Modified Files:
src/sys/arch/macppc/macppc [netbsd-10]: mainbus.c

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

sys/arch/macppc/macppc/mainbus.c: revision 1.26

check for proper error value from OF_finddevice()

should fix PR57394


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.4.1 src/sys/arch/macppc/macppc/mainbus.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/macppc/macppc/mainbus.c
diff -u src/sys/arch/macppc/macppc/mainbus.c:1.25 src/sys/arch/macppc/macppc/mainbus.c:1.25.4.1
--- src/sys/arch/macppc/macppc/mainbus.c:1.25	Sat Jan 22 11:49:16 2022
+++ src/sys/arch/macppc/macppc/mainbus.c	Thu Jun 20 18:11:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.25 2022/01/22 11:49:16 thorpej Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.25.4.1 2024/06/20 18:11:53 martin Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.25 2022/01/22 11:49:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.25.4.1 2024/06/20 18:11:53 martin Exp $");
 
 #include 
 #include 
@@ -76,7 +76,13 @@ mainbus_attach(device_t parent, device_t
 	devhandle_t selfh = device_handle(self);
 
 	cpus = OF_finddevice("/cpus");
-	if (cpus != 0) {
+	/*
+	 * XXX
+	 * the canonical error value is -1 but I dimly remember some OF
+	 * variants returning 0 here, so check for both just in case.
+	 * It's not like this is a performance critical path.
+	 */
+	if ((cpus != -1) && (cpus != 0)) {
 		node = OF_child(cpus);
 		while (node != 0) {
 			ca.ca_name = "cpu";



CVS commit: [netbsd-10] src/sys/arch/macppc/macppc

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:11:53 UTC 2024

Modified Files:
src/sys/arch/macppc/macppc [netbsd-10]: mainbus.c

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

sys/arch/macppc/macppc/mainbus.c: revision 1.26

check for proper error value from OF_finddevice()

should fix PR57394


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.4.1 src/sys/arch/macppc/macppc/mainbus.c

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



CVS commit: [netbsd-10] src/sys/fs/msdosfs

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:09:54 UTC 2024

Modified Files:
src/sys/fs/msdosfs [netbsd-10]: msdosfs_rename.c

Log Message:
Pull up following revision(s) (requested by rhialto in ticket #706):

sys/fs/msdosfs/msdosfs_rename.c: revision 1.4

>From genfs_rename.c:
 * XXX Want a better equality test.  `tcnp->cn_cred == cred'
 * hoses p2k because puffs transmits the creds separately and
 * allocates distinct but equivalent structures for them.

Fixes rename crash in rump_msdos.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/fs/msdosfs/msdosfs_rename.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/msdosfs/msdosfs_rename.c
diff -u src/sys/fs/msdosfs/msdosfs_rename.c:1.3 src/sys/fs/msdosfs/msdosfs_rename.c:1.3.4.1
--- src/sys/fs/msdosfs/msdosfs_rename.c:1.3	Sat Oct 23 16:58:17 2021
+++ src/sys/fs/msdosfs/msdosfs_rename.c	Thu Jun 20 18:09:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_rename.c,v 1.3 2021/10/23 16:58:17 thorpej Exp $	*/
+/*	$NetBSD: msdosfs_rename.c,v 1.3.4.1 2024/06/20 18:09:54 martin Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_rename.c,v 1.3 2021/10/23 16:58:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_rename.c,v 1.3.4.1 2024/06/20 18:09:54 martin Exp $");
 
 #include 
 #include 
@@ -127,7 +127,7 @@ msdosfs_rename(void *v)
 	KASSERT(tdvp->v_type == VDIR);
 
 	cred = fcnp->cn_cred;
-	KASSERT(tcnp->cn_cred == cred);
+	KASSERT(kauth_cred_uidmatch(cred, tcnp->cn_cred));
 
 	/*
 	 * Sanitize our world from the VFS insanity.  Unlock the target



CVS commit: [netbsd-10] src/sys/fs/msdosfs

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:09:54 UTC 2024

Modified Files:
src/sys/fs/msdosfs [netbsd-10]: msdosfs_rename.c

Log Message:
Pull up following revision(s) (requested by rhialto in ticket #706):

sys/fs/msdosfs/msdosfs_rename.c: revision 1.4

>From genfs_rename.c:
 * XXX Want a better equality test.  `tcnp->cn_cred == cred'
 * hoses p2k because puffs transmits the creds separately and
 * allocates distinct but equivalent structures for them.

Fixes rename crash in rump_msdos.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/fs/msdosfs/msdosfs_rename.c

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



CVS commit: [netbsd-10] src

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:07:04 UTC 2024

Modified Files:
src/distrib/sets/lists/base [netbsd-10]: mi
src/external/public-domain/tz/share/zoneinfo [netbsd-10]: Makefile

Log Message:
Pull up following revision(s) (requested by kre in ticket #705):

external/public-domain/tz/share/zoneinfo/Makefile: revision 1.5
distrib/sets/lists/base/mi: revision 1.1345

Install /usr/share/zoneinfo/leap-seconds.list

Requested by Mallory Adams in tech-userlevel@ a couple of weeks ago.


To generate a diff of this commit:
cvs rdiff -u -r1.1314.2.6 -r1.1314.2.7 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.4 -r1.4.6.1 \
src/external/public-domain/tz/share/zoneinfo/Makefile

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1314.2.6 src/distrib/sets/lists/base/mi:1.1314.2.7
--- src/distrib/sets/lists/base/mi:1.1314.2.6	Mon Mar 11 17:09:41 2024
+++ src/distrib/sets/lists/base/mi	Thu Jun 20 18:07:03 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1314.2.6 2024/03/11 17:09:41 martin Exp $
+# $NetBSD: mi,v 1.1314.2.7 2024/06/20 18:07:03 martin Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -6266,6 +6266,7 @@
 ./usr/share/zoneinfo/WET			base-sys-share		share
 ./usr/share/zoneinfo/Zulu			base-sys-share		share
 ./usr/share/zoneinfo/iso3166.tab		base-sys-share		share
+./usr/share/zoneinfo/leap-seconds.list		base-sys-share		share
 ./usr/share/zoneinfo/leapseconds		base-sys-share		share
 ./usr/share/zoneinfo/posixrules			base-sys-share		share
 ./usr/share/zoneinfo/zone.tab			base-sys-share		share

Index: src/external/public-domain/tz/share/zoneinfo/Makefile
diff -u src/external/public-domain/tz/share/zoneinfo/Makefile:1.4 src/external/public-domain/tz/share/zoneinfo/Makefile:1.4.6.1
--- src/external/public-domain/tz/share/zoneinfo/Makefile:1.4	Thu Oct  8 13:44:36 2020
+++ src/external/public-domain/tz/share/zoneinfo/Makefile	Thu Jun 20 18:07:03 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2020/10/08 13:44:36 kre Exp $
+#	$NetBSD: Makefile,v 1.4.6.1 2024/06/20 18:07:03 martin Exp $
 
 .include 
 .include "../../Makefile.inc"
@@ -52,7 +52,7 @@ YDATA=		$(PRIMARY_YDATA) etcetera backwa
 NDATA=		factory
 TDATA=		$(YDATA) $(NDATA)
 ZONETABLES=	zone1970.tab zone.tab
-TABDATA=	iso3166.tab leapseconds $(ZONETABLES)
+TABDATA=	iso3166.tab leapseconds leap-seconds.list $(ZONETABLES)
 DATA=		$(YDATA) $(NDATA) $(TABDATA)
 
 TZBUILDDIR=	${.OBJDIR}/builddir



CVS commit: [netbsd-10] src

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:07:04 UTC 2024

Modified Files:
src/distrib/sets/lists/base [netbsd-10]: mi
src/external/public-domain/tz/share/zoneinfo [netbsd-10]: Makefile

Log Message:
Pull up following revision(s) (requested by kre in ticket #705):

external/public-domain/tz/share/zoneinfo/Makefile: revision 1.5
distrib/sets/lists/base/mi: revision 1.1345

Install /usr/share/zoneinfo/leap-seconds.list

Requested by Mallory Adams in tech-userlevel@ a couple of weeks ago.


To generate a diff of this commit:
cvs rdiff -u -r1.1314.2.6 -r1.1314.2.7 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.4 -r1.4.6.1 \
src/external/public-domain/tz/share/zoneinfo/Makefile

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



CVS commit: [netbsd-10] src/usr.bin/ftp

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:04:49 UTC 2024

Modified Files:
src/usr.bin/ftp [netbsd-10]: ftp.1

Log Message:
Pull up following revision(s) (requested by gutteridge in ticket #704):

usr.bin/ftp/ftp.1: revision 1.154

ftp.1: drop a sentence that's no longer accurate


To generate a diff of this commit:
cvs rdiff -u -r1.147.2.3 -r1.147.2.4 src/usr.bin/ftp/ftp.1

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

Modified files:

Index: src/usr.bin/ftp/ftp.1
diff -u src/usr.bin/ftp/ftp.1:1.147.2.3 src/usr.bin/ftp/ftp.1:1.147.2.4
--- src/usr.bin/ftp/ftp.1:1.147.2.3	Tue May 16 16:22:15 2023
+++ src/usr.bin/ftp/ftp.1	Thu Jun 20 18:04:49 2024
@@ -1,4 +1,4 @@
-.\" 	$NetBSD: ftp.1,v 1.147.2.3 2023/05/16 16:22:15 martin Exp $
+.\" 	$NetBSD: ftp.1,v 1.147.2.4 2024/06/20 18:04:49 martin Exp $
 .\"
 .\" Copyright (c) 1996-2023 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -57,7 +57,7 @@
 .\"
 .\"	@(#)ftp.1	8.3 (Berkeley) 10/9/94
 .\"
-.Dd February 25, 2023
+.Dd April 17, 2024
 .Dt FTP 1
 .Os
 .Sh NAME
@@ -1875,7 +1875,6 @@ and
 (and optionally
 .Ar password\^ )
 is in the URL, use them for the first attempt to authenticate.
-There is currently no certificate validation and verification.
 .\" file:///path
 .It Li file:/// Ns Ar path
 A local URL, copied from



CVS commit: [netbsd-10] src/usr.bin/ftp

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:04:49 UTC 2024

Modified Files:
src/usr.bin/ftp [netbsd-10]: ftp.1

Log Message:
Pull up following revision(s) (requested by gutteridge in ticket #704):

usr.bin/ftp/ftp.1: revision 1.154

ftp.1: drop a sentence that's no longer accurate


To generate a diff of this commit:
cvs rdiff -u -r1.147.2.3 -r1.147.2.4 src/usr.bin/ftp/ftp.1

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



CVS commit: src/sys/arch/sparc64/sparc64

2024-06-20 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Thu Jun 20 18:02:45 UTC 2024

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

Log Message:
sun4v: fix booting from both virtual disk (sd) and cdrom (cd) devices


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/sys/arch/sparc64/sparc64/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/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.240 src/sys/arch/sparc64/sparc64/autoconf.c:1.241
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.240	Wed Dec 20 05:33:59 2023
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Thu Jun 20 18:02:45 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.240 2023/12/20 05:33:59 thorpej Exp $ */
+/*	$NetBSD: autoconf.c,v 1.241 2024/06/20 18:02:45 palle Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.240 2023/12/20 05:33:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.241 2024/06/20 18:02:45 palle Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -1183,14 +1183,15 @@ device_register(device_t dev, void *aux)
 		 * secondary logical domain
 		 *
 		 * The bootpath looks something like this:
-		 *   /virtual-devices@100/channel-devices@200/disk@1:a
+		 *   /virtual-devices@100/channel-devices@200/disk@1:a (disk)
+		 *   /virtual-devices@100/channel-devices@200/disk@4:f (cdrom)
 		 *
 		 * The device hierarchy constructed during autoconfiguration
 		 * is:
-		 *   /mainbus/vbus/cbus/vdsk/scsibus/sd
+		 *   /mainbus/vbus/cbus/vdsk/scsibus/sd or
+		 *   /mainbus/vbus/cbus/vdsk/scsibus/cd
 		 */
-		if (CPU_ISSUN4V && device_is_a(dev, "sd") &&
-		device_is_a(busdev, "vdsk")) {
+		if (CPU_ISSUN4V && device_is_a(busdev, "vdsk")) {
 			dev_path_exact_match(dev, ofnode);
 		} else {
 			dev_bi_unit_drive_match(dev, ofnode,



CVS commit: src/sys/arch/sparc64/sparc64

2024-06-20 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Thu Jun 20 18:02:45 UTC 2024

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

Log Message:
sun4v: fix booting from both virtual disk (sd) and cdrom (cd) devices


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/sys/arch/sparc64/sparc64/autoconf.c

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



CVS commit: [netbsd-10] src/usr.bin/aiomixer

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:58:17 UTC 2024

Modified Files:
src/usr.bin/aiomixer [netbsd-10]: main.c

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

usr.bin/aiomixer/main.c: revision 1.6

aiomixer(1): Fix setting volume on sb(4) emulated in QEMU.

The driver does not return a "delta", assume it's 16.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/usr.bin/aiomixer/main.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/aiomixer/main.c
diff -u src/usr.bin/aiomixer/main.c:1.4 src/usr.bin/aiomixer/main.c:1.4.2.1
--- src/usr.bin/aiomixer/main.c:1.4	Sun Jul 18 11:45:31 2021
+++ src/usr.bin/aiomixer/main.c	Thu Jun 20 17:58:17 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.4 2021/07/18 11:45:31 nia Exp $ */
+/* $NetBSD: main.c,v 1.4.2.1 2024/06/20 17:58:17 martin Exp $ */
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -149,7 +149,12 @@ slide_control(struct aiomixer *aio,
 
 	switch (info->type) {
 	case AUDIO_MIXER_VALUE:
-		delta = right ? info->un.v.delta : -info->un.v.delta;
+		if (info->un.v.delta != 0) {
+			delta = right ? info->un.v.delta : -info->un.v.delta;
+		} else {
+			/* delta is 0 in qemu with sb(4) */
+			delta = right ? 16 : -16;
+		}
 		/*
 		 * work around strange problem where the level can be
 		 * increased but not decreased, seen with uaudio(4)



CVS commit: [netbsd-10] src/usr.bin/aiomixer

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:58:17 UTC 2024

Modified Files:
src/usr.bin/aiomixer [netbsd-10]: main.c

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

usr.bin/aiomixer/main.c: revision 1.6

aiomixer(1): Fix setting volume on sb(4) emulated in QEMU.

The driver does not return a "delta", assume it's 16.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/usr.bin/aiomixer/main.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/usb

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:55:47 UTC 2024

Modified Files:
src/sys/dev/usb [netbsd-9]: usbdevs.h usbdevs_data.h

Log Message:
Regen for ticket #1846 (Mercusys MW150USV2 support)


To generate a diff of this commit:
cvs rdiff -u -r1.760.4.14 -r1.760.4.15 src/sys/dev/usb/usbdevs.h \
src/sys/dev/usb/usbdevs_data.h

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



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:55:11 UTC 2024

Modified Files:
src/sys/dev/usb [netbsd-9]: if_urtwn.c usbdevs

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

sys/dev/usb/if_urtwn.c: revision 1.108
sys/dev/usb/usbdevs: revision 1.812

Add Mercusys and Mercusys MW150USV2
>From Daeil Lee in PR/57819

Add Mercusys NW150US V2 USB support

No changes needed, other than recognizing it as working.
>From Daeil Lee in PR/57819


To generate a diff of this commit:
cvs rdiff -u -r1.71.2.7 -r1.71.2.8 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.770.4.14 -r1.770.4.15 src/sys/dev/usb/usbdevs

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

Modified files:

Index: src/sys/dev/usb/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.71.2.7 src/sys/dev/usb/if_urtwn.c:1.71.2.8
--- src/sys/dev/usb/if_urtwn.c:1.71.2.7	Sun Mar 10 18:59:19 2024
+++ src/sys/dev/usb/if_urtwn.c	Thu Jun 20 17:55:11 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.71.2.7 2024/03/10 18:59:19 martin Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.71.2.8 2024/06/20 17:55:11 martin Exp $	*/
 /*	$OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $	*/
 
 /*-
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.71.2.7 2024/03/10 18:59:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.71.2.8 2024/06/20 17:55:11 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -190,6 +190,7 @@ static const struct urtwn_dev {
 	/* URTWN_RTL8188E */
 	URTWN_RTL8188E_DEV(DLINK, DWA125D1),
 	URTWN_RTL8188E_DEV(ELECOM, WDC150SU2M),
+	URTWN_RTL8188E_DEV(MERCUSYS, MW150USV2),
 	URTWN_RTL8188E_DEV(REALTEK, RTL8188ETV),
 	URTWN_RTL8188E_DEV(REALTEK, RTL8188EU),
 	URTWN_RTL8188E_DEV(ABOCOM, RTL8188EU),

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.770.4.14 src/sys/dev/usb/usbdevs:1.770.4.15
--- src/sys/dev/usb/usbdevs:1.770.4.14	Sun Apr 28 13:29:40 2024
+++ src/sys/dev/usb/usbdevs	Thu Jun 20 17:55:11 2024
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.770.4.14 2024/04/28 13:29:40 martin Exp $
+$NetBSD: usbdevs,v 1.770.4.15 2024/06/20 17:55:11 martin Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -583,6 +583,7 @@ vendor HIROSE		0x2631	Hirose Electric
 vendor ONEPLUS		0x2717	ONEPLUS
 vendor NHJ		0x2770	NHJ
 vendor PLANEX		0x2c02	Planex Communications
+vendor MERCUSYS		0x2c4e	Mercusys
 vendor VIDZMEDIA	0x3275	VidzMedia Pte Ltd
 vendor AEI		0x3334	AEI
 vendor HANK		0x3353	Hank Connection
@@ -2288,6 +2289,9 @@ product MELCO WLIUCGNM		0x01a2	WLI-UC-GN
 product MELCO WLIUCGNM2T	0x01ee	WLI-UC-GNM2T
 product MELCO WIU2300D		0x0241	WI-U2-300D
 
+/* Mercusys products */
+product	MERCUSYS MW150USV2	0x0102	MW150US V2
+
 /* Merlin products */
 product MERLIN V620		0x1110	Merlin V620
 



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:55:11 UTC 2024

Modified Files:
src/sys/dev/usb [netbsd-9]: if_urtwn.c usbdevs

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

sys/dev/usb/if_urtwn.c: revision 1.108
sys/dev/usb/usbdevs: revision 1.812

Add Mercusys and Mercusys MW150USV2
>From Daeil Lee in PR/57819

Add Mercusys NW150US V2 USB support

No changes needed, other than recognizing it as working.
>From Daeil Lee in PR/57819


To generate a diff of this commit:
cvs rdiff -u -r1.71.2.7 -r1.71.2.8 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.770.4.14 -r1.770.4.15 src/sys/dev/usb/usbdevs

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



CVS commit: [netbsd-10] src/sys/dev/usb

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:52:51 UTC 2024

Modified Files:
src/sys/dev/usb [netbsd-10]: usbdevs.h usbdevs_data.h

Log Message:
Regen for ticket #702 (Mercusys MW150USV2 support)


To generate a diff of this commit:
cvs rdiff -u -r1.798.4.3 -r1.798.4.4 src/sys/dev/usb/usbdevs.h \
src/sys/dev/usb/usbdevs_data.h

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



CVS commit: [netbsd-10] src/sys/dev/usb

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:52:12 UTC 2024

Modified Files:
src/sys/dev/usb [netbsd-10]: if_urtwn.c usbdevs

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

sys/dev/usb/if_urtwn.c: revision 1.108
sys/dev/usb/usbdevs: revision 1.812

Add Mercusys and Mercusys MW150USV2
>From Daeil Lee in PR/57819

Add Mercusys NW150US V2 USB support

No changes needed, other than recognizing it as working.
>From Daeil Lee in PR/57819


To generate a diff of this commit:
cvs rdiff -u -r1.105.4.1 -r1.105.4.2 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.806.4.3 -r1.806.4.4 src/sys/dev/usb/usbdevs

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



CVS commit: [netbsd-10] src/sys/dev/usb

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:52:12 UTC 2024

Modified Files:
src/sys/dev/usb [netbsd-10]: if_urtwn.c usbdevs

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

sys/dev/usb/if_urtwn.c: revision 1.108
sys/dev/usb/usbdevs: revision 1.812

Add Mercusys and Mercusys MW150USV2
>From Daeil Lee in PR/57819

Add Mercusys NW150US V2 USB support

No changes needed, other than recognizing it as working.
>From Daeil Lee in PR/57819


To generate a diff of this commit:
cvs rdiff -u -r1.105.4.1 -r1.105.4.2 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.806.4.3 -r1.806.4.4 src/sys/dev/usb/usbdevs

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

Modified files:

Index: src/sys/dev/usb/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.105.4.1 src/sys/dev/usb/if_urtwn.c:1.105.4.2
--- src/sys/dev/usb/if_urtwn.c:1.105.4.1	Sun Mar 10 18:57:11 2024
+++ src/sys/dev/usb/if_urtwn.c	Thu Jun 20 17:52:12 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.105.4.1 2024/03/10 18:57:11 martin Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.105.4.2 2024/06/20 17:52:12 martin Exp $	*/
 /*	$OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $	*/
 
 /*-
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.105.4.1 2024/03/10 18:57:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.105.4.2 2024/06/20 17:52:12 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -209,6 +209,7 @@ static const struct urtwn_dev {
 	/* URTWN_RTL8188E */
 	URTWN_RTL8188E_DEV(DLINK, DWA125D1),
 	URTWN_RTL8188E_DEV(ELECOM, WDC150SU2M),
+	URTWN_RTL8188E_DEV(MERCUSYS, MW150USV2),
 	URTWN_RTL8188E_DEV(REALTEK, RTL8188ETV),
 	URTWN_RTL8188E_DEV(REALTEK, RTL8188EU),
 	URTWN_RTL8188E_DEV(ABOCOM, RTL8188EU),

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.806.4.3 src/sys/dev/usb/usbdevs:1.806.4.4
--- src/sys/dev/usb/usbdevs:1.806.4.3	Sun Apr 28 13:26:36 2024
+++ src/sys/dev/usb/usbdevs	Thu Jun 20 17:52:12 2024
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.806.4.3 2024/04/28 13:26:36 martin Exp $
+$NetBSD: usbdevs,v 1.806.4.4 2024/06/20 17:52:12 martin Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -585,6 +585,7 @@ vendor HIROSE		0x2631	Hirose Electric
 vendor ONEPLUS		0x2717	ONEPLUS
 vendor NHJ		0x2770	NHJ
 vendor PLANEX		0x2c02	Planex Communications
+vendor MERCUSYS		0x2c4e	Mercusys
 vendor VIDZMEDIA	0x3275	VidzMedia Pte Ltd
 vendor AEI		0x3334	AEI
 vendor HANK		0x3353	Hank Connection
@@ -2308,6 +2309,9 @@ product MELCO WLIUCGNM		0x01a2	WLI-UC-GN
 product MELCO WLIUCGNM2T	0x01ee	WLI-UC-GNM2T
 product MELCO WIU2300D		0x0241	WI-U2-300D
 
+/* Mercusys products */
+product	MERCUSYS MW150USV2	0x0102	MW150US V2
+
 /* Merlin products */
 product MERLIN V620		0x1110	Merlin V620
 



CVS commit: src/sys/arch/sparc64/dev

2024-06-20 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Thu Jun 20 17:49:46 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: add some DPRINTF() to vdsk


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sparc64/dev/vdsk.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/sparc64/dev/vdsk.c
diff -u src/sys/arch/sparc64/dev/vdsk.c:1.16 src/sys/arch/sparc64/dev/vdsk.c:1.17
--- src/sys/arch/sparc64/dev/vdsk.c:1.16	Wed Jun 19 20:04:20 2024
+++ src/sys/arch/sparc64/dev/vdsk.c	Thu Jun 20 17:49:46 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: vdsk.c,v 1.16 2024/06/19 20:04:20 palle Exp $	*/
+/*	$NetBSD: vdsk.c,v 1.17 2024/06/20 17:49:46 palle Exp $	*/
 /*	$OpenBSD: vdsk.c,v 1.46 2015/01/25 21:42:13 kettenis Exp $	*/
 /*
  * Copyright (c) 2009, 2011 Mark Kettenis
@@ -631,7 +631,9 @@ vdsk_rx_vio_attr_info(struct vdsk_softc 
 			}
 
 			sc->sc_vdisk_block_size = ai->vdisk_block_size;
+			DPRINTF(("vdisk_block_size %u\n", sc->sc_vdisk_block_size));
 			sc->sc_vdisk_size = ai->vdisk_size;
+			DPRINTF(("vdisk_size %lu\n", sc->sc_vdisk_size));
 			if (sc->sc_major > 1 || sc->sc_minor >= 1)
 sc->sc_vd_mtype = ai->vd_mtype;
 			else
@@ -846,6 +848,8 @@ vdsk_send_attr_info(struct vdsk_softc *s
 	ai.xfer_mode = VIO_DRING_MODE;
 	ai.vdisk_block_size = DEV_BSIZE;
 	ai.max_xfer_sz = MAXPHYS / DEV_BSIZE;
+	DPRINTF(("vdisk_block_size %u\n", ai.vdisk_block_size));
+	DPRINTF(("max_xfer_sz %lu\n", ai.max_xfer_sz));
 	vdsk_sendmsg(sc, , sizeof(ai));
 
 	sc->sc_vio_state |= VIO_SND_ATTR_INFO;
@@ -1023,42 +1027,98 @@ vdsk_scsi_cmd(struct vdsk_softc *sc, str
 	switch (xs->cmd->opcode) {
 
 		case SCSI_READ_6_COMMAND:
+			DPRINTF(("SCSI_READ_6_COMMAND\n"));
+			break;
+			
 		case READ_10:
+			DPRINTF(("SCSI_READ_10\n"));
+			break;
+			
 		case READ_12:
+			DPRINTF(("SCSI_READ_12\n"));
+			break;
+			
 		case READ_16:
+			DPRINTF(("SCSI_READ_16\n"));
+			break;
+			
 		case SCSI_WRITE_6_COMMAND:
+			DPRINTF(("SCSI_WRITE_6\n"));
+			break;
+			
 		case WRITE_10:
+			DPRINTF(("SCSI_WRITE_10\n"));
+			break;
+			
 		case WRITE_12:
+			DPRINTF(("SCSI_WRITE_12\n"));
+			break;
+			
 		case WRITE_16:
+			DPRINTF(("SCSI_WRITE_16\n"));
+			break;
+			
 		case SCSI_SYNCHRONIZE_CACHE_10:
+			DPRINTF(("SCSI_SYNCHRONIZE_CACHE_10WRITE_16\n"));
 			break;
 
 		case INQUIRY:
+			DPRINTF(("INQUIRY\n"));
 			vdsk_scsi_inq(sc, xs);
 			return;
 
 		case READ_CAPACITY_10:
+			DPRINTF(("READ_CAPACITY_10\n"));
 			vdsk_scsi_capacity(sc, xs);
 			return;
 
 		case READ_CAPACITY_16:
+			DPRINTF(("READ_CAPACITY_16\n"));
 			vdsk_scsi_capacity16(sc, xs);
 			return;
 
 		case SCSI_REPORT_LUNS:
+			DPRINTF(("REPORT_LUNS\n"));
 			vdsk_scsi_report_luns(sc, xs);
 			return;
 
 		case SCSI_TEST_UNIT_READY:
+			DPRINTF(("TEST_UNIT_READY\n"));
+			vdsk_scsi_done(xs, XS_NOERROR);
+			return;
+			
 		case START_STOP:
+			DPRINTF(("START_STOP\n"));
+			vdsk_scsi_done(xs, XS_NOERROR);
+			return;
+			
 		case SCSI_PREVENT_ALLOW_MEDIUM_REMOVAL:
+			DPRINTF(("PREVENT_ALLOW_MEDIUM_REMOVAL\n"));
+			vdsk_scsi_done(xs, XS_NOERROR);
+			return;
+			
 		case SCSI_MODE_SENSE_6:
+			printf("SCSI_MODE_SENSE_6 (not implemented)\n");
+			vdsk_scsi_done(xs, XS_DRIVER_STUFFUP);
+			return;
+
+		case SCSI_MODE_SELECT_6:
+			printf("MODE_SELECT_6 (not implemented)\n");
+			vdsk_scsi_done(xs, XS_DRIVER_STUFFUP);
+			return;
+
 		case SCSI_MAINTENANCE_IN:
+			printf("MAINTENANCE_IN\n");
 			vdsk_scsi_done(xs, XS_NOERROR);
 			return;
 
 		case SCSI_MODE_SENSE_10:
+			printf("SCSI_MODE_SENSE_10 (not implemented)\n");
+			vdsk_scsi_done(xs, XS_DRIVER_STUFFUP);
+			return;
+			
 		case READ_TOC:
+			printf("READ_TOC (not implemented)\n");
 			vdsk_scsi_done(xs, XS_DRIVER_STUFFUP);
 			return;
 
@@ -1113,6 +1173,7 @@ vdsk_submit_cmd(struct vdsk_softc *sc, s
 		case READ_10:
 		case READ_12:
 		case READ_16:
+			DPRINTF(("VD_OP_BREAD\n"));
 			operation = VD_OP_BREAD;
 			break;
 
@@ -1120,10 +1181,12 @@ vdsk_submit_cmd(struct vdsk_softc *sc, s
 		case WRITE_10:
 		case WRITE_12:
 		case WRITE_16:
+			DPRINTF(("VD_OP_BWRITE\n"));
 			operation = VD_OP_BWRITE;
 			break;
 
 		case SCSI_SYNCHRONIZE_CACHE_10:
+			DPRINTF(("VD_OP_FLUSH\n"));
 			operation = VD_OP_FLUSH;
 			break;
 
@@ -1157,7 +1220,7 @@ vdsk_submit_cmd(struct vdsk_softc *sc, s
 	len = xs->datalen;
 	va = (vaddr_t)xs->data;
 	while (len > 0) {
-	  DPRINTF(("len = %u\n", len));
+		DPRINTF(("len = %u\n", len));
 		KASSERT(ncookies < MAXPHYS / PAGE_SIZE);
 		pa = 0;
 		pmap_extract(pmap_kernel(), va, );



CVS commit: src/sys/arch/sparc64/dev

2024-06-20 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Thu Jun 20 17:49:46 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: add some DPRINTF() to vdsk


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sparc64/dev/vdsk.c

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



CVS commit: [netbsd-10] src/distrib/sets/lists/man

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:46:55 UTC 2024

Modified Files:
src/distrib/sets/lists/man [netbsd-10]: mi

Log Message:
Adapt html man page changes for ticket #700 to the netbsd-10 branch


To generate a diff of this commit:
cvs rdiff -u -r1.1757.2.9 -r1.1757.2.10 src/distrib/sets/lists/man/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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1757.2.9 src/distrib/sets/lists/man/mi:1.1757.2.10
--- src/distrib/sets/lists/man/mi:1.1757.2.9	Thu Jun 20 11:00:06 2024
+++ src/distrib/sets/lists/man/mi	Thu Jun 20 17:46:55 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1757.2.9 2024/06/20 11:00:06 martin Exp $
+# $NetBSD: mi,v 1.1757.2.10 2024/06/20 17:46:55 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4727,7 +4727,7 @@
 ./usr/share/man/html4/i386/spic.html		man-sys-htmlman		html
 ./usr/share/man/html4/i386/vald.html		man-obsolete		obsolete
 ./usr/share/man/html4/i386/vesafb.html		man-obsolete		obsolete
-./usr/share/man/html4/i386/viac7temp.html	man-sys-htmlman		html
+./usr/share/man/html4/i386/viac7temp.html	man-obsolete		obsolete
 ./usr/share/man/html4/i915drm.html		man-sys-htmlman		html
 ./usr/share/man/html4/iavc.html			man-obsolete		obsolete
 ./usr/share/man/html4/iavf.html			man-sys-htmlman		html
@@ -5487,6 +5487,7 @@
 ./usr/share/man/html4/x86/tco.html		man-sys-htmlman		html
 ./usr/share/man/html4/x86/tprof_amdpmi.html	man-obsolete		obsolete
 ./usr/share/man/html4/x86/tprof_pmi.html	man-obsolete		obsolete
+./usr/share/man/man4/x86/viac7temp.html		man-sys-htmlman		html
 ./usr/share/man/html4/x86/vmt.html		man-obsolete		obsolete
 ./usr/share/man/html4/x86/vmx.html		man-obsolete		obsolete
 ./usr/share/man/html4/xbd.html			man-sys-htmlman		html



CVS commit: [netbsd-10] src/distrib/sets/lists/man

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 17:46:55 UTC 2024

Modified Files:
src/distrib/sets/lists/man [netbsd-10]: mi

Log Message:
Adapt html man page changes for ticket #700 to the netbsd-10 branch


To generate a diff of this commit:
cvs rdiff -u -r1.1757.2.9 -r1.1757.2.10 src/distrib/sets/lists/man/mi

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



CVS commit: src/sys/arch/xen/xen

2024-06-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Jun 20 15:17:27 UTC 2024

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
Fix various cosmetic issues pointed out by Roland Illig. NFC.
While there add 2024 to copyright.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.106 src/sys/arch/xen/xen/xbdback_xenbus.c:1.107
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.106	Wed Jun 19 09:43:22 2024
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Thu Jun 20 15:17:27 2024
@@ -1,7 +1,7 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.106 2024/06/19 09:43:22 martin Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.107 2024/06/20 15:17:27 bouyer Exp $  */
 
 /*
- * Copyright (c) 2006 Manuel Bouyer.
+ * Copyright (c) 2006,2024 Manuel Bouyer.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.106 2024/06/19 09:43:22 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.107 2024/06/20 15:17:27 bouyer Exp $");
 
 #include 
 #include 
@@ -169,7 +169,7 @@ struct xbdback_io {
 			grant_ref_t xio_gref[VBD_MAX_INDIRECT_SEGMENTS];
 			/* grants release */
 			grant_handle_t xio_gh[VBD_MAX_INDIRECT_SEGMENTS];
-			bool xio_need_bounce; /* request is not contigous */
+			bool xio_need_bounce; /* request is not contiguous */
 		} xio_rw;
 	} u;
 };
@@ -200,9 +200,9 @@ struct xbdback_instance {
 	SLIST_HEAD(, xbdback_va) xbdi_va_free;
 	/* segments structure allocated in page-aligned chunks */
 	struct blkif_request_segment *xbdi_segs;
-	/* bounce buffer in case a transfer is not contigous */
+	/* bounce buffer in case a transfer is not contiguous */
 	vaddr_t xbdi_bouncebuf;
-	int xbdi_bouncebuf_use; /* is bounce buffer in use ? */
+	int xbdi_bouncebuf_use; /* is bounce buffer in use? */
 	/* backing device parameters */
 	dev_t xbdi_dev;
 	const struct bdevsw *xbdi_bdevsw; /* pointer to the device's bdevsw */
@@ -238,14 +238,14 @@ struct xbdback_instance {
 do {\
 	KASSERT(mutex_owned(>xbdi_lock));		\
 	(xbdip)->xbdi_refcnt++;	\
-} while (/* CONSTCOND */ 0)
+} while (0)
 
 #define xbdi_put(xbdip)		\
 do {\
 	KASSERT(mutex_owned(>xbdi_lock));		\
 	if (--((xbdip)->xbdi_refcnt) == 0)  			\
xbdback_finish_disconnect(xbdip);		\
-} while (/* CONSTCOND */ 0)
+} while (0)
 
 static SLIST_HEAD(, xbdback_instance) xbdback_instances;
 static kmutex_t xbdback_lock;
@@ -394,7 +394,8 @@ xbdback_xenbus_create(struct xenbus_devi
 	 * allocate page-aligned memory for segments, so that for each
 	 * xbdback_io its segments are in a single page.
 	 * sizeof(struct blkif_request_segment) * VBD_MAX_INDIRECT_SEGMENTS
-	 * is 128 so this helps us
+	 * is 128 so this helps us avoiding a page boundary withing a
+	 * block of VBD_MAX_INDIRECT_SEGMENTS segments.
 	 */
 	CTASSERT(sizeof(struct blkif_request_segment) * VBD_MAX_INDIRECT_SEGMENTS == 128);
 	xbdi->xbdi_segs = (void *)uvm_km_alloc(kernel_map, round_page(
@@ -1204,7 +1205,7 @@ xbdback_co_io(struct xbdback_instance *x
 			req->operation = rinn->indirect_op;
 			req->nr_segments = (uint8_t)rinn->nr_segments;
 			if (req->nr_segments > VBD_MAX_INDIRECT_SEGMENTS) {
-errstr = "too much indirect segments";
+errstr = "too many indirect segments";
 goto bad_segments;
 			}
 			in_gntref = rinn->indirect_grefs[0];
@@ -1212,7 +1213,7 @@ xbdback_co_io(struct xbdback_instance *x
 		} else {
 			req->nr_segments = reqn->nr_segments;
 			if (req->nr_segments > BLKIF_MAX_SEGMENTS_PER_REQUEST) {
-errstr = "too much segments";
+errstr = "too many segments";
 goto bad_segments;
 			}
 			for (i = 0; i < req->nr_segments; i++)
@@ -1229,7 +1230,7 @@ xbdback_co_io(struct xbdback_instance *x
 			req->operation = rin32->indirect_op;
 			req->nr_segments = (uint8_t)rin32->nr_segments;
 			if (req->nr_segments > VBD_MAX_INDIRECT_SEGMENTS) {
-errstr = "too much indirect segments";
+errstr = "too many indirect segments";
 goto bad_segments;
 			}
 			in_gntref = rin32->indirect_grefs[0];
@@ -1237,7 +1238,7 @@ xbdback_co_io(struct xbdback_instance *x
 		} else {
 			req->nr_segments = req32->nr_segments;
 			if (req->nr_segments > BLKIF_MAX_SEGMENTS_PER_REQUEST) {
-errstr = "too much segments";
+errstr = "too many segments";
 goto bad_segments;
 			}
 			for (i = 0; i < req->nr_segments; i++)
@@ -1253,7 +1254,7 @@ xbdback_co_io(struct xbdback_instance *x
 			rin64 = (blkif_x86_64_request_indirect_t *)req64;
 			req->nr_segments = (uint8_t)rin64->nr_segments;
 			if (req->nr_segments > VBD_MAX_INDIRECT_SEGMENTS) {
-errstr = "too much 

CVS commit: src/sys/arch/xen/xen

2024-06-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Jun 20 15:17:27 UTC 2024

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
Fix various cosmetic issues pointed out by Roland Illig. NFC.
While there add 2024 to copyright.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/xen/xen/xbdback_xenbus.c

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



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 11:02:17 UTC 2024

Modified Files:
src/sys/arch/x86/x86 [netbsd-10]: fpu.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #701):

sys/arch/x86/x86/fpu.c: revision 1.88

Workaround panic: fpudna from userland

i386 Xen PV domU get spurious fpudna traps from userland. Older eager FPU
contact switching code took care of ignoring them. When transitioning
from eager switching to awlays switching, this special handling was
removed, causing "fpudna from userland" panics.

This change restores the previosu behavior where fpudna traps from
userland are ignored on Xen PV domU.


To generate a diff of this commit:
cvs rdiff -u -r1.79.4.2 -r1.79.4.3 src/sys/arch/x86/x86/fpu.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/fpu.c
diff -u src/sys/arch/x86/x86/fpu.c:1.79.4.2 src/sys/arch/x86/x86/fpu.c:1.79.4.3
--- src/sys/arch/x86/x86/fpu.c:1.79.4.2	Tue Jul 25 11:41:42 2023
+++ src/sys/arch/x86/x86/fpu.c	Thu Jun 20 11:02:16 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.79.4.2 2023/07/25 11:41:42 martin Exp $	*/
+/*	$NetBSD: fpu.c,v 1.79.4.3 2024/06/20 11:02:16 martin Exp $	*/
 
 /*
  * Copyright (c) 2008, 2019 The NetBSD Foundation, Inc.  All
@@ -96,7 +96,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.79.4.2 2023/07/25 11:41:42 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.79.4.3 2024/06/20 11:02:16 martin Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -603,6 +603,15 @@ fputrap(struct trapframe *frame)
 void
 fpudna(struct trapframe *frame)
 {
+#ifdef XENPV
+	/*
+	 * Xen produes spurious fpudna traps, just do nothing.
+	 */
+	if (USERMODE(frame->tf_cs)) {
+		clts();
+		return;
+	} 
+#endif
 	panic("fpudna from %s, ip %p, trapframe %p",
 	USERMODE(frame->tf_cs) ? "userland" : "kernel",
 	(void *)X86_TF_RIP(frame), frame);



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 11:02:17 UTC 2024

Modified Files:
src/sys/arch/x86/x86 [netbsd-10]: fpu.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #701):

sys/arch/x86/x86/fpu.c: revision 1.88

Workaround panic: fpudna from userland

i386 Xen PV domU get spurious fpudna traps from userland. Older eager FPU
contact switching code took care of ignoring them. When transitioning
from eager switching to awlays switching, this special handling was
removed, causing "fpudna from userland" panics.

This change restores the previosu behavior where fpudna traps from
userland are ignored on Xen PV domU.


To generate a diff of this commit:
cvs rdiff -u -r1.79.4.2 -r1.79.4.3 src/sys/arch/x86/x86/fpu.c

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



CVS commit: [netbsd-10] src

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 11:00:07 UTC 2024

Modified Files:
src/distrib/sets/lists/man [netbsd-10]: mi
src/share/man/man4/man4.i386 [netbsd-10]: Makefile
src/share/man/man4/man4.x86 [netbsd-10]: Makefile
src/sys/arch/amd64/conf [netbsd-10]: ALL GENERIC
src/sys/arch/i386/conf [netbsd-10]: ALL GENERIC
src/sys/arch/x86/x86 [netbsd-10]: viac7temp.c
Added Files:
src/share/man/man4/man4.x86 [netbsd-10]: viac7temp.4
Removed Files:
src/share/man/man4/man4.i386 [netbsd-10]: viac7temp.4

Log Message:
Pull up following revision(s) (requested by andvar in ticket #700):

sys/arch/i386/conf/GENERIC: revision 1.1256
share/man/man4/man4.x86/viac7temp.4: revision 1.1
sys/arch/x86/x86/viac7temp.c: revision 1.11
share/man/man4/man4.x86/Makefile: revision 1.24
share/man/man4/man4.i386/viac7temp.4: file removal
share/man/man4/man4.i386/Makefile: revision 1.81
distrib/sets/lists/man/mi: revision 1.1773
sys/arch/amd64/conf/GENERIC: revision 1.612
sys/arch/amd64/conf/ALL: revision 1.188
sys/arch/i386/conf/ALL: revision 1.519

viac7temp(4): rewrite temperature sensor to read value from MSR instead of using
documented cpuid instruction and eax register.

This approach is adapted from linux via-cputemp.c, no official documentation is
currently available. However, msr value seems to work on all tested CPUs while
documented cpuid instruction typically reports 0, even for my C7-D CPU.
msr value seems to have temperature in Celsius in lower 24-bits without fraction
(thus "msr & 0xff;" is used).

Tested on my personal systems based on CPUs below (i386 and amd64):
C7-D 1.6GHz (i386 only), Nano X2 L4350E, Nano X2 U4300, U2300 Nano, KX-U6580.
Also got one response via email which was based on Nano X2 L4050 (VE-900).

Nano reports independent values for each core.

KX-U6580 seems to show the same value for all cores but more testing is needed.

Since it works on amd64 capable CPUs, adding driver to GENERIC kernel config.

Also moving viac7temp man page to x86 instead of i386 (with updates).

In theory the change should add support for all VIA Nano CPUs and Zhaoxin CPUs
 at least up to KX-6000(G) series.

In the future I may need to introduce amd64 kernel module as well.

Patch mainly reviewed by riastradh.


To generate a diff of this commit:
cvs rdiff -u -r1.1757.2.8 -r1.1757.2.9 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.80 -r1.80.2.1 src/share/man/man4/man4.i386/Makefile
cvs rdiff -u -r1.3 -r0 src/share/man/man4/man4.i386/viac7temp.4
cvs rdiff -u -r1.23 -r1.23.2.1 src/share/man/man4/man4.x86/Makefile
cvs rdiff -u -r0 -r1.1.2.2 src/share/man/man4/man4.x86/viac7temp.4
cvs rdiff -u -r1.174.4.2 -r1.174.4.3 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.599.4.5 -r1.599.4.6 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.503.4.2 -r1.503.4.3 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1243.2.3 -r1.1243.2.4 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/sys/arch/x86/x86/viac7temp.c

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



CVS commit: [netbsd-10] src

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 11:00:07 UTC 2024

Modified Files:
src/distrib/sets/lists/man [netbsd-10]: mi
src/share/man/man4/man4.i386 [netbsd-10]: Makefile
src/share/man/man4/man4.x86 [netbsd-10]: Makefile
src/sys/arch/amd64/conf [netbsd-10]: ALL GENERIC
src/sys/arch/i386/conf [netbsd-10]: ALL GENERIC
src/sys/arch/x86/x86 [netbsd-10]: viac7temp.c
Added Files:
src/share/man/man4/man4.x86 [netbsd-10]: viac7temp.4
Removed Files:
src/share/man/man4/man4.i386 [netbsd-10]: viac7temp.4

Log Message:
Pull up following revision(s) (requested by andvar in ticket #700):

sys/arch/i386/conf/GENERIC: revision 1.1256
share/man/man4/man4.x86/viac7temp.4: revision 1.1
sys/arch/x86/x86/viac7temp.c: revision 1.11
share/man/man4/man4.x86/Makefile: revision 1.24
share/man/man4/man4.i386/viac7temp.4: file removal
share/man/man4/man4.i386/Makefile: revision 1.81
distrib/sets/lists/man/mi: revision 1.1773
sys/arch/amd64/conf/GENERIC: revision 1.612
sys/arch/amd64/conf/ALL: revision 1.188
sys/arch/i386/conf/ALL: revision 1.519

viac7temp(4): rewrite temperature sensor to read value from MSR instead of using
documented cpuid instruction and eax register.

This approach is adapted from linux via-cputemp.c, no official documentation is
currently available. However, msr value seems to work on all tested CPUs while
documented cpuid instruction typically reports 0, even for my C7-D CPU.
msr value seems to have temperature in Celsius in lower 24-bits without fraction
(thus "msr & 0xff;" is used).

Tested on my personal systems based on CPUs below (i386 and amd64):
C7-D 1.6GHz (i386 only), Nano X2 L4350E, Nano X2 U4300, U2300 Nano, KX-U6580.
Also got one response via email which was based on Nano X2 L4050 (VE-900).

Nano reports independent values for each core.

KX-U6580 seems to show the same value for all cores but more testing is needed.

Since it works on amd64 capable CPUs, adding driver to GENERIC kernel config.

Also moving viac7temp man page to x86 instead of i386 (with updates).

In theory the change should add support for all VIA Nano CPUs and Zhaoxin CPUs
 at least up to KX-6000(G) series.

In the future I may need to introduce amd64 kernel module as well.

Patch mainly reviewed by riastradh.


To generate a diff of this commit:
cvs rdiff -u -r1.1757.2.8 -r1.1757.2.9 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.80 -r1.80.2.1 src/share/man/man4/man4.i386/Makefile
cvs rdiff -u -r1.3 -r0 src/share/man/man4/man4.i386/viac7temp.4
cvs rdiff -u -r1.23 -r1.23.2.1 src/share/man/man4/man4.x86/Makefile
cvs rdiff -u -r0 -r1.1.2.2 src/share/man/man4/man4.x86/viac7temp.4
cvs rdiff -u -r1.174.4.2 -r1.174.4.3 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.599.4.5 -r1.599.4.6 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.503.4.2 -r1.503.4.3 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1243.2.3 -r1.1243.2.4 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/sys/arch/x86/x86/viac7temp.c

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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1757.2.8 src/distrib/sets/lists/man/mi:1.1757.2.9
--- src/distrib/sets/lists/man/mi:1.1757.2.8	Sun Feb 25 15:47:59 2024
+++ src/distrib/sets/lists/man/mi	Thu Jun 20 11:00:06 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1757.2.8 2024/02/25 15:47:59 martin Exp $
+# $NetBSD: mi,v 1.1757.2.9 2024/06/20 11:00:06 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1338,7 +1338,7 @@
 ./usr/share/man/cat4/i386/spic.0		man-sys-catman		.cat
 ./usr/share/man/cat4/i386/vald.0		man-obsolete		obsolete
 ./usr/share/man/cat4/i386/vesafb.0		man-obsolete		obsolete
-./usr/share/man/cat4/i386/viac7temp.0		man-sys-catman		.cat
+./usr/share/man/cat4/i386/viac7temp.0		man-obsolete		obsolete
 ./usr/share/man/cat4/i4b.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i4bctl.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i4bipr.0			man-obsolete		obsolete
@@ -2156,6 +2156,7 @@
 ./usr/share/man/cat4/x86/tco.0			man-sys-catman		.cat
 ./usr/share/man/cat4/x86/tprof_amdpmi.0		man-obsolete		obsolete
 ./usr/share/man/cat4/x86/tprof_pmi.0		man-obsolete		obsolete
+./usr/share/man/cat4/x86/viac7temp.0		man-sys-catman		.cat
 ./usr/share/man/cat4/x86/vmt.0			man-obsolete		obsolete
 ./usr/share/man/cat4/x86/vmx.0			man-obsolete		obsolete
 ./usr/share/man/cat4/xbd.0			man-sys-catman		.cat
@@ -7930,7 +7931,7 @@
 ./usr/share/man/man4/i386/spic.4		man-sys-man		.man
 ./usr/share/man/man4/i386/vald.4		man-obsolete		obsolete
 ./usr/share/man/man4/i386/vesafb.4		man-obsolete		obsolete
-./usr/share/man/man4/i386/viac7temp.4		man-sys-man		.man
+./usr/share/man/man4/i386/viac7temp.4		man-obsolete		obsolete
 ./usr/share/man/man4/i4b.4			man-obsolete		obsolete
 

CVS commit: [netbsd-9] src/external/bsd/tre/dist/src

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 10:46:25 UTC 2024

Modified Files:
src/external/bsd/tre/dist/src [netbsd-9]: agrep.c

Log Message:
Pull up following revision(s) (requested by andvar in ticket #1845):

external/bsd/tre/dist/src/agrep.c: revision 1.5 (via patch)
external/bsd/tre/dist/src/agrep.c: revision 1.6

agrep(1): rewrite binary check introduced with recursive search on rev 1.3 to
match more closely grep(1) implementation. Instead of opening and scanning
full file every time, check for the \0 symbol once the file buffer is filled up
for the first time.

Patch fixes stdin, adds binary check for it as well, and works more efficiently
(at the cost of not scanning the full file).
Also original implementation forgot to add break if binary file is detected,
causing duplicate binary matches in the output result.

Due to full file scans on each match instead of once for the specific file,
scans may have been considerably slow.

Fixes PR bin/53513

Thanks for the help from mlelstv and dh in reviewing and finalizing the patch.
agrep(1): remove duplicated and obsolete imports.
dirent import is the only one which stays in the odd location.

Part of PR bin/53513.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.18.1 src/external/bsd/tre/dist/src/agrep.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/external/bsd/tre/dist/src

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 10:46:25 UTC 2024

Modified Files:
src/external/bsd/tre/dist/src [netbsd-9]: agrep.c

Log Message:
Pull up following revision(s) (requested by andvar in ticket #1845):

external/bsd/tre/dist/src/agrep.c: revision 1.5 (via patch)
external/bsd/tre/dist/src/agrep.c: revision 1.6

agrep(1): rewrite binary check introduced with recursive search on rev 1.3 to
match more closely grep(1) implementation. Instead of opening and scanning
full file every time, check for the \0 symbol once the file buffer is filled up
for the first time.

Patch fixes stdin, adds binary check for it as well, and works more efficiently
(at the cost of not scanning the full file).
Also original implementation forgot to add break if binary file is detected,
causing duplicate binary matches in the output result.

Due to full file scans on each match instead of once for the specific file,
scans may have been considerably slow.

Fixes PR bin/53513

Thanks for the help from mlelstv and dh in reviewing and finalizing the patch.
agrep(1): remove duplicated and obsolete imports.
dirent import is the only one which stays in the odd location.

Part of PR bin/53513.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.18.1 src/external/bsd/tre/dist/src/agrep.c

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

Modified files:

Index: src/external/bsd/tre/dist/src/agrep.c
diff -u src/external/bsd/tre/dist/src/agrep.c:1.3 src/external/bsd/tre/dist/src/agrep.c:1.3.18.1
--- src/external/bsd/tre/dist/src/agrep.c:1.3	Fri Jun 10 05:11:18 2016
+++ src/external/bsd/tre/dist/src/agrep.c	Thu Jun 20 10:46:25 2024
@@ -179,6 +179,7 @@ static int next_delim_len; /* Length of 
 static int delim_after = 1;/* If true, print the delimiter after the record. */
 static int at_eof;
 static int have_matches;   /* If true, matches have been found. */
+static int is_binary;  /* -1 unknown, 0 ascii, 1 binary */
 
 static int invert_match;   /* Show only non-matching records. */
 static int print_filename; /* Output filename. */
@@ -200,6 +201,12 @@ static regaparams_t match_params;
environment variable GREP_COLOR overrides this default value. */
 static const char *highlight = "01;31";
 
+static int
+isbinaryfile(void)
+{
+	return buf != NULL && memchr(buf, '\0', data_len) != NULL;
+}
+
 /* Sets `record' to the next complete record from file `fd', and `record_len'
to the length of the record.	 Returns 1 when there are no more records,
0 otherwise. */
@@ -262,6 +269,9 @@ tre_agrep_get_next_record(int fd, const 
 	}
 	  data_len += r;
 	  next_record = buf;
+
+	  if (is_binary < 0)
+	is_binary = isbinaryfile();
 	}
 
   /* Find the next record delimiter. */
@@ -310,43 +320,8 @@ tre_agrep_get_next_record(int fd, const 
 }
 }
 
-#include 
-#include 
-#include 
-
 #include 
 
-static int
-isbinaryfile(const char *filename)
-{
-	struct stat	 st;
-	size_t		 size;
-	size_t		 i;
-	char		*mapped;
-	FILE		*fp;
-	int		 isbin;
-
-	if ((fp = fopen(filename, "r")) == NULL) {
-		return 1;
-	}
-	fstat(fileno(fp), );
-	isbin = 0;
-	if ((st.st_mode & S_IFMT) != S_IFREG) {
-		isbin = 1;
-	} else {
-		size = (size_t)st.st_size;
-		mapped = mmap(NULL, size, PROT_READ, MAP_SHARED, fileno(fp), 0);
-		for (i = 0 ; !isbin && i < size ; i++) {
-			if (mapped[i] == 0x0) {
-isbin = 1;
-			}
-		}
-		munmap(mapped, size);
-	}
-	fclose(fp);
-	return isbin;
-}
-
 static int tre_agrep_handle_file(const char */*filename*/);
 
 static int
@@ -394,6 +369,8 @@ tre_agrep_handle_file(const char *filena
   int count = 0;
   int recnum = 0;
 
+  is_binary = -1;
+
   /* Allocate the initial buffer. */
   if (buf == NULL)
 {
@@ -484,10 +461,12 @@ tre_agrep_handle_file(const char *filena
 	  printf("%s\n", filename);
 	  break;
 	}
-	  else if (!count_matches && isbinaryfile(filename))
+	  else if (!count_matches && is_binary > 0)
 	{
 	  if (print_filename)
-		printf("Binary file %s matches\n", filename);
+		printf("%s:", filename);
+	  printf("Binary file matches\n");
+	  break;
 	}
 	  else if (!count_matches)
 	{



CVS commit: [netbsd-10] src/external/bsd/tre/dist/src

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 10:43:49 UTC 2024

Modified Files:
src/external/bsd/tre/dist/src [netbsd-10]: agrep.c

Log Message:
Pull up following revision(s) (requested by andvar in ticket #699):

external/bsd/tre/dist/src/agrep.c: revision 1.5
external/bsd/tre/dist/src/agrep.c: revision 1.6

agrep(1): rewrite binary check introduced with recursive search on rev 1.3 to
match more closely grep(1) implementation. Instead of opening and scanning
full file every time, check for the \0 symbol once the file buffer is filled up
for the first time.

Patch fixes stdin, adds binary check for it as well, and works more efficiently
(at the cost of not scanning the full file).
Also original implementation forgot to add break if binary file is detected,
causing duplicate binary matches in the output result.

Due to full file scans on each match instead of once for the specific file,
scans may have been considerably slow.

Fixes PR bin/53513

Thanks for the help from mlelstv and dh in reviewing and finalizing the patch.
agrep(1): remove duplicated and obsolete imports.
dirent import is the only one which stays in the odd location.

Part of PR bin/53513.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.6.1 src/external/bsd/tre/dist/src/agrep.c

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

Modified files:

Index: src/external/bsd/tre/dist/src/agrep.c
diff -u src/external/bsd/tre/dist/src/agrep.c:1.4 src/external/bsd/tre/dist/src/agrep.c:1.4.6.1
--- src/external/bsd/tre/dist/src/agrep.c:1.4	Thu Aug 20 15:54:11 2020
+++ src/external/bsd/tre/dist/src/agrep.c	Thu Jun 20 10:43:49 2024
@@ -179,6 +179,7 @@ static int next_delim_len; /* Length of 
 static int delim_after = 1;/* If true, print the delimiter after the record. */
 static int at_eof;
 static int have_matches;   /* If true, matches have been found. */
+static int is_binary;  /* -1 unknown, 0 ascii, 1 binary */
 
 static int invert_match;   /* Show only non-matching records. */
 static int print_filename; /* Output filename. */
@@ -200,6 +201,12 @@ static regaparams_t match_params;
environment variable GREP_COLOR overrides this default value. */
 static const char *highlight = "01;31";
 
+static int
+isbinaryfile(void)
+{
+	return buf != NULL && memchr(buf, '\0', data_len) != NULL;
+}
+
 /* Sets `record' to the next complete record from file `fd', and `record_len'
to the length of the record.	 Returns 1 when there are no more records,
0 otherwise. */
@@ -262,6 +269,9 @@ tre_agrep_get_next_record(int fd, const 
 	}
 	  data_len += r;
 	  next_record = buf;
+
+	  if (is_binary < 0)
+	is_binary = isbinaryfile();
 	}
 
   /* Find the next record delimiter. */
@@ -310,47 +320,8 @@ tre_agrep_get_next_record(int fd, const 
 }
 }
 
-#include 
-#include 
-#include 
-
 #include 
 
-static int
-isbinaryfile(const char *filename)
-{
-	struct stat	 st;
-	size_t		 size;
-	size_t		 i;
-	char		*mapped;
-	FILE		*fp;
-	int		 isbin;
-
-	if ((fp = fopen(filename, "r")) == NULL) {
-		return 1;
-	}
-	fstat(fileno(fp), );
-	isbin = 0;
-	if ((st.st_mode & S_IFMT) != S_IFREG) {
-		isbin = 1;
-	} else {
-		size = (size_t)st.st_size;
-		mapped = mmap(NULL, size, PROT_READ, MAP_SHARED, fileno(fp), 0);
-		if (mapped == MAP_FAILED) {
-			fclose(fp);
-			return 1;
-		}
-		for (i = 0 ; !isbin && i < size ; i++) {
-			if (mapped[i] == 0x0) {
-isbin = 1;
-			}
-		}
-		munmap(mapped, size);
-	}
-	fclose(fp);
-	return isbin;
-}
-
 static int tre_agrep_handle_file(const char */*filename*/);
 
 static int
@@ -398,6 +369,8 @@ tre_agrep_handle_file(const char *filena
   int count = 0;
   int recnum = 0;
 
+  is_binary = -1;
+
   /* Allocate the initial buffer. */
   if (buf == NULL)
 {
@@ -488,10 +461,12 @@ tre_agrep_handle_file(const char *filena
 	  printf("%s\n", filename);
 	  break;
 	}
-	  else if (!count_matches && isbinaryfile(filename))
+	  else if (!count_matches && is_binary > 0)
 	{
 	  if (print_filename)
-		printf("Binary file %s matches\n", filename);
+		printf("%s:", filename);
+	  printf("Binary file matches\n");
+	  break;
 	}
 	  else if (!count_matches)
 	{



CVS commit: [netbsd-10] src/external/bsd/tre/dist/src

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 10:43:49 UTC 2024

Modified Files:
src/external/bsd/tre/dist/src [netbsd-10]: agrep.c

Log Message:
Pull up following revision(s) (requested by andvar in ticket #699):

external/bsd/tre/dist/src/agrep.c: revision 1.5
external/bsd/tre/dist/src/agrep.c: revision 1.6

agrep(1): rewrite binary check introduced with recursive search on rev 1.3 to
match more closely grep(1) implementation. Instead of opening and scanning
full file every time, check for the \0 symbol once the file buffer is filled up
for the first time.

Patch fixes stdin, adds binary check for it as well, and works more efficiently
(at the cost of not scanning the full file).
Also original implementation forgot to add break if binary file is detected,
causing duplicate binary matches in the output result.

Due to full file scans on each match instead of once for the specific file,
scans may have been considerably slow.

Fixes PR bin/53513

Thanks for the help from mlelstv and dh in reviewing and finalizing the patch.
agrep(1): remove duplicated and obsolete imports.
dirent import is the only one which stays in the odd location.

Part of PR bin/53513.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.6.1 src/external/bsd/tre/dist/src/agrep.c

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