fix various typos, mainly in comments, but also in man pages and log messages.diff -r1.27 -r1.28 src/doc/roadmaps/storage
(andvar)
--- 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 | |||
3 | NetBSD Storage Roadmap | 3 | NetBSD Storage Roadmap | |
4 | ====================== | 4 | ====================== | |
5 | 5 | |||
6 | This is a small roadmap document, and deals with the storage and file | 6 | This is a small roadmap document, and deals with the storage and file | |
7 | systems side of the operating system. It discusses elements, projects, | 7 | systems side of the operating system. It discusses elements, projects, | |
8 | and goals that are under development or under discussion; and it is | 8 | and goals that are under development or under discussion; and it is | |
9 | divided into three categories based on perceived priority. | 9 | divided into three categories based on perceived priority. | |
10 | 10 | |||
11 | The following elements, projects, and goals are considered strategic | 11 | The following elements, projects, and goals are considered strategic | |
12 | priorities for the project: | 12 | priorities 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. | |||
213 | 7. nvme support | 213 | 7. nvme support | |
214 | ---------------- | 214 | ---------------- | |
215 | 215 | |||
216 | nvme ("NVM Express") is a hardware interface standard for PCI-attached | 216 | nvme ("NVM Express") is a hardware interface standard for PCI-attached | |
217 | SSDs. NetBSD now has a driver for these. | 217 | SSDs. NetBSD now has a driver for these. | |
218 | 218 | |||
219 | Driver is now MPSAFE and uses bufq fcfs (i.e. no disksort()) already, | 219 | Driver is now MPSAFE and uses bufq fcfs (i.e. no disksort()) already, | |
220 | so the most obvious software bottlenecks were treated. It still needs | 220 | so the most obvious software bottlenecks were treated. It still needs | |
221 | more testing on real hardware, and it may be good to investigate some further | 221 | more testing on real hardware, and it may be good to investigate some further | |
222 | optimizations, such as DragonFly pbuf(9) or something similar. | 222 | optimizations, such as DragonFly pbuf(9) or something similar. | |
223 | 223 | |||
224 | Semi-relatedly, it is also time for scsipi to become MPSAFE. | 224 | Semi-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 | |||
234 | 8. lfs64 | 234 | 8. lfs64 | |
235 | -------- | 235 | -------- | |
236 | 236 | |||
237 | LFS currently only supports volumes up to 2 TB. As LFS is of interest | 237 | LFS currently only supports volumes up to 2 TB. As LFS is of interest | |
238 | for use on shingled disks (which are larger than 2 TB) and also for | 238 | for use on shingled disks (which are larger than 2 TB) and also for | |
239 | use on disk arrays (ditto) this is something of a problem. A 64-bit | 239 | use 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.) | |||
318 | Ideally someone would write ext3 and/or ext4 code, whether integrated | 318 | Ideally someone would write ext3 and/or ext4 code, whether integrated | |
319 | with or separate from the ext2 code we already have. It might also | 319 | with or separate from the ext2 code we already have. It might also | |
320 | make sense to port or wrap the Linux ext3 or ext4 code so it can be | 320 | make sense to port or wrap the Linux ext3 or ext4 code so it can be | |
321 | loaded as a GPL'd kernel module; it isn't clear if that would be more | 321 | loaded as a GPL'd kernel module; it isn't clear if that would be more | |
322 | or less work than doing an implementation. | 322 | or less work than doing an implementation. | |
323 | 323 | |||
324 | Note however that implementing ext3 has already defeated several | 324 | Note however that implementing ext3 has already defeated several | |
325 | people; this is a harder project than it looks. | 325 | people; 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 | |||
338 | 14. Port hammer from Dragonfly | 338 | 14. Port hammer from Dragonfly | |
339 | ------------------------------ | 339 | ------------------------------ | |
340 | 340 | |||
341 | While the motivation for and role of hammer isn't perhaps super | 341 | While the motivation for and role of hammer isn't perhaps super | |
342 | persuasive, it would still be good to have it. Porting it from | 342 | persuasive, it would still be good to have it. Porting it from | |
343 | Dragonfly is probably not that painful (compared to, say, zfs) but as | 343 | Dragonfly is probably not that painful (compared to, say, zfs) but as | |
344 | the Dragonfly and NetBSD VFS layers have diverged in different | 344 | the Dragonfly and NetBSD VFS layers have diverged in different | |
345 | directions from the original 4.4BSD, may not be entirely trivial | 345 | directions from the original 4.4BSD, may not be entirely trivial | |
346 | either. | 346 | either. | |
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. |
--- 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 | |||
44 | const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ | 44 | const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ | |
45 | const MNTNAMLEN = 255; /* maximum bytes in a name argument */ | 45 | const MNTNAMLEN = 255; /* maximum bytes in a name argument */ | |
46 | const FHSIZE = 32; /* size in bytes of a file handle */ | 46 | const FHSIZE = 32; /* size in bytes of a file handle */ | |
47 | const FHSIZE3 = 64; /* size in bytes of a file handle (v3) */ | 47 | const 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 | |||
137 | program MOUNTPROG { | 137 | program 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 |
--- 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 | |||
3 | WARNS= 3 | 3 | WARNS= 3 | |
4 | 4 | |||
5 | USE_FORT?= yes # data-driven bugs? | 5 | USE_FORT?= yes # data-driven bugs? | |
6 | 6 | |||
7 | .include <bsd.own.mk> | 7 | .include <bsd.own.mk> | |
8 | 8 | |||
9 | USE_SHLIBDIR= yes | 9 | USE_SHLIBDIR= yes | |
10 | 10 | |||
11 | ZLIBDIR=${NETBSDSRCDIR}/common/dist/zlib | 11 | ZLIBDIR=${NETBSDSRCDIR}/common/dist/zlib | |
12 | .PATH: ${ZLIBDIR} | 12 | .PATH: ${ZLIBDIR} | |
13 | LIB= z | 13 | LIB= z | |
14 | 14 | |||
@@ -27,17 +27,17 @@ FILES+= zlib.pc | @@ -27,17 +27,17 @@ FILES+= zlib.pc | |||
27 | FILESOWN_zlib.pc= ${BINOWN} | 27 | FILESOWN_zlib.pc= ${BINOWN} | |
28 | FILESGRP_zlib.pc= ${BINGRP} | 28 | FILESGRP_zlib.pc= ${BINGRP} | |
29 | FILESMODE_zlib.pc= ${NONBINMODE} | 29 | FILESMODE_zlib.pc= ${NONBINMODE} | |
30 | FILESDIR_zlib.pc= /usr/lib/pkgconfig | 30 | FILESDIR_zlib.pc= /usr/lib/pkgconfig | |
31 | 31 | |||
32 | COPTS.infback.c+= ${GCC_NO_IMPLICIT_FALLTHRU} | 32 | COPTS.infback.c+= ${GCC_NO_IMPLICIT_FALLTHRU} | |
33 | COPTS.inflate.c+= ${GCC_NO_IMPLICIT_FALLTHRU} | 33 | COPTS.inflate.c+= ${GCC_NO_IMPLICIT_FALLTHRU} | |
34 | 34 | |||
35 | .include <bsd.lib.mk> | 35 | .include <bsd.lib.mk> | |
36 | 36 | |||
37 | test: minigzip | 37 | test: 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. | |
42 | minigzip: ${ZLIBDIR}/test/minigzip.c libz.a | 42 | minigzip: ${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 |
--- 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
--- 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
--- 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
--- 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
--- 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 | |||
1043 | mfcsxintr(int unit) | 1043 | mfcsxintr(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) |
--- 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) | |||
532 | void | 532 | void | |
533 | serintr(void) | 533 | serintr(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; |
--- 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; |
--- 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_ |
--- 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 | |||
92 | struct hvn_nvs_init_resp { | 92 | struct 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 */ | |
100 | struct hvn_nvs_ndis_conf { | 100 | struct 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 */ | |
112 | struct hvn_nvs_ndis_init { | 112 | struct hvn_nvs_ndis_init { |
--- 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 | */ |
--- 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 | * |
--- 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 | |||
2278 | void * | 2278 | void * | |
2279 | isp_find_xs_tgt(ispsoftc_t *isp, uint32_t handle) | 2279 | isp_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); |
--- 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) */ |
--- 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); |
--- 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. |
--- 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); |
--- 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 | |||
63 | dev_type_open(panic_string_open); | 63 | dev_type_open(panic_string_open); | |
64 | dev_type_close(panic_string_close); | 64 | dev_type_close(panic_string_close); | |
65 | dev_type_write(panic_string_write); | 65 | dev_type_write(panic_string_write); | |
66 | 66 | |||
67 | static struct cdevsw panic_string_cdevsw = { | 67 | static 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, |
--- 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 */ |
--- 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 | |||
95 | struct nfsnode_spec { | 95 | struct 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 | |||
100 | struct nfsnode_reg { | 100 | struct 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 | |||
110 | struct nfsnode_dir { | 110 | struct 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 */ |
--- 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 | |||
130 | test_case shadow_instance pass "Checks correct handling of shadowed instances" | 130 | test_case shadow_instance pass "Checks correct handling of shadowed instances" | |
131 | test_case loop pass "Checks correct handling of loops" | 131 | test_case loop pass "Checks correct handling of loops" | |
132 | test_case loop2 pass "Checks correct handling of devices that can be their" \ | 132 | test_case loop2 pass "Checks correct handling of devices that can be their" \ | |
133 | "own parents" | 133 | "own parents" | |
134 | test_case pseudo_parent pass "Checks correct handling of children of pseudo" \ | 134 | test_case pseudo_parent pass "Checks correct handling of children of pseudo" \ | |
135 | "devices (PR/32329)" | 135 | "devices (PR/32329)" | |
136 | test_case postponed_orphan fail "Checks that config catches adding an" \ | 136 | test_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" | |
138 | test_case no_pseudo fail "Checks that config catches ommited 'pseudo-device'" \ | 138 | test_case no_pseudo fail "Checks that config catches omitted 'pseudo-device'" \ | |
139 | "as error (PR/34111)" | 139 | "as error (PR/34111)" | |
140 | test_case deffs_redef fail "Checks that config doesn't allow a deffs to use" \ | 140 | test_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. | |
144 | undefined_opt_config_str=" | 144 | undefined_opt_config_str=" | |
145 | include \"${srcdir}/d_min\" | 145 | include \"${srcdir}/d_min\" | |
146 | options UNDEFINED | 146 | options UNDEFINED | |
147 | " | 147 | " | |
148 | test_case undefined_opt pass \ | 148 | test_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. |
--- 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; |