CVS commit: src/sys/arch/news68k

2023-10-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Oct  6 21:10:12 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: Makefile.news68k
src/sys/arch/news68k/news68k: locore.s vectors.s

Log Message:
Remove fpsp include and #ifdef FPSP blocks for news68k.
FPSP is necessary for 040/060 only, and news68k doesn't have such hardware.

Noted by Izumi Tsutsui.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/news68k/conf/Makefile.news68k
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/news68k/news68k/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/news68k/conf/Makefile.news68k
diff -u src/sys/arch/news68k/conf/Makefile.news68k:1.23 src/sys/arch/news68k/conf/Makefile.news68k:1.24
--- src/sys/arch/news68k/conf/Makefile.news68k:1.23	Sun Oct  1 18:50:53 2023
+++ src/sys/arch/news68k/conf/Makefile.news68k	Fri Oct  6 21:10:12 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.news68k,v 1.23 2023/10/01 18:50:53 andvar Exp $
+#	$NetBSD: Makefile.news68k,v 1.24 2023/10/06 21:10:12 andvar Exp $
 #
 # Makefile for NetBSD
 #
@@ -46,8 +46,6 @@ 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}

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.68 src/sys/arch/news68k/news68k/locore.s:1.69
--- src/sys/arch/news68k/news68k/locore.s:1.68	Mon May 30 09:56:03 2022
+++ src/sys/arch/news68k/news68k/locore.s	Fri Oct  6 21:10:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.68 2022/05/30 09:56:03 andvar Exp $	*/
+/*	$NetBSD: locore.s,v 1.69 2023/10/06 21:10:12 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,7 +44,6 @@
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_sunos.h"
-#include "opt_fpsp.h"
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
 #include "opt_lockdebug.h"

Index: src/sys/arch/news68k/news68k/vectors.s
diff -u src/sys/arch/news68k/news68k/vectors.s:1.7 src/sys/arch/news68k/news68k/vectors.s:1.8
--- src/sys/arch/news68k/news68k/vectors.s:1.7	Sun Mar  6 14:54:47 2011
+++ src/sys/arch/news68k/news68k/vectors.s	Fri Oct  6 21:10:12 2023
@@ -1,4 +1,4 @@
-|	$NetBSD: vectors.s,v 1.7 2011/03/06 14:54:47 tsutsui Exp $
+|	$NetBSD: vectors.s,v 1.8 2023/10/06 21:10:12 andvar Exp $
 
 | Copyright (c) 1997 Jason R. Thorpe.  All rights reserved.
 | Copyright (c) 1988 University of Utah
@@ -109,15 +109,6 @@ GLOBAL(vectab)
 	VECTOR(illinst)		/* 45: TRAP instruction vector */
 	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 */
-#else
 	VECTOR(fpfault)		/* 48: FPCP branch/set on unordered cond */
 	VECTOR(fpfault)		/* 49: FPCP inexact result */
 	VECTOR(fpfault)		/* 50: FPCP divide by zero */
@@ -125,8 +116,6 @@ GLOBAL(vectab)
 	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 */
 	VECTOR(badtrap)		/* 57: unassigned, reserved */



CVS commit: src/sys/arch/news68k

2023-10-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Oct  6 21:10:12 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: Makefile.news68k
src/sys/arch/news68k/news68k: locore.s vectors.s

Log Message:
Remove fpsp include and #ifdef FPSP blocks for news68k.
FPSP is necessary for 040/060 only, and news68k doesn't have such hardware.

Noted by Izumi Tsutsui.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/news68k/conf/Makefile.news68k
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/news68k/news68k/vectors.s

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:48:08 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_82599.c
ixgbe_api.c ixgbe_bypass.h ixgbe_common.c ixgbe_common.h
ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_type.h ixgbe_x540.c
ixgbe_x550.c

Log Message:
ixgbe: Cleanup. No fucntional change.

 Remove unused code, fix whitespace and modify comment to reduce against
FreeBSD(mainly from ix-3.3.35).


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.337 -r1.338 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.91 -r1.92 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/ixgbe/ixgbe_82599.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/ixgbe/ixgbe_api.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/ixgbe_bypass.h
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/ixgbe_common.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ixgbe/ixgbe_dcb.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_x540.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/ixgbe/ixgbe_x550.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.102 src/sys/dev/pci/ixgbe/ix_txrx.c:1.103
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.102	Fri Oct  6 14:37:04 2023
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Oct  6 14:48:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.102 2023/10/06 14:37:04 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.103 2023/10/06 14:48:08 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.102 2023/10/06 14:37:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.103 2023/10/06 14:48:08 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -839,7 +839,6 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, 
 	u8   ipproto = 0;
 	char *l3d;
 
