Thu Oct 21 13:21:55 2021 UTC ()
fix various typos, mainly in comments, but also in man pages and log messages.


(andvar)
diff -r1.27 -r1.28 src/doc/roadmaps/storage
diff -r1.6 -r1.7 src/lib/librpcsvc/mount.x
diff -r1.26 -r1.27 src/lib/libz/Makefile
diff -r1.3 -r1.4 src/share/man/man4/vio9p.4
diff -r1.3 -r1.4 src/share/man/man4/man4.hppa/pdc.4
diff -r1.15 -r1.16 src/share/man/man5/statvfs.5
diff -r1.154 -r1.155 src/share/man/man7/sysctl.7
diff -r1.59 -r1.60 src/sys/arch/amiga/dev/mfc.c
diff -r1.83 -r1.84 src/sys/arch/amiga/dev/ser.c
diff -r1.7 -r1.8 src/sys/arch/arm/imx/imx23_ssp.c
diff -r1.1 -r1.2 src/sys/arch/evbppc/virtex/dcr.h
diff -r1.1 -r1.2 src/sys/dev/hyperv/if_hvnreg.h
diff -r1.6 -r1.7 src/sys/dev/ic/dm9000reg.h
diff -r1.8 -r1.9 src/sys/dev/ic/ds1286reg.h
diff -r1.8 -r1.9 src/sys/dev/ic/isp_library.c
diff -r1.11 -r1.12 src/sys/dev/ic/ds1687reg.h
diff -r1.130 -r1.131 src/sys/dev/ic/isp.c
diff -r1.182 -r1.183 src/sys/dev/pci/if_sip.c
diff -r1.13 -r1.14 src/sys/kern/sys_futex.c
diff -r1.2 -r1.3 src/sys/modules/examples/panic_string/panic_string.c
diff -r1.25 -r1.26 src/sys/netinet/sctp_output.c
diff -r1.75 -r1.76 src/sys/nfs/nfsnode.h
diff -r1.10 -r1.11 src/tests/usr.bin/config/t_config.sh
diff -r1.42 -r1.43 src/usr.sbin/mtrace/mtrace.c

cvs diff -r1.27 -r1.28 src/doc/roadmaps/storage (expand / switch to unified diff)

--- src/doc/roadmaps/storage 2019/05/29 02:34:19 1.27
+++ src/doc/roadmaps/storage 2021/10/21 13:21:53 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: storage,v 1.27 2019/05/29 02:34:19 msaitoh Exp $ 1$NetBSD: storage,v 1.28 2021/10/21 13:21:53 andvar Exp $
2 2
3NetBSD Storage Roadmap 3NetBSD Storage Roadmap
4====================== 4======================
5 5
6This is a small roadmap document, and deals with the storage and file 6This is a small roadmap document, and deals with the storage and file
7systems side of the operating system. It discusses elements, projects, 7systems side of the operating system. It discusses elements, projects,
8and goals that are under development or under discussion; and it is 8and goals that are under development or under discussion; and it is
9divided into three categories based on perceived priority. 9divided into three categories based on perceived priority.
10 10
11The following elements, projects, and goals are considered strategic 11The following elements, projects, and goals are considered strategic
12priorities for the project: 12priorities for the project:
13 13
14 1. Improving iscsi 14 1. Improving iscsi
@@ -213,27 +213,27 @@ more drivers. @@ -213,27 +213,27 @@ more drivers.
2137. nvme support 2137. nvme support
214---------------- 214----------------
215 215
216nvme ("NVM Express") is a hardware interface standard for PCI-attached 216nvme ("NVM Express") is a hardware interface standard for PCI-attached
217SSDs. NetBSD now has a driver for these. 217SSDs. NetBSD now has a driver for these.
218 218
219Driver is now MPSAFE and uses bufq fcfs (i.e. no disksort()) already, 219Driver is now MPSAFE and uses bufq fcfs (i.e. no disksort()) already,
220so the most obvious software bottlenecks were treated. It still needs 220so the most obvious software bottlenecks were treated. It still needs
221more testing on real hardware, and it may be good to investigate some further 221more testing on real hardware, and it may be good to investigate some further
222optimizations, such as DragonFly pbuf(9) or something similar. 222optimizations, such as DragonFly pbuf(9) or something similar.
223 223
224Semi-relatedly, it is also time for scsipi to become MPSAFE. 224Semi-relatedly, it is also time for scsipi to become MPSAFE.
225 225
226 - As of May 2016 a port of OpenBSD's driver has been commited. This 226 - As of May 2016 a port of OpenBSD's driver has been committed. This
227 will be in -8. 227 will be in -8.
228 - The nvme driver is a backend to ld(4) and is fully is MPSAFE, but we 228 - The nvme driver is a backend to ld(4) and is fully is MPSAFE, but we
229 still need to attend to I/O path bottlenecks like kern/53124. 229 still need to attend to I/O path bottlenecks like kern/53124.
230 Better instrumentation is needed. 230 Better instrumentation is needed.
231 - Contact msaitoh, agc, or jdolecek for further information. 231 - Contact msaitoh, agc, or jdolecek for further information.
232 232
233 233
2348. lfs64 2348. lfs64
235-------- 235--------
236 236
237LFS currently only supports volumes up to 2 TB. As LFS is of interest 237LFS currently only supports volumes up to 2 TB. As LFS is of interest
238for use on shingled disks (which are larger than 2 TB) and also for 238for use on shingled disks (which are larger than 2 TB) and also for
239use on disk arrays (ditto) this is something of a problem. A 64-bit 239use on disk arrays (ditto) this is something of a problem. A 64-bit
@@ -318,31 +318,31 @@ but we can't write them.) @@ -318,31 +318,31 @@ but we can't write them.)
318Ideally someone would write ext3 and/or ext4 code, whether integrated 318Ideally someone would write ext3 and/or ext4 code, whether integrated
319with or separate from the ext2 code we already have. It might also 319with or separate from the ext2 code we already have. It might also
320make sense to port or wrap the Linux ext3 or ext4 code so it can be 320make sense to port or wrap the Linux ext3 or ext4 code so it can be
321loaded as a GPL'd kernel module; it isn't clear if that would be more 321loaded as a GPL'd kernel module; it isn't clear if that would be more
322or less work than doing an implementation. 322or less work than doing an implementation.
323 323
324Note however that implementing ext3 has already defeated several 324Note however that implementing ext3 has already defeated several
325people; this is a harder project than it looks. 325people; this is a harder project than it looks.
326 326
327 - GSoc 2016 brought support for extents, and also ro support for dir 327 - GSoc 2016 brought support for extents, and also ro support for dir
328 hashes; jdolecek also implemented several frequently used ext4 features 328 hashes; jdolecek also implemented several frequently used ext4 features
329 so most contemporary ext filesystems should be possible to mount 329 so most contemporary ext filesystems should be possible to mount
330 read-write 330 read-write
331 - still need rw dir_nhash and xattr (semi-easy), and eventually journalling 331 - still need rw dir_nhash and xattr (semi-easy), and eventually journaling
332 (hard) 332 (hard)
333 - There is no clear timeframe or release target. 333 - There is no clear timeframe or release target.
334 - jdolecek is working on improving ext3/ext4 support (particularily 334 - jdolecek is working on improving ext3/ext4 support (particularly
335 journalling)  335 journaling)
336 336
337 337
33814. Port hammer from Dragonfly 33814. Port hammer from Dragonfly
339------------------------------ 339------------------------------
340 340
341While the motivation for and role of hammer isn't perhaps super 341While the motivation for and role of hammer isn't perhaps super
342persuasive, it would still be good to have it. Porting it from 342persuasive, it would still be good to have it. Porting it from
343Dragonfly is probably not that painful (compared to, say, zfs) but as 343Dragonfly is probably not that painful (compared to, say, zfs) but as
344the Dragonfly and NetBSD VFS layers have diverged in different 344the Dragonfly and NetBSD VFS layers have diverged in different
345directions from the original 4.4BSD, may not be entirely trivial 345directions from the original 4.4BSD, may not be entirely trivial
346either. 346either.
347 347
348 - As of January 2017 nobody is known to be working on this. 348 - As of January 2017 nobody is known to be working on this.

cvs diff -r1.6 -r1.7 src/lib/librpcsvc/mount.x (expand / switch to unified diff)

