CVS commit: src/sys/fs/autofs
Module Name:src Committed By: tkusumi Date: Sat Nov 16 09:22:00 UTC 2019 Modified Files: src/sys/fs/autofs: autofs_vfsops.c Log Message: autofs: Fix change by r1.3 "prevent assert on unmount." Must delete all nodes on unmount, otherwise automounts with >1 level of directories can't be deleted. taken-from: FreeBSD and DragonFlyBSD To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/fs/autofs/autofs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/fs/autofs
Module Name:src Committed By: tkusumi Date: Sat Nov 16 09:22:00 UTC 2019 Modified Files: src/sys/fs/autofs: autofs_vfsops.c Log Message: autofs: Fix change by r1.3 "prevent assert on unmount." Must delete all nodes on unmount, otherwise automounts with >1 level of directories can't be deleted. taken-from: FreeBSD and DragonFlyBSD To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/fs/autofs/autofs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/autofs/autofs_vfsops.c diff -u src/sys/fs/autofs/autofs_vfsops.c:1.5 src/sys/fs/autofs/autofs_vfsops.c:1.6 --- src/sys/fs/autofs/autofs_vfsops.c:1.5 Thu Nov 14 08:45:24 2019 +++ src/sys/fs/autofs/autofs_vfsops.c Sat Nov 16 09:22:00 2019 @@ -33,7 +33,7 @@ * */ #include -__KERNEL_RCSID(0, "$NetBSD: autofs_vfsops.c,v 1.5 2019/11/14 08:45:24 tkusumi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autofs_vfsops.c,v 1.6 2019/11/16 09:22:00 tkusumi Exp $"); #include "autofs.h" @@ -232,13 +232,14 @@ autofs_unmount(struct mount *mp, int mnt mutex_enter(&->am_lock); while (!RB_EMPTY(&->am_root->an_children)) { struct autofs_node *anp; + /* + * Force delete all nodes when more than one level of + * directories are created via indirect map. Autofs doesn't + * support rmdir(2), thus this is the only way to get out. + */ anp = RB_MIN(autofs_node_tree, &->am_root->an_children); - if (!RB_EMPTY(&anp->an_children)) { - AUTOFS_DEBUG("%s: %s has children", __func__, - anp->an_name); - mutex_exit(&->am_lock); - return EBUSY; - } + while (!RB_EMPTY(&anp->an_children)) + anp = RB_MIN(autofs_node_tree, &anp->an_children); autofs_node_delete(anp); } autofs_node_delete(amp->am_root);
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Sat Nov 16 10:05:44 UTC 2019 Modified Files: src/sys/kern: vfs_subr.c Log Message: Add a NULL check on the structure (same logic as my previous change in this file). For clarity, and to appease kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.473 -r1.474 src/sys/kern/vfs_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_subr.c diff -u src/sys/kern/vfs_subr.c:1.473 src/sys/kern/vfs_subr.c:1.474 --- src/sys/kern/vfs_subr.c:1.473 Fri Nov 15 15:51:57 2019 +++ src/sys/kern/vfs_subr.c Sat Nov 16 10:05:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.473 2019/11/15 15:51:57 maxv Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.474 2019/11/16 10:05:44 maxv Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.473 2019/11/15 15:51:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.474 2019/11/16 10:05:44 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -799,7 +799,8 @@ sched_sync(void *arg) * XXX The vnode may have been recycled, in which * case it may have a new identity. */ - if (VIMPL_TO_VNODE(TAILQ_FIRST(slp)) == vp) { + vi = TAILQ_FIRST(slp); + if (vi != NULL && VIMPL_TO_VNODE(vi) == vp) { /* * Put us back on the worklist. The worklist * routine will remove us from our current
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Sat Nov 16 10:05:44 UTC 2019 Modified Files: src/sys/kern: vfs_subr.c Log Message: Add a NULL check on the structure (same logic as my previous change in this file). For clarity, and to appease kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.473 -r1.474 src/sys/kern/vfs_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Sat Nov 16 10:07:53 UTC 2019 Modified Files: src/sys/kern: vfs_mount.c Log Message: NULL-check the structure pointer, not the address of its first field. Also add KASSERT. For clarity, and to appease kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/kern/vfs_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_mount.c diff -u src/sys/kern/vfs_mount.c:1.71 src/sys/kern/vfs_mount.c:1.72 --- src/sys/kern/vfs_mount.c:1.71 Mon Aug 19 09:32:42 2019 +++ src/sys/kern/vfs_mount.c Sat Nov 16 10:07:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_mount.c,v 1.71 2019/08/19 09:32:42 christos Exp $ */ +/* $NetBSD: vfs_mount.c,v 1.72 2019/11/16 10:07:53 maxv Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.71 2019/08/19 09:32:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.72 2019/11/16 10:07:53 maxv Exp $"); #include #include @@ -420,11 +420,12 @@ vfs_vnode_iterator_next1(struct vnode_it TAILQ_REMOVE(&mp->mnt_vnodelist, mvip, vi_mntvnodes); VIMPL_TO_VNODE(mvip)->v_usecount = 0; again: - vp = VIMPL_TO_VNODE(vip); - if (vp == NULL) { + if (vip == NULL) { mutex_exit(&mntvnode_lock); return NULL; } + vp = VIMPL_TO_VNODE(vip); + KASSERT(vp != NULL); mutex_enter(vp->v_interlock); if (vnis_marker(vp) || vdead_check(vp, (do_wait ? 0 : VDEAD_NOWAIT)) ||
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Sat Nov 16 10:07:53 UTC 2019 Modified Files: src/sys/kern: vfs_mount.c Log Message: NULL-check the structure pointer, not the address of its first field. Also add KASSERT. For clarity, and to appease kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/kern/vfs_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Sat Nov 16 10:15:10 UTC 2019 Modified Files: src/sys/netinet: tcp_input.c Log Message: Call rtcache_unref() only when the checks succeed, instead of relying on another NULL check in rtcache_unref(). Because, in order to resolve the address of the second argument, we do a dereference on 'tp', which is theoretically allowed to be NULL. The five callers of nd6_hint() never pass a NULL argument however, so by luck the actual NULL deref never happens. Maybe the NULL check on 'tp' in should be replaced to a KASSERT ensuring it isn't NULL, for clarity. Reported by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.416 -r1.417 src/sys/netinet/tcp_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet
Module Name:src Committed By: maxv Date: Sat Nov 16 10:15:10 UTC 2019 Modified Files: src/sys/netinet: tcp_input.c Log Message: Call rtcache_unref() only when the checks succeed, instead of relying on another NULL check in rtcache_unref(). Because, in order to resolve the address of the second argument, we do a dereference on 'tp', which is theoretically allowed to be NULL. The five callers of nd6_hint() never pass a NULL argument however, so by luck the actual NULL deref never happens. Maybe the NULL check on 'tp' in should be replaced to a KASSERT ensuring it isn't NULL, for clarity. Reported by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.416 -r1.417 src/sys/netinet/tcp_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/tcp_input.c diff -u src/sys/netinet/tcp_input.c:1.416 src/sys/netinet/tcp_input.c:1.417 --- src/sys/netinet/tcp_input.c:1.416 Wed Sep 25 19:06:30 2019 +++ src/sys/netinet/tcp_input.c Sat Nov 16 10:15:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.416 2019/09/25 19:06:30 jnemeth Exp $ */ +/* $NetBSD: tcp_input.c,v 1.417 2019/11/16 10:15:10 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.416 2019/09/25 19:06:30 jnemeth Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.417 2019/11/16 10:15:10 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -260,9 +260,10 @@ nd6_hint(struct tcpcb *tp) struct rtentry *rt = NULL; if (tp != NULL && tp->t_in6pcb != NULL && tp->t_family == AF_INET6 && - (rt = rtcache_validate(&tp->t_in6pcb->in6p_route)) != NULL) + (rt = rtcache_validate(&tp->t_in6pcb->in6p_route)) != NULL) { nd6_nud_hint(rt); - rtcache_unref(rt, &tp->t_in6pcb->in6p_route); + rtcache_unref(rt, &tp->t_in6pcb->in6p_route); + } } #else static inline void
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Sat Nov 16 10:19:29 UTC 2019 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: Add a NULL check on the structure pointer, not to retrieve its first field if it is NULL. The previous code was not buggy strictly speaking. This change probably doesn't change anything, except removing assumptions in the compiler optimization passes, which too probably doesn't change anything in this case. Reported-by: syzbot+110b29c1973f38a38...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.340 -r1.341 src/sys/arch/x86/x86/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Sat Nov 16 10:19:29 UTC 2019 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: Add a NULL check on the structure pointer, not to retrieve its first field if it is NULL. The previous code was not buggy strictly speaking. This change probably doesn't change anything, except removing assumptions in the compiler optimization passes, which too probably doesn't change anything in this case. Reported-by: syzbot+110b29c1973f38a38...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.340 -r1.341 src/sys/arch/x86/x86/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.340 src/sys/arch/x86/x86/pmap.c:1.341 --- src/sys/arch/x86/x86/pmap.c:1.340 Thu Nov 14 17:09:23 2019 +++ src/sys/arch/x86/x86/pmap.c Sat Nov 16 10:19:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.340 2019/11/14 17:09:23 maxv Exp $ */ +/* $NetBSD: pmap.c,v 1.341 2019/11/16 10:19:29 maxv Exp $ */ /* * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -130,7 +130,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.340 2019/11/14 17:09:23 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.341 2019/11/16 10:19:29 maxv Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -541,6 +541,8 @@ static inline struct pv_pte * pve_to_pvpte(struct pv_entry *pve) { + if (pve == NULL) + return NULL; KASSERT((void *)&pve->pve_pte == (void *)pve); return &pve->pve_pte; }
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sat Nov 16 10:22:20 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: i386 -> GCC 8. To generate a diff of this commit: cvs rdiff -u -r1.1160 -r1.1161 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1160 src/share/mk/bsd.own.mk:1.1161 --- src/share/mk/bsd.own.mk:1.1160 Wed Nov 13 22:32:16 2019 +++ src/share/mk/bsd.own.mk Sat Nov 16 10:22:20 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1160 2019/11/13 22:32:16 joerg Exp $ +# $NetBSD: bsd.own.mk,v 1.1161 2019/11/16 10:22:20 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -64,6 +64,7 @@ TOOLCHAIN_MISSING?= no # What GCC is used? # .if ${MACHINE} == "amd64" || \ +${MACHINE} == "i386" || \ ${MACHINE_CPU} == "aarch64" HAVE_GCC?= 8 .else
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sat Nov 16 10:22:20 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: i386 -> GCC 8. To generate a diff of this commit: cvs rdiff -u -r1.1160 -r1.1161 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sat Nov 16 10:23:36 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: sparc & sparc64 -> GCC 8. To generate a diff of this commit: cvs rdiff -u -r1.1161 -r1.1162 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sat Nov 16 10:23:36 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: sparc & sparc64 -> GCC 8. To generate a diff of this commit: cvs rdiff -u -r1.1161 -r1.1162 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1161 src/share/mk/bsd.own.mk:1.1162 --- src/share/mk/bsd.own.mk:1.1161 Sat Nov 16 10:22:20 2019 +++ src/share/mk/bsd.own.mk Sat Nov 16 10:23:36 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1161 2019/11/16 10:22:20 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.1162 2019/11/16 10:23:36 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -65,6 +65,8 @@ TOOLCHAIN_MISSING?= no # .if ${MACHINE} == "amd64" || \ ${MACHINE} == "i386" || \ +${MACHINE} == "sparc" || \ +${MACHINE} == "sparc64" || \ ${MACHINE_CPU} == "aarch64" HAVE_GCC?= 8 .else
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Sat Nov 16 11:50:58 UTC 2019 Modified Files: src/external/gpl3/gcc: README.gcc8 Log Message: note i386 and sparc* conversion. note arm32 issues. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/README.gcc8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Sat Nov 16 11:50:58 UTC 2019 Modified Files: src/external/gpl3/gcc: README.gcc8 Log Message: note i386 and sparc* conversion. note arm32 issues. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/README.gcc8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/README.gcc8 diff -u src/external/gpl3/gcc/README.gcc8:1.3 src/external/gpl3/gcc/README.gcc8:1.4 --- src/external/gpl3/gcc/README.gcc8:1.3 Sun Nov 10 10:31:38 2019 +++ src/external/gpl3/gcc/README.gcc8 Sat Nov 16 11:50:58 2019 @@ -1,4 +1,4 @@ -$NetBSD: README.gcc8,v 1.3 2019/11/10 10:31:38 mrg Exp $ +$NetBSD: README.gcc8,v 1.4 2019/11/16 11:50:58 mrg Exp $ new stuff: cc1objcplus @@ -28,7 +28,7 @@ architecture tools kernels libgcc native - --- -- -- --- aarch64 y y y y y y y y alpha y y y y y ? ? ? -earmv4 y ? ? y ? ? ? ? +earmv4 y y y y ? ? ? ? earmv4eb y ? ? y ? ? ? ? earm y ? ? y ? ? ? ? earmeb y ? ? y ? ? ? ? @@ -40,10 +40,10 @@ earmv6hf y ? ? y ? ? ? ? earmv6hfeb y ? ? y ? ? ? ? earmv7 y ? ? y ? ? ? ? earmv7eb y ? ? y ? ? ? ? -earmv7hf y ? ? y ? ? ? ? +earmv7hf y y y y y y n[3] n earmv7hfeb y ? ? y ? ? ? ? hppa y ? ? y ? ? ? ? -i386 y ? ? y ? ? ? ? +i386 y y y y y y y y ia64 y ? ? y ? ? ? ? m68000 y ? ? y ? ? ? ? m68k y ? ? y ? ? ? ? @@ -55,8 +55,8 @@ powerpc y y y y y y y[1] ? powerpc64 y ? y y y ? ? ? sh3eb y ? ? y ? ? ? ? sh3el y ? ? y ? ? ? ? -sparc y y y y y y ? ? -sparc64 y ? ? y ? ? ? ? +sparc y y y y y y y y +sparc64 y y y y y y y y vax y ? ? y ? ? ? ? x86_64 y y y y y y y y riscv32 y ? ? y ? ? ? ? @@ -68,6 +68,7 @@ architecture tools kernels libgcc native [1] - many ipsec atf and c++ failures [2] - lots of failures, no idea if bad +[3] - c++ exceptions are broken, all arm CPU vs platform test table (for CPUs with multiple ports). this is "make release" or just kernels. values: y (yes), k (kernels only), n (failed), r (running), ? (not attempted)
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: tkusumi Date: Sat Nov 16 11:56:29 UTC 2019 Modified Files: src/usr.sbin/autofs: common.c Log Message: autofs: Remove unneeded header include common.c doesn't depend on autofs or its ioctls. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/common.c diff -u src/usr.sbin/autofs/common.c:1.1 src/usr.sbin/autofs/common.c:1.2 --- src/usr.sbin/autofs/common.c:1.1 Tue Jan 9 03:31:15 2018 +++ src/usr.sbin/autofs/common.c Sat Nov 16 11:56:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.1 2018/01/09 03:31:15 christos Exp $ */ +/* $NetBSD: common.c,v 1.2 2019/11/16 11:56:29 tkusumi Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ * $FreeBSD: head/usr.sbin/autofs/common.c 303527 2016-07-30 01:10:05Z bapt $ */ #include -__RCSID("$NetBSD: common.c,v 1.1 2018/01/09 03:31:15 christos Exp $"); +__RCSID("$NetBSD: common.c,v 1.2 2019/11/16 11:56:29 tkusumi Exp $"); #include #include @@ -50,7 +50,6 @@ __RCSID("$NetBSD: common.c,v 1.1 2018/01 #include #include #include -#include #include "common.h"
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: tkusumi Date: Sat Nov 16 11:56:29 UTC 2019 Modified Files: src/usr.sbin/autofs: common.c Log Message: autofs: Remove unneeded header include common.c doesn't depend on autofs or its ioctls. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: tkusumi Date: Sat Nov 16 12:21:06 UTC 2019 Modified Files: src/usr.sbin/autofs: common.c Log Message: autofs: Fix segfault that could occur on "automount -LL" To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/autofs/common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: tkusumi Date: Sat Nov 16 12:21:06 UTC 2019 Modified Files: src/usr.sbin/autofs: common.c Log Message: autofs: Fix segfault that could occur on "automount -LL" To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/autofs/common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/common.c diff -u src/usr.sbin/autofs/common.c:1.2 src/usr.sbin/autofs/common.c:1.3 --- src/usr.sbin/autofs/common.c:1.2 Sat Nov 16 11:56:29 2019 +++ src/usr.sbin/autofs/common.c Sat Nov 16 12:21:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.2 2019/11/16 11:56:29 tkusumi Exp $ */ +/* $NetBSD: common.c,v 1.3 2019/11/16 12:21:06 tkusumi Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ * $FreeBSD: head/usr.sbin/autofs/common.c 303527 2016-07-30 01:10:05Z bapt $ */ #include -__RCSID("$NetBSD: common.c,v 1.2 2019/11/16 11:56:29 tkusumi Exp $"); +__RCSID("$NetBSD: common.c,v 1.3 2019/11/16 12:21:06 tkusumi Exp $"); #include #include @@ -357,7 +357,7 @@ expand_ampersand(char *string, const cha * of characters before the '&'. */ before_len = i; - //assert(i + 1 < strlen(string)); + //assert(i < strlen(string)); ret = asprintf(&expanded, "%.*s%s%s", (int)before_len, string, key, string + before_len + 1); @@ -372,6 +372,8 @@ expand_ampersand(char *string, const cha */ string = expanded; i = before_len + strlen(key); + if (i == strlen(string)) + break; backslashed = false; //assert(i < strlen(string)); }
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: tkusumi Date: Sat Nov 16 12:26:54 UTC 2019 Modified Files: src/usr.sbin/autofs: auto_master.5 defined.c Log Message: autofs: Support DOLLAR for $ literal taken-from FreeBSD and DragonFlyBSD To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/autofs/auto_master.5 cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/defined.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/auto_master.5 diff -u src/usr.sbin/autofs/auto_master.5:1.6 src/usr.sbin/autofs/auto_master.5:1.7 --- src/usr.sbin/autofs/auto_master.5:1.6 Thu Jan 25 19:15:10 2018 +++ src/usr.sbin/autofs/auto_master.5 Sat Nov 16 12:26:54 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: auto_master.5,v 1.6 2018/01/25 19:15:10 uwe Exp $ +.\" $NetBSD: auto_master.5,v 1.7 2019/11/16 12:26:54 tkusumi Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 25, 2017 +.Dd November 16, 2019 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -195,6 +195,8 @@ Expands to the output of .It Dv CPU Same as .Dv ARCH . +.It Dv DOLLAR +A literal $ sign. .It Dv HOST Expands to the output of .Li "uname -n" . Index: src/usr.sbin/autofs/defined.c diff -u src/usr.sbin/autofs/defined.c:1.1 src/usr.sbin/autofs/defined.c:1.2 --- src/usr.sbin/autofs/defined.c:1.1 Tue Jan 9 03:31:15 2018 +++ src/usr.sbin/autofs/defined.c Sat Nov 16 12:26:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: defined.c,v 1.1 2018/01/09 03:31:15 christos Exp $ */ +/* $NetBSD: defined.c,v 1.2 2019/11/16 12:26:54 tkusumi Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ * */ #include -__RCSID("$NetBSD: defined.c,v 1.1 2018/01/09 03:31:15 christos Exp $"); +__RCSID("$NetBSD: defined.c,v 1.2 2019/11/16 12:26:54 tkusumi Exp $"); /* * All the "defined" stuff is for handling variables, @@ -256,6 +256,7 @@ defined_init(void) defined_add("ARCH", name.machine); defined_add("CPU", name.machine); + defined_add("DOLLAR", "$"); defined_add("HOST", name.nodename); defined_add("OSNAME", name.sysname); defined_add("OSREL", name.release);
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: tkusumi Date: Sat Nov 16 12:26:54 UTC 2019 Modified Files: src/usr.sbin/autofs: auto_master.5 defined.c Log Message: autofs: Support DOLLAR for $ literal taken-from FreeBSD and DragonFlyBSD To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/autofs/auto_master.5 cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/defined.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jmcneill Date: Sat Nov 16 12:47:47 UTC 2019 Modified Files: src/sys/dev/fdt: ausoc.c Log Message: Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/ausoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/fdt/ausoc.c diff -u src/sys/dev/fdt/ausoc.c:1.4 src/sys/dev/fdt/ausoc.c:1.5 --- src/sys/dev/fdt/ausoc.c:1.4 Wed May 8 13:40:18 2019 +++ src/sys/dev/fdt/ausoc.c Sat Nov 16 12:47:47 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ausoc.c,v 1.4 2019/05/08 13:40:18 isaki Exp $ */ +/* $NetBSD: ausoc.c,v 1.5 2019/11/16 12:47:47 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ausoc.c,v 1.4 2019/05/08 13:40:18 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ausoc.c,v 1.5 2019/11/16 12:47:47 jmcneill Exp $"); #include #include @@ -121,8 +121,22 @@ ausoc_set_format(void *priv, int setmode audio_filter_reg_t *pfil, audio_filter_reg_t *rfil) { struct ausoc_link * const link = priv; + const audio_params_t *params = (setmode & AUMODE_PLAY) != 0 ? + play : rec; int error; + if (link->link_mclk_fs) { + const u_int rate = params->sample_rate * link->link_mclk_fs; + error = audio_dai_set_sysclk(link->link_codec, rate, + AUDIO_DAI_CLOCK_IN); + if (error) + return error; + error = audio_dai_set_sysclk(link->link_cpu, rate, + AUDIO_DAI_CLOCK_OUT); + if (error) + return error; + } + error = audio_dai_mi_set_format(link->link_cpu, setmode, play, rec, pfil, rfil); if (error) @@ -246,20 +260,8 @@ ausoc_trigger_output(void *priv, void *s void (*intr)(void *), void *intrarg, const audio_params_t *params) { struct ausoc_link * const link = priv; - u_int n, rate; int error; - - if (link->link_mclk_fs) { - rate = params->sample_rate * link->link_mclk_fs; - error = audio_dai_set_sysclk(link->link_codec, rate, - AUDIO_DAI_CLOCK_IN); - if (error) - goto failed; - error = audio_dai_set_sysclk(link->link_cpu, rate, - AUDIO_DAI_CLOCK_OUT); - if (error) - goto failed; - } + u_int n; for (n = 0; n < link->link_naux; n++) { error = audio_dai_trigger(link->link_aux[n], start, end, @@ -285,20 +287,8 @@ ausoc_trigger_input(void *priv, void *st void (*intr)(void *), void *intrarg, const audio_params_t *params) { struct ausoc_link * const link = priv; - u_int n, rate; int error; - - if (link->link_mclk_fs) { - rate = params->sample_rate * link->link_mclk_fs; - error = audio_dai_set_sysclk(link->link_codec, rate, - AUDIO_DAI_CLOCK_IN); - if (error) - goto failed; - error = audio_dai_set_sysclk(link->link_cpu, rate, - AUDIO_DAI_CLOCK_OUT); - if (error) - goto failed; - } + u_int n; for (n = 0; n < link->link_naux; n++) { error = audio_dai_trigger(link->link_aux[n], start, end,
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jmcneill Date: Sat Nov 16 12:47:47 UTC 2019 Modified Files: src/sys/dev/fdt: ausoc.c Log Message: Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/ausoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Sat Nov 16 12:50:08 UTC 2019 Modified Files: src/sys/dev/ic: dw_hdmi.c dw_hdmi.h Log Message: Add I2S audio input support. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/dw_hdmi.c src/sys/dev/ic/dw_hdmi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/dw_hdmi.c diff -u src/sys/dev/ic/dw_hdmi.c:1.2 src/sys/dev/ic/dw_hdmi.c:1.3 --- src/sys/dev/ic/dw_hdmi.c:1.2 Sat Nov 9 23:27:50 2019 +++ src/sys/dev/ic/dw_hdmi.c Sat Nov 16 12:50:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dw_hdmi.c,v 1.2 2019/11/09 23:27:50 jmcneill Exp $ */ +/* $NetBSD: dw_hdmi.c,v 1.3 2019/11/16 12:50:08 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v 1.2 2019/11/09 23:27:50 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v 1.3 2019/11/16 12:50:08 jmcneill Exp $"); #include #include @@ -45,6 +45,8 @@ __KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v #include #include +#include + #include #include #include @@ -52,6 +54,8 @@ __KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v #define HDMI_DESIGN_ID 0x #define HDMI_REVISION_ID 0x0001 +#define HDMI_CONFIG0_ID 0x0004 +#define HDMI_CONFIG0_ID_AUDI2S __BIT(4) #define HDMI_CONFIG2_ID 0x0006 #define HDMI_IH_I2CM_STAT0 0x0105 @@ -131,6 +135,10 @@ __KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v #define HDMI_FC_CH1PREAM_DEFAULT 0x16 #define HDMI_FC_CH2PREAM 0x1016 #define HDMI_FC_CH2PREAM_DEFAULT 0x21 +#define HDMI_FC_AUDCONF0 0x1025 +#define HDMI_FC_AUDCONF1 0x1026 +#define HDMI_FC_AUDCONF2 0x1027 +#define HDMI_FC_AUDCONF3 0x1028 #define HDMI_PHY_CONF0 0x3000 #define HDMI_PHY_CONF0_PDZ __BIT(7) @@ -149,6 +157,28 @@ __KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v #define HDMI_PHY_STAT0_HPD __BIT(1) #define HDMI_PHY_STAT0_TX_PHY_LOCK __BIT(0) +#define HDMI_AUD_CONF0 0x3100 +#define HDMI_AUD_CONF0_SW_AUDIO_FIFO_RST __BIT(7) +#define HDMI_AUD_CONF0_I2S_SELECT __BIT(5) +#define HDMI_AUD_CONF0_I2S_IN_EN __BITS(3,0) +#define HDMI_AUD_CONF1 0x3101 +#define HDMI_AUD_CONF1_I2S_WIDTH __BITS(4,0) +#define HDMI_AUD_INT 0x3102 +#define HDMI_AUD_CONF2 0x3103 +#define HDMI_AUD_CONF2_INSERT_PCUV __BIT(2) +#define HDMI_AUD_CONF2_NLPCM __BIT(1) +#define HDMI_AUD_CONF2_HBR __BIT(0) +#define HDMI_AUD_INT1 0x3104 + +#define HDMI_AUD_N1 0x3200 +#define HDMI_AUD_N2 0x3201 +#define HDMI_AUD_N3 0x3202 +#define HDMI_AUD_CTS1 0x3203 +#define HDMI_AUD_CTS2 0x3204 +#define HDMI_AUD_CTS3 0x3205 +#define HDMI_AUD_INPUTCLKFS 0x3206 +#define HDMI_AUD_INPUTCLKFS_IFSFACTOR __BITS(2,0) + #define HDMI_MC_CLKDIS 0x4001 #define HDMI_MC_CLKDIS_HDCPCLK_DISABLE __BIT(6) #define HDMI_MC_CLKDIS_CECCLK_DISABLE __BIT(5) @@ -210,6 +240,16 @@ __KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v #define HDMI_I2CM_SOFTRSTZ_I2C_SOFTRST __BIT(0) #define HDMI_I2CM_SEGPTR 0x7e0a +enum dwhdmi_dai_mixer_ctrl { + DWHDMI_DAI_OUTPUT_CLASS, + DWHDMI_DAI_INPUT_CLASS, + + DWHDMI_DAI_OUTPUT_MASTER_VOLUME, + DWHDMI_DAI_INPUT_DAC_VOLUME, + + DWHDMI_DAI_MIXER_CTRL_LAST +}; + static int dwhdmi_ddc_acquire_bus(void *priv, int flags) { @@ -433,7 +473,6 @@ dwhdmi_fc_init(struct dwhdmi_softc *sc, static void dwhdmi_mc_init(struct dwhdmi_softc *sc) { - struct dwhdmi_connector *dwhdmi_connector = &sc->sc_connector; uint8_t val; u_int n, iter; @@ -445,8 +484,6 @@ dwhdmi_mc_init(struct dwhdmi_softc *sc) HDMI_MC_CLKDIS_CECCLK_DISABLE | HDMI_MC_CLKDIS_CSCCLK_DISABLE | HDMI_MC_CLKDIS_PREPCLK_DISABLE; - if (!dwhdmi_connector->monitor_audio) - val |= HDMI_MC_CLKDIS_AUDCLK_DISABLE; dwhdmi_write(sc, HDMI_MC_CLKDIS, val); /* Soft reset TMDS */ @@ -467,6 +504,59 @@ dwhdmi_mc_disable(struct dwhdmi_softc *s dwhdmi_write(sc, HDMI_MC_CLKDIS, 0xff); } +static void +dwhdmi_audio_init(struct dwhdmi_softc *sc) +{ + uint8_t val; + u_int n; + + /* The following values are for 48 kHz */ + switch (sc->sc_curmode.clock) { + case 25170: + n = 6864; + break; + case 74170: + n = 11648; + break; + case 148350: + n = 5824; + break; + default: + n = 6144; + break; + } + + /* Use automatic CTS generation */ + dwhdmi_write(sc, HDMI_AUD_CTS1, 0); + dwhdmi_write(sc, HDMI_AUD_CTS2, 0); + dwhdmi_write(sc, HDMI_AUD_CTS3, 0); + + /* Set N factor for audio clock regeneration */ + dwhdmi_write(sc, HDMI_AUD_N1, n & 0xff); + dwhdmi_write(sc, HDMI_AUD_N2, (n >> 8) & 0xff); + dwhdmi_write(sc, HDMI_AUD_N3, (n >> 16) & 0xff); + + val = dwhdmi_read(sc, HDMI_AUD_CONF0); + val |= HDMI_AUD_CONF0_I2S_SELECT; /* XXX i2s mode */ + val &= ~HDMI_AUD_CONF0_I2S_IN_EN; + val |= __SHIFTIN(1, HDMI_AUD_CONF0_I2S_IN_EN); /* XXX 2ch */ + dwhdmi_write(sc, HDMI_AUD_CONF0, val); + + val = __SHIFTIN(16, HDMI_AUD_CONF1_I2S_WIDTH); + dwhdmi_write(sc, HDMI_AUD_CONF1, val); + + dwhdmi_write(sc, HDMI_AUD_INPUTCLKFS, 4); /* XXX 64 F
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Sat Nov 16 12:50:08 UTC 2019 Modified Files: src/sys/dev/ic: dw_hdmi.c dw_hdmi.h Log Message: Add I2S audio input support. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/dw_hdmi.c src/sys/dev/ic/dw_hdmi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:10:07 UTC 2019 Modified Files: src/sys/dev/ic: dw_hdmi.c dw_hdmi.h Log Message: Add software volume controls. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/dw_hdmi.c src/sys/dev/ic/dw_hdmi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:10:07 UTC 2019 Modified Files: src/sys/dev/ic: dw_hdmi.c dw_hdmi.h Log Message: Add software volume controls. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/dw_hdmi.c src/sys/dev/ic/dw_hdmi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/dw_hdmi.c diff -u src/sys/dev/ic/dw_hdmi.c:1.3 src/sys/dev/ic/dw_hdmi.c:1.4 --- src/sys/dev/ic/dw_hdmi.c:1.3 Sat Nov 16 12:50:08 2019 +++ src/sys/dev/ic/dw_hdmi.c Sat Nov 16 13:10:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dw_hdmi.c,v 1.3 2019/11/16 12:50:08 jmcneill Exp $ */ +/* $NetBSD: dw_hdmi.c,v 1.4 2019/11/16 13:10:07 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v 1.3 2019/11/16 12:50:08 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dw_hdmi.c,v 1.4 2019/11/16 13:10:07 jmcneill Exp $"); #include #include @@ -752,12 +752,47 @@ dwhdmi_dai_add_device(audio_dai_tag_t da return 0; } +static void +dwhdmi_audio_swvol_codec(audio_filter_arg_t *arg) +{ + struct dwhdmi_softc * const sc = arg->context; + const aint_t *src; + aint_t *dst; + u_int sample_count; + u_int i; + + src = arg->src; + dst = arg->dst; + sample_count = arg->count * arg->srcfmt->channels; + for (i = 0; i < sample_count; i++) { + aint2_t v = (aint2_t)(*src++); + v = v * sc->sc_swvol / 255; + *dst++ = (aint_t)v; + } +} + +static int +dwhdmi_audio_set_format(void *priv, int setmode, +const audio_params_t *play, const audio_params_t *rec, +audio_filter_reg_t *pfil, audio_filter_reg_t *rfil) +{ + struct dwhdmi_softc * const sc = priv; + + pfil->codec = dwhdmi_audio_swvol_codec; + pfil->context = sc; + + return 0; +} + static int -dwhdmi_dai_set_port(void *priv, mixer_ctrl_t *mc) +dwhdmi_audio_set_port(void *priv, mixer_ctrl_t *mc) { + struct dwhdmi_softc * const sc = priv; + switch (mc->dev) { case DWHDMI_DAI_OUTPUT_MASTER_VOLUME: case DWHDMI_DAI_INPUT_DAC_VOLUME: + sc->sc_swvol = mc->un.value.level[AUDIO_MIXER_LEVEL_LEFT]; return 0; default: return ENXIO; @@ -765,13 +800,15 @@ dwhdmi_dai_set_port(void *priv, mixer_ct } static int -dwhdmi_dai_get_port(void *priv, mixer_ctrl_t *mc) +dwhdmi_audio_get_port(void *priv, mixer_ctrl_t *mc) { + struct dwhdmi_softc * const sc = priv; + switch (mc->dev) { case DWHDMI_DAI_OUTPUT_MASTER_VOLUME: case DWHDMI_DAI_INPUT_DAC_VOLUME: - mc->un.value.level[AUDIO_MIXER_LEVEL_LEFT] = 255; - mc->un.value.level[AUDIO_MIXER_LEVEL_RIGHT] = 255; + mc->un.value.level[AUDIO_MIXER_LEVEL_LEFT] = sc->sc_swvol; + mc->un.value.level[AUDIO_MIXER_LEVEL_RIGHT] = sc->sc_swvol; return 0; default: return ENXIO; @@ -779,7 +816,7 @@ dwhdmi_dai_get_port(void *priv, mixer_ct } static int -dwhdmi_dai_query_devinfo(void *priv, mixer_devinfo_t *di) +dwhdmi_audio_query_devinfo(void *priv, mixer_devinfo_t *di) { switch (di->index) { case DWHDMI_DAI_OUTPUT_CLASS: @@ -822,9 +859,10 @@ dwhdmi_dai_query_devinfo(void *priv, mix } static const struct audio_hw_if dwhdmi_dai_hw_if = { - .set_port = dwhdmi_dai_set_port, - .get_port = dwhdmi_dai_get_port, - .query_devinfo = dwhdmi_dai_query_devinfo, + .set_format = dwhdmi_audio_set_format, + .set_port = dwhdmi_audio_set_port, + .get_port = dwhdmi_audio_get_port, + .query_devinfo = dwhdmi_audio_query_devinfo, }; int @@ -849,6 +887,8 @@ dwhdmi_attach(struct dwhdmi_softc *sc) sc->sc_version >> 12, sc->sc_version & 0xfff, sc->sc_phytype); + sc->sc_swvol = 255; + /* * If a DDC i2c bus tag is provided by the caller, use it. Otherwise, * use the I2C master built-in to DWC HDMI. Index: src/sys/dev/ic/dw_hdmi.h diff -u src/sys/dev/ic/dw_hdmi.h:1.3 src/sys/dev/ic/dw_hdmi.h:1.4 --- src/sys/dev/ic/dw_hdmi.h:1.3 Sat Nov 16 12:50:08 2019 +++ src/sys/dev/ic/dw_hdmi.h Sat Nov 16 13:10:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dw_hdmi.h,v 1.3 2019/11/16 12:50:08 jmcneill Exp $ */ +/* $NetBSD: dw_hdmi.h,v 1.4 2019/11/16 13:10:07 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -76,6 +76,7 @@ struct dwhdmi_softc { struct i2c_controller sc_ic_builtin; struct audio_dai_device sc_dai; + uint8_t sc_swvol; struct dwhdmi_connector sc_connector; struct drm_bridge sc_bridge;
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:23:13 UTC 2019 Modified Files: src/sys/arch/arm/rockchip: rk3399_cru.c rk_cru.h rk_cru_composite.c Log Message: Add support for I2S clocks. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/rockchip/rk3399_cru.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/rockchip/rk_cru.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/rockchip/rk_cru_composite.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/rockchip/rk3399_cru.c diff -u src/sys/arch/arm/rockchip/rk3399_cru.c:1.12 src/sys/arch/arm/rockchip/rk3399_cru.c:1.13 --- src/sys/arch/arm/rockchip/rk3399_cru.c:1.12 Sun Nov 10 11:43:04 2019 +++ src/sys/arch/arm/rockchip/rk3399_cru.c Sat Nov 16 13:23:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rk3399_cru.c,v 1.12 2019/11/10 11:43:04 jmcneill Exp $ */ +/* $NetBSD: rk3399_cru.c,v 1.13 2019/11/16 13:23:13 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: rk3399_cru.c,v 1.12 2019/11/10 11:43:04 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: rk3399_cru.c,v 1.13 2019/11/16 13:23:13 jmcneill Exp $"); #include #include @@ -361,6 +361,11 @@ static const char * mux_aclk_perihp_pare static const char * mux_aclk_cci_parents[] = { "cpll_aclk_cci_src", "gpll_aclk_cci_src", "npll_aclk_cci_src", "vpll_aclk_cci_src" }; static const char * mux_dclk_vop0_parents[] = { "dclk_vop0_div", "dclk_vop0_frac" }; static const char * mux_dclk_vop1_parents[] = { "dclk_vop1_div", "dclk_vop1_frac" }; +static const char * mux_i2s0_parents[] = { "clk_i2s0_div", "clk_i2s0_frac", "clkin_i2s", "xin12m" }; +static const char * mux_i2s1_parents[] = { "clk_i2s1_div", "clk_i2s1_frac", "clkin_i2s", "xin12m" }; +static const char * mux_i2s2_parents[] = { "clk_i2s2_div", "clk_i2s2_frac", "clkin_i2s", "xin12m" }; +static const char * mux_i2sch_parents[] = { "clk_i2s0", "clk_i2s1", "clk_i2s2" }; +static const char * mux_i2sout_parents[] = { "clk_i2sout_src", "xin12m" }; static const char * mux_uart0_parents[] = { "clk_uart0_div", "clk_uart0_frac", "xin24m" }; static const char * mux_uart1_parents[] = { "clk_uart1_div", "clk_uart1_frac", "xin24m" }; static const char * mux_uart2_parents[] = { "clk_uart2_div", "clk_uart2_frac", "xin24m" }; @@ -939,13 +944,73 @@ static struct rk_cru_clk rk3399_cru_clks 0), RK_GATE(RK3399_PCLK_HDMI_CTRL, "pclk_hdmi_ctrl", "pclk_hdcp", CLKGATE_CON(29), 6), RK_GATE(RK3399_SCLK_HDMI_SFR, "clk_hdmi_sfr", "xin24m", CLKGATE_CON(11), 6), + + /* I2S2 */ + RK_COMPOSITE(0, "clk_i2s0_div", mux_pll_src_cpll_gpll_parents, + CLKSEL_CON(28), /* muxdiv_reg */ + __BIT(7), /* mux_mask */ + __BITS(6,0), /* div_mask */ + CLKGATE_CON(8), /* gate_reg */ + __BIT(3), /* gate_mask */ + 0), + RK_COMPOSITE(0, "clk_i2s1_div", mux_pll_src_cpll_gpll_parents, + CLKSEL_CON(29), /* muxdiv_reg */ + __BIT(7), /* mux_mask */ + __BITS(6,0), /* div_mask */ + CLKGATE_CON(8), /* gate_reg */ + __BIT(6), /* gate_mask */ + 0), + RK_COMPOSITE(0, "clk_i2s2_div", mux_pll_src_cpll_gpll_parents, + CLKSEL_CON(30), /* muxdiv_reg */ + __BIT(7), /* mux_mask */ + __BITS(6,0), /* div_mask */ + CLKGATE_CON(8), /* gate_reg */ + __BIT(9), /* gate_mask */ + 0), + RK_COMPOSITE_FRAC(0, "clk_i2s0_frac", "clk_i2s0_div", + CLKSEL_CON(96), /* frac_reg */ + 0), + RK_COMPOSITE_FRAC(0, "clk_i2s1_frac", "clk_i2s1_div", + CLKSEL_CON(97), /* frac_reg */ + 0), + RK_COMPOSITE_FRAC(0, "clk_i2s2_frac", "clk_i2s2_div", + CLKSEL_CON(98), /* frac_reg */ + 0), + RK_MUX(0, "clk_i2s0_mux", mux_i2s0_parents, CLKSEL_CON(28), __BITS(9,8)), + RK_MUX(0, "clk_i2s1_mux", mux_i2s1_parents, CLKSEL_CON(29), __BITS(9,8)), + RK_MUX(0, "clk_i2s2_mux", mux_i2s2_parents, CLKSEL_CON(30), __BITS(9,8)), + RK_GATE(RK3399_SCLK_I2S0_8CH, "clk_i2s0", "clk_i2s0_mux", CLKGATE_CON(8), 5), + RK_GATE(RK3399_SCLK_I2S1_8CH, "clk_i2s1", "clk_i2s1_mux", CLKGATE_CON(8), 8), + RK_GATE(RK3399_SCLK_I2S2_8CH, "clk_i2s2", "clk_i2s2_mux", CLKGATE_CON(8), 11), + RK_GATE(RK3399_HCLK_I2S0_8CH, "hclk_i2s0", "hclk_perilp1", CLKGATE_CON(34), 0), + RK_GATE(RK3399_HCLK_I2S1_8CH, "hclk_i2s1", "hclk_perilp1", CLKGATE_CON(34), 1), + RK_GATE(RK3399_HCLK_I2S2_8CH, "hclk_i2s2", "hclk_perilp1", CLKGATE_CON(34), 2), + RK_MUX(0, "clk_i2sout_src", mux_i2sch_parents, CLKSEL_CON(31), __BITS(1,0)), + RK_COMPOSITE(RK3399_SCLK_I2S_8CH_OUT, "clk_i2sout", mux_i2sout_parents, + CLKSEL_CON(31), /* muxdiv_reg */ + __BIT(2), /* mux_mask */ + 0, /* div_mask */ + CLKGATE_CON(8), /* gate_reg */ + __BIT(12), /* gate_mask */ + RK_COMPOSITE_SET_RATE_PARENT), +}; + +static const struct rk3399_init_param { + const char *clk; + const char *parent; +} rk3399_init_params[] = { + { .clk = "clk_i2s0_mux", .parent
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:23:13 UTC 2019 Modified Files: src/sys/arch/arm/rockchip: rk3399_cru.c rk_cru.h rk_cru_composite.c Log Message: Add support for I2S clocks. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/rockchip/rk3399_cru.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/rockchip/rk_cru.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/rockchip/rk_cru_composite.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/dts
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:24:25 UTC 2019 Modified Files: src/sys/arch/arm/dts: rk3399-rockpro64.dts Log Message: Enable HDMI audio on ROCKPro64 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/dts/rk3399-rockpro64.dts Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:24:03 UTC 2019 Modified Files: src/sys/arch/arm/rockchip: files.rockchip Added Files: src/sys/arch/arm/rockchip: rk_i2s.c Log Message: Add driver for Rockchip I2S/PCM controller. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/rockchip/files.rockchip cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/rockchip/rk_i2s.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/rockchip/files.rockchip diff -u src/sys/arch/arm/rockchip/files.rockchip:1.21 src/sys/arch/arm/rockchip/files.rockchip:1.22 --- src/sys/arch/arm/rockchip/files.rockchip:1.21 Sat Nov 9 23:30:14 2019 +++ src/sys/arch/arm/rockchip/files.rockchip Sat Nov 16 13:24:03 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.rockchip,v 1.21 2019/11/09 23:30:14 jmcneill Exp $ +# $NetBSD: files.rockchip,v 1.22 2019/11/16 13:24:03 jmcneill Exp $ # # Configuration info for Rockchip family SoCs # @@ -103,6 +103,11 @@ file arch/arm/rockchip/rk_vop.c rk_vop attach dwhdmi at fdt with rk_dwhdmi file arch/arm/rockchip/rk_dwhdmi.c rk_dwhdmi +# I2S/PCM controller +device rki2s +attach rki2s at fdt with rk_i2s +filearch/arm/rockchip/rk_i2s.c rk_i2s + # SOC parameters defflag opt_soc.h SOC_ROCKCHIP defflag opt_soc.h SOC_RK3328: SOC_ROCKCHIP Added files: Index: src/sys/arch/arm/rockchip/rk_i2s.c diff -u /dev/null src/sys/arch/arm/rockchip/rk_i2s.c:1.1 --- /dev/null Sat Nov 16 13:24:03 2019 +++ src/sys/arch/arm/rockchip/rk_i2s.c Sat Nov 16 13:24:03 2019 @@ -0,0 +1,638 @@ +/* $NetBSD: rk_i2s.c,v 1.1 2019/11/16 13:24:03 jmcneill Exp $ */ + +/*- + * Copyright (c) 2019 Jared McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: rk_i2s.c,v 1.1 2019/11/16 13:24:03 jmcneill Exp $"); + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#define RK_I2S_FIFO_DEPTH 32 +#define RK_I2S_SAMPLE_RATE 48000 + +#define I2S_TXCR 0x00 +#define TXCR_RCNT __BITS(22,17) +#define TXCR_TCSR __BITS(16,15) +#define TXCR_HWT __BIT(14) +#define TXCR_SJM __BIT(12) +#define TXCR_FBM __BIT(11) +#define TXCR_IBM __BITS(10,9) +#define TXCR_PBM __BITS(8,7) +#define TXCR_TFS __BIT(5) +#define TXCR_VDW __BITS(4,0) +#define I2S_RXCR 0x04 +#define RXCR_RCSR __BITS(16,15) +#define RXCR_HWT __BIT(14) +#define RXCR_SJM __BIT(12) +#define RXCR_FBM __BIT(11) +#define RXCR_IBM __BITS(10,9) +#define RXCR_PBM __BITS(8,7) +#define RXCR_TFS __BIT(5) +#define RXCR_VDW __BITS(4,0) +#define I2S_CKR 0x08 +#define CKR_TRCM __BITS(29,28) +#define CKR_MSS __BIT(27) +#define CKR_CKP __BIT(26) +#define CKR_RLP __BIT(25) +#define CKR_TLP __BIT(24) +#define CKR_MDIV __BITS(23,16) +#define CKR_RSD __BITS(15,8) +#define CKR_TSD __BITS(7,0) +#define I2S_TXFIFOLR 0x0c +#define TXFIFOLR_TFL(n) __BITS((n) * 6 + 5, (n) * 6) +#define I2S_DMACR 0x10 +#define DMACR_RDE __BIT(24) +#define DMACR_RDL __BITS(20,16) +#define DMACR_TDE __BIT(8) +#define DMACR_TDL __BITS(4,0) +#define I2S_INTCR 0x14 +#define INTCR_RFT __BITS(24,20) +#define INTCR_RXOIC __BIT(18) +#define INTCR_RXOIE __BIT(17) +#define INTCR_RXFIE __BIT(16) +#define INTCR_TFT __BITS(8,4) +#define INTCR_TXUIC __BIT(2) +#define INTCR_TXUIE __BIT(1) +#define INTCR_TXEIE __BIT(0) +#define I2S_INTSR 0x18 +#define INTSR_RXOI __BIT(17) +#define INTSR_RXFI __BIT(16) +#define INTSR_TXUI __BIT(1) +#define INTSR_TXEI __BIT(0) +#define I2S_XFER 0x1c +#define XFER_RXS __BIT(1) +#define XFER_
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:24:40 UTC 2019 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 Log Message: Add rki2s To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/arch/evbarm/conf/GENERIC64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/dts
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:24:25 UTC 2019 Modified Files: src/sys/arch/arm/dts: rk3399-rockpro64.dts Log Message: Enable HDMI audio on ROCKPro64 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/dts/rk3399-rockpro64.dts Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/dts/rk3399-rockpro64.dts diff -u src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.8 src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.9 --- src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.8 Tue Aug 13 17:24:25 2019 +++ src/sys/arch/arm/dts/rk3399-rockpro64.dts Sat Nov 16 13:24:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rk3399-rockpro64.dts,v 1.8 2019/08/13 17:24:25 tnn Exp $ */ +/* $NetBSD: rk3399-rockpro64.dts,v 1.9 2019/11/16 13:24:25 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared McNeill @@ -88,3 +88,7 @@ status = "okay"; }; }; + +&hdmi_sound { + status = "okay"; +};
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:24:03 UTC 2019 Modified Files: src/sys/arch/arm/rockchip: files.rockchip Added Files: src/sys/arch/arm/rockchip: rk_i2s.c Log Message: Add driver for Rockchip I2S/PCM controller. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/rockchip/files.rockchip cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/rockchip/rk_i2s.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:24:40 UTC 2019 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 Log Message: Add rki2s To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/arch/evbarm/conf/GENERIC64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.112 src/sys/arch/evbarm/conf/GENERIC64:1.113 --- src/sys/arch/evbarm/conf/GENERIC64:1.112 Thu Nov 14 20:40:25 2019 +++ src/sys/arch/evbarm/conf/GENERIC64 Sat Nov 16 13:24:40 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.112 2019/11/14 20:40:25 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.113 2019/11/16 13:24:40 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -419,6 +419,7 @@ options HDAUDIOVERBOSE options HDAUDIO_ENABLE_HDMI options HDAUDIO_ENABLE_DISPLAYPORT ausoc* at fdt? # Simple SoC audio card +rki2s* at fdt? # Rockchip I2S/PCM sunxicodec* at fdt? # Allwinner audio codec sun8icodec* at fdt? # Allwinner audio codec (sun8i/sun50i) h3codec* at fdt? # Allwinner H3 audio codec (analog part)
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:25:33 UTC 2019 Modified Files: src/sys/arch/arm/rockchip: rk_dwhdmi.c Log Message: Add audio support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/rockchip/rk_dwhdmi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/rockchip/rk_dwhdmi.c diff -u src/sys/arch/arm/rockchip/rk_dwhdmi.c:1.2 src/sys/arch/arm/rockchip/rk_dwhdmi.c:1.3 --- src/sys/arch/arm/rockchip/rk_dwhdmi.c:1.2 Sun Nov 10 12:07:50 2019 +++ src/sys/arch/arm/rockchip/rk_dwhdmi.c Sat Nov 16 13:25:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rk_dwhdmi.c,v 1.2 2019/11/10 12:07:50 jmcneill Exp $ */ +/* $NetBSD: rk_dwhdmi.c,v 1.3 2019/11/16 13:25:33 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rk_dwhdmi.c,v 1.2 2019/11/10 12:07:50 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rk_dwhdmi.c,v 1.3 2019/11/16 13:25:33 jmcneill Exp $"); #include #include @@ -194,6 +194,21 @@ rk_dwhdmi_mode_set(struct dwhdmi_softc * dwhdmi_phy_mode_set(dsc, mode, adjusted_mode); } +static audio_dai_tag_t +rk_dwhdmi_dai_get_tag(device_t dev, const void *data, size_t len) +{ + struct rk_dwhdmi_softc * const sc = device_private(dev); + + if (len != 4) + return NULL; + + return &sc->sc_base.sc_dai; +} + +static struct fdtbus_dai_controller_func rk_dwhdmi_dai_funcs = { + .get_tag = rk_dwhdmi_dai_get_tag +}; + static int rk_dwhdmi_match(device_t parent, cfdata_t cf, void *aux) { @@ -287,6 +302,8 @@ rk_dwhdmi_attach(device_t parent, device sc->sc_ports.dp_ep_activate = rk_dwhdmi_ep_activate; sc->sc_ports.dp_ep_get_data = rk_dwhdmi_ep_get_data; fdt_ports_register(&sc->sc_ports, self, phandle, EP_DRM_BRIDGE); + + fdtbus_register_dai_controller(self, phandle, &rk_dwhdmi_dai_funcs); } CFATTACH_DECL_NEW(rk_dwhdmi, sizeof(struct rk_dwhdmi_softc),
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Sat Nov 16 13:25:33 UTC 2019 Modified Files: src/sys/arch/arm/rockchip: rk_dwhdmi.c Log Message: Add audio support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/rockchip/rk_dwhdmi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/isa
Module Name:src Committed By: martin Date: Sat Nov 16 15:38:43 UTC 2019 Modified Files: src/sys/dev/isa: nct.c Log Message: PR port-i386/54701: deal with missing pmf platform keys. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/isa/nct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/isa
Module Name:src Committed By: martin Date: Sat Nov 16 15:38:43 UTC 2019 Modified Files: src/sys/dev/isa: nct.c Log Message: PR port-i386/54701: deal with missing pmf platform keys. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/isa/nct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/isa/nct.c diff -u src/sys/dev/isa/nct.c:1.1 src/sys/dev/isa/nct.c:1.2 --- src/sys/dev/isa/nct.c:1.1 Fri Oct 25 17:39:57 2019 +++ src/sys/dev/isa/nct.c Sat Nov 16 15:38:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nct.c,v 1.1 2019/10/25 17:39:57 martin Exp $ */ +/* $NetBSD: nct.c,v 1.2 2019/11/16 15:38:43 martin Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nct.c,v 1.1 2019/10/25 17:39:57 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nct.c,v 1.2 2019/11/16 15:38:43 martin Exp $"); #include #include @@ -241,6 +241,7 @@ nct_match(device_t parent, cfdata_t matc int nioaddr, i; u_int8_t low, high; u_int16_t id; + const char *vendor, *product; /* * Allow override of I/O base address. If no I/O base address is @@ -249,11 +250,15 @@ nct_match(device_t parent, cfdata_t matc if (ia->ia_nio > 0 && ia->ia_io[0].ir_addr != ISA_UNKNOWN_PORT) { ioaddrs[0] = ia->ia_io[0].ir_addr; nioaddr = 1; - } else if ((strcmp(pmf_get_platform("system-vendor"), "PC Engines") | - strcmp(pmf_get_platform("system-product"), "APU")) == 0) { - nioaddr = __arraycount(ioaddrs); } else { - nioaddr = 0; + vendor = pmf_get_platform("system-vendor"); + product = pmf_get_platform("system-product"); + if (vendor != NULL && strcmp(vendor, "PC Engines") == 0 && + product != NULL && strcmp(product, "APU") == 0) { + nioaddr = __arraycount(ioaddrs); + } else { + nioaddr = 0; + } } /*
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: joerg Date: Sat Nov 16 15:50:46 UTC 2019 Modified Files: src/usr.sbin/sysinst: part_edit.c Log Message: Drop unused variable. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/part_edit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: joerg Date: Sat Nov 16 15:50:46 UTC 2019 Modified Files: src/usr.sbin/sysinst: part_edit.c Log Message: Drop unused variable. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/part_edit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/part_edit.c diff -u src/usr.sbin/sysinst/part_edit.c:1.12 src/usr.sbin/sysinst/part_edit.c:1.13 --- src/usr.sbin/sysinst/part_edit.c:1.12 Wed Nov 13 18:57:26 2019 +++ src/usr.sbin/sysinst/part_edit.c Sat Nov 16 15:50:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: part_edit.c,v 1.12 2019/11/13 18:57:26 martin Exp $ */ +/* $NetBSD: part_edit.c,v 1.13 2019/11/16 15:50:45 joerg Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -462,7 +462,7 @@ add_part_clone(menudesc *menu, void *arg struct disk_partitions *csrc; struct disk_part_free_space space; daddr_t offset, align; - size_t s, clone_cnt; + size_t s; part_id cid; struct selected_partitions selected; struct single_clone_data *new_clones; @@ -543,7 +543,6 @@ add_part_clone(menudesc *menu, void *arg if (cid == NO_PART) continue; parts->pscheme->get_part_info(parts, cid, &cinfo); - clone_cnt++; offset = rounddown(cinfo.start+cinfo.size+align, align); }
CVS commit: src/external/apache2/llvm/lib/libclangAST
Module Name:src Committed By: joerg Date: Sat Nov 16 15:51:26 UTC 2019 Modified Files: src/external/apache2/llvm/lib/libclangAST: Makefile Log Message: Build libclangAST with -O1 when the host compiler is GCC 7 to avoid miscompiles. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/apache2/llvm/lib/libclangAST/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/apache2/llvm/lib/libclangAST/Makefile diff -u src/external/apache2/llvm/lib/libclangAST/Makefile:1.1 src/external/apache2/llvm/lib/libclangAST/Makefile:1.2 --- src/external/apache2/llvm/lib/libclangAST/Makefile:1.1 Mon Nov 11 22:45:14 2019 +++ src/external/apache2/llvm/lib/libclangAST/Makefile Sat Nov 16 15:51:26 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2019/11/11 22:45:14 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2019/11/16 15:51:26 joerg Exp $ LIB= clangAST @@ -112,6 +112,10 @@ CLANG_TABLEGEN_OUTPUT= \ .if defined(HOSTLIB) .include +BAD_GCC_VERSION!= case `${HOST_CXX} --version 2> /dev/null` in [cg]++*7.4*) echo yes ;; *) echo no ;; esac +. if ${BAD_GCC_VERSION} == "yes" +HOST_CXXFLAGS+= -O0 +. endif .else .include .endif
CVS commit: src/external/apache2/llvm/lib/libclangAST
Module Name:src Committed By: joerg Date: Sat Nov 16 15:51:26 UTC 2019 Modified Files: src/external/apache2/llvm/lib/libclangAST: Makefile Log Message: Build libclangAST with -O1 when the host compiler is GCC 7 to avoid miscompiles. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/apache2/llvm/lib/libclangAST/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sat Nov 16 16:13:56 UTC 2019 Modified Files: src/sys/dev/usb [netbsd-7]: usb_subr.c usbdi.c usbdi.h Log Message: Pull up following revision(s) (requested by mrg in ticket #1713): sys/dev/usb/usbdi.h: revision 1.97 (via patch) sys/dev/usb/usbdi.c: revision 1.186 (via patch) sys/dev/usb/usb_subr.c: revision 1.239 (via patch) add new usbd_do_request_len() that can allocate a larger than request size buffer. reimplement usbd_do_request_flags() in terms of this. use this for fetching string descriptors. fixes a very strange problem where an axe(4) attaching (either has ugen(4) or axe(4)) would ask for 2 bytes, usb_mem.c would allocate a 2 byte fragment, perform the operation, and sometime shortly afterwards (usually by the time the next allocation is made for this fragment), would become corrupted (usually two bytes were written with 0x0304.) (initial request of 4 bytes also avoids the problem on this device. it really seems like a HC problem -- host should not allow the device to write more than req.wLength! nor should it allow this write to happen after completion.) avoid an (almost) always double-log in usbd_transfer(). To generate a diff of this commit: cvs rdiff -u -r1.196.4.5 -r1.196.4.6 src/sys/dev/usb/usb_subr.c cvs rdiff -u -r1.161.2.4 -r1.161.2.5 src/sys/dev/usb/usbdi.c cvs rdiff -u -r1.90.2.2 -r1.90.2.3 src/sys/dev/usb/usbdi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usb_subr.c diff -u src/sys/dev/usb/usb_subr.c:1.196.4.5 src/sys/dev/usb/usb_subr.c:1.196.4.6 --- src/sys/dev/usb/usb_subr.c:1.196.4.5 Wed Aug 8 10:17:11 2018 +++ src/sys/dev/usb/usb_subr.c Sat Nov 16 16:13:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.196.4.5 2018/08/08 10:17:11 martin Exp $ */ +/* $NetBSD: usb_subr.c,v 1.196.4.6 2019/11/16 16:13:56 martin Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.196.4.5 2018/08/08 10:17:11 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.196.4.6 2019/11/16 16:13:56 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -157,13 +157,20 @@ usbd_get_string_desc(struct usbd_device usbd_status err; int actlen; + /* + * Pass a full-sized buffer to usbd_do_request_len(). At least + * one device has been seen returning additional data beyond the + * provided buffers (2-bytes written shortly after the request + * claims to have completed and returned the 2 byte header, + * corrupting other memory.) + */ req.bmRequestType = UT_READ_DEVICE; req.bRequest = UR_GET_DESCRIPTOR; USETW2(req.wValue, UDESC_STRING, sindex); USETW(req.wIndex, langid); USETW(req.wLength, 2); /* only size byte first */ - err = usbd_do_request_flags(dev, &req, sdesc, USBD_SHORT_XFER_OK, - &actlen, USBD_DEFAULT_TIMEOUT); + err = usbd_do_request_len(dev, &req, sizeof(*sdesc), sdesc, + USBD_SHORT_XFER_OK, &actlen, USBD_DEFAULT_TIMEOUT); if (err) return err; @@ -171,8 +178,8 @@ usbd_get_string_desc(struct usbd_device return USBD_SHORT_XFER; USETW(req.wLength, sdesc->bLength); /* the whole string */ - err = usbd_do_request_flags(dev, &req, sdesc, USBD_SHORT_XFER_OK, - &actlen, USBD_DEFAULT_TIMEOUT); + err = usbd_do_request_len(dev, &req, sizeof(*sdesc), sdesc, + USBD_SHORT_XFER_OK, &actlen, USBD_DEFAULT_TIMEOUT); if (err) return err; @@ -1192,7 +1199,7 @@ usbd_get_initial_ddesc(struct usbd_devic req.bRequest = UR_GET_DESCRIPTOR; USETW2(req.wValue, UDESC_DEVICE, 0); USETW(req.wIndex, 0); - USETW(req.wLength, 64); + USETW(req.wLength, 8); res = usbd_do_request_flags(dev, &req, buf, USBD_SHORT_XFER_OK, &actlen, USBD_DEFAULT_TIMEOUT); if (res) Index: src/sys/dev/usb/usbdi.c diff -u src/sys/dev/usb/usbdi.c:1.161.2.4 src/sys/dev/usb/usbdi.c:1.161.2.5 --- src/sys/dev/usb/usbdi.c:1.161.2.4 Fri Jan 11 15:58:23 2019 +++ src/sys/dev/usb/usbdi.c Sat Nov 16 16:13:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.161.2.4 2019/01/11 15:58:23 martin Exp $ */ +/* $NetBSD: usbdi.c,v 1.161.2.5 2019/11/16 16:13:56 martin Exp $ */ /* * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.161.2.4 2019/01/11 15:58:23 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.161.2.5 2019/11/16 16:13:56 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -331,6 +331,8 @@ usbd_transfer(struct usbd_xfer *xfer) * accepted by the HCD for some reason. It needs removing * from the pipe queue. */ + USBHIST_LOG(usbdebug, "xfer failed: %s, reinserting", + err, 0, 0, 0); usbd_lock_pipe(pipe); SIMPLEQ_REMOVE_HEAD(&pipe->up_queue, ux_next); if (pipe->up_serialise) @@ -1072,13 +1074,23 @@ usbd_status usbd_do_re
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sat Nov 16 16:13:56 UTC 2019 Modified Files: src/sys/dev/usb [netbsd-7]: usb_subr.c usbdi.c usbdi.h Log Message: Pull up following revision(s) (requested by mrg in ticket #1713): sys/dev/usb/usbdi.h: revision 1.97 (via patch) sys/dev/usb/usbdi.c: revision 1.186 (via patch) sys/dev/usb/usb_subr.c: revision 1.239 (via patch) add new usbd_do_request_len() that can allocate a larger than request size buffer. reimplement usbd_do_request_flags() in terms of this. use this for fetching string descriptors. fixes a very strange problem where an axe(4) attaching (either has ugen(4) or axe(4)) would ask for 2 bytes, usb_mem.c would allocate a 2 byte fragment, perform the operation, and sometime shortly afterwards (usually by the time the next allocation is made for this fragment), would become corrupted (usually two bytes were written with 0x0304.) (initial request of 4 bytes also avoids the problem on this device. it really seems like a HC problem -- host should not allow the device to write more than req.wLength! nor should it allow this write to happen after completion.) avoid an (almost) always double-log in usbd_transfer(). To generate a diff of this commit: cvs rdiff -u -r1.196.4.5 -r1.196.4.6 src/sys/dev/usb/usb_subr.c cvs rdiff -u -r1.161.2.4 -r1.161.2.5 src/sys/dev/usb/usbdi.c cvs rdiff -u -r1.90.2.2 -r1.90.2.3 src/sys/dev/usb/usbdi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sat Nov 16 16:17:37 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1713 To generate a diff of this commit: cvs rdiff -u -r1.1.2.67 -r1.1.2.68 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sat Nov 16 16:17:37 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1713 To generate a diff of this commit: cvs rdiff -u -r1.1.2.67 -r1.1.2.68 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.67 src/doc/CHANGES-7.3:1.1.2.68 --- src/doc/CHANGES-7.3:1.1.2.67 Thu Nov 14 18:17:19 2019 +++ src/doc/CHANGES-7.3 Sat Nov 16 16:17:37 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.67 2019/11/14 18:17:19 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.68 2019/11/16 16:17:37 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -719,3 +719,10 @@ sys/dev/pci/pucdata.c1.105 a clock multiplier of 8, just like the 16C1050 controller. [hauke, ticket #1712] +sys/dev/usb/usb_subr.c1.239 (patch) +sys/dev/usb/usbdi.c1.186 (patch) +sys/dev/usb/usbdi.h1.97 (patch) + + Work around memory corruption problem triggered by axe(4). + [mrg, ticket #1713] +
CVS commit: [netbsd-8] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Sat Nov 16 16:23:31 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-8]: hvkbd.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #1441): sys/dev/hyperv/if_hvn.c: revision 1.6 sys/dev/hyperv/hvkbd.c: revision 1.4 hvn(4), hvkbd(4): No need to call vmbus_channel_setdeferred(). These devices do not perform batch reading. To generate a diff of this commit: cvs rdiff -u -r1.1.4.4 -r1.1.4.5 src/sys/dev/hyperv/hvkbd.c cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/hvkbd.c diff -u src/sys/dev/hyperv/hvkbd.c:1.1.4.4 src/sys/dev/hyperv/hvkbd.c:1.1.4.5 --- src/sys/dev/hyperv/hvkbd.c:1.1.4.4 Thu Jun 13 06:12:55 2019 +++ src/sys/dev/hyperv/hvkbd.c Sat Nov 16 16:23:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hvkbd.c,v 1.1.4.4 2019/06/13 06:12:55 martin Exp $ */ +/* $NetBSD: hvkbd.c,v 1.1.4.5 2019/11/16 16:23:31 martin Exp $ */ /*- * Copyright (c) 2017 Microsoft Corp. @@ -36,7 +36,7 @@ #endif /* _KERNEL_OPT */ #include -__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.1.4.4 2019/06/13 06:12:55 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.1.4.5 2019/11/16 16:23:31 martin Exp $"); #include #include @@ -216,12 +216,6 @@ hvkbd_attach(device_t parent, device_t s return; } - if (vmbus_channel_setdeferred(sc->sc_chan, device_xname(self))) { - aprint_error_dev(self, - "failed to create the interrupt thread\n"); - goto free_buf; - } - sc->sc_chan->ch_flags &= ~CHF_BATCHED; if (vmbus_channel_open(sc->sc_chan, HVKBD_TX_RING_SIZE + HVKBD_RX_RING_SIZE, NULL, 0, hvkbd_intr, sc)) { Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.2.2.2 src/sys/dev/hyperv/if_hvn.c:1.2.2.3 --- src/sys/dev/hyperv/if_hvn.c:1.2.2.2 Sat Mar 9 17:10:19 2019 +++ src/sys/dev/hyperv/if_hvn.c Sat Nov 16 16:23:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.2.2.2 2019/03/09 17:10:19 martin Exp $ */ +/* $NetBSD: if_hvn.c,v 1.2.2.3 2019/11/16 16:23:31 martin Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.2.2.2 2019/03/09 17:10:19 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.2.2.3 2019/11/16 16:23:31 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -934,12 +934,6 @@ hvn_nvs_attach(struct hvn_softc *sc) sc->sc_chan->ch_flags &= ~CHF_BATCHED; - if (vmbus_channel_setdeferred(sc->sc_chan, device_xname(sc->sc_dev))) { - aprint_error_dev(sc->sc_dev, - "failed to create the interrupt thread\n"); - return -1; - } - /* Associate our interrupt handler with the channel */ if (vmbus_channel_open(sc->sc_chan, ringsize, NULL, 0, hvn_nvs_intr, sc)) {
CVS commit: [netbsd-8] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Sat Nov 16 16:23:31 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-8]: hvkbd.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #1441): sys/dev/hyperv/if_hvn.c: revision 1.6 sys/dev/hyperv/hvkbd.c: revision 1.4 hvn(4), hvkbd(4): No need to call vmbus_channel_setdeferred(). These devices do not perform batch reading. To generate a diff of this commit: cvs rdiff -u -r1.1.4.4 -r1.1.4.5 src/sys/dev/hyperv/hvkbd.c cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/i2c
Module Name:src Committed By: martin Date: Sat Nov 16 16:26:17 UTC 2019 Modified Files: src/sys/dev/i2c [netbsd-8]: spdmem_i2c.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1442): sys/dev/i2c/spdmem_i2c.c: revision 1.14 Use 1-byte data-buffers when writing to the "control" device for the SPD ROMs (we do this for page-selection). The imcsmb doesn't support zero-byte transfers. With this, I'm able to get the data for all 8 of my DIMMs (on two different imcsmb busses) using the spdmem(4) driver. And the data decodes correctly using the decode-dimms utility (from the linux i2ctools). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.13.8.1 src/sys/dev/i2c/spdmem_i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/i2c
Module Name:src Committed By: martin Date: Sat Nov 16 16:26:17 UTC 2019 Modified Files: src/sys/dev/i2c [netbsd-8]: spdmem_i2c.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1442): sys/dev/i2c/spdmem_i2c.c: revision 1.14 Use 1-byte data-buffers when writing to the "control" device for the SPD ROMs (we do this for page-selection). The imcsmb doesn't support zero-byte transfers. With this, I'm able to get the data for all 8 of my DIMMs (on two different imcsmb busses) using the spdmem(4) driver. And the data decodes correctly using the decode-dimms utility (from the linux i2ctools). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.13.8.1 src/sys/dev/i2c/spdmem_i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/i2c/spdmem_i2c.c diff -u src/sys/dev/i2c/spdmem_i2c.c:1.13 src/sys/dev/i2c/spdmem_i2c.c:1.13.8.1 --- src/sys/dev/i2c/spdmem_i2c.c:1.13 Fri Sep 9 05:36:59 2016 +++ src/sys/dev/i2c/spdmem_i2c.c Sat Nov 16 16:26:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: spdmem_i2c.c,v 1.13 2016/09/09 05:36:59 msaitoh Exp $ */ +/* $NetBSD: spdmem_i2c.c,v 1.13.8.1 2019/11/16 16:26:17 martin Exp $ */ /* * Copyright (c) 2007 Nicolas Joly @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.13 2016/09/09 05:36:59 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.13.8.1 2019/11/16 16:26:17 martin Exp $"); #include #include @@ -102,6 +102,7 @@ static int spdmem_reset_page(struct spdmem_i2c_softc *sc) { uint8_t reg, byte0, byte2; + static uint8_t dummy = 0; int rv; reg = 0; @@ -142,7 +143,7 @@ spdmem_reset_page(struct spdmem_i2c_soft * I don't know whether our icc_exec()'s API is good or not. */ rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_page0, - ®, 1, NULL, 0, I2C_F_POLL); + ®, 1, &dummy, 1, I2C_F_POLL); if (rv != 0) { /* * The possibilities are: @@ -152,7 +153,7 @@ spdmem_reset_page(struct spdmem_i2c_soft * Is there no way to distinguish them now? */ rv = iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP, - sc->sc_page0, ®, 1, NULL, 0, I2C_F_POLL); + sc->sc_page0, ®, 1, &dummy, 1, I2C_F_POLL); if (rv == 0) { aprint_debug("Page 1 was selected. Page 0 is " "selected now.\n"); @@ -245,11 +246,11 @@ spdmem_i2c_read(struct spdmem_softc *sof if (addr & 0x100) { rv = iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP, sc->sc_page1, - &dummy, 1, NULL, 0, I2C_F_POLL); + &dummy, 1, &dummy, 1, I2C_F_POLL); rv |= iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, 1, val, 1, I2C_F_POLL); rv |= iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP, - sc->sc_page0, &dummy, 1, NULL, 0, I2C_F_POLL); + sc->sc_page0, &dummy, 1, &dummy, 1, I2C_F_POLL); } else { rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, 1, val, 1, I2C_F_POLL);
CVS commit: [netbsd-8] src/sys
Module Name:src Committed By: martin Date: Sat Nov 16 16:30:10 UTC 2019 Modified Files: src/sys/arch/arm/nvidia [netbsd-8]: tegra_xusb.c src/sys/dev/pci [netbsd-8]: xhci_pci.c src/sys/dev/usb [netbsd-8]: usb.c usbdivar.h xhci.c xhcireg.h Log Message: Pull up the following revisions, requested by msaitoh in ticket #1443: sys/arch/arm/nvidia/tegra_xusb.c1.13-1.14 via patch sys/dev/pci/xhci_pci.c 1.13 sys/dev/usb/usb.c 1.169 sys/dev/usb/usbdivar.h 1.116 sys/dev/usb/xhci.c 1.93, 1.95, 1.97 sys/dev/usb/xhcireg.h 1.11-1.12 Detect USB 3.1 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/arm/nvidia/tegra_xusb.c cvs rdiff -u -r1.8.6.2 -r1.8.6.3 src/sys/dev/pci/xhci_pci.c cvs rdiff -u -r1.165.6.4 -r1.165.6.5 src/sys/dev/usb/usb.c cvs rdiff -u -r1.114.6.1 -r1.114.6.2 src/sys/dev/usb/usbdivar.h cvs rdiff -u -r1.72.2.11 -r1.72.2.12 src/sys/dev/usb/xhci.c cvs rdiff -u -r1.9.6.1 -r1.9.6.2 src/sys/dev/usb/xhcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/nvidia/tegra_xusb.c diff -u src/sys/arch/arm/nvidia/tegra_xusb.c:1.6 src/sys/arch/arm/nvidia/tegra_xusb.c:1.6.2.1 --- src/sys/arch/arm/nvidia/tegra_xusb.c:1.6 Fri Apr 28 09:46:49 2017 +++ src/sys/arch/arm/nvidia/tegra_xusb.c Sat Nov 16 16:30:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_xusb.c,v 1.6 2017/04/28 09:46:49 jmcneill Exp $ */ +/* $NetBSD: tegra_xusb.c,v 1.6.2.1 2019/11/16 16:30:09 martin Exp $ */ /* * Copyright (c) 2016 Jonathan A. Kollasch @@ -30,7 +30,7 @@ #include "opt_tegra.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.6 2017/04/28 09:46:49 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.6.2.1 2019/11/16 16:30:09 martin Exp $"); #include #include @@ -355,6 +355,29 @@ tegra_xusb_mountroot(device_t self) DPRINTF(sc->sc_dev, "XUSB_FALC_CPUCTL 0x%x\n", val); + val = bus_space_read_4(bst, psc->sc_bsh_fpci, PCI_USBREV) + & PCI_USBREV_MASK; + switch (val) { + case PCI_USBREV_3_0: + sc->sc_bus.ub_revision = USBREV_3_0; + break; + case PCI_USBREV_3_1: + sc->sc_bus.ub_revision = USBREV_3_1; + break; + default: + if (val < PCI_USBREV_3_0) { + aprint_error_dev(self, "Unknown revision (%02x)\n", + val); + sc->sc_bus.ub_revision = USBREV_UNKNOWN; + } else { + /* Default to the latest revision */ + aprint_normal_dev(self, + "Unknown revision (%02x). Set to 3.1.\n", val); + sc->sc_bus.ub_revision = USBREV_3_1; + } + break; + } + error = xhci_init(sc); if (error) { aprint_error_dev(self, "init failed, error=%d\n", error); Index: src/sys/dev/pci/xhci_pci.c diff -u src/sys/dev/pci/xhci_pci.c:1.8.6.2 src/sys/dev/pci/xhci_pci.c:1.8.6.3 --- src/sys/dev/pci/xhci_pci.c:1.8.6.2 Sun Jan 27 18:35:19 2019 +++ src/sys/dev/pci/xhci_pci.c Sat Nov 16 16:30:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci_pci.c,v 1.8.6.2 2019/01/27 18:35:19 martin Exp $ */ +/* $NetBSD: xhci_pci.c,v 1.8.6.3 2019/11/16 16:30:09 martin Exp $ */ /* OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.8.6.2 2019/01/27 18:35:19 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.8.6.3 2019/11/16 16:30:09 martin Exp $"); #include #include @@ -120,7 +120,7 @@ xhci_pci_attach(device_t parent, device_ const pci_chipset_tag_t pc = pa->pa_pc; const pcitag_t tag = pa->pa_tag; char const *intrstr; - pcireg_t csr, memtype; + pcireg_t csr, memtype, usbrev; int err; uint32_t hccparams; char intrbuf[PCI_INTRSTR_LEN]; @@ -200,6 +200,28 @@ xhci_pci_attach(device_t parent, device_ pci_findvendor(sc->sc_vendor, sizeof(sc->sc_vendor), sc->sc_id_vendor); + usbrev = pci_conf_read(pc, tag, PCI_USBREV) & PCI_USBREV_MASK; + switch (usbrev) { + case PCI_USBREV_3_0: + sc->sc_bus.ub_revision = USBREV_3_0; + break; + case PCI_USBREV_3_1: + sc->sc_bus.ub_revision = USBREV_3_1; + break; + default: + if (usbrev < PCI_USBREV_3_0) { + aprint_error_dev(self, "Unknown revision (%02x)\n", + usbrev); + sc->sc_bus.ub_revision = USBREV_UNKNOWN; + } else { + /* Default to the latest revision */ + aprint_normal_dev(self, + "Unknown revision (%02x). Set to 3.1.\n", usbrev); + sc->sc_bus.ub_revision = USBREV_3_1; + } + break; + } + /* Intel chipset requires SuperSpeed enable and USB2 port routing */ switch (PCI_VENDOR(pa->pa_id)) { case PCI_VENDOR_INTEL: Index: src/sys/dev/usb/usb.c diff -u src/sys/dev/usb/usb.c:1.165.6.4 src/sys/dev/usb/usb.c:1.165.6.5 --- src/sys/dev/usb/usb.c:1.165.6.4 Thu Sep 27 14:52:26 2018 +++ src/sys/dev/usb/usb.c Sat Nov 16 16:30:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.165.6.4 2018/09/27 14:52:26 martin Exp $ */ +/* $NetBSD: usb.c,v 1.165.6.5 201
CVS commit: [netbsd-8] src/sys
Module Name:src Committed By: martin Date: Sat Nov 16 16:30:10 UTC 2019 Modified Files: src/sys/arch/arm/nvidia [netbsd-8]: tegra_xusb.c src/sys/dev/pci [netbsd-8]: xhci_pci.c src/sys/dev/usb [netbsd-8]: usb.c usbdivar.h xhci.c xhcireg.h Log Message: Pull up the following revisions, requested by msaitoh in ticket #1443: sys/arch/arm/nvidia/tegra_xusb.c1.13-1.14 via patch sys/dev/pci/xhci_pci.c 1.13 sys/dev/usb/usb.c 1.169 sys/dev/usb/usbdivar.h 1.116 sys/dev/usb/xhci.c 1.93, 1.95, 1.97 sys/dev/usb/xhcireg.h 1.11-1.12 Detect USB 3.1 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/arm/nvidia/tegra_xusb.c cvs rdiff -u -r1.8.6.2 -r1.8.6.3 src/sys/dev/pci/xhci_pci.c cvs rdiff -u -r1.165.6.4 -r1.165.6.5 src/sys/dev/usb/usb.c cvs rdiff -u -r1.114.6.1 -r1.114.6.2 src/sys/dev/usb/usbdivar.h cvs rdiff -u -r1.72.2.11 -r1.72.2.12 src/sys/dev/usb/xhci.c cvs rdiff -u -r1.9.6.1 -r1.9.6.2 src/sys/dev/usb/xhcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/usr.sbin/usbdevs
Module Name:src Committed By: martin Date: Sat Nov 16 16:32:23 UTC 2019 Modified Files: src/usr.sbin/usbdevs [netbsd-8]: usbdevs.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1444): usr.sbin/usbdevs/usbdevs.c: revision 1.36 Print USB_SPEED_SUPER_PLUS capability if present To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.35.6.1 src/usr.sbin/usbdevs/usbdevs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/usbdevs/usbdevs.c diff -u src/usr.sbin/usbdevs/usbdevs.c:1.35 src/usr.sbin/usbdevs/usbdevs.c:1.35.6.1 --- src/usr.sbin/usbdevs/usbdevs.c:1.35 Wed Sep 7 08:09:59 2016 +++ src/usr.sbin/usbdevs/usbdevs.c Sat Nov 16 16:32:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdevs.c,v 1.35 2016/09/07 08:09:59 skrll Exp $ */ +/* $NetBSD: usbdevs.c,v 1.35.6.1 2019/11/16 16:32:23 martin Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: usbdevs.c,v 1.35 2016/09/07 08:09:59 skrll Exp $"); +__RCSID("$NetBSD: usbdevs.c,v 1.35.6.1 2019/11/16 16:32:23 martin Exp $"); #endif #include @@ -222,6 +222,7 @@ usbdev(int f, int a, int rec) case USB_SPEED_FULL: printf("full speed, "); break; case USB_SPEED_HIGH: printf("high speed, "); break; case USB_SPEED_SUPER: printf("super speed, "); break; + case USB_SPEED_SUPER_PLUS: printf("super speed+, "); break; default: break; } if (di.udi_power)
CVS commit: [netbsd-8] src/usr.sbin/usbdevs
Module Name:src Committed By: martin Date: Sat Nov 16 16:32:23 UTC 2019 Modified Files: src/usr.sbin/usbdevs [netbsd-8]: usbdevs.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1444): usr.sbin/usbdevs/usbdevs.c: revision 1.36 Print USB_SPEED_SUPER_PLUS capability if present To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.35.6.1 src/usr.sbin/usbdevs/usbdevs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/arm/sa11x0
Module Name:src Committed By: martin Date: Sat Nov 16 16:35:00 UTC 2019 Modified Files: src/sys/arch/arm/sa11x0 [netbsd-8]: sa11x0_ost.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1445): sys/arch/arm/sa11x0/sa11x0_ost.c: revision 1.33 Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860. When kernels were configured for both CPU_XSCALE_PXA270 and CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9) then all delay(9) during configure(9) returned immediately. While here, use proper macro with description for readability. Should be pulled up to netbsd-8 and netbsd-9. (though zaudio(4) won't work on netbsd-8) To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.32.8.1 src/sys/arch/arm/sa11x0/sa11x0_ost.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sa11x0/sa11x0_ost.c diff -u src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.32 src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.32.8.1 --- src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.32 Sun Oct 9 14:43:17 2016 +++ src/sys/arch/arm/sa11x0/sa11x0_ost.c Sat Nov 16 16:35:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sa11x0_ost.c,v 1.32 2016/10/09 14:43:17 christos Exp $ */ +/* $NetBSD: sa11x0_ost.c,v 1.32.8.1 2019/11/16 16:35:00 martin Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sa11x0_ost.c,v 1.32 2016/10/09 14:43:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sa11x0_ost.c,v 1.32.8.1 2019/11/16 16:35:00 martin Exp $"); #include #include @@ -80,14 +80,23 @@ struct saost_softc { static struct saost_softc *saost_sc = NULL; +#define PXA270_OST_FREQ 325 /* PXA270 uses 3.25MHz */ +#define SAOST_FREQ 3686400 /* Others use 3.6864MHz */ +#define SAOST_MAXFREQ SAOST_FREQ + #if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) +/* + * On dynamic configuration, assume fastest frequency for early delay(9) + * before tc_init(9), because longer delay(9) is almost harmless during + * device probe and initialization. + */ #include -static uint32_t freq; -#define TIMER_FREQUENCY freq +static uint32_t saost_freq = SAOST_MAXFREQ; +#define TIMER_FREQUENCY saost_freq #elif defined(CPU_XSCALE_PXA270) -#define TIMER_FREQUENCY 325 /* PXA270 uses 3.25MHz */ +#define TIMER_FREQUENCY PXA270_OST_FREQ #else -#define TIMER_FREQUENCY 3686400 /* 3.6864MHz */ +#define TIMER_FREQUENCY SAOST_FREQ #endif #ifndef STATHZ @@ -230,7 +239,7 @@ cpu_initclocks(void) stathz = STATHZ; profhz = stathz; #if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) - TIMER_FREQUENCY = (CPU_IS_PXA250) ? 3686400 : 325; + TIMER_FREQUENCY = (CPU_IS_PXA270) ? PXA270_OST_FREQ : SAOST_FREQ; #endif sc->sc_statclock_step = TIMER_FREQUENCY / stathz;
CVS commit: [netbsd-8] src/sys/arch/arm/sa11x0
Module Name:src Committed By: martin Date: Sat Nov 16 16:35:00 UTC 2019 Modified Files: src/sys/arch/arm/sa11x0 [netbsd-8]: sa11x0_ost.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1445): sys/arch/arm/sa11x0/sa11x0_ost.c: revision 1.33 Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860. When kernels were configured for both CPU_XSCALE_PXA270 and CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9) then all delay(9) during configure(9) returned immediately. While here, use proper macro with description for readability. Should be pulled up to netbsd-8 and netbsd-9. (though zaudio(4) won't work on netbsd-8) To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.32.8.1 src/sys/arch/arm/sa11x0/sa11x0_ost.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/zaurus
Module Name:src Committed By: martin Date: Sat Nov 16 16:39:11 UTC 2019 Modified Files: src/sys/arch/zaurus/conf [netbsd-8]: GENERIC INSTALL src/sys/arch/zaurus/stand/zbsdmod [netbsd-8]: zbsdmod.c src/sys/arch/zaurus/zaurus [netbsd-8]: machdep.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1446): sys/arch/zaurus/conf/GENERIC: revision 1.89 sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.12 sys/arch/zaurus/conf/INSTALL: revision 1.40 sys/arch/zaurus/zaurus/machdep.c: revision 1.40 sys/arch/zaurus/zaurus/machdep.c: revision 1.45 sys/arch/zaurus/conf/GENERIC: revision 1.85 Yes, we need to load symbols, but we don't need the whole DDB infrastructure for that. bye ddb and we fit again. Make zaurus kernels use symbol tables loaded by the bootloader. Now COPY_SYMTAB is no longer necessary and it saves ~500kbytes of GENERIC, so re-enable options DDB (i.e. revert GENERIC rev 1.85). Also fix zbsdmod.o (a kernel loader for Zaurus Linux) to load symbols at a proper address as the MI sys/lib/libsa/loadfile_elf32.c does. No particular comment on port-zaurus@: https://mail-index.netbsd.org/port-zaurus/2019/11/11/msg86.html Note zbsdmod.c (derived from OpenBSD/zaurus) assumed that the loaded kernels had "esym" variable at the top of its data section and implicitly overwrote it with the address of loaded symbol tables. OpenBSD/zaurus kernels used the esym value written by the zbsdmod.o to initialize ksyms(4) on startup, but we will avoid such implicit MD interface between the bootloader and kernels (though we don't bother to add a symbol address value into bootinfo but just assume symbols are loaded at end[] of a loaded kernel, as per the MI libsa loadfile() implementation). Worth to pullup to both netbsd-8 and netbsd-9. To generate a diff of this commit: cvs rdiff -u -r1.73.6.3 -r1.73.6.4 src/sys/arch/zaurus/conf/GENERIC cvs rdiff -u -r1.32 -r1.32.6.1 src/sys/arch/zaurus/conf/INSTALL cvs rdiff -u -r1.9.22.1 -r1.9.22.2 \ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c cvs rdiff -u -r1.38 -r1.38.8.1 src/sys/arch/zaurus/zaurus/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/zaurus
Module Name:src Committed By: martin Date: Sat Nov 16 16:39:11 UTC 2019 Modified Files: src/sys/arch/zaurus/conf [netbsd-8]: GENERIC INSTALL src/sys/arch/zaurus/stand/zbsdmod [netbsd-8]: zbsdmod.c src/sys/arch/zaurus/zaurus [netbsd-8]: machdep.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1446): sys/arch/zaurus/conf/GENERIC: revision 1.89 sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.12 sys/arch/zaurus/conf/INSTALL: revision 1.40 sys/arch/zaurus/zaurus/machdep.c: revision 1.40 sys/arch/zaurus/zaurus/machdep.c: revision 1.45 sys/arch/zaurus/conf/GENERIC: revision 1.85 Yes, we need to load symbols, but we don't need the whole DDB infrastructure for that. bye ddb and we fit again. Make zaurus kernels use symbol tables loaded by the bootloader. Now COPY_SYMTAB is no longer necessary and it saves ~500kbytes of GENERIC, so re-enable options DDB (i.e. revert GENERIC rev 1.85). Also fix zbsdmod.o (a kernel loader for Zaurus Linux) to load symbols at a proper address as the MI sys/lib/libsa/loadfile_elf32.c does. No particular comment on port-zaurus@: https://mail-index.netbsd.org/port-zaurus/2019/11/11/msg86.html Note zbsdmod.c (derived from OpenBSD/zaurus) assumed that the loaded kernels had "esym" variable at the top of its data section and implicitly overwrote it with the address of loaded symbol tables. OpenBSD/zaurus kernels used the esym value written by the zbsdmod.o to initialize ksyms(4) on startup, but we will avoid such implicit MD interface between the bootloader and kernels (though we don't bother to add a symbol address value into bootinfo but just assume symbols are loaded at end[] of a loaded kernel, as per the MI libsa loadfile() implementation). Worth to pullup to both netbsd-8 and netbsd-9. To generate a diff of this commit: cvs rdiff -u -r1.73.6.3 -r1.73.6.4 src/sys/arch/zaurus/conf/GENERIC cvs rdiff -u -r1.32 -r1.32.6.1 src/sys/arch/zaurus/conf/INSTALL cvs rdiff -u -r1.9.22.1 -r1.9.22.2 \ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c cvs rdiff -u -r1.38 -r1.38.8.1 src/sys/arch/zaurus/zaurus/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/zaurus/conf/GENERIC diff -u src/sys/arch/zaurus/conf/GENERIC:1.73.6.3 src/sys/arch/zaurus/conf/GENERIC:1.73.6.4 --- src/sys/arch/zaurus/conf/GENERIC:1.73.6.3 Wed Apr 18 14:45:09 2018 +++ src/sys/arch/zaurus/conf/GENERIC Sat Nov 16 16:39:10 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.73.6.3 2018/04/18 14:45:09 martin Exp $ +# $NetBSD: GENERIC,v 1.73.6.4 2019/11/16 16:39:10 martin Exp $ # # GENERIC machine description file # @@ -171,7 +171,6 @@ options DDB # in-kernel debugger options DDB_HISTORY_SIZE=100 # Enable history editing in DDB #options KGDB #makeoptions DEBUG="-g" # compile full symbol table -makeoptions COPY_SYMTAB=1 # Kernel root file system and dump configuration. Index: src/sys/arch/zaurus/conf/INSTALL diff -u src/sys/arch/zaurus/conf/INSTALL:1.32 src/sys/arch/zaurus/conf/INSTALL:1.32.6.1 --- src/sys/arch/zaurus/conf/INSTALL:1.32 Wed Feb 8 20:11:18 2017 +++ src/sys/arch/zaurus/conf/INSTALL Sat Nov 16 16:39:10 2019 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.32 2017/02/08 20:11:18 rin Exp $ +# $NetBSD: INSTALL,v 1.32.6.1 2019/11/16 16:39:10 martin Exp $ # # INSTALL config file (GENERIC with memory disk root) # @@ -67,7 +67,6 @@ options RASOPS_SMALL no options DIAGNOSTIC no options DDB no options DDB_HISTORY_SIZE -no makeoptions COPY_SYMTAB no options PXA2X0_DMAC_DMOVER_CONCURRENCY Index: src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c diff -u src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.9.22.1 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.9.22.2 --- src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.9.22.1 Sun Nov 3 11:38:50 2019 +++ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c Sat Nov 16 16:39:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: zbsdmod.c,v 1.9.22.1 2019/11/03 11:38:50 martin Exp $ */ +/* $NetBSD: zbsdmod.c,v 1.9.22.2 2019/11/16 16:39:10 martin Exp $ */ /* $OpenBSD: zbsdmod.c,v 1.7 2005/05/02 02:45:29 uwe Exp $ */ /* @@ -139,8 +139,8 @@ elf32bsdboot(void) if (maxv < posv) maxv = posv; } - if (IS_DATA(phdr[i]) && IS_BSS(phdr[i])) { - posv += phdr[i].p_memsz; + if (IS_BSS(phdr[i])) { + posv += phdr[i].p_memsz - phdr[i].p_filesz; if (maxv < posv) maxv = posv; } Index: src/sys/arch/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.38 src/sys/arch/zaurus/zaurus/machdep.c:1.38.8.1 --- src/sys/arch/zaurus/zaurus/machdep.c:1.38 Thu Dec 22 14:48:00 2016 +++ src/sys/arch/zaurus/zaurus/machdep.c Sat Nov 16 16:39:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.38 2016/12/22 14:48:00 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.38.8.1 2019/11/16 16:39:11 martin Exp $ */ /* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sat Nov 16 16:40:29 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.2 Log Message: Tickets #1441 - #1446 To generate a diff of this commit: cvs rdiff -u -r1.1.2.65 -r1.1.2.66 src/doc/CHANGES-8.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.2 diff -u src/doc/CHANGES-8.2:1.1.2.65 src/doc/CHANGES-8.2:1.1.2.66 --- src/doc/CHANGES-8.2:1.1.2.65 Thu Nov 14 16:06:17 2019 +++ src/doc/CHANGES-8.2 Sat Nov 16 16:40:29 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.2,v 1.1.2.65 2019/11/14 16:06:17 martin Exp $ +# $NetBSD: CHANGES-8.2,v 1.1.2.66 2019/11/16 16:40:29 martin Exp $ A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2 release: @@ -1567,3 +1567,43 @@ sys/dev/pci/pucdata.c1.105 a clock multiplier of 8, just like the 16C1050 controller. [hauke, ticket #1440] +sys/dev/hyperv/hvkbd.c1.4 +sys/dev/hyperv/if_hvn.c1.6 + + hvn(4), hvkbd(4): No need to call vmbus_channel_setdeferred(). + [nonaka, ticket #1441] + +sys/dev/i2c/spdmem_i2c.c 1.14 + + Use 1-byte data-buffers when writing to the "control" device + for the SPD ROMs to prevent panic. + [msaitoh, ticket #1442] + +sys/arch/arm/nvidia/tegra_xusb.c 1.13-1.14 via patch +sys/dev/pci/xhci_pci.c 1.13 +sys/dev/usb/usb.c 1.169 +sys/dev/usb/usbdivar.h 1.116 +sys/dev/usb/xhci.c 1.93, 1.95, 1.97 +sys/dev/usb/xhcireg.h 1.11-1.12 + + Detect USB 3.1 + [msaitoh, ticket #1443] + +usr.sbin/usbdevs/usbdevs.c 1.36 + + Print USB_SPEED_SUPER_PLUS capability if present. + [msaitoh, ticket #1444] + +sys/arch/arm/sa11x0/sa11x0_ost.c 1.33 + + Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860. + [tsutsui, ticket #1445] + +sys/arch/zaurus/conf/GENERIC 1.85,1.89 +sys/arch/zaurus/conf/INSTALL 1.40 +sys/arch/zaurus/stand/zbsdmod/zbsdmod.c 1.12 +sys/arch/zaurus/zaurus/machdep.c 1.40,1.45 + + Make zaurus kernels use symbols loaded by bootloader. + [tsutsui, ticket #1446] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sat Nov 16 16:40:29 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.2 Log Message: Tickets #1441 - #1446 To generate a diff of this commit: cvs rdiff -u -r1.1.2.65 -r1.1.2.66 src/doc/CHANGES-8.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys
Module Name:src Committed By: martin Date: Sat Nov 16 16:48:26 UTC 2019 Modified Files: src/sys/arch/arm/dts [netbsd-9]: rk3399-rockpro64.dts src/sys/arch/arm/rockchip [netbsd-9]: files.rockchip rk3399_cru.c rk_cru.h rk_cru_composite.c rk_i2c.c src/sys/arch/evbarm/conf [netbsd-9]: GENERIC64 src/sys/conf [netbsd-9]: files src/sys/dev/fdt [netbsd-9]: ausoc.c fdt_clock.c fdtvar.h src/sys/dev/ic [netbsd-9]: dw_hdmi.c dw_hdmi.h Added Files: src/sys/arch/arm/rockchip [netbsd-9]: rk_drm.c rk_drm.h rk_dwhdmi.c rk_fb.c rk_i2s.c rk_vop.c src/sys/dev/ic [netbsd-9]: dw_hdmi_phy.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #427): sys/dev/ic/dw_hdmi_phy.c: revision 1.2 sys/dev/ic/dw_hdmi.c: revision 1.4 sys/dev/fdt/ausoc.c: revision 1.5 sys/dev/ic/dw_hdmi.h: revision 1.2 sys/dev/ic/dw_hdmi.h: revision 1.3 sys/dev/ic/dw_hdmi.h: revision 1.4 sys/conf/files: revision 1.1242 sys/dev/fdt/fdtvar.h: revision 1.57 sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11 sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12 sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13 sys/arch/evbarm/conf/GENERIC64: revision 1.110 sys/arch/arm/rockchip/rk_drm.c: revision 1.1 sys/arch/arm/rockchip/rk_drm.c: revision 1.2 sys/arch/evbarm/conf/GENERIC64: revision 1.112 sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1 sys/dev/fdt/fdt_clock.c: revision 1.10 sys/arch/evbarm/conf/GENERIC64: revision 1.113 sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2 sys/arch/arm/rockchip/rk_drm.h: revision 1.1 sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3 sys/arch/arm/rockchip/rk_fb.c: revision 1.1 sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9 sys/arch/arm/rockchip/rk_vop.c: revision 1.1 sys/arch/arm/rockchip/rk_vop.c: revision 1.2 sys/arch/arm/rockchip/rk_i2c.c: revision 1.6 sys/arch/arm/rockchip/rk_cru.h: revision 1.6 sys/arch/arm/rockchip/rk_cru.h: revision 1.7 sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4 sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5 sys/arch/arm/rockchip/files.rockchip: revision 1.21 sys/arch/arm/rockchip/rk_i2s.c: revision 1.1 sys/arch/arm/rockchip/files.rockchip: revision 1.22 sys/dev/ic/dw_hdmi.c: revision 1.2 sys/dev/ic/dw_hdmi_phy.c: revision 1.1 sys/dev/ic/dw_hdmi.c: revision 1.3 Support reads of more than 32 bytes in a single xfer. Add support for internal DesignWare HDMI PHYs Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts Add HDMI and VOP clocks WIP display driver for Rockchip RK3399 Add (commented out) Rockchip display support Select the correct MPLL and PHY settings for the requested pixel clock Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL rates. Fix typo in phy config table Fix a few swapped fields Remove debug output Enable Rockchip display support Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk Add I2S audio input support. Add software volume controls. Add support for I2S clocks. Add driver for Rockchip I2S/PCM controller. Enable HDMI audio on ROCKPro64 Add rki2s Add audio support To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/arch/arm/dts/rk3399-rockpro64.dts cvs rdiff -u -r1.19 -r1.19.2.1 src/sys/arch/arm/rockchip/files.rockchip cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/arch/arm/rockchip/rk3399_cru.c cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/arch/arm/rockchip/rk_cru.h cvs rdiff -u -r1.3 -r1.3.8.1 src/sys/arch/arm/rockchip/rk_cru_composite.c cvs rdiff -u -r0 -r1.2.2.2 src/sys/arch/arm/rockchip/rk_drm.c \ src/sys/arch/arm/rockchip/rk_vop.c cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/rockchip/rk_drm.h \ src/sys/arch/arm/rockchip/rk_fb.c src/sys/arch/arm/rockchip/rk_i2s.c cvs rdiff -u -r0 -r1.3.2.2 src/sys/arch/arm/rockchip/rk_dwhdmi.c cvs rdiff -u -r1.4.6.1 -r1.4.6.2 src/sys/arch/arm/rockchip/rk_i2c.c cvs rdiff -u -r1.103.2.2 -r1.103.2.3 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.1237.2.1 -r1.1237.2.2 src/sys/conf/files cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/fdt/ausoc.c cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/dev/fdt/fdt_clock.c cvs rdiff -u -r1.52.2.1 -r1.52.2.2 src/sys/dev/fdt/fdtvar.h cvs rdiff -u -r1.1 -r1.1.6.1 src/sys/dev/ic/dw_hdmi.c \ src/sys/dev/ic/dw_hdmi.h cvs rdiff -u -r0 -r1.2.2.2 src/sys/dev/ic/dw_hdmi_phy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys
Module Name:src Committed By: martin Date: Sat Nov 16 16:48:26 UTC 2019 Modified Files: src/sys/arch/arm/dts [netbsd-9]: rk3399-rockpro64.dts src/sys/arch/arm/rockchip [netbsd-9]: files.rockchip rk3399_cru.c rk_cru.h rk_cru_composite.c rk_i2c.c src/sys/arch/evbarm/conf [netbsd-9]: GENERIC64 src/sys/conf [netbsd-9]: files src/sys/dev/fdt [netbsd-9]: ausoc.c fdt_clock.c fdtvar.h src/sys/dev/ic [netbsd-9]: dw_hdmi.c dw_hdmi.h Added Files: src/sys/arch/arm/rockchip [netbsd-9]: rk_drm.c rk_drm.h rk_dwhdmi.c rk_fb.c rk_i2s.c rk_vop.c src/sys/dev/ic [netbsd-9]: dw_hdmi_phy.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #427): sys/dev/ic/dw_hdmi_phy.c: revision 1.2 sys/dev/ic/dw_hdmi.c: revision 1.4 sys/dev/fdt/ausoc.c: revision 1.5 sys/dev/ic/dw_hdmi.h: revision 1.2 sys/dev/ic/dw_hdmi.h: revision 1.3 sys/dev/ic/dw_hdmi.h: revision 1.4 sys/conf/files: revision 1.1242 sys/dev/fdt/fdtvar.h: revision 1.57 sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11 sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12 sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13 sys/arch/evbarm/conf/GENERIC64: revision 1.110 sys/arch/arm/rockchip/rk_drm.c: revision 1.1 sys/arch/arm/rockchip/rk_drm.c: revision 1.2 sys/arch/evbarm/conf/GENERIC64: revision 1.112 sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1 sys/dev/fdt/fdt_clock.c: revision 1.10 sys/arch/evbarm/conf/GENERIC64: revision 1.113 sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2 sys/arch/arm/rockchip/rk_drm.h: revision 1.1 sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3 sys/arch/arm/rockchip/rk_fb.c: revision 1.1 sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9 sys/arch/arm/rockchip/rk_vop.c: revision 1.1 sys/arch/arm/rockchip/rk_vop.c: revision 1.2 sys/arch/arm/rockchip/rk_i2c.c: revision 1.6 sys/arch/arm/rockchip/rk_cru.h: revision 1.6 sys/arch/arm/rockchip/rk_cru.h: revision 1.7 sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4 sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5 sys/arch/arm/rockchip/files.rockchip: revision 1.21 sys/arch/arm/rockchip/rk_i2s.c: revision 1.1 sys/arch/arm/rockchip/files.rockchip: revision 1.22 sys/dev/ic/dw_hdmi.c: revision 1.2 sys/dev/ic/dw_hdmi_phy.c: revision 1.1 sys/dev/ic/dw_hdmi.c: revision 1.3 Support reads of more than 32 bytes in a single xfer. Add support for internal DesignWare HDMI PHYs Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts Add HDMI and VOP clocks WIP display driver for Rockchip RK3399 Add (commented out) Rockchip display support Select the correct MPLL and PHY settings for the requested pixel clock Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL rates. Fix typo in phy config table Fix a few swapped fields Remove debug output Enable Rockchip display support Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk Add I2S audio input support. Add software volume controls. Add support for I2S clocks. Add driver for Rockchip I2S/PCM controller. Enable HDMI audio on ROCKPro64 Add rki2s Add audio support To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/arch/arm/dts/rk3399-rockpro64.dts cvs rdiff -u -r1.19 -r1.19.2.1 src/sys/arch/arm/rockchip/files.rockchip cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/arch/arm/rockchip/rk3399_cru.c cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/arch/arm/rockchip/rk_cru.h cvs rdiff -u -r1.3 -r1.3.8.1 src/sys/arch/arm/rockchip/rk_cru_composite.c cvs rdiff -u -r0 -r1.2.2.2 src/sys/arch/arm/rockchip/rk_drm.c \ src/sys/arch/arm/rockchip/rk_vop.c cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/rockchip/rk_drm.h \ src/sys/arch/arm/rockchip/rk_fb.c src/sys/arch/arm/rockchip/rk_i2s.c cvs rdiff -u -r0 -r1.3.2.2 src/sys/arch/arm/rockchip/rk_dwhdmi.c cvs rdiff -u -r1.4.6.1 -r1.4.6.2 src/sys/arch/arm/rockchip/rk_i2c.c cvs rdiff -u -r1.103.2.2 -r1.103.2.3 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.1237.2.1 -r1.1237.2.2 src/sys/conf/files cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/fdt/ausoc.c cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/dev/fdt/fdt_clock.c cvs rdiff -u -r1.52.2.1 -r1.52.2.2 src/sys/dev/fdt/fdtvar.h cvs rdiff -u -r1.1 -r1.1.6.1 src/sys/dev/ic/dw_hdmi.c \ src/sys/dev/ic/dw_hdmi.h cvs rdiff -u -r0 -r1.2.2.2 src/sys/dev/ic/dw_hdmi_phy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/dts/rk3399-rockpro64.dts diff -u src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.7 src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.7.2.1 --- src/sys/arch/arm/dts/rk3399-rockpro64.dts:1.7 Sun Jul
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Sat Nov 16 16:51:45 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvkbd.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #428): sys/dev/hyperv/if_hvn.c: revision 1.6 sys/dev/hyperv/hvkbd.c: revision 1.4 hvn(4), hvkbd(4): No need to call vmbus_channel_setdeferred(). These devices do not perform batch reading. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/dev/hyperv/hvkbd.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/hvkbd.c diff -u src/sys/dev/hyperv/hvkbd.c:1.2 src/sys/dev/hyperv/hvkbd.c:1.2.2.1 --- src/sys/dev/hyperv/hvkbd.c:1.2 Sun Jul 21 16:08:13 2019 +++ src/sys/dev/hyperv/hvkbd.c Sat Nov 16 16:51:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hvkbd.c,v 1.2 2019/07/21 16:08:13 rin Exp $ */ +/* $NetBSD: hvkbd.c,v 1.2.2.1 2019/11/16 16:51:45 martin Exp $ */ /*- * Copyright (c) 2017 Microsoft Corp. @@ -36,7 +36,7 @@ #endif /* _KERNEL_OPT */ #include -__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.2 2019/07/21 16:08:13 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.2.2.1 2019/11/16 16:51:45 martin Exp $"); #include #include @@ -216,12 +216,6 @@ hvkbd_attach(device_t parent, device_t s return; } - if (vmbus_channel_setdeferred(sc->sc_chan, device_xname(self))) { - aprint_error_dev(self, - "failed to create the interrupt thread\n"); - goto free_buf; - } - sc->sc_chan->ch_flags &= ~CHF_BATCHED; if (vmbus_channel_open(sc->sc_chan, HVKBD_TX_RING_SIZE + HVKBD_RX_RING_SIZE, NULL, 0, hvkbd_intr, sc)) { Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.4 src/sys/dev/hyperv/if_hvn.c:1.4.2.1 --- src/sys/dev/hyperv/if_hvn.c:1.4 Tue Jul 9 08:46:58 2019 +++ src/sys/dev/hyperv/if_hvn.c Sat Nov 16 16:51:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.4 2019/07/09 08:46:58 msaitoh Exp $ */ +/* $NetBSD: if_hvn.c,v 1.4.2.1 2019/11/16 16:51:45 martin Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4 2019/07/09 08:46:58 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.1 2019/11/16 16:51:45 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -928,12 +928,6 @@ hvn_nvs_attach(struct hvn_softc *sc) sc->sc_chan->ch_flags &= ~CHF_BATCHED; - if (vmbus_channel_setdeferred(sc->sc_chan, device_xname(sc->sc_dev))) { - aprint_error_dev(sc->sc_dev, - "failed to create the interrupt thread\n"); - return -1; - } - /* Associate our interrupt handler with the channel */ if (vmbus_channel_open(sc->sc_chan, ringsize, NULL, 0, hvn_nvs_intr, sc)) {
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Sat Nov 16 16:51:45 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvkbd.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #428): sys/dev/hyperv/if_hvn.c: revision 1.6 sys/dev/hyperv/hvkbd.c: revision 1.4 hvn(4), hvkbd(4): No need to call vmbus_channel_setdeferred(). These devices do not perform batch reading. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/dev/hyperv/hvkbd.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/x86/pci
Module Name:src Committed By: martin Date: Sat Nov 16 16:53:13 UTC 2019 Modified Files: src/sys/arch/x86/pci [netbsd-9]: msipic.c Log Message: Pull up following revision(s) (requested by hikaru in ticket #429): sys/arch/x86/pci/msipic.c: revision 1.19 Disable MSI-X before writing the MSI-X table. That fixes MSI-X interrupt lost on VMware ESXi 6.7 PCI passthrough devices. ok knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.17.2.1 -r1.17.2.2 src/sys/arch/x86/pci/msipic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/x86/pci
Module Name:src Committed By: martin Date: Sat Nov 16 16:53:13 UTC 2019 Modified Files: src/sys/arch/x86/pci [netbsd-9]: msipic.c Log Message: Pull up following revision(s) (requested by hikaru in ticket #429): sys/arch/x86/pci/msipic.c: revision 1.19 Disable MSI-X before writing the MSI-X table. That fixes MSI-X interrupt lost on VMware ESXi 6.7 PCI passthrough devices. ok knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.17.2.1 -r1.17.2.2 src/sys/arch/x86/pci/msipic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/msipic.c diff -u src/sys/arch/x86/pci/msipic.c:1.17.2.1 src/sys/arch/x86/pci/msipic.c:1.17.2.2 --- src/sys/arch/x86/pci/msipic.c:1.17.2.1 Tue Oct 15 18:08:31 2019 +++ src/sys/arch/x86/pci/msipic.c Sat Nov 16 16:53:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msipic.c,v 1.17.2.1 2019/10/15 18:08:31 martin Exp $ */ +/* $NetBSD: msipic.c,v 1.17.2.2 2019/11/16 16:53:13 martin Exp $ */ /* * Copyright (c) 2015 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.17.2.1 2019/10/15 18:08:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.17.2.2 2019/11/16 16:53:13 martin Exp $"); #include "opt_intrdebug.h" @@ -548,6 +548,11 @@ msix_addroute(struct pic *pic, struct cp err = pci_get_capability(pc, tag, PCI_CAP_MSIX, &off, NULL); KASSERT(err != 0); + /* Disable MSI-X before writing MSI-X table */ + ctl = pci_conf_read(pc, tag, off + PCI_MSIX_CTL); + ctl &= ~PCI_MSIX_CTL_ENABLE; + pci_conf_write(pc, tag, off + PCI_MSIX_CTL, ctl); + entry_base = PCI_MSIX_TABLE_ENTRY_SIZE * msix_vec; /*
CVS commit: [netbsd-9] src/sys/arch
Module Name:src Committed By: martin Date: Sat Nov 16 16:55:47 UTC 2019 Modified Files: src/sys/arch/arm/sa11x0 [netbsd-9]: sa11x0_ost.c src/sys/arch/zaurus/zaurus [netbsd-9]: autoconf.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #430): sys/arch/arm/sa11x0/sa11x0_ost.c: revision 1.33 sys/arch/zaurus/zaurus/autoconf.c: revision 1.13 Fix attach failure of zaudio(4) WM8731 (C7x0/860) and WM8750 (C1000/3x00). The new MI iic(4) layer requires an explicit quirk info of PROBE_STRATEGY via device properties. Fixes PR kern/54658. Should be pulled up to netbsd-9. - Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860. When kernels were configured for both CPU_XSCALE_PXA270 and CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9) then all delay(9) during configure(9) returned immediately. While here, use proper macro with description for readability. Should be pulled up to netbsd-8 and netbsd-9. (though zaudio(4) won't work on netbsd-8) To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.32.20.1 src/sys/arch/arm/sa11x0/sa11x0_ost.c cvs rdiff -u -r1.12 -r1.12.44.1 src/sys/arch/zaurus/zaurus/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch
Module Name:src Committed By: martin Date: Sat Nov 16 16:55:47 UTC 2019 Modified Files: src/sys/arch/arm/sa11x0 [netbsd-9]: sa11x0_ost.c src/sys/arch/zaurus/zaurus [netbsd-9]: autoconf.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #430): sys/arch/arm/sa11x0/sa11x0_ost.c: revision 1.33 sys/arch/zaurus/zaurus/autoconf.c: revision 1.13 Fix attach failure of zaudio(4) WM8731 (C7x0/860) and WM8750 (C1000/3x00). The new MI iic(4) layer requires an explicit quirk info of PROBE_STRATEGY via device properties. Fixes PR kern/54658. Should be pulled up to netbsd-9. - Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860. When kernels were configured for both CPU_XSCALE_PXA270 and CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9) then all delay(9) during configure(9) returned immediately. While here, use proper macro with description for readability. Should be pulled up to netbsd-8 and netbsd-9. (though zaudio(4) won't work on netbsd-8) To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.32.20.1 src/sys/arch/arm/sa11x0/sa11x0_ost.c cvs rdiff -u -r1.12 -r1.12.44.1 src/sys/arch/zaurus/zaurus/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sa11x0/sa11x0_ost.c diff -u src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.32 src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.32.20.1 --- src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.32 Sun Oct 9 14:43:17 2016 +++ src/sys/arch/arm/sa11x0/sa11x0_ost.c Sat Nov 16 16:55:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sa11x0_ost.c,v 1.32 2016/10/09 14:43:17 christos Exp $ */ +/* $NetBSD: sa11x0_ost.c,v 1.32.20.1 2019/11/16 16:55:46 martin Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sa11x0_ost.c,v 1.32 2016/10/09 14:43:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sa11x0_ost.c,v 1.32.20.1 2019/11/16 16:55:46 martin Exp $"); #include #include @@ -80,14 +80,23 @@ struct saost_softc { static struct saost_softc *saost_sc = NULL; +#define PXA270_OST_FREQ 325 /* PXA270 uses 3.25MHz */ +#define SAOST_FREQ 3686400 /* Others use 3.6864MHz */ +#define SAOST_MAXFREQ SAOST_FREQ + #if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) +/* + * On dynamic configuration, assume fastest frequency for early delay(9) + * before tc_init(9), because longer delay(9) is almost harmless during + * device probe and initialization. + */ #include -static uint32_t freq; -#define TIMER_FREQUENCY freq +static uint32_t saost_freq = SAOST_MAXFREQ; +#define TIMER_FREQUENCY saost_freq #elif defined(CPU_XSCALE_PXA270) -#define TIMER_FREQUENCY 325 /* PXA270 uses 3.25MHz */ +#define TIMER_FREQUENCY PXA270_OST_FREQ #else -#define TIMER_FREQUENCY 3686400 /* 3.6864MHz */ +#define TIMER_FREQUENCY SAOST_FREQ #endif #ifndef STATHZ @@ -230,7 +239,7 @@ cpu_initclocks(void) stathz = STATHZ; profhz = stathz; #if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) - TIMER_FREQUENCY = (CPU_IS_PXA250) ? 3686400 : 325; + TIMER_FREQUENCY = (CPU_IS_PXA270) ? PXA270_OST_FREQ : SAOST_FREQ; #endif sc->sc_statclock_step = TIMER_FREQUENCY / stathz; Index: src/sys/arch/zaurus/zaurus/autoconf.c diff -u src/sys/arch/zaurus/zaurus/autoconf.c:1.12 src/sys/arch/zaurus/zaurus/autoconf.c:1.12.44.1 --- src/sys/arch/zaurus/zaurus/autoconf.c:1.12 Sun Jul 29 18:05:47 2012 +++ src/sys/arch/zaurus/zaurus/autoconf.c Sat Nov 16 16:55:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.12 2012/07/29 18:05:47 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.12.44.1 2019/11/16 16:55:46 martin Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2012/07/29 18:05:47 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12.44.1 2019/11/16 16:55:46 martin Exp $"); #include "opt_md.h" @@ -43,6 +43,8 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v #include #include +#include + #include #include #include @@ -219,5 +221,13 @@ void device_register(device_t dev, void *aux) { - /* Nothing to do */ + /* + * I2C bus conntected to pxaiic(4) for zaudio(4) devices has + * limited capabilities. + */ + if (device_is_a(dev, "iic") && + device_is_a(dev->dv_parent, "ziic")) { + (void)prop_dictionary_set_cstring_nocopy(device_properties(dev), + I2C_PROP_INDIRECT_PROBE_STRATEGY, I2C_PROBE_STRATEGY_NONE); + } }
CVS commit: [netbsd-9] src/sys/arch/zaurus
Module Name:src Committed By: martin Date: Sat Nov 16 16:59:15 UTC 2019 Modified Files: src/sys/arch/zaurus/conf [netbsd-9]: GENERIC INSTALL src/sys/arch/zaurus/stand/zbsdmod [netbsd-9]: zbsdmod.c src/sys/arch/zaurus/zaurus [netbsd-9]: machdep.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #431): sys/arch/zaurus/conf/GENERIC: revision 1.89 sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.12 sys/arch/zaurus/conf/INSTALL: revision 1.40 sys/arch/zaurus/zaurus/machdep.c: revision 1.45 Make zaurus kernels use symbol tables loaded by the bootloader. Now COPY_SYMTAB is no longer necessary and it saves ~500kbytes of GENERIC, so re-enable options DDB (i.e. revert GENERIC rev 1.85). Also fix zbsdmod.o (a kernel loader for Zaurus Linux) to load symbols at a proper address as the MI sys/lib/libsa/loadfile_elf32.c does. No particular comment on port-zaurus@: https://mail-index.netbsd.org/port-zaurus/2019/11/11/msg86.html Note zbsdmod.c (derived from OpenBSD/zaurus) assumed that the loaded kernels had "esym" variable at the top of its data section and implicitly overwrote it with the address of loaded symbol tables. OpenBSD/zaurus kernels used the esym value written by the zbsdmod.o to initialize ksyms(4) on startup, but we will avoid such implicit MD interface between the bootloader and kernels (though we don't bother to add a symbol address value into bootinfo but just assume symbols are loaded at end[] of a loaded kernel, as per the MI libsa loadfile() implementation). Worth to pullup to both netbsd-8 and netbsd-9. To generate a diff of this commit: cvs rdiff -u -r1.86.2.1 -r1.86.2.2 src/sys/arch/zaurus/conf/GENERIC cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/arch/zaurus/conf/INSTALL cvs rdiff -u -r1.9.34.1 -r1.9.34.2 \ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c cvs rdiff -u -r1.42 -r1.42.2.1 src/sys/arch/zaurus/zaurus/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/zaurus
Module Name:src Committed By: martin Date: Sat Nov 16 16:59:15 UTC 2019 Modified Files: src/sys/arch/zaurus/conf [netbsd-9]: GENERIC INSTALL src/sys/arch/zaurus/stand/zbsdmod [netbsd-9]: zbsdmod.c src/sys/arch/zaurus/zaurus [netbsd-9]: machdep.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #431): sys/arch/zaurus/conf/GENERIC: revision 1.89 sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.12 sys/arch/zaurus/conf/INSTALL: revision 1.40 sys/arch/zaurus/zaurus/machdep.c: revision 1.45 Make zaurus kernels use symbol tables loaded by the bootloader. Now COPY_SYMTAB is no longer necessary and it saves ~500kbytes of GENERIC, so re-enable options DDB (i.e. revert GENERIC rev 1.85). Also fix zbsdmod.o (a kernel loader for Zaurus Linux) to load symbols at a proper address as the MI sys/lib/libsa/loadfile_elf32.c does. No particular comment on port-zaurus@: https://mail-index.netbsd.org/port-zaurus/2019/11/11/msg86.html Note zbsdmod.c (derived from OpenBSD/zaurus) assumed that the loaded kernels had "esym" variable at the top of its data section and implicitly overwrote it with the address of loaded symbol tables. OpenBSD/zaurus kernels used the esym value written by the zbsdmod.o to initialize ksyms(4) on startup, but we will avoid such implicit MD interface between the bootloader and kernels (though we don't bother to add a symbol address value into bootinfo but just assume symbols are loaded at end[] of a loaded kernel, as per the MI libsa loadfile() implementation). Worth to pullup to both netbsd-8 and netbsd-9. To generate a diff of this commit: cvs rdiff -u -r1.86.2.1 -r1.86.2.2 src/sys/arch/zaurus/conf/GENERIC cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/arch/zaurus/conf/INSTALL cvs rdiff -u -r1.9.34.1 -r1.9.34.2 \ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c cvs rdiff -u -r1.42 -r1.42.2.1 src/sys/arch/zaurus/zaurus/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/zaurus/conf/GENERIC diff -u src/sys/arch/zaurus/conf/GENERIC:1.86.2.1 src/sys/arch/zaurus/conf/GENERIC:1.86.2.2 --- src/sys/arch/zaurus/conf/GENERIC:1.86.2.1 Mon Nov 4 14:34:28 2019 +++ src/sys/arch/zaurus/conf/GENERIC Sat Nov 16 16:59:15 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.86.2.1 2019/11/04 14:34:28 martin Exp $ +# $NetBSD: GENERIC,v 1.86.2.2 2019/11/16 16:59:15 martin Exp $ # # GENERIC machine description file # @@ -150,11 +150,10 @@ options WSDISPLAY_COMPAT_RAWKBD # can options DIAGNOSTIC # internal consistency checks #options DEBUG #options VERBOSE_INIT_ARM # verbose bootstraping messages -#options DDB # in-kernel debugger -#options DDB_HISTORY_SIZE=100 # Enable history editing in DDB +options DDB # in-kernel debugger +options DDB_HISTORY_SIZE=100 # Enable history editing in DDB #options KGDB #makeoptions DEBUG="-g" # compile full symbol table -makeoptions COPY_SYMTAB=1 # Kernel root file system and dump configuration. Index: src/sys/arch/zaurus/conf/INSTALL diff -u src/sys/arch/zaurus/conf/INSTALL:1.39 src/sys/arch/zaurus/conf/INSTALL:1.39.4.1 --- src/sys/arch/zaurus/conf/INSTALL:1.39 Thu Feb 7 20:56:27 2019 +++ src/sys/arch/zaurus/conf/INSTALL Sat Nov 16 16:59:15 2019 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.39 2019/02/07 20:56:27 rin Exp $ +# $NetBSD: INSTALL,v 1.39.4.1 2019/11/16 16:59:15 martin Exp $ # # INSTALL config file (GENERIC with memory disk root) # @@ -59,7 +59,6 @@ options RASOPS_SMALL no options DIAGNOSTIC no options DDB no options DDB_HISTORY_SIZE -no makeoptions COPY_SYMTAB no options PXA2X0_DMAC_DMOVER_CONCURRENCY Index: src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c diff -u src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.9.34.1 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.9.34.2 --- src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.9.34.1 Sun Nov 3 11:36:56 2019 +++ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c Sat Nov 16 16:59:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: zbsdmod.c,v 1.9.34.1 2019/11/03 11:36:56 martin Exp $ */ +/* $NetBSD: zbsdmod.c,v 1.9.34.2 2019/11/16 16:59:15 martin Exp $ */ /* $OpenBSD: zbsdmod.c,v 1.7 2005/05/02 02:45:29 uwe Exp $ */ /* @@ -139,8 +139,8 @@ elf32bsdboot(void) if (maxv < posv) maxv = posv; } - if (IS_DATA(phdr[i]) && IS_BSS(phdr[i])) { - posv += phdr[i].p_memsz; + if (IS_BSS(phdr[i])) { + posv += phdr[i].p_memsz - phdr[i].p_filesz; if (maxv < posv) maxv = posv; } Index: src/sys/arch/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.42 src/sys/arch/zaurus/zaurus/machdep.c:1.42.2.1 --- src/sys/arch/zaurus/zaurus/machdep.c:1.42 Tue Jul 16 14:41:49 2019 +++ src/sys/arch/zaurus/zaurus/machdep.c Sat Nov 16 16:59:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.42 2019/07/16 14:41:49 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.42.2.1 2019/11/16 16:59:15 martin Exp $ */
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sat Nov 16 17:01:45 UTC 2019 Modified Files: src/sys/netinet6 [netbsd-9]: ip6_input.c Log Message: Pull up following revision(s) (requested by maxv in ticket #432): sys/netinet6/ip6_input.c: revision 1.215 Add more checks in ip6_pullexthdr, to prevent a panic in m_copydata. The Rip6 entry point could see a garbage Hop6 option. Not a big issue, since it's a clean panic only triggerable if the socket has the IN6P_DSTOPTS/IN6P_RTHDR option. To generate a diff of this commit: cvs rdiff -u -r1.208.2.3 -r1.208.2.4 src/sys/netinet6/ip6_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_input.c diff -u src/sys/netinet6/ip6_input.c:1.208.2.3 src/sys/netinet6/ip6_input.c:1.208.2.4 --- src/sys/netinet6/ip6_input.c:1.208.2.3 Wed Oct 23 19:33:07 2019 +++ src/sys/netinet6/ip6_input.c Sat Nov 16 17:01:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.208.2.3 2019/10/23 19:33:07 martin Exp $ */ +/* $NetBSD: ip6_input.c,v 1.208.2.4 2019/11/16 17:01:45 martin Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.208.2.3 2019/10/23 19:33:07 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.208.2.4 2019/11/16 17:01:45 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_gateway.h" @@ -1056,6 +1056,8 @@ ip6_savecontrol(struct in6pcb *in6p, str #define IS2292(x, y) (y) #endif + KASSERT(m->m_flags & M_PKTHDR); + if (SOOPT_TIMESTAMP(so->so_options)) mp = sbsavetimestamp(so->so_options, mp); @@ -1297,12 +1299,18 @@ ip6_pullexthdr(struct mbuf *m, size_t of size_t elen; struct mbuf *n; + if (off + sizeof(ip6e) > m->m_pkthdr.len) + return NULL; + m_copydata(m, off, sizeof(ip6e), (void *)&ip6e); if (nxt == IPPROTO_AH) elen = (ip6e.ip6e_len + 2) << 2; else elen = (ip6e.ip6e_len + 1) << 3; + if (off + elen > m->m_pkthdr.len) + return NULL; + MGET(n, M_DONTWAIT, MT_DATA); if (n && elen >= MLEN) { MCLGET(n, M_DONTWAIT);
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sat Nov 16 17:01:45 UTC 2019 Modified Files: src/sys/netinet6 [netbsd-9]: ip6_input.c Log Message: Pull up following revision(s) (requested by maxv in ticket #432): sys/netinet6/ip6_input.c: revision 1.215 Add more checks in ip6_pullexthdr, to prevent a panic in m_copydata. The Rip6 entry point could see a garbage Hop6 option. Not a big issue, since it's a clean panic only triggerable if the socket has the IN6P_DSTOPTS/IN6P_RTHDR option. To generate a diff of this commit: cvs rdiff -u -r1.208.2.3 -r1.208.2.4 src/sys/netinet6/ip6_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Nov 16 17:02:38 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Tickets #427 - #432 To generate a diff of this commit: cvs rdiff -u -r1.1.2.102 -r1.1.2.103 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.0 diff -u src/doc/CHANGES-9.0:1.1.2.102 src/doc/CHANGES-9.0:1.1.2.103 --- src/doc/CHANGES-9.0:1.1.2.102 Thu Nov 14 15:42:47 2019 +++ src/doc/CHANGES-9.0 Sat Nov 16 17:02:38 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.0,v 1.1.2.102 2019/11/14 15:42:47 martin Exp $ +# $NetBSD: CHANGES-9.0,v 1.1.2.103 2019/11/16 17:02:38 martin Exp $ A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30 until the 9.0 release: @@ -5705,3 +5705,58 @@ sys/dev/pci/pucdata.c1.105 a clock multiplier of 8, just like the 16C1050 controller. [hauke, ticket #426] +sys/arch/arm/dts/rk3399-rockpro64.dts 1.9 +sys/arch/arm/rockchip/files.rockchip 1.21,1.22 +sys/arch/arm/rockchip/rk3399_cru.c 1.11-1.13 +sys/arch/arm/rockchip/rk_cru.h 1.6,1.7 +sys/arch/arm/rockchip/rk_cru_composite.c 1.4,1.5 +sys/arch/arm/rockchip/rk_drm.c 1.1,1.2 +sys/arch/arm/rockchip/rk_drm.h 1.1 +sys/arch/arm/rockchip/rk_dwhdmi.c 1.1-1.3 +sys/arch/arm/rockchip/rk_fb.c 1.1 +sys/arch/arm/rockchip/rk_i2c.c 1.6 +sys/arch/arm/rockchip/rk_i2s.c 1.1 +sys/arch/arm/rockchip/rk_vop.c 1.1,1.2 +sys/arch/evbarm/conf/GENERIC64 1.110,1.112,1.113 +sys/conf/files 1.1242 +sys/dev/fdt/ausoc.c1.5 +sys/dev/fdt/fdt_clock.c1.10 +sys/dev/fdt/fdtvar.h1.57 +sys/dev/ic/dw_hdmi.c1.2-1.4 +sys/dev/ic/dw_hdmi.h1.2-1.4 +sys/dev/ic/dw_hdmi_phy.c 1.1,1.2 + + arm: rockchip: rk3399 display and HDMI audio support. + [jmcneill, ticket #427] + +sys/dev/hyperv/hvkbd.c1.4 +sys/dev/hyperv/if_hvn.c1.6 + + hvn(4), hvkbd(4): No need to call vmbus_channel_setdeferred(). + [nonaka, ticket #428] + +sys/arch/x86/pci/msipic.c 1.19 + + Disable MSI-X before writing the MSI-X table. + [hikaru, ticket #429] + +sys/arch/arm/sa11x0/sa11x0_ost.c 1.33 +sys/arch/zaurus/zaurus/autoconf.c 1.13 + + Fix zaurus zaudio(4) attach failure. + [tsutsui, ticket #430] + +sys/arch/zaurus/conf/GENERIC 1.89 +sys/arch/zaurus/conf/INSTALL 1.40 +sys/arch/zaurus/stand/zbsdmod/zbsdmod.c 1.12 +sys/arch/zaurus/zaurus/machdep.c 1.45 + + Make zaurus kernels use symbol tables loaded by the bootloader. + [tsutsui, ticket #431] + +sys/netinet6/ip6_input.c 1.215 + + Add more checks in ip6_pullexthdr, to prevent a panic in m_copydata. + The Rip6 entry point could see a garbage Hop6 option. + [maxv, ticket #432] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Nov 16 17:02:38 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Tickets #427 - #432 To generate a diff of this commit: cvs rdiff -u -r1.1.2.102 -r1.1.2.103 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man7
Module Name:src Committed By: nia Date: Sat Nov 16 17:33:09 UTC 2019 Modified Files: src/share/man/man7: sysctl.7 Log Message: Document usage of KERN_ARND To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/share/man/man7/sysctl.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man7
Module Name:src Committed By: nia Date: Sat Nov 16 17:33:09 UTC 2019 Modified Files: src/share/man/man7: sysctl.7 Log Message: Document usage of KERN_ARND To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/share/man/man7/sysctl.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.141 src/share/man/man7/sysctl.7:1.142 --- src/share/man/man7/sysctl.7:1.141 Thu Nov 14 21:23:46 2019 +++ src/share/man/man7/sysctl.7 Sat Nov 16 17:33:09 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.7,v 1.141 2019/11/14 21:23:46 jdolecek Exp $ +.\" $NetBSD: sysctl.7,v 1.142 2019/11/16 17:33:09 nia Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -383,8 +383,10 @@ the variable may be created and removed upon loading or unloading the corresponding kernel module. .It Li kern.aio_max The maximum number of asynchronous I/O operations. -.It Li kern.arandom -This variable picks a random number each time it is queried. +.It Li kern.arandom ( Dv KERN_ARND ) +This variable returns up to 256 bytes of random data. +Multiple queries can be used to obtain an infinite amount of +non-blocking cryptographically secure random data. The used random number generator .Pf ( RNG ) is based on
CVS commit: src/usr.bin/msgc
Module Name:src Committed By: martin Date: Sat Nov 16 17:38:09 UTC 2019 Modified Files: src/usr.bin/msgc: msg_sys.def Log Message: msg_table_add(): fix mishap in the format safety changes in r1.45 To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/usr.bin/msgc/msg_sys.def Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/msgc
Module Name:src Committed By: martin Date: Sat Nov 16 17:38:09 UTC 2019 Modified Files: src/usr.bin/msgc: msg_sys.def Log Message: msg_table_add(): fix mishap in the format safety changes in r1.45 To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/usr.bin/msgc/msg_sys.def Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/msgc/msg_sys.def diff -u src/usr.bin/msgc/msg_sys.def:1.47 src/usr.bin/msgc/msg_sys.def:1.48 --- src/usr.bin/msgc/msg_sys.def:1.47 Tue Jun 25 21:09:33 2019 +++ src/usr.bin/msgc/msg_sys.def Sat Nov 16 17:38:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_sys.def,v 1.47 2019/06/25 21:09:33 joerg Exp $ */ +/* $NetBSD: msg_sys.def,v 1.48 2019/11/16 17:38:09 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -653,7 +653,7 @@ void msg_table_add(msg msg_no) { - msg_printf("%s", msg_string(msg_no)); + msg_fmt_table_add(msg_no, ""); } void __printflike(2, 3)
CVS commit: src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: martin Date: Sat Nov 16 17:53:02 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/i386: msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl Log Message: Fix table of bios geomatries To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/i386/msg.md.de \ src/usr.sbin/sysinst/arch/i386/msg.md.en \ src/usr.sbin/sysinst/arch/i386/msg.md.es \ src/usr.sbin/sysinst/arch/i386/msg.md.fr \ src/usr.sbin/sysinst/arch/i386/msg.md.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: martin Date: Sat Nov 16 17:53:02 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/i386: msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl Log Message: Fix table of bios geomatries To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/i386/msg.md.de \ src/usr.sbin/sysinst/arch/i386/msg.md.en \ src/usr.sbin/sysinst/arch/i386/msg.md.es \ src/usr.sbin/sysinst/arch/i386/msg.md.fr \ src/usr.sbin/sysinst/arch/i386/msg.md.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/arch/i386/msg.md.de diff -u src/usr.sbin/sysinst/arch/i386/msg.md.de:1.2 src/usr.sbin/sysinst/arch/i386/msg.md.de:1.3 --- src/usr.sbin/sysinst/arch/i386/msg.md.de:1.2 Thu Nov 14 19:26:58 2019 +++ src/usr.sbin/sysinst/arch/i386/msg.md.de Sat Nov 16 17:53:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.md.de,v 1.2 2019/11/14 19:26:58 martin Exp $ */ +/* $NetBSD: msg.md.de,v 1.3 2019/11/16 17:53:02 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -82,8 +82,8 @@ message onebiosmatch } message onebiosmatch_header -{BIOS # Zylinder Köpfe Sektoren Anzahl Sektoren GB --- - --- --- +{BIOS # Zylinder Köpfe Sektoren Anzahl Sektoren GB +-- - --- } message onebiosmatch_row @@ -97,13 +97,13 @@ message Use_one_of_these_disks {Benutzen Sie eine dieser Festplatten} message biosmultmatch -{Diese Festplatte entspricht der folgenden BIOS Disk: +{Diese Festplatte entspricht den folgenden BIOS Disks: } message biosmultmatch_header -{ BIOS # Zylinder Köpfe Sektoren Anzahl Sektoren GB - -- - --- --- +{ BIOS # Zylinder Köpfe Sektoren Anzahl Sektoren GB + -- - } message biosmultmatch_row Index: src/usr.sbin/sysinst/arch/i386/msg.md.en diff -u src/usr.sbin/sysinst/arch/i386/msg.md.en:1.2 src/usr.sbin/sysinst/arch/i386/msg.md.en:1.3 --- src/usr.sbin/sysinst/arch/i386/msg.md.en:1.2 Thu Nov 14 19:26:58 2019 +++ src/usr.sbin/sysinst/arch/i386/msg.md.en Sat Nov 16 17:53:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.md.en,v 1.2 2019/11/14 19:26:58 martin Exp $ */ +/* $NetBSD: msg.md.en,v 1.3 2019/11/16 17:53:02 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -82,8 +82,8 @@ message onebiosmatch } message onebiosmatch_header -{BIOS # cylinders heads sectors total sectors GB --- - - --- - --- +{BIOS # cylinders heads sectors total sectors GB +-- - - --- - } message onebiosmatch_row Index: src/usr.sbin/sysinst/arch/i386/msg.md.es diff -u src/usr.sbin/sysinst/arch/i386/msg.md.es:1.2 src/usr.sbin/sysinst/arch/i386/msg.md.es:1.3 --- src/usr.sbin/sysinst/arch/i386/msg.md.es:1.2 Thu Nov 14 19:26:58 2019 +++ src/usr.sbin/sysinst/arch/i386/msg.md.es Sat Nov 16 17:53:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.md.es,v 1.2 2019/11/14 19:26:58 martin Exp $ */ +/* $NetBSD: msg.md.es,v 1.3 2019/11/16 17:53:02 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -82,8 +82,8 @@ message onebiosmatch } message onebiosmatch_header -{BIOS # cilindros cabez sectors sect. totales GB --- - - --- - --- +{BIOS # cilindros cabez sectors sect. totales GB +-- - - --- - } message onebiosmatch_row @@ -102,7 +102,7 @@ message biosmultmatch } message biosmultmatch_header -{ BIOS # cilindros cabez sectors sect totales GB +{ BIOS # cilindros cabez sectors sect totales GB -- - - --- - } Index: src/usr.sbin/sysinst/arch/i386/msg.md.fr diff -u src/usr.sbin/sysinst/arch/i386/msg.md.fr:1.2 src/usr.sbin/sysinst/arch/i386/msg.md.fr:1.3 --- src/usr.sbin/sysinst/arch/i386/msg.md.fr:1.2 Thu Nov 14 19:26:58 2019 +++ src/usr.sbin/sysinst/arch/i386/msg.md.fr Sat Nov 16 17:53:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.md.fr,v 1.2 2019/11/14 19:26:58 martin Exp $ */ +/* $NetBSD: msg.md.fr,v 1.3 2019/11/16 17:53:02 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -82,8 +82,8 @@ message onebiosmatch } message onebiosmatch_header -{BIOS # cylindres têtes secteurs nb total de secteurs GB --- - - --- +{BIOS # cylindres têtes secteurs nb total de secteurs GB +-- - - } message onebiosmatch_row /* XXX adjust for length of titles above */ @@ -102,8 +102,8 @@ message biosmultmatch } message biosmultmatch_header -{ BIOS # cylindres têtes secteurs nb total de secteurs GB - -- - - --- +{ BIOS # cylindres têtes secteurs nb to
CVS commit: src/sys/dev/nvmm/x86
Module Name:src Committed By: maxv Date: Sat Nov 16 17:53:46 UTC 2019 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86.c Log Message: Don't report MWAITX by default. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nvmm/x86/nvmm_x86.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/nvmm/x86/nvmm_x86.c diff -u src/sys/dev/nvmm/x86/nvmm_x86.c:1.7 src/sys/dev/nvmm/x86/nvmm_x86.c:1.8 --- src/sys/dev/nvmm/x86/nvmm_x86.c:1.7 Wed May 15 04:39:52 2019 +++ src/sys/dev/nvmm/x86/nvmm_x86.c Sat Nov 16 17:53:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86.c,v 1.7 2019/05/15 04:39:52 maxv Exp $ */ +/* $NetBSD: nvmm_x86.c,v 1.8 2019/11/16 17:53:46 maxv Exp $ */ /* * Copyright (c) 2018-2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86.c,v 1.7 2019/05/15 04:39:52 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86.c,v 1.8 2019/11/16 17:53:46 maxv Exp $"); #include #include @@ -292,7 +292,7 @@ const struct nvmm_x86_cpuid_mask nvmm_cp .eax = ~0, .ebx = ~0, .ecx = - /* Excluded: SVM, EAPIC, OSVW. */ + /* Excluded: SVM, EAPIC, OSVW, MWAITX. */ CPUID_LAHF | CPUID_CMPLEGACY | CPUID_ALTMOVCR0 | CPUID_LZCNT | CPUID_SSE4A | CPUID_MISALIGNSSE | @@ -304,7 +304,7 @@ const struct nvmm_x86_cpuid_mask nvmm_cp CPUID_TOPOEXT | CPUID_PCEC | CPUID_PCENB | CPUID_SPM | CPUID_DBE | CPUID_PTSC | - CPUID_L2IPERFC | CPUID_MWAITX, + CPUID_L2IPERFC, .edx = /* Excluded: RDTSCP. */ CPUID_SYSCALL | CPUID_MPC |
CVS commit: src/sys/dev/nvmm/x86
Module Name:src Committed By: maxv Date: Sat Nov 16 17:53:46 UTC 2019 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86.c Log Message: Don't report MWAITX by default. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nvmm/x86/nvmm_x86.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: martin Date: Sat Nov 16 18:08:36 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/i386: md.c Log Message: knf style adjustments To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/arch/i386/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/arch/i386/md.c diff -u src/usr.sbin/sysinst/arch/i386/md.c:1.22 src/usr.sbin/sysinst/arch/i386/md.c:1.23 --- src/usr.sbin/sysinst/arch/i386/md.c:1.22 Tue Nov 12 16:33:14 2019 +++ src/usr.sbin/sysinst/arch/i386/md.c Sat Nov 16 18:08:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.22 2019/11/12 16:33:14 martin Exp $ */ +/* $NetBSD: md.c,v 1.23 2019/11/16 18:08:36 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -256,11 +256,12 @@ md_post_newfs_bios(struct install_partit * Too hard to double check, so just 'know' the device numbers. */ len = sizeof condev; - if (sysctl(conmib, __arraycount(conmib), &condev, &len, NULL, 0) != -1 - && (condev & ~3) == 0x800) { + if (sysctl(conmib, __arraycount(conmib), &condev, &len, NULL, + 0) != -1 && (condev & ~3) == 0x800) { /* Motherboard serial port */ boottype.bp_consdev = (condev & 3) + 1; - /* Defaulting the baud rate to that of stdin should suffice */ + /* Defaulting the baud rate to that of stdin should + suffice */ if (tcgetattr(0, &t) != -1) boottype.bp_conspeed = t.c_ispeed; }
CVS commit: src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: martin Date: Sat Nov 16 18:08:59 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/i386: menus.md Log Message: Make the bootblock selection menu more sane, pointed out by maxv To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/i386/menus.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/arch/i386/menus.md diff -u src/usr.sbin/sysinst/arch/i386/menus.md:1.2 src/usr.sbin/sysinst/arch/i386/menus.md:1.3 --- src/usr.sbin/sysinst/arch/i386/menus.md:1.2 Thu Jun 20 00:43:56 2019 +++ src/usr.sbin/sysinst/arch/i386/menus.md Sat Nov 16 18:08:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: menus.md,v 1.2 2019/06/20 00:43:56 christos Exp $ */ +/* $NetBSD: menus.md,v 1.3 2019/11/16 18:08:59 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -34,7 +34,8 @@ /* Menu definitions for sysinst. i386 version, machine dependent. */ -menu getboottype, title MSG_Bootblocks_selection, y=10, exit, no clear; +menu getboottype, title MSG_Bootblocks_selection, y=10, exit, no clear, + exitstring MSG_Continue; display action { msg_display(MSG_getboottype); switch (((struct x86_boot_params *)arg)->bp_consdev) { default: @@ -52,7 +53,7 @@ menu getboottype, title MSG_Bootblocks_s msg_display_add(MSG_console_unchanged); break; }}; - option MSG_Use_normal_bootblocks, action + option MSG_Use_normal_bootblocks, exit, action {((struct x86_boot_params *)arg)->bp_consdev = 0; m->cursel = 7;}; option MSG_Use_serial_com0, action {((struct x86_boot_params *)arg)->bp_consdev = 1; m->cursel = 5;}; @@ -63,7 +64,7 @@ menu getboottype, title MSG_Bootblocks_s option MSG_Use_serial_com3, action {((struct x86_boot_params *)arg)->bp_consdev = 4; m->cursel = 5;}; option MSG_serial_baud_rate, sub menu consolebaud; - option MSG_Use_existing_bootblocks, action + option MSG_Use_existing_bootblocks, exit, action {((struct x86_boot_params *)arg)->bp_consdev = ~0; m->cursel = 7;}; menu consolebaud, title MSG_serial_baud_rate, x=40, y=13;
CVS commit: src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: martin Date: Sat Nov 16 18:08:36 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/i386: md.c Log Message: knf style adjustments To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/arch/i386/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: martin Date: Sat Nov 16 18:08:59 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/i386: menus.md Log Message: Make the bootblock selection menu more sane, pointed out by maxv To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/i386/menus.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mpl/bind/dist/lib/isc
Module Name:src Committed By: christos Date: Sat Nov 16 19:23:56 UTC 2019 Modified Files: src/external/mpl/bind/dist/lib/isc: task.c timer.c Log Message: shorten names To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/lib/isc/task.c cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/dist/lib/isc/timer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mpl/bind/dist/lib/isc
Module Name:src Committed By: christos Date: Sat Nov 16 19:23:56 UTC 2019 Modified Files: src/external/mpl/bind/dist/lib/isc: task.c timer.c Log Message: shorten names To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/lib/isc/task.c cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/dist/lib/isc/timer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/bind/dist/lib/isc/task.c diff -u src/external/mpl/bind/dist/lib/isc/task.c:1.5 src/external/mpl/bind/dist/lib/isc/task.c:1.6 --- src/external/mpl/bind/dist/lib/isc/task.c:1.5 Thu Sep 5 15:32:59 2019 +++ src/external/mpl/bind/dist/lib/isc/task.c Sat Nov 16 14:23:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: task.c,v 1.5 2019/09/05 19:32:59 christos Exp $ */ +/* $NetBSD: task.c,v 1.6 2019/11/16 19:23:56 christos Exp $ */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") @@ -1385,7 +1385,7 @@ isc_taskmgr_create(isc_mem_t *mctx, unsi &manager->queues[i].thread) == ISC_R_SUCCESS); char name[21]; - snprintf(name, sizeof(name), "isc-worker%04u", i); + snprintf(name, sizeof(name), "work-%u", i); isc_thread_setname(manager->queues[i].thread, name); } UNLOCK(&manager->lock); Index: src/external/mpl/bind/dist/lib/isc/timer.c diff -u src/external/mpl/bind/dist/lib/isc/timer.c:1.4 src/external/mpl/bind/dist/lib/isc/timer.c:1.5 --- src/external/mpl/bind/dist/lib/isc/timer.c:1.4 Sun Feb 24 15:01:31 2019 +++ src/external/mpl/bind/dist/lib/isc/timer.c Sat Nov 16 14:23:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: timer.c,v 1.4 2019/02/24 20:01:31 christos Exp $ */ +/* $NetBSD: timer.c,v 1.5 2019/11/16 19:23:56 christos Exp $ */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") @@ -725,7 +725,7 @@ isc_timermgr_create(isc_mem_t *mctx, isc "isc_thread_create() failed"); return (ISC_R_UNEXPECTED); } - isc_thread_setname(manager->thread, "isc-timer"); + isc_thread_setname(manager->thread, "timer"); *managerp = (isc_timermgr_t *)manager;
CVS commit: [netbsd-9] src/sys/dev/nvmm/x86
Module Name:src Committed By: martin Date: Sat Nov 16 20:08:45 UTC 2019 Modified Files: src/sys/dev/nvmm/x86 [netbsd-9]: nvmm_x86.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #434): sys/dev/nvmm/x86/nvmm_x86.c: revision 1.8 Don't report MWAITX by default. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.4.1 src/sys/dev/nvmm/x86/nvmm_x86.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/nvmm/x86
Module Name:src Committed By: martin Date: Sat Nov 16 20:08:45 UTC 2019 Modified Files: src/sys/dev/nvmm/x86 [netbsd-9]: nvmm_x86.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #434): sys/dev/nvmm/x86/nvmm_x86.c: revision 1.8 Don't report MWAITX by default. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.4.1 src/sys/dev/nvmm/x86/nvmm_x86.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/nvmm/x86/nvmm_x86.c diff -u src/sys/dev/nvmm/x86/nvmm_x86.c:1.7 src/sys/dev/nvmm/x86/nvmm_x86.c:1.7.4.1 --- src/sys/dev/nvmm/x86/nvmm_x86.c:1.7 Wed May 15 04:39:52 2019 +++ src/sys/dev/nvmm/x86/nvmm_x86.c Sat Nov 16 20:08:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86.c,v 1.7 2019/05/15 04:39:52 maxv Exp $ */ +/* $NetBSD: nvmm_x86.c,v 1.7.4.1 2019/11/16 20:08:45 martin Exp $ */ /* * Copyright (c) 2018-2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86.c,v 1.7 2019/05/15 04:39:52 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86.c,v 1.7.4.1 2019/11/16 20:08:45 martin Exp $"); #include #include @@ -292,7 +292,7 @@ const struct nvmm_x86_cpuid_mask nvmm_cp .eax = ~0, .ebx = ~0, .ecx = - /* Excluded: SVM, EAPIC, OSVW. */ + /* Excluded: SVM, EAPIC, OSVW, MWAITX. */ CPUID_LAHF | CPUID_CMPLEGACY | CPUID_ALTMOVCR0 | CPUID_LZCNT | CPUID_SSE4A | CPUID_MISALIGNSSE | @@ -304,7 +304,7 @@ const struct nvmm_x86_cpuid_mask nvmm_cp CPUID_TOPOEXT | CPUID_PCEC | CPUID_PCENB | CPUID_SPM | CPUID_DBE | CPUID_PTSC | - CPUID_L2IPERFC | CPUID_MWAITX, + CPUID_L2IPERFC, .edx = /* Excluded: RDTSCP. */ CPUID_SYSCALL | CPUID_MPC |
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Nov 16 20:09:49 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Ticket #434 To generate a diff of this commit: cvs rdiff -u -r1.1.2.103 -r1.1.2.104 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Nov 16 20:09:49 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Ticket #434 To generate a diff of this commit: cvs rdiff -u -r1.1.2.103 -r1.1.2.104 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.0 diff -u src/doc/CHANGES-9.0:1.1.2.103 src/doc/CHANGES-9.0:1.1.2.104 --- src/doc/CHANGES-9.0:1.1.2.103 Sat Nov 16 17:02:38 2019 +++ src/doc/CHANGES-9.0 Sat Nov 16 20:09:49 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.0,v 1.1.2.103 2019/11/16 17:02:38 martin Exp $ +# $NetBSD: CHANGES-9.0,v 1.1.2.104 2019/11/16 20:09:49 martin Exp $ A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30 until the 9.0 release: @@ -5760,3 +5760,8 @@ sys/netinet6/ip6_input.c 1.215 The Rip6 entry point could see a garbage Hop6 option. [maxv, ticket #432] +sys/dev/nvmm/x86/nvmm_x86.c 1.8 + + Don't report MWAITX by default. + [jmcneill, ticket #434] +
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Nov 16 20:26:59 UTC 2019 Modified Files: src/usr.sbin/sysinst: configmenu.c disks.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl net.c partman.c run.c util.c Log Message: Make sure all menus have a translatable exit option (or none at all). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/configmenu.c cvs rdiff -u -r1.56 -r1.57 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/msg.mi.de cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/sysinst/net.c cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/sysinst/partman.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/run.c cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/sysinst/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/configmenu.c diff -u src/usr.sbin/sysinst/configmenu.c:1.10 src/usr.sbin/sysinst/configmenu.c:1.11 --- src/usr.sbin/sysinst/configmenu.c:1.10 Tue Jul 23 18:13:40 2019 +++ src/usr.sbin/sysinst/configmenu.c Sat Nov 16 20:26:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: configmenu.c,v 1.10 2019/07/23 18:13:40 martin Exp $ */ +/* $NetBSD: configmenu.c,v 1.11 2019/11/16 20:26:59 martin Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -464,7 +464,7 @@ do_configmenu(struct install_partition_d menu_no = new_menu(NULL, me, opts, 0, -4, 0, 70, MC_SCROLL | MC_NOBOX | MC_DFLTEXIT, - configmenu_hdr, set_config, NULL, "XXX Help String", + configmenu_hdr, set_config, NULL, NULL, MSG_doneconfig); process_menu(menu_no, ce); Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.56 src/usr.sbin/sysinst/disks.c:1.57 --- src/usr.sbin/sysinst/disks.c:1.56 Wed Nov 13 18:57:26 2019 +++ src/usr.sbin/sysinst/disks.c Sat Nov 16 20:26:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.56 2019/11/13 18:57:26 martin Exp $ */ +/* $NetBSD: disks.c,v 1.57 2019/11/16 20:26:59 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -852,7 +852,7 @@ find_disks(const char *doingwhat, bool a menu_no = new_menu(MSG_Available_disks, dsk_menu, i, -1, 4, 0, 0, MC_SCROLL, -NULL, NULL, NULL, NULL, NULL); +NULL, NULL, NULL, NULL, MSG_exit_menu_generic); if (menu_no == -1) return -1; msg_fmt_display(MSG_ask_disk, "%s", doingwhat); @@ -2211,7 +2211,7 @@ add_select_partition(struct selected_par 3, 3, 0, 60, MC_SUBMENU | MC_SCROLL | MC_NOCLEAR, NULL, display_single_part, NULL, - NULL, NULL); + NULL, MSG_exit_menu_generic); if (sel_menu != -1) { struct selected_partition *newsels; struct sel_menu_data data; @@ -2410,8 +2410,7 @@ select_partitions(struct selected_partit /* loop with menu */ update_sel_part_title(&data); m = new_menu(data.title, men, __arraycount(men), 3, 2, 0, 65, MC_SCROLL, - post_sel_part, fmt_sel_part_line, NULL, NULL, - "Source selection OK, proceed to target selection"); + post_sel_part, fmt_sel_part_line, NULL, NULL, MSG_clone_src_done); process_menu(m, &data); free(data.title); if (res->num_sel == 0) Index: src/usr.sbin/sysinst/msg.mi.de diff -u src/usr.sbin/sysinst/msg.mi.de:1.17 src/usr.sbin/sysinst/msg.mi.de:1.18 --- src/usr.sbin/sysinst/msg.mi.de:1.17 Tue Nov 12 16:33:14 2019 +++ src/usr.sbin/sysinst/msg.mi.de Sat Nov 16 20:26:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.de,v 1.17 2019/11/12 16:33:14 martin Exp $ */ +/* $NetBSD: msg.mi.de,v 1.18 2019/11/16 20:26:59 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1498,3 +1498,5 @@ message clone_target_end {Als letzte hi message clone_target_hdr {Einfügen der duplizierten Partitionen vor:} message clone_target_disp {duplizierte Partition(en)} +message clone_src_done +{Quellselektion OK, weiter mit der Zielauswahl} Index: src/usr.sbin/sysinst/msg.mi.en diff -u src/usr.sbin/sysinst/msg.mi.en:1.24 src/usr.sbin/sysinst/msg.mi.en:1.25 --- src/usr.sbin/sysinst/msg.mi.en:1.24 Tue Nov 12 16:33:14 2019 +++ src/usr.sbin/sysinst/msg.mi.en Sat Nov 16 20:26:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.en,v 1.24 2019/11/12 16:33:14 martin Exp $ */ +/* $NetBSD: msg.mi.en,v 1.25 2019/11/16 20:26:59 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1438,4 +1438,5 @@ message clone_target_end {Add at end} message clone_target_hdr {Insert cloned partitions before:} message clone_target_disp {cloned partition(s)} - +message clone_src_done +{Source selection OK, proceed to target selection} Index: src/usr.sbin/sysinst/msg.mi.es diff -u src/usr.sbin/sysinst/msg.mi.es:1.18 src/usr.sbin/sysinst/msg.mi.es:1.19 --- src/usr.sbin/sysinst/msg.mi.es
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Nov 16 20:26:59 UTC 2019 Modified Files: src/usr.sbin/sysinst: configmenu.c disks.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl net.c partman.c run.c util.c Log Message: Make sure all menus have a translatable exit option (or none at all). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/configmenu.c cvs rdiff -u -r1.56 -r1.57 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/msg.mi.de cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/sysinst/net.c cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/sysinst/partman.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/run.c cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/sysinst/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Nov 16 21:25:15 UTC 2019 Modified Files: src/usr.sbin/sysinst: util.c src/usr.sbin/sysinst/arch/amd64: md.c md.h src/usr.sbin/sysinst/arch/i386: md.c msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl Log Message: On amd64 support installation with a KASLR kernel, via "custom install" and selecting the GENERIC_KASLR kernel set. Setup /prekern and boot.cfg accordingly. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/sysinst/util.c cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/amd64/md.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/arch/amd64/md.h cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/sysinst/arch/i386/md.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/i386/msg.md.de \ src/usr.sbin/sysinst/arch/i386/msg.md.en \ src/usr.sbin/sysinst/arch/i386/msg.md.es \ src/usr.sbin/sysinst/arch/i386/msg.md.fr \ src/usr.sbin/sysinst/arch/i386/msg.md.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sat Nov 16 21:25:15 UTC 2019 Modified Files: src/usr.sbin/sysinst: util.c src/usr.sbin/sysinst/arch/amd64: md.c md.h src/usr.sbin/sysinst/arch/i386: md.c msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl Log Message: On amd64 support installation with a KASLR kernel, via "custom install" and selecting the GENERIC_KASLR kernel set. Setup /prekern and boot.cfg accordingly. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/sysinst/util.c cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/amd64/md.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/arch/amd64/md.h cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/sysinst/arch/i386/md.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/i386/msg.md.de \ src/usr.sbin/sysinst/arch/i386/msg.md.en \ src/usr.sbin/sysinst/arch/i386/msg.md.es \ src/usr.sbin/sysinst/arch/i386/msg.md.fr \ src/usr.sbin/sysinst/arch/i386/msg.md.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/util.c diff -u src/usr.sbin/sysinst/util.c:1.39 src/usr.sbin/sysinst/util.c:1.40 --- src/usr.sbin/sysinst/util.c:1.39 Sat Nov 16 20:26:59 2019 +++ src/usr.sbin/sysinst/util.c Sat Nov 16 21:25:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.39 2019/11/16 20:26:59 martin Exp $ */ +/* $NetBSD: util.c,v 1.40 2019/11/16 21:25:14 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1151,9 +1151,16 @@ get_and_unpack_sets(int update, msg setu "> /tmp/boot.cfg.tmp'"); mv_within_target_or_die("/tmp/boot.cfg.tmp", "/boot.cfg"); + } } +#ifdef MD_BOOT_CFG_FINALIZE + if (target_file_exists_p("/boot.cfg")) { + MD_BOOT_CFG_FINALIZE("/boot.cfg"); + } +#endif + /* Save keyboard type */ save_kb_encoding(); Index: src/usr.sbin/sysinst/arch/amd64/md.c diff -u src/usr.sbin/sysinst/arch/amd64/md.c:1.1 src/usr.sbin/sysinst/arch/amd64/md.c:1.2 --- src/usr.sbin/sysinst/arch/amd64/md.c:1.1 Sat Jul 26 19:30:44 2014 +++ src/usr.sbin/sysinst/arch/amd64/md.c Sat Nov 16 21:25:14 2019 @@ -1,5 +1,22 @@ -/* $NetBSD: md.c,v 1.1 2014/07/26 19:30:44 dholland Exp $ */ +/* $NetBSD: md.c,v 1.2 2019/11/16 21:25:14 martin Exp $ */ /* md.c -- Machine specific code for amd64 */ #include "../i386/md.c" + +void amd64_md_boot_cfg_finalize(const char *path); + +void +amd64_md_boot_cfg_finalize(const char *path) +{ + char buf[MAXPATHLEN]; + + if (get_kernel_set() != SET_KERNEL_2) + return; + + run_program(RUN_CHROOT|RUN_FATAL, + "sh -c 'sed -e \"s:;boot:;pkboot:\" " + "< %s > %s.1", path, path); + snprintf(buf, sizeof buf, "%s.1", path); + mv_within_target_or_die(buf, path); +} Index: src/usr.sbin/sysinst/arch/amd64/md.h diff -u src/usr.sbin/sysinst/arch/amd64/md.h:1.7 src/usr.sbin/sysinst/arch/amd64/md.h:1.8 --- src/usr.sbin/sysinst/arch/amd64/md.h:1.7 Wed Oct 2 11:16:01 2019 +++ src/usr.sbin/sysinst/arch/amd64/md.h Sat Nov 16 21:25:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: md.h,v 1.7 2019/10/02 11:16:01 maya Exp $ */ +/* $NetBSD: md.h,v 1.8 2019/11/16 21:25:14 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -85,6 +85,7 @@ * from floppy. */ #define SET_KERNEL_1_NAME "kern-GENERIC" +#define SET_KERNEL_2_NAME "kern-GENERIC_KASLR" #define SET_KERNEL_GENERIC SET_KERNEL_1 @@ -117,9 +118,13 @@ extern struct mbr_bootsel *mbs; */ void x86_md_part_defaults(struct pm_devs*, struct part_usage_info**, size_t *num_usage_infos); + #define MD_PART_DEFAULTS(A,B,C) x86_md_part_defaults(A,&(B),&(C)) /* no need to install bootblock if installing for UEFI */ bool x86_md_need_bootblock(struct install_partition_desc *install); #define MD_NEED_BOOTBLOCK(A) x86_md_need_bootblock(A) +/* post-process boot.cfg for KASLR if that kernel has been selected */ +void amd64_md_boot_cfg_finalize(const char*); +#define MD_BOOT_CFG_FINALIZE(P) amd64_md_boot_cfg_finalize(P) Index: src/usr.sbin/sysinst/arch/i386/md.c diff -u src/usr.sbin/sysinst/arch/i386/md.c:1.23 src/usr.sbin/sysinst/arch/i386/md.c:1.24 --- src/usr.sbin/sysinst/arch/i386/md.c:1.23 Sat Nov 16 18:08:36 2019 +++ src/usr.sbin/sysinst/arch/i386/md.c Sat Nov 16 21:25:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.23 2019/11/16 18:08:36 martin Exp $ */ +/* $NetBSD: md.c,v 1.24 2019/11/16 21:25:14 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -376,6 +376,13 @@ md_post_newfs_uefi(struct install_partit int md_post_newfs(struct install_partition_desc *install) { +#if defined(__amd64__) + int ret; + + ret = cp_to_target("/usr/mdec/prekern", "/prekern"); + if (ret) + return ret; +#endif return uefi_boot ? md_post_newfs_uefi(install) : md_post_newfs_bios(install); @@ -911,5 +918,3 @@ x86_md_need_bootblock(struct install_par return !uefi_boot; } - - Index: src/usr.sbin/sysinst/arch/i386/msg.md.de diff -u
CVS commit: src/external/bsd/tcpdump/dist
Module Name:src Committed By: christos Date: Sat Nov 16 21:41:02 UTC 2019 Modified Files: src/external/bsd/tcpdump/dist: parsenfsfh.c Log Message: Fix always false test (typo). Note by joerg@ To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/parsenfsfh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/tcpdump/dist
Module Name:src Committed By: christos Date: Sat Nov 16 21:41:02 UTC 2019 Modified Files: src/external/bsd/tcpdump/dist: parsenfsfh.c Log Message: Fix always false test (typo). Note by joerg@ To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tcpdump/dist/parsenfsfh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tcpdump/dist/parsenfsfh.c diff -u src/external/bsd/tcpdump/dist/parsenfsfh.c:1.8 src/external/bsd/tcpdump/dist/parsenfsfh.c:1.9 --- src/external/bsd/tcpdump/dist/parsenfsfh.c:1.8 Sat Feb 4 23:05:05 2017 +++ src/external/bsd/tcpdump/dist/parsenfsfh.c Sat Nov 16 16:41:02 2019 @@ -42,7 +42,7 @@ #include #ifndef lint -__RCSID("$NetBSD: parsenfsfh.c,v 1.8 2017/02/05 04:05:05 spz Exp $"); +__RCSID("$NetBSD: parsenfsfh.c,v 1.9 2019/11/16 21:41:02 christos Exp $"); #endif #ifdef HAVE_CONFIG_H @@ -211,7 +211,7 @@ Parse_fh(register const unsigned char *f if ((fhp[6] == 0) && (fhp[7] == 0)) { /* for ffs sizeof(ufid) == 16 bytes */ if ((fhp[8] == 0x10 && fhp[9] == 0x0) || - (fhp[9] == 0x0 && fhp[9] == 0x10)) + (fhp[8] == 0x0 && fhp[9] == 0x10)) fhtype = FHT_NETBSD; else fhtype = FHT_BSD44;