-
 	/* First check if TSO is to be used */
 	if (mp->m_pkthdr.csum_flags & (M_CSUM_TSOv4 | M_CSUM_TSOv6)) {
 		int rv = ixgbe_tso_setup(txr, mp, cmd_type_len, olinfo_status);
@@ -1733,9 +1732,9 @@ ixgbe_rx_input(struct rx_ring *rxr, stru
 (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) {
 /*
  * Send to the stack if:
- **  - LRO not enabled, or
- **  - no LRO resources, or
- **  - lro enqueue fails
+ *  - LRO not enabled, or
+ *  - no LRO resources, or
+ *  - lro enqueue fails
  */
 if (rxr->lro.lro_cnt != 0)
 if (tcp_lro_rx(&rxr->lro, m, 0) == 0)

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.337 src/sys/dev/pci/ixgbe/ixgbe.c:1.338
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.337	Fri Oct  6 14:46:31 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Oct  6 14:48:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.337 2023/10/06 14:46:31 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.338 2023/10/06 14:48:08 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.337 2023/10/06 14:46:31 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.338 2023/10/06 14:48:08 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -764,8 +764,6 @@ ixgbe_initialize_transmit_units(struct i
 		rttdcs &= ~IXGBE_RTTDCS_ARBDIS;
 		IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs);
 	}
-
-	return;
 } /* ixgbe_initialize_transmit_units */
 
 static void

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.91 src/sys/dev/pci/ixgbe/ixgbe.h:1.92
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.91	Fri Oct  6 14:42:51 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Fri Oct  6 14:48:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.91 2023/10/06 14:42:51 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.92 2023/10/06 14:48:08 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -200,11 +200,6 @@
 #define IXGBE_82599_SCATTER_MAX	(40 - IXGBE_TX_WTHRESH - 2)
 #define IXGBE_SCATTER_DEFAULT	33
 
-/* Keep older OS drivers building... */
-#if !defined(SYSCTL_ADD_UQUAD)
-#define SYSCTL_ADD_UQUAD SYSCTL_ADD_QUAD
-#endif
-
 /* Defines for printing debug information */
 #define DEBUG_INIT  0
 #define DEBUG_IOCTL 0

Index: src/sys/dev/pci/ixgbe/ixgbe_82599.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.31 src/sys/dev/pci/ixgbe/ixgbe

CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:48:08 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_82599.c
ixgbe_api.c ixgbe_bypass.h ixgbe_common.c ixgbe_common.h
ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_type.h ixgbe_x540.c
ixgbe_x550.c

Log Message:
ixgbe: Cleanup. No fucntional change.

 Remove unused code, fix whitespace and modify comment to reduce against
FreeBSD(mainly from ix-3.3.35).


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.337 -r1.338 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.91 -r1.92 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/ixgbe/ixgbe_82599.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/ixgbe/ixgbe_api.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/ixgbe_bypass.h
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/ixgbe_common.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ixgbe/ixgbe_dcb.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_x540.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/ixgbe/ixgbe_x550.c

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:46:31 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
ixgbe: Enable interrupt after setting IFF_RUNNING. Same as FreeBSD x-3.3.35.


To generate a diff of this commit:
cvs rdiff -u -r1.336 -r1.337 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.188 -r1.189 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.336 src/sys/dev/pci/ixgbe/ixgbe.c:1.337
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.336	Fri Oct  6 14:44:08 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Oct  6 14:46:31 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.336 2023/10/06 14:44:08 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.337 2023/10/06 14:46:31 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.336 2023/10/06 14:44:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.337 2023/10/06 14:46:31 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -4294,9 +4294,6 @@ ixgbe_init_locked(struct ixgbe_softc *sc
 	/* OK to schedule workqueues. */
 	sc->schedule_wqs_ok = true;
 
-	/* And now turn on interrupts */
-	ixgbe_enable_intr(sc);
-
 	/* Enable the use of the MBX by the VF's */
 	if (sc->feat_en & IXGBE_FEATURE_SRIOV) {
 		ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
@@ -4308,9 +4305,12 @@ ixgbe_init_locked(struct ixgbe_softc *sc
 	sc->if_flags = ifp->if_flags;
 	sc->ec_capenable = sc->osdep.ec.ec_capenable;
 
-	/* Now inform the stack we're ready */
+	/* Inform the stack we're ready */
 	ifp->if_flags |= IFF_RUNNING;
 
+	/* And now turn on interrupts */
+	ixgbe_enable_intr(sc);
+
 	return;
 } /* ixgbe_init_locked */
 

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.188 src/sys/dev/pci/ixgbe/ixv.c:1.189
--- src/sys/dev/pci/ixgbe/ixv.c:1.188	Fri Oct  6 14:44:08 2023
+++ src/sys/dev/pci/ixgbe/ixv.c	Fri Oct  6 14:46:31 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.188 2023/10/06 14:44:08 msaitoh Exp $ */
+/* $NetBSD: ixv.c,v 1.189 2023/10/06 14:46:31 msaitoh Exp $ */
 
 /**
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.188 2023/10/06 14:44:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.189 2023/10/06 14:46:31 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -823,17 +823,17 @@ ixv_init_locked(struct ixgbe_softc *sc)
 	/* OK to schedule workqueues. */
 	sc->schedule_wqs_ok = true;
 
-	/* And now turn on interrupts */
-	ixv_enable_intr(sc);
-
 	/* Update saved flags. See ixgbe_ifflags_cb() */
 	sc->if_flags = ifp->if_flags;
 	sc->ec_capenable = sc->osdep.ec.ec_capenable;
 
-	/* Now inform the stack we're ready */
+	/* Inform the stack we're ready */
 	ifp->if_flags |= IFF_RUNNING;
 	ifp->if_flags &= ~IFF_OACTIVE;
 
+	/* And now turn on interrupts */
+	ixv_enable_intr(sc);
+
 	return;
 } /* ixv_init_locked */
 



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:45:27 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_dcb.c

Log Message:
ixgbe: Remove NO_82599_SUPPORT and NO_X540_SUPPORT support. NFCI.

 From FreeBSD ix-3.3.35. Note that this file is not used in NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe_dcb.c

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:46:31 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
ixgbe: Enable interrupt after setting IFF_RUNNING. Same as FreeBSD x-3.3.35.


To generate a diff of this commit:
cvs rdiff -u -r1.336 -r1.337 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.188 -r1.189 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:45:27 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_dcb.c

Log Message:
ixgbe: Remove NO_82599_SUPPORT and NO_X540_SUPPORT support. NFCI.

 From FreeBSD ix-3.3.35. Note that this file is not used in NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe_dcb.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe_dcb.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_dcb.c:1.13 src/sys/dev/pci/ixgbe/ixgbe_dcb.c:1.14
--- src/sys/dev/pci/ixgbe/ixgbe_dcb.c:1.13	Fri Dec 24 05:02:11 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_dcb.c	Fri Oct  6 14:45:27 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_dcb.c,v 1.13 2021/12/24 05:02:11 msaitoh Exp $ */
+/* $NetBSD: ixgbe_dcb.c,v 1.14 2023/10/06 14:45:27 msaitoh Exp $ */
 /**
   SPDX-License-Identifier: BSD-3-Clause
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_dcb.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_dcb.c,v 1.13 2021/12/24 05:02:11 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_dcb.c,v 1.14 2023/10/06 14:45:27 msaitoh Exp $");
 
 #include "ixgbe_type.h"
 #include "ixgbe_dcb.h"
@@ -412,10 +412,8 @@ s32 ixgbe_dcb_get_tc_stats(struct ixgbe_
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ret = ixgbe_dcb_get_tc_stats_82599(hw, stats, tc_count);
 		break;
-#endif
 	default:
 		break;
 	}
@@ -443,10 +441,8 @@ s32 ixgbe_dcb_get_pfc_stats(struct ixgbe
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ret = ixgbe_dcb_get_pfc_stats_82599(hw, stats, tc_count);
 		break;
-#endif
 	default:
 		break;
 	}
@@ -485,11 +481,9 @@ s32 ixgbe_dcb_config_rx_arbiter_cee(stru
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ret = ixgbe_dcb_config_rx_arbiter_82599(hw, refill, max, bwgid,
 			tsa, map);
 		break;
-#endif
 	default:
 		break;
 	}
@@ -527,11 +521,9 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_cee
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ret = ixgbe_dcb_config_tx_desc_arbiter_82599(hw, refill, max,
 			 bwgid, tsa);
 		break;
-#endif
 	default:
 		break;
 	}
@@ -571,12 +563,10 @@ s32 ixgbe_dcb_config_tx_data_arbiter_cee
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ret = ixgbe_dcb_config_tx_data_arbiter_82599(hw, refill, max,
 			 bwgid, tsa,
 			 map);
 		break;
-#endif
 	default:
 		break;
 	}
@@ -609,10 +599,8 @@ s32 ixgbe_dcb_config_pfc_cee(struct ixgb
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ret = ixgbe_dcb_config_pfc_82599(hw, pfc_en, map);
 		break;
-#endif
 	default:
 		break;
 	}
@@ -638,10 +626,8 @@ s32 ixgbe_dcb_config_tc_stats(struct ixg
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ret = ixgbe_dcb_config_tc_stats_82599(hw, NULL);
 		break;
-#endif
 	default:
 		break;
 	}
@@ -686,7 +672,6 @@ s32 ixgbe_dcb_hw_config_cee(struct ixgbe
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ixgbe_dcb_config_82599(hw, dcb_config);
 		ret = ixgbe_dcb_hw_config_82599(hw, dcb_config->link_speed,
 		refill, max, bwgid,
@@ -694,7 +679,6 @@ s32 ixgbe_dcb_hw_config_cee(struct ixgbe
 
 		ixgbe_dcb_config_tc_stats_82599(hw, dcb_config);
 		break;
-#endif
 	default:
 		break;
 	}
@@ -721,10 +705,8 @@ s32 ixgbe_dcb_config_pfc(struct ixgbe_hw
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ret = ixgbe_dcb_config_pfc_82599(hw, pfc_en, map);
 		break;
-#endif
 	default:
 		break;
 	}
@@ -747,7 +729,6 @@ s32 ixgbe_dcb_hw_config(struct ixgbe_hw 
 	case ixgbe_mac_X550:
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
-#if !defined(NO_82599_SUPPORT) || !defined(NO_X540_SUPPORT)
 		ixgbe_dcb_config_rx_arbiter_82599(hw, refill, max, bwg_id,
 		  tsa, map);
 		ixgbe_dcb_config_tx_desc_arbiter_82599(hw, refill, max, bwg_id,
@@ -755,7 +736,6 @@ s32 ixgbe_dcb_hw_config(struct ixgbe_hw 
 		ixgbe_dcb_config_tx_data_arbiter_82599(hw, refill, max, bwg_id,
 		   tsa, map);
 		break;
-#endif
 	default:
 		break;
 	}



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:44:08 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
ixgbe: Modify error message of wrong TX/RX descriptor size.

  - Based from FreeBSD ix-3.3.35. I think ix-3.3.35's RING_INCREMENT(== 32)
is wrong. It should be 8(DBA_ALIGN / sizeof(union ixgbe_adv_[tr]x_desc)).
Linux also uses 8.


To generate a diff of this commit:
cvs rdiff -u -r1.335 -r1.336 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.187 -r1.188 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.335 src/sys/dev/pci/ixgbe/ixgbe.c:1.336
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.335	Fri Oct  6 14:42:51 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Oct  6 14:44:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.335 2023/10/06 14:42:51 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.336 2023/10/06 14:44:08 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.335 2023/10/06 14:42:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.336 2023/10/06 14:44:08 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -967,14 +967,26 @@ ixgbe_attach(device_t parent, device_t d
 	/* Do descriptor calc and sanity checks */
 	if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 ||
 	ixgbe_txd < MIN_TXD || ixgbe_txd > MAX_TXD) {
-		aprint_error_dev(dev, "TXD config issue, using default!\n");
+		aprint_error_dev(dev, "Invalid TX ring size (%d). "
+		"It must be between %d and %d, "
+		"inclusive, and must be a multiple of %zu. "
+		"Using default value of %d instead.\n",
+		ixgbe_txd, MIN_TXD, MAX_TXD,
+		DBA_ALIGN / sizeof(union ixgbe_adv_tx_desc),
+		DEFAULT_TXD);
 		sc->num_tx_desc = DEFAULT_TXD;
 	} else
 		sc->num_tx_desc = ixgbe_txd;
 
 	if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 ||
 	ixgbe_rxd < MIN_RXD || ixgbe_rxd > MAX_RXD) {
-		aprint_error_dev(dev, "RXD config issue, using default!\n");
+		aprint_error_dev(dev, "Invalid RX ring size (%d). "
+		"It must be between %d and %d, "
+		"inclusive, and must be a multiple of %zu. "
+		"Using default value of %d instead.\n",
+		ixgbe_rxd, MIN_RXD, MAX_RXD,
+		DBA_ALIGN / sizeof(union ixgbe_adv_rx_desc),
+		DEFAULT_RXD);
 		sc->num_rx_desc = DEFAULT_RXD;
 	} else
 		sc->num_rx_desc = ixgbe_rxd;

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.187 src/sys/dev/pci/ixgbe/ixv.c:1.188
--- src/sys/dev/pci/ixgbe/ixv.c:1.187	Fri Oct  6 14:42:51 2023
+++ src/sys/dev/pci/ixgbe/ixv.c	Fri Oct  6 14:44:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.187 2023/10/06 14:42:51 msaitoh Exp $ */
+/* $NetBSD: ixv.c,v 1.188 2023/10/06 14:44:08 msaitoh Exp $ */
 
 /**
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.187 2023/10/06 14:42:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.188 2023/10/06 14:44:08 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -501,14 +501,26 @@ ixv_attach(device_t parent, device_t dev
 	/* Do descriptor calc and sanity checks */
 	if (((ixv_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 ||
 	ixv_txd < MIN_TXD || ixv_txd > MAX_TXD) {
-		aprint_error_dev(dev, "TXD config issue, using default!\n");
+		aprint_error_dev(dev, "Invalid TX ring size (%d). "
+		"It must be between %d and %d, "
+		"inclusive, and must be a multiple of %zu. "
+		"Using default value of %d instead.\n",
+		ixv_txd, MIN_TXD, MAX_TXD,
+		DBA_ALIGN / sizeof(union ixgbe_adv_tx_desc),
+		DEFAULT_TXD);
 		sc->num_tx_desc = DEFAULT_TXD;
 	} else
 		sc->num_tx_desc = ixv_txd;
 
 	if (((ixv_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 ||
 	ixv_rxd < MIN_RXD || ixv_rxd > MAX_RXD) {
-		aprint_error_dev(dev, "RXD config issue, using default!\n");
+		aprint_error_dev(dev, "Invalid RX ring size (%d). "
+		"It must be between %d and %d, "
+		"inclusive, and must be a multiple of %zu. "
+		"Using default value of %d instead.\n",
+		ixv_rxd, MIN_RXD, MAX_RXD,
+		DBA_ALIGN / sizeof(union ixgbe_adv_rx_desc),
+		DEFAULT_RXD);
 		sc->num_rx_desc = DEFAULT_RXD;
 	} else
 		sc->num_rx_desc = ixv_rxd;



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:42:51 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h ixv.c

Log Message:
ixgbe: Simplify definitions. No functional change.

 Both DEFAULT_{TX,RX}D and PERFORM_{TX,RX}D are 2048. Use DEFAULT_{TX,RX}D.
Same as FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.186 -r1.187 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:44:08 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
ixgbe: Modify error message of wrong TX/RX descriptor size.

  - Based from FreeBSD ix-3.3.35. I think ix-3.3.35's RING_INCREMENT(== 32)
is wrong. It should be 8(DBA_ALIGN / sizeof(union ixgbe_adv_[tr]x_desc)).
Linux also uses 8.


To generate a diff of this commit:
cvs rdiff -u -r1.335 -r1.336 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.187 -r1.188 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:41:24 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_common.c

Log Message:
ixg(4): Filter out spurious link up indication

 - Extend SFP+ cage crosstalk fix by re-checking link state after 5ms delay
   to filter out spurious link up indication by transceiver with no fiber
   cable connected.
 - From FreeBSD:
 In-tree: 04a5e6d7cadd06b10169c3c3a560649e7dc7444c
 Out of tree: ix-3.3.33.


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

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:42:51 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h ixv.c

Log Message:
ixgbe: Simplify definitions. No functional change.

 Both DEFAULT_{TX,RX}D and PERFORM_{TX,RX}D are 2048. Use DEFAULT_{TX,RX}D.
Same as FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.186 -r1.187 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.334 src/sys/dev/pci/ixgbe/ixgbe.c:1.335
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.334	Fri Oct  6 14:40:06 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Oct  6 14:42:51 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.334 2023/10/06 14:40:06 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.335 2023/10/06 14:42:51 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.334 2023/10/06 14:40:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.335 2023/10/06 14:42:51 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -370,12 +370,12 @@ SYSCTL_INT(_hw_ix, OID_AUTO, num_queues,
  * setting higher than RX as this seems
  * the better performing choice.
  */
-static int ixgbe_txd = PERFORM_TXD;
+static int ixgbe_txd = DEFAULT_TXD;
 SYSCTL_INT(_hw_ix, OID_AUTO, txd, CTLFLAG_RDTUN, &ixgbe_txd, 0,
 "Number of transmit descriptors per queue");
 
 /* Number of RX descriptors per ring */
-static int ixgbe_rxd = PERFORM_RXD;
+static int ixgbe_rxd = DEFAULT_RXD;
 SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgbe_rxd, 0,
 "Number of receive descriptors per queue");
 

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.90 src/sys/dev/pci/ixgbe/ixgbe.h:1.91
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.90	Fri Oct  6 14:38:03 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Fri Oct  6 14:42:51 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.90 2023/10/06 14:38:03 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.91 2023/10/06 14:42:51 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -119,19 +119,18 @@
 /* Tunables */
 
 /*
- * TxDescriptors Valid Range: 64-4096 Default Value: 256 This value is the
+ * TxDescriptors Valid Range: 64-4096 Default Value: 2048 This value is the
  * number of transmit descriptors allocated by the driver. Increasing this
  * value allows the driver to queue more transmits. Each descriptor is 16
  * bytes. Performance tests have show the 2K value to be optimal for top
  * performance.
  */
-#define DEFAULT_TXD	1024
-#define PERFORM_TXD	2048
+#define DEFAULT_TXD	2048
 #define MAX_TXD		4096
 #define MIN_TXD		64
 
 /*
- * RxDescriptors Valid Range: 64-4096 Default Value: 256 This value is the
+ * RxDescriptors Valid Range: 64-4096 Default Value: 2048 This value is the
  * number of receive descriptors allocated for each RX queue. Increasing this
  * value allows the driver to buffer more incoming packets. Each descriptor
  * is 16 bytes.  A receive buffer is also allocated for each descriptor.
@@ -140,8 +139,7 @@
  *	against the system mbuf pool limit, you can tune nmbclusters
  *	to adjust for this.
  */
-#define DEFAULT_RXD	1024
-#define PERFORM_RXD	2048
+#define DEFAULT_RXD	2048
 #define MAX_RXD		4096
 #define MIN_RXD		64
 

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.186 src/sys/dev/pci/ixgbe/ixv.c:1.187
--- src/sys/dev/pci/ixgbe/ixv.c:1.186	Fri Oct  6 14:37:04 2023
+++ src/sys/dev/pci/ixgbe/ixv.c	Fri Oct  6 14:42:51 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.186 2023/10/06 14:37:04 msaitoh Exp $ */
+/* $NetBSD: ixv.c,v 1.187 2023/10/06 14:42:51 msaitoh Exp $ */
 
 /**
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.186 2023/10/06 14:37:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.187 2023/10/06 14:42:51 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -217,11 +217,11 @@ static bool ixv_txrx_workqueue = false;
  * setting higher than RX as this seems
  * the better performing choice.
  */
-static int ixv_txd = PERFORM_TXD;
+static int ixv_txd = DEFAULT_TXD;
 TUNABLE_INT("hw.ixv.txd", &ixv_txd);
 
 /* Number of RX descriptors per ring */
-static int ixv_rxd = PERFORM_RXD;
+static int ixv_rxd = DEFAULT_RXD;
 TUNABLE_INT("hw.ixv.rxd", &ixv_rxd);
 
 /* Legacy Transmit (single queue) */



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:40:06 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_82599.c ixgbe_type.h

Log Message:
ixg(4): Add 82599 LS once again.

 - From:
FreeBSD: 9228ac3a69c4c7401a743e6465e118101a2beeb0
DPDK:549ccd3dc01539e060597b503f2b65b272de3347
 - This was removed 5 years ago. From the commit message:
   > Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. I don't know why. This
   > was added in ix-3.2.18.tar.gz(NetBSD: ixgbe_82599.c rev. 1.20) and
   > removed in ix-3.3.6.tar.gz.


To generate a diff of this commit:
cvs rdiff -u -r1.333 -r1.334 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/ixgbe/ixgbe_82599.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/ixgbe/ixgbe_type.h

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.333 src/sys/dev/pci/ixgbe/ixgbe.c:1.334
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.333	Fri Oct  6 14:37:04 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Oct  6 14:40:06 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.333 2023/10/06 14:37:04 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.334 2023/10/06 14:40:06 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.333 2023/10/06 14:37:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.334 2023/10/06 14:40:06 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -117,6 +117,7 @@ static const ixgbe_vendor_info_t ixgbe_v
 	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, 0, 0, 0},
 	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, 0, 0, 0},
 	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, 0, 0, 0},
+	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS, 0, 0, 0},
 	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0},
 	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, 0, 0, 0},
 	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, 0, 0, 0},

