CVS commit: src/lib/libc/gen

2024-04-22 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Apr 22 21:25:29 UTC 2024

Modified Files:
src/lib/libc/gen: usleep.3

Log Message:
it's nanosleep(2), not nanosleep(3)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/gen/usleep.3

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



CVS commit: src/lib/libc/gen

2024-04-22 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Apr 22 21:25:29 UTC 2024

Modified Files:
src/lib/libc/gen: usleep.3

Log Message:
it's nanosleep(2), not nanosleep(3)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/gen/usleep.3

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

Modified files:

Index: src/lib/libc/gen/usleep.3
diff -u src/lib/libc/gen/usleep.3:1.20 src/lib/libc/gen/usleep.3:1.21
--- src/lib/libc/gen/usleep.3:1.20	Mon Apr 22 21:02:18 2024
+++ src/lib/libc/gen/usleep.3	Mon Apr 22 21:25:29 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: usleep.3,v 1.20 2024/04/22 21:02:18 jdolecek Exp $
+.\"	$NetBSD: usleep.3,v 1.21 2024/04/22 21:25:29 jdolecek Exp $
 .\"
 .\" Copyright (c) 1986, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -44,7 +44,7 @@
 .Sh DESCRIPTION
 .Bf -symbolic
 This interface is obsoleted by
-.Xr nanosleep 3 .
+.Xr nanosleep 2 .
 .Ef
 .Pp
 The



CVS commit: src/lib/libc/gen

2024-04-22 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Apr 22 21:02:18 UTC 2024

Modified Files:
src/lib/libc/gen: usleep.3 usleep.c

Log Message:
allow usleep(3) with useconds >= 100

update manpage to mention this interface is obsolete, remove
EINVAL from the ERRORS and mention EINTR instead.

PR lib/58184 by Taylor R Campbell


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/gen/usleep.3
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/gen/usleep.c

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



CVS commit: src/lib/libc/gen

2024-04-22 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Apr 22 21:02:18 UTC 2024

Modified Files:
src/lib/libc/gen: usleep.3 usleep.c

Log Message:
allow usleep(3) with useconds >= 100

update manpage to mention this interface is obsolete, remove
EINVAL from the ERRORS and mention EINTR instead.

PR lib/58184 by Taylor R Campbell


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/gen/usleep.3
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/gen/usleep.c

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

Modified files:

Index: src/lib/libc/gen/usleep.3
diff -u src/lib/libc/gen/usleep.3:1.19 src/lib/libc/gen/usleep.3:1.20
--- src/lib/libc/gen/usleep.3:1.19	Thu Apr 29 17:29:56 2010
+++ src/lib/libc/gen/usleep.3	Mon Apr 22 21:02:18 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: usleep.3,v 1.19 2010/04/29 17:29:56 jruoho Exp $
+.\"	$NetBSD: usleep.3,v 1.20 2024/04/22 21:02:18 jdolecek Exp $
 .\"
 .\" Copyright (c) 1986, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)usleep.3	8.1 (Berkeley) 6/4/93
 .\"
-.Dd April 29, 2010
+.Dd April 22, 2024
 .Dt USLEEP 3
 .Os
 .Sh NAME
@@ -42,6 +42,11 @@
 .Ft int
 .Fn usleep "useconds_t microseconds"
 .Sh DESCRIPTION
+.Bf -symbolic
+This interface is obsoleted by
+.Xr nanosleep 3 .
+.Ef
+.Pp
 The
 .Fn usleep
 function
@@ -53,13 +58,6 @@ action is to invoke a signal catching fu
 process.
 The suspension time may be longer than requested due to the
 scheduling of other activity by the system.
-.Pp
-The
-.Fa microseconds
-argument must be less than 1,000,000.
-If the value of
-.Fa microseconds
-is 0, then the call has no effect.
 .Sh RETURN VALUES
 On successful completion,
 .Fn usleep
@@ -72,10 +70,9 @@ The
 .Fn usleep
 function may fail if:
 .Bl -tag -width Er
-.It Bq Er EINVAL
-The
-.Fa microseconds
-interval specified 1,000,000 or more microseconds.
+.It Bq Er EINTR
+.Nm
+was interrupted by the delivery of a signal.
 .El
 .Sh SEE ALSO
 .Xr nanosleep 2 ,

Index: src/lib/libc/gen/usleep.c
diff -u src/lib/libc/gen/usleep.c:1.20 src/lib/libc/gen/usleep.c:1.21
--- src/lib/libc/gen/usleep.c:1.20	Mon Jun 25 22:32:44 2012
+++ src/lib/libc/gen/usleep.c	Mon Apr 22 21:02:18 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: usleep.c,v 1.20 2012/06/25 22:32:44 abs Exp $	*/
+/*	$NetBSD: usleep.c,v 1.21 2024/04/22 21:02:18 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: usleep.c,v 1.20 2012/06/25 22:32:44 abs Exp $");
+__RCSID("$NetBSD: usleep.c,v 1.21 2024/04/22 21:02:18 jdolecek Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -51,13 +51,8 @@ usleep(useconds_t useconds)
 	if (useconds == 0)
 		return (0);
 
-	if (useconds >= 100) {
-		errno = EINVAL;
-		return (-1);
-	}
-
-	ts.tv_sec  = 0;
-	ts.tv_nsec = useconds * 1000;
+	ts.tv_sec  = (useconds / 100);
+	ts.tv_nsec = (useconds % 100) * 1000;
 
 	nanosleep(, NULL);
 



CVS commit: src/share/man/man4

2024-03-24 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Mar 24 21:27:48 UTC 2024

Modified Files:
src/share/man/man4: lagg.4

Log Message:
minor spelling fix - 'with' and 'into'


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/lagg.4

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

Modified files:

Index: src/share/man/man4/lagg.4
diff -u src/share/man/man4/lagg.4:1.5 src/share/man/man4/lagg.4:1.6
--- src/share/man/man4/lagg.4:1.5	Wed Oct 18 07:59:06 2023
+++ src/share/man/man4/lagg.4	Sun Mar 24 21:27:48 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lagg.4,v 1.5 2023/10/18 07:59:06 yamaguchi Exp $
+.\"	$NetBSD: lagg.4,v 1.6 2024/03/24 21:27:48 jdolecek Exp $
 .\"
 .\" Copyright (c) 2005, 2006 Reyk Floeter 
 .\"
@@ -119,7 +119,7 @@ available, the VLAN tag, and the IP sour
 .It Ic lacp
 Supports the IEEE 802.1AX (formerly 802.3ad) Link Aggregation Control Protocol
 (LACP) and the Marker Protocol.
-LACP will negotiate a set of aggregable links wit the peer in to a Link
+LACP will negotiate a set of aggregable links with the peer into a Link
 Aggregated Group.
 The LAG is composed of ports of the different speed, set to full-duplex operation,
 if



CVS commit: src/share/man/man4

2024-03-24 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Mar 24 21:27:48 UTC 2024

Modified Files:
src/share/man/man4: lagg.4

Log Message:
minor spelling fix - 'with' and 'into'


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/lagg.4

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



CVS commit: src/sys/kern

2024-02-11 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Feb 11 13:01:29 UTC 2024

Modified Files:
src/sys/kern: uipc_socket.c

Log Message:
make kqfilter() behave the same for PIPE_SOCKETPAIR pipe as it does
for standard one - refuse EVFILT_WRITE if the reader is already disconnected

fixes test failure for kernel/kqueue/write/t_pipe.c on PIPE_SOCKETPAIR kernel

PR kern/55690


To generate a diff of this commit:
cvs rdiff -u -r1.308 -r1.309 src/sys/kern/uipc_socket.c

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



CVS commit: src/sys/kern

2024-02-11 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Feb 11 13:01:29 UTC 2024

Modified Files:
src/sys/kern: uipc_socket.c

Log Message:
make kqfilter() behave the same for PIPE_SOCKETPAIR pipe as it does
for standard one - refuse EVFILT_WRITE if the reader is already disconnected

fixes test failure for kernel/kqueue/write/t_pipe.c on PIPE_SOCKETPAIR kernel

PR kern/55690


To generate a diff of this commit:
cvs rdiff -u -r1.308 -r1.309 src/sys/kern/uipc_socket.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/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.308 src/sys/kern/uipc_socket.c:1.309
--- src/sys/kern/uipc_socket.c:1.308	Sat Feb  3 19:05:14 2024
+++ src/sys/kern/uipc_socket.c	Sun Feb 11 13:01:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.308 2024/02/03 19:05:14 jdolecek Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.309 2024/02/11 13:01:29 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009, 2023 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.308 2024/02/03 19:05:14 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.309 2024/02/11 13:01:29 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -81,6 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_socket.
 #include "opt_somaxkva.h"
 #include "opt_multiprocessor.h"	/* XXX */
 #include "opt_sctp.h"
+#include "opt_pipe.h"
 #endif
 
 #include 
