CVS commit: src/share/misc

2023-10-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Oct  2 00:16:42 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
acronyms.comp: SFP -- Small Form-factor Pluggable


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/share/misc/acronyms.comp

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



CVS commit: src/share/misc

2023-10-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Oct  2 00:16:42 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
acronyms.comp: SFP -- Small Form-factor Pluggable


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.370 src/share/misc/acronyms.comp:1.371
--- src/share/misc/acronyms.comp:1.370	Sat Sep 30 13:26:31 2023
+++ src/share/misc/acronyms.comp	Mon Oct  2 00:16:42 2023
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.370 2023/09/30 13:26:31 riastradh Exp $
+$NetBSD: acronyms.comp,v 1.371 2023/10/02 00:16:42 riastradh Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1526,6 +1526,7 @@ SES	SCSI enclosure services
 SFC	sequential function chart
 SFI	simple firmware interface
 SFI	software fault isolation
+SFP	small form-factor pluggable
 SFTP	SSH File Transfer Protocol
 SFTP	Serial File Transfer Protocol
 SFTP	Simple File Transfer Protocol



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

2023-10-01 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Oct  2 00:02:34 UTC 2023

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Fix build with -DNO_GPT


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/i386/stand/lib/biosdisk.c

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



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

2023-10-01 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Oct  2 00:02:34 UTC 2023

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Fix build with -DNO_GPT


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/i386/stand/lib/biosdisk.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/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.59 src/sys/arch/i386/stand/lib/biosdisk.c:1.60
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.59	Thu Sep 28 15:46:55 2023
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Mon Oct  2 00:02:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.59 2023/09/28 15:46:55 manu Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.60 2023/10/02 00:02:33 manu Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -328,7 +328,6 @@ guid_is_equal(const struct uuid *a, cons
 	return (memcmp(a, b, sizeof(*a)) == 0 ? true : false);
 }
 
-#ifndef NO_GPT
 static void
 part_name_utf8(const uint16_t *utf16_src, size_t utf16_srclen,
 	   char *utf8_dst, size_t utf8_dstlen)
@@ -351,7 +350,6 @@ part_name_utf8(const uint16_t *utf16_src
 
 	return;
 }
-#endif
 
 static int
 check_gpt(struct biosdisk *d, daddr_t rf_offset, daddr_t sector)
@@ -1562,14 +1560,17 @@ next_disk:
 			if (d->part[part].fstype == FS_UNUSED)
 continue;
 
+#ifndef NO_GPT
 			if (first_bootme == -1 &&
 			d->part[part].attr & GPT_ENT_ATTR_BOOTME)
 first_bootme = part;
+#endif
 
 			if (first_ffs == -1 &&
 			(d->part[part].fstype == FS_BSDFFS ||
 			 d->part[part].fstype == FS_BSDLFS))
 first_ffs = part;