Index: src/sys/dev/pci/ixgbe/ixgbe_82599.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.30 src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.31
--- src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.30	Wed Oct  4 04:31:25 2023
+++ src/sys/dev/pci/ixgbe/ixgbe_82599.c	Fri Oct  6 14:40:06 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_82599.c,v 1.30 2023/10/04 04:31:25 msaitoh Exp $ */
+/* $NetBSD: ixgbe_82599.c,v 1.31 2023/10/06 14:40:06 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_82599.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_82599.c,v 1.30 2023/10/04 04:31:25 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_82599.c,v 1.31 2023/10/06 14:40:06 msaitoh Exp $");
 
 #include "ixgbe_type.h"
 #include "ixgbe_82599.h"
@@ -571,6 +571,9 @@ enum ixgbe_media_type ixgbe_get_media_ty
 	case IXGBE_DEV_ID_82599_T3_LOM:
 		media_type = ixgbe_media_type_copper;
 		break;
+	case IXGBE_DEV_ID_82599_LS:
+		media_type = ixgbe_media_type_fiber_lco;
+		break;
 	case IXGBE_DEV_ID_82599_QSFP_SF_QP:
 		media_type = ixgbe_media_type_fiber_qsfp;
 		break;

Index: src/sys/dev/pci/ixgbe/ixgbe_type.h
diff -u src/sys/dev/pci/ixgbe/ixgbe_type.h:1.58 src/sys/dev/pci/ixgbe/ixgbe_type.h:1.59
--- src/sys/dev/pci/ixgbe/ixgbe_type.h:1.58	Fri Oct  6 14:37:04 2023
+++ src/sys/dev/pci/ixgbe/ixgbe_type.h	Fri Oct  6 14:40:06 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_type.h,v 1.58 2023/10/06 14:37:04 msaitoh Exp $ */
+/* $NetBSD: ixgbe_type.h,v 1.59 2023/10/06 14:40:06 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -108,6 +108,7 @@
 #define IXGBE_DEV_ID_82599_KR			0x1517
 #define IXGBE_DEV_ID_82599_COMBO_BACKPLANE	PCI_PRODUCT_INTEL_82599_COMBO_BACKPLANE
 #define IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ	0x000C
+#define IXGBE_DEV_ID_82599_LS			0x154F
 #define IXGBE_DEV_ID_82599_CX4			PCI_PRODUCT_INTEL_82599_CX4
 #define IXGBE_DEV_ID_82599_SFP			PCI_PRODUCT_INTEL_82599_SFP
 #define IXGBE_SUBDEV_ID_82599_SFP_WOL0		0x1071
@@ -3796,6 +3797,7 @@ enum ixgbe_media_type {
 	ixgbe_media_type_fiber,
 	ixgbe_media_type_fiber_fixed,
 	ixgbe_media_type_fiber_qsfp,
+	ixgbe_media_type_fiber_lco,
 	ixgbe_media_type_copper,
 	ixgbe_media_type_backplane,
 	ixgbe_media_type_cx4,



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:40:06 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_82599.c ixgbe_type.h

Log Message:
ixg(4): Add 82599 LS once again.

 - From:
FreeBSD: 9228ac3a69c4c7401a743e6465e118101a2beeb0
DPDK:549ccd3dc01539e060597b503f2b65b272de3347
 - This was removed 5 years ago. From the commit message:
   > Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. I don't know why. This
   > was added in ix-3.2.18.tar.gz(NetBSD: ixgbe_82599.c rev. 1.20) and
   > removed in ix-3.3.6.tar.gz.


To generate a diff of this commit:
cvs rdiff -u -r1.333 -r1.334 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/ixgbe/ixgbe_82599.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/ixgbe/ixgbe_type.h

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:38:03 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h

Log Message:
ixg(4): Remove unused and old function. No functional change.

 - From FreeBSD's ix-3.3.32.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/dev/pci/ixgbe/ixgbe.h

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.89 src/sys/dev/pci/ixgbe/ixgbe.h:1.90
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.89	Fri Oct  6 14:37:04 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Fri Oct  6 14:38:03 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.89 2023/10/06 14:37:04 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.90 2023/10/06 14:38:03 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -692,19 +692,6 @@ struct ixgbe_softc {
 	"\t2 - tx pause\n" \
 	"\t3 - tx and rx pause"
 
-/* Workaround to make 8.0 buildable */
-#if __FreeBSD_version >= 80 && __FreeBSD_version < 800504
-static __inline int
-drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br)
-{
-#ifdef ALTQ
-	if (ALTQ_IS_ENABLED(&ifp->if_snd))
-		return (1);
-#endif
-	return (!buf_ring_empty(br));
-}
-#endif
-
 /*
  * Find the number of unrefreshed RX descriptors
  */



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:41:24 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_common.c

Log Message:
ixg(4): Filter out spurious link up indication

 - Extend SFP+ cage crosstalk fix by re-checking link state after 5ms delay
   to filter out spurious link up indication by transceiver with no fiber
   cable connected.
 - From FreeBSD:
 In-tree: 04a5e6d7cadd06b10169c3c3a560649e7dc7444c
 Out of tree: ix-3.3.33.


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

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.45 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.46
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.45	Fri Oct  6 14:37:04 2023
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Fri Oct  6 14:41:24 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.45 2023/10/06 14:37:04 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.46 2023/10/06 14:41:24 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_common.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.45 2023/10/06 14:37:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.46 2023/10/06 14:41:24 msaitoh Exp $");
 
 #include "ixgbe_common.h"
 #include "ixgbe_phy.h"
@@ -4296,10 +4296,25 @@ s32 ixgbe_check_mac_link_generic(struct 
 			links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
 		}
 	} else {
-		if (links_reg & IXGBE_LINKS_UP)
+		if (links_reg & IXGBE_LINKS_UP) {
+			if (ixgbe_need_crosstalk_fix(hw)) {
+/* Check the link state again after a delay
+ * to filter out spurious link up
+ * notifications.
+ */
+msec_delay(5);
+links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
+if (!(links_reg & IXGBE_LINKS_UP)) {
+	*link_up = false;
+	*speed = IXGBE_LINK_SPEED_UNKNOWN;
+	return IXGBE_SUCCESS;
+}
+
+			}
 			*link_up = TRUE;
-		else
+		} else {
 			*link_up = FALSE;
+		}
 	}
 
 	switch (links_reg & IXGBE_LINKS_SPEED_82599) {



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:38:03 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h

Log Message:
ixg(4): Remove unused and old function. No functional change.

 - From FreeBSD's ix-3.3.32.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/dev/pci/ixgbe/ixgbe.h

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:37:04 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: if_bypass.c if_fdir.c if_sriov.c ix_txrx.c
ixgbe.c ixgbe.h ixgbe_api.h ixgbe_bypass.h ixgbe_common.c
ixgbe_common.h ixgbe_fdir.h ixgbe_netmap.c ixgbe_netmap.h
ixgbe_osdep.c ixgbe_sriov.h ixgbe_type.h ixgbe_x550.c ixv.c

Log Message:
ixgbe: Rename some definitions, modify comment. No functional change.

 Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32.
- struct adapter *adapter -> struct ixgbe_softc *sc
- master -> primary
- black -> block


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/ixgbe/if_bypass.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/ixgbe/if_fdir.c \
src/sys/dev/pci/ixgbe/ixgbe_netmap.c src/sys/dev/pci/ixgbe/ixgbe_sriov.h
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/if_sriov.c
cvs rdiff -u -r1.101 -r1.102 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.332 -r1.333 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.88 -r1.89 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/ixgbe/ixgbe_api.h \
src/sys/dev/pci/ixgbe/ixgbe_common.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/ixgbe/ixgbe_bypass.h
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/ixgbe_fdir.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/ixgbe/ixgbe_netmap.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.185 -r1.186 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:35:25 UTC 2023

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

Log Message:
ixg(4): Update FCTRL after writing multicast filter. Same as other OSes.

 From FreeBSD 395cc55d896654b8f75071e71e856b22aed87da5.


To generate a diff of this commit:
cvs rdiff -u -r1.331 -r1.332 src/sys/dev/pci/ixgbe/ixgbe.c

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:35:25 UTC 2023

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

Log Message:
ixg(4): Update FCTRL after writing multicast filter. Same as other OSes.

 From FreeBSD 395cc55d896654b8f75071e71e856b22aed87da5.


To generate a diff of this commit:
cvs rdiff -u -r1.331 -r1.332 src/sys/dev/pci/ixgbe/ixgbe.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.331 src/sys/dev/pci/ixgbe/ixgbe.c:1.332
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.331	Thu Sep 14 08:48:29 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Oct  6 14:35:25 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.331 2023/09/14 08:48:29 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.332 2023/10/06 14:35:25 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.331 2023/09/14 08:48:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.332 2023/10/06 14:35:25 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -4551,8 +4551,6 @@ ixgbe_set_rxfilter(struct adapter *adapt
 	} else
 		fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
 
-	IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, fctrl);
-
 	/* Update multicast filter entries only when it's not ALLMULTI */
 	if ((ec->ec_flags & ETHER_F_ALLMULTI) == 0) {
 		ETHER_UNLOCK(ec);
@@ -4561,6 +4559,8 @@ ixgbe_set_rxfilter(struct adapter *adapt
 		ixgbe_mc_array_itr, TRUE);
 	} else
 		ETHER_UNLOCK(ec);
+
+	IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, fctrl);
 } /* ixgbe_set_rxfilter */
 
 /



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:34:23 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h ixgbe_mbx.h ixgbe_type.h ixgbe_vf.c
ixgbe_vf.h ixv.c

Log Message:
ixv(4): Add new IXGBE_VF_GET_LINK_STATE message support.

 PF can control vf's link state by this change. Note that Linux's PF driver
can't control the link to force up (i.e. ip link set XXX vf Y state enable).
>From FreeBSD ixv-1.5.30.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/ixgbe_vf.h
cvs rdiff -u -r1.184 -r1.185 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:34:23 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h ixgbe_mbx.h ixgbe_type.h ixgbe_vf.c
ixgbe_vf.h ixv.c

Log Message:
ixv(4): Add new IXGBE_VF_GET_LINK_STATE message support.

 PF can control vf's link state by this change. Note that Linux's PF driver