@@ -2394,6 +2395,16 @@ soo_kqfilter(struct file *fp, struct kno
 	case EVFILT_WRITE:
 		kn->kn_fop = _filtops;
 		sb = >so_snd;
+
+#ifdef PIPE_SOCKETPAIR
+		if (so->so_state & SS_ISAPIPE) {
+			/* Other end of pipe has been closed. */
+			if (so->so_state & SS_ISDISCONNECTED) {
+sounlock(so);
+return EBADF;
+			}
+		}
+#endif
 		break;
 	case EVFILT_EMPTY:
 		kn->kn_fop = _filtops;



CVS commit: src/sys

2024-02-03 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Feb  3 19:05:15 UTC 2024

Modified Files:
src/sys/kern: uipc_socket.c uipc_syscalls.c
src/sys/net: if_gre.c
src/sys/sys: socketvar.h

Log Message:
fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags'
passed when called via pipe2(2), fixing repeatable process hang during
compilation with 'gcc -pipe'

refactor fsocreate() to return the new socket and file pointers,
expect the caller to call fd_affix() once initialization is fully complete

use the new fsocreate() to replace the duplicate open-coded 'flags' handling
in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1()

this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed
on PIPE_SOCKETPAIR kernel

fixes PR kern/55690


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.210 -r1.211 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.184 -r1.185 src/sys/net/if_gre.c
cvs rdiff -u -r1.167 -r1.168 src/sys/sys/socketvar.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/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.307 src/sys/kern/uipc_socket.c:1.308
--- src/sys/kern/uipc_socket.c:1.307	Thu Nov  2 10:31:55 2023
+++ src/sys/kern/uipc_socket.c	Sat Feb  3 19:05:14 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.307 2023/11/02 10:31:55 martin Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.308 2024/02/03 19:05:14 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009, 2023 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.307 2023/11/02 10:31:55 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.308 2024/02/03 19:05:14 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -568,44 +568,51 @@ socreate(int dom, struct socket **aso, i
 
 /*
  * fsocreate: create a socket and a file descriptor associated with it.
+ * Returns the allocated file structure in *fpp, but the descriptor
+ * is not visible yet for the process.
+ * Caller is responsible for calling fd_affix() for the returned *fpp once
+ * it's socket initialization is finished successfully, or fd_abort() if it's
+ * initialization fails.
+ * 
  *
- * => On success, write file descriptor to fdout and return zero.
- * => On failure, return non-zero; *fdout will be undefined.
+ * => On success, write file descriptor to *fdout and *fpp and return zero.
+ * => On failure, return non-zero; *fdout and *fpp will be undefined.
  */
 int
-fsocreate(int domain, struct socket **sop, int type, int proto, int *fdout)
+fsocreate(int domain, struct socket **sop, int type, int proto, int *fdout,
+file_t **fpp, struct socket *lockso)
 {
 	lwp_t *l = curlwp;
 	int error, fd, flags;
 	struct socket *so;
-	struct file *fp;
+	file_t *fp;
+
+	flags = type & SOCK_FLAGS_MASK;
+	type &= ~SOCK_FLAGS_MASK;
+	error = socreate(domain, , type, proto, l, lockso);
+	if (error) {
+		return error;
+	}
 
 	if ((error = fd_allocfile(, )) != 0) {
+		soclose(so);
 		return error;
 	}
-	flags = type & SOCK_FLAGS_MASK;
 	fd_set_exclose(l, fd, (flags & SOCK_CLOEXEC) != 0);
 	fp->f_flag = FREAD|FWRITE|((flags & SOCK_NONBLOCK) ? FNONBLOCK : 0)|
 	((flags & SOCK_NOSIGPIPE) ? FNOSIGPIPE : 0);
 	fp->f_type = DTYPE_SOCKET;
 	fp->f_ops = 
-
-	type &= ~SOCK_FLAGS_MASK;
-	error = socreate(domain, , type, proto, l, NULL);
-	if (error) {
-		fd_abort(curproc, fp, fd);
-		return error;
-	}
 	if (flags & SOCK_NONBLOCK) {
 		so->so_state |= SS_NBIO;
 	}
 	fp->f_socket = so;
-	fd_affix(curproc, fp, fd);
 
 	if (sop != NULL) {
 		*sop = so;
 	}
 	*fdout = fd;
+	*fpp = fp;
 	return error;
 }
 

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.210 src/sys/kern/uipc_syscalls.c:1.211
--- src/sys/kern/uipc_syscalls.c:1.210	Thu Nov  2 10:31:55 2023
+++ src/sys/kern/uipc_syscalls.c	Sat Feb  3 19:05:14 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.210 2023/11/02 10:31:55 martin Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.211 2024/02/03 19:05:14 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009, 2023 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.210 2023/11/02 10:31:55 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.211 2024/02/03 19:05:14 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pipe.h"
@@ -111,10 +111,12 @@ sys___socket30(struct lwp *l, const stru
 		syscallarg(int)	protocol;
 	} */
 	int fd, error;
+	file_t *fp;
 
 	error = fsocreate(SCARG(uap, domain), NULL, SCARG(uap, type),
-	SCARG(uap, protocol), );
+	SCARG(uap, protocol), , , NULL);
 	if (error == 0) {
+		fd_affix(l->l_proc, fp, fd);
 		*retval = fd;
 	}
 	return error;
@@ -402,34 +404,6 @@ do_sys_connect(struct lwp *l, int fd, st
 	return error;
 }
 
-static int
-makesocket(struct 

CVS commit: src/sys

2024-02-03 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Feb  3 19:05:15 UTC 2024

Modified Files:
src/sys/kern: uipc_socket.c uipc_syscalls.c
src/sys/net: if_gre.c
src/sys/sys: socketvar.h

Log Message:
fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags'
passed when called via pipe2(2), fixing repeatable process hang during
compilation with 'gcc -pipe'

refactor fsocreate() to return the new socket and file pointers,
expect the caller to call fd_affix() once initialization is fully complete

use the new fsocreate() to replace the duplicate open-coded 'flags' handling
in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1()

this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed
on PIPE_SOCKETPAIR kernel

fixes PR kern/55690


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.210 -r1.211 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.184 -r1.185 src/sys/net/if_gre.c
cvs rdiff -u -r1.167 -r1.168 src/sys/sys/socketvar.h

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



CVS commit: src/sys/sys

2024-01-22 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Jan 22 21:15:02 UTC 2024

Modified Files:
src/sys/sys: mbuf.h

Log Message:
fix M_CSUM_BITS bitfield for M_CSUM_BLANK - \37 is the bit before \40

noticed by rillig@ thanks


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/sys/mbuf.h

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



CVS commit: src/sys/sys

2024-01-22 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Jan 22 21:15:02 UTC 2024

Modified Files:
src/sys/sys: mbuf.h

Log Message:
fix M_CSUM_BITS bitfield for M_CSUM_BLANK - \37 is the bit before \40

noticed by rillig@ thanks


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/sys/mbuf.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/sys/mbuf.h
diff -u src/sys/sys/mbuf.h:1.238 src/sys/sys/mbuf.h:1.239
--- src/sys/sys/mbuf.h:1.238	Wed Apr 12 06:48:08 2023
+++ src/sys/sys/mbuf.h	Mon Jan 22 21:15:02 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbuf.h,v 1.238 2023/04/12 06:48:08 riastradh Exp $	*/
+/*	$NetBSD: mbuf.h,v 1.239 2024/01/22 21:15:02 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -226,7 +226,7 @@ struct pkthdr {
 
 #define M_CSUM_BITS \
 "\20\1TCPv4\2UDPv4\3TCP_UDP_BAD\4DATA\5TCPv6\6UDPv6\7IPv4\10IPv4_BAD" \
-"\11TSOv4\12TSOv6\39BLANK\40NO_PSEUDOHDR"
+"\11TSOv4\12TSOv6\37BLANK\40NO_PSEUDOHDR"
 
 /*
  * Macros for manipulating csum_data on outgoing packets. These are



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

2024-01-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jan  9 18:39:53 UTC 2024

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

Log Message:
disable TX checksum optimization, it's causing ARP lossage in some
configurations using Linux dom0

PR port-xen/57743 by Brian Marcotte, thanks for the patch


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/xen/xen/if_xennet_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/if_xennet_xenbus.c
diff -u src/sys/arch/xen/xen/if_xennet_xenbus.c:1.129 src/sys/arch/xen/xen/if_xennet_xenbus.c:1.130
--- src/sys/arch/xen/xen/if_xennet_xenbus.c:1.129	Sat Feb 25 00:32:49 2023
+++ src/sys/arch/xen/xen/if_xennet_xenbus.c	Tue Jan  9 18:39:53 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_xennet_xenbus.c,v 1.129 2023/02/25 00:32:49 riastradh Exp $  */
+/*  $NetBSD: if_xennet_xenbus.c,v 1.130 2024/01/09 18:39:53 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -81,7 +81,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.129 2023/02/25 00:32:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.130 2024/01/09 18:39:53 jdolecek Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
@@ -1122,7 +1122,13 @@ xennet_submit_tx_request(struct xennet_x
 			if (m->m_pkthdr.csum_flags & XN_M_CSUM_SUPPORTED) {
 txreq->flags |= NETTXF_csum_blank;
 			} else {
+#if 0
+/*
+ * XXX Checksum optimization disabled 
+ * to avoid port-xen/57743.
+ */
 txreq->flags |= NETTXF_data_validated;
+#endif
 			}
 		}
 		if (multiseg && i < lastseg)



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

2024-01-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jan  9 18:39:53 UTC 2024

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

Log Message:
disable TX checksum optimization, it's causing ARP lossage in some
configurations using Linux dom0

PR port-xen/57743 by Brian Marcotte, thanks for the patch


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/xen/xen/if_xennet_xenbus.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-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:32:01 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
ena(4) improvements committed

Pull request: https://github.com/maleic1618/NetBSD/pull/1:
"""
This PR fixes some bugs and MP-ifies ena(4), including RSS.

On t3.small instance, its forward throughput has grown as followings:

   64 bytes 256 bytes
-current 1flow  21.58   110.51
-current 8flow  28.27   123.19
patched 1flow   37.20   142.21
patched 8flow   92.26   366.85
(Unit: Mbps, NET_MPSAFE enabled, Using https://github.com/iij/ipgen)

It also worked well on a aarch64 machine.

Addendum: I forgot to mention that this PR is reviewed ozaki-r@n.o.
"""

Code contributed by KUSABA Takeshi 
Reviewed also by ozaki-r@n.o


To generate a diff of this commit:
cvs rdiff -u -r1.3014 -r1.3015 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.3014 src/doc/CHANGES:1.3015
--- src/doc/CHANGES:1.3014	Sat Nov  4 15:33:26 2023
+++ src/doc/CHANGES	Sun Nov  5 18:32:01 2023
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3014 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3015 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -256,3 +256,5 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 	OpenSSH: Import 9.5. [christos 20231025]
 	newsmips: Add support for LCD-MONO framebuffer on NWS-32x0 laptop
 		machines. [tsutsui 20231104]
+	ena(4): MP-enable always, add RSS support, and reliability fixes.
+		[jdolecek 20231105]



CVS commit: src/doc

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:32:01 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
ena(4) improvements committed

Pull request: https://github.com/maleic1618/NetBSD/pull/1:
"""
This PR fixes some bugs and MP-ifies ena(4), including RSS.

On t3.small instance, its forward throughput has grown as followings:

   64 bytes 256 bytes
-current 1flow  21.58   110.51
-current 8flow  28.27   123.19
patched 1flow   37.20   142.21
patched 8flow   92.26   366.85
(Unit: Mbps, NET_MPSAFE enabled, Using https://github.com/iij/ipgen)

It also worked well on a aarch64 machine.

Addendum: I forgot to mention that this PR is reviewed ozaki-r@n.o.
"""

Code contributed by KUSABA Takeshi 
Reviewed also by ozaki-r@n.o


To generate a diff of this commit:
cvs rdiff -u -r1.3014 -r1.3015 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/dev/pci

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:26:11 UTC 2023

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

Log Message:
ena(4): stop management first when detaching

Code contributed by KUSABA Takeshi 


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

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:26:11 UTC 2023

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

Log Message:
ena(4): stop management first when detaching

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/if_ena.c

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

Modified files:

Index: src/sys/dev/pci/if_ena.c
diff -u src/sys/dev/pci/if_ena.c:1.39 src/sys/dev/pci/if_ena.c:1.40
--- src/sys/dev/pci/if_ena.c:1.39	Sun Nov  5 18:23:29 2023
+++ src/sys/dev/pci/if_ena.c	Sun Nov  5 18:26:11 2023
@@ -36,7 +36,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.39 2023/11/05 18:23:29 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.40 2023/11/05 18:26:11 jdolecek Exp $");
 
 #include 
 #include 
@@ -3885,6 +3885,7 @@ ena_detach(device_t pdev, int flags)
 		return (EBUSY);
 	}
 
+	ena_com_set_admin_running_state(ena_dev, false);
 	ENA_CORE_MTX_LOCK(adapter);
 	ena_down(adapter);
 	ENA_CORE_MTX_UNLOCK(adapter);



CVS commit: src/sys/external/bsd/ena-com

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:24:31 UTC 2023