+
 			if (part == target_part) {
 *biosdev = raidframe[i].biosdev;
 *offset = raidframe[i].offset



CVS commit: src/sys/arch/mac68k/mac68k

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 21:04:10 UTC 2023

Modified Files:
src/sys/arch/mac68k/mac68k: vectors.s

Log Message:
remove unncessary leading space in #ifdef FPSP block.
remove one trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/mac68k/mac68k/vectors.s

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/mac68k/vectors.s
diff -u src/sys/arch/mac68k/mac68k/vectors.s:1.17 src/sys/arch/mac68k/mac68k/vectors.s:1.18
--- src/sys/arch/mac68k/mac68k/vectors.s:1.17	Tue Feb  8 20:20:18 2011
+++ src/sys/arch/mac68k/mac68k/vectors.s	Sun Oct  1 21:04:10 2023
@@ -1,4 +1,4 @@
-|	$NetBSD: vectors.s,v 1.17 2011/02/08 20:20:18 rmind Exp $
+|	$NetBSD: vectors.s,v 1.18 2023/10/01 21:04:10 andvar Exp $
 
 | Copyright (c) 1988 University of Utah
 | Copyright (c) 1990 Regents of the University of California.
@@ -89,7 +89,7 @@ GLOBAL(vectab)
 #ifdef COMPAT_16
 	VECTOR(trap3)		/* 35: compat_16_sigreturn */
 #else
-	VECTOR(illinst)	
+	VECTOR(illinst)
 #endif
 	VECTOR(illinst)		/* 36: TRAP instruction vector */
 	VECTOR(illinst)		/* 37: TRAP instruction vector */
@@ -104,21 +104,21 @@ GLOBAL(vectab)
 	VECTOR(illinst)		/* 46: TRAP instruction vector */
 	VECTOR(trap15)		/* 47: TRAP instruction vector */
 #ifdef FPSP
- 	ASVECTOR(bsun)		/* 48: FPCP branch/set on unordered cond */
- 	ASVECTOR(inex)		/* 49: FPCP inexact result */
- 	ASVECTOR(dz)		/* 50: FPCP divide by zero */
- 	ASVECTOR(unfl)		/* 51: FPCP underflow */
- 	ASVECTOR(operr)		/* 52: FPCP operand error */
- 	ASVECTOR(ovfl)		/* 53: FPCP overflow */
- 	ASVECTOR(snan)		/* 54: FPCP signalling NAN */
+	ASVECTOR(bsun)		/* 48: FPCP branch/set on unordered cond */
+	ASVECTOR(inex)		/* 49: FPCP inexact result */
+	ASVECTOR(dz)		/* 50: FPCP divide by zero */
+	ASVECTOR(unfl)		/* 51: FPCP underflow */
+	ASVECTOR(operr)		/* 52: FPCP operand error */
+	ASVECTOR(ovfl)		/* 53: FPCP overflow */
+	ASVECTOR(snan)		/* 54: FPCP signalling NAN */
 #else
- 	VECTOR(fpfault)		/* 48: FPCP branch/set on unordered cond */
- 	VECTOR(fpfault)		/* 49: FPCP inexact result */
- 	VECTOR(fpfault)		/* 50: FPCP divide by zero */
- 	VECTOR(fpfault)		/* 51: FPCP underflow */
- 	VECTOR(fpfault)		/* 52: FPCP operand error */
- 	VECTOR(fpfault)		/* 53: FPCP overflow */
- 	VECTOR(fpfault)		/* 54: FPCP signalling NAN */
+	VECTOR(fpfault)		/* 48: FPCP branch/set on unordered cond */
+	VECTOR(fpfault)		/* 49: FPCP inexact result */
+	VECTOR(fpfault)		/* 50: FPCP divide by zero */
+	VECTOR(fpfault)		/* 51: FPCP underflow */
+	VECTOR(fpfault)		/* 52: FPCP operand error */
+	VECTOR(fpfault)		/* 53: FPCP overflow */
+	VECTOR(fpfault)		/* 54: FPCP signalling NAN */
 #endif
 	VECTOR(fpunsupp)	/* 55: FPCP unimplemented data type */
 	VECTOR(badtrap)		/* 56: unassigned, reserved */



CVS commit: src/sys/arch/mac68k/mac68k

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 21:04:10 UTC 2023

Modified Files:
src/sys/arch/mac68k/mac68k: vectors.s

Log Message:
remove unncessary leading space in #ifdef FPSP block.
remove one trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/mac68k/mac68k/vectors.s

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



Re: CVS commit: src/sys/arch/news68k/conf

2023-10-01 Thread Andrius V
In this case maybe I should remove all FPSP references (vectors.S,
locore.S, Makefile.news68k (MD_LIBS={FPSP})?

On Sun, Oct 1, 2023 at 10:08 PM Izumi Tsutsui  wrote:
>
> > Module Name:  src
> > Committed By: andvar
> > Date: Sun Oct  1 18:50:53 UTC 2023
> >
> > Modified Files:
> >   src/sys/arch/news68k/conf: Makefile.news68k
> >
> > Log Message:
> > include fpsp Makefile.inc in Makefile.news68k, same as other m68k ports.
> >
> > needed for FPSP option to build, otherwise FPSP specific vectors are 
> > undefined.
>
> FPSP is neccesary only for 68040 (and 68060) and
> there is no 040 NEWS machines. That's the reason
> why news68k doesn't include fpsp.
>
> ---
> Izumi Tsutsui


CVS commit: src/sys/arch/news68k

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 19:28:36 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: files.news68k
src/sys/arch/news68k/news68k: trap.c

Log Message:
Improve KGDB enabled build for news68k:
* include sys/kgdb.h in news68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c for kgdb_trap() implementation.

Same as for mvme68k, build complains about undefined reference to zs_check_kgdb
due to missing port specific zs kgdb implementation for MI zs(4) driver though.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/news68k/news68k/trap.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/news68k/conf/files.news68k
diff -u src/sys/arch/news68k/conf/files.news68k:1.35 src/sys/arch/news68k/conf/files.news68k:1.36
--- src/sys/arch/news68k/conf/files.news68k:1.35	Mon Feb 18 01:12:24 2019
+++ src/sys/arch/news68k/conf/files.news68k	Sun Oct  1 19:28:36 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: files.news68k,v 1.35 2019/02/18 01:12:24 thorpej Exp $
+#	$NetBSD: files.news68k,v 1.36 2023/10/01 19:28:36 andvar Exp $
 
 #	NEWS68K-specific configuration info
 
@@ -23,6 +23,7 @@ file	arch/news68k/news68k/romcalls.S
 file	arch/news68k/news68k/trap.c
 file	arch/m68k/m68k/cacheops.c
 file	arch/m68k/m68k/db_memrw.c		ddb | kgdb
+file	arch/m68k/m68k/kgdb_machdep.c		kgdb
 file	arch/m68k/m68k/m68k_trap.c
 file	arch/m68k/m68k/pmap_motorola.c
 file	arch/m68k/m68k/procfs_machdep.c		procfs

Index: src/sys/arch/news68k/news68k/trap.c
diff -u src/sys/arch/news68k/news68k/trap.c:1.74 src/sys/arch/news68k/news68k/trap.c:1.75
--- src/sys/arch/news68k/news68k/trap.c:1.74	Sat Apr 22 10:09:12 2023
+++ src/sys/arch/news68k/news68k/trap.c	Sun Oct  1 19:28:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.74 2023/04/22 10:09:12 tsutsui Exp $	*/
+/*	$NetBSD: trap.c,v 1.75 2023/10/01 19:28:36 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.74 2023/04/22 10:09:12 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.75 2023/10/01 19:28:36 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.7
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -281,7 +282,7 @@ trap(struct frame *fp, int type, u_int c
 		s = splhigh();
 #ifdef KGDB
 		/* If connected, step or cont returns 1 */
-		if (kgdb_trap(type, fp))
+		if (kgdb_trap(type, (db_regs_t *)fp))
 			goto kgdb_cont;
 #endif
 #ifdef DDB



CVS commit: src/sys/arch/news68k

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 19:28:36 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: files.news68k
src/sys/arch/news68k/news68k: trap.c

Log Message:
Improve KGDB enabled build for news68k:
* include sys/kgdb.h in news68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c for kgdb_trap() implementation.

Same as for mvme68k, build complains about undefined reference to zs_check_kgdb
due to missing port specific zs kgdb implementation for MI zs(4) driver though.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/news68k/news68k/trap.c

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



Re: CVS commit: src/sys/arch/news68k/conf

2023-10-01 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: andvar
> Date: Sun Oct  1 18:50:53 UTC 2023
> 
> Modified Files:
>   src/sys/arch/news68k/conf: Makefile.news68k
> 
> Log Message:
> include fpsp Makefile.inc in Makefile.news68k, same as other m68k ports.
> 
> needed for FPSP option to build, otherwise FPSP specific vectors are 
> undefined.

FPSP is neccesary only for 68040 (and 68060) and
there is no 040 NEWS machines. That's the reason
why news68k doesn't include fpsp.

---
Izumi Tsutsui


CVS commit: src/sys/arch/news68k/conf

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 18:50:53 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: Makefile.news68k

Log Message:
include fpsp Makefile.inc in Makefile.news68k, same as other m68k ports.

needed for FPSP option to build, otherwise FPSP specific vectors are undefined.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/conf/Makefile.news68k

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/news68k/conf/Makefile.news68k
diff -u src/sys/arch/news68k/conf/Makefile.news68k:1.22 src/sys/arch/news68k/conf/Makefile.news68k:1.23
--- src/sys/arch/news68k/conf/Makefile.news68k:1.22	Sat Sep 22 12:24:02 2018
+++ src/sys/arch/news68k/conf/Makefile.news68k	Sun Oct  1 18:50:53 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.news68k,v 1.22 2018/09/22 12:24:02 rin Exp $
+#	$NetBSD: Makefile.news68k,v 1.23 2023/10/01 18:50:53 andvar Exp $
 #
 # Makefile for NetBSD
 #
@@ -46,6 +46,9 @@ OPT_MODULAR=	%MODULAR%
 ##
 ## (4) local objects, compile rules, and dependencies
 ##
+# for the Motorola 68040 Floating Point Software Product
+.include "$S/arch/m68k/fpsp/Makefile.inc"
+
 MD_OBJS=	locore.o
 MD_LIBS=	${FPSP}
 MD_CFILES=



CVS commit: src/sys/arch/news68k/conf

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 18:50:53 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: Makefile.news68k

Log Message:
include fpsp Makefile.inc in Makefile.news68k, same as other m68k ports.

needed for FPSP option to build, otherwise FPSP specific vectors are undefined.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/conf/Makefile.news68k

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



CVS commit: src/sys/dev/audio

2023-10-01 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Oct  1 09:34:29 UTC 2023

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

Log Message:
Fix output for big-endian hardware.
Also optimize the output scaling routine.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/dev/audio/audio.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/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.144 src/sys/dev/audio/audio.c:1.145
--- src/sys/dev/audio/audio.c:1.144	Mon Jun  5 16:26:05 2023
+++ src/sys/dev/audio/audio.c	Sun Oct  1 09:34:28 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.144 2023/06/05 16:26:05 mlelstv Exp $	*/
+/*	$NetBSD: audio.c,v 1.145 2023/10/01 09:34:28 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -181,7 +181,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.144 2023/06/05 16:26:05 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.145 2023/10/01 09:34:28 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -9222,7 +9222,6 @@ audio_mixsample_to_linear(audio_filter_a
 	const aint2_t *m;
 	uint8_t *p;
 	u_int sample_count;
-	bool swap;
 	aint2_t v, xor;
 	u_int i, bps;
 	bool little;
@@ -9235,48 +9234,150 @@ audio_mixsample_to_linear(audio_filter_a
 	m = arg->src;
 	p = arg->dst;
 	sample_count = arg->count * fmt->channels;
-	swap = arg->dstfmt->encoding == AUDIO_ENCODING_SLINEAR_OE;
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-	little = !swap;
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
-	little = swap;
-#endif
+	little = arg->dstfmt->encoding == AUDIO_ENCODING_SLINEAR_LE;
 
 	bps = fmt->stride / NBBY;
+	xor = audio_format2_is_signed(fmt) ? 0 : (aint2_t)1 << 31;
 
-	xor = audio_format2_is_signed(fmt)
-	   ? 0 : 1 << (fmt->stride - 1);
-
-	for (i=0; i>= (4 - bps) * NBBY;
-
-		/* signed -> unsigned */
-		v ^= xor;
-
-		if (little) {
-			switch (bps) {
-			case 4: *p++ = v; v >>= 8; /* FALLTHROUGH */
-			case 3: *p++ = v; v >>= 8; /* FALLTHROUGH */
-			case 2: *p++ = v; v >>= 8; /* FALLTHROUGH */
-			case 1: *p++ = v; /* FALLTHROUGH */
+#if AUDIO_INTERNAL_BITS == 16
+	if (little) {
+		switch (bps) {
+		case 4:
+			for (i=0; i> 8;
 			}
-		} else {
-			switch (bps) {
-			case 4: *p++ = v >> 24; v <<= 8; /* FALLTHROUGH */
-			case 3: *p++ = v >> 24; v <<= 8; /* FALLTHROUGH */
-			case 2: *p++ = v >> 24; v <<= 8; /* FALLTHROUGH */
-			case 1: *p++ = v >> 24; /* FALLTHROUGH */
+			break;
+		case 3:
+			for (i=0; i> 8;
+			}
+			break;
+		case 2:
+			for (i=0; i> 8;
+			}
+			break;
+		case 1:
+			for (i=0; i> 8;
+			}
+			break;
+		}
+	} else {
+		switch (bps) {
+		case 4:
+			for (i=0; i> 8;
+*p++ = v;
+*p++ = 0;
+*p++ = 0;
+			}
+			break;
+		case 3:
+			for (i=0; i> 8;
+*p++ = v;
+*p++ = 0;
+			}
+			break;
+		case 2:
+			for (i=0; i> 8;
+*p++ = v;
+			}
+			break;
+		case 1:
+			for (i=0; i> 8;
+			}
+			break;
+		}
+	}
+#elif AUDIO_INTERNAL_BITS == 32
+	if (little) {
+		switch (bps) {
+		case 4:
+			for (i=0; i> 8;
+*p++ = v >> 16;
+*p++ = v >> 24;
+			}
+			break;
+		case 3:
+			for (i=0; i> 8;
+*p++ = v >> 16;
+*p++ = v >> 24;
+			}
+			break;
+		case 2:
+			for (i=0; i> 16;
+*p++ = v >> 24;
+			}
+			break;
+		case 1:
+			for (i=0; i> 24;
+			}
+			break;
+		}
+	} else {
+		switch (bps) {
+		case 4:
+			for (i=0; i> 24;
+*p++ = v >> 16;
+*p++ = v >> 8;
+*p++ = v;
+			}
+			break;
+		case 3:
+			for (i=0; i> 24;
+*p++ = v >> 16;
+*p++ = v >> 8;
+			}
+			break;
+		case 2:
+			for (i=0; i> 24;
+*p++ = v >> 16;
 			}
+			break;
+		case 1:
+			for (i=0; i> 24;
+			}
+			break;
 		}
 	}
-}
+#endif /* AUDIO_INTERNAL_BITS */
 
+}
 
 #endif /* NAUDIO > 0 */
 



CVS commit: src/sys/dev/audio

2023-10-01 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Oct  1 09:34:29 UTC 2023

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

Log Message:
Fix output for big-endian hardware.
Also optimize the output scaling routine.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/dev/audio/audio.c

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



CVS commit: src/sys/dev/usb

2023-10-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct  1 06:55:27 UTC 2023

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

Log Message:
Apply the new diff from

kern/55273 urndis(4) error "could not find data bulk in/out" without CDC union 
descriptor

Fallback to the interface association descriptor if  no CDC Union Descriptor is
found.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/usb/if_urndis.c

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



CVS commit: src/sys/dev/usb

2023-10-01 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct  1 06:55:27 UTC 2023

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

Log Message:
Apply the new diff from

kern/55273 urndis(4) error "could not find data bulk in/out" without CDC union 
descriptor

Fallback to the interface association descriptor if  no CDC Union Descriptor is
found.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/usb/if_urndis.c

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

Modified files:

Index: src/sys/dev/usb/if_urndis.c
diff -u src/sys/dev/usb/if_urndis.c:1.48 src/sys/dev/usb/if_urndis.c:1.49
--- src/sys/dev/usb/if_urndis.c:1.48	Sat Feb 11 22:42:49 2023
+++ src/sys/dev/usb/if_urndis.c	Sun Oct  1 06:55:27 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urndis.c,v 1.48 2023/02/11 22:42:49 nia Exp $ */
+/*	$NetBSD: if_urndis.c,v 1.49 2023/10/01 06:55:27 skrll Exp $ */
 /*	$OpenBSD: if_urndis.c,v 1.31 2011/07/03 15:47:17 matthew Exp $ */
 
 /*
@@ -21,7 +21,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.48 2023/02/11 22:42:49 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.49 2023/10/01 06:55:27 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -901,8 +901,9 @@ urndis_attach(device_t parent, device_t 
 	struct usbd_interface		*iface_ctl;
 	const usb_cdc_union_descriptor_t *ud;
 	const usb_cdc_header_descriptor_t *desc;
+	const usb_interface_assoc_descriptor_t *ad;
 	usbd_desc_iter_t		 iter;
-	int if_ctl, if_data;
+	int if_ctl, if_data, if_data_ia;
 	int i, j, altcnt;
 	void*buf;
 	size_t bufsz;
@@ -934,10 +935,23 @@ urndis_attach(device_t parent, device_t 
 	if_ctl = id->bInterfaceNumber;
 	sc->sc_ifaceno_ctl = if_ctl;
 	if_data = -1;
+	if_data_ia = -1;
 
+	/*
+	 * Use a matching Interface Association Descriptor
+	 * as a fallback if no CDC Union Descriptor is found.
+	 */
 	usb_desc_iter_init(un->un_udev, );
 	while ((desc = (const void *)usb_desc_iter_next()) != NULL) {
-
+		if (desc->bDescriptorType == UDESC_INTERFACE_ASSOC) {
+			if (desc->bLength < sizeof(*ad))
+continue;
+			ad = (const usb_interface_assoc_descriptor_t *)desc;
+			if (ad->bFirstInterface == if_ctl &&
+			ad->bInterfaceCount > 1)
+if_data_ia = if_ctl + 1;
+			continue;
+		}
 		if (desc->bDescriptorType != UDESC_CS_INTERFACE) {
 			continue;
 		}
@@ -950,6 +964,8 @@ urndis_attach(device_t parent, device_t 
 			break;
 		}
 	}
+	if (if_data == -1 && if_data_ia != -1)
+		if_data = if_data_ia;
 
 	if (if_data == -1) {
 		DPRINTF(("urndis_attach: no union interface\n"));



CVS commit: othersrc/libexec/tnftpd

2023-10-01 Thread Luke Mewburn
Module Name:othersrc
Committed By:   lukem
Date:   Sun Oct  1 06:15:30 UTC 2023

Modified Files:
othersrc/libexec/tnftpd: ChangeLog NEWS configure configure.ac

Log Message:
tnftpd 20231001 release

Changes since tnftpd 20200704
* Security fixes to improve error handling when switching UID/GID,
  and to prevent MLSD and MLST before authentication succeeds.
* Fix buffer overflows when counting users, and when authenticating
  using PAM.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 othersrc/libexec/tnftpd/ChangeLog
cvs rdiff -u -r1.17 -r1.18 othersrc/libexec/tnftpd/NEWS
cvs rdiff -u -r1.56 -r1.57 othersrc/libexec/tnftpd/configure
cvs rdiff -u -r1.55 -r1.56 othersrc/libexec/tnftpd/configure.ac

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



CVS commit: othersrc/libexec/tnftpd

2023-10-01 Thread Luke Mewburn
Module Name:othersrc
Committed By:   lukem
Date:   Sun Oct  1 06:15:30 UTC 2023

Modified Files:
othersrc/libexec/tnftpd: ChangeLog NEWS configure configure.ac

Log Message:
tnftpd 20231001 release

Changes since tnftpd 20200704
* Security fixes to improve error handling when switching UID/GID,
  and to prevent MLSD and MLST before authentication succeeds.
* Fix buffer overflows when counting users, and when authenticating
  using PAM.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 othersrc/libexec/tnftpd/ChangeLog
cvs rdiff -u -r1.17 -r1.18 othersrc/libexec/tnftpd/NEWS
cvs rdiff -u -r1.56 -r1.57 othersrc/libexec/tnftpd/configure
cvs rdiff -u -r1.55 -r1.56 othersrc/libexec/tnftpd/configure.ac

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

Modified files:

Index: othersrc/libexec/tnftpd/ChangeLog
diff -u othersrc/libexec/tnftpd/ChangeLog:1.67 othersrc/libexec/tnftpd/ChangeLog:1.68
--- othersrc/libexec/tnftpd/ChangeLog:1.67	Sun Oct  1 03:10:51 2023
+++ othersrc/libexec/tnftpd/ChangeLog	Sun Oct  1 06:15:30 2023
@@ -1,6 +1,9 @@
-$NetBSD: ChangeLog,v 1.67 2023/10/01 03:10:51 lukem Exp $
+$NetBSD: ChangeLog,v 1.68 2023/10/01 06:15:30 lukem Exp $
 
-Sun Oct  1 01:49:23 UTC 2023	lu...@netbsd.org
+
+Sun Oct  1 05:57:14 UTC 2023	lu...@netbsd.org
+
+	* Release as "tnftpd 20231001".
 
 	* Always use $YACC even without --enable-maintainer-mode.
 

Index: othersrc/libexec/tnftpd/NEWS
diff -u othersrc/libexec/tnftpd/NEWS:1.17 othersrc/libexec/tnftpd/NEWS:1.18
--- othersrc/libexec/tnftpd/NEWS:1.17	Sun Oct  1 02:09:12 2023
+++ othersrc/libexec/tnftpd/NEWS	Sun Oct  1 06:15:30 2023
@@ -1,13 +1,13 @@
-$NetBSD: NEWS,v 1.17 2023/10/01 02:09:12 lukem Exp $
+$NetBSD: NEWS,v 1.18 2023/10/01 06:15:30 lukem Exp $
 
-This is tnftpd version 20200704.
+This is tnftpd version 20231001.
 
-Changes in tnftpd from 20200704 to unreleased:
+Changes in tnftpd from 20200704 to 20231001:
 
 	Security fixes to improve error handling when switching UID/GID,
 	and to prevent MLSD and MLST before authentication succeeds.
 
-	Fix buffer overflows when counting users and when authenticating
+	Fix buffer overflows when counting users, and when authenticating
 	using PAM.
 
 Changes in tnftpd from 20190602 to 20200704:

Index: othersrc/libexec/tnftpd/configure
diff -u othersrc/libexec/tnftpd/configure:1.56 othersrc/libexec/tnftpd/configure:1.57
--- othersrc/libexec/tnftpd/configure:1.56	Sun Oct  1 03:11:29 2023
+++ othersrc/libexec/tnftpd/configure	Sun Oct  1 06:15:30 2023
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tnftpd 20200704.
+# Generated by GNU Autoconf 2.69 for tnftpd 20231001.
 #
 # Report bugs to .
 #
@@ -595,8 +595,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tnftpd'
 PACKAGE_TARNAME='tnftpd'
-PACKAGE_VERSION='20200704'
-PACKAGE_STRING='tnftpd 20200704'
+PACKAGE_VERSION='20231001'
+PACKAGE_STRING='tnftpd 20231001'
 PACKAGE_BUGREPORT='lu...@netbsd.org'
 PACKAGE_URL=''
 
@@ -1337,7 +1337,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures tnftpd 20200704 to adapt to many kinds of systems.
+\`configure' configures tnftpd 20231001 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1407,7 +1407,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of tnftpd 20200704:";;
+ short | recursive ) echo "Configuration of tnftpd 20231001:";;
esac
   cat <<\_ACEOF
 
@@ -1538,7 +1538,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tnftpd configure 20200704
+tnftpd configure 20231001
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2123,7 +2123,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tnftpd $as_me 20200704, which was
+It was created by tnftpd $as_me 20231001, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4493,7 +4493,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='tnftpd'
- VERSION='20200704'
+ VERSION='20231001'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16843,7 +16843,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tnftpd $as_me 20200704, which was
+This file was extended by tnftpd $as_me 20231001, which was
 generated by GNU Autoconf