CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: kamil Date: Tue Dec 19 07:58:50 UTC 2017 Modified Files: src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_systrace_args.c syscalls.master Log Message: Sync syscalls.master in compat_netbsd32(8) with kern/syscalls.master ___lwp_part60 removed 'const' from the ts argument. 'const struct timespec *ts' -> 'struct timespec *ts' Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.19 -r1.20 src/sys/compat/netbsd32/netbsd32_systrace_args.c cvs rdiff -u -r1.115 -r1.116 src/sys/compat/netbsd32/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_syscall.h diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.129 src/sys/compat/netbsd32/netbsd32_syscall.h:1.130 --- src/sys/compat/netbsd32/netbsd32_syscall.h:1.129 Wed May 10 06:19:49 2017 +++ src/sys/compat/netbsd32/netbsd32_syscall.h Tue Dec 19 07:58:50 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.129 2017/05/10 06:19:49 riastradh Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.130 2017/12/19 07:58:50 kamil Exp $ */ /* * System call numbers. @@ -1248,7 +1248,7 @@ /* syscall: "netbsd32_clock_nanosleep" ret: "int" args: "netbsd32_clockid_t" "int" "const netbsd32_timespecp_t" "netbsd32_timespecp_t" */ #define NETBSD32_SYS_netbsd32_clock_nanosleep 477 -/* syscall: "netbsd32lwp_park60" ret: "int" args: "netbsd32_clockid_t" "int" "const netbsd32_timespecp_t" "lwpid_t" "netbsd32_voidp" "netbsd32_voidp" */ +/* syscall: "netbsd32lwp_park60" ret: "int" args: "netbsd32_clockid_t" "int" "netbsd32_timespecp_t" "lwpid_t" "netbsd32_voidp" "netbsd32_voidp" */ #define NETBSD32_SYS_netbsd32lwp_park60 478 /* syscall: "netbsd32_posix_fallocate" ret: "int" args: "int" "int" "netbsd32_off_t" "netbsd32_off_t" */ Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.129 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.130 --- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.129 Wed May 10 06:19:49 2017 +++ src/sys/compat/netbsd32/netbsd32_syscallargs.h Tue Dec 19 07:58:50 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_syscallargs.h,v 1.129 2017/05/10 06:19:49 riastradh Exp $ */ +/* $NetBSD: netbsd32_syscallargs.h,v 1.130 2017/12/19 07:58:50 kamil Exp $ */ /* * System call argument lists. @@ -2563,7 +2563,7 @@ check_syscall_args(netbsd32_clock_nanosl struct netbsd32lwp_park60_args { syscallarg(netbsd32_clockid_t) clock_id; syscallarg(int) flags; - syscallarg(const netbsd32_timespecp_t) ts; + syscallarg(netbsd32_timespecp_t) ts; syscallarg(lwpid_t) unpark; syscallarg(netbsd32_voidp) hint; syscallarg(netbsd32_voidp) unparkhint; Index: src/sys/compat/netbsd32/netbsd32_systrace_args.c diff -u src/sys/compat/netbsd32/netbsd32_systrace_args.c:1.19 src/sys/compat/netbsd32/netbsd32_systrace_args.c:1.20 --- src/sys/compat/netbsd32/netbsd32_systrace_args.c:1.19 Wed May 10 06:19:49 2017 +++ src/sys/compat/netbsd32/netbsd32_systrace_args.c Tue Dec 19 07:58:50 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_systrace_args.c,v 1.19 2017/05/10 06:19:49 riastradh Exp $ */ +/* $NetBSD: netbsd32_systrace_args.c,v 1.20 2017/12/19 07:58:50 kamil Exp $ */ /* * System call argument to DTrace register array converstion. @@ -3423,7 +3423,7 @@ systrace_args(register_t sysnum, const v const struct netbsd32lwp_park60_args *p = params; iarg[0] = SCARG(p, clock_id); /* netbsd32_clockid_t */ iarg[1] = SCARG(p, flags); /* int */ - uarg[2] = (intptr_t) SCARG(p, ts).i32; /* const netbsd32_timespecp_t */ + uarg[2] = (intptr_t) SCARG(p, ts).i32; /* netbsd32_timespecp_t */ iarg[3] = SCARG(p, unpark); /* lwpid_t */ uarg[4] = (intptr_t) SCARG(p, hint).i32; /* netbsd32_voidp */ uarg[5] = (intptr_t) SCARG(p, unparkhint).i32; /* netbsd32_voidp */ @@ -9265,7 +9265,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 2: - p = "const netbsd32_timespecp_t"; + p = "netbsd32_timespecp_t"; break; case 3: p = "lwpid_t"; Index: src/sys/compat/netbsd32/syscalls.master diff -u src/sys/compat/netbsd32/syscalls.master:1.115 src/sys/compat/netbsd32/syscalls.master:1.116 --- src/sys/compat/netbsd32/syscalls.master:1.115 Wed Oct 19 09:44:01 2016 +++ src/sys/compat/netbsd32/syscalls.master Tue Dec 19 07:58:50 2017 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.115 2016/10/19 09:44:01 skrll Exp $ + $NetBSD: syscalls.master,v 1.116 2017/12/19 07:58:50 kamil Exp $ ; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -1047,7 +1047,7 @@ netbsd32_timespecp_t rmtp); } 478 STD { int|netbsd32|60|_lwp_park(\ netbsd32_clockid_t
CVS commit: src/sys/dev/usb
Module Name:src Committed By: msaitoh Date: Tue Dec 19 06:40:22 UTC 2017 Modified Files: src/sys/dev/usb: uhso.c Log Message: Add missing if_free() in the detach path. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/usb/uhso.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/usb/uhso.c diff -u src/sys/dev/usb/uhso.c:1.25 src/sys/dev/usb/uhso.c:1.26 --- src/sys/dev/usb/uhso.c:1.25 Wed Jan 11 22:09:38 2017 +++ src/sys/dev/usb/uhso.c Tue Dec 19 06:40:22 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uhso.c,v 1.25 2017/01/11 22:09:38 maya Exp $ */ +/* $NetBSD: uhso.c,v 1.26 2017/12/19 06:40:22 msaitoh Exp $ */ /*- * Copyright (c) 2009 Iain Hibbert @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.25 2017/01/11 22:09:38 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.26 2017/12/19 06:40:22 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1993,6 +1993,7 @@ uhso_ifnet_detach(struct uhso_port *hp) s = splnet(); bpf_detach(ifp); if_detach(ifp); + if_free(ifp); splx(s); kmem_free(hp, sizeof(struct uhso_port));
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Tue Dec 19 03:32:35 UTC 2017 Modified Files: src/sys/dev/ic: dwc_gmac.c src/sys/net: if_bridge.c if_l2tp.c if_loop.c if_tap.c if_vlan.c src/sys/netcan: if_canloop.c Log Message: Don't set IFEF_MPSAFE unless NET_MPSAFE at this point Because recent investigations show that interfaces with IFEF_MPSAFE need to follow additional restrictions to work with the flag safely. We should enable it on an interface by default only if the interface surely satisfies the restrictions, which are described in if.h. Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because the network stack is still serialized by the big kernel locks by default. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ic/dwc_gmac.c cvs rdiff -u -r1.145 -r1.146 src/sys/net/if_bridge.c cvs rdiff -u -r1.16 -r1.17 src/sys/net/if_l2tp.c cvs rdiff -u -r1.100 -r1.101 src/sys/net/if_loop.c cvs rdiff -u -r1.104 -r1.105 src/sys/net/if_tap.c cvs rdiff -u -r1.120 -r1.121 src/sys/net/if_vlan.c cvs rdiff -u -r1.4 -r1.5 src/sys/netcan/if_canloop.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/ic/dwc_gmac.c diff -u src/sys/dev/ic/dwc_gmac.c:1.43 src/sys/dev/ic/dwc_gmac.c:1.44 --- src/sys/dev/ic/dwc_gmac.c:1.43 Thu Nov 16 03:07:17 2017 +++ src/sys/dev/ic/dwc_gmac.c Tue Dec 19 03:32:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac.c,v 1.43 2017/11/16 03:07:17 ozaki-r Exp $ */ +/* $NetBSD: dwc_gmac.c,v 1.44 2017/12/19 03:32:35 ozaki-r Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.43 2017/11/16 03:07:17 ozaki-r Exp $"); +__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.44 2017/12/19 03:32:35 ozaki-r Exp $"); /* #define DWC_GMAC_DEBUG 1 */ @@ -223,7 +223,9 @@ dwc_gmac_attach(struct dwc_gmac_softc *s ifp->if_softc = sc; strlcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; +#ifdef DWCGMAC_MPSAFE ifp->if_extflags = IFEF_MPSAFE; +#endif ifp->if_ioctl = dwc_gmac_ioctl; ifp->if_start = dwc_gmac_start; ifp->if_init = dwc_gmac_init; Index: src/sys/net/if_bridge.c diff -u src/sys/net/if_bridge.c:1.145 src/sys/net/if_bridge.c:1.146 --- src/sys/net/if_bridge.c:1.145 Mon Dec 11 03:29:20 2017 +++ src/sys/net/if_bridge.c Tue Dec 19 03:32:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bridge.c,v 1.145 2017/12/11 03:29:20 ozaki-r Exp $ */ +/* $NetBSD: if_bridge.c,v 1.146 2017/12/19 03:32:35 ozaki-r Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.145 2017/12/11 03:29:20 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.146 2017/12/19 03:32:35 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_bridge_ipf.h" @@ -424,7 +424,10 @@ bridge_clone_create(struct if_clone *ifc if_initname(ifp, ifc->ifc_name, unit); ifp->if_softc = sc; - ifp->if_extflags = IFEF_MPSAFE | IFEF_NO_LINK_STATE_CHANGE; + ifp->if_extflags = IFEF_NO_LINK_STATE_CHANGE; +#ifdef NET_MPSAFE + ifp->if_extflags |= IFEF_MPSAFE; +#endif ifp->if_mtu = ETHERMTU; ifp->if_ioctl = bridge_ioctl; ifp->if_output = bridge_output; Index: src/sys/net/if_l2tp.c diff -u src/sys/net/if_l2tp.c:1.16 src/sys/net/if_l2tp.c:1.17 --- src/sys/net/if_l2tp.c:1.16 Wed Dec 6 08:23:17 2017 +++ src/sys/net/if_l2tp.c Tue Dec 19 03:32:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_l2tp.c,v 1.16 2017/12/06 08:23:17 knakahara Exp $ */ +/* $NetBSD: if_l2tp.c,v 1.17 2017/12/19 03:32:35 ozaki-r Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -31,10 +31,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.16 2017/12/06 08:23:17 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.17 2017/12/19 03:32:35 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" +#include "opt_net_mpsafe.h" #endif #include @@ -265,7 +266,10 @@ l2tpattach0(struct l2tp_softc *sc) sc->l2tp_ec.ec_if.if_addrlen = 0; sc->l2tp_ec.ec_if.if_mtu= L2TP_MTU; sc->l2tp_ec.ec_if.if_flags = IFF_POINTOPOINT|IFF_MULTICAST|IFF_SIMPLEX; - sc->l2tp_ec.ec_if.if_extflags = IFEF_MPSAFE | IFEF_NO_LINK_STATE_CHANGE; + sc->l2tp_ec.ec_if.if_extflags = IFEF_NO_LINK_STATE_CHANGE; +#ifdef NET_MPSAFE + sc->l2tp_ec.ec_if.if_extflags |= IFEF_MPSAFE; +#endif sc->l2tp_ec.ec_if.if_ioctl = l2tp_ioctl; sc->l2tp_ec.ec_if.if_output = l2tp_output; sc->l2tp_ec.ec_if.if_type = IFT_L2TP; Index: src/sys/net/if_loop.c diff -u src/sys/net/if_loop.c:1.100 src/sys/net/if_loop.c:1.101 --- src/sys/net/if_loop.c:1.100 Wed Dec 6 07:40:16 2017 +++ src/sys/net/if_loop.c Tue Dec 19 03:32:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_loop.c,v 1.100 2017/12/06 07:40:16 ozaki-r Exp $ */ +/* $NetBSD: if_loop.c,v 1.101 2017/12/19 03:32:35 ozaki-r Exp $ */
CVS commit: src/sys/dev
Module Name:src Committed By: pgoyette Date: Tue Dec 19 03:31:12 UTC 2017 Modified Files: src/sys/dev: ccd.c Log Message: Ooppss, need an ampersand call calling LIST_EMPTY() macro To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/sys/dev/ccd.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/ccd.c diff -u src/sys/dev/ccd.c:1.173 src/sys/dev/ccd.c:1.174 --- src/sys/dev/ccd.c:1.173 Tue Dec 19 03:24:09 2017 +++ src/sys/dev/ccd.c Tue Dec 19 03:31:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ccd.c,v 1.173 2017/12/19 03:24:09 pgoyette Exp $ */ +/* $NetBSD: ccd.c,v 1.174 2017/12/19 03:31:12 pgoyette Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.173 2017/12/19 03:24:09 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.174 2017/12/19 03:31:12 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -1718,7 +1718,7 @@ ccd_modcmd(modcmd_t cmd, void *arg) case MODULE_CMD_FINI: #ifdef _MODULE mutex_enter(_lock); - if (!LIST_EMPTY(ccds)) { + if (!LIST_EMPTY()) { mutex_exit(_lock); error = EBUSY; } else {
CVS commit: src/sys/dev
Module Name:src Committed By: pgoyette Date: Tue Dec 19 03:24:09 UTC 2017 Modified Files: src/sys/dev: ccd.c Log Message: There is currently a counter nactive which tracks the INSERT and REMOVE of entries in the ccds LIST. Since the counter is checked only when the ccd module is being unloaded, remove the counter completely and just check for LIST_EMPTY(ccds). No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/dev/ccd.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/ccd.c diff -u src/sys/dev/ccd.c:1.172 src/sys/dev/ccd.c:1.173 --- src/sys/dev/ccd.c:1.172 Thu Jun 1 02:45:08 2017 +++ src/sys/dev/ccd.c Tue Dec 19 03:24:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ccd.c,v 1.172 2017/06/01 02:45:08 chs Exp $ */ +/* $NetBSD: ccd.c,v 1.173 2017/12/19 03:24:09 pgoyette Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.172 2017/06/01 02:45:08 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.173 2017/12/19 03:24:09 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -218,7 +218,6 @@ static void printiinfo(struct ccdiinfo * static LIST_HEAD(, ccd_softc) ccds = LIST_HEAD_INITIALIZER(ccds); static kmutex_t ccd_lock; -static size_t ccd_nactive = 0; #ifdef _MODULE static struct sysctllog *ccd_clog; @@ -275,7 +274,6 @@ ccdget(int unit, int make) { return NULL; mutex_enter(_lock); LIST_INSERT_HEAD(, sc, sc_link); - ccd_nactive++; mutex_exit(_lock); return sc; } @@ -284,7 +282,6 @@ static void ccdput(struct ccd_softc *sc) { mutex_enter(_lock); LIST_REMOVE(sc, sc_link); - ccd_nactive--; mutex_exit(_lock); ccddestroy(sc); } @@ -1721,7 +1718,7 @@ ccd_modcmd(modcmd_t cmd, void *arg) case MODULE_CMD_FINI: #ifdef _MODULE mutex_enter(_lock); - if (ccd_nactive) { + if (!LIST_EMPTY(ccds)) { mutex_exit(_lock); error = EBUSY; } else {
CVS commit: src/share/man/man4
Module Name:src Committed By: christos Date: Tue Dec 19 01:59:48 UTC 2017 Modified Files: src/share/man/man4: intro.4 Log Message: Adjust for NetBSD To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/intro.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/intro.4 diff -u src/share/man/man4/intro.4:1.1 src/share/man/man4/intro.4:1.2 --- src/share/man/man4/intro.4:1.1 Mon Dec 18 20:46:57 2017 +++ src/share/man/man4/intro.4 Mon Dec 18 20:59:48 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: intro.4,v 1.1 2017/12/19 01:46:57 christos Exp $ +.\" $NetBSD: intro.4,v 1.2 2017/12/19 01:59:48 christos Exp $ .\" .\" Copyright (c) 1996 David E. O'Brien, Joerg Wunsch .\" @@ -26,7 +26,7 @@ .\" .\" $FreeBSD: head/share/man/man4/intro.4 131530 2004-07-03 18:29:24Z ru $ .\" -.Dd January 20, 1996 +.Dd December 18, 2017 .Dt INTRO 4 .Os .Sh NAME @@ -116,9 +116,9 @@ For the latter group of devices, the differentiation is conventionally done by prepending the letter .Ql r to the path name of the device node, for example -.Pa /dev/rda0 +.Pa /dev/rsd0[cd] denotes the raw device for the first SCSI disk, while -.Pa /dev/da0 +.Pa /dev/sd0[cd] is the corresponding device node for the buffered device. .Pp Unbuffered devices should be used for all actions that are not related @@ -152,11 +152,12 @@ for a detailed description of the files The individual manual pages in this section provide a sample line for the configuration file in their synopsis portion. See also the sample config file -.Pa /sys/i386/conf/LINT +.Pa /usr/src/sys/arch/i386/conf/GENERIC (for the .Em i386 architecture). .Sh SEE ALSO +.Xr config 1 , .Xr close 2 , .Xr ioctl 2 , .Xr mmap 2 , @@ -165,12 +166,13 @@ architecture). .Xr select 2 , .Xr socket 2 , .Xr write 2 , -.Xr devfs 5 , +.\" .Xr devfs 5 , .Xr hier 7 , -.Xr config 8 .Sh HISTORY This manual page first appeared in -.Fx 2.1 . +.Fx 2.1 +and +.Nx 9 . .Sh AUTHORS .An -nosplit This man page has been written by
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: christos Date: Tue Dec 19 01:49:19 UTC 2017 Modified Files: src/distrib/sets/lists/man: mi Log Message: add an MI intro page (from FreeBSD) To generate a diff of this commit: cvs rdiff -u -r1.1566 -r1.1567 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1566 src/distrib/sets/lists/man/mi:1.1567 --- src/distrib/sets/lists/man/mi:1.1566 Sun Dec 10 15:51:55 2017 +++ src/distrib/sets/lists/man/mi Mon Dec 18 20:49:18 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1566 2017/12/10 20:51:55 bouyer Exp $ +# $NetBSD: mi,v 1.1567 2017/12/19 01:49:18 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1311,6 +1311,7 @@ ./usr/share/man/cat4/inet6.0 man-sys-catman .cat ./usr/share/man/cat4/inphy.0 man-sys-catman .cat ./usr/share/man/cat4/intersil7170.0 man-sys-catman .cat +./usr/share/man/cat4/intro.0 man-sys-catman .cat ./usr/share/man/cat4/ioasic.0 man-sys-catman .cat ./usr/share/man/cat4/ioat.0 man-sys-catman .cat ./usr/share/man/cat4/iop.0 man-sys-catman .cat @@ -4402,6 +4403,7 @@ ./usr/share/man/html4/inet6.html man-sys-htmlman html ./usr/share/man/html4/inphy.html man-sys-htmlman html ./usr/share/man/html4/intersil7170.html man-sys-htmlman html +./usr/share/man/html4/intro.html man-sys-htmlman html ./usr/share/man/html4/ioasic.html man-sys-htmlman html ./usr/share/man/html4/ioat.html man-sys-htmlman html ./usr/share/man/html4/iop.html man-sys-htmlman html @@ -7329,6 +7331,7 @@ ./usr/share/man/man4/inet6.4 man-sys-man .man ./usr/share/man/man4/inphy.4 man-sys-man .man ./usr/share/man/man4/intersil7170.4 man-sys-man .man +./usr/share/man/man4/intro.4 man-sys-man .man ./usr/share/man/man4/ioasic.4 man-sys-man .man ./usr/share/man/man4/ioat.4 man-sys-man .man ./usr/share/man/man4/iop.4 man-sys-man .man
CVS commit: src/share/man/man4
Module Name:src Committed By: christos Date: Tue Dec 19 01:46:57 UTC 2017 Modified Files: src/share/man/man4: Makefile Added Files: src/share/man/man4: intro.4 Log Message: add missing man page from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.646 -r1.647 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/intro.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.646 src/share/man/man4/Makefile:1.647 --- src/share/man/man4/Makefile:1.646 Sun Dec 10 15:51:55 2017 +++ src/share/man/man4/Makefile Mon Dec 18 20:46:57 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.646 2017/12/10 20:51:55 bouyer Exp $ +# $NetBSD: Makefile,v 1.647 2017/12/19 01:46:57 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -32,7 +32,7 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 a hdaudio.4 hifn.4 hme.4 hpacel.4 hpqlb.4 hptide.4 hythygtemp.4 \ ibmcd.4 ibmhawk.4 ichsmb.4 icmp.4 icp.4 icsphy.4 iee.4 ieee80211.4 \ ifmedia.4 igmafb.4 igphy.4 igsfb.4 iha.4 ihidev.4 ihphy.4 iic.4 ims.4 \ - inet.4 ikphy.4 inphy.4 intersil7170.4 \ + inet.4 ikphy.4 inphy.4 intersil7170.4 intro.4 \ ioasic.4 ioat.4 iop.4 iophy.4 iopsp.4 ip.4 ipkdb.4 ipmi.4 ipw.4 \ irmce.4 isp.4 ismt.4 isv.4 itesio.4 iteide.4 iwi.4 iwm.4 iwn.4 ixg.4 \ ixpide.4 \ Added files: Index: src/share/man/man4/intro.4 diff -u /dev/null src/share/man/man4/intro.4:1.1 --- /dev/null Mon Dec 18 20:46:57 2017 +++ src/share/man/man4/intro.4 Mon Dec 18 20:46:57 2017 @@ -0,0 +1,179 @@ +.\" $NetBSD: intro.4,v 1.1 2017/12/19 01:46:57 christos Exp $ +.\" +.\" Copyright (c) 1996 David E. O'Brien, Joerg Wunsch +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS 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. +.\" +.\" $FreeBSD: head/share/man/man4/intro.4 131530 2004-07-03 18:29:24Z ru $ +.\" +.Dd January 20, 1996 +.Dt INTRO 4 +.Os +.Sh NAME +.Nm intro +.Nd introduction to devices and device drivers +.Sh DESCRIPTION +This section contains information related to devices, device drivers +and miscellaneous hardware. +.Ss The device abstraction +Device is a term used mostly for hardware-related stuff that belongs +to the system, like disks, printers, or a graphics display with its +keyboard. +There are also so-called +.Em pseudo-devices +where a device driver emulates the behaviour of a device in software +without any particular underlying hardware. +A typical example for +the latter class is +.Pa /dev/mem , +a loophole where the physical memory can be accessed using the regular +file access semantics. +.Pp +The device abstraction generally provides a common set of system calls +layered on top of them, which are dispatched to the corresponding +device driver by the upper layers of the kernel. +The set of system +calls available for devices is chosen from +.Xr open 2 , +.Xr close 2 , +.Xr read 2 , +.Xr write 2 , +.Xr ioctl 2 , +.Xr select 2 , +and +.Xr mmap 2 . +Not all drivers implement all system calls, for example, calling +.Xr mmap 2 +on terminal devices is likely to be not useful at all. +.Ss Accessing Devices +Most of the devices in a +.Ux Ns +-like operating system are accessed +through so-called +.Em device nodes , +sometimes also called +.Em special files . +They are usually located under the directory +.Pa /dev +in the file system hierarchy +(see also +.Xr hier 7 ) . +.Pp +Note that this could lead to an inconsistent state, where either there +are device nodes that do not have a configured driver associated with +them, or there may be drivers that have successfully probed for their +devices, but cannot be
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: christos Date: Mon Dec 18 22:44:30 UTC 2017 Modified Files: src/sys/dev/wscons: wsdisplay.c Log Message: ifdef speeding ticket. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/dev/wscons/wsdisplay.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/wscons/wsdisplay.c diff -u src/sys/dev/wscons/wsdisplay.c:1.144 src/sys/dev/wscons/wsdisplay.c:1.145 --- src/sys/dev/wscons/wsdisplay.c:1.144 Mon Dec 18 13:59:32 2017 +++ src/sys/dev/wscons/wsdisplay.c Mon Dec 18 17:44:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay.c,v 1.144 2017/12/18 18:59:32 jmcneill Exp $ */ +/* $NetBSD: wsdisplay.c,v 1.145 2017/12/18 22:44:30 christos Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.144 2017/12/18 18:59:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.145 2017/12/18 22:44:30 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_wsdisplay_compat.h" @@ -369,8 +369,10 @@ wsscreen_detach(struct wsscreen *scr) } if (scr->scr_dconf->scrdata->capabilities & WSSCREEN_FREE) free(__UNCONST(scr->scr_dconf->scrdata), M_DEVBUF); +#ifdef WSDISPLAY_MULTICONS callout_halt(>scr_getc_ch, NULL); callout_destroy(>scr_getc_ch); +#endif free(scr->scr_dconf, M_DEVBUF); free(scr, M_DEVBUF); }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Mon Dec 18 20:32:02 UTC 2017 Modified Files: src/sys/dev/usb: if_smsc.c Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/if_smsc.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/usb/if_smsc.c diff -u src/sys/dev/usb/if_smsc.c:1.31 src/sys/dev/usb/if_smsc.c:1.32 --- src/sys/dev/usb/if_smsc.c:1.31 Mon Dec 18 20:25:07 2017 +++ src/sys/dev/usb/if_smsc.c Mon Dec 18 20:32:02 2017 @@ -1,7 +1,7 @@ -/* $NetBSD: if_smsc.c,v 1.31 2017/12/18 20:25:07 skrll Exp $ */ +/* $NetBSD: if_smsc.c,v 1.32 2017/12/18 20:32:02 skrll Exp $ */ /* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */ -/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ +/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ /*- * Copyright (c) 2012 * Ben Gray. @@ -364,7 +364,6 @@ smsc_miibus_statchg(struct ifnet *ifp) afc_cfg |= 0xf; else afc_cfg &= ~0xf; - } else { smsc_dbg_printf(sc, "half duplex operation\n"); sc->sc_mac_csr &= ~SMSC_MAC_CSR_FDPX; @@ -413,6 +412,7 @@ smsc_ifmedia_sts(struct ifnet *ifp, stru static inline uint32_t smsc_hash(uint8_t addr[ETHER_ADDR_LEN]) { + return (ether_crc32_be(addr, ETHER_ADDR_LEN) >> 26) & 0x3f; }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Mon Dec 18 20:25:07 UTC 2017 Modified Files: src/sys/dev/usb: if_smsc.c Log Message: Use lowercase for hex constant. NFC. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/if_smsc.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/usb/if_smsc.c diff -u src/sys/dev/usb/if_smsc.c:1.30 src/sys/dev/usb/if_smsc.c:1.31 --- src/sys/dev/usb/if_smsc.c:1.30 Thu Dec 15 09:28:06 2016 +++ src/sys/dev/usb/if_smsc.c Mon Dec 18 20:25:07 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_smsc.c,v 1.30 2016/12/15 09:28:06 ozaki-r Exp $ */ +/* $NetBSD: if_smsc.c,v 1.31 2017/12/18 20:25:07 skrll Exp $ */ /* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */ /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ @@ -277,7 +277,7 @@ smsc_miibus_readreg(device_t dev, int ph done: smsc_unlock_mii(sc); - return val & 0x; + return val & 0x; } void
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: christos Date: Mon Dec 18 19:20:40 UTC 2017 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: make it fail instead of hang under qemu; XXX: need to investigate. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.14 src/tests/lib/libc/sys/t_ptrace_wait.c:1.15 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.14 Sat Dec 16 09:45:25 2017 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Mon Dec 18 14:20:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.14 2017/12/16 14:45:25 christos Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.15 2017/12/18 19:20:40 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.14 2017/12/16 14:45:25 christos Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.15 2017/12/18 19:20:40 christos Exp $"); #include #include @@ -7260,6 +7260,8 @@ ATF_TC_BODY(resume1, tc) // Times out atf_tc_expect_timeout("PR kern/51995"); + // Hangs with qemu + ATF_REQUIRE(0 && "In order to get reliable failure, abort"); SYSCALL_REQUIRE(msg_open() == 0);
CVS commit: src/distrib/utils/embedded/files
Module Name:src Committed By: jmcneill Date: Mon Dec 18 19:08:16 UTC 2017 Modified Files: src/distrib/utils/embedded/files: armv7_boot.cmd Log Message: No need to specify console=fb for pinebook anymore as WSDISPLAY_MULTICONS will give us a framebuffer console To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/embedded/files/armv7_boot.cmd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/files/armv7_boot.cmd diff -u src/distrib/utils/embedded/files/armv7_boot.cmd:1.3 src/distrib/utils/embedded/files/armv7_boot.cmd:1.4 --- src/distrib/utils/embedded/files/armv7_boot.cmd:1.3 Sat Dec 16 21:28:19 2017 +++ src/distrib/utils/embedded/files/armv7_boot.cmd Mon Dec 18 19:08:16 2017 @@ -1,10 +1,6 @@ if test "${soc}" = "sunxi" ; then setenv kernel netbsd-SUNXI.ub - if test "${fdtfile}" = "allwinner/sun50i-a64-pinebook.dtb" ; ten - setenv bootargs 'root=ld0a console=fb' - else - setenv bootargs 'root=ld0a' - fi + setenv bootargs 'root=ld0a' setenv mmcpart 0:1 setenv use_fdt 1 fi
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jmcneill Date: Mon Dec 18 19:06:32 UTC 2017 Modified Files: src/sys/dev/fdt: simplefb.c Log Message: Always set "is_console" property to true when WSDISPLAY_MULTICONS is defined To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/simplefb.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/simplefb.c diff -u src/sys/dev/fdt/simplefb.c:1.2 src/sys/dev/fdt/simplefb.c:1.3 --- src/sys/dev/fdt/simplefb.c:1.2 Mon Sep 4 18:01:28 2017 +++ src/sys/dev/fdt/simplefb.c Mon Dec 18 19:06:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: simplefb.c,v 1.2 2017/09/04 18:01:28 jmcneill Exp $ */ +/* $NetBSD: simplefb.c,v 1.3 2017/12/18 19:06:32 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -26,8 +26,10 @@ * SUCH DAMAGE. */ +#include "opt_wsdisplay_compat.h" + #include -__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.2 2017/09/04 18:01:28 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.3 2017/12/18 19:06:32 jmcneill Exp $"); #include #include @@ -177,13 +179,16 @@ simplefb_attach_genfb(struct simplefb_so ops.genfb_ioctl = simplefb_ioctl; ops.genfb_mmap = simplefb_mmap; +#ifdef WSDISPLAY_MULTICONS + const bool is_console = true; +#else const bool is_console = phandle == simplefb_console_phandle; - - prop_dictionary_set_bool(dict, "is_console", is_console); - if (is_console) aprint_normal_dev(sc->sc_gen.sc_dev, "switching to framebuffer console\n"); +#endif + + prop_dictionary_set_bool(dict, "is_console", is_console); genfb_attach(>sc_gen, );
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Mon Dec 18 19:00:42 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: Add WSDISPLAY_MULTICONS To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/evbarm/conf/SUNXI 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/SUNXI diff -u src/sys/arch/evbarm/conf/SUNXI:1.56 src/sys/arch/evbarm/conf/SUNXI:1.57 --- src/sys/arch/evbarm/conf/SUNXI:1.56 Sat Dec 16 20:44:54 2017 +++ src/sys/arch/evbarm/conf/SUNXI Mon Dec 18 19:00:42 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.56 2017/12/16 20:44:54 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.57 2017/12/18 19:00:42 jmcneill Exp $ # # Allwinner sunxi family # @@ -286,6 +286,7 @@ options WSDISPLAY_COMPAT_SYSCONS options WSDISPLAY_COMPAT_USL options WSDISPLAY_COMPAT_RAWKBD options WSDISPLAY_DEFAULTSCREENS=4 +options WSDISPLAY_MULTICONS # Touch Screen controller sunxits* at fdt? # Touch Screen controller
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Mon Dec 18 18:59:32 UTC 2017 Modified Files: src/sys/dev/wscons: files.wscons wsdisplay.c Log Message: Add WSDISPLAY_MULTICONS option which allows wsdisplay to cooperate with the console device being overridden. This allows for simultaneous console output on fb and debug uart. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/dev/wscons/files.wscons cvs rdiff -u -r1.143 -r1.144 src/sys/dev/wscons/wsdisplay.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/wscons/files.wscons diff -u src/sys/dev/wscons/files.wscons:1.54 src/sys/dev/wscons/files.wscons:1.55 --- src/sys/dev/wscons/files.wscons:1.54 Wed Aug 30 00:39:27 2017 +++ src/sys/dev/wscons/files.wscons Mon Dec 18 18:59:32 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.wscons,v 1.54 2017/08/30 00:39:27 jmcneill Exp $ +# $NetBSD: files.wscons,v 1.55 2017/12/18 18:59:32 jmcneill Exp $ # # "Workstation Console" glue; attaches frame buffer to emulator & keyboard, @@ -31,6 +31,7 @@ defflag opt_wsdisplay_compat.h WSDISPLAY WSCONS_SUPPORT_ISO7FONTS WSDISPLAY_SCROLLSUPPORT WSKBD_EVENT_AUTOREPEAT +WSDISPLAY_MULTICONS defparam opt_wsdisplay_compat.h WSCOMPAT_USL_SYNCTIMEOUT WSDISPLAY_DEFAULTSCREENS defparam opt_wsdisplay_compat.h WSDISPLAY_SCROLLBACK_LINES=100 Index: src/sys/dev/wscons/wsdisplay.c diff -u src/sys/dev/wscons/wsdisplay.c:1.143 src/sys/dev/wscons/wsdisplay.c:1.144 --- src/sys/dev/wscons/wsdisplay.c:1.143 Fri Nov 3 18:49:37 2017 +++ src/sys/dev/wscons/wsdisplay.c Mon Dec 18 18:59:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay.c,v 1.143 2017/11/03 18:49:37 maya Exp $ */ +/* $NetBSD: wsdisplay.c,v 1.144 2017/12/18 18:59:32 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.143 2017/11/03 18:49:37 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.144 2017/12/18 18:59:32 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_wsdisplay_compat.h" @@ -71,6 +71,9 @@ __KERNEL_RCSID(0, "$NetBSD: wsdisplay.c, #include "locators.h" +/* Console device before replaced by wsdisplay */ +static struct consdev *wsdisplay_ocn; + struct wsscreen_internal { const struct wsdisplay_emulops *emulops; void *emulcookie; @@ -99,6 +102,10 @@ struct wsscreen { int scr_rawkbd; #endif +#ifdef WSDISPLAY_MULTICONS + callout_t scr_getc_ch; +#endif + struct wsdisplay_softc *sc; #ifdef DIAGNOSTIC @@ -234,14 +241,15 @@ static int wsdisplay_console_attached; static struct wsdisplay_softc *wsdisplay_console_device; static struct wsscreen_internal wsdisplay_console_conf; -static int wsdisplay_getc_dummy(dev_t); +static int wsdisplay_getc(dev_t); static void wsdisplay_pollc(dev_t, int); static int wsdisplay_cons_pollmode; +static int (*wsdisplay_cons_kbd_getc)(dev_t); static void (*wsdisplay_cons_kbd_pollc)(dev_t, int); static struct consdev wsdisplay_cons = { - NULL, NULL, wsdisplay_getc_dummy, wsdisplay_cnputc, + NULL, NULL, wsdisplay_getc, wsdisplay_cnputc, wsdisplay_pollc, NULL, NULL, NULL, NODEV, CN_NORMAL }; @@ -262,6 +270,27 @@ static int wsdisplay_dosync(struct wsdis int wsdisplay_clearonclose; +#ifdef WSDISPLAY_MULTICONS +static void +wsscreen_getc_poll(void *priv) +{ + struct wsscreen *scr = priv; + int c; + + if (wsdisplay_ocn && wsdisplay_ocn->cn_getc && + WSSCREEN_HAS_EMULATOR(scr) && WSSCREEN_HAS_TTY(scr)) { + struct tty *tp = scr->scr_tty; + do { + c = wsdisplay_ocn->cn_getc(wsdisplay_ocn->cn_dev); + if (c != -1) +(*tp->t_linesw->l_rint)((unsigned char)c, tp); + } while (c != -1); + } + + callout_schedule(>scr_getc_ch, mstohz(10)); +} +#endif + struct wsscreen * wsscreen_attach(struct wsdisplay_softc *sc, int console, const char *emul, const struct wsscreen_descr *type, void *cookie, int ccol, @@ -315,6 +344,12 @@ wsscreen_attach(struct wsdisplay_softc * #ifdef WSDISPLAY_COMPAT_RAWKBD scr->scr_rawkbd = 0; #endif +#ifdef WSDISPLAY_MULTICONS + callout_init(>scr_getc_ch, 0); + callout_setfunc(>scr_getc_ch, wsscreen_getc_poll, scr); + if (console) + callout_schedule(>scr_getc_ch, mstohz(10)); +#endif return (scr); } @@ -334,6 +369,8 @@ wsscreen_detach(struct wsscreen *scr) } if (scr->scr_dconf->scrdata->capabilities & WSSCREEN_FREE) free(__UNCONST(scr->scr_dconf->scrdata), M_DEVBUF); + callout_halt(>scr_getc_ch, NULL); + callout_destroy(>scr_getc_ch); free(scr->scr_dconf, M_DEVBUF); free(scr, M_DEVBUF); } @@ -884,6 +921,8 @@ wsdisplay_cnattach(const struct wsscreen ccol, crow, defattr); + if (cn_tab != _cons) + wsdisplay_ocn = cn_tab; cn_tab = _cons; wsdisplay_console_initted = 2; } @@ -910,6 +949,8 @@ wsdisplay_preattach(const struct wsscree ccol, crow, defattr); + if (cn_tab != _cons) +
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jmcneill Date: Mon Dec 18 18:58:00 UTC 2017 Modified Files: src/sys/dev/usb: ukbd.c Log Message: ukbd_cngetc: poll once for data in the buffer, otherwise return type 0 (no data) To generate a diff of this commit: cvs rdiff -u -r1.139 -r1.140 src/sys/dev/usb/ukbd.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/usb/ukbd.c diff -u src/sys/dev/usb/ukbd.c:1.139 src/sys/dev/usb/ukbd.c:1.140 --- src/sys/dev/usb/ukbd.c:1.139 Sun Dec 10 17:03:07 2017 +++ src/sys/dev/usb/ukbd.c Mon Dec 18 18:58:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ukbd.c,v 1.139 2017/12/10 17:03:07 bouyer Exp $*/ +/* $NetBSD: ukbd.c,v 1.140 2017/12/18 18:58:00 jmcneill Exp $*/ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.139 2017/12/10 17:03:07 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.140 2017/12/18 18:58:00 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -964,15 +964,20 @@ ukbd_cngetc(void *v, u_int *type, int *d DPRINTFN(0,("ukbd_cngetc: enter\n")); sc->sc_flags |= FLAG_POLLING; - while (sc->sc_npollchar <= 0) + if (sc->sc_npollchar <= 0) usbd_dopoll(sc->sc_hdev.sc_parent->sc_iface); sc->sc_flags &= ~FLAG_POLLING; - c = sc->sc_pollchars[0]; - sc->sc_npollchar--; - memmove(sc->sc_pollchars, sc->sc_pollchars+1, - sc->sc_npollchar * sizeof(uint16_t)); - *type = c & RELEASE ? WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN; - *data = c & CODEMASK; + if (sc->sc_npollchar > 0) { + c = sc->sc_pollchars[0]; + sc->sc_npollchar--; + memmove(sc->sc_pollchars, sc->sc_pollchars+1, + sc->sc_npollchar * sizeof(uint16_t)); + *type = c & RELEASE ? WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN; + *data = c & CODEMASK; + } else { + *type = 0; + *data = 0; + } DPRINTFN(0,("ukbd_cngetc: return 0x%02x\n", c)); if (broken) ukbd_cnpollc(v, 0);
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Mon Dec 18 18:57:21 UTC 2017 Modified Files: src/sys/dev/wscons: wskbd.c Log Message: If the wskbd driver returns type 0, return "no data" from wskbd_cngetc To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/sys/dev/wscons/wskbd.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/wscons/wskbd.c diff -u src/sys/dev/wscons/wskbd.c:1.140 src/sys/dev/wscons/wskbd.c:1.141 --- src/sys/dev/wscons/wskbd.c:1.140 Tue Jun 13 00:42:27 2017 +++ src/sys/dev/wscons/wskbd.c Mon Dec 18 18:57:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wskbd.c,v 1.140 2017/06/13 00:42:27 nat Exp $ */ +/* $NetBSD: wskbd.c,v 1.141 2017/12/18 18:57:21 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -105,7 +105,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.140 2017/06/13 00:42:27 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.141 2017/12/18 18:57:21 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1400,6 +1400,10 @@ wskbd_cngetc(dev_t dev) (*wskbd_console_data.t_consops->getc) (wskbd_console_data.t_consaccesscookie, , ); + if (type == 0) { +/* No data returned */ +return 0; + } if (type == WSCONS_EVENT_ASCII) { /* * We assume that when the driver falls back
CVS commit: src/sys
Module Name:src Committed By: skrll Date: Mon Dec 18 15:53:39 UTC 2017 Modified Files: src/sys/arch/arm/conf: std.arm src/sys/arch/evbarm/conf: files.evbarm src/sys/arch/macppc/conf: files.macppc src/sys/arch/ofppc/conf: files.ofppc src/sys/arch/shark/conf: files.shark src/sys/conf: files Log Message: Generalise FDT and OFW To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/conf/std.arm cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbarm/conf/files.evbarm cvs rdiff -u -r1.105 -r1.106 src/sys/arch/macppc/conf/files.macppc cvs rdiff -u -r1.46 -r1.47 src/sys/arch/ofppc/conf/files.ofppc cvs rdiff -u -r1.20 -r1.21 src/sys/arch/shark/conf/files.shark cvs rdiff -u -r1.1188 -r1.1189 src/sys/conf/files 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/conf/std.arm diff -u src/sys/arch/arm/conf/std.arm:1.4 src/sys/arch/arm/conf/std.arm:1.5 --- src/sys/arch/arm/conf/std.arm:1.4 Fri Dec 15 16:41:40 2017 +++ src/sys/arch/arm/conf/std.arm Mon Dec 18 15:53:38 2017 @@ -1,6 +1,5 @@ -# $NetBSD: std.arm,v 1.4 2017/12/15 16:41:40 christos Exp $ +# $NetBSD: std.arm,v 1.5 2017/12/18 15:53:38 skrll Exp $ # # standard NetBSD/arm options options CPU_IN_CKSUM -defflag FDT Index: src/sys/arch/evbarm/conf/files.evbarm diff -u src/sys/arch/evbarm/conf/files.evbarm:1.27 src/sys/arch/evbarm/conf/files.evbarm:1.28 --- src/sys/arch/evbarm/conf/files.evbarm:1.27 Wed Aug 30 23:57:27 2017 +++ src/sys/arch/evbarm/conf/files.evbarm Mon Dec 18 15:53:38 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.evbarm,v 1.27 2017/08/30 23:57:27 jmcneill Exp $ +# $NetBSD: files.evbarm,v 1.28 2017/12/18 15:53:38 skrll Exp $ # # First try for arm-specific configuration info # @@ -53,10 +53,4 @@ file arch/evbarm/dev/plcom.c plcom nee # defparam opt_machdep.h DRAM_BLOCKS -# -# Flattened Device Tree (FDT) support -# -include "dev/ofw/files.ofw" -include "dev/fdt/files.fdt" - include "arch/arm/conf/majors.arm32" Index: src/sys/arch/macppc/conf/files.macppc diff -u src/sys/arch/macppc/conf/files.macppc:1.105 src/sys/arch/macppc/conf/files.macppc:1.106 --- src/sys/arch/macppc/conf/files.macppc:1.105 Fri Sep 22 03:11:43 2017 +++ src/sys/arch/macppc/conf/files.macppc Mon Dec 18 15:53:38 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.macppc,v 1.105 2017/09/22 03:11:43 macallan Exp $ +# $NetBSD: files.macppc,v 1.106 2017/12/18 15:53:38 skrll Exp $ # # macppc-specific configuration info @@ -65,11 +65,6 @@ include "dev/scsipi/files.scsipi" include "dev/ata/files.ata" # -# Generic OpenFirmware device support -# -include "dev/ofw/files.ofw" - -# # Machine-independent I2O drivers # include "dev/i2o/files.i2o" Index: src/sys/arch/ofppc/conf/files.ofppc diff -u src/sys/arch/ofppc/conf/files.ofppc:1.46 src/sys/arch/ofppc/conf/files.ofppc:1.47 --- src/sys/arch/ofppc/conf/files.ofppc:1.46 Thu Aug 4 15:07:04 2011 +++ src/sys/arch/ofppc/conf/files.ofppc Mon Dec 18 15:53:39 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.ofppc,v 1.46 2011/08/04 15:07:04 phx Exp $ +# $NetBSD: files.ofppc,v 1.47 2017/12/18 15:53:39 skrll Exp $ # # NetBSD/ofppc configuration info # @@ -38,11 +38,6 @@ include "arch/powerpc/pic/files.pic" include "arch/powerpc/pic/files.ipi" # -# Generic OpenFirmware device support -# -#include "dev/ofw/files.ofw" - -# # I2O device support # include "dev/i2o/files.i2o" @@ -65,10 +60,6 @@ device mainbus: mainbus attach mainbus at root file arch/ofppc/ofppc/mainbus.c mainbus -defpseudo openfirm -file dev/ofw/openfirmio.c openfirm needs-flag -file dev/ofw/ofw_subr.c ofbus | openfirm - device rtas attach rtas at mainbus file arch/powerpc/powerpc/rtas.c rtas needs-flag Index: src/sys/arch/shark/conf/files.shark diff -u src/sys/arch/shark/conf/files.shark:1.20 src/sys/arch/shark/conf/files.shark:1.21 --- src/sys/arch/shark/conf/files.shark:1.20 Fri Mar 10 00:09:13 2017 +++ src/sys/arch/shark/conf/files.shark Mon Dec 18 15:53:39 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.shark,v 1.20 2017/03/10 00:09:13 macallan Exp $ +# $NetBSD: files.shark,v 1.21 2017/12/18 15:53:39 skrll Exp $ # # First try for arm-specific configuration info # @@ -38,7 +38,6 @@ include "dev/pckbport/files.pckbport" include "dev/ata/files.ata" # Common OFW files -include "dev/ofw/files.ofw" include "arch/arm/ofw/files.ofw" attach ofbus at root with ofbus_root file arch/shark/ofw/ofw.c Index: src/sys/conf/files diff -u src/sys/conf/files:1.1188 src/sys/conf/files:1.1189 --- src/sys/conf/files:1.1188 Sat Dec 16 09:34:18 2017 +++ src/sys/conf/files Mon Dec 18 15:53:39 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1188 2017/12/16 09:34:18 maxv Exp $ +# $NetBSD: files,v 1.1189 2017/12/18 15:53:39 skrll Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20171118 @@ -1631,3 +1631,9 @@ include "dev/ic/files.athn" # MI clk api # include "dev/clk/files.clk" + +# +# Flattened
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Mon Dec 18 13:56:14 UTC 2017 Modified Files: src/sys/dev/ic: bwfm.c Log Message: Support promiscuous mode To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/bwfm.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/ic/bwfm.c diff -u src/sys/dev/ic/bwfm.c:1.6 src/sys/dev/ic/bwfm.c:1.7 --- src/sys/dev/ic/bwfm.c:1.6 Mon Dec 18 12:42:21 2017 +++ src/sys/dev/ic/bwfm.c Mon Dec 18 13:56:14 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bwfm.c,v 1.6 2017/12/18 12:42:21 jmcneill Exp $ */ +/* $NetBSD: bwfm.c,v 1.7 2017/12/18 13:56:14 jmcneill Exp $ */ /* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -423,6 +423,13 @@ bwfm_init(struct ifnet *ifp) bwfm_fwvar_var_set_int(sc, "ndoe", 0); bwfm_fwvar_var_set_int(sc, "toe", 0); + /* Accept all multicast frames. */ + bwfm_fwvar_var_set_int(sc, "allmulti", 1); + + /* Setup promiscuous mode */ + bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_PROMISC, + (ifp->if_flags & IFF_PROMISC) ? 1 : 0); + /* * Tell the firmware supplicant that we are going to handle the * WPA handshake ourselves. @@ -1494,12 +1501,6 @@ bwfm_connect(struct bwfm_softc *sc) } kmem_free(params, sizeof(*params)); } - - /* XXX: added for testing only, remove */ - bwfm_fwvar_var_set_int(sc, "allmulti", 1); -#if 0 - bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_PROMISC, 1); -#endif } void
CVS commit: src/tests/lib/libc/gen/posix_spawn
Module Name:src Committed By: christos Date: Mon Dec 18 13:18:23 UTC 2017 Modified Files: src/tests/lib/libc/gen/posix_spawn: t_spawnattr.c Log Message: Don't use SCHED_OTHER. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c diff -u src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c:1.1 src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c:1.2 --- src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c:1.1 Mon Feb 13 16:03:08 2012 +++ src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c Mon Dec 18 08:18:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_spawnattr.c,v 1.1 2012/02/13 21:03:08 martin Exp $ */ +/* $NetBSD: t_spawnattr.c,v 1.2 2017/12/18 13:18:23 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -51,20 +51,21 @@ static int get_different_priority(void); static int get_different_scheduler() { - int scheduler, max, min, new; - - max = MAX(MAX(SCHED_FIFO, SCHED_OTHER), SCHED_RR); - min = MIN(MIN(SCHED_FIFO, SCHED_OTHER), SCHED_RR); + /* + * We don't want to use SCHED_OTHER because it does not have + * different priorities. + */ /* get current schedule policy */ - scheduler = sched_getscheduler(0); - - /* new scheduler */ - new = (scheduler + 1); - if (new > max) - new = min; - - return new; + switch (sched_getscheduler(0)) { + case SCHED_RR: + return SCHED_FIFO; + case SCHED_FIFO: + case SCHED_OTHER: + return SCHED_RR; + default: + abort(); + } } static int
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Mon Dec 18 12:42:21 UTC 2017 Modified Files: src/sys/dev/ic: bwfm.c Log Message: Use ieee80211_media_status To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/bwfm.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/ic/bwfm.c diff -u src/sys/dev/ic/bwfm.c:1.5 src/sys/dev/ic/bwfm.c:1.6 --- src/sys/dev/ic/bwfm.c:1.5 Mon Dec 18 12:36:16 2017 +++ src/sys/dev/ic/bwfm.c Mon Dec 18 12:42:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bwfm.c,v 1.5 2017/12/18 12:36:16 jmcneill Exp $ */ +/* $NetBSD: bwfm.c,v 1.6 2017/12/18 12:42:21 jmcneill Exp $ */ /* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -60,7 +60,6 @@ void bwfm_stop(struct ifnet *, int); void bwfm_watchdog(struct ifnet *); int bwfm_ioctl(struct ifnet *, u_long, void *); int bwfm_media_change(struct ifnet *); -void bwfm_media_status(struct ifnet *, struct ifmediareq *); int bwfm_send_mgmt(struct ieee80211com *, struct ieee80211_node *, int, int); @@ -257,7 +256,7 @@ bwfm_attach(struct bwfm_softc *sc) ic->ic_recv_mgmt = bwfm_recv_mgmt; ic->ic_crypto.cs_key_set = bwfm_key_set; ic->ic_crypto.cs_key_delete = bwfm_key_delete; - ieee80211_media_init(ic, bwfm_media_change, bwfm_media_status); + ieee80211_media_init(ic, bwfm_media_change, ieee80211_media_status); ieee80211_announce(ic); @@ -765,11 +764,6 @@ bwfm_media_change(struct ifnet *ifp) return 0; } -void -bwfm_media_status(struct ifnet *ifp, struct ifmediareq *imr) -{ -} - /* Chip initialization (SDIO, PCIe) */ int bwfm_chip_attach(struct bwfm_softc *sc)
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Mon Dec 18 12:36:16 UTC 2017 Modified Files: src/sys/dev/ic: bwfm.c Log Message: Stop the device at attach in case it was previously initialized To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/bwfm.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/ic/bwfm.c diff -u src/sys/dev/ic/bwfm.c:1.4 src/sys/dev/ic/bwfm.c:1.5 --- src/sys/dev/ic/bwfm.c:1.4 Mon Oct 23 15:21:10 2017 +++ src/sys/dev/ic/bwfm.c Mon Dec 18 12:36:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bwfm.c,v 1.4 2017/10/23 15:21:10 jmcneill Exp $ */ +/* $NetBSD: bwfm.c,v 1.5 2017/12/18 12:36:16 jmcneill Exp $ */ /* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -149,6 +149,9 @@ bwfm_attach(struct bwfm_softc *sc) pcq_put(sc->sc_freetask, t); } + /* Stop the device in case it was previously initialized */ + bwfm_fwvar_cmd_set_int(sc, BWFM_C_DOWN, 1); + if (bwfm_fwvar_cmd_get_int(sc, BWFM_C_GET_VERSION, )) { printf("%s: could not read io type\n", DEVNAME(sc)); return;
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Mon Dec 18 08:24:29 UTC 2017 Modified Files: src/sys/net: if.h Log Message: Note that IFNET_LOCK must not be held in softint To generate a diff of this commit: cvs rdiff -u -r1.256 -r1.257 src/sys/net/if.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/net/if.h diff -u src/sys/net/if.h:1.256 src/sys/net/if.h:1.257 --- src/sys/net/if.h:1.256 Fri Dec 15 04:07:20 2017 +++ src/sys/net/if.h Mon Dec 18 08:24:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.256 2017/12/15 04:07:20 ozaki-r Exp $ */ +/* $NetBSD: if.h,v 1.257 2017/12/18 08:24:29 ozaki-r Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -448,6 +448,16 @@ typedef struct ifnet { * - Must be updated with holding IFNET_LOCK * - You cannot use the flag in Tx/Rx paths anymore because there is no * synchronization on the flag except for IFNET_LOCK + * - Note that IFNET_LOCK can't be taken in softint because it's known + * that it causes a deadlock + * - Some synchronization mechanisms such as pserialize_perform are called + * with IFNET_LOCK and also require context switches on every CPUs + * that mean softints finish so trying to take IFNET_LOCK in softint + * might block on IFNET_LOCK and prevent such synchronization mechanisms + * from being completed + * - Currently the deadlock occurs only if NET_MPSAFE is enabled, however, + * we should deal with the restriction because NET_MPSAFE will be enabled + * by default in the future * - if_watchdog and if_timer * - The watchdog framework works only for non-IFEF_MPSAFE interfaces * that rely on KERNEL_LOCK