Modified Files:
src/sys/external/bsd/ena-com: ena_com.c

Log Message:
ena(4): destroy all wait_event

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/ena-com/ena_com.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/external/bsd/ena-com/ena_com.c
diff -u src/sys/external/bsd/ena-com/ena_com.c:1.3 src/sys/external/bsd/ena-com/ena_com.c:1.4
--- src/sys/external/bsd/ena-com/ena_com.c:1.3	Sun Nov  5 18:21:54 2023
+++ src/sys/external/bsd/ena-com/ena_com.c	Sun Nov  5 18:24:31 2023
@@ -1584,13 +1584,20 @@ void ena_com_admin_destroy(struct ena_co
 	struct ena_com_admin_sq *sq = _queue->sq;
 	struct ena_com_aenq *aenq = _dev->aenq;
 	u16 size;
-
-	ENA_WAIT_EVENT_DESTROY(admin_queue->comp_ctx->wait_event);
+	int i;
 
 	ENA_SPINLOCK_DESTROY(admin_queue->q_lock);
 
 	if (admin_queue->comp_ctx) {
-		size_t s = admin_queue->q_depth * sizeof(struct ena_comp_ctx);
+		size_t s;
+
+		for (i = 0; i < admin_queue->q_depth; i++) {
+			struct ena_comp_ctx *comp_ctx = get_comp_ctxt(admin_queue, i, false);
+			if (comp_ctx != NULL)
+ENA_WAIT_EVENT_DESTROY(comp_ctx->wait_event);
+		}
+
+		s = admin_queue->q_depth * sizeof(struct ena_comp_ctx);
 		ENA_MEM_FREE(ena_dev->dmadev, admin_queue->comp_ctx, s);
 	}
 	admin_queue->comp_ctx = NULL;



CVS commit: src/sys/external/bsd/ena-com

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:24:31 UTC 2023

Modified Files:
src/sys/external/bsd/ena-com: ena_com.c

Log Message:
ena(4): destroy all wait_event

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/ena-com/ena_com.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

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:23:29 UTC 2023

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

Log Message:
ena(4): establish interrupt after setting up resources

Code contributed by KUSABA Takeshi 


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

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:23:29 UTC 2023

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

Log Message:
ena(4): establish interrupt after setting up resources

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/if_ena.c

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

Modified files:

Index: src/sys/dev/pci/if_ena.c
diff -u src/sys/dev/pci/if_ena.c:1.38 src/sys/dev/pci/if_ena.c:1.39
--- src/sys/dev/pci/if_ena.c:1.38	Sun Nov  5 18:21:54 2023
+++ src/sys/dev/pci/if_ena.c	Sun Nov  5 18:23:29 2023
@@ -36,7 +36,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.38 2023/11/05 18:21:54 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.39 2023/11/05 18:23:29 jdolecek Exp $");
 
 #include 
 #include 
@@ -2243,13 +2243,6 @@ ena_up(struct ena_adapter *adapter)
 	if (!ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, adapter)) {
 		device_printf(adapter->pdev, "device is going UP\n");
 
-		/* setup interrupts for IO queues */
-		rc = ena_request_io_irq(adapter);
-		if (unlikely(rc != 0)) {
-			ena_trace(ENA_ALERT, "err_req_irq");
-			goto err_req_irq;
-		}
-
 		/* allocate transmit descriptors */
 		rc = ena_setup_all_tx_resources(adapter);
 		if (unlikely(rc != 0)) {
@@ -2272,6 +2265,13 @@ ena_up(struct ena_adapter *adapter)
 			goto err_io_que;
 		}
 
+		/* setup interrupts for IO queues */
+		rc = ena_request_io_irq(adapter);
+		if (unlikely(rc != 0)) {
+			ena_trace(ENA_ALERT, "err_req_irq");
+			goto err_req_irq;
+		}
+
 		if (unlikely(ENA_FLAG_ISSET(ENA_FLAG_LINK_UP, adapter)))
 			if_link_state_change(adapter->ifp, LINK_STATE_UP);
 



CVS commit: src/sys

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:21:55 UTC 2023

Modified Files:
src/sys/dev/pci: if_ena.c
src/sys/external/bsd/ena-com: ena_com.c

Log Message:
ena(4): prevent AENQ handler from use-after-free

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/ena-com/ena_com.c

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

Modified files:

Index: src/sys/dev/pci/if_ena.c
diff -u src/sys/dev/pci/if_ena.c:1.37 src/sys/dev/pci/if_ena.c:1.38
--- src/sys/dev/pci/if_ena.c:1.37	Sun Nov  5 18:18:56 2023
+++ src/sys/dev/pci/if_ena.c	Sun Nov  5 18:21:54 2023
@@ -36,7 +36,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.37 2023/11/05 18:18:56 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.38 2023/11/05 18:21:54 jdolecek Exp $");
 
 #include 
 #include 
@@ -3896,21 +3896,8 @@ ena_detach(device_t pdev, int flags)
 	workqueue_destroy(adapter->reset_tq);
 	adapter->reset_tq = NULL;
 
-	if (adapter->ifp != NULL) {
-		ether_ifdetach(adapter->ifp);
-		if_detach(adapter->ifp);
-	}
-	ifmedia_fini(>media);
-
 	ena_free_all_io_rings_resources(adapter);
 
-	ena_free_counters((struct evcnt *)>hw_stats,
-	sizeof(struct ena_hw_stats),
-	offsetof(struct ena_hw_stats, rx_packets));
-	ena_free_counters((struct evcnt *)>dev_stats,
-	sizeof(struct ena_stats_dev),
-offsetof(struct ena_stats_dev, wd_expired));
-
 	if (likely(adapter->rss_support))
 		ena_com_rss_destroy(ena_dev);
 
@@ -3944,6 +3931,19 @@ ena_detach(device_t pdev, int flags)
 
 	ena_free_pci_resources(adapter);
 
+	ena_free_counters((struct evcnt *)>hw_stats,
+	sizeof(struct ena_hw_stats),
+	offsetof(struct ena_hw_stats, rx_packets));
+	ena_free_counters((struct evcnt *)>dev_stats,
+	sizeof(struct ena_stats_dev),
+offsetof(struct ena_stats_dev, wd_expired));
+
+	if (adapter->ifp != NULL) {
+		ether_ifdetach(adapter->ifp);
+		if_detach(adapter->ifp);
+	}
+	ifmedia_fini(>media);
+
 	mutex_destroy(>global_mtx);
 
 	if (ena_dev->bus != NULL)

Index: src/sys/external/bsd/ena-com/ena_com.c
diff -u src/sys/external/bsd/ena-com/ena_com.c:1.2 src/sys/external/bsd/ena-com/ena_com.c:1.3
--- src/sys/external/bsd/ena-com/ena_com.c:1.2	Sun Nov  5 18:15:02 2023
+++ src/sys/external/bsd/ena-com/ena_com.c	Sun Nov  5 18:21:54 2023
@@ -1392,6 +1392,12 @@ void ena_com_wait_for_abort_completion(s
 	struct ena_com_admin_queue *admin_queue = _dev->admin_queue;
 	unsigned long flags;
 
+	/*
+	 * XXX: workaround for missing synchronization mechanism of AENQ handler
+	 * Wait 20ms for safety though it have not panicked actually.
+	 */
+	ENA_MSLEEP(20);
+
 	ENA_SPINLOCK_LOCK(admin_queue->q_lock, flags);
 	while (ATOMIC32_READ(_queue->outstanding_cmds) != 0) {
 		ENA_SPINLOCK_UNLOCK(admin_queue->q_lock, flags);



CVS commit: src/sys

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:21:55 UTC 2023

Modified Files:
src/sys/dev/pci: if_ena.c
src/sys/external/bsd/ena-com: ena_com.c

Log Message:
ena(4): prevent AENQ handler from use-after-free

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/ena-com/ena_com.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

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:18:56 UTC 2023

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

Log Message:
ena(4) is MP-ready, always use MPSAFE

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/pci/if_ena.c

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

Modified files:

Index: src/sys/dev/pci/if_ena.c
diff -u src/sys/dev/pci/if_ena.c:1.36 src/sys/dev/pci/if_ena.c:1.37
--- src/sys/dev/pci/if_ena.c:1.36	Sun Nov  5 18:17:41 2023
+++ src/sys/dev/pci/if_ena.c	Sun Nov  5 18:18:56 2023
@@ -36,7 +36,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.36 2023/11/05 18:17:41 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.37 2023/11/05 18:18:56 jdolecek Exp $");
 
 #include 
 #include 
@@ -61,14 +61,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1
 
 #include 
 
-#ifdef NET_MPSAFE
-#define	WQ_FLAGS	WQ_MPSAFE
-#define	CALLOUT_FLAGS	CALLOUT_MPSAFE
-#else
-#define	WQ_FLAGS	0
-#define	CALLOUT_FLAGS	0
-#endif
-
 /*
  *  Function prototypes
  */
@@ -728,7 +720,7 @@ ena_setup_tx_resources(struct ena_adapte
 
 	/* Allocate workqueues */
 	int rc = workqueue_create(_ring->enqueue_tq, "ena_tx_enq",
-	ena_deferred_mq_start, tx_ring, 0, IPL_NET, WQ_PERCPU | WQ_FLAGS);
+	ena_deferred_mq_start, tx_ring, 0, IPL_NET, WQ_PERCPU | WQ_MPSAFE);
 	if (unlikely(rc != 0)) {
 		ena_trace(ENA_ALERT,
 		"Unable to create workqueue for enqueue task\n");
@@ -923,7 +915,7 @@ ena_setup_rx_resources(struct ena_adapte
 
 	/* Allocate workqueues */
 	int rc = workqueue_create(_ring->cleanup_tq, "ena_rx_comp",
-	ena_cleanup, que, 0, IPL_NET, WQ_PERCPU | WQ_FLAGS);
+	ena_cleanup, que, 0, IPL_NET, WQ_PERCPU | WQ_MPSAFE);
 	if (unlikely(rc != 0)) {
 		ena_trace(ENA_ALERT,
 		"Unable to create workqueue for RX completion task\n");
@@ -2013,6 +2005,9 @@ ena_request_mgmnt_irq(struct ena_adapter
 	KASSERT(adapter->sc_intrs != NULL);
 	KASSERT(adapter->sc_ihs[irq_slot] == NULL);
 
+	pci_intr_setattr(pc, >sc_intrs[irq_slot],
+	PCI_INTR_MPSAFE, true);
+
 	snprintf(intr_xname, sizeof(intr_xname), "%s mgmnt",
 	device_xname(adapter->pdev));
 	intrstr = pci_intr_string(pc, adapter->sc_intrs[irq_slot],
@@ -2058,6 +2053,9 @@ ena_request_io_irq(struct ena_adapter *a
 		KASSERT((void *)adapter->sc_intrs[irq_slot] != NULL);
 		KASSERT(adapter->sc_ihs[irq_slot] == NULL);
 
+		pci_intr_setattr(pc, >sc_intrs[irq_slot],
+		PCI_INTR_MPSAFE, true);
+
 		snprintf(intr_xname, sizeof(intr_xname), "%s ioq%d",
 		device_xname(adapter->pdev), i);
 		intrstr = pci_intr_string(pc, adapter->sc_intrs[irq_slot],
@@ -2552,6 +2550,7 @@ ena_setup_ifnet(device_t pdev, struct en
 	if_setsoftc(ifp, adapter);
 
 	if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST);
+	ifp->if_extflags = IFEF_MPSAFE;
 	if_setinitfn(ifp, ena_init);
 	ifp->if_stop = ena_stop;
 	if_settransmitfn(ifp, ena_mq_start);
@@ -3817,12 +3816,12 @@ ena_attach(device_t parent, device_t sel
 		goto err_ifp_free;
 	}
 
-	callout_init(>timer_service, CALLOUT_FLAGS);
+	callout_init(>timer_service, CALLOUT_MPSAFE);
 	callout_setfunc(>timer_service, ena_timer_service, adapter);
 
 	/* Initialize reset task queue */
 	rc = workqueue_create(>reset_tq, "ena_reset_enq",
-	ena_reset_task, adapter, 0, IPL_NET, WQ_PERCPU | WQ_FLAGS);
+	ena_reset_task, adapter, 0, IPL_NET, WQ_PERCPU | WQ_MPSAFE);
 	if (unlikely(rc != 0)) {
 		ena_trace(ENA_ALERT,
 		"Unable to create workqueue for reset task\n");



CVS commit: src/sys/dev/pci

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:18:56 UTC 2023

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

Log Message:
ena(4) is MP-ready, always use MPSAFE

Code contributed by KUSABA Takeshi 


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

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:17:41 UTC 2023

Modified Files:
src/sys/dev/pci: if_ena.c if_enavar.h

Log Message:
ena(4): support RSS and delete FreeBSD-specified code

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/if_enavar.h

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

Modified files:

Index: src/sys/dev/pci/if_ena.c
diff -u src/sys/dev/pci/if_ena.c:1.35 src/sys/dev/pci/if_ena.c:1.36
--- src/sys/dev/pci/if_ena.c:1.35	Sun Nov  5 18:15:02 2023
+++ src/sys/dev/pci/if_ena.c	Sun Nov  5 18:17:41 2023
@@ -36,7 +36,7 @@
 #if 0
 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.35 2023/11/05 18:15:02 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.36 2023/11/05 18:17:41 jdolecek Exp $");
 
 #include 
 #include 
@@ -106,6 +106,7 @@ static void	ena_free_all_io_rings_resour
 static int	ena_get_dev_offloads(struct ena_com_dev_get_features_ctx *);
 static int	ena_setup_ifnet(device_t, struct ena_adapter *,
 		struct ena_com_dev_get_features_ctx *);
+static void	ena_rss_init_default(device_t);
 
 static inline void	ena_alloc_counters_rx(struct ena_adapter *,
 			struct ena_stats_rx *, int);
@@ -217,8 +218,6 @@ static void	ena_rx_hash_mbuf(struct ena_
 struct mbuf *);
 static uint64_t	ena_get_counter(struct ifnet *, ift_counter);
 static void	ena_qflush(struct ifnet *);
-static int	ena_rss_init_default(struct ena_adapter *);
-static void	ena_rss_init_default_deferred(void *);
 #endif
 
 static const char ena_version[] =
@@ -693,9 +692,6 @@ ena_setup_tx_resources(struct ena_adapte
 	struct ena_que *que = >que[qid];
 	struct ena_ring *tx_ring = que->tx_ring;
 	int size, i, err;
-#ifdef	RSS
-	cpuset_t cpu_mask;
-#endif
 
 	size = sizeof(struct ena_tx_buffer) * tx_ring->ring_size;
 	tx_ring->tx_buffer_info = kmem_zalloc(size, KM_SLEEP);
@@ -739,20 +735,6 @@ ena_setup_tx_resources(struct ena_adapte
 		i = tx_ring->ring_size;
 		goto err_buf_info_unmap;
 	}
-
-#if 0
-	/* RSS set cpu for thread */
-#ifdef RSS
-	CPU_SETOF(que->cpu, _mask);
-	taskqueue_start_threads_cpuset(_ring->enqueue_tq, 1, IPL_NET,
-	_mask, "%s tx_ring enq (bucket %d)",
-	device_xname(adapter->pdev), que->cpu);
-#else /* RSS */
-	taskqueue_start_threads(_ring->enqueue_tq, 1, IPL_NET,
-	"%s txeq %d", device_xname(adapter->pdev), que->cpu);
-#endif /* RSS */
-#endif
-
 	return (0);
 
 err_buf_info_unmap:
@@ -886,9 +868,6 @@ ena_setup_rx_resources(struct ena_adapte
 	struct ena_que *que = >que[qid];
 	struct ena_ring *rx_ring = que->rx_ring;
 	int size, err, i;
-#ifdef	RSS
-	cpuset_t cpu_mask;
-#endif
 
 	size = sizeof(struct ena_rx_buffer) * rx_ring->ring_size;
 
@@ -951,19 +930,6 @@ ena_setup_rx_resources(struct ena_adapte
 		goto err_buf_info_unmap;
 	}
 
-#if 0
-	/* RSS set cpu for thread */
-#ifdef RSS
-	CPU_SETOF(que->cpu, _mask);
-	taskqueue_start_threads_cpuset(_ring->cmpl_tq, 1, IPL_NET, _mask,
-	"%s rx_ring cmpl (bucket %d)",
-	device_xname(adapter->pdev), que->cpu);
-#else
-	taskqueue_start_threads(_ring->cmpl_tq, 1, IPL_NET,
-	"%s rx_ring cmpl %d", device_xname(adapter->pdev), que->cpu);
-#endif
-#endif
-
 	return (0);
 
 err_buf_info_unmap:
@@ -3071,24 +3037,8 @@ ena_mq_start(struct ifnet *ifp, struct m
 	 * same bucket that the current CPU we're on is.
 	 * It should improve performance.
 	 */
-#if 0
-	if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
-#ifdef	RSS
-		if (rss_hash2bucket(m->m_pkthdr.flowid,
-		M_HASHTYPE_GET(m), ) == 0) {
-			i = i % adapter->num_queues;
+	i = cpu_index(curcpu()) % adapter->num_queues;
 
-		} else
-#endif
-		{
-			i = m->m_pkthdr.flowid % adapter->num_queues;
-		}
-	} else {
-#endif
-		i = cpu_index(curcpu()) % adapter->num_queues;
-#if 0
-	}
-#endif
 	tx_ring = >tx_ring[i];
 
 	/* Check if drbr is empty before putting packet */
@@ -3151,9 +3101,6 @@ ena_calc_io_queue_num(struct pci_attach_
 	/* 1 IRQ for mgmnt and 1 IRQ for each TX/RX pair */
 	io_queue_num = min_t(int, io_queue_num,
 	pci_msix_count(pa->pa_pc, pa->pa_tag) - 1);
-#ifdef	RSS
-	io_queue_num = min_t(int, io_queue_num, rss_getnumbuckets());
-#endif
 
 	return (io_queue_num);
 }
@@ -3197,10 +3144,10 @@ ena_calc_queue_size(struct ena_adapter *
 	return (queue_size);
 }
 
-#if 0
-static int
-ena_rss_init_default(struct ena_adapter *adapter)
+static void
+ena_rss_init_default(device_t self)
 {
+	struct ena_adapter *adapter = device_private(self);
 	struct ena_com_dev *ena_dev = adapter->ena_dev;
 	device_t dev = adapter->pdev;
 	int qid, rc, i;
@@ -3208,16 +3155,11 @@ ena_rss_init_default(struct ena_adapter 
 	rc = ena_com_rss_init(ena_dev, ENA_RX_RSS_TABLE_LOG_SIZE);
 	if (unlikely(rc != 0)) {
 		device_printf(dev, "Cannot init indirect table\n");
-		return (rc);
+		return;
 	}
 
 	for (i = 

CVS commit: src/sys/dev/pci

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:17:41 UTC 2023

Modified Files:
src/sys/dev/pci: if_ena.c if_enavar.h

Log Message:
ena(4): support RSS and delete FreeBSD-specified code

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/if_enavar.h

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



CVS commit: src/sys

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:15:02 UTC 2023

Modified Files:
src/sys/dev/pci: if_ena.c
src/sys/external/bsd/ena-com: ena_com.c ena_com.h ena_plat.h

Log Message:
ena(4): replace malloc(9) to kmem(9)

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/ena-com/ena_com.c \
src/sys/external/bsd/ena-com/ena_com.h
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/ena-com/ena_plat.h

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

Modified files:

Index: src/sys/dev/pci/if_ena.c
diff -u src/sys/dev/pci/if_ena.c:1.34 src/sys/dev/pci/if_ena.c:1.35
--- src/sys/dev/pci/if_ena.c:1.34	Thu Sep 21 09:31:50 2023
+++ src/sys/dev/pci/if_ena.c	Sun Nov  5 18:15:02 2023
@@ -36,15 +36,15 @@
 #if 0
 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.34 2023/09/21 09:31:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.35 2023/11/05 18:15:02 jdolecek Exp $");
 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -698,10 +698,10 @@ ena_setup_tx_resources(struct ena_adapte
 #endif
 
 	size = sizeof(struct ena_tx_buffer) * tx_ring->ring_size;
-	tx_ring->tx_buffer_info = malloc(size, M_DEVBUF, M_WAITOK | M_ZERO);
+	tx_ring->tx_buffer_info = kmem_zalloc(size, KM_SLEEP);
 
 	size = sizeof(uint16_t) * tx_ring->ring_size;
-	tx_ring->free_tx_ids = malloc(size, M_DEVBUF, M_WAITOK | M_ZERO);
+	tx_ring->free_tx_ids = kmem_zalloc(size, KM_SLEEP);
 
 	/* Req id stack for TX OOO completions */
 	for (i = 0; i < tx_ring->ring_size; i++)
@@ -760,9 +760,11 @@ err_buf_info_unmap:
 		bus_dmamap_destroy(adapter->sc_dmat,
 		tx_ring->tx_buffer_info[i].map);
 	}
-	free(tx_ring->free_tx_ids, M_DEVBUF);
+	size = sizeof(uint16_t) * tx_ring->ring_size;
+	kmem_free(tx_ring->free_tx_ids, size);
 	tx_ring->free_tx_ids = NULL;
-	free(tx_ring->tx_buffer_info, M_DEVBUF);
+	size = sizeof(struct ena_tx_buffer) * tx_ring->ring_size;
+	kmem_free(tx_ring->tx_buffer_info, size);
 	tx_ring->tx_buffer_info = NULL;
 
 	return (ENOMEM);
@@ -802,10 +804,11 @@ ena_free_tx_resources(struct ena_adapter
 	}
 
 	/* And free allocated memory. */
-	free(tx_ring->tx_buffer_info, M_DEVBUF);
+	kmem_free(tx_ring->tx_buffer_info,
+	sizeof(struct ena_tx_buffer) * tx_ring->ring_size);
 	tx_ring->tx_buffer_info = NULL;
 
-	free(tx_ring->free_tx_ids, M_DEVBUF);
+	kmem_free(tx_ring->free_tx_ids, sizeof(uint16_t) * tx_ring->ring_size);
 	tx_ring->free_tx_ids = NULL;
 }
 
@@ -895,10 +898,10 @@ ena_setup_rx_resources(struct ena_adapte
 	 */
 	size += sizeof(struct ena_rx_buffer);
 
-	rx_ring->rx_buffer_info = malloc(size, M_DEVBUF, M_WAITOK | M_ZERO);
+	rx_ring->rx_buffer_info = kmem_zalloc(size, KM_SLEEP);
 
 	size = sizeof(uint16_t) * rx_ring->ring_size;
-	rx_ring->free_rx_ids = malloc(size, M_DEVBUF, M_WAITOK);
+	rx_ring->free_rx_ids = kmem_zalloc(size, KM_SLEEP);
 
 	for (i = 0; i < rx_ring->ring_size; i++)
 		rx_ring->free_rx_ids[i] = i;
@@ -969,9 +972,11 @@ err_buf_info_unmap:
 		rx_ring->rx_buffer_info[i].map);
 	}
 
-	free(rx_ring->free_rx_ids, M_DEVBUF);
+	size = sizeof(uint16_t) * rx_ring->ring_size;
+	kmem_free(rx_ring->free_rx_ids, size);
 	rx_ring->free_rx_ids = NULL;
-	free(rx_ring->rx_buffer_info, M_DEVBUF);
+	size = sizeof(struct ena_rx_buffer) * (rx_ring->ring_size + 1);
+	kmem_free(rx_ring->rx_buffer_info, size);
 	rx_ring->rx_buffer_info = NULL;
 	return (ENOMEM);
 }
@@ -1008,10 +1013,11 @@ ena_free_rx_resources(struct ena_adapter
 #endif
 
 	/* free allocated memory */
-	free(rx_ring->rx_buffer_info, M_DEVBUF);
+	kmem_free(rx_ring->rx_buffer_info,
+	sizeof(struct ena_rx_buffer) * (rx_ring->ring_size + 1));
 	rx_ring->rx_buffer_info = NULL;
 
-	free(rx_ring->free_rx_ids, M_DEVBUF);
+	kmem_free(rx_ring->free_rx_ids, sizeof(uint16_t) * rx_ring->ring_size);
 	rx_ring->free_rx_ids = NULL;
 }
 
@@ -3811,13 +3817,11 @@ ena_attach(device_t parent, device_t sel
 	}
 
 	/* Allocate memory for ena_dev structure */
-	ena_dev = malloc(sizeof(struct ena_com_dev), M_DEVBUF,
-	M_WAITOK | M_ZERO);
+	ena_dev = kmem_zalloc(sizeof(struct ena_com_dev), KM_SLEEP);
 
 	adapter->ena_dev = ena_dev;
 	ena_dev->dmadev = self;
-	ena_dev->bus = malloc(sizeof(struct ena_bus), M_DEVBUF,
-	M_WAITOK | M_ZERO);
+	ena_dev->bus = kmem_zalloc(sizeof(struct ena_bus), KM_SLEEP);
 
 	/* Store register resources */
 	((struct ena_bus*)(ena_dev->bus))->reg_bar_t = adapter->sc_btag;
@@ -3941,8 +3945,8 @@ err_com_free:
 	ena_com_delete_host_info(ena_dev);
 	ena_com_mmio_reg_read_request_destroy(ena_dev);
 err_bus_free:
-	free(ena_dev->bus, M_DEVBUF);
-	free(ena_dev, M_DEVBUF);
+	kmem_free(ena_dev->bus, sizeof(struct ena_bus));
+	kmem_free(ena_dev, sizeof(struct ena_com_dev));
 	

CVS commit: src/sys

2023-11-05 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Nov  5 18:15:02 UTC 2023

Modified Files:
src/sys/dev/pci: if_ena.c
src/sys/external/bsd/ena-com: ena_com.c ena_com.h ena_plat.h

Log Message:
ena(4): replace malloc(9) to kmem(9)

Code contributed by KUSABA Takeshi 


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/ena-com/ena_com.c \
src/sys/external/bsd/ena-com/ena_com.h
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/ena-com/ena_plat.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/amd64/conf

2021-11-29 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Nov 29 20:03:15 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOMU

Log Message:
enable UFS_ACL option for XEN3_DOMU, it's useful for e.g. running Samba in DomU

idea from Matthias Petermann via current-users@


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/amd64/conf/XEN3_DOMU

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/amd64/conf/XEN3_DOMU
diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.97 src/sys/arch/amd64/conf/XEN3_DOMU:1.98
--- src/sys/arch/amd64/conf/XEN3_DOMU:1.97	Wed Jan 20 13:22:08 2021
+++ src/sys/arch/amd64/conf/XEN3_DOMU	Mon Nov 29 20:03:15 2021
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOMU,v 1.97 2021/01/20 13:22:08 nia Exp $
+# $NetBSD: XEN3_DOMU,v 1.98 2021/11/29 20:03:15 jdolecek Exp $
 
 include 	"arch/amd64/conf/std.xen"
 
@@ -11,7 +11,7 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #options 	UVMHIST_PRINT
 #options 	SYSCALL_DEBUG
 
-#ident		"XEN3_DOMU-$Revision: 1.97 $"
+#ident		"XEN3_DOMU-$Revision: 1.98 $"
 
 maxusers	32		# estimated number of users
 
@@ -80,6 +80,7 @@ options 	QUOTA2		# new, in-filesystem UF
 #options 	FFS_EI		# FFS Endian Independent support
 options 	WAPBL		# File system journaling support
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
+options		UFS_ACL		# UFS Access Control Lists
 options 	NFSSERVER	# Network File System server
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 options 	UFS_EXTATTR	# Extended attribute support for UFS1



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

2021-11-29 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Nov 29 20:03:15 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOMU

Log Message:
enable UFS_ACL option for XEN3_DOMU, it's useful for e.g. running Samba in DomU

idea from Matthias Petermann via current-users@


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/amd64/conf/XEN3_DOMU

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



CVS commit: src/share/man/man7

2019-11-14 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Nov 14 21:23:46 UTC 2019

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
document vm.ubc_direct


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/share/man/man7/sysctl.7

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

Modified files:

Index: src/share/man/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.140 src/share/man/man7/sysctl.7:1.141
--- src/share/man/man7/sysctl.7:1.140	Mon Aug  5 22:03:10 2019
+++ src/share/man/man7/sysctl.7	Thu Nov 14 21:23:46 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysctl.7,v 1.140 2019/08/05 22:03:10 maya Exp $
+.\"	$NetBSD: sysctl.7,v 1.141 2019/11/14 21:23:46 jdolecek Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
 .\"
-.Dd August 6, 2019
+.Dd November 14, 2019
 .Dt SYSCTL 7
 .Os
 .Sh NAME
@@ -2531,6 +2531,12 @@ the fifth is the size of
 Returns an array of
 .Vt struct kinfo_vmentry
 objects.
+.It Li vm.ubc_direct
+Use direct map for UBC I/O, avoiding need to map and unmap buffer memory.
+Speeds up operation for fast I/O devices like NVMe, especially
+on multi-CPU systems.
+Only available on some architectures.
+Currently still experimental, default is off.
 .It Li vm.uspace ( Dv VM_USPACE )
 The number of bytes allocated for each kernel stack.
 .It Li vm.uvmexp ( Dv VM_UVMEXP )



CVS commit: src/share/man/man7

2019-11-14 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Nov 14 21:23:46 UTC 2019

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
document vm.ubc_direct


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/share/man/man7/sysctl.7

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



CVS commit: src/sys/compat

2019-11-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Nov  9 23:45:08 UTC 2019

Modified Files:
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux32/arch/amd64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
linux32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.107 -r1.108 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.109 -r1.110 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.13 -r1.14 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.80 -r1.81 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.13 -r1.14 \
src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.114 -r1.115 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.115 -r1.116 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.9 -r1.10 \
src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.106 -r1.107 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.105 -r1.106 \
src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.78 -r1.79 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.77 -r1.78 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.c
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.83 -r1.84 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.c
cvs rdiff -u -r1.79 -r1.80 \
src/sys/compat/linux32/arch/amd64/linux32_syscall.h \
src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \
src/sys/compat/linux32/arch/amd64/linux32_sysent.c
cvs rdiff -u -r1.6 -r1.7 \
src/sys/compat/linux32/arch/amd64/linux32_systrace_args.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/compat/linux/arch/alpha/linux_syscall.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.108 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.109
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.108	Sun Mar 24 16:39:46 2019
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Sat Nov  9 23:45:07 2019
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.108 2019/03/24 16:39:46 maxv Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.109 2019/11/09 23:45:07 jdolecek Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.94 2017/02/03 16:17:08 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.96 2019/11/09 23:44:31 jdolecek Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -702,6 +702,9 @@
 /* syscall: "recvmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" "struct timespec *" */
 #define	LINUX_SYS_recvmmsg	479
 
+/* syscall: "fallocate" ret: "int" args: "int" "int" "off_t" "off_t" */
+#define	LINUX_SYS_fallocate	480
+
 /* syscall: "dup3" ret: "int" args: "int" "int" "int" */
 #define	LINUX_SYS_dup3	487
 
Index: 

CVS commit: src/sys/compat

2019-11-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Nov  9 23:44:32 UTC 2019

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_file.c
src/sys/compat/linux32/arch/amd64: syscalls.master
src/sys/compat/linux32/common: linux32_unistd.c

Log Message:
add dummy implementation of linux fallocate() which just returns EOPNOTSUPP;
this is needed so that glibc falls back to emulation and apps behaving
properly, since EOPNOTSUPP is a documented and expected return code, but
ENOSYS is not

right now there are no filesystems in NetBSD tree supporting the fallocate
VOP, so no point trying to map this to a native call

supposed to help with problem reported in
https://mail-index.netbsd.org/tech-kern/2019/11/03/msg025641.html


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.60 -r1.61 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.67 -r1.68 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.122 -r1.123 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.93 -r1.94 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.72 -r1.73 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.116 -r1.117 src/sys/compat/linux/common/linux_file.c
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux32/arch/amd64/syscalls.master
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/linux32/common/linux32_unistd.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/compat/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.95 src/sys/compat/linux/arch/alpha/syscalls.master:1.96
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.95	Sun Mar 24 16:24:19 2019
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Sat Nov  9 23:44:31 2019
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.95 2019/03/24 16:24:19 maxv Exp $
+	$NetBSD: syscalls.master,v 1.96 2019/11/09 23:44:31 jdolecek Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -760,7 +760,8 @@
 479	STD		{ int|linux_sys||recvmmsg(int s, \
 			struct linux_mmsghdr *msgvec, unsigned int vlen, \
 			unsigned int flags, struct timespec *timeout); }
-480	UNIMPL		fallocate
+480	STD		{ int|linux_sys||fallocate(int fd, int mode, \
+			off_t offset, off_t len); }
 481	UNIMPL		timerfd_create
 482	UNIMPL		timerfd_settime
 483	UNIMPL		timerfd_gettime

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.60 src/sys/compat/linux/arch/amd64/syscalls.master:1.61
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.60	Fri Feb  3 16:18:19 2017
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Sat Nov  9 23:44:31 2019
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.60 2017/02/03 16:18:19 christos Exp $
+	$NetBSD: syscalls.master,v 1.61 2019/11/09 23:44:31 jdolecek Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -513,7 +513,8 @@
 282	UNIMPL		signalfd
 283	UNIMPL		timerfd_create
 284	UNIMPL		eventfd
-285	UNIMPL		fallocate
+285	STD		{ int|linux_sys||fallocate(int fd, int mode, \
+			off_t offset, off_t len); }
 286	UNIMPL		timerfd_settime
 287	UNIMPL		timerfd_gettime
 288	STD		{ int|linux_sys||accept4(int s, \

Index: src/sys/compat/linux/arch/arm/syscalls.master
diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.67 src/sys/compat/linux/arch/arm/syscalls.master:1.68
--- src/sys/compat/linux/arch/arm/syscalls.master:1.67	Fri Feb  3 16:28:34 2017
+++ src/sys/compat/linux/arch/arm/syscalls.master	Sat Nov  9 23:44:31 2019
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.67 2017/02/03 16:28:34 christos Exp $
+	$NetBSD: syscalls.master,v 1.68 2019/11/09 23:44:31 jdolecek Exp $
 
 ; Derived from sys/compat/linux/arch/*/syscalls.master
 ; and from Linux 2.4.12 arch/arm/kernel/calls.S
@@ -556,7 +556,8 @@
 349	UNIMPL		signalfd
 350	UNIMPL		timerfd_create
 351	UNIMPL		eventfd
-352	UNIMPL		fallocate
+352	STD		{ int|linux_sys||fallocate(int fd, int mode, \
+			off_t offset, off_t len); }
 353	UNIMPL		timerfd_settime
 354	UNIMPL		timerfd_gettime
 355	UNIMPL		signalfd4

Index: src/sys/compat/linux/arch/i386/syscalls.master
diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.122 src/sys/compat/linux/arch/i386/syscalls.master:1.123
--- src/sys/compat/linux/arch/i386/syscalls.master:1.122	Mon Jan  2 16:32:09 2017
+++ src/sys/compat/linux/arch/i386/syscalls.master	Sat Nov 

CVS commit: src/sys/compat

2019-11-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Nov  9 23:45:08 UTC 2019

Modified Files:
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c linux_systrace_args.c
src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c
src/sys/compat/linux32/arch/amd64: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c
linux32_systrace_args.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.107 -r1.108 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.109 -r1.110 src/sys/compat/linux/arch/alpha/linux_syscalls.c
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux/arch/amd64/linux_syscall.h \
src/sys/compat/linux/arch/amd64/linux_syscallargs.h \
src/sys/compat/linux/arch/amd64/linux_syscalls.c \
src/sys/compat/linux/arch/amd64/linux_sysent.c
cvs rdiff -u -r1.13 -r1.14 \
src/sys/compat/linux/arch/amd64/linux_systrace_args.c
cvs rdiff -u -r1.80 -r1.81 src/sys/compat/linux/arch/arm/linux_syscall.h \
src/sys/compat/linux/arch/arm/linux_syscallargs.h \
src/sys/compat/linux/arch/arm/linux_syscalls.c \
src/sys/compat/linux/arch/arm/linux_sysent.c
cvs rdiff -u -r1.13 -r1.14 \
src/sys/compat/linux/arch/arm/linux_systrace_args.c
cvs rdiff -u -r1.114 -r1.115 src/sys/compat/linux/arch/i386/linux_syscall.h \
src/sys/compat/linux/arch/i386/linux_syscallargs.h \
src/sys/compat/linux/arch/i386/linux_sysent.c
cvs rdiff -u -r1.115 -r1.116 src/sys/compat/linux/arch/i386/linux_syscalls.c
cvs rdiff -u -r1.9 -r1.10 \
src/sys/compat/linux/arch/i386/linux_systrace_args.c
cvs rdiff -u -r1.106 -r1.107 src/sys/compat/linux/arch/m68k/linux_syscall.h \
src/sys/compat/linux/arch/m68k/linux_syscalls.c \
src/sys/compat/linux/arch/m68k/linux_sysent.c
cvs rdiff -u -r1.105 -r1.106 \
src/sys/compat/linux/arch/m68k/linux_syscallargs.h
cvs rdiff -u -r1.78 -r1.79 src/sys/compat/linux/arch/mips/linux_syscall.h
cvs rdiff -u -r1.77 -r1.78 src/sys/compat/linux/arch/mips/linux_syscallargs.h \
src/sys/compat/linux/arch/mips/linux_syscalls.c \
src/sys/compat/linux/arch/mips/linux_sysent.c
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/arch/powerpc/linux_syscall.h \
src/sys/compat/linux/arch/powerpc/linux_sysent.c
cvs rdiff -u -r1.83 -r1.84 \
src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \
src/sys/compat/linux/arch/powerpc/linux_syscalls.c
cvs rdiff -u -r1.79 -r1.80 \
src/sys/compat/linux32/arch/amd64/linux32_syscall.h \
src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \
src/sys/compat/linux32/arch/amd64/linux32_sysent.c
cvs rdiff -u -r1.6 -r1.7 \
src/sys/compat/linux32/arch/amd64/linux32_systrace_args.c

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



CVS commit: src/sys/compat

2019-11-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Nov  9 23:44:32 UTC 2019

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/arch/amd64: syscalls.master
src/sys/compat/linux/arch/arm: syscalls.master
src/sys/compat/linux/arch/i386: syscalls.master
src/sys/compat/linux/arch/m68k: syscalls.master
src/sys/compat/linux/arch/mips: syscalls.master
src/sys/compat/linux/arch/powerpc: syscalls.master
src/sys/compat/linux/common: linux_file.c
src/sys/compat/linux32/arch/amd64: syscalls.master
src/sys/compat/linux32/common: linux32_unistd.c

Log Message:
add dummy implementation of linux fallocate() which just returns EOPNOTSUPP;
this is needed so that glibc falls back to emulation and apps behaving
properly, since EOPNOTSUPP is a documented and expected return code, but
ENOSYS is not

right now there are no filesystems in NetBSD tree supporting the fallocate
VOP, so no point trying to map this to a native call

supposed to help with problem reported in
https://mail-index.netbsd.org/tech-kern/2019/11/03/msg025641.html


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.60 -r1.61 src/sys/compat/linux/arch/amd64/syscalls.master
cvs rdiff -u -r1.67 -r1.68 src/sys/compat/linux/arch/arm/syscalls.master
cvs rdiff -u -r1.122 -r1.123 src/sys/compat/linux/arch/i386/syscalls.master
cvs rdiff -u -r1.93 -r1.94 src/sys/compat/linux/arch/m68k/syscalls.master
cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/mips/syscalls.master
cvs rdiff -u -r1.72 -r1.73 src/sys/compat/linux/arch/powerpc/syscalls.master
cvs rdiff -u -r1.116 -r1.117 src/sys/compat/linux/common/linux_file.c
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux32/arch/amd64/syscalls.master
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/linux32/common/linux32_unistd.c

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



CVS commit: src/sys/kern

2019-11-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Nov  9 22:05:50 UTC 2019

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
do not try to rm sysautoload when it's not actually used for given compat;
script tried to rm /dev/null which failed


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/sys/kern/makesyscalls.sh

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

Modified files:

Index: src/sys/kern/makesyscalls.sh
diff -u src/sys/kern/makesyscalls.sh:1.175 src/sys/kern/makesyscalls.sh:1.176
--- src/sys/kern/makesyscalls.sh:1.175	Sun Oct 13 22:31:19 2019
+++ src/sys/kern/makesyscalls.sh	Sat Nov  9 22:05:50 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: makesyscalls.sh,v 1.175 2019/10/13 22:31:19 christos Exp $
+#	$NetBSD: makesyscalls.sh,v 1.176 2019/11/09 22:05:50 jdolecek Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -116,7 +116,7 @@ systracetmp="systrace.$$"
 systraceret="systraceret.$$"
 
 cleanup() {
-rm $sysdcl $sysprotos $sysent $sysnamesbottom $sysnamesfriendly $rumpsysent $rumptypes $rumpprotos $systracetmp $systraceret $sysautoloadbottom
+rm $sysdcl $sysprotos $sysent $sysnamesbottom $sysnamesfriendly $rumpsysent $rumptypes $rumpprotos $systracetmp $systraceret ${sysautoloadbottom#/dev/null}
 }
 trap "cleanup" 0
 



CVS commit: src/sys/kern

2019-11-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Nov  9 22:05:50 UTC 2019

Modified Files:
src/sys/kern: makesyscalls.sh

Log Message:
do not try to rm sysautoload when it's not actually used for given compat;
script tried to rm /dev/null which failed


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/sys/kern/makesyscalls.sh

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



CVS commit: src/sys/compat/linux/arch

2019-11-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Nov  9 22:02:45 UTC 2019

Modified Files:
src/sys/compat/linux/arch: Makefile

Log Message:
don't descend to sparc and sparc64, they don't have syscalls.master
so it just errors out


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux/arch/Makefile

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



CVS commit: src/sys/compat/linux/arch

2019-11-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Nov  9 22:02:45 UTC 2019

Modified Files:
src/sys/compat/linux/arch: Makefile

Log Message:
don't descend to sparc and sparc64, they don't have syscalls.master
so it just errors out


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux/arch/Makefile

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

Modified files:

Index: src/sys/compat/linux/arch/Makefile
diff -u src/sys/compat/linux/arch/Makefile:1.1 src/sys/compat/linux/arch/Makefile:1.2
--- src/sys/compat/linux/arch/Makefile:1.1	Mon Jan 16 00:11:42 2017
+++ src/sys/compat/linux/arch/Makefile	Sat Nov  9 22:02:45 2019
@@ -1,5 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2017/01/16 00:11:42 christos Exp $
+# $NetBSD: Makefile,v 1.2 2019/11/09 22:02:45 jdolecek Exp $
+
+# XXX sparc sparc64 exist but have no syscalls.master
+SUBDIR=alpha amd64 arm i386 m68k mips powerpc
 
-SUBDIR=alpha amd64 arm i386 m68k mips powerpc sparc sparc64
 
 .include 



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

2019-10-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Oct 16 19:52:09 UTC 2019

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

Log Message:
use aprint_normal_dev() for the capacity message, same as e.g. wd(4) and sd(4)


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/xen/xen/xbd_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.93 src/sys/arch/xen/xen/xbd_xenbus.c:1.94
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.93	Wed Oct 16 19:38:13 2019
+++ src/sys/arch/xen/xen/xbd_xenbus.c	Wed Oct 16 19:52:08 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbd_xenbus.c,v 1.93 2019/10/16 19:38:13 jdolecek Exp $  */
+/*  $NetBSD: xbd_xenbus.c,v 1.94 2019/10/16 19:52:08 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.93 2019/10/16 19:38:13 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.94 2019/10/16 19:52:08 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -588,7 +588,7 @@ xbd_backend_changed(void *arg, XenbusSta
 		sc->sc_backend_status = BLKIF_STATE_CONNECTED;
 
 		format_bytes(buf, sizeof(buf), sc->sc_sectors * sc->sc_secsize);
-		aprint_verbose_dev(sc->sc_dksc.sc_dev,
+		aprint_normal_dev(sc->sc_dksc.sc_dev,
 "%s, %d bytes/sect x %" PRIu64 " sectors\n",
 buf, (int)dg->dg_secsize, sc->sc_xbdsize);
 



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

2019-10-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Oct 16 19:52:09 UTC 2019

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

Log Message:
use aprint_normal_dev() for the capacity message, same as e.g. wd(4) and sd(4)


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/xen/xen/xbd_xenbus.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/xen/xen

2019-10-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Oct 16 19:38:13 UTC 2019

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

Log Message:
don't try to read disklabel for attached xbd* disk from (effectively) always
xbd0a device, there is no need for it and it is just wrong

same problem as PR kern/41704 for cgd

XXX perhaps xbd should use native block size passed from dom0 rather then
XXX recomputing in DEV_BSIZE


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/xen/xen/xbd_xenbus.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/xen/xen

2019-10-16 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Oct 16 19:38:13 UTC 2019

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

Log Message:
don't try to read disklabel for attached xbd* disk from (effectively) always
xbd0a device, there is no need for it and it is just wrong

same problem as PR kern/41704 for cgd

XXX perhaps xbd should use native block size passed from dom0 rather then
XXX recomputing in DEV_BSIZE


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/xen/xen/xbd_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.92 src/sys/arch/xen/xen/xbd_xenbus.c:1.93
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.92	Sat Feb  2 12:32:55 2019
+++ src/sys/arch/xen/xen/xbd_xenbus.c	Wed Oct 16 19:38:13 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbd_xenbus.c,v 1.92 2019/02/02 12:32:55 cherry Exp $  */
+/*  $NetBSD: xbd_xenbus.c,v 1.93 2019/10/16 19:38:13 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.92 2019/02/02 12:32:55 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.93 2019/10/16 19:38:13 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -587,12 +587,11 @@ xbd_backend_changed(void *arg, XenbusSta
 
 		sc->sc_backend_status = BLKIF_STATE_CONNECTED;
 
-		/* try to read the disklabel */
-		dk_getdisklabel(>sc_dksc, 0 /* XXX ? */);
 		format_bytes(buf, sizeof(buf), sc->sc_sectors * sc->sc_secsize);
 		aprint_verbose_dev(sc->sc_dksc.sc_dev,
 "%s, %d bytes/sect x %" PRIu64 " sectors\n",
 buf, (int)dg->dg_secsize, sc->sc_xbdsize);
+
 		/* Discover wedges on this disk. */
 		dkwedge_discover(>sc_dksc.sc_dkdev);
 



CVS commit: src/sys/arch

2019-09-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Sep  9 22:01:23 UTC 2019

Modified Files:
src/sys/arch/dreamcast/dev/g1: wdc_g1.c
src/sys/arch/evbppc/mpc85xx: wdc_obio.c
src/sys/arch/mips/adm5120/dev: wdc_extio.c
src/sys/arch/mmeye/dev: wdc_mainbus.c

Log Message:
adjust several missed drivers for wdcprobe() changes of ATA NCQ branch

for dreamcast g1 just drop the custom reset function, it doesn't seem to do
anything useful over the generic variant

PR kern/54538 by Izumi Tsutsui


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/dreamcast/dev/g1/wdc_g1.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbppc/mpc85xx/wdc_obio.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/adm5120/dev/wdc_extio.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mmeye/dev/wdc_mainbus.c

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

Modified files:

Index: src/sys/arch/dreamcast/dev/g1/wdc_g1.c
diff -u src/sys/arch/dreamcast/dev/g1/wdc_g1.c:1.3 src/sys/arch/dreamcast/dev/g1/wdc_g1.c:1.4
--- src/sys/arch/dreamcast/dev/g1/wdc_g1.c:1.3	Fri Oct 20 07:06:06 2017
+++ src/sys/arch/dreamcast/dev/g1/wdc_g1.c	Mon Sep  9 22:01:23 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_g1.c,v 1.3 2017/10/20 07:06:06 jdolecek Exp $ */
+/* $NetBSD: wdc_g1.c,v 1.4 2019/09/09 22:01:23 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -62,7 +62,9 @@ struct wdc_g1_softc {
 
 static int	wdc_g1_probe(device_t, cfdata_t, void *);
 static void	wdc_g1_attach(device_t, device_t, void *);
+#if 0
 static void	wdc_g1_do_reset(struct ata_channel *, int);
+#endif
 static int	wdc_g1_intr(void *);
 
 CFATTACH_DECL_NEW(wdc_g1bus, sizeof(struct wdc_g1_softc),
@@ -71,9 +73,7 @@ CFATTACH_DECL_NEW(wdc_g1bus, sizeof(stru
 static int
 wdc_g1_probe(device_t parent, cfdata_t cf, void *aux)
 {
-	struct ata_channel ch;
 	struct g1bus_attach_args *ga = aux;
-	struct wdc_softc wdc;
 	struct wdc_regs wdr;
 	int result = 0, i;
 #ifdef ATADEBUG
@@ -84,11 +84,9 @@ wdc_g1_probe(device_t parent, cfdata_t c
 	for (i = 0; i < 0x20 / 4; i++)
 		(void)((volatile uint32_t *)0xa000)[i];
 
-	memset(, 0, sizeof(wdc));
-	memset(, 0, sizeof(ch));
-	ch.ch_atac = _atac;
+#if 0
 	wdc.reset = wdc_g1_do_reset;
-	wdc.regs = 
+#endif
 
 	wdr.cmd_iot = ga->ga_memt;
 	if (bus_space_map(wdr.cmd_iot, WDC_G1_CMD_ADDR,
@@ -101,7 +99,7 @@ wdc_g1_probe(device_t parent, cfdata_t c
 			goto outunmap;
 	}
 
-	wdc_init_shadow_regs();
+	wdc_init_shadow_regs();
 
 	wdr.ctl_iot = ga->ga_memt;
 	if (bus_space_map(wdr.ctl_iot, WDC_G1_CTL_ADDR,
@@ -112,9 +110,8 @@ wdc_g1_probe(device_t parent, cfdata_t c
 	/* fake up device name for ATADEBUG_PRINT() with DEBUG_PROBE */
 	memset(, 0, sizeof(dev));
 	strncat(dev.dv_xname, "wdc(g1probe)", sizeof(dev.dv_xname));
-	wdc.sc_atac.atac_dev = 
 #endif
-	result = wdcprobe();
+	result = wdcprobe();
 	
 	bus_space_unmap(wdr.ctl_iot, wdr.ctl_ioh, WDC_G1_AUXREG_NPORTS);
  outunmap:
@@ -160,7 +157,9 @@ wdc_g1_attach(struct device *parent, str
 	sc->sc_wdcdev.sc_atac.atac_channels = sc->wdc_chanlist;
 	sc->sc_wdcdev.sc_atac.atac_nchannels = 1;
 	sc->sc_wdcdev.wdc_maxdrives = 2;
+#if 0
 	sc->sc_wdcdev.reset = wdc_g1_do_reset;
+#endif
 	sc->ata_channel.ch_channel = 0;
 	sc->ata_channel.ch_atac = >sc_wdcdev.sc_atac;
 
@@ -181,6 +180,13 @@ wdc_g1_intr(void *arg)
 	return wdcintr(arg);
 }
 
+#if 0
+/*
+ * This does what the generic wdc_do_reset() does, only with unnecessary
+ * additional GD-ROM reset. Keep code around in case this turns out to be
+ * actually useful/necessary. ATAPI code should do it's own reset in either
+ * case anyway.
+ */
 static void
 wdc_g1_do_reset(struct ata_channel *chp, int poll)
 {
@@ -214,3 +220,4 @@ wdc_g1_do_reset(struct ata_channel *chp,
 	if (poll != 0)
 		splx(s);
 }
+#endif

Index: src/sys/arch/evbppc/mpc85xx/wdc_obio.c
diff -u src/sys/arch/evbppc/mpc85xx/wdc_obio.c:1.6 src/sys/arch/evbppc/mpc85xx/wdc_obio.c:1.7
--- src/sys/arch/evbppc/mpc85xx/wdc_obio.c:1.6	Fri Oct 20 07:06:06 2017
+++ src/sys/arch/evbppc/mpc85xx/wdc_obio.c	Mon Sep  9 22:01:23 2019
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.6 2017/10/20 07:06:06 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.7 2019/09/09 22:01:23 jdolecek Exp $");
 
 #include 
 #include 
@@ -100,8 +100,6 @@ wdc_obio_match(device_t parent, cfdata_t
 {
 	struct generic_attach_args * const ga = aux;
 	bus_size_t size = ga->ga_size;
-	struct ata_channel ch;
-	struct wdc_softc wdc;
 	struct wdc_regs wdr;
 	struct device dev;
 	int rv = 0;
@@ -115,18 +113,13 @@ wdc_obio_match(device_t parent, cfdata_t
 	 * We need to see if a CF is attached in True-IDE mode
 	 */
 	memset(, 0, sizeof(dev));
-	memset(, 0, sizeof(wdc));
-	memset(, 0, sizeof(ch));
 	memset(, 0, sizeof(wdr));
 
 	dev.dv_xname[0] = '?';
-	wdc.sc_atac.atac_dev = 
-	ch.ch_atac = _atac;
-	wdc.regs = 
 
 	if (wdc_obio_initregmap(, ga->ga_bst, ga->ga_addr, size)) {
-		

CVS commit: src/sys/arch

2019-09-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Sep  9 22:01:23 UTC 2019

Modified Files:
src/sys/arch/dreamcast/dev/g1: wdc_g1.c
src/sys/arch/evbppc/mpc85xx: wdc_obio.c
src/sys/arch/mips/adm5120/dev: wdc_extio.c
src/sys/arch/mmeye/dev: wdc_mainbus.c

Log Message:
adjust several missed drivers for wdcprobe() changes of ATA NCQ branch

for dreamcast g1 just drop the custom reset function, it doesn't seem to do
anything useful over the generic variant

PR kern/54538 by Izumi Tsutsui


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/dreamcast/dev/g1/wdc_g1.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbppc/mpc85xx/wdc_obio.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/adm5120/dev/wdc_extio.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mmeye/dev/wdc_mainbus.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

2019-06-02 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Jun  2 14:48:55 UTC 2019

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

Log Message:
updated patch from Andrius - update the chip map for CX700 to use
via_sata_chip_map_new, this seems to eliminate the ghost non-existing viaide1

XXX guess should use via_sata_chip_map_new for PCI_PRODUCT_VIATECH_CX700M2_IDE
XXX too, but this needs test on real hw

remove again the entries for VX800 and VX855 from pciide_via_products[],
as that part is untested with real hw

update for PR kern/43309


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/dev/pci/viaide.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/viaide.c
diff -u src/sys/dev/pci/viaide.c:1.88 src/sys/dev/pci/viaide.c:1.89
--- src/sys/dev/pci/viaide.c:1.88	Sat Jun  1 08:20:14 2019
+++ src/sys/dev/pci/viaide.c	Sun Jun  2 14:48:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: viaide.c,v 1.88 2019/06/01 08:20:14 jdolecek Exp $	*/
+/*	$NetBSD: viaide.c,v 1.89 2019/06/02 14:48:55 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.88 2019/06/01 08:20:14 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.89 2019/06/02 14:48:55 jdolecek Exp $");
 
 #include 
 #include 
@@ -302,23 +302,13 @@ static const struct pciide_product_desc 
 	{ PCI_PRODUCT_VIATECH_CX700_IDE,
 	  0,
 	  NULL,
-	  via_chip_map,
+	  via_sata_chip_map_new,
 	},
 	{ PCI_PRODUCT_VIATECH_CX700M2_IDE,
 	  0,
 	  NULL,
 	  via_chip_map,
 	},
-	{ PCI_PRODUCT_VIATECH_VX800,
-	  0,
-	  "VIA Technologies VX800 SATA Controller",
-	  via_sata_chip_map_new,
-	},
-	{ PCI_PRODUCT_VIATECH_VX855,
-	  0,
-	  NULL,
-	  via_sata_chip_map_new,
-	},
 	{ PCI_PRODUCT_VIATECH_VX900_IDE,
 	  0,
 	  NULL,



CVS commit: src/sys/dev/pci

2019-06-02 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Jun  2 14:48:55 UTC 2019

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

Log Message:
updated patch from Andrius - update the chip map for CX700 to use
via_sata_chip_map_new, this seems to eliminate the ghost non-existing viaide1

XXX guess should use via_sata_chip_map_new for PCI_PRODUCT_VIATECH_CX700M2_IDE
XXX too, but this needs test on real hw

remove again the entries for VX800 and VX855 from pciide_via_products[],
as that part is untested with real hw

update for PR kern/43309


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

2019-06-01 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Jun  1 08:20:14 UTC 2019

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

Log Message:
match VIA Technologies VX800, VX855, and VT8237S in RAID mode

patch provided and testing done by Andrius Varanavicius via PR kern/43309


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/pci/viaide.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/viaide.c
diff -u src/sys/dev/pci/viaide.c:1.87 src/sys/dev/pci/viaide.c:1.88
--- src/sys/dev/pci/viaide.c:1.87	Sun Dec  9 11:14:02 2018
+++ src/sys/dev/pci/viaide.c	Sat Jun  1 08:20:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: viaide.c,v 1.87 2018/12/09 11:14:02 jdolecek Exp $	*/
+/*	$NetBSD: viaide.c,v 1.88 2019/06/01 08:20:14 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.87 2018/12/09 11:14:02 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.88 2019/06/01 08:20:14 jdolecek Exp $");
 
 #include 
 #include 
@@ -309,6 +309,16 @@ static const struct pciide_product_desc 
 	  NULL,
 	  via_chip_map,
 	},
+	{ PCI_PRODUCT_VIATECH_VX800,
+	  0,
+	  "VIA Technologies VX800 SATA Controller",
+	  via_sata_chip_map_new,
+	},
+	{ PCI_PRODUCT_VIATECH_VX855,
+	  0,
+	  NULL,
+	  via_sata_chip_map_new,
+	},
 	{ PCI_PRODUCT_VIATECH_VX900_IDE,
 	  0,
 	  NULL,
@@ -349,6 +359,11 @@ static const struct pciide_product_desc 
 	  "VIA Technologies VT8237S SATA Controller",
 	  via_sata_chip_map_7,
 	},
+	{ PCI_PRODUCT_VIATECH_VT8237S_SATA_RAID,
+	  0,
+	  "VIA Technologies VT8237S SATA Controller (RAID mode)",
+	  via_sata_chip_map_7,
+	},
 	{ 0,
 	  0,
 	  NULL,
@@ -546,6 +561,14 @@ via_chip_map(struct pciide_softc *sc, co
 aprint_normal("VT8251 ATA133 controller\n");
 sc->sc_wdcdev.sc_atac.atac_udma_cap = 6;
 break;
+			case PCI_PRODUCT_VIATECH_VX800:
+aprint_normal("VT800 ATA133 controller\n");
+sc->sc_wdcdev.sc_atac.atac_udma_cap = 6;
+break;
+			case PCI_PRODUCT_VIATECH_VX855:
+aprint_normal("VT855 ATA133 controller\n");
+sc->sc_wdcdev.sc_atac.atac_udma_cap = 6;
+break;
 			default:
 		unknown:
 aprint_normal("unknown VIA ATA controller\n");



CVS commit: src/sys/dev/pci

2019-06-01 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Jun  1 08:20:14 UTC 2019

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

Log Message:
match VIA Technologies VX800, VX855, and VT8237S in RAID mode

patch provided and testing done by Andrius Varanavicius via PR kern/43309


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

2019-06-01 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Jun  1 08:15:05 UTC 2019

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.1361 -r1.1362 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1360 -r1.1361 src/sys/dev/pci/pcidevs_data.h

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

Modified files:

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.1361 src/sys/dev/pci/pcidevs.h:1.1362
--- src/sys/dev/pci/pcidevs.h:1.1361	Thu May 30 16:04:28 2019
+++ src/sys/dev/pci/pcidevs.h	Sat Jun  1 08:15:05 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1361 2019/05/30 16:04:28 mlelstv Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1362 2019/06/01 08:15:05 jdolecek Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1373 2019/05/30 16:04:04 mlelstv Exp
+ *	NetBSD: pcidevs,v 1.1374 2019/06/01 08:13:31 jdolecek Exp
  */
 
 /*
@@ -7699,7 +7699,6 @@
 #define	PCI_PRODUCT_VIATECH_VT3351_IOAPIC	0x5351		/* VT3351 I/O APIC Interrupt Controller */
 #define	PCI_PRODUCT_VIATECH_P4M900_IOAPIC	0x5364		/* CN896/P4M900 IOAPIC */
 #define	PCI_PRODUCT_VIATECH_VT8237S_SATA	0x5372		/* VT8237S Integrated SATA Controller */
-#define	PCI_PRODUCT_VIATECH_VT8237S_SATA_2	0x7372		/* VT8237S Integrated SATA Controller */
 #define	PCI_PRODUCT_VIATECH_VT86C100A	0x6100		/* VT86C100A (Rhine-II) 10/100 Ethernet */
 #define	PCI_PRODUCT_VIATECH_VT8251_SATA	0x6287		/* VT8251 Integrated SATA Controller */
 #define	PCI_PRODUCT_VIATECH_P4M900_6	0x6364		/* CN896/P4M900 Security Device */
@@ -7707,6 +7706,7 @@
 #define	PCI_PRODUCT_VIATECH_KT880_5	0x7269		/* KT880 CPU to PCI Bridge */
 #define	PCI_PRODUCT_VIATECH_VT3351_HB_7351	0x7351		/* VT3351 Host Bridge */
 #define	PCI_PRODUCT_VIATECH_P4M900_7	0x7364		/* CN896/P4M900 Host Bridge */
+#define	PCI_PRODUCT_VIATECH_VT8237S_SATA_RAID	0x7372		/* VT8237S Integrated SATA Controller (RAID mode) */
 #define	PCI_PRODUCT_VIATECH_VT8231	0x8231		/* VT8231 PCI-ISA Bridge */
 #define	PCI_PRODUCT_VIATECH_VT8231_PWR	0x8235		/* VT8231 Power Management Controller */
 #define	PCI_PRODUCT_VIATECH_VT8363_PPB	0x8305		/* VT8363 (Apollo KT133) PCI to AGP Bridge */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1360 src/sys/dev/pci/pcidevs_data.h:1.1361
--- src/sys/dev/pci/pcidevs_data.h:1.1360	Thu May 30 16:04:28 2019
+++ src/sys/dev/pci/pcidevs_data.h	Sat Jun  1 08:15:04 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1360 2019/05/30 16:04:28 mlelstv Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1361 2019/06/01 08:15:04 jdolecek Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1373 2019/05/30 16:04:04 mlelstv Exp
+ *	NetBSD: pcidevs,v 1.1374 2019/06/01 08:13:31 jdolecek Exp
  */
 
 /*
@@ -13521,8 +13521,6 @@ static const uint16_t pci_products[] = {
 	35741, 8536, 0,
 	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8237S_SATA, 
 	36368, 692, 8584, 6384, 0,
-	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8237S_SATA_2, 
-	36368, 692, 8584, 6384, 0,
 	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT86C100A, 
 	36402, 36412, 5748, 5646, 0,
 	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA, 
@@ -13537,6 +13535,8 @@ static const uint16_t pci_products[] = {
 	35734, 6882, 6492, 0,
 	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_P4M900_7, 
 	35741, 6882, 6492, 0,
+	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8237S_SATA_RAID, 
+	36368, 692, 8584, 6384, 14415, 9785, 0,
 	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8231, 
 	36423, 6766, 6492, 0,
 	PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8231_PWR, 
@@ -15221,7 +15221,7 @@ static const char pci_words[] = { "." 
 	"OHCI4\0" /* 1 refs @ 9762 */
 	"SB700-SB900\0" /* 14 refs @ 9768 */
 	"(IDE\0" /* 6 refs @ 9780 */
-	"mode)\0" /* 13 refs @ 9785 */
+	"mode)\0" /* 14 refs @ 9785 */
 	"(AHCI\0" /* 4 refs @ 9791 */
 	"RAID5\0" /* 1 refs @ 9797 */
 	"(Storage\0" /* 1 refs @ 9803 */
@@ -15897,7 +15897,7 @@ static const char pci_words[] = { "." 
 	"Parallel\0" /* 14 refs @ 14398 */
 	"Bus\0" /* 4 refs @ 14407 */
 	"RAD\0" /* 1 refs @ 14411 */
-	"(RAID\0" /* 7 refs @ 14415 */
+	"(RAID\0" /* 8 refs @ 14415 */
 	"acceleration\0" /* 1 refs @ 14421 */
 	"engine)\0" /* 1 refs @ 14434 */
 	"ZIP\0" /* 1 refs @ 14442 */



CVS commit: src/sys/dev/pci

2019-06-01 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Jun  1 08:15:05 UTC 2019

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.1361 -r1.1362 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1360 -r1.1361 src/sys/dev/pci/pcidevs_data.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

2019-06-01 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Jun  1 08:13:31 UTC 2019

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
rename VT8237S_SATA_2 to VT8237S_SATA_RAID and update description to have
different one to VT8237S_SATA

part of PR kern/43309


To generate a diff of this commit:
cvs rdiff -u -r1.1373 -r1.1374 src/sys/dev/pci/pcidevs

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