--- src/lib/librpcsvc/mount.x 2004/07/01 22:52:34 1.6
+++ src/lib/librpcsvc/mount.x 2021/10/21 13:21:53 1.7
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * 2550 Garcia Avenue 26 * 2550 Garcia Avenue
27 * Mountain View, California 94043 27 * Mountain View, California 94043
28 */ 28 */
29 29
30/* 30/*
31 * Protocol description for the mount program 31 * Protocol description for the mount program
32 */ 32 */
33 33
34#ifndef RPC_HDR 34#ifndef RPC_HDR
35%#include <sys/cdefs.h> 35%#include <sys/cdefs.h>
36%#ifndef __lint__ 36%#ifndef __lint__
37%/*static char sccsid[] = "from: @(#)mount.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/ 37%/*static char sccsid[] = "from: @(#)mount.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/
38%/*static char sccsid[] = "from: @(#)mount.x 2.1 88/08/01 4.0 RPCSRC";*/ 38%/*static char sccsid[] = "from: @(#)mount.x 2.1 88/08/01 4.0 RPCSRC";*/
39%__RCSID("$NetBSD: mount.x,v 1.6 2004/07/01 22:52:34 kleink Exp $"); 39%__RCSID("$NetBSD: mount.x,v 1.7 2021/10/21 13:21:53 andvar Exp $");
40%/* $FreeBSD: src/include/rpcsvc/mount.x,v 1.7 2003/05/04 02:51:42 obrien Exp $ */ 40%/* $FreeBSD: src/include/rpcsvc/mount.x,v 1.7 2003/05/04 02:51:42 obrien Exp $ */
41%#endif /* not __lint__ */ 41%#endif /* not __lint__ */
42#endif 42#endif
43 43
44const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ 44const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
45const MNTNAMLEN = 255; /* maximum bytes in a name argument */ 45const MNTNAMLEN = 255; /* maximum bytes in a name argument */
46const FHSIZE = 32; /* size in bytes of a file handle */ 46const FHSIZE = 32; /* size in bytes of a file handle */
47const FHSIZE3 = 64; /* size in bytes of a file handle (v3) */ 47const FHSIZE3 = 64; /* size in bytes of a file handle (v3) */
48 48
49/* 49/*
50 * The fhandle is the file handle that the server passes to the client. 50 * The fhandle is the file handle that the server passes to the client.
51 * All file operations are done using the file handles to refer to a file 51 * All file operations are done using the file handles to refer to a file
52 * or a directory. The file handle can contain whatever information the 52 * or a directory. The file handle can contain whatever information the
@@ -134,28 +134,28 @@ struct exportnode { @@ -134,28 +134,28 @@ struct exportnode {
134 exports ex_next; 134 exports ex_next;
135}; 135};
136 136
137program MOUNTPROG { 137program MOUNTPROG {
138 /* 138 /*
139 * Version one of the mount protocol communicates with version two 139 * Version one of the mount protocol communicates with version two
140 * of the NFS protocol. Version three communicates with 140 * of the NFS protocol. Version three communicates with
141 * version three of the NFS protocol. The only connecting 141 * version three of the NFS protocol. The only connecting
142 * point is the fhandle structure, which is the same for both 142 * point is the fhandle structure, which is the same for both
143 * protocols. 143 * protocols.
144 */ 144 */
145 version MOUNTVERS { 145 version MOUNTVERS {
146 /* 146 /*
147 * Does no work. It is made available in all RPC services 147 * Does not work. It is made available in all RPC services
148 * to allow server reponse testing and timing 148 * to allow server response testing and timing
149 */ 149 */
150 void 150 void
151 MOUNTPROC_NULL(void) = 0; 151 MOUNTPROC_NULL(void) = 0;
152 152
153 /* 153 /*
154 * If fhs_status is 0, then fhs_fhandle contains the 154 * If fhs_status is 0, then fhs_fhandle contains the
155 * file handle for the directory. This file handle may 155 * file handle for the directory. This file handle may
156 * be used in the NFS protocol. This procedure also adds 156 * be used in the NFS protocol. This procedure also adds
157 * a new entry to the mount list for this client mounting 157 * a new entry to the mount list for this client mounting
158 * the directory. 158 * the directory.
159 * Unix authentication required. 159 * Unix authentication required.
160 */ 160 */
161 fhstatus 161 fhstatus
@@ -188,28 +188,28 @@ program MOUNTPROG { @@ -188,28 +188,28 @@ program MOUNTPROG {
188 * machines are allowed to import it. 188 * machines are allowed to import it.
189 */ 189 */
190 exports 190 exports
191 MOUNTPROC_EXPORT(void) = 5; 191 MOUNTPROC_EXPORT(void) = 5;
192 192
193 /* 193 /*
194 * Identical to MOUNTPROC_EXPORT above 194 * Identical to MOUNTPROC_EXPORT above
195 */ 195 */
196 exports 196 exports
197 MOUNTPROC_EXPORTALL(void) = 6; 197 MOUNTPROC_EXPORTALL(void) = 6;
198 } = 1; 198 } = 1;
199 version MOUNTVERS3 { 199 version MOUNTVERS3 {
200 /* 200 /*
201 * Does no work. It is made available in all RPC services 201 * Does not work. It is made available in all RPC services
202 * to allow server reponse testing and timing 202 * to allow server response testing and timing
203 */ 203 */
204 void 204 void
205 MOUNTPROC_NULL(void) = 0; 205 MOUNTPROC_NULL(void) = 0;
206 206
207 /* 207 /*
208 * If mountres3.fhs_status is MNT3_OK, then 208 * If mountres3.fhs_status is MNT3_OK, then
209 * mountres3.mountinfo contains the file handle for 209 * mountres3.mountinfo contains the file handle for
210 * the directory and a list of acceptable 210 * the directory and a list of acceptable
211 * authentication flavors. This file handle may only 211 * authentication flavors. This file handle may only
212 * be used in the NFS version 3 protocol. This 212 * be used in the NFS version 3 protocol. This
213 * procedure also results in the server adding a new 213 * procedure also results in the server adding a new
214 * entry to its mount list recording that this client 214 * entry to its mount list recording that this client
215 * has mounted the directory. AUTH_UNIX authentication 215 * has mounted the directory. AUTH_UNIX authentication

cvs diff -r1.26 -r1.27 src/lib/libz/Makefile (expand / switch to unified diff)

--- src/lib/libz/Makefile 2021/04/26 07:17:30 1.26
+++ src/lib/libz/Makefile 2021/10/21 13:21:53 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.26 2021/04/26 07:17:30 mrg Exp $ 1# $NetBSD: Makefile,v 1.27 2021/10/21 13:21:53 andvar Exp $
2 2
3WARNS= 3 3WARNS= 3
4 4
5USE_FORT?= yes # data-driven bugs? 5USE_FORT?= yes # data-driven bugs?
6 6
7.include <bsd.own.mk> 7.include <bsd.own.mk>
8 8
9USE_SHLIBDIR= yes 9USE_SHLIBDIR= yes
10 10
11ZLIBDIR=${NETBSDSRCDIR}/common/dist/zlib 11ZLIBDIR=${NETBSDSRCDIR}/common/dist/zlib
12.PATH: ${ZLIBDIR} 12.PATH: ${ZLIBDIR}
13LIB= z 13LIB= z
14 14
@@ -27,17 +27,17 @@ FILES+= zlib.pc @@ -27,17 +27,17 @@ FILES+= zlib.pc
27FILESOWN_zlib.pc= ${BINOWN} 27FILESOWN_zlib.pc= ${BINOWN}
28FILESGRP_zlib.pc= ${BINGRP} 28FILESGRP_zlib.pc= ${BINGRP}
29FILESMODE_zlib.pc= ${NONBINMODE} 29FILESMODE_zlib.pc= ${NONBINMODE}
30FILESDIR_zlib.pc= /usr/lib/pkgconfig 30FILESDIR_zlib.pc= /usr/lib/pkgconfig
31 31
32COPTS.infback.c+= ${GCC_NO_IMPLICIT_FALLTHRU} 32COPTS.infback.c+= ${GCC_NO_IMPLICIT_FALLTHRU}
33COPTS.inflate.c+= ${GCC_NO_IMPLICIT_FALLTHRU} 33COPTS.inflate.c+= ${GCC_NO_IMPLICIT_FALLTHRU}
34 34
35.include <bsd.lib.mk> 35.include <bsd.lib.mk>
36 36
37test: minigzip 37test: minigzip
38 echo hello world | ./minigzip | ./minigzip -d 38 echo hello world | ./minigzip | ./minigzip -d
39 39
40# Note: CFLAGS ommitted by intention! 40# Note: CFLAGS omitted by intention!
41# This is to verify that zlib.h works standalone. 41# This is to verify that zlib.h works standalone.
42minigzip: ${ZLIBDIR}/test/minigzip.c libz.a 42minigzip: ${ZLIBDIR}/test/minigzip.c libz.a
43 ${CC} -o minigzip ${ZLIBDIR}/test/minigzip.c libz.a 43 ${CC} -o minigzip ${ZLIBDIR}/test/minigzip.c libz.a

cvs diff -r1.3 -r1.4 src/share/man/man4/vio9p.4 (expand / switch to unified diff)

--- src/share/man/man4/vio9p.4 2019/10/28 13:43:10 1.3
+++ src/share/man/man4/vio9p.4 2021/10/21 13:21:53 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: vio9p.4,v 1.3 2019/10/28 13:43:10 wiz Exp $ 1.\" $NetBSD: vio9p.4,v 1.4 2021/10/21 13:21:53 andvar Exp $
2.\" 2.\"
3.\" Copyright (c) 2019 Internet Initiative Japan, Inc. 3.\" Copyright (c) 2019 Internet Initiative Japan, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
@@ -34,27 +34,27 @@ @@ -34,27 +34,27 @@
34.Cd "vio9p* at virtio?" 34.Cd "vio9p* at virtio?"
35.Sh DESCRIPTION 35.Sh DESCRIPTION
36In conjunction with 36In conjunction with
37.Xr mount_9p 8 , 37.Xr mount_9p 8 ,
38the 38the
39.Nm 39.Nm
40driver enables a 40driver enables a
41.Nx 41.Nx
42system running as a VM guest to mount an exported file system 42system running as a VM guest to mount an exported file system
43by the host via virtio-9p. 43by the host via virtio-9p.
44It exports a 9p end-point of virtio-9p via a character device file for 44It exports a 9p end-point of virtio-9p via a character device file for
45.Xr mount_9p 8 . 45.Xr mount_9p 8 .
46.Pp 46.Pp
47Each exported file system is assigned a character device and accesible via 47Each exported file system is assigned a character device and accessible via
48.Pa /dev/vio9p0 , 48.Pa /dev/vio9p0 ,
49.Pa /dev/vio9p1 49.Pa /dev/vio9p1
50and so on, respectively, in exporting order by the host. 50and so on, respectively, in exporting order by the host.
51.Sh FILES 51.Sh FILES
52.Bl -tag -width XdevXvio9pX -compact 52.Bl -tag -width XdevXvio9pX -compact
53.It Pa /dev/vio9p? 53.It Pa /dev/vio9p?
54.El 54.El
55.Sh EXAMPLES 55.Sh EXAMPLES
56The following command mounts the first exported file system by the host at 56The following command mounts the first exported file system by the host at
57.Pa /mnt/9p : 57.Pa /mnt/9p :
58.Bd -literal -offset indent 58.Bd -literal -offset indent
59# mount_9p -cu /dev/vio9p0 /mnt/9p 59# mount_9p -cu /dev/vio9p0 /mnt/9p
60.Ed 60.Ed

cvs diff -r1.3 -r1.4 src/share/man/man4/man4.hppa/pdc.4 (expand / switch to unified diff)

--- src/share/man/man4/man4.hppa/pdc.4 2017/07/03 21:30:59 1.3
+++ src/share/man/man4/man4.hppa/pdc.4 2021/10/21 13:21:53 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: pdc.4,v 1.3 2017/07/03 21:30:59 wiz Exp $ 1.\" $NetBSD: pdc.4,v 1.4 2021/10/21 13:21:53 andvar Exp $
2.\" 2.\"
3.\" $OpenBSD: pdc.4,v 1.6 2007/06/01 19:54:10 aanriot Exp $ 3.\" $OpenBSD: pdc.4,v 1.6 2007/06/01 19:54:10 aanriot Exp $
4.\" 4.\"
5.\" Copyright (c) 2004 Michael Shalayeff 5.\" Copyright (c) 2004 Michael Shalayeff
6.\" All rights reserved. 6.\" All rights reserved.
7.\" 7.\"
8.\" Redistribution and use in source and binary forms, with or without 8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions 9.\" modification, are permitted provided that the following conditions
10.\" are met: 10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright 11.\" 1. Redistributions of source code must retain the above copyright
12.\" notice, this list of conditions and the following disclaimer. 12.\" notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\" notice, this list of conditions and the following disclaimer in the 14.\" notice, this list of conditions and the following disclaimer in the
@@ -51,27 +51,27 @@ on other systems. @@ -51,27 +51,27 @@ on other systems.
51PDC procedure calls are all made through a single entry point 51PDC procedure calls are all made through a single entry point
52and assume normal C language calling conventions, with option 52and assume normal C language calling conventions, with option
53number in the first argument and the return data address in the 53number in the first argument and the return data address in the
54second, unless indicated otherwise. 54second, unless indicated otherwise.
55Each call requires at most 7KB of the available stack. 55Each call requires at most 7KB of the available stack.
56Here is the list of procedures and options descriptions: 56Here is the list of procedures and options descriptions:
57.Bl -tag -width pdc 57.Bl -tag -width pdc
58.It Fn pdc "PDC_ADD_VALID" "PDC_ADD_VALID_DFLT" "paddr" 58.It Fn pdc "PDC_ADD_VALID" "PDC_ADD_VALID_DFLT" "paddr"
59Perform a read operation attempt at the physical address 59Perform a read operation attempt at the physical address
60.Ar paddr 60.Ar paddr
61without causing a HPMC, in order to verify that the address is valid 61without causing a HPMC, in order to verify that the address is valid
62and there is a device to respond to it. 62and there is a device to respond to it.
63The implementation may choose to call the caller's HPMC handler and 63The implementation may choose to call the caller's HPMC handler and
64raise error conditions on the bus convertors. 64raise error conditions on the bus converters.
65.It Fn pdc "PDC_ALLOC" "PDC_ALLOC_DFLT" "ptr" "size" 65.It Fn pdc "PDC_ALLOC" "PDC_ALLOC_DFLT" "ptr" "size"
66Allocate static storage for IODC use of 66Allocate static storage for IODC use of
67.Ar size 67.Ar size
68bytes and return the address in a word pointed to by the 68bytes and return the address in a word pointed to by the
69.Ar ptr 69.Ar ptr
70argument. 70argument.
71There is no way of freeing the storage allocated and thus 71There is no way of freeing the storage allocated and thus
72care shall be taken to not exhaust the total allocation limit of 32KB. 72care shall be taken to not exhaust the total allocation limit of 32KB.
73.It Fn pdc "PDC_BLOCK_TLB" "PDC_BTLB_DEFAULT" "ptr" 73.It Fn pdc "PDC_BLOCK_TLB" "PDC_BTLB_DEFAULT" "ptr"
74Get block TLB parameters into the data area pointed to by the 74Get block TLB parameters into the data area pointed to by the
75.Ar ptr 75.Ar ptr
76argument. 76argument.
77This includes minimal and maximal entry size and number of fixed and 77This includes minimal and maximal entry size and number of fixed and

cvs diff -r1.15 -r1.16 src/share/man/man5/statvfs.5 (expand / switch to unified diff)

--- src/share/man/man5/statvfs.5 2019/09/22 22:59:38 1.15
+++ src/share/man/man5/statvfs.5 2021/10/21 13:21:53 1.16
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: statvfs.5,v 1.15 2019/09/22 22:59:38 christos Exp $ 1.\" $NetBSD: statvfs.5,v 1.16 2021/10/21 13:21:53 andvar Exp $
2.\" 2.\"
3.\" Copyright (c) 1989, 1991, 1993 3.\" Copyright (c) 1989, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -108,27 +108,27 @@ Union with underlying filesystem instead @@ -108,27 +108,27 @@ Union with underlying filesystem instead
108.It Dv ST_SYNCHRONOUS 108.It Dv ST_SYNCHRONOUS
109All I/O to the filesystem is done synchronously. 109All I/O to the filesystem is done synchronously.
110.It Dv ST_ASYNC 110.It Dv ST_ASYNC
111No filesystem I/O is done synchronously. 111No filesystem I/O is done synchronously.
112.It Dv ST_NOCOREDUMP 112.It Dv ST_NOCOREDUMP
113Don't write core dumps to this file system. 113Don't write core dumps to this file system.
114.It Dv ST_NOATIME 114.It Dv ST_NOATIME
115Never update access times. 115Never update access times.
116.It Dv ST_SYMPERM 116.It Dv ST_SYMPERM
117Recognize symbolic link permission. 117Recognize symbolic link permission.
118.It Dv ST_NODEVMTIME 118.It Dv ST_NODEVMTIME
119Never update modification times for device files. 119Never update modification times for device files.
120.It Dv ST_LOG 120.It Dv ST_LOG
121Use logging (journalling). 121Use logging (journaling).
122.It Dv ST_LOCAL 122.It Dv ST_LOCAL
123The filesystem resides locally. 123The filesystem resides locally.
124.It Dv ST_QUOTA 124.It Dv ST_QUOTA
125The filesystem has quotas enabled on it. 125The filesystem has quotas enabled on it.
126.It Dv ST_ROOTFS 126.It Dv ST_ROOTFS
127Identifies the root filesystem. 127Identifies the root filesystem.
128.It Dv ST_EXRDONLY 128.It Dv ST_EXRDONLY
129The filesystem is exported read-only. 129The filesystem is exported read-only.
130.It Dv ST_EXPORTED 130.It Dv ST_EXPORTED
131The filesystem is exported for both reading and writing. 131The filesystem is exported for both reading and writing.
132.It Dv ST_DEFEXPORTED 132.It Dv ST_DEFEXPORTED
133The filesystem is exported for both reading and writing to any Internet host. 133The filesystem is exported for both reading and writing to any Internet host.
134.It Dv ST_EXPORTANON 134.It Dv ST_EXPORTANON

cvs diff -r1.154 -r1.155 src/share/man/man7/sysctl.7 (expand / switch to unified diff)

--- src/share/man/man7/sysctl.7 2021/07/28 11:32:21 1.154
+++ src/share/man/man7/sysctl.7 2021/10/21 13:21:54 1.155
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: sysctl.7,v 1.154 2021/07/28 11:32:21 wiz Exp $ 1.\" $NetBSD: sysctl.7,v 1.155 2021/10/21 13:21:54 andvar Exp $
2.\" 2.\"
3.\" Copyright (c) 1993 3.\" Copyright (c) 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -149,27 +149,27 @@ Controls if expansion of variables is go @@ -149,27 +149,27 @@ Controls if expansion of variables is go
149or not. 149or not.
150Defaults to no variable expansion, 150Defaults to no variable expansion,
151.Dv 0 . 151.Dv 0 .
152Variables are of the form 152Variables are of the form
153.Li @name 153.Li @name
154and the variables supported are described in 154and the variables supported are described in
155.Xr symlink 7 155.Xr symlink 7
156under 156under
157.Dq "MAGIC SYMLINKS" . 157.Dq "MAGIC SYMLINKS" .
158.El 158.El
159.Pp 159.Pp
160A second level name for controlling the 160A second level name for controlling the
161.Xr wapbl 4 161.Xr wapbl 4
162(Write Ahead Physical Block Logging file system journalling) 162(Write Ahead Physical Block Logging file system journaling)
163capabilities with the following third level identifiers: 163capabilities with the following third level identifiers:
164.Bl -tag -width "123456" 164.Bl -tag -width "123456"
165.It Li vfs.wapbl.flush_disk_cache 165.It Li vfs.wapbl.flush_disk_cache
166Controls whether to attempt to flush the disk cache on each commit. 166Controls whether to attempt to flush the disk cache on each commit.
167It defaults to 1 and it should always be on to ensure integrity 167It defaults to 1 and it should always be on to ensure integrity
168of file system metadata in the event of a power loss. 168of file system metadata in the event of a power loss.
169For slow disks, turning it off can improve performance. 169For slow disks, turning it off can improve performance.
170.It Li vfs.wapbl.verbose_commit 170.It Li vfs.wapbl.verbose_commit
171For each transaction log commit, print the number of bytes written 171For each transaction log commit, print the number of bytes written
172and the time it took to commit as seconds.nanoseconds. 172and the time it took to commit as seconds.nanoseconds.
173.El 173.El
174.Pp 174.Pp
175The remaining second level identifiers are the file system names, identified 175The remaining second level identifiers are the file system names, identified

cvs diff -r1.59 -r1.60 src/sys/arch/amiga/dev/mfc.c (expand / switch to unified diff)

--- src/sys/arch/amiga/dev/mfc.c 2021/08/07 16:18:41 1.59
+++ src/sys/arch/amiga/dev/mfc.c 2021/10/21 13:21:54 1.60
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mfc.c,v 1.59 2021/08/07 16:18:41 thorpej Exp $ */ 1/* $NetBSD: mfc.c,v 1.60 2021/10/21 13:21:54 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1982, 1990 The Regents of the University of California. 4 * Copyright (c) 1982, 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -45,27 +45,27 @@ @@ -45,27 +45,27 @@
45 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 45 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
46 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 46 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
47 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 47 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
48 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 48 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 49 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 50 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 51 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
52 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 52 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53 */ 53 */
54 54
55#include "opt_kgdb.h" 55#include "opt_kgdb.h"
56 56
57#include <sys/cdefs.h> 57#include <sys/cdefs.h>
58__KERNEL_RCSID(0, "$NetBSD: mfc.c,v 1.59 2021/08/07 16:18:41 thorpej Exp $"); 58__KERNEL_RCSID(0, "$NetBSD: mfc.c,v 1.60 2021/10/21 13:21:54 andvar Exp $");
59 59
60#include <sys/param.h> 60#include <sys/param.h>
61#include <sys/systm.h> 61#include <sys/systm.h>
62#include <sys/kernel.h> 62#include <sys/kernel.h>
63#include <sys/device.h> 63#include <sys/device.h>
64#include <sys/tty.h> 64#include <sys/tty.h>
65#include <sys/proc.h> 65#include <sys/proc.h>
66#include <sys/file.h> 66#include <sys/file.h>
67#include <sys/uio.h> 67#include <sys/uio.h>
68#include <sys/syslog.h> 68#include <sys/syslog.h>
69#include <sys/queue.h> 69#include <sys/queue.h>
70#include <sys/conf.h> 70#include <sys/conf.h>
71#include <sys/kauth.h> 71#include <sys/kauth.h>
@@ -1043,27 +1043,27 @@ void @@ -1043,27 +1043,27 @@ void
1043mfcsxintr(int unit) 1043mfcsxintr(int unit)
1044{ 1044{
1045 int s1, s2, ovfl; 1045 int s1, s2, ovfl;
1046 struct mfcs_softc *sc = device_lookup_private(&mfcs_cd, unit); 1046 struct mfcs_softc *sc = device_lookup_private(&mfcs_cd, unit);
1047 struct tty *tp = sc->sc_tty; 1047 struct tty *tp = sc->sc_tty;
1048 1048
1049 /* 1049 /*
1050 * Make sure we're not interrupted by another 1050 * Make sure we're not interrupted by another
1051 * vbl, but allow level6 ints 1051 * vbl, but allow level6 ints
1052 */ 1052 */
1053 s1 = spltty(); 1053 s1 = spltty();
1054 1054
1055 /* 1055 /*
1056 * pass along any acumulated information 1056 * pass along any accumulated information
1057 * while input is not blocked 1057 * while input is not blocked
1058 */ 1058 */
1059 while (sc->incnt && (tp->t_state & TS_TBLOCK) == 0) { 1059 while (sc->incnt && (tp->t_state & TS_TBLOCK) == 0) {
1060 /* 1060 /*
1061 * no collision with ser_fastint() 1061 * no collision with ser_fastint()
1062 */ 1062 */
1063 mfcseint(unit, *sc->rptr++); 1063 mfcseint(unit, *sc->rptr++);
1064 1064
1065 ovfl = 0; 1065 ovfl = 0;
1066 /* lock against mfcs_fastint() */ 1066 /* lock against mfcs_fastint() */
1067 s2 = splser(); 1067 s2 = splser();
1068 --sc->incnt; 1068 --sc->incnt;
1069 if (sc->rptr == sc->inbuf + SERIBUF_SIZE) 1069 if (sc->rptr == sc->inbuf + SERIBUF_SIZE)

cvs diff -r1.83 -r1.84 src/sys/arch/amiga/dev/ser.c (expand / switch to unified diff)

--- src/sys/arch/amiga/dev/ser.c 2014/07/25 08:10:31 1.83
+++ src/sys/arch/amiga/dev/ser.c 2021/10/21 13:21:54 1.84
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ser.c,v 1.83 2014/07/25 08:10:31 dholland Exp $ */ 1/* $NetBSD: ser.c,v 1.84 2021/10/21 13:21:54 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 4 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -30,27 +30,27 @@ @@ -30,27 +30,27 @@
30 * 30 *
31 * @(#)ser.c 7.12 (Berkeley) 6/27/91 31 * @(#)ser.c 7.12 (Berkeley) 6/27/91
32 */ 32 */
33/* 33/*
34 * XXX This file needs major cleanup it will never service more than one 34 * XXX This file needs major cleanup it will never service more than one
35 * XXX unit. 35 * XXX unit.
36 */ 36 */
37 37
38#include "opt_amigacons.h" 38#include "opt_amigacons.h"
39#include "opt_ddb.h" 39#include "opt_ddb.h"
40#include "opt_kgdb.h" 40#include "opt_kgdb.h"
41 41
42#include <sys/cdefs.h> 42#include <sys/cdefs.h>
43__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.83 2014/07/25 08:10:31 dholland Exp $"); 43__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.84 2021/10/21 13:21:54 andvar Exp $");
44 44
45#include <sys/param.h> 45#include <sys/param.h>
46#include <sys/systm.h> 46#include <sys/systm.h>
47#include <sys/ioctl.h> 47#include <sys/ioctl.h>
48#include <sys/device.h> 48#include <sys/device.h>
49#include <sys/tty.h> 49#include <sys/tty.h>
50#include <sys/proc.h> 50#include <sys/proc.h>
51#include <sys/file.h> 51#include <sys/file.h>
52#include <sys/uio.h> 52#include <sys/uio.h>
53#include <sys/kernel.h> 53#include <sys/kernel.h>
54#include <sys/syslog.h> 54#include <sys/syslog.h>
55#include <sys/queue.h> 55#include <sys/queue.h>
56#include <sys/conf.h> 56#include <sys/conf.h>
@@ -532,27 +532,27 @@ ser_fastint(void) @@ -532,27 +532,27 @@ ser_fastint(void)
532void 532void
533serintr(void) 533serintr(void)
534{ 534{
535 int s1, s2, ovfl; 535 int s1, s2, ovfl;
536 struct tty *tp = ser_tty; 536 struct tty *tp = ser_tty;
537 537
538 /* 538 /*
539 * Make sure we're not interrupted by another 539 * Make sure we're not interrupted by another
540 * vbl, but allow level5 ints 540 * vbl, but allow level5 ints
541 */ 541 */
542 s1 = spltty(); 542 s1 = spltty();
543 543
544 /* 544 /*
545 * pass along any acumulated information 545 * pass along any accumulated information
546 */ 546 */
547 while (sbcnt > 0 && (tp->t_state & TS_TBLOCK) == 0) { 547 while (sbcnt > 0 && (tp->t_state & TS_TBLOCK) == 0) {
548 /* 548 /*
549 * no collision with ser_fastint() 549 * no collision with ser_fastint()
550 */ 550 */
551 sereint(*sbrpt++); 551 sereint(*sbrpt++);
552 552
553 ovfl = 0; 553 ovfl = 0;
554 /* lock against ser_fastint() */ 554 /* lock against ser_fastint() */
555 s2 = splser(); 555 s2 = splser();
556 sbcnt--; 556 sbcnt--;
557 if (sbrpt == serbuf + SERIBUF_SIZE) 557 if (sbrpt == serbuf + SERIBUF_SIZE)
558 sbrpt = serbuf; 558 sbrpt = serbuf;

cvs diff -r1.7 -r1.8 src/sys/arch/arm/imx/imx23_ssp.c (expand / switch to unified diff)

--- src/sys/arch/arm/imx/imx23_ssp.c 2021/09/16 21:29:41 1.7
+++ src/sys/arch/arm/imx/imx23_ssp.c 2021/10/21 13:21:54 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $Id: imx23_ssp.c,v 1.7 2021/09/16 21:29:41 andvar Exp $ */ 1/* $Id: imx23_ssp.c,v 1.8 2021/10/21 13:21:54 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2012 The NetBSD Foundation, Inc. 4 * Copyright (c) 2012 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Petri Laakso. 8 * by Petri Laakso.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -540,27 +540,27 @@ issp_exec_command(sdmmc_chipset_handle_t @@ -540,27 +540,27 @@ issp_exec_command(sdmmc_chipset_handle_t
540 if (sc->sc_bus_width) { 540 if (sc->sc_bus_width) {
541 aprint_error_dev(sc->sc_dev, "SSP_ERROR_IRQ: %d\n", 541 aprint_error_dev(sc->sc_dev, "SSP_ERROR_IRQ: %d\n",
542 sc->sc_irq_error); 542 sc->sc_irq_error);
543 } 543 }
544 else if(!(sc->sc_irq_error & HW_SSP_CTRL1_RESP_TIMEOUT_IRQ)) { 544 else if(!(sc->sc_irq_error & HW_SSP_CTRL1_RESP_TIMEOUT_IRQ)) {
545 aprint_error_dev(sc->sc_dev, "SSP_ERROR_IRQ: %d\n", 545 aprint_error_dev(sc->sc_dev, "SSP_ERROR_IRQ: %d\n",
546 sc->sc_irq_error); 546 sc->sc_irq_error);
547 } 547 }
548 548
549 /* Shift unsigned error code so it fits nicely to signed int. */ 549 /* Shift unsigned error code so it fits nicely to signed int. */
550 cmd->c_error = sc->sc_irq_error >> 8; 550 cmd->c_error = sc->sc_irq_error >> 8;
551 } 551 }
552 552
553 /* Check reponse from the card if such was requested. */ 553 /* Check response from the card if such was requested. */
554 if (ISSET(cmd->c_flags, SCF_RSP_PRESENT)) { 554 if (ISSET(cmd->c_flags, SCF_RSP_PRESENT)) {
555 cmd->c_resp[0] = SSP_RD(sc, HW_SSP_SDRESP0); 555 cmd->c_resp[0] = SSP_RD(sc, HW_SSP_SDRESP0);
556 if (ISSET(cmd->c_flags, SCF_RSP_136)) { 556 if (ISSET(cmd->c_flags, SCF_RSP_136)) {
557 cmd->c_resp[1] = SSP_RD(sc, HW_SSP_SDRESP1); 557 cmd->c_resp[1] = SSP_RD(sc, HW_SSP_SDRESP1);
558 cmd->c_resp[2] = SSP_RD(sc, HW_SSP_SDRESP2); 558 cmd->c_resp[2] = SSP_RD(sc, HW_SSP_SDRESP2);
559 cmd->c_resp[3] = SSP_RD(sc, HW_SSP_SDRESP3); 559 cmd->c_resp[3] = SSP_RD(sc, HW_SSP_SDRESP3);
560 /* 560 /*
561 * Remove CRC7 + LSB by rotating all bits right by 8 to 561 * Remove CRC7 + LSB by rotating all bits right by 8 to
562 * make sdmmc __bitfield() happy. 562 * make sdmmc __bitfield() happy.
563 */ 563 */
564 cmd->c_resp[0] >>= 8; /* Remove CRC7 + LSB. */ 564 cmd->c_resp[0] >>= 8; /* Remove CRC7 + LSB. */
565 cmd->c_resp[0] |= (0x000000FF & cmd->c_resp[1]) << 24; 565 cmd->c_resp[0] |= (0x000000FF & cmd->c_resp[1]) << 24;
566 cmd->c_resp[1] >>= 8; 566 cmd->c_resp[1] >>= 8;

cvs diff -r1.1 -r1.2 src/sys/arch/evbppc/virtex/dcr.h (expand / switch to unified diff)

--- src/sys/arch/evbppc/virtex/dcr.h 2006/12/02 22:18:47 1.1
+++ src/sys/arch/evbppc/virtex/dcr.h 2021/10/21 13:21:54 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: dcr.h,v 1.1 2006/12/02 22:18:47 freza Exp $ */ 1/* $NetBSD: dcr.h,v 1.2 2021/10/21 13:21:54 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Jachym Holecek 4 * Copyright (c) 2006 Jachym Holecek
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written for DFC Design, s.r.o. 7 * Written for DFC Design, s.r.o.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 12 *
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * DCR is an user accesible bus on Xilinx PPC405D5Xn cores and may contain 33 * DCR is an user accessible bus on Xilinx PPC405D5Xn cores and may contain
34 * arbitrary devices. Because we want to be able to share drivers with 34 * arbitrary devices. Because we want to be able to share drivers with
35 * OPB/PLB, we make it a bus space backend. Each platform ("design", "board") 35 * OPB/PLB, we make it a bus space backend. Each platform ("design", "board")
36 * has to provide the leaf _read_4/_write_4 routines specific to device 36 * has to provide the leaf _read_4/_write_4 routines specific to device
37 * instances. This is dictated by the fact that DCR can only by accessed 37 * instances. This is dictated by the fact that DCR can only by accessed
38 * by m{f,t}dcr instructions for which the address is encoded as immediate 38 * by m{f,t}dcr instructions for which the address is encoded as immediate
39 * operand (and hence needs to be a compile-time constant). 39 * operand (and hence needs to be a compile-time constant).
40 * 40 *
41 * The flexibility is well worth the price of one indirection (and a sum 41 * The flexibility is well worth the price of one indirection (and a sum
42 * and a branch), critical paths can still be implemented with m{f,t}dcr(). 42 * and a branch), critical paths can still be implemented with m{f,t}dcr().
43 */ 43 */
44 44
45#ifndef _VIRTEX_DCRVAR_H_ 45#ifndef _VIRTEX_DCRVAR_H_
46#define _VIRTEX_DCRVAR_H_ 46#define _VIRTEX_DCRVAR_H_

cvs diff -r1.1 -r1.2 src/sys/dev/hyperv/if_hvnreg.h (expand / switch to unified diff)

--- src/sys/dev/hyperv/if_hvnreg.h 2019/02/15 08:54:01 1.1
+++ src/sys/dev/hyperv/if_hvnreg.h 2021/10/21 13:21:54 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_hvnreg.h,v 1.1 2019/02/15 08:54:01 nonaka Exp $ */ 1/* $NetBSD: if_hvnreg.h,v 1.2 2021/10/21 13:21:54 andvar Exp $ */
2/* $OpenBSD: if_hvnreg.h,v 1.3 2016/09/14 17:48:28 mikeb Exp $ */ 2/* $OpenBSD: if_hvnreg.h,v 1.3 2016/09/14 17:48:28 mikeb Exp $ */
3 3
4/*- 4/*-
5 * Copyright (c) 2016 Microsoft Corp. 5 * Copyright (c) 2016 Microsoft Corp.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice unmodified, this list of conditions, and the following 12 * notice unmodified, this list of conditions, and the following
13 * disclaimer. 13 * disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -86,27 +86,27 @@ struct hvn_nvs_init { @@ -86,27 +86,27 @@ struct hvn_nvs_init {
86 uint32_t nvs_type; /* HVN_NVS_TYPE_INIT */ 86 uint32_t nvs_type; /* HVN_NVS_TYPE_INIT */
87 uint32_t nvs_ver_min; 87 uint32_t nvs_ver_min;
88 uint32_t nvs_ver_max; 88 uint32_t nvs_ver_max;
89 uint8_t nvs_rsvd[20]; 89 uint8_t nvs_rsvd[20];
90} __packed; 90} __packed;
91 91
92struct hvn_nvs_init_resp { 92struct hvn_nvs_init_resp {
93 uint32_t nvs_type; /* HVN_NVS_TYPE_INIT_RESP */ 93 uint32_t nvs_type; /* HVN_NVS_TYPE_INIT_RESP */
94 uint32_t nvs_ver; /* deprecated */ 94 uint32_t nvs_ver; /* deprecated */
95 uint32_t nvs_rsvd; 95 uint32_t nvs_rsvd;
96 uint32_t nvs_status; /* HVN_NVS_STATUS_ */ 96 uint32_t nvs_status; /* HVN_NVS_STATUS_ */
97} __packed; 97} __packed;
98 98
99/* No reponse */ 99/* No response */
100struct hvn_nvs_ndis_conf { 100struct hvn_nvs_ndis_conf {
101 uint32_t nvs_type; /* HVN_NVS_TYPE_NDIS_CONF */ 101 uint32_t nvs_type; /* HVN_NVS_TYPE_NDIS_CONF */
102 uint32_t nvs_mtu; 102 uint32_t nvs_mtu;
103 uint32_t nvs_rsvd; 103 uint32_t nvs_rsvd;
104 uint64_t nvs_caps; /* HVN_NVS_NDIS_CONF_ */ 104 uint64_t nvs_caps; /* HVN_NVS_NDIS_CONF_ */
105 uint8_t nvs_rsvd1[12]; 105 uint8_t nvs_rsvd1[12];
106} __packed; 106} __packed;
107 107
108#define HVN_NVS_NDIS_CONF_SRIOV 0x0004 108#define HVN_NVS_NDIS_CONF_SRIOV 0x0004
109#define HVN_NVS_NDIS_CONF_VLAN 0x0008 109#define HVN_NVS_NDIS_CONF_VLAN 0x0008
110 110
111/* No response */ 111/* No response */
112struct hvn_nvs_ndis_init { 112struct hvn_nvs_ndis_init {

cvs diff -r1.6 -r1.7 src/sys/dev/ic/dm9000reg.h (expand / switch to unified diff)

--- src/sys/dev/ic/dm9000reg.h 2020/10/08 21:00:25 1.6
+++ src/sys/dev/ic/dm9000reg.h 2021/10/21 13:21:54 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: dm9000reg.h,v 1.6 2020/10/08 21:00:25 nisimura Exp $ */ 1/* $NetBSD: dm9000reg.h,v 1.7 2021/10/21 13:21:54 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2009 Paul Fleischer 4 * Copyright (c) 2009 Paul Fleischer
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. The name of the company nor the name of the author may be used to 12 * 3. The name of the company nor the name of the author may be used to
13 * endorse or promote products derived from this software without specific 13 * endorse or promote products derived from this software without specific
14 * prior written permission. 14 * prior written permission.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28 28
29#ifndef _DEV_IC_DM9000REG_H_ 29#ifndef _DEV_IC_DM9000REG_H_
30#define _DEV_IC_DM9000REG_H_ 30#define _DEV_IC_DM9000REG_H_
31 31
32/* 32/*
33 * Registers accesible on the DM9000, extracted from pp. 11-12 from 33 * Registers accessible on the DM9000, extracted from pp. 11-12 from
34 * the data sheet 34 * the data sheet
35 */ 35 */
36 36
37/* 37/*
38 * There are two interesting addresses for the DM9000 (at least in 38 * There are two interesting addresses for the DM9000 (at least in
39 * the context of the FriendlyARM MINI2440) The I/O or register select 39 * the context of the FriendlyARM MINI2440) The I/O or register select
40 * address, which is the base address. The DATA address, which is 40 * address, which is the base address. The DATA address, which is
41 * located at offset 4 from the base address. 41 * located at offset 4 from the base address.
42 * 42 *
43 * Chances are that this will not work generally, as it really depends 43 * Chances are that this will not work generally, as it really depends
44 * on how the address lines are mapped from the CPU to the DM9000. 44 * on how the address lines are mapped from the CPU to the DM9000.
45 * But for now it is a good starting point. 45 * But for now it is a good starting point.
46 */ 46 */

cvs diff -r1.8 -r1.9 src/sys/dev/ic/ds1286reg.h (expand / switch to unified diff)

--- src/sys/dev/ic/ds1286reg.h 2005/12/11 12:21:26 1.8
+++ src/sys/dev/ic/ds1286reg.h 2021/10/21 13:21:54 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ds1286reg.h,v 1.8 2005/12/11 12:21:26 christos Exp $ */ 1/* $NetBSD: ds1286reg.h,v 1.9 2021/10/21 13:21:54 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Rafal K. Boni 4 * Copyright (c) 2001 Rafal K. Boni
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products 14 * 3. The name of the author may not be used to endorse or promote products
@@ -46,27 +46,27 @@ @@ -46,27 +46,27 @@
46 * 46 *
47 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 47 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
48 * School of Computer Science 48 * School of Computer Science
49 * Carnegie Mellon University 49 * Carnegie Mellon University
50 * Pittsburgh PA 15213-3890 50 * Pittsburgh PA 15213-3890
51 * 51 *
52 * any improvements or extensions that they make and grant Carnegie the 52 * any improvements or extensions that they make and grant Carnegie the
53 * rights to redistribute these changes. 53 * rights to redistribute these changes.
54 */ 54 */
55 55
56/* 56/*
57 * Definitions for the Dallas Semiconductor DS1286/DS1386 Real Time Clock. 57 * Definitions for the Dallas Semiconductor DS1286/DS1386 Real Time Clock.
58 * 58 *
59 * Plucked right from the Dallas Semicomductor specs available at 59 * Plucked right from the Dallas Semiconductor specs available at
60 * http://pdfserv.maxim-ic.com/arpdf/DS1286.pdf and 60 * http://pdfserv.maxim-ic.com/arpdf/DS1286.pdf and
61 * http://pdfserv.maxim-ic.com/arpdf/DS1386-DS1386P.pdf 61 * http://pdfserv.maxim-ic.com/arpdf/DS1386-DS1386P.pdf
62 * 62 *
63 * The DS1286 and 1386 have 14 clock-related registers and some amount 63 * The DS1286 and 1386 have 14 clock-related registers and some amount
64 * of user registers (50 for the 1286, 8K or 32K for the 1386). The 64 * of user registers (50 for the 1286, 8K or 32K for the 1386). The
65 * first eleven registers contain time-of-day and alarm data, the rest 65 * first eleven registers contain time-of-day and alarm data, the rest
66 * contain various control bits and the watchdog timer functionality. 66 * contain various control bits and the watchdog timer functionality.
67 * 67 *
68 * Since the locations of these ports and the method used to access 68 * Since the locations of these ports and the method used to access
69 * them can be machine-dependent, the low-level details of reading 69 * them can be machine-dependent, the low-level details of reading
70 * and writing the RTC's registers are handled by machine-specific 70 * and writing the RTC's registers are handled by machine-specific
71 * functions. 71 * functions.
72 * 72 *

cvs diff -r1.8 -r1.9 src/sys/dev/ic/isp_library.c (expand / switch to unified diff)

--- src/sys/dev/ic/isp_library.c 2019/01/10 09:12:47 1.8
+++ src/sys/dev/ic/isp_library.c 2021/10/21 13:21:54 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: isp_library.c,v 1.8 2019/01/10 09:12:47 martin Exp $ */ 1/* $NetBSD: isp_library.c,v 1.9 2021/10/21 13:21:54 andvar Exp $ */
2/* 2/*
3 * Copyright (c) 2006-2007 by Matthew Jacob 3 * Copyright (c) 2006-2007 by Matthew Jacob
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 *  9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28/* 28/*
29 * Qlogic Host Adapter Internal Library Functions 29 * Qlogic Host Adapter Internal Library Functions
30 */ 30 */
31#ifdef __NetBSD__ 31#ifdef __NetBSD__
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: isp_library.c,v 1.8 2019/01/10 09:12:47 martin Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: isp_library.c,v 1.9 2021/10/21 13:21:54 andvar Exp $");
34#include <dev/ic/isp_netbsd.h> 34#include <dev/ic/isp_netbsd.h>
35#endif 35#endif
36#ifdef __FreeBSD__ 36#ifdef __FreeBSD__
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD$"); 38__FBSDID("$FreeBSD$");
39#include <dev/isp/isp_freebsd.h> 39#include <dev/isp/isp_freebsd.h>
40#endif 40#endif
41#ifdef __OpenBSD__ 41#ifdef __OpenBSD__
42#include <dev/ic/isp_openbsd.h> 42#include <dev/ic/isp_openbsd.h>
43#endif 43#endif
44#ifdef __linux__ 44#ifdef __linux__
45#include "isp_linux.h" 45#include "isp_linux.h"
46#endif 46#endif
@@ -2256,27 +2256,27 @@ isp_allocate_xs_tgt(ispsoftc_t *isp, voi @@ -2256,27 +2256,27 @@ isp_allocate_xs_tgt(ispsoftc_t *isp, voi
2256{ 2256{
2257 isp_hdl_t *hdp; 2257 isp_hdl_t *hdp;
2258 2258
2259 hdp = isp->isp_tgtfree; 2259 hdp = isp->isp_tgtfree;
2260 if (hdp == NULL) { 2260 if (hdp == NULL) {
2261 return (-1); 2261 return (-1);
2262 } 2262 }
2263 isp->isp_tgtfree = hdp->cmd; 2263 isp->isp_tgtfree = hdp->cmd;
2264 hdp->cmd = xs; 2264 hdp->cmd = xs;
2265 hdp->handle = (hdp - isp->isp_tgtlist); 2265 hdp->handle = (hdp - isp->isp_tgtlist);
2266 hdp->handle |= (ISP_HANDLE_TARGET << ISP_HANDLE_USAGE_SHIFT); 2266 hdp->handle |= (ISP_HANDLE_TARGET << ISP_HANDLE_USAGE_SHIFT);
2267 /* 2267 /*
2268 * Target handles for SCSI cards are only 16 bits, so 2268 * Target handles for SCSI cards are only 16 bits, so
2269 * sequence number protection will be ommitted. 2269 * sequence number protection will be omitted.
2270 */ 2270 */
2271 if (IS_FC(isp)) { 2271 if (IS_FC(isp)) {
2272 hdp->handle |= (isp->isp_seqno++ << ISP_HANDLE_SEQ_SHIFT); 2272 hdp->handle |= (isp->isp_seqno++ << ISP_HANDLE_SEQ_SHIFT);
2273 } 2273 }
2274 *handlep = hdp->handle; 2274 *handlep = hdp->handle;
2275 return (0); 2275 return (0);
2276} 2276}
2277 2277
2278void * 2278void *
2279isp_find_xs_tgt(ispsoftc_t *isp, uint32_t handle) 2279isp_find_xs_tgt(ispsoftc_t *isp, uint32_t handle)
2280{ 2280{
2281 if (!ISP_VALID_TGT_HANDLE(isp, handle)) { 2281 if (!ISP_VALID_TGT_HANDLE(isp, handle)) {
2282 isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); 2282 isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle);

cvs diff -r1.11 -r1.12 src/sys/dev/ic/ds1687reg.h (expand / switch to unified diff)

--- src/sys/dev/ic/ds1687reg.h 2018/11/08 06:43:52 1.11
+++ src/sys/dev/ic/ds1687reg.h 2021/10/21 13:21:54 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ds1687reg.h,v 1.11 2018/11/08 06:43:52 msaitoh Exp $ */ 1/* $NetBSD: ds1687reg.h,v 1.12 2021/10/21 13:21:54 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Rafal K. Boni. 8 * by Rafal K. Boni.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -53,27 +53,27 @@ @@ -53,27 +53,27 @@
53 * Pittsburgh PA 15213-3890 53 * Pittsburgh PA 15213-3890
54 * 54 *
55 * any improvements or extensions that they make and grant Carnegie the 55 * any improvements or extensions that they make and grant Carnegie the
56 * rights to redistribute these changes. 56 * rights to redistribute these changes.
57 */ 57 */
58 58
59/* 59/*
60 * Definitions for the Dallas Semiconductor DS1687 Real Time Clock. 60 * Definitions for the Dallas Semiconductor DS1687 Real Time Clock.
61 * 61 *
62 * The DS1687 and follow-on RTC chips are Y2k-compliant successors to the 62 * The DS1687 and follow-on RTC chips are Y2k-compliant successors to the
63 * DS1287, which in turn is register-compatible with the MC146818 and/or 63 * DS1287, which in turn is register-compatible with the MC146818 and/or
64 * MC146818A RTCs. 64 * MC146818A RTCs.
65 * 65 *
66 * Plucked right from the Dallas Semicomductor specs available at: 66 * Plucked right from the Dallas Semiconductor specs available at:
67 * http://pdfserv.maxim-ic.com/arpdf/DS1685-DS1687.pdf 67 * http://pdfserv.maxim-ic.com/arpdf/DS1685-DS1687.pdf
68 * 68 *
69 * The DS1686 contains 14 basic clock-related registers and 50 bytes of 69 * The DS1686 contains 14 basic clock-related registers and 50 bytes of
70 * user RAM laid out for compatibility with the register layout of the 70 * user RAM laid out for compatibility with the register layout of the
71 * DS1287/MC14818 chips. It also includes an extended mode which allows 71 * DS1287/MC14818 chips. It also includes an extended mode which allows
72 * access to these same basic registers as well an extended register 72 * access to these same basic registers as well an extended register
73 * set and NVRAM area; this extended register set includes a century 73 * set and NVRAM area; this extended register set includes a century
74 * register for Y2k compliant date storage. 74 * register for Y2k compliant date storage.
75 * 75 *
76 * Since the locations of these ports and the method used to access them 76 * Since the locations of these ports and the method used to access them
77 * can be machine-dependent, the low-level details of reading and writing 77 * can be machine-dependent, the low-level details of reading and writing
78 * writing the RTC's registers are handled by machine-specific functions. 78 * writing the RTC's registers are handled by machine-specific functions.
79 * 79 *
@@ -94,27 +94,27 @@ @@ -94,27 +94,27 @@
94 * which allows the user to switch the RTC between a "compatible" mode in 94 * which allows the user to switch the RTC between a "compatible" mode in
95 * bank 0 and an extended mode in bank 1. 95 * bank 0 and an extended mode in bank 1.
96 * 96 *
97 * Both banks provide access to the 14 timekeeping/alarm registers and 97 * Both banks provide access to the 14 timekeeping/alarm registers and
98 * to 50 bytes of user RAM. In addition, bank 0 provides access to an 98 * to 50 bytes of user RAM. In addition, bank 0 provides access to an
99 * additional 64 bytes of user RAM in the upper half of the RTC address 99 * additional 64 bytes of user RAM in the upper half of the RTC address
100 * space. 100 * space.
101 * 101 *
102 * Bank 1, on the other hand, provides access to an extended register set, 102 * Bank 1, on the other hand, provides access to an extended register set,
103 * including a silicon serial number -- including a model ID byte, century 103 * including a silicon serial number -- including a model ID byte, century
104 * register for Y2k compatibility and memory address/data registers which 104 * register for Y2k compatibility and memory address/data registers which
105 * allow indirect access to a larger extended user RAM address space. It 105 * allow indirect access to a larger extended user RAM address space. It
106 * is worth noting that the extended user RAM is distinct from the "basic" 106 * is worth noting that the extended user RAM is distinct from the "basic"
107 * 114 bytes of user RAM which are accesible in bank 0. 107 * 114 bytes of user RAM which are accessible in bank 0.
108 */ 108 */
109 109
110/* 110/*
111 * The registers, and the bits within each register. 111 * The registers, and the bits within each register.
112 */ 112 */
113 113
114#define DS1687_SEC 0x00 /* Time of year: seconds (0-59) */ 114#define DS1687_SEC 0x00 /* Time of year: seconds (0-59) */
115#define DS1687_ASEC 0x01 /* Alarm: seconds */ 115#define DS1687_ASEC 0x01 /* Alarm: seconds */
116#define DS1687_MIN 0x02 /* Time of year: minutes (0-59) */ 116#define DS1687_MIN 0x02 /* Time of year: minutes (0-59) */
117#define DS1687_AMIN 0x03 /* Alarm: minutes */ 117#define DS1687_AMIN 0x03 /* Alarm: minutes */
118#define DS1687_HOUR 0x04 /* Time of year: hour (see above) */ 118#define DS1687_HOUR 0x04 /* Time of year: hour (see above) */
119#define DS1687_AHOUR 0x05 /* Alarm: hour (see above) */ 119#define DS1687_AHOUR 0x05 /* Alarm: hour (see above) */
120#define DS1687_DOW 0x06 /* Time of year: day of week (1-7, 1 = Sun) */ 120#define DS1687_DOW 0x06 /* Time of year: day of week (1-7, 1 = Sun) */

cvs diff -r1.130 -r1.131 src/sys/dev/ic/isp.c (expand / switch to unified diff)

--- src/sys/dev/ic/isp.c 2021/09/19 10:34:09 1.130
+++ src/sys/dev/ic/isp.c 2021/10/21 13:21:54 1.131
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: isp.c,v 1.130 2021/09/19 10:34:09 andvar Exp $ */ 1/* $NetBSD: isp.c,v 1.131 2021/10/21 13:21:54 andvar Exp $ */
2/* 2/*
3 * Machine and OS Independent (well, as best as possible) 3 * Machine and OS Independent (well, as best as possible)
4 * code for the Qlogic ISP SCSI adapters. 4 * code for the Qlogic ISP SCSI adapters.
5 * 5 *
6 * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration 6 * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Additional Copyright (C) 2000-2007 by Matthew Jacob 9 * Additional Copyright (C) 2000-2007 by Matthew Jacob
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -33,27 +33,27 @@ @@ -33,27 +33,27 @@
33 */ 33 */
34 34
35/* 35/*
36 * Inspiration and ideas about this driver are from Erik Moe's Linux driver 36 * Inspiration and ideas about this driver are from Erik Moe's Linux driver
37 * (qlogicisp.c) and Dave Miller's SBus version of same (qlogicisp.c). Some 37 * (qlogicisp.c) and Dave Miller's SBus version of same (qlogicisp.c). Some
38 * ideas dredged from the Solaris driver. 38 * ideas dredged from the Solaris driver.
39 */ 39 */
40 40
41/* 41/*
42 * Include header file appropriate for platform we're building on. 42 * Include header file appropriate for platform we're building on.
43 */ 43 */
44#ifdef __NetBSD__ 44#ifdef __NetBSD__
45#include <sys/cdefs.h> 45#include <sys/cdefs.h>
46__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.130 2021/09/19 10:34:09 andvar Exp $"); 46__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.131 2021/10/21 13:21:54 andvar Exp $");
47#include <dev/ic/isp_netbsd.h> 47#include <dev/ic/isp_netbsd.h>
48#endif 48#endif
49#ifdef __FreeBSD__ 49#ifdef __FreeBSD__
50#include <sys/cdefs.h> 50#include <sys/cdefs.h>
51__FBSDID("$FreeBSD$"); 51__FBSDID("$FreeBSD$");
52#include <dev/isp/isp_freebsd.h> 52#include <dev/isp/isp_freebsd.h>
53#endif 53#endif
54#ifdef __OpenBSD__ 54#ifdef __OpenBSD__
55#include <dev/ic/isp_openbsd.h> 55#include <dev/ic/isp_openbsd.h>
56#endif 56#endif
57#ifdef __linux__ 57#ifdef __linux__
58#include "isp_linux.h" 58#include "isp_linux.h"
59#endif 59#endif
@@ -6222,27 +6222,27 @@ isp_parse_status(ispsoftc_t *isp, ispsta @@ -6222,27 +6222,27 @@ isp_parse_status(ispsoftc_t *isp, ispsta
6222 6222
6223 case RQCS_BAD_ENTRY: 6223 case RQCS_BAD_ENTRY:
6224 isp_prt(isp, ISP_LOGERR, "Invalid IOCB entry type detected"); 6224 isp_prt(isp, ISP_LOGERR, "Invalid IOCB entry type detected");
6225 break; 6225 break;
6226 6226
6227 case RQCS_QUEUE_FULL: 6227 case RQCS_QUEUE_FULL:
6228 isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "internal queues full status 0x%x", *XS_STSP(xs)); 6228 isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "internal queues full status 0x%x", *XS_STSP(xs));
6229 6229
6230 /* 6230 /*
6231 * If QFULL or some other status byte is set, then this 6231 * If QFULL or some other status byte is set, then this
6232 * isn't an error, per se. 6232 * isn't an error, per se.
6233 * 6233 *
6234 * Unfortunately, some QLogic f/w writers have, in 6234 * Unfortunately, some QLogic f/w writers have, in
6235 * some cases, ommitted to *set* status to QFULL. 6235 * some cases, omitted to *set* status to QFULL.
6236 * 6236 *
6237 6237
6238 if (*XS_STSP(xs) != SCSI_GOOD && XS_NOERR(xs)) { 6238 if (*XS_STSP(xs) != SCSI_GOOD && XS_NOERR(xs)) {
6239 XS_SETERR(xs, HBA_NOERROR); 6239 XS_SETERR(xs, HBA_NOERROR);
6240 return; 6240 return;
6241 } 6241 }
6242 6242
6243 * 6243 *
6244 * 6244 *
6245 */ 6245 */
6246 6246
6247 *XS_STSP(xs) = SCSI_QFULL; 6247 *XS_STSP(xs) = SCSI_QFULL;
6248 XS_SETERR(xs, HBA_NOERROR); 6248 XS_SETERR(xs, HBA_NOERROR);

cvs diff -r1.182 -r1.183 src/sys/dev/pci/if_sip.c (expand / switch to unified diff)

--- src/sys/dev/pci/if_sip.c 2020/03/16 01:54:23 1.182
+++ src/sys/dev/pci/if_sip.c 2021/10/21 13:21:54 1.183
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_sip.c,v 1.182 2020/03/16 01:54:23 thorpej Exp $ */ 1/* $NetBSD: if_sip.c,v 1.183 2021/10/21 13:21:54 andvar Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe. 8 * by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -63,27 +63,27 @@ @@ -63,27 +63,27 @@
63 * SiS 7016 10/100, National Semiconductor DP83815 10/100, and 63 * SiS 7016 10/100, National Semiconductor DP83815 10/100, and
64 * National Semiconductor DP83820 10/100/1000 PCI Ethernet 64 * National Semiconductor DP83820 10/100/1000 PCI Ethernet
65 * controllers. 65 * controllers.
66 * 66 *
67 * Originally written to support the SiS 900 by Jason R. Thorpe for 67 * Originally written to support the SiS 900 by Jason R. Thorpe for
68 * Network Computer, Inc. 68 * Network Computer, Inc.
69 * 69 *
70 * TODO: 70 * TODO:
71 * 71 *
72 * - Reduce the Rx interrupt load. 72 * - Reduce the Rx interrupt load.
73 */ 73 */
74 74
75#include <sys/cdefs.h> 75#include <sys/cdefs.h>
76__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.182 2020/03/16 01:54:23 thorpej Exp $"); 76__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.183 2021/10/21 13:21:54 andvar Exp $");
77 77
78#include <sys/param.h> 78#include <sys/param.h>
79#include <sys/systm.h> 79#include <sys/systm.h>
80#include <sys/callout.h> 80#include <sys/callout.h>
81#include <sys/mbuf.h> 81#include <sys/mbuf.h>
82#include <sys/malloc.h> 82#include <sys/malloc.h>
83#include <sys/kernel.h> 83#include <sys/kernel.h>
84#include <sys/socket.h> 84#include <sys/socket.h>
85#include <sys/ioctl.h> 85#include <sys/ioctl.h>
86#include <sys/errno.h> 86#include <sys/errno.h>
87#include <sys/device.h> 87#include <sys/device.h>
88#include <sys/queue.h> 88#include <sys/queue.h>
89#include <sys/rndsource.h> 89#include <sys/rndsource.h>
@@ -878,27 +878,27 @@ sipcom_dp83820_attach(struct sip_softc * @@ -878,27 +878,27 @@ sipcom_dp83820_attach(struct sip_softc *
878 * that it's in a 64-bit slot because I guess they 878 * that it's in a 64-bit slot because I guess they
879 * wired up ACK64# and REQ64#). 879 * wired up ACK64# and REQ64#).
880 */ 880 */
881 if (gsip_disable_data64) 881 if (gsip_disable_data64)
882 using64 = "force-disabled"; 882 using64 = "force-disabled";
883 else if (sipcom_check_64bit(pa)) { 883 else if (sipcom_check_64bit(pa)) {
884 sc->sc_cfg |= CFG_DATA64_EN; 884 sc->sc_cfg |= CFG_DATA64_EN;
885 using64 = "enabled"; 885 using64 = "enabled";
886 } else 886 } else
887 using64 = "disabled (32-bit card)"; 887 using64 = "disabled (32-bit card)";
888 } else { 888 } else {
889 using64 = "disabled in EEPROM"; 889 using64 = "disabled in EEPROM";
890 } 890 }
891 printf("%s: 64-bit slot detected, 64-bit tranfers %s\n", 891 printf("%s: 64-bit slot detected, 64-bit transfers %s\n",
892 device_xname(sc->sc_dev), using64); 892 device_xname(sc->sc_dev), using64);
893 } 893 }
894  894
895 /* 895 /*
896 * The T64ADDR bit is loaded by the chip from the EEPROM and 896 * The T64ADDR bit is loaded by the chip from the EEPROM and
897 * is read-only. 897 * is read-only.
898 */ 898 */
899 if (reg & CFG_T64ADDR) 899 if (reg & CFG_T64ADDR)
900 sc->sc_cfg |= CFG_T64ADDR; 900 sc->sc_cfg |= CFG_T64ADDR;
901 901
902 /* 902 /*
903 * We can use 64-bit DMA addressing regardless of what 903 * We can use 64-bit DMA addressing regardless of what
904 * sort of slot we're in. 904 * sort of slot we're in.

cvs diff -r1.13 -r1.14 src/sys/kern/sys_futex.c (expand / switch to unified diff)

--- src/sys/kern/sys_futex.c 2021/09/28 15:05:42 1.13
+++ src/sys/kern/sys_futex.c 2021/10/21 13:21:54 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: sys_futex.c,v 1.13 2021/09/28 15:05:42 thorpej Exp $ */ 1/* $NetBSD: sys_futex.c,v 1.14 2021/10/21 13:21:54 andvar Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2018, 2019, 2020 The NetBSD Foundation, Inc. 4 * Copyright (c) 2018, 2019, 2020 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Taylor R. Campbell and Jason R. Thorpe. 8 * by Taylor R. Campbell and Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: sys_futex.c,v 1.13 2021/09/28 15:05:42 thorpej Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: sys_futex.c,v 1.14 2021/10/21 13:21:54 andvar Exp $");
34 34
35/* 35/*
36 * Futexes 36 * Futexes
37 * 37 *
38 * The futex system call coordinates notifying threads waiting for 38 * The futex system call coordinates notifying threads waiting for
39 * changes on a 32-bit word of memory. The word can be managed by 39 * changes on a 32-bit word of memory. The word can be managed by
40 * CPU atomic operations in userland, without system calls, as long 40 * CPU atomic operations in userland, without system calls, as long
41 * as there is no contention. 41 * as there is no contention.
42 * 42 *
43 * The simplest use case demonstrating the utility is: 43 * The simplest use case demonstrating the utility is:
44 * 44 *
45 * // 32-bit word of memory shared among threads or 45 * // 32-bit word of memory shared among threads or
46 * // processes in userland. lock & 1 means owned; 46 * // processes in userland. lock & 1 means owned;
@@ -735,27 +735,27 @@ futex_lookup_create(int *uaddr, bool sha @@ -735,27 +735,27 @@ futex_lookup_create(int *uaddr, bool sha
735 * it. 735 * it.
736 */ 736 */
737 error = futex_lookup_by_key(&fk, shared, fp); 737 error = futex_lookup_by_key(&fk, shared, fp);
738 if (error || *fp != NULL) { 738 if (error || *fp != NULL) {
739 /* 739 /*
740 * We either found one, or there was an error. 740 * We either found one, or there was an error.
741 * In either case, we are done with the key. 741 * In either case, we are done with the key.
742 */ 742 */
743 futex_key_fini(&fk, shared); 743 futex_key_fini(&fk, shared);
744 goto out; 744 goto out;
745 } 745 }
746 746
747 /* 747 /*
748 * Create a futex recoard. This tranfers ownership of the key 748 * Create a futex record. This transfers ownership of the key
749 * in all cases. 749 * in all cases.
750 */ 750 */
751 f = futex_create(&fk, shared); 751 f = futex_create(&fk, shared);
752 if (f == NULL) { 752 if (f == NULL) {
753 error = ENOMEM; 753 error = ENOMEM;
754 goto out; 754 goto out;
755 } 755 }
756 756
757 /* 757 /*
758 * Insert our new futex, or use existing if someone else beat 758 * Insert our new futex, or use existing if someone else beat
759 * us to it. 759 * us to it.
760 */ 760 */
761 error = futex_insert(f, fp); 761 error = futex_insert(f, fp);

cvs diff -r1.2 -r1.3 src/sys/modules/examples/panic_string/panic_string.c (expand / switch to unified diff)

--- src/sys/modules/examples/panic_string/panic_string.c 2020/01/30 07:58:33 1.2
+++ src/sys/modules/examples/panic_string/panic_string.c 2021/10/21 13:21:55 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: panic_string.c,v 1.2 2020/01/30 07:58:33 kamil Exp $ */ 1/* $NetBSD: panic_string.c,v 1.3 2021/10/21 13:21:55 andvar Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2018 The NetBSD Foundation, Inc. 4 * Copyright (c) 2018 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -18,52 +18,52 @@ @@ -18,52 +18,52 @@
18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 29
30#include <sys/cdefs.h> 30#include <sys/cdefs.h>
31__KERNEL_RCSID(0, "$NetBSD: panic_string.c,v 1.2 2020/01/30 07:58:33 kamil Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: panic_string.c,v 1.3 2021/10/21 13:21:55 andvar Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/types.h> 34#include <sys/types.h>
35#include <sys/conf.h> 35#include <sys/conf.h>
36#include <sys/device.h> 36#include <sys/device.h>
37#include <sys/filedesc.h> 37#include <sys/filedesc.h>
38#include <sys/kernel.h> 38#include <sys/kernel.h>
39#include <sys/kmem.h> 39#include <sys/kmem.h>
40#include <sys/lwp.h> 40#include <sys/lwp.h>
41#include <sys/module.h> 41#include <sys/module.h>
42#include <sys/vfs_syscalls.h> 42#include <sys/vfs_syscalls.h>
43 43
44/* 44/*
45 * Create a device /dev/panic from which you can read sequential 45 * Create a device /dev/panic from which you can read sequential
46 * user input. 46 * user input.
47 * 47 *
48 * To use this device you need to do: 48 * To use this device you need to do:
49 * mknod /dev/panic c 351 0 49 * mknod /dev/panic c 351 0
50 * 50 *
51 * To write to the device you might need: 51 * To write to the device you might need:
52 * chmod 666 /dev/panic 52 * chmod 666 /dev/panic
53 * 53 *
54 * Commentary: 54 * Commentary:
55 * This module manages the device /dev/panic, 55 * This module manages the device /dev/panic,
56 * tranfers a string from userspace to kernel space 56 * transfers a string from userspace to kernel space
57 * and calls kernel panic with the passed string. 57 * and calls kernel panic with the passed string.
58 * 58 *
59 * echo 'string' > /dev/panic 59 * echo 'string' > /dev/panic
60 * will do the trick after loading the module. 60 * will do the trick after loading the module.
61 */ 61 */
62 62
63dev_type_open(panic_string_open); 63dev_type_open(panic_string_open);
64dev_type_close(panic_string_close); 64dev_type_close(panic_string_close);
65dev_type_write(panic_string_write); 65dev_type_write(panic_string_write);
66 66
67static struct cdevsw panic_string_cdevsw = { 67static struct cdevsw panic_string_cdevsw = {
68 .d_open = panic_string_open, 68 .d_open = panic_string_open,
69 .d_close = panic_string_close, 69 .d_close = panic_string_close,

cvs diff -r1.25 -r1.26 src/sys/netinet/sctp_output.c (expand / switch to unified diff)

--- src/sys/netinet/sctp_output.c 2021/09/07 13:24:46 1.25
+++ src/sys/netinet/sctp_output.c 2021/10/21 13:21:55 1.26
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: sctp_output.c,v 1.25 2021/09/07 13:24:46 andvar Exp $ */ 1/* $NetBSD: sctp_output.c,v 1.26 2021/10/21 13:21:55 andvar Exp $ */
2/* $KAME: sctp_output.c,v 1.48 2005/06/16 18:29:24 jinmei Exp $ */ 2/* $KAME: sctp_output.c,v 1.48 2005/06/16 18:29:24 jinmei Exp $ */
3 3
4/* 4/*
5 * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, 5 * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc,
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 20 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE. 30 * SUCH DAMAGE.
31 */ 31 */
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.25 2021/09/07 13:24:46 andvar Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.26 2021/10/21 13:21:55 andvar Exp $");
34 34
35#ifdef _KERNEL_OPT 35#ifdef _KERNEL_OPT
36#include "opt_ipsec.h" 36#include "opt_ipsec.h"
37#include "opt_inet.h" 37#include "opt_inet.h"
38#include "opt_sctp.h" 38#include "opt_sctp.h"
39#endif /* _KERNEL_OPT */ 39#endif /* _KERNEL_OPT */
40 40
41#include <sys/param.h> 41#include <sys/param.h>
42#include <sys/systm.h> 42#include <sys/systm.h>
43#include <sys/malloc.h> 43#include <sys/malloc.h>
44#include <sys/mbuf.h> 44#include <sys/mbuf.h>
45#include <sys/domain.h> 45#include <sys/domain.h>
46#include <sys/protosw.h> 46#include <sys/protosw.h>
@@ -4350,27 +4350,27 @@ sctp_msg_append(struct sctp_tcb *stcb, @@ -4350,27 +4350,27 @@ sctp_msg_append(struct sctp_tcb *stcb,
4350 chk->data = m; 4350 chk->data = m;
4351 m = NULL; 4351 m = NULL;
4352 /* Total in the MSIZE */ 4352 /* Total in the MSIZE */
4353 for (mm = chk->data; mm; mm = mm->m_next) { 4353 for (mm = chk->data; mm; mm = mm->m_next) {
4354 mbcnt += MSIZE; 4354 mbcnt += MSIZE;
4355 if (mm->m_flags & M_EXT) { 4355 if (mm->m_flags & M_EXT) {
4356 mbcnt += chk->data->m_ext.ext_size; 4356 mbcnt += chk->data->m_ext.ext_size;
4357 } 4357 }
4358 } 4358 }
4359 /* fix up the send_size if it is not present */ 4359 /* fix up the send_size if it is not present */
4360 chk->send_size = dataout; 4360 chk->send_size = dataout;
4361 chk->book_size = chk->send_size; 4361 chk->book_size = chk->send_size;
4362 chk->mbcnt = mbcnt; 4362 chk->mbcnt = mbcnt;
4363 /* ok, we are commited */ 4363 /* ok, we are committed */
4364 if ((srcv->sinfo_flags & SCTP_UNORDERED) == 0) { 4364 if ((srcv->sinfo_flags & SCTP_UNORDERED) == 0) {
4365 /* bump the ssn if we are unordered. */ 4365 /* bump the ssn if we are unordered. */
4366 strq->next_sequence_sent++; 4366 strq->next_sequence_sent++;
4367 } 4367 }
4368 chk->data->m_nextpkt = 0; 4368 chk->data->m_nextpkt = 0;
4369 asoc->stream_queue_cnt++; 4369 asoc->stream_queue_cnt++;
4370 TAILQ_INSERT_TAIL(&strq->outqueue, chk, sctp_next); 4370 TAILQ_INSERT_TAIL(&strq->outqueue, chk, sctp_next);
4371 /* now check if this stream is on the wheel */ 4371 /* now check if this stream is on the wheel */
4372 if ((strq->next_spoke.tqe_next == NULL) && 4372 if ((strq->next_spoke.tqe_next == NULL) &&
4373 (strq->next_spoke.tqe_prev == NULL)) { 4373 (strq->next_spoke.tqe_prev == NULL)) {
4374 /* Insert it on the wheel since it is not 4374 /* Insert it on the wheel since it is not
4375 * on it currently 4375 * on it currently
4376 */ 4376 */
@@ -4465,27 +4465,27 @@ sctp_msg_append(struct sctp_tcb *stcb, @@ -4465,27 +4465,27 @@ sctp_msg_append(struct sctp_tcb *stcb,
4465 chk->mbcnt = mbcnt_e; 4465 chk->mbcnt = mbcnt_e;
4466 mbcnt += mbcnt_e; 4466 mbcnt += mbcnt_e;
4467 if (chk->flags & SCTP_PR_SCTP_BUFFER) { 4467 if (chk->flags & SCTP_PR_SCTP_BUFFER) {
4468 asoc->sent_queue_cnt_removeable++; 4468 asoc->sent_queue_cnt_removeable++;
4469 } 4469 }
4470 n = n->m_nextpkt; 4470 n = n->m_nextpkt;
4471 TAILQ_INSERT_TAIL(&tmp, chk, sctp_next); 4471 TAILQ_INSERT_TAIL(&tmp, chk, sctp_next);
4472 } 4472 }
4473 m = NULL; 4473 m = NULL;
4474 /* now that we have enough space for all de-couple the 4474 /* now that we have enough space for all de-couple the
4475 * chain of mbufs by going through our temp array 4475 * chain of mbufs by going through our temp array
4476 * and breaking the pointers. 4476 * and breaking the pointers.
4477 */ 4477 */
4478 /* ok, we are commited */ 4478 /* ok, we are committed */
4479 if ((srcv->sinfo_flags & SCTP_UNORDERED) == 0) { 4479 if ((srcv->sinfo_flags & SCTP_UNORDERED) == 0) {
4480 /* bump the ssn if we are unordered. */ 4480 /* bump the ssn if we are unordered. */
4481 strq->next_sequence_sent++; 4481 strq->next_sequence_sent++;
4482 } 4482 }
4483 /* Mark the first/last flags. This will 4483 /* Mark the first/last flags. This will
4484 * result int a 3 for a single item on the list 4484 * result int a 3 for a single item on the list
4485 */ 4485 */
4486 chk = TAILQ_FIRST(&tmp); 4486 chk = TAILQ_FIRST(&tmp);
4487 chk->rec.data.rcv_flags |= SCTP_DATA_FIRST_FRAG; 4487 chk->rec.data.rcv_flags |= SCTP_DATA_FIRST_FRAG;
4488 chk = TAILQ_LAST(&tmp, sctpchunk_listhead); 4488 chk = TAILQ_LAST(&tmp, sctpchunk_listhead);
4489 chk->rec.data.rcv_flags |= SCTP_DATA_LAST_FRAG; 4489 chk->rec.data.rcv_flags |= SCTP_DATA_LAST_FRAG;
4490 /* now break any chains on the queue and 4490 /* now break any chains on the queue and
4491 * move it to the streams actual queue. 4491 * move it to the streams actual queue.
@@ -9567,27 +9567,27 @@ sctp_copy_it_in(struct sctp_inpcb *inp, @@ -9567,27 +9567,27 @@ sctp_copy_it_in(struct sctp_inpcb *inp,
9567 mbcnt += mbcnt_e; 9567 mbcnt += mbcnt_e;
9568 mbcnt_e = 0; 9568 mbcnt_e = 0;
9569 mm->m_pkthdr.len = tot_out; 9569 mm->m_pkthdr.len = tot_out;
9570 chk->data = mm; 9570 chk->data = mm;
9571 mm = NULL; 9571 mm = NULL;
9572 9572
9573 /* the actual chunk flags */ 9573 /* the actual chunk flags */
9574 chk->rec.data.rcv_flags |= SCTP_DATA_NOT_FRAG; 9574 chk->rec.data.rcv_flags |= SCTP_DATA_NOT_FRAG;
9575 chk->whoTo->ref_count++; 9575 chk->whoTo->ref_count++;
9576 9576
9577 /* fix up the send_size if it is not present */ 9577 /* fix up the send_size if it is not present */
9578 chk->send_size = tot_out; 9578 chk->send_size = tot_out;
9579 chk->book_size = chk->send_size; 9579 chk->book_size = chk->send_size;
9580 /* ok, we are commited */ 9580 /* ok, we are committed */
9581 if ((srcv->sinfo_flags & SCTP_UNORDERED) == 0) { 9581 if ((srcv->sinfo_flags & SCTP_UNORDERED) == 0) {
9582 /* bump the ssn if we are unordered. */ 9582 /* bump the ssn if we are unordered. */
9583 strq->next_sequence_sent++; 9583 strq->next_sequence_sent++;
9584 } 9584 }
9585 if (chk->flags & SCTP_PR_SCTP_BUFFER) { 9585 if (chk->flags & SCTP_PR_SCTP_BUFFER) {
9586 asoc->sent_queue_cnt_removeable++; 9586 asoc->sent_queue_cnt_removeable++;
9587 } 9587 }
9588 solock(so); 9588 solock(so);
9589 if ((asoc->state == 0) || 9589 if ((asoc->state == 0) ||
9590 (my_vtag != asoc->my_vtag) || 9590 (my_vtag != asoc->my_vtag) ||
9591 (so != inp->sctp_socket) || 9591 (so != inp->sctp_socket) ||
9592 (inp->sctp_socket == 0)) { 9592 (inp->sctp_socket == 0)) {
9593 /* connection was aborted */ 9593 /* connection was aborted */

cvs diff -r1.75 -r1.76 src/sys/nfs/nfsnode.h (expand / switch to unified diff)

--- src/sys/nfs/nfsnode.h 2021/07/18 23:57:15 1.75
+++ src/sys/nfs/nfsnode.h 2021/10/21 13:21:55 1.76
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: nfsnode.h,v 1.75 2021/07/18 23:57:15 dholland Exp $ */ 1/* $NetBSD: nfsnode.h,v 1.76 2021/10/21 13:21:55 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1989, 1993 4 * Copyright (c) 1989, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Rick Macklem at The University of Guelph. 8 * Rick Macklem at The University of Guelph.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -88,27 +88,27 @@ struct nfsdircache { @@ -88,27 +88,27 @@ struct nfsdircache {
88 * The nfsnode is the nfs equivalent to ufs's inode. Any similarity 88 * The nfsnode is the nfs equivalent to ufs's inode. Any similarity
89 * is purely coincidental. 89 * is purely coincidental.
90 * There is a unique nfsnode allocated for each active file, 90 * There is a unique nfsnode allocated for each active file,
91 * each current directory, each mounted-on file, text file, and the root. 91 * each current directory, each mounted-on file, text file, and the root.
92 * An nfsnode is 'named' by its file handle. (nget/nfs_node.c) 92 * An nfsnode is 'named' by its file handle. (nget/nfs_node.c)
93 */ 93 */
94 94
95struct nfsnode_spec { 95struct nfsnode_spec {
96 struct timespec nspec_mtim; /* local mtime */ 96 struct timespec nspec_mtim; /* local mtime */
97 struct timespec nspec_atim; /* local atime */ 97 struct timespec nspec_atim; /* local atime */
98}; 98};
99 99
100struct nfsnode_reg { 100struct nfsnode_reg {
101 off_t nreg_pushedlo; /* 1st blk in commited range */ 101 off_t nreg_pushedlo; /* 1st blk in committed range */
102 off_t nreg_pushedhi; /* Last block in range */ 102 off_t nreg_pushedhi; /* Last block in range */
103 off_t nreg_pushlo; /* 1st block in commit range */ 103 off_t nreg_pushlo; /* 1st block in commit range */
104 off_t nreg_pushhi; /* Last block in range */ 104 off_t nreg_pushhi; /* Last block in range */
105 kmutex_t nreg_commitlock; /* Serialize commits XXX */ 105 kmutex_t nreg_commitlock; /* Serialize commits XXX */
106 int nreg_commitflags; 106 int nreg_commitflags;
107 int nreg_error; /* Save write error value */ 107 int nreg_error; /* Save write error value */
108}; 108};
109 109
110struct nfsnode_dir { 110struct nfsnode_dir {
111 off_t ndir_direof; /* EOF offset cache */ 111 off_t ndir_direof; /* EOF offset cache */
112 nfsuint64 ndir_cookieverf; /* Cookie verifier */ 112 nfsuint64 ndir_cookieverf; /* Cookie verifier */
113 struct nfsdirhashhead *ndir_dircache; /* offset -> cache hash heads */ 113 struct nfsdirhashhead *ndir_dircache; /* offset -> cache hash heads */
114 struct nfsdirchainhead ndir_dirchain; /* Chain of dir cookies */ 114 struct nfsdirchainhead ndir_dirchain; /* Chain of dir cookies */

cvs diff -r1.10 -r1.11 src/tests/usr.bin/config/t_config.sh (expand / switch to unified diff)

--- src/tests/usr.bin/config/t_config.sh 2020/03/09 20:33:16 1.10
+++ src/tests/usr.bin/config/t_config.sh 2021/10/21 13:21:55 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: t_config.sh,v 1.10 2020/03/09 20:33:16 christos Exp $ 1# $NetBSD: t_config.sh,v 1.11 2021/10/21 13:21:55 andvar Exp $
2# 2#
3# Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. 3# Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# Redistribution and use in source and binary forms, with or without 6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions 7# modification, are permitted provided that the following conditions
8# are met: 8# are met:
9# 1. Redistributions of source code must retain the above copyright 9# 1. Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer. 10# notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright 11# 2. Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the 12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution. 13# documentation and/or other materials provided with the distribution.
14# 14#
@@ -125,27 +125,27 @@ test_case() @@ -125,27 +125,27 @@ test_case()
125 eval "${name}_body() { \ 125 eval "${name}_body() { \
126 run_and_check_${type} '${name}'; \ 126 run_and_check_${type} '${name}'; \
127 }" 127 }"
128} 128}
129 129
130test_case shadow_instance pass "Checks correct handling of shadowed instances" 130test_case shadow_instance pass "Checks correct handling of shadowed instances"
131test_case loop pass "Checks correct handling of loops" 131test_case loop pass "Checks correct handling of loops"
132test_case loop2 pass "Checks correct handling of devices that can be their" \ 132test_case loop2 pass "Checks correct handling of devices that can be their" \
133 "own parents" 133 "own parents"
134test_case pseudo_parent pass "Checks correct handling of children of pseudo" \ 134test_case pseudo_parent pass "Checks correct handling of children of pseudo" \
135 "devices (PR/32329)" 135 "devices (PR/32329)"
136test_case postponed_orphan fail "Checks that config catches adding an" \ 136test_case postponed_orphan fail "Checks that config catches adding an" \
137 "instance of a child of a negated instance as error" 137 "instance of a child of a negated instance as error"
138test_case no_pseudo fail "Checks that config catches ommited 'pseudo-device'" \ 138test_case no_pseudo fail "Checks that config catches omitted 'pseudo-device'" \
139 "as error (PR/34111)" 139 "as error (PR/34111)"
140test_case deffs_redef fail "Checks that config doesn't allow a deffs to use" \ 140test_case deffs_redef fail "Checks that config doesn't allow a deffs to use" \
141 "the same name as a previous defflag/defparam" 141 "the same name as a previous defflag/defparam"
142 142
143# Selecting an undefined option. 143# Selecting an undefined option.
144undefined_opt_config_str=" 144undefined_opt_config_str="
145include \"${srcdir}/d_min\" 145include \"${srcdir}/d_min\"
146options UNDEFINED 146options UNDEFINED
147" 147"
148test_case undefined_opt pass \ 148test_case undefined_opt pass \
149 "Checks that config allows a selection for an undefined options" 149 "Checks that config allows a selection for an undefined options"
150 150
151# Negating an undefined option. 151# Negating an undefined option.

cvs diff -r1.42 -r1.43 src/usr.sbin/mtrace/mtrace.c (expand / switch to unified diff)

--- src/usr.sbin/mtrace/mtrace.c 2019/02/03 03:19:31 1.42
+++ src/usr.sbin/mtrace/mtrace.c 2021/10/21 13:21:55 1.43
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mtrace.c,v 1.42 2019/02/03 03:19:31 mrg Exp $ */ 1/* $NetBSD: mtrace.c,v 1.43 2021/10/21 13:21:55 andvar Exp $ */
2 2
3/* 3/*
4 * mtrace.c 4 * mtrace.c
5 * 5 *
6 * This tool traces the branch of a multicast tree from a source to a 6 * This tool traces the branch of a multicast tree from a source to a
7 * receiver for a particular multicast group and gives statistics 7 * receiver for a particular multicast group and gives statistics
8 * about packet rate and loss for each hop along the path. It can 8 * about packet rate and loss for each hop along the path. It can
9 * usually be invoked just as 9 * usually be invoked just as
10 * 10 *
11 * mtrace source 11 * mtrace source
12 * 12 *
13 * to trace the route from that source to the local host for a default 13 * to trace the route from that source to the local host for a default
14 * group when only the route is desired and not group-specific packet 14 * group when only the route is desired and not group-specific packet
@@ -42,27 +42,27 @@ @@ -42,27 +42,27 @@
42 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 42 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 43 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
44 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 44 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 45 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 46 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 47 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 48 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 49 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50 * SUCH DAMAGE. 50 * SUCH DAMAGE.
51 */ 51 */
52 52
53#include <sys/cdefs.h> 53#include <sys/cdefs.h>
54#ifndef lint 54#ifndef lint
55__RCSID("$NetBSD: mtrace.c,v 1.42 2019/02/03 03:19:31 mrg Exp $"); 55__RCSID("$NetBSD: mtrace.c,v 1.43 2021/10/21 13:21:55 andvar Exp $");
56#endif 56#endif
57 57
58#include <sys/types.h> 58#include <sys/types.h>
59#include <sys/ioctl.h> 59#include <sys/ioctl.h>
60#include <sys/time.h> 60#include <sys/time.h>
61#include <poll.h> 61#include <poll.h>
62#include <netinet/in.h> 62#include <netinet/in.h>
63#include <arpa/inet.h> 63#include <arpa/inet.h>
64#include <ctype.h> 64#include <ctype.h>
65#include <memory.h> 65#include <memory.h>
66#include <netdb.h> 66#include <netdb.h>
67#include <string.h> 67#include <string.h>
68#include <ifaddrs.h> 68#include <ifaddrs.h>
@@ -1176,27 +1176,27 @@ main(int argc, char **argv) @@ -1176,27 +1176,27 @@ main(int argc, char **argv)
1176 arg = p; 1176 arg = p;
1177 p = ""; 1177 p = "";
1178 } else if (argc > 0) arg = argv[0]; 1178 } else if (argc > 0) arg = argv[0];
1179 switch (c) { 1179 switch (c) {
1180 case 'd': /* Unlisted debug print option */ 1180 case 'd': /* Unlisted debug print option */
1181 if (arg && isdigit((unsigned char)*arg)) { 1181 if (arg && isdigit((unsigned char)*arg)) {
1182 debug = atoi(arg); 1182 debug = atoi(arg);
1183 if (debug < 0) debug = 0; 1183 if (debug < 0) debug = 0;
1184 if (debug > 3) debug = 3; 1184 if (debug > 3) debug = 3;
1185 if (arg == argv[0]) argv++, argc--; 1185 if (arg == argv[0]) argv++, argc--;
1186 break; 1186 break;
1187 } else 1187 } else
1188 goto usage; 1188 goto usage;
1189 case 'M': /* Use multicast for reponse */ 1189 case 'M': /* Use multicast for response */
1190 multicast = TRUE; 1190 multicast = TRUE;
1191 break; 1191 break;
1192 case 'l': /* Loop updating stats indefinitely */ 1192 case 'l': /* Loop updating stats indefinitely */
1193 numstats = 3153600; 1193 numstats = 3153600;
1194 break; 1194 break;
1195 case 'n': /* Don't reverse map host addresses */ 1195 case 'n': /* Don't reverse map host addresses */
1196 numeric = TRUE; 1196 numeric = TRUE;
1197 break; 1197 break;
1198 case 'p': /* Passive listen for traces */ 1198 case 'p': /* Passive listen for traces */
1199 passive = TRUE; 1199 passive = TRUE;
1200 break; 1200 break;
1201 case 'v': /* Verbosity */ 1201 case 'v': /* Verbosity */
1202 verbose = TRUE; 1202 verbose = TRUE;