can't control the link to force up (i.e. ip link set XXX vf Y state enable).
>From FreeBSD ixv-1.5.30.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/ixgbe/ixgbe_mbx.h
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/ixgbe_vf.h
cvs rdiff -u -r1.184 -r1.185 src/sys/dev/pci/ixgbe/ixv.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.87 src/sys/dev/pci/ixgbe/ixgbe.h:1.88
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.87	Wed Sep 13 07:28:51 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Fri Oct  6 14:34:23 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.87 2023/09/13 07:28:51 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.88 2023/10/06 14:34:23 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -511,6 +511,7 @@ struct adapter {
 	u16			num_segs;
 	u32			link_speed;
 	bool			link_up;
+	boollink_enabled;
 	u32			vector;
 	u16			dmac;
 	u32			phy_layer;

Index: src/sys/dev/pci/ixgbe/ixgbe_mbx.h
diff -u src/sys/dev/pci/ixgbe/ixgbe_mbx.h:1.19 src/sys/dev/pci/ixgbe/ixgbe_mbx.h:1.20
--- src/sys/dev/pci/ixgbe/ixgbe_mbx.h:1.19	Fri Dec 24 05:11:04 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_mbx.h	Fri Oct  6 14:34:23 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_mbx.h,v 1.19 2021/12/24 05:11:04 msaitoh Exp $ */
+/* $NetBSD: ixgbe_mbx.h,v 1.20 2023/10/06 14:34:23 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -156,6 +156,7 @@ enum ixgbe_pfvf_api_rev {
 #define IXGBE_VF_GET_RETA  0x0a/* VF request for RETA */
 #define IXGBE_VF_GET_RSS_KEY	0x0b/* get RSS key */
 #define IXGBE_VF_UPDATE_XCAST_MODE	0x0c
+#define IXGBE_VF_GET_LINK_STATE 0x10 /* get vf link state */
 
 /* mode choices for IXGBE_VF_UPDATE_XCAST_MODE */
 enum ixgbevf_xcast_modes {

Index: src/sys/dev/pci/ixgbe/ixgbe_type.h
diff -u src/sys/dev/pci/ixgbe/ixgbe_type.h:1.56 src/sys/dev/pci/ixgbe/ixgbe_type.h:1.57
--- src/sys/dev/pci/ixgbe/ixgbe_type.h:1.56	Mon May 15 08:01:22 2023
+++ src/sys/dev/pci/ixgbe/ixgbe_type.h	Fri Oct  6 14:34:23 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_type.h,v 1.56 2023/05/15 08:01:22 msaitoh Exp $ */
+/* $NetBSD: ixgbe_type.h,v 1.57 2023/10/06 14:34:23 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -4076,6 +4076,7 @@ struct ixgbe_mac_operations {
 	s32 (*update_mc_addr_list)(struct ixgbe_hw *, u8 *, u32,
    ixgbe_mc_addr_itr, bool clear);
 	s32 (*update_xcast_mode)(struct ixgbe_hw *, int);
+	s32 (*get_link_state)(struct ixgbe_hw *hw, bool *link_state);
 	s32 (*enable_mc)(struct ixgbe_hw *);
 	s32 (*disable_mc)(struct ixgbe_hw *);
 	s32 (*clear_vfta)(struct ixgbe_hw *);

Index: src/sys/dev/pci/ixgbe/ixgbe_vf.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_vf.c:1.32 src/sys/dev/pci/ixgbe/ixgbe_vf.c:1.33
--- src/sys/dev/pci/ixgbe/ixgbe_vf.c:1.32	Fri Oct  6 14:32:05 2023
+++ src/sys/dev/pci/ixgbe/ixgbe_vf.c	Fri Oct  6 14:34:23 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_vf.c,v 1.32 2023/10/06 14:32:05 msaitoh Exp $ */
+/* $NetBSD: ixgbe_vf.c,v 1.33 2023/10/06 14:34:23 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_vf.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_vf.c,v 1.32 2023/10/06 14:32:05 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_vf.c,v 1.33 2023/10/06 14:34:23 msaitoh Exp $");
 
 #include "ixgbe_api.h"
 #include "ixgbe_type.h"
@@ -85,6 +85,7 @@ s32 ixgbe_init_ops_vf(struct ixgbe_hw *h
 	hw->mac.ops.init_rx_addrs = NULL;
 	hw->mac.ops.update_mc_addr_list = ixgbe_update_mc_addr_list_vf;
 	hw->mac.ops.update_xcast_mode = ixgbevf_update_xcast_mode;
+	hw->mac.ops.get_link_state = ixgbe_get_link_state_vf;
 	hw->mac.ops.enable_mc = NULL;
 	hw->mac.ops.disable_mc = NULL;
 	hw->mac.ops.clear_vfta = NULL;
@@ -497,6 +498,34 @@ s32 ixgbevf_update_xcast_mode(struct ixg
 }
 
 /**
+ * ixgbe_get_link_state_vf - Get VF link state from PF
+ * @hw: pointer to the HW structure
+ * @link_state: link state storage
+ *
+ * Returns state of the operation error or success.
+ **/
+s32 i

CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:32:05 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_vf.c

Log Message:
ixv(4): Improve error check.

 ixgbe_vf.c rev. 1.31 changed the behavior of the ixgbe_check_mac_link_vf()
function. It was from FreeBSD's ixv-1.5.25 to resolve mailbox collision
problem. The change had a problem that error checks have not done at all if
the API version >= 1.5. Fix it. From FreeBSD ixv-1.5.27.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/ixgbe/ixgbe_vf.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe_vf.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_vf.c:1.31 src/sys/dev/pci/ixgbe/ixgbe_vf.c:1.32
--- src/sys/dev/pci/ixgbe/ixgbe_vf.c:1.31	Fri Dec 24 05:11:04 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_vf.c	Fri Oct  6 14:32:05 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_vf.c,v 1.31 2021/12/24 05:11:04 msaitoh Exp $ */
+/* $NetBSD: ixgbe_vf.c,v 1.32 2023/10/06 14:32:05 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_vf.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_vf.c,v 1.31 2021/12/24 05:11:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_vf.c,v 1.32 2023/10/06 14:32:05 msaitoh Exp $");
 
 #include "ixgbe_api.h"
 #include "ixgbe_type.h"
@@ -624,7 +624,9 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe
 	struct ixgbe_mbx_info *mbx = &hw->mbx;
 	struct ixgbe_mac_info *mac = &hw->mac;
 	s32 ret_val = IXGBE_SUCCESS;
+	u32 in_msg = 0;
 	u32 links_reg;
+
 	UNREFERENCED_1PARAMETER(autoneg_wait_to_complete);
 
 	/* If we were hit with a reset drop the link */
@@ -682,27 +684,26 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe
 		*speed = IXGBE_LINK_SPEED_UNKNOWN;
 	}
 
-	if (hw->api_version < ixgbe_mbox_api_15) {
-		u32 in_msg = 0;
-
-		/* if the read failed it could just be a mailbox collision, best wait
-		 * until we are called again and don't report an error
-		 */
-		if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
-			goto out;
+	/* if the read failed it could just be a mailbox collision, best wait
+	 * until we are called again and don't report an error
+	 */
+	if (ixgbe_read_mbx(hw, &in_msg, 1, 0)) {
+		if (hw->api_version >= ixgbe_mbox_api_15)
+			mac->get_link_status = FALSE;
+		goto out;
+	}
 
-		if (!(in_msg & IXGBE_VT_MSGTYPE_CTS)) {
-			/* msg is not CTS and is NACK we must have lost CTS status */
-			if (in_msg & IXGBE_VT_MSGTYPE_FAILURE)
-ret_val = IXGBE_ERR_MBX;
-			goto out;
-		}
+	if (!(in_msg & IXGBE_VT_MSGTYPE_CTS)) {
+		/* msg is not CTS and is NACK we must have lost CTS status */
+		if (in_msg & IXGBE_VT_MSGTYPE_FAILURE)
+			ret_val = IXGBE_ERR_MBX;
+		goto out;
+	}
 
-		/* the pf is talking, if we timed out in the past we reinit */
-		if (!mbx->timeout) {
-			ret_val = IXGBE_ERR_TIMEOUT;
-			goto out;
-		}
+	/* the pf is talking, if we timed out in the past we reinit */
+	if (!mbx->timeout) {
+		ret_val = IXGBE_ERR_TIMEOUT;
+		goto out;
 	}
 
 	/* if we passed all the tests above then the link is up and we no



CVS commit: src/sys/dev/pci/ixgbe

2023-10-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct  6 14:32:05 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_vf.c

Log Message:
ixv(4): Improve error check.

 ixgbe_vf.c rev. 1.31 changed the behavior of the ixgbe_check_mac_link_vf()
function. It was from FreeBSD's ixv-1.5.25 to resolve mailbox collision
problem. The change had a problem that error checks have not done at all if
the API version >= 1.5. Fix it. From FreeBSD ixv-1.5.27.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/ixgbe/ixgbe_vf.c

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



CVS commit: src/doc

2023-10-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Oct  6 13:39:56 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
doc/CHANGES: Note igc(4) addition

Will be pulled up to netbsd-10 soon, and this entry will migrate to
CHANGES.prev also.


To generate a diff of this commit:
cvs rdiff -u -r1.3003 -r1.3004 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.3003 src/doc/CHANGES:1.3004
--- src/doc/CHANGES:1.3003	Fri Oct  6 08:53:14 2023
+++ src/doc/CHANGES	Fri Oct  6 13:39:56 2023
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3003 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3004 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -223,6 +223,8 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 	sqlite3(1): Import 3.34.0. [christos 20230904]
 	namecache: Tune the namecache for 32-bit systems [ad 20230909]
 	tzcode: Updated to 2023c. [christos 20230916]
+	igc(4): Add initial support to Intel I225/I226 series Ethernet devices.
+		[knakahara, rin, msaitoh 20231006]
 	less: Updated to version 643.  [simonb 20231006]
 	dhcpcd: Import version 10.0.3. [roy 20231006]
 



CVS commit: src/doc

2023-10-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Oct  6 13:39:56 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
doc/CHANGES: Note igc(4) addition

Will be pulled up to netbsd-10 soon, and this entry will migrate to
CHANGES.prev also.


To generate a diff of this commit:
cvs rdiff -u -r1.3003 -r1.3004 src/doc/CHANGES

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



CVS commit: src/sys/arch

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:53:27 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: vm_machdep.c
src/sys/arch/ia64/ia64: vm_machdep.c
src/sys/arch/sh3/sh3: vm_machdep.c
src/sys/arch/x86/x86: vm_machdep.c

Log Message:
Convert the l2->l_md.md_astpending assignments into KASSERTs.

l_md is zeroised by lwp_create with

 memset(&l2->l_startzero, 0, sizeof(*l2) -
offsetof(lwp_t, l_startzero));


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/alpha/alpha/vm_machdep.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/ia64/ia64/vm_machdep.c
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/sh3/sh3/vm_machdep.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/x86/x86/vm_machdep.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/alpha/alpha/vm_machdep.c
diff -u src/sys/arch/alpha/alpha/vm_machdep.c:1.122 src/sys/arch/alpha/alpha/vm_machdep.c:1.123
--- src/sys/arch/alpha/alpha/vm_machdep.c:1.122	Sun Dec  5 07:53:57 2021
+++ src/sys/arch/alpha/alpha/vm_machdep.c	Fri Oct  6 11:53:26 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.122 2021/12/05 07:53:57 msaitoh Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.123 2023/10/06 11:53:26 skrll Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.122 2021/12/05 07:53:57 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.123 2023/10/06 11:53:26 skrll Exp $");
 
 #include 
 #include 
@@ -102,7 +102,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 
 	l2->l_md.md_tf = l1->l_md.md_tf;
 	l2->l_md.md_flags = l1->l_md.md_flags & MDLWP_FP_C;
-	l2->l_md.md_astpending = 0;
+	KASSERT(l2->l_md.md_astpending == 0);
 
 	/*
 	 * Cache the physical address of the pcb, so we can

Index: src/sys/arch/ia64/ia64/vm_machdep.c
diff -u src/sys/arch/ia64/ia64/vm_machdep.c:1.19 src/sys/arch/ia64/ia64/vm_machdep.c:1.20
--- src/sys/arch/ia64/ia64/vm_machdep.c:1.19	Fri Oct  6 11:45:16 2023
+++ src/sys/arch/ia64/ia64/vm_machdep.c	Fri Oct  6 11:53:27 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.19 2023/10/06 11:45:16 skrll Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.20 2023/10/06 11:53:27 skrll Exp $	*/
 
 /*
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -174,9 +174,9 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 
 	l2->l_md.md_flags = l1->l_md.md_flags;
 	l2->l_md.md_tf = (struct trapframe *)(ua2 + UAREA_TF_OFFSET);
-	l2->l_md.md_astpending = 0;
 	l2->l_md.user_stack = NULL;
 	l2->l_md.user_stack_size = 0;
+	KASSERT(l2->l_md.md_astpending == 0);
 
 /*
 	 * Copy the trapframe.

Index: src/sys/arch/sh3/sh3/vm_machdep.c
diff -u src/sys/arch/sh3/sh3/vm_machdep.c:1.82 src/sys/arch/sh3/sh3/vm_machdep.c:1.83
--- src/sys/arch/sh3/sh3/vm_machdep.c:1.82	Tue May 24 06:28:00 2022
+++ src/sys/arch/sh3/sh3/vm_machdep.c	Fri Oct  6 11:53:27 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.82 2022/05/24 06:28:00 andvar Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.83 2023/10/06 11:53:27 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -81,7 +81,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.82 2022/05/24 06:28:00 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.83 2023/10/06 11:53:27 skrll Exp $");
 
 #include "opt_kstack_debug.h"
 
@@ -147,7 +147,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 	sh3_setup_uarea(l2);
 
 	l2->l_md.md_flags = l1->l_md.md_flags;
-	l2->l_md.md_astpending = 0;
+	KASSERT(l2->l_md.md_astpending == 0);
 
 	/* Copy user context, may be give a different stack */
 	memcpy(l2->l_md.md_regs, l1->l_md.md_regs, sizeof(struct trapframe));

Index: src/sys/arch/x86/x86/vm_machdep.c
diff -u src/sys/arch/x86/x86/vm_machdep.c:1.45 src/sys/arch/x86/x86/vm_machdep.c:1.46
--- src/sys/arch/x86/x86/vm_machdep.c:1.45	Sun Mar 28 10:29:05 2021
+++ src/sys/arch/x86/x86/vm_machdep.c	Fri Oct  6 11:53:27 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.45 2021/03/28 10:29:05 skrll Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.46 2023/10/06 11:53:27 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.45 2021/03/28 10:29:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.46 2023/10/06 11:53:27 skrll Exp $");
 
 #include "opt_mtrr.h"
 
@@ -204,7 +204,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 	}
 
 	l2->l_md.md_flags = l1->l_md.md_flags;
-	l2->l_md.md_astpending = 0;
+	KASSERT(l2->l_md.md_astpending == 0);
 
 	sf = (struct switchframe *)tf - 1;
 



CVS commit: src/sys/arch

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:53:27 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: vm_machdep.c
src/sys/arch/ia64/ia64: vm_machdep.c
src/sys/arch/sh3/sh3: vm_machdep.c
src/sys/arch/x86/x86: vm_machdep.c

Log Message:
Convert the l2->l_md.md_astpending assignments into KASSERTs.

l_md is zeroised by lwp_create with

 memset(&l2->l_startzero, 0, sizeof(*l2) -
offsetof(lwp_t, l_startzero));


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/alpha/alpha/vm_machdep.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/ia64/ia64/vm_machdep.c
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/sh3/sh3/vm_machdep.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/x86/x86/vm_machdep.c

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



CVS commit: src/sys/arch/ia64/include

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:45:37 UTC 2023

Modified Files:
src/sys/arch/ia64/include: asm.h bootinfo.h cpu.h db_machdep.h
ia64_cpu.h int_limits.h intrdefs.h loadfile_machdep.h lock.h
param.h pmap.h proc.h setjmp.h userret.h vmparam.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/include/asm.h \
src/sys/arch/ia64/include/pmap.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/bootinfo.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/ia64/include/cpu.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/db_machdep.h \
src/sys/arch/ia64/include/setjmp.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/ia64_cpu.h \
src/sys/arch/ia64/include/intrdefs.h \
src/sys/arch/ia64/include/loadfile_machdep.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/int_limits.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/include/lock.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/include/param.h \
src/sys/arch/ia64/include/vmparam.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/include/proc.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/userret.h

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



CVS commit: src/sys/arch/ia64/include

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:45:37 UTC 2023

Modified Files:
src/sys/arch/ia64/include: asm.h bootinfo.h cpu.h db_machdep.h
ia64_cpu.h int_limits.h intrdefs.h loadfile_machdep.h lock.h
param.h pmap.h proc.h setjmp.h userret.h vmparam.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/include/asm.h \
src/sys/arch/ia64/include/pmap.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/bootinfo.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/ia64/include/cpu.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/include/db_machdep.h \
src/sys/arch/ia64/include/setjmp.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/ia64_cpu.h \
src/sys/arch/ia64/include/intrdefs.h \
src/sys/arch/ia64/include/loadfile_machdep.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/int_limits.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/include/lock.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/include/param.h \
src/sys/arch/ia64/include/vmparam.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/include/proc.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/include/userret.h

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

Modified files:

Index: src/sys/arch/ia64/include/asm.h
diff -u src/sys/arch/ia64/include/asm.h:1.8 src/sys/arch/ia64/include/asm.h:1.9
--- src/sys/arch/ia64/include/asm.h:1.8	Fri Apr 17 14:19:43 2020
+++ src/sys/arch/ia64/include/asm.h	Fri Oct  6 11:45:37 2023
@@ -1,26 +1,26 @@
-/*	$NetBSD: asm.h,v 1.8 2020/04/17 14:19:43 joerg Exp $	*/
+/*	$NetBSD: asm.h,v 1.9 2023/10/06 11:45:37 skrll Exp $	*/
 
 /* -
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  software.distribut...@cs.cmu.edu
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  */
Index: src/sys/arch/ia64/include/pmap.h
diff -u src/sys/arch/ia64/include/pmap.h:1.8 src/sys/arch/ia64/include/pmap.h:1.9
--- src/sys/arch/ia64/include/pmap.h:1.8	Sat Apr  8 18:08:33 2017
+++ src/sys/arch/ia64/include/pmap.h	Fri Oct  6 11:45:37 2023
@@ -178,10 +178,10 @@ void pmap_procwr(struct proc *, vaddr_t,
 struct vm_page_md {
 	TAILQ_HEAD(,pv_entry)	pv_list;
 	vm_memattr_t		memattr;
-#if 0 /* XXX freebsd */	
+#if 0 /* XXX freebsd */
 	uint8_t		pv_flags;
 	uint8_t		aflags;
-#endif	
+#endif
 };
 
 #define	VM_MDPAGE_INIT(pg)		\

Index: src/sys/arch/ia64/include/bootinfo.h
diff -u src/sys/arch/ia64/include/bootinfo.h:1.2 src/sys/arch/ia64/include/bootinfo.h:1.3
--- src/sys/arch/ia64/include/bootinfo.h:1.2	Thu Dec 26 04:53:11 2019
+++ src/sys/arch/ia64/include/bootinfo.h	Fri Oct  6 11:45:37 2023
@@ -1,21 +1,21 @@
-/*	$NetBSD: bootinfo.h,v 1.2 2019/12/26 04:53:11 msaitoh Exp $	*/
+/*	$NetBSD: bootinfo.h,v 1.3 2023/10/06 11:45:37 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
  * All rights reserved.
  *
  * Author: Chris G. Demetriou
- * 
+ *
  * Permission to use, copy, modify and distribute this software and
  * its documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
- * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
  *
  *  Software Distribution Coordinator  or  software.distribut...@cs.cmu.edu

Index: src/sys/arch/ia64/include/cpu.h
diff -u src/sys/arch/ia64/include/cpu.h:1.21 src/sys/arch/ia64/include/cpu.h:1.22
--- src/sys/arch/ia64/include/cpu.h:1.21	Tue May 31 08:43:14 2022
+++ src/sys/arch/ia64/include/cpu.h	Fri Oct  6 11:45:37 

CVS commit: src/sys/arch/ia64/ia64

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:45:16 UTC 2023

Modified Files:
src/sys/arch/ia64/ia64: context.S db_trace.c exception.S genassym.cf
interrupt.c locore.S machdep.c pal.S pmap.c process_machdep.c
setjmp.S sys_machdep.c syscall_stubs.S vm_machdep.c

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/ia64/context.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/db_trace.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/ia64/exception.S \
src/sys/arch/ia64/ia64/process_machdep.c \
src/sys/arch/ia64/ia64/sys_machdep.c \
src/sys/arch/ia64/ia64/syscall_stubs.S
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/ia64/ia64/genassym.cf
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/ia64/interrupt.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/ia64/locore.S
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/ia64/ia64/machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/ia64/pal.S \
src/sys/arch/ia64/ia64/setjmp.S
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/ia64/ia64/pmap.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ia64/ia64/vm_machdep.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/ia64/ia64/context.S
diff -u src/sys/arch/ia64/ia64/context.S:1.8 src/sys/arch/ia64/ia64/context.S:1.9
--- src/sys/arch/ia64/ia64/context.S:1.8	Sat Apr  8 17:38:43 2017
+++ src/sys/arch/ia64/ia64/context.S	Fri Oct  6 11:45:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: context.S,v 1.8 2017/04/08 17:38:43 scole Exp $	*/
+/*	$NetBSD: context.S,v 1.9 2023/10/06 11:45:16 skrll Exp $	*/
 
 /*
  * Copyright (c) 2003 Marcel Moolenaar
@@ -657,7 +657,7 @@ ENTRY(restore_high_fp, 1)
 	ldf.fill	f32=[r32],32
 	;;
 	ldf.fill	f33=[r31],32
-	ldf.fill	f34=[r32],32	
+	ldf.fill	f34=[r32],32
 	;;
 	ldf.fill	f35=[r31],32
 	ldf.fill	f36=[r32],32

Index: src/sys/arch/ia64/ia64/db_trace.c
diff -u src/sys/arch/ia64/ia64/db_trace.c:1.5 src/sys/arch/ia64/ia64/db_trace.c:1.6
--- src/sys/arch/ia64/ia64/db_trace.c:1.5	Sun Jul 31 19:10:54 2016
+++ src/sys/arch/ia64/ia64/db_trace.c	Fri Oct  6 11:45:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_trace.c,v 1.5 2016/07/31 19:10:54 dholland Exp $	*/
+/*	$NetBSD: db_trace.c,v 1.6 2023/10/06 11:45:16 skrll Exp $	*/
 
 /* Inspired by reading alpha/db_trace.c */
 
@@ -122,7 +122,7 @@ db_stack_trace_print(db_expr_t addr, boo
 
 
 	} else (*pr) ("Unwind from arbitrary addresses unimplemented. \n");
-		
+
 
 		if (trace_thread) {
 			(*pr)("trace by pid unimplemented. \n");
@@ -139,14 +139,14 @@ extern vsize_t ia64_unwindtablen;
 
 
 /* Generates initial unwind frame context based on the contents
- * of the trap frame, by consulting the Unwind library 
+ * of the trap frame, by consulting the Unwind library
  * staterecord. If a register is of type enum UNSAVED, we fetch
  * the live value of the register from the trapframe.
  */
 
 void
 initunwindframe(struct unwind_frame *uwf, struct trapframe *tf)
-		 
+
 {
 
 	uwf->rp = tf->tf_special.rp;
@@ -165,10 +165,10 @@ initunwindframe(struct unwind_frame *uwf
 
 
 }
-		
 
 
-/* Single step the frame backward. 
+
+/* Single step the frame backward.
  * Assumes unwind_frame is setup already.
  */
 
@@ -185,7 +185,7 @@ rewindframe(struct unwind_frame *uwf, db
 	debug_frame_dump_XXX(uwf);
 #endif
 
-	/* Stomp on rp and pfs 
+	/* Stomp on rp and pfs
 	 */
 	KASSERT(ip >= kernstart);
 	patchunwindframe(uwf, ip - kernstart, kernstart);

Index: src/sys/arch/ia64/ia64/exception.S
diff -u src/sys/arch/ia64/ia64/exception.S:1.6 src/sys/arch/ia64/ia64/exception.S:1.7
--- src/sys/arch/ia64/ia64/exception.S:1.6	Sat Apr  8 17:42:47 2017
+++ src/sys/arch/ia64/ia64/exception.S	Fri Oct  6 11:45:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: exception.S,v 1.6 2017/04/08 17:42:47 scole Exp $ */
+/*	$NetBSD: exception.S,v 1.7 2023/10/06 11:45:16 skrll Exp $ */
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -31,7 +31,7 @@
 /* __FBSDID("$FreeBSD: releng/10.1/sys/ia64/ia64/exception.S 268200 2014-07-02 23:47:43Z marcel $"); */
 
 #include "assym.h"
-	
+
 /*
  * Nested TLB restart tokens. These are used by the
  * nested TLB handler for jumping back to the code
@@ -54,7 +54,7 @@
 	.size	ia64_kptdir, 8
 ia64_kptdir:	data8	0
 
-	
+
 #ifdef XTRACE
 
 	.align	8
@@ -747,7 +747,7 @@ ENTRY_NOPROFILE(exception_restore, 0)
 {	.mmi
 	mov		ar.rsc=r31		// setup for loadrs
 	mov		ar.k7=r16
-	addl		r29=NTLBRT_RESTORE,r0	// 22-bit restart token 
+	addl		r29=NTLBRT_RESTORE,r0	// 22-bit restart token
 	;;
 }
 
@@ -873,7 +873,7 @@ IVT_ENTRY(Instruction_TLB, 0x0400)
 	;;
 	add	r21=16,r18		// tag
 	add	r20=24,r18		// collision chain
-	;; 
+	;;
 	ld8	r21=[r21]		// check VHPT tag
 	ld8	r20=[r20]		// bucket head
 	;;
@@ -909,7 +909,7 @@ IVT_ENTRY(Instruction_TLB, 0x0400)
 	or	r21=r21,r22
 	;;
 	st8	[r20]=r21,8
-	;; 
+	;;
 	ld8	r22=[r20]		// read rest of pte
 	;;
 	dep	r18=0,r18,61,3		// convert vhpt ptr to physical
@@ -932,7 +932,7 @@ IV

CVS commit: src/sys/arch/ia64/ia64

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 11:45:16 UTC 2023

Modified Files:
src/sys/arch/ia64/ia64: context.S db_trace.c exception.S genassym.cf
interrupt.c locore.S machdep.c pal.S pmap.c process_machdep.c
setjmp.S sys_machdep.c syscall_stubs.S vm_machdep.c

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/ia64/context.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/db_trace.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/ia64/exception.S \
src/sys/arch/ia64/ia64/process_machdep.c \
src/sys/arch/ia64/ia64/sys_machdep.c \
src/sys/arch/ia64/ia64/syscall_stubs.S
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/ia64/ia64/genassym.cf
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ia64/ia64/interrupt.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/ia64/locore.S
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/ia64/ia64/machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/ia64/pal.S \
src/sys/arch/ia64/ia64/setjmp.S
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/ia64/ia64/pmap.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ia64/ia64/vm_machdep.c

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



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

2023-10-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  6 09:53:02 UTC 2023

Modified Files:
src/sys/arch/arm/arm32: fault.c

Log Message:
Fix previous and restore setting of "user" flag from trapframe.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/arm/arm32/fault.c

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

Modified files:

Index: src/sys/arch/arm/arm32/fault.c
diff -u src/sys/arch/arm/arm32/fault.c:1.117 src/sys/arch/arm/arm32/fault.c:1.118
--- src/sys/arch/arm/arm32/fault.c:1.117	Thu Oct  5 19:41:03 2023
+++ src/sys/arch/arm/arm32/fault.c	Fri Oct  6 09:53:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fault.c,v 1.117 2023/10/05 19:41:03 ad Exp $	*/
+/*	$NetBSD: fault.c,v 1.118 2023/10/06 09:53:02 martin Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.117 2023/10/05 19:41:03 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.118 2023/10/06 09:53:02 martin Exp $");
 
 #include 
 
@@ -819,13 +819,14 @@ prefetch_abort_handler(trapframe_t *tf)
 
 	l = curlwp;
 	pcb = lwp_getpcb(l);
+	user = TRAP_USERMODE(tf) != 0;
 
 	/*
 	 * Enable IRQ's (disabled by the abort) This always comes
 	 * from user mode so we know interrupts were not disabled.
 	 * But we check anyway.
 	 */
-	KASSERT(!TRAP_USERMODE(tf) || VALID_PSR(tf->tf_spsr));
+	KASSERT(!user || VALID_PSR(tf->tf_spsr));
 #ifdef __NO_FIQ
 	if (__predict_true((tf->tf_spsr & I32_bit) != I32_bit))
 		restore_interrupts(tf->tf_spsr & IF32_bits);



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

2023-10-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  6 09:53:02 UTC 2023

Modified Files:
src/sys/arch/arm/arm32: fault.c

Log Message:
Fix previous and restore setting of "user" flag from trapframe.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/arm/arm32/fault.c

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



CVS commit: src/doc

2023-10-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct  6 08:53:14 UTC 2023

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note update to dhcpcd-10.0.3


To generate a diff of this commit:
cvs rdiff -u -r1.1955 -r1.1956 src/doc/3RDPARTY
cvs rdiff -u -r1.3002 -r1.3003 src/doc/CHANGES

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.1955 src/doc/3RDPARTY:1.1956
--- src/doc/3RDPARTY:1.1955	Tue Sep 26 21:38:11 2023
+++ src/doc/3RDPARTY	Fri Oct  6 08:53:14 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1955 2023/09/26 21:38:11 gutteridge Exp $
+#	$NetBSD: 3RDPARTY,v 1.1956 2023/10/06 08:53:14 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -352,13 +352,13 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	10.0.2
-Current Vers:	10.0.2
+Version:	10.0.3
+Current Vers:	10.0.3
 Maintainer:	roy
 Archive Site:	https://github.com/NetworkConfiguration/dhcpcd/releases
 Home Page:	https://roy.marples.name/projects/dhcpcd/
 Home Page:	https://github.com/NetworkConfiguration/dhcpcd
-Date:		2023-07-19
+Date:		2023-10-06
 License:	BSD (2-clause)
 Location:	external/bsd/dhcpcd/dist
 Notes:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.3002 src/doc/CHANGES:1.3003
--- src/doc/CHANGES:1.3002	Fri Oct  6 06:03:52 2023
+++ src/doc/CHANGES	Fri Oct  6 08:53:14 2023
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3002 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3003 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -224,3 +224,5 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 	namecache: Tune the namecache for 32-bit systems [ad 20230909]
 	tzcode: Updated to 2023c. [christos 20230916]
 	less: Updated to version 643.  [simonb 20231006]
+	dhcpcd: Import version 10.0.3. [roy 20231006]
+



CVS commit: src/doc

2023-10-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct  6 08:53:14 UTC 2023

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note update to dhcpcd-10.0.3


To generate a diff of this commit:
cvs rdiff -u -r1.1955 -r1.1956 src/doc/3RDPARTY
cvs rdiff -u -r1.3002 -r1.3003 src/doc/CHANGES

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



CVS commit: src/external/bsd/dhcpcd/dist/src

2023-10-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct  6 08:49:42 UTC 2023

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c dhcpcd.c if-options.c
ipv6nd.c privsep.c

Log Message:
sync with dhcpcd-10.0.3


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/external/bsd/dhcpcd/dist/src/dhcp.c
cvs rdiff -u -r1.30 -r1.31 src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.51 -r1.52 src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.34 -r1.35 src/external/bsd/dhcpcd/dist/src/if-options.c
cvs rdiff -u -r1.29 -r1.30 src/external/bsd/dhcpcd/dist/src/ipv6nd.c
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/privsep.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/dhcpcd/dist/src/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.48 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.49
--- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.48	Wed Jul 19 13:53:03 2023
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c	Fri Oct  6 08:49:42 2023
@@ -3314,7 +3314,8 @@ dhcp_handledhcp(struct interface *ifp, s
 			state->reason = "TEST";
 			script_runreason(ifp, state->reason);
 			eloop_exit(ifp->ctx->eloop, EXIT_SUCCESS);
-			state->bpf->bpf_flags |= BPF_EOF;
+			if (state->bpf)
+state->bpf->bpf_flags |= BPF_EOF;
 			return;
 		}
 		eloop_timeout_delete(ifp->ctx->eloop, send_discover, ifp);

Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.30 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.31
--- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.30	Wed Jul 19 13:53:03 2023
+++ src/external/bsd/dhcpcd/dist/src/dhcp6.c	Fri Oct  6 08:49:42 2023
@@ -1022,9 +1022,11 @@ dhcp6_makemessage(struct interface *ifp)
 		n--;
 	while (n-- > 0)
 		*ep++ = *pp--;
-	if (u8)
+	n = (size_t)(ep - exb);
+	if (u8) {
 		*ep = (uint8_t)(*pp << u8);
-	n++;
+		n++;
+	}
 	COPYIN(D6_OPTION_PD_EXCLUDE, exb,
 	(uint16_t)n);
 	ia_na_len = (uint16_t)
@@ -1628,6 +1630,7 @@ dhcp6_startdiscover(void *arg)
 	struct interface *ifp;
 	struct dhcp6_state *state;
 	int llevel;
+	struct ipv6_addr *ia;
 
 	ifp = arg;
 	state = D6_STATE(ifp);
@@ -1652,6 +1655,14 @@ dhcp6_startdiscover(void *arg)
 	state->new = NULL;
 	state->new_len = 0;
 
+	/* If we fail to renew or confirm, our requested addreses will
+	 * be marked as stale.
+	 To re-request them, just mark them as not stale. */
+	TAILQ_FOREACH(ia, &state->addrs, next) {
+		if (ia->flags & IPV6_AF_REQUEST)
+			ia->flags &= ~IPV6_AF_STALE;
+	}
+
 	if (dhcp6_makemessage(ifp) == -1)
 		logerr("%s: %s", __func__, ifp->name);
 	else
@@ -2268,9 +2279,7 @@ dhcp6_findpd(struct interface *ifp, cons
 		} else {
 			if (!(a->flags & IPV6_AF_DELEGATEDPFX))
 a->flags |= IPV6_AF_NEW | IPV6_AF_DELEGATEDPFX;
-			a->flags &= ~(IPV6_AF_STALE |
-  IPV6_AF_EXTENDED |
-  IPV6_AF_REQUEST);
+			a->flags &= ~(IPV6_AF_STALE | IPV6_AF_EXTENDED);
 			if (a->prefix_vltime != pdp.vltime)
 a->flags |= IPV6_AF_NEW;
 		}

Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.51 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.52
--- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.51	Wed Jul 19 13:53:03 2023
+++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c	Fri Oct  6 08:49:42 2023
@@ -75,6 +75,9 @@ static const char dhcpcd_copyright[] = "
 #ifdef HAVE_CAPSICUM
 #include 
 #endif
+#ifdef HAVE_OPENSSL
+#include 
+#endif
 #ifdef HAVE_UTIL_H
 #include 
 #endif
@@ -1411,6 +1414,7 @@ dhcpcd_renew(struct dhcpcd_ctx *ctx)
 
 #ifdef USE_SIGNALS
 #define sigmsg "received %s, %s"
+static volatile bool dhcpcd_exiting = false;
 void
 dhcpcd_signal_cb(int sig, void *arg)
 {
@@ -1483,9 +1487,20 @@ dhcpcd_signal_cb(int sig, void *arg)
 		return;
 	}
 
+	/*
+	 * Privsep has a mini-eloop for reading data from other processes.
+	 * This mini-eloop processes signals as well so we can reap children.
+	 * During teardown we don't want to process SIGTERM or SIGINT again,
+	 * as that could trigger memory issues.
+	 */
+	if (dhcpcd_exiting)
+		return;
+
+	dhcpcd_exiting = true;
 	if (!(ctx->options & DHCPCD_TEST))
 		stop_all_interfaces(ctx, opts);
 	eloop_exit(ctx->eloop, exit_code);
+	dhcpcd_exiting = false;
 }
 #endif
 
@@ -1495,7 +1510,7 @@ dhcpcd_handleargs(struct dhcpcd_ctx *ctx
 {
 	struct interface *ifp;
 	unsigned long long opts;
-	int opt, oi, do_reboot, do_renew, af = AF_UNSPEC;
+	int opt, oi, oifind, do_reboot, do_renew, af = AF_UNSPEC;
 	size_t len, l, nifaces;
 	char *tmp, *p;
 
@@ -1511,7 +1526,7 @@ dhcpcd_handleargs(struct dhcpcd_ctx *ctx
 		return control_queue(fd, UNCONST(fd->ctx->cffile),
 		strlen(fd->ctx->cffile) + 1);
 	} else if (strcmp(*argv, "--getinterfaces") == 0) {
-		optind = argc = 0;
+		oifind = argc = 0;
 		goto dumplease;
 	} else if (strcmp(*argv, "--listen") == 0) {
 		fd->flags |= FD_LISTEN;
@@ -1574

CVS commit: src/external/bsd/dhcpcd/dist/src

2023-10-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct  6 08:49:42 UTC 2023

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c dhcpcd.c if-options.c
ipv6nd.c privsep.c

Log Message:
sync with dhcpcd-10.0.3


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/external/bsd/dhcpcd/dist/src/dhcp.c
cvs rdiff -u -r1.30 -r1.31 src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.51 -r1.52 src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.34 -r1.35 src/external/bsd/dhcpcd/dist/src/if-options.c
cvs rdiff -u -r1.29 -r1.30 src/external/bsd/dhcpcd/dist/src/ipv6nd.c
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/privsep.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/riscv/include

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 08:48:49 UTC 2023

Modified Files:
src/sys/arch/riscv/include: pmap.h

Log Message:
Not all RISC-V CPUs have ASIDs


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/riscv/include/pmap.h

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

Modified files:

Index: src/sys/arch/riscv/include/pmap.h
diff -u src/sys/arch/riscv/include/pmap.h:1.21 src/sys/arch/riscv/include/pmap.h:1.22
--- src/sys/arch/riscv/include/pmap.h:1.21	Sun Sep  3 08:48:20 2023
+++ src/sys/arch/riscv/include/pmap.h	Fri Oct  6 08:48:49 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.21 2023/09/03 08:48:20 skrll Exp $ */
+/* $NetBSD: pmap.h,v 1.22 2023/10/06 08:48:49 skrll Exp $ */
 
 /*
  * Copyright (c) 2014, 2019, 2021 The NetBSD Foundation, Inc.
@@ -81,6 +81,7 @@
 
 #define	PMAP_HWPAGEWALKER		1
 #define	PMAP_TLB_MAX			1
+#define	PMAP_TLB_ALWAYS_ASIDS		false
 #ifdef _LP64
 #define	PMAP_INVALID_PDETAB_ADDRESS	((pmap_pdetab_t *)(VM_MIN_KERNEL_ADDRESS - PAGE_SIZE))
 #define	PMAP_INVALID_SEGTAB_ADDRESS	((pmap_segtab_t *)(VM_MIN_KERNEL_ADDRESS - PAGE_SIZE))



CVS commit: src/sys/arch/riscv/include

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 08:48:49 UTC 2023

Modified Files:
src/sys/arch/riscv/include: pmap.h

Log Message:
Not all RISC-V CPUs have ASIDs


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/riscv/include/pmap.h

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



CVS commit: src/sys/uvm/pmap

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 08:48:16 UTC 2023

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c pmap_tlb.h

Log Message:
Support CPUs that might not have ASIDs in the common pmap.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/uvm/pmap/pmap_tlb.c
cvs rdiff -u -r1.16 -r1.17 src/sys/uvm/pmap/pmap_tlb.h

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



CVS commit: src/sys/uvm/pmap

2023-10-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  6 08:48:16 UTC 2023

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c pmap_tlb.h

Log Message:
Support CPUs that might not have ASIDs in the common pmap.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/uvm/pmap/pmap_tlb.c
cvs rdiff -u -r1.16 -r1.17 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.60 src/sys/uvm/pmap/pmap_tlb.c:1.61
--- src/sys/uvm/pmap/pmap_tlb.c:1.60	Tue Aug  1 08:17:26 2023
+++ src/sys/uvm/pmap/pmap_tlb.c	Fri Oct  6 08:48:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.60 2023/08/01 08:17:26 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.61 2023/10/06 08:48:16 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.60 2023/08/01 08:17:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.61 2023/10/06 08:48:16 skrll Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -830,6 +830,22 @@ pmap_tlb_asid_alloc(struct pmap_tlb_info
 	KASSERT(ti->ti_asids_free > 0);
 	KASSERT(ti->ti_asid_hint > KERNEL_PID);
 
+	if (__predict_false(!tlbinfo_asids_p(ti))) {
+#if defined(MULTIPROCESSOR)
+		/*
+		 * Mark that we are active for all CPUs sharing this TLB.
+		 * The bits in pm_active belonging to this TLB can only
+		 * be changed  while this TLBs lock is held.
+		 */
+#if PMAP_TLB_MAX == 1
+		kcpuset_copy(pm->pm_active, kcpuset_running);
+#else
+		kcpuset_merge(pm->pm_active, ti->ti_kcpuset);
+#endif
+#endif
+		return;
+	}
+
 	/*
 	 * If the last ASID allocated was the maximum ASID, then the
 	 * hint will be out of range.  Reset the hint to first
@@ -937,7 +953,7 @@ pmap_tlb_asid_acquire(pmap_t pm, struct 
 		/*
 		 * If we've run out ASIDs, reinitialize the ASID space.
 		 */
-		if (__predict_false(tlbinfo_noasids_p(ti))) {
+		if (__predict_false(tlbinfo_asids_p(ti) && tlbinfo_noasids_p(ti))) {
 			KASSERT(l == curlwp);
 			UVMHIST_LOG(maphist, " asid reinit", 0, 0, 0, 0);
 			pmap_tlb_asid_reinitialize(ti, TLBINV_NOBODY);

Index: src/sys/uvm/pmap/pmap_tlb.h
diff -u src/sys/uvm/pmap/pmap_tlb.h:1.16 src/sys/uvm/pmap/pmap_tlb.h:1.17
--- src/sys/uvm/pmap/pmap_tlb.h:1.16	Wed Oct 26 07:35:20 2022
+++ src/sys/uvm/pmap/pmap_tlb.h	Fri Oct  6 08:48:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.h,v 1.16 2022/10/26 07:35:20 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.h,v 1.17 2023/10/06 08:48:16 skrll Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -86,6 +86,10 @@
 # endif
 #endif
 
+#if !defined(PMAP_TLB_ALWAYS_ASIDS)
+#define	PMAP_TLB_ALWAYS_ASIDS	true
+#endif
+
 /*
  * Per TLB (normally same as CPU) asid info
  */
@@ -97,7 +101,7 @@ struct pmap_asid_info {
 #define	TLBINFO_LOCK(ti)		mutex_spin_enter((ti)->ti_lock)
 #define	TLBINFO_UNLOCK(ti)		mutex_spin_exit((ti)->ti_lock)
 #define	TLBINFO_OWNED(ti)		mutex_owned((ti)->ti_lock)
-#define	PMAP_PAI_ASIDVALID_P(pai, ti)	((pai)->pai_asid != 0)
+#define	PMAP_PAI_ASIDVALID_P(pai, ti)	(!tlbinfo_asids_p(ti) || (pai)->pai_asid != 0)
 #define	PMAP_PAI(pmap, ti)		(&(pmap)->pm_pai[tlbinfo_index(ti)])
 #define	PAI_PMAP(pai, ti)	\
 	((pmap_t)((intptr_t)(pai) \
@@ -188,5 +192,11 @@ void	pmap_tlb_asid_check(void);
 /* for ddb */
 void pmap_db_tlb_print(struct pmap *, void (*)(const char *, ...) __printflike(1, 2));
 
+static inline bool
+tlbinfo_asids_p(struct pmap_tlb_info *ti)
+{
+	return PMAP_TLB_ALWAYS_ASIDS || (ti)->ti_asid_max != 0;
+}
+
 #endif	/* _KERNEL */
 #endif	/* _UVM_PMAP_PMAP_TLB_H_ */



CVS import: src/external/bsd/dhcpcd/dist

2023-10-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct  6 08:46:23 UTC 2023

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv14109

Log Message:
Import dhcpcd-10.0.3 with the following changes:

DHCP: Don't crash on a test run
dhcpcd: Fix off-by-one overflow when read() writes full BUFSIZ
privsep: fix strlcpy overflow in psp_ifname
privsep: Fix a FD leak when processes exit
dhcpcd: Use a local variable instead of the optind
dhcpcd: Guard against handling many SIGTERM/SIGINT
DHCP6: Send correct amount of used buffer for prefix exclude option
options: andsf6 is DHCPv6, not DHCP
options: introduce the uri option as opposed to a string
DHCP6: Set all requested addrs as not stale when starting discovery

Status:

Vendor Tag: ROY
Release Tags:   dhcpcd-10_0_3

U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/control.c
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/logerr.c
U src/external/bsd/dhcpcd/dist/src/if.c
C src/external/bsd/dhcpcd/dist/src/if-options.c
U src/external/bsd/dhcpcd/dist/src/sa.c
U src/external/bsd/dhcpcd/dist/src/route.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/script.c
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/if-bsd.c
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/ipv4.c
U src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/ipv4ll.c
U src/external/bsd/dhcpcd/dist/src/ipv6.c
C src/external/bsd/dhcpcd/dist/src/ipv6nd.c
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c
C src/external/bsd/dhcpcd/dist/src/privsep.c
U src/external/bsd/dhcpcd/dist/src/privsep-root.c
U src/external/bsd/dhcpcd/dist/src/privsep-control.c
U src/external/bsd/dhcpcd/dist/src/privsep-inet.c
U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c
U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/logerr.h
U src/external/bsd/dhcpcd/dist/src/if.h
U src/external/bsd/dhcpcd/dist/src/if-options.h
U src/external/bsd/dhcpcd/dist/src/sa.h
U src/external/bsd/dhcpcd/dist/src/route.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
U src/external/bsd/dhcpcd/dist/src/script.h
U src/external/bsd/dhcpcd/dist/src/auth.h
U src/external/bsd/dhcpcd/dist/src/dhcp.h
U src/external/bsd/dhcpcd/dist/src/ipv4.h
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/ipv4ll.h
U src/external/bsd/dhcpcd/dist/src/ipv6.h
U src/external/bsd/dhcpcd/dist/src/ipv6nd.h
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h
U src/external/bsd/dhcpcd/dist/src/privsep.h
U src/external/bsd/dhcpcd/dist/src/privsep-root.h
U src/external/bsd/dhcpcd/dist/src/privsep-control.h
U src/external/bsd/dhcpcd/dist/src/privsep-inet.h
U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5
U src/external/bsd/dhcpcd/dist/src/dhcpcd.8
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant
U src/external/bsd/dhcpcd/dist/hooks/15-timezone
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind

6 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist



CVS import: src/external/bsd/dhcpcd/dist

2023-10-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Oct  6 08:46:23 UTC 2023

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv14109

Log Message:
Import dhcpcd-10.0.3 with the following changes:

DHCP: Don't crash on a test run
dhcpcd: Fix off-by-one overflow when read() writes full BUFSIZ
privsep: fix strlcpy overflow in psp_ifname
privsep: Fix a FD leak when processes exit
dhcpcd: Use a local variable instead of the optind
dhcpcd: Guard against handling many SIGTERM/SIGINT
DHCP6: Send correct amount of used buffer for prefix exclude option
options: andsf6 is DHCPv6, not DHCP
options: introduce the uri option as opposed to a string
DHCP6: Set all requested addrs as not stale when starting discovery

Status:

Vendor Tag: ROY
Release Tags:   dhcpcd-10_0_3

U src/external/bsd/dhcpcd/dist/LICENSE
U src/external/bsd/dhcpcd/dist/README.md
U src/external/bsd/dhcpcd/dist/src/defs.h
U src/external/bsd/dhcpcd/dist/src/common.c
U src/external/bsd/dhcpcd/dist/src/control.c
C src/external/bsd/dhcpcd/dist/src/dhcpcd.c
U src/external/bsd/dhcpcd/dist/src/duid.c
U src/external/bsd/dhcpcd/dist/src/eloop.c
U src/external/bsd/dhcpcd/dist/src/logerr.c
U src/external/bsd/dhcpcd/dist/src/if.c
C src/external/bsd/dhcpcd/dist/src/if-options.c
U src/external/bsd/dhcpcd/dist/src/sa.c
U src/external/bsd/dhcpcd/dist/src/route.c
U src/external/bsd/dhcpcd/dist/src/dhcp-common.c
U src/external/bsd/dhcpcd/dist/src/script.c
U src/external/bsd/dhcpcd/dist/src/auth.c
U src/external/bsd/dhcpcd/dist/src/if-bsd.c
C src/external/bsd/dhcpcd/dist/src/dhcp.c
U src/external/bsd/dhcpcd/dist/src/ipv4.c
U src/external/bsd/dhcpcd/dist/src/bpf.c
U src/external/bsd/dhcpcd/dist/src/arp.c
U src/external/bsd/dhcpcd/dist/src/ipv4ll.c
U src/external/bsd/dhcpcd/dist/src/ipv6.c
C src/external/bsd/dhcpcd/dist/src/ipv6nd.c
C src/external/bsd/dhcpcd/dist/src/dhcp6.c
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c
C src/external/bsd/dhcpcd/dist/src/privsep.c
U src/external/bsd/dhcpcd/dist/src/privsep-root.c
U src/external/bsd/dhcpcd/dist/src/privsep-control.c
U src/external/bsd/dhcpcd/dist/src/privsep-inet.c
U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c
U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c
U src/external/bsd/dhcpcd/dist/src/common.h
U src/external/bsd/dhcpcd/dist/src/control.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd.h
U src/external/bsd/dhcpcd/dist/src/duid.h
U src/external/bsd/dhcpcd/dist/src/eloop.h
U src/external/bsd/dhcpcd/dist/src/logerr.h
U src/external/bsd/dhcpcd/dist/src/if.h
U src/external/bsd/dhcpcd/dist/src/if-options.h
U src/external/bsd/dhcpcd/dist/src/sa.h
U src/external/bsd/dhcpcd/dist/src/route.h
U src/external/bsd/dhcpcd/dist/src/dhcp-common.h
U src/external/bsd/dhcpcd/dist/src/script.h
U src/external/bsd/dhcpcd/dist/src/auth.h
U src/external/bsd/dhcpcd/dist/src/dhcp.h
U src/external/bsd/dhcpcd/dist/src/ipv4.h
U src/external/bsd/dhcpcd/dist/src/bpf.h
U src/external/bsd/dhcpcd/dist/src/arp.h
U src/external/bsd/dhcpcd/dist/src/ipv4ll.h
U src/external/bsd/dhcpcd/dist/src/ipv6.h
U src/external/bsd/dhcpcd/dist/src/ipv6nd.h
U src/external/bsd/dhcpcd/dist/src/dhcp6.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h
U src/external/bsd/dhcpcd/dist/src/privsep.h
U src/external/bsd/dhcpcd/dist/src/privsep-root.h
U src/external/bsd/dhcpcd/dist/src/privsep-control.h
U src/external/bsd/dhcpcd/dist/src/privsep-inet.h
U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h
U src/external/bsd/dhcpcd/dist/src/dev.h
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5
U src/external/bsd/dhcpcd/dist/src/dhcpcd.8
U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks
U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8
U src/external/bsd/dhcpcd/dist/hooks/01-test
U src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/hooks/30-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant
U src/external/bsd/dhcpcd/dist/hooks/15-timezone
U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/hooks/50-ypbind

6 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:33:50 UTC 2023

Modified Files:
src/external/bsd/less/dist: position.c

Log Message:
Reduce upstream diffs - remove a gcc warnings " = 0" change.  This
was a problem in 2006, doesn't appear to be a problem anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/position.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/less/dist/position.c
diff -u src/external/bsd/less/dist/position.c:1.5 src/external/bsd/less/dist/position.c:1.6
--- src/external/bsd/less/dist/position.c:1.5	Fri Oct  6 05:49:49 2023
+++ src/external/bsd/less/dist/position.c	Fri Oct  6 07:33:49 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: position.c,v 1.5 2023/10/06 05:49:49 simonb Exp $	*/
+/*	$NetBSD: position.c,v 1.6 2023/10/06 07:33:49 simonb Exp $	*/
 
 /*
  * Copyright (C) 1984-2023  Mark Nudelman
@@ -102,7 +102,6 @@ public void pos_clear(void)
 public void pos_init(void)
 {
 	struct scrpos scrpos;
-	scrpos.pos = scrpos.ln = 0;	/* XXX: GCC */
 
 	if (sc_height <= table_size)
 		return;



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:33:50 UTC 2023

Modified Files:
src/external/bsd/less/dist: position.c

Log Message:
Reduce upstream diffs - remove a gcc warnings " = 0" change.  This
was a problem in 2006, doesn't appear to be a problem anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/position.c

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



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:31:30 UTC 2023

Modified Files:
src/external/bsd/less/dist: os.c

Log Message:
Reduce upstream diffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/os.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/less/dist/os.c
diff -u src/external/bsd/less/dist/os.c:1.5 src/external/bsd/less/dist/os.c:1.6
--- src/external/bsd/less/dist/os.c:1.5	Fri Oct  6 05:49:49 2023
+++ src/external/bsd/less/dist/os.c	Fri Oct  6 07:31:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: os.c,v 1.5 2023/10/06 05:49:49 simonb Exp $	*/
+/*	$NetBSD: os.c,v 1.6 2023/10/06 07:31:30 simonb Exp $	*/
 
 /*
  * Copyright (C) 1984-2023  Mark Nudelman
@@ -159,10 +159,6 @@ public int supports_ctrl_x(void)
 #endif /* USE_POLL */
 }
 
-#if !HAVE_STRERROR
-static char *strerror __P((int));
-#endif
-
 /*
  * Like read() system call, but is deliberately interruptible.
  * A call to intread() from a signal handler will interrupt



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:31:30 UTC 2023

Modified Files:
src/external/bsd/less/dist: os.c

Log Message:
Reduce upstream diffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/os.c

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



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:29:42 UTC 2023

Modified Files:
src/external/bsd/less/dist: opttbl.c

Log Message:
Reduce upstream diffs - tabs vs space.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/opttbl.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/less/dist/opttbl.c
diff -u src/external/bsd/less/dist/opttbl.c:1.5 src/external/bsd/less/dist/opttbl.c:1.6
--- src/external/bsd/less/dist/opttbl.c:1.5	Fri Oct  6 05:49:49 2023
+++ src/external/bsd/less/dist/opttbl.c	Fri Oct  6 07:29:42 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: opttbl.c,v 1.5 2023/10/06 05:49:49 simonb Exp $	*/
+/*	$NetBSD: opttbl.c,v 1.6 2023/10/06 07:29:42 simonb Exp $	*/
 
 /*
  * Copyright (C) 1984-2023  Mark Nudelman
@@ -20,29 +20,29 @@
 /*
  * Variables controlled by command line options.
  */
-public int quiet;		/* Should we suppress the audible bell? */
-public int no_vbell;		/* Should we suppress the visual bell? */
-public int how_search;		/* Where should forward searches start? */
-public int top_scroll;		/* Repaint screen from top?
-   (alternative is scroll from bottom) */
-public int pr_type;		/* Type of prompt (short, medium, long) */
-public int bs_mode;		/* How to process backspaces */
-public int know_dumb;		/* Don't complain about dumb terminals */
-public int quit_at_eof;		/* Quit after hitting end of file twice */
-public int quit_if_one_screen;	/* Quit if EOF on first screen */
-public int be_helpful;		/* more(1) style -d */
-public int squeeze;		/* Squeeze multiple blank lines into one */
-public int tabstop;		/* Tab settings */
-public int back_scroll;		/* Repaint screen on backwards movement */
-public int forw_scroll;		/* Repaint screen on forward movement */
-public int caseless;		/* Do "caseless" searches */
-public int linenums;		/* Use line numbers */
-public int autobuf;		/* Automatically allocate buffers as needed */
-public int bufspace;		/* Max buffer space per file (K) */
-public int ctldisp;		/* Send control chars to screen untranslated */
-public int force_open;		/* Open the file even if not regular file */
-public int swindow;		/* Size of scrolling window */
-public int jump_sline;		/* Screen line of "jump target" */
+public int quiet;   /* Should we suppress the audible bell? */
+public int no_vbell;/* Should we suppress the visual bell? */
+public int how_search;  /* Where should forward searches start? */
+public int top_scroll;  /* Repaint screen from top?
+   (alternative is scroll from bottom) */
+public int pr_type; /* Type of prompt (short, medium, long) */
+public int bs_mode; /* How to process backspaces */
+public int know_dumb;   /* Don't complain about dumb terminals */
+public int quit_at_eof; /* Quit after hitting end of file twice */
+public int quit_if_one_screen;  /* Quit if EOF on first screen */
+public int be_helpful;  /* more(1) style -d */
+public int squeeze; /* Squeeze multiple blank lines into one */
+public int tabstop; /* Tab settings */
+public int back_scroll; /* Repaint screen on backwards movement */
+public int forw_scroll; /* Repaint screen on forward movement */
+public int caseless;/* Do "caseless" searches */
+public int linenums;/* Use line numbers */
+public int autobuf; /* Automatically allocate buffers as needed */
+public int bufspace;/* Max buffer space per file (K) */
+public int ctldisp; /* Send control chars to screen untranslated */
+public int force_open;  /* Open the file even if not regular file */
+public int swindow; /* Size of scrolling window */
+public int jump_sline;  /* Screen line of "jump target" */
 public long jump_sline_fraction = -1;
 public long shift_count_fraction = -1;
 public int chopline;/* Truncate displayed lines at screen width */



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:29:42 UTC 2023

Modified Files:
src/external/bsd/less/dist: opttbl.c

Log Message:
Reduce upstream diffs - tabs vs space.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/opttbl.c

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



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:26:47 UTC 2023

Modified Files:
src/external/bsd/less/dist: lesskey.c

Log Message:
Reduce upstream diffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/lesskey.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/less/dist/lesskey.c
diff -u src/external/bsd/less/dist/lesskey.c:1.5 src/external/bsd/less/dist/lesskey.c:1.6
--- src/external/bsd/less/dist/lesskey.c:1.5	Fri Oct  6 05:49:49 2023
+++ src/external/bsd/less/dist/lesskey.c	Fri Oct  6 07:26:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lesskey.c,v 1.5 2023/10/06 05:49:49 simonb Exp $	*/
+/*	$NetBSD: lesskey.c,v 1.6 2023/10/06 07:26:47 simonb Exp $	*/
 
 /*
  * Copyright (C) 1984-2023  Mark Nudelman
@@ -243,8 +243,6 @@ static void parse_args(int argc, char **
 	 */
 	if (argc > 0)
 		infile = *argv;
-	else
-		infile = homefile(DEF_LESSKEYINFILE);
 }
 
 /*



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:26:47 UTC 2023

Modified Files:
src/external/bsd/less/dist: lesskey.c

Log Message:
Reduce upstream diffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/lesskey.c

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



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:13:13 UTC 2023

Modified Files:
src/external/bsd/less/dist: decode.c

Log Message:
Reduce upstream diffs - remove a gcc warnings " = 0" change.  This
was a problem in 2006, doesn't appear to be a problem anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/less/dist/decode.c

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



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:13:13 UTC 2023

Modified Files:
src/external/bsd/less/dist: decode.c

Log Message:
Reduce upstream diffs - remove a gcc warnings " = 0" change.  This
was a problem in 2006, doesn't appear to be a problem anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/less/dist/decode.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/less/dist/decode.c
diff -u src/external/bsd/less/dist/decode.c:1.6 src/external/bsd/less/dist/decode.c:1.7
--- src/external/bsd/less/dist/decode.c:1.6	Fri Oct  6 07:09:15 2023
+++ src/external/bsd/less/dist/decode.c	Fri Oct  6 07:13:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: decode.c,v 1.6 2023/10/06 07:09:15 simonb Exp $	*/
+/*	$NetBSD: decode.c,v 1.7 2023/10/06 07:13:13 simonb Exp $	*/
 
 /*
  * Copyright (C) 1984-2023  Mark Nudelman
@@ -915,7 +915,7 @@ public int editchar(int c, int flags)
 {
 	int action;
 	int nch;
-	char *s = NULL;	/* XXX: GCC */
+	char *s;
 	char usercmd[MAX_CMDLEN+1];
 	
 	/*



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:09:15 UTC 2023

Modified Files:
src/external/bsd/less/dist: decode.c

Log Message:
Reduce upstream diffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/decode.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/less/dist/decode.c
diff -u src/external/bsd/less/dist/decode.c:1.5 src/external/bsd/less/dist/decode.c:1.6
--- src/external/bsd/less/dist/decode.c:1.5	Fri Oct  6 05:49:49 2023
+++ src/external/bsd/less/dist/decode.c	Fri Oct  6 07:09:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: decode.c,v 1.5 2023/10/06 05:49:49 simonb Exp $	*/
+/*	$NetBSD: decode.c,v 1.6 2023/10/06 07:09:15 simonb Exp $	*/
 
 /*
  * Copyright (C) 1984-2023  Mark Nudelman
@@ -241,6 +241,7 @@ static struct tablelist *list_ecmd_table
 static struct tablelist *list_var_tables = NULL;
 static struct tablelist *list_sysvar_tables = NULL;
 
+
 /*
  * Expand special key abbreviations in a command table.
  */



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:09:15 UTC 2023

Modified Files:
src/external/bsd/less/dist: decode.c

Log Message:
Reduce upstream diffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/decode.c

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



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:05:59 UTC 2023

Modified Files:
src/external/bsd/less/dist: cmdbuf.c

Log Message:
Reduce upstream diffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/cmdbuf.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/less/dist/cmdbuf.c
diff -u src/external/bsd/less/dist/cmdbuf.c:1.5 src/external/bsd/less/dist/cmdbuf.c:1.6
--- src/external/bsd/less/dist/cmdbuf.c:1.5	Fri Oct  6 05:49:49 2023
+++ src/external/bsd/less/dist/cmdbuf.c	Fri Oct  6 07:05:59 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmdbuf.c,v 1.5 2023/10/06 05:49:49 simonb Exp $	*/
+/*	$NetBSD: cmdbuf.c,v 1.6 2023/10/06 07:05:59 simonb Exp $	*/
 
 /*
  * Copyright (C) 1984-2023  Mark Nudelman
@@ -21,9 +21,6 @@
 #if HAVE_STAT
 #include 
 #endif
-#if HAVE_ERRNO_H
-#include 
-#endif
 
 extern int sc_width;
 extern int utf_mode;



CVS commit: src/external/bsd/less/dist

2023-10-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Oct  6 07:05:59 UTC 2023

Modified Files:
src/external/bsd/less/dist: cmdbuf.c

Log Message:
Reduce upstream diffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/cmdbuf.c

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