CVS commit: src/usr.bin/gzip
Module Name:src Committed By: mrg Date: Tue Oct 27 07:36:18 UTC 2015 Modified Files: src/usr.bin/gzip: gzip.1 gzip.c Log Message: port across the change from freebsd rev 290024: In gunzip(1), treat trailing garbage as a warning and not an error. This allows scripts to distinguish it between real fatal errors, for instance a CRC mismatch. Update manual page for the behavior change. PR: bin/203873 Submitted by: Eugene Grosbein MFC after: 2 weeks To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.bin/gzip/gzip.1 cvs rdiff -u -r1.108 -r1.109 src/usr.bin/gzip/gzip.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.bin/gzip/gzip.1 diff -u src/usr.bin/gzip/gzip.1:1.25 src/usr.bin/gzip/gzip.1:1.26 --- src/usr.bin/gzip/gzip.1:1.25 Mon Apr 6 21:41:17 2015 +++ src/usr.bin/gzip/gzip.1 Tue Oct 27 07:36:18 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.25 2015/04/06 21:41:17 wiz Exp $ +.\" $NetBSD: gzip.1,v 1.26 2015/10/27 07:36:18 mrg Exp $ .\" .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green .\" All rights reserved. @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 6, 2015 +.Dd October 26, 2015 .Dt GZIP 1 .Os .Sh NAME @@ -169,6 +169,12 @@ is set, it is parsed as a white-space se handled before any options on the command line. Options on the command line will override anything in .Ev GZIP . +.Sh EXIT STATUS +The +.Nm +utility exits 0 on success, +1 on errors, +and 2 if a warning occurs. .Sh SEE ALSO .Xr bzip2 1 , .Xr compress 1 , Index: src/usr.bin/gzip/gzip.c diff -u src/usr.bin/gzip/gzip.c:1.108 src/usr.bin/gzip/gzip.c:1.109 --- src/usr.bin/gzip/gzip.c:1.108 Wed Apr 15 02:29:12 2015 +++ src/usr.bin/gzip/gzip.c Tue Oct 27 07:36:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.108 2015/04/15 02:29:12 christos Exp $ */ +/* $NetBSD: gzip.c,v 1.109 2015/10/27 07:36:18 mrg Exp $ */ /* * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -30,7 +30,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\ Matthew R. Green. All rights reserved."); -__RCSID("$NetBSD: gzip.c,v 1.108 2015/04/15 02:29:12 christos Exp $"); +__RCSID("$NetBSD: gzip.c,v 1.109 2015/10/27 07:36:18 mrg Exp $"); #endif /* not lint */ /* @@ -788,6 +788,7 @@ gz_uncompress(int in, int out, char *pre goto stop; } maybe_warnx("input not gziped (MAGIC0)"); +exit_value = 2; goto stop_and_fail; } ADVANCE();
CVS commit: src/sys/compat/linux/arch/amd64
Module Name:src Committed By: njoly Date: Tue Oct 27 07:16:00 UTC 2015 Modified Files: src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c linux_systrace_args.c Log Message: Regen To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/arch/amd64/linux_syscall.h \ src/sys/compat/linux/arch/amd64/linux_syscallargs.h \ src/sys/compat/linux/arch/amd64/linux_syscalls.c \ src/sys/compat/linux/arch/amd64/linux_sysent.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/compat/linux/arch/amd64/linux_systrace_args.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/amd64/linux_syscall.h diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.58 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.59 --- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.58 Thu Sep 24 14:42:45 2015 +++ src/sys/compat/linux/arch/amd64/linux_syscall.h Tue Oct 27 07:16:00 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.58 2015/09/24 14:42:45 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.59 2015/10/27 07:16:00 njoly Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp + * created from NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -333,10 +333,10 @@ /* syscall: "getgid" ret: "gid_t" args: */ #define LINUX_SYS_getgid 104 -/* syscall: "setuid" ret: "void" args: "uid_t" */ +/* syscall: "setuid" ret: "int" args: "uid_t" */ #define LINUX_SYS_setuid 105 -/* syscall: "setgid" ret: "void" args: "gid_t" */ +/* syscall: "setgid" ret: "int" args: "gid_t" */ #define LINUX_SYS_setgid 106 /* syscall: "geteuid" ret: "uid_t" args: */ Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.58 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.59 --- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.58 Thu Sep 24 14:42:45 2015 +++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h Tue Oct 27 07:16:00 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.58 2015/09/24 14:42:45 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.59 2015/10/27 07:16:00 njoly Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp + * created from NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.58 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.59 --- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.58 Thu Sep 24 14:42:45 2015 +++ src/sys/compat/linux/arch/amd64/linux_syscalls.c Tue Oct 27 07:16:00 2015 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.58 2015/09/24 14:42:45 christos Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.59 2015/10/27 07:16:00 njoly Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp + * created from NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.58 2015/09/24 14:42:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.59 2015/10/27 07:16:00 njoly Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) Index: src/sys/compat/linux/arch/amd64/linux_sysent.c diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.58 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.59 --- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.58 Thu Sep 24 14:42:45 2015 +++ src/sys/compat/linux/arch/amd64/linux_sysent.c Tue Oct 27 07:16:00 2015 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.58 2015/09/24 14:42:45 christos Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.59 2015/10/27 07:16:00 njoly Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp + * created from NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.58 2015/09/24 14:42:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.59 2015/10/27 07:16:00 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" Index: src/sys/compat/linux/arch/amd64/linux_systrace_args.c diff -u src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.3 src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.4 --- src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.3 Thu Sep 24
CVS commit: src/sys/compat/linux/arch/amd64
Module Name:src Committed By: njoly Date: Tue Oct 27 07:15:38 UTC 2015 Modified Files: src/sys/compat/linux/arch/amd64: syscalls.master Log Message: Fix setuid/setgid return type (void -> int) to match native. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/compat/linux/arch/amd64/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/linux/arch/amd64/syscalls.master diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.55 src/sys/compat/linux/arch/amd64/syscalls.master:1.56 --- src/sys/compat/linux/arch/amd64/syscalls.master:1.55 Sun May 31 10:49:27 2015 +++ src/sys/compat/linux/arch/amd64/syscalls.master Tue Oct 27 07:15:38 2015 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.55 2015/05/31 10:49:27 njoly Exp $ + $NetBSD: syscalls.master,v 1.56 2015/10/27 07:15:38 njoly Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -259,8 +259,8 @@ 102 NOARGS { uid_t|sys||getuid(void); } 103 UNIMPL syslog 104 NOARGS { gid_t|sys||getgid(void); } -105 NOARGS { void|sys||setuid(uid_t uid); } -106 NOARGS { void|sys||setgid(gid_t gid); } +105 NOARGS { int|sys||setuid(uid_t uid); } +106 NOARGS { int|sys||setgid(gid_t gid); } 107 NOARGS { uid_t|sys||geteuid(void); } 108 NOARGS { gid_t|sys||getegid(void); } 109 NOARGS { int|sys||setpgid(int pid, int pgid); }
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Tue Oct 27 08:46:13 UTC 2015 Modified Files: src/share/man/man4: vlan.4 Log Message: Fl already provides the '-'. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/share/man/man4/vlan.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/vlan.4 diff -u src/share/man/man4/vlan.4:1.32 src/share/man/man4/vlan.4:1.33 --- src/share/man/man4/vlan.4:1.32 Mon Oct 26 22:18:57 2015 +++ src/share/man/man4/vlan.4 Tue Oct 27 08:46:13 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: vlan.4,v 1.32 2015/10/26 22:18:57 bad Exp $ +.\" $NetBSD: vlan.4,v 1.33 2015/10/27 08:46:13 wiz Exp $ .\" .\" Copyright (c) 2000, 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -96,11 +96,11 @@ interface with a matching VID exists are .Po These are displayed by the .Xr ifconfig 8 -.Fl -v +.Fl v option. .Pc .Pp -If the +If the .Nm pseudo-device is not configured in the kernel only packets tagged with a VID of 0 are processed.
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Oct 27 08:02:31 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: uhci.c uhcivar.h Log Message: Remove barely used softc copy in uhci_intr_info_t To generate a diff of this commit: cvs rdiff -u -r1.264.4.37 -r1.264.4.38 src/sys/dev/usb/uhci.c cvs rdiff -u -r1.52.14.9 -r1.52.14.10 src/sys/dev/usb/uhcivar.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/uhci.c diff -u src/sys/dev/usb/uhci.c:1.264.4.37 src/sys/dev/usb/uhci.c:1.264.4.38 --- src/sys/dev/usb/uhci.c:1.264.4.37 Tue Oct 20 15:31:21 2015 +++ src/sys/dev/usb/uhci.c Tue Oct 27 08:02:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.264.4.37 2015/10/20 15:31:21 skrll Exp $ */ +/* $NetBSD: uhci.c,v 1.264.4.38 2015/10/27 08:02:31 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.37 2015/10/20 15:31:21 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.38 2015/10/27 08:02:31 skrll Exp $"); #include "opt_usb.h" @@ -624,7 +624,6 @@ uhci_allocx(struct usbd_bus *bus, unsign memset(xfer, 0, sizeof(struct uhci_xfer)); struct uhci_xfer *uxfer = UHCI_XFER2UXFER(xfer); - uxfer->iinfo.sc = sc; #ifdef DIAGNOSTIC uxfer->iinfo.isdone = true; xfer->ux_state = XFER_BUSY; @@ -3011,7 +3010,7 @@ void uhci_device_intr_done(struct usbd_xfer *xfer) { uhci_intr_info_t *ii = _XFER2UXFER(xfer)->iinfo; - uhci_softc_t *sc = ii->sc; + uhci_softc_t *sc = UHCI_XFER2SC(xfer); struct uhci_pipe *upipe = (struct uhci_pipe *)xfer->ux_pipe; uhci_soft_qh_t *sqh; int i, npoll, isread; @@ -3091,7 +3090,7 @@ void uhci_device_ctrl_done(struct usbd_xfer *xfer) { uhci_intr_info_t *ii = _XFER2UXFER(xfer)->iinfo; - uhci_softc_t *sc = ii->sc; + uhci_softc_t *sc = UHCI_XFER2SC(xfer); struct uhci_pipe *upipe = (struct uhci_pipe *)xfer->ux_pipe; int len = UGETW(xfer->ux_request.wLength); int isread = (xfer->ux_request.bmRequestType & UT_READ); @@ -3130,7 +3129,7 @@ void uhci_device_bulk_done(struct usbd_xfer *xfer) { uhci_intr_info_t *ii = _XFER2UXFER(xfer)->iinfo; - uhci_softc_t *sc = ii->sc; + uhci_softc_t *sc = UHCI_XFER2SC(xfer); struct uhci_pipe *upipe = (struct uhci_pipe *)xfer->ux_pipe; UHCIHIST_FUNC(); UHCIHIST_CALLED(); Index: src/sys/dev/usb/uhcivar.h diff -u src/sys/dev/usb/uhcivar.h:1.52.14.9 src/sys/dev/usb/uhcivar.h:1.52.14.10 --- src/sys/dev/usb/uhcivar.h:1.52.14.9 Thu Oct 22 11:15:42 2015 +++ src/sys/dev/usb/uhcivar.h Tue Oct 27 08:02:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uhcivar.h,v 1.52.14.9 2015/10/22 11:15:42 skrll Exp $ */ +/* $NetBSD: uhcivar.h,v 1.52.14.10 2015/10/27 08:02:31 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -67,7 +67,6 @@ typedef union { * searched at interrupt time. */ typedef struct uhci_intr_info { - struct uhci_softc *sc; struct usbd_xfer *xfer; uhci_soft_td_t *stdstart; uhci_soft_td_t *stdend;
CVS commit: src/sys/compat/linux/arch
Module Name:src Committed By: njoly Date: Tue Oct 27 06:30:10 UTC 2015 Modified Files: src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/compat/linux/arch/mips/linux_syscall.h cvs rdiff -u -r1.64 -r1.65 src/sys/compat/linux/arch/mips/linux_syscallargs.h \ src/sys/compat/linux/arch/mips/linux_syscalls.c \ src/sys/compat/linux/arch/mips/linux_sysent.c cvs rdiff -u -r1.74 -r1.75 src/sys/compat/linux/arch/powerpc/linux_syscall.h \ src/sys/compat/linux/arch/powerpc/linux_sysent.c cvs rdiff -u -r1.73 -r1.74 \ src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \ src/sys/compat/linux/arch/powerpc/linux_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/mips/linux_syscall.h diff -u src/sys/compat/linux/arch/mips/linux_syscall.h:1.65 src/sys/compat/linux/arch/mips/linux_syscall.h:1.66 --- src/sys/compat/linux/arch/mips/linux_syscall.h:1.65 Sun Oct 25 15:55:58 2015 +++ src/sys/compat/linux/arch/mips/linux_syscall.h Tue Oct 27 06:30:10 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.65 2015/10/25 15:55:58 njoly Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.66 2015/10/27 06:30:10 njoly Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.58 2015/10/25 15:55:05 njoly Exp + * created from NetBSD: syscalls.master,v 1.59 2015/10/27 06:29:35 njoly Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -253,7 +253,7 @@ /* syscall: "fchmod" ret: "int" args: "int" "linux_umode_t" */ #define LINUX_SYS_fchmod 94 -/* syscall: "__posix_fchown" ret: "int" args: "int" "uid_t" "uid_t" */ +/* syscall: "__posix_fchown" ret: "int" args: "int" "uid_t" "gid_t" */ #define LINUX_SYS___posix_fchown 95 /* syscall: "getpriority" ret: "int" args: "int" "int" */ Index: src/sys/compat/linux/arch/mips/linux_syscallargs.h diff -u src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.64 src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.65 --- src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.64 Sun Oct 25 15:55:58 2015 +++ src/sys/compat/linux/arch/mips/linux_syscallargs.h Tue Oct 27 06:30:10 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.64 2015/10/25 15:55:58 njoly Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.65 2015/10/27 06:30:10 njoly Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.58 2015/10/25 15:55:05 njoly Exp + * created from NetBSD: syscalls.master,v 1.59 2015/10/27 06:29:35 njoly Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ Index: src/sys/compat/linux/arch/mips/linux_syscalls.c diff -u src/sys/compat/linux/arch/mips/linux_syscalls.c:1.64 src/sys/compat/linux/arch/mips/linux_syscalls.c:1.65 --- src/sys/compat/linux/arch/mips/linux_syscalls.c:1.64 Sun Oct 25 15:55:58 2015 +++ src/sys/compat/linux/arch/mips/linux_syscalls.c Tue Oct 27 06:30:10 2015 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.64 2015/10/25 15:55:58 njoly Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.65 2015/10/27 06:30:10 njoly Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.58 2015/10/25 15:55:05 njoly Exp + * created from NetBSD: syscalls.master,v 1.59 2015/10/27 06:29:35 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.64 2015/10/25 15:55:58 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.65 2015/10/27 06:30:10 njoly Exp $"); #if defined(_KERNEL_OPT) #include @@ -25,6 +25,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal #include #include #define linux_sys_mmap2_args linux_sys_mmap_args +#else /* _KERNEL_OPT */ +#include #endif /* _KERNEL_OPT */ const char *const linux_syscallnames[] = { @@ -541,3 +543,520 @@ const char *const linux_syscallnames[] = /* 510 */ "# filler", /* 511 */ "# filler", }; + + +/* libc style syscall names */ +const char *const altlinux_syscallnames[] = { + /* 0 */ "nosys", + /* 1 */ NULL, /* exit */ + /* 2 */ NULL, /* fork */ + /* 3 */ NULL, /* read */ + /* 4 */ NULL, /* write */ + /* 5 */ NULL, /* open */ + /* 6 */ NULL, /* close */ + /* 7 */ NULL, /* waitpid */ + /* 8 */ NULL, /* creat */ + /* 9 */ NULL, /* link */ + /* 10 */ NULL, /* unlink */ + /* 11 */ NULL, /* execve */ + /* 12 */ NULL, /* chdir */ + /* 13 */ NULL, /* time */ + /* 14 */ NULL, /* mknod */ + /* 15 */ NULL, /* chmod */ + /* 16 */ NULL, /* __posix_lchown */ + /* 17 */ NULL, /* unimplemented */ + /* 18 */ NULL, /* obsolete
CVS commit: src/sys/compat/linux/arch
Module Name:src Committed By: njoly Date: Tue Oct 27 06:29:35 UTC 2015 Modified Files: src/sys/compat/linux/arch/mips: syscalls.master src/sys/compat/linux/arch/powerpc: syscalls.master Log Message: Fix wrong gid types from previous. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/arch/mips/syscalls.master cvs rdiff -u -r1.67 -r1.68 src/sys/compat/linux/arch/powerpc/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/linux/arch/mips/syscalls.master diff -u src/sys/compat/linux/arch/mips/syscalls.master:1.58 src/sys/compat/linux/arch/mips/syscalls.master:1.59 --- src/sys/compat/linux/arch/mips/syscalls.master:1.58 Sun Oct 25 15:55:05 2015 +++ src/sys/compat/linux/arch/mips/syscalls.master Tue Oct 27 06:29:35 2015 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.58 2015/10/25 15:55:05 njoly Exp $ + $NetBSD: syscalls.master,v 1.59 2015/10/27 06:29:35 njoly Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -181,7 +181,7 @@ 93 NOARGS { int|compat_43_sys||ftruncate(int fd, long length); } 94 NOARGS { int|sys||fchmod(int fd, linux_umode_t mode); } 95 NOARGS { int|sys||__posix_fchown(int fd, uid_t uid, \ - uid_t gid); } + gid_t gid); } 96 STD { int|linux_sys||getpriority(int which, int who); } 97 NOARGS { int|sys||setpriority(int which, int who, int prio); } 98 UNIMPL Index: src/sys/compat/linux/arch/powerpc/syscalls.master diff -u src/sys/compat/linux/arch/powerpc/syscalls.master:1.67 src/sys/compat/linux/arch/powerpc/syscalls.master:1.68 --- src/sys/compat/linux/arch/powerpc/syscalls.master:1.67 Sun Oct 25 15:55:05 2015 +++ src/sys/compat/linux/arch/powerpc/syscalls.master Tue Oct 27 06:29:35 2015 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.67 2015/10/25 15:55:05 njoly Exp $ + $NetBSD: syscalls.master,v 1.68 2015/10/27 06:29:35 njoly Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -209,7 +209,7 @@ 93 NOARGS { int|compat_43_sys||ftruncate(int fd, long length); } 94 NOARGS { int|sys||fchmod(int fd, linux_umode_t mode); } 95 NOARGS { int|sys||__posix_fchown(int fd, uid_t uid, \ - uid_t gid); } + gid_t gid); } 96 STD { int|linux_sys||getpriority(int which, int who); } 97 NOARGS { int|sys||setpriority(int which, int who, int prio); } 98 NOARGS { int|sys||profil(void *samples, u_int size, \
CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios
Module Name:src Committed By: riastradh Date: Tue Oct 27 13:13:47 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios: nouveau_subdev_bios_base.c Log Message: Use nv_device_base(dev) like other callers, not dev->pdev->dev. First step in fixing the struct device nonsense. This won't actually fix anything yet until we also fix nv_device_base. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c:1.2 src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c:1.2 Wed Feb 25 14:57:05 2015 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c Tue Oct 27 13:13:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_subdev_bios_base.c,v 1.2 2015/02/25 14:57:05 riastradh Exp $ */ +/* $NetBSD: nouveau_subdev_bios_base.c,v 1.3 2015/10/27 13:13:47 riastradh Exp $ */ /* * Copyright 2012 Red Hat Inc. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_bios_base.c,v 1.2 2015/02/25 14:57:05 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_bios_base.c,v 1.3 2015/10/27 13:13:47 riastradh Exp $"); #include #include @@ -376,7 +376,8 @@ nouveau_bios_shadow(struct nouveau_bios } while ((++mthd)->shadow); /* attempt to load firmware image */ - ret = request_firmware(, source, _device(bios)->pdev->dev); + ret = request_firmware(, source, + nv_device_base(nv_device(bios))); if (ret == 0) { bios->size = fw->size; bios->data = kmemdup(fw->data, fw->size, GFP_KERNEL);
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Tue Oct 27 13:16:33 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_i2c.c intel_pm.c intel_sdvo.c Log Message: dev->dev, not >pdev->dev. Latter is a charlatan, soon to meet judgment for its sins. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.13 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.14 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.13 Thu Mar 5 21:13:48 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c Tue Oct 27 13:16:33 2015 @@ -656,7 +656,7 @@ int intel_setup_gmbus(struct drm_device "i915 gmbus %s", gmbus_ports[i].name); - bus->adapter.dev.parent = >pdev->dev; + bus->adapter.dev.parent = dev->dev; bus->dev_priv = dev_priv; bus->adapter.algo = _algorithm; Index: src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c:1.7 src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c:1.8 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c:1.7 Sun Jul 26 15:30:36 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c Tue Oct 27 13:16:33 2015 @@ -6020,7 +6020,7 @@ void intel_aux_display_runtime_put(struc void intel_runtime_pm_get(struct drm_i915_private *dev_priv) { struct drm_device *dev = dev_priv->dev; - struct device *device = >pdev->dev; + struct device *device = dev->dev; if (!HAS_RUNTIME_PM(dev)) return; @@ -6032,7 +6032,7 @@ void intel_runtime_pm_get(struct drm_i91 void intel_runtime_pm_put(struct drm_i915_private *dev_priv) { struct drm_device *dev = dev_priv->dev; - struct device *device = >pdev->dev; + struct device *device = dev->dev; if (!HAS_RUNTIME_PM(dev)) return; @@ -6044,7 +6044,7 @@ void intel_runtime_pm_put(struct drm_i91 void intel_init_runtime_pm(struct drm_i915_private *dev_priv) { struct drm_device *dev = dev_priv->dev; - struct device *device = >pdev->dev; + struct device *device = dev->dev; if (!HAS_RUNTIME_PM(dev)) return; @@ -6061,7 +6061,7 @@ void intel_init_runtime_pm(struct drm_i9 void intel_fini_runtime_pm(struct drm_i915_private *dev_priv) { struct drm_device *dev = dev_priv->dev; - struct device *device = >pdev->dev; + struct device *device = dev->dev; if (!HAS_RUNTIME_PM(dev)) return; Index: src/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c:1.6 src/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c:1.7 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c:1.6 Sun Sep 7 23:03:11 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c Tue Oct 27 13:16:33 2015 @@ -2971,7 +2971,7 @@ intel_sdvo_init_ddc_proxy(struct intel_s sdvo->ddc.owner = THIS_MODULE; sdvo->ddc.class = I2C_CLASS_DDC; snprintf(sdvo->ddc.name, I2C_NAME_SIZE, "SDVO DDC proxy"); - sdvo->ddc.dev.parent = >pdev->dev; + sdvo->ddc.dev.parent = dev->dev; sdvo->ddc.algo_data = sdvo; sdvo->ddc.algo = _sdvo_ddc_proxy;
CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon
Module Name:src Committed By: riastradh Date: Tue Oct 27 13:18:21 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/radeon: radeon_display.c radeon_gem.c radeon_i2c.c radeon_kms.c Log Message: dev->dev, not >pdev->dev. Latter is a mistake that is all my fault. Oops. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_i2c.c \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_kms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.4 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.4 Sat Apr 25 20:50:04 2015 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c Tue Oct 27 13:18:21 2015 @@ -1301,7 +1301,7 @@ radeon_user_framebuffer_create(struct dr obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]); if (obj == NULL) { - dev_err(>pdev->dev, "No GEM object associated to handle 0x%08X, " + dev_err(dev->dev, "No GEM object associated to handle 0x%08X, " "can't create framebuffer\n", mode_cmd->handles[0]); return ERR_PTR(-ENOENT); } Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c:1.2 Wed Jul 16 20:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c Tue Oct 27 13:18:21 2015 @@ -446,7 +446,7 @@ int radeon_gem_va_ioctl(struct drm_devic } if (args->offset < RADEON_VA_RESERVED_SIZE) { - dev_err(>pdev->dev, + dev_err(dev->dev, "offset 0x%lX is in reserved area 0x%X\n", (unsigned long)args->offset, RADEON_VA_RESERVED_SIZE); @@ -460,13 +460,13 @@ int radeon_gem_va_ioctl(struct drm_devic */ invalid_flags = RADEON_VM_PAGE_VALID | RADEON_VM_PAGE_SYSTEM; if ((args->flags & invalid_flags)) { - dev_err(>pdev->dev, "invalid flags 0x%08X vs 0x%08X\n", + dev_err(dev->dev, "invalid flags 0x%08X vs 0x%08X\n", args->flags, invalid_flags); args->operation = RADEON_VA_RESULT_ERROR; return -EINVAL; } if (!(args->flags & RADEON_VM_PAGE_SNOOPED)) { - dev_err(>pdev->dev, "only supported snooped mapping for now\n"); + dev_err(dev->dev, "only supported snooped mapping for now\n"); args->operation = RADEON_VA_RESULT_ERROR; return -EINVAL; } @@ -476,7 +476,7 @@ int radeon_gem_va_ioctl(struct drm_devic case RADEON_VA_UNMAP: break; default: - dev_err(>pdev->dev, "unsupported operation %d\n", + dev_err(dev->dev, "unsupported operation %d\n", args->operation); args->operation = RADEON_VA_RESULT_ERROR; return -EINVAL; Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon_i2c.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_i2c.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_i2c.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_i2c.c:1.2 Wed Jul 16 20:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_i2c.c Tue Oct 27 13:18:21 2015 @@ -917,7 +917,7 @@ struct radeon_i2c_chan *radeon_i2c_creat i2c->rec = *rec; i2c->adapter.owner = THIS_MODULE; i2c->adapter.class = I2C_CLASS_DDC; - i2c->adapter.dev.parent = >pdev->dev; + i2c->adapter.dev.parent = dev->dev; i2c->dev = dev; i2c_set_adapdata(>adapter, i2c); if (rec->mm_i2c || Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon_kms.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_kms.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_kms.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_kms.c:1.2 Wed Jul 16 20:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_kms.c Tue Oct 27 13:18:21 2015 @@ -126,7 +126,7 @@ int radeon_driver_load_kms(struct drm_de */ r = radeon_device_init(rdev, dev, dev->pdev, flags); if (r) { - dev_err(>pdev->dev, "Fatal error during GPU init\n"); + dev_err(dev->dev, "Fatal error during GPU init\n"); goto out; } @@ -136,7 +136,7 @@ int radeon_driver_load_kms(struct drm_de */ r = radeon_modeset_init(rdev); if (r) - dev_err(>pdev->dev, "Fatal error during modeset init\n"); + dev_err(dev->dev, "Fatal error during modeset init\n"); /* Call ACPI methods: require modeset init * but failure is not fatal @@ -144,7 +144,7 @@ int radeon_driver_load_kms(struct drm_de if (!r) { acpi_status = radeon_acpi_init(rdev); if (acpi_status) - dev_dbg(>pdev->dev, + dev_dbg(dev->dev, "Error during ACPI methods call\n"); }
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Tue Oct 27 13:21:19 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_nouveau.c src/sys/external/bsd/drm2/dist/drm/nouveau: nouveau_drm.c src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core: device.h src/sys/external/bsd/drm2/include/linux: pci.h platform_device.h src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: Eliminate Linux struct pci_dev::dev, struct platform_device::dev. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/nvidia/tegra_nouveau.c cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h cvs rdiff -u -r1.20 -r1.21 src/sys/external/bsd/drm2/include/linux/pci.h cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/include/linux/platform_device.h cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/nouveau/nouveau_pci.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/nvidia/tegra_nouveau.c diff -u src/sys/arch/arm/nvidia/tegra_nouveau.c:1.6 src/sys/arch/arm/nvidia/tegra_nouveau.c:1.7 --- src/sys/arch/arm/nvidia/tegra_nouveau.c:1.6 Sun Oct 18 17:07:36 2015 +++ src/sys/arch/arm/nvidia/tegra_nouveau.c Tue Oct 27 13:21:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_nouveau.c,v 1.6 2015/10/18 17:07:36 jmcneill Exp $ */ +/* $NetBSD: tegra_nouveau.c,v 1.7 2015/10/27 13:21:19 riastradh Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill@@ -29,7 +29,7 @@ #include "locators.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_nouveau.c,v 1.6 2015/10/18 17:07:36 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_nouveau.c,v 1.7 2015/10/27 13:21:19 riastradh Exp $"); #include #include @@ -149,7 +149,7 @@ tegra_nouveau_init(device_t self) dev->platformdev = >sc_platform_dev; dev->platformdev->id = -1; - dev->platformdev->dev = *sc->sc_dev; /* XXX */ + dev->platformdev->pd_dev = sc->sc_dev; dev->platformdev->dmat = sc->sc_dmat; dev->platformdev->nresource = 2; dev->platformdev->resource[0].tag = bst; Index: src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c:1.6 src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c:1.7 --- src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c:1.6 Tue Oct 13 01:43:47 2015 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c Tue Oct 27 13:21:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_drm.c,v 1.6 2015/10/13 01:43:47 mrg Exp $ */ +/* $NetBSD: nouveau_drm.c,v 1.7 2015/10/27 13:21:18 riastradh Exp $ */ /* * Copyright 2012 Red Hat Inc. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_drm.c,v 1.6 2015/10/13 01:43:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_drm.c,v 1.7 2015/10/27 13:21:18 riastradh Exp $"); #include #include @@ -614,8 +614,13 @@ fail_display: int nouveau_pmops_suspend(struct device *dev) { +#ifdef __NetBSD__ + struct drm_device *drm_dev = device_private(dev); + struct pci_dev *pdev __unused = drm_dev->pdev; +#else struct pci_dev *pdev = to_pci_dev(dev); struct drm_device *drm_dev = pci_get_drvdata(pdev); +#endif int ret; if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF || @@ -671,8 +676,13 @@ nouveau_do_resume(struct drm_device *dev int nouveau_pmops_resume(struct device *dev) { +#ifdef __NetBSD__ + struct drm_device *drm_dev = device_private(dev); + struct pci_dev *pdev __unused = drm_dev->pdev; +#else struct pci_dev *pdev = to_pci_dev(dev); struct drm_device *drm_dev = pci_get_drvdata(pdev); +#endif int ret; if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF || Index: src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h:1.4 src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h:1.5 --- src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h:1.4 Fri Mar 6 13:44:18 2015 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h Tue Oct 27 13:21:18 2015 @@ -152,8 +152,9 @@ nv_device_is_pci(struct nouveau_device * static inline struct device * nv_device_base(struct nouveau_device *device) { - return nv_device_is_pci(device) ? >pdev->dev : - >platformdev->dev; + return nv_device_is_pci(device) + ? pci_dev_dev(device->pdev) + : platform_device_dev(device->platformdev); } #ifdef __NetBSD__ Index: src/sys/external/bsd/drm2/include/linux/pci.h diff -u src/sys/external/bsd/drm2/include/linux/pci.h:1.20 src/sys/external/bsd/drm2/include/linux/pci.h:1.21 --- src/sys/external/bsd/drm2/include/linux/pci.h:1.20 Sat Oct 17 14:54:10 2015 +++ src/sys/external/bsd/drm2/include/linux/pci.h Tue Oct 27 13:21:18 2015 @@
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Tue Oct 27 16:04:19 UTC 2015 Modified Files: src/sys/dev/pci: viomb.c viornd.c Log Message: Print the negotiated feature bits To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/viomb.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/viornd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/viomb.c diff -u src/sys/dev/pci/viomb.c:1.4 src/sys/dev/pci/viomb.c:1.5 --- src/sys/dev/pci/viomb.c:1.4 Mon May 4 10:02:13 2015 +++ src/sys/dev/pci/viomb.c Tue Oct 27 12:04:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: viomb.c,v 1.4 2015/05/04 14:02:13 ozaki-r Exp $ */ +/* $NetBSD: viomb.c,v 1.5 2015/10/27 16:04:19 christos Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.4 2015/05/04 14:02:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.5 2015/10/27 16:04:19 christos Exp $"); #include #include @@ -54,6 +54,11 @@ __KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1. #define VIRTIO_BALLOON_F_MUST_TELL_HOST (1<<0) #define VIRTIO_BALLOON_F_STATS_VQ (1<<1) +#define VIRTIO_BALLOON_FLAG_BITS \ + VIRTIO_COMMON_FLAG_BITS \ + "\x02""STATS_VQ" \ + "\x01""MUST_TELL_HOST" + #define PGS_PER_REQ (256) /* 1MB, 4KB/page */ CTASSERT((PAGE_SIZE) == (VIRTIO_PAGE_SIZE)); /* XXX */ @@ -118,6 +123,8 @@ viomb_attach(device_t parent, device_t s struct viomb_softc *sc = device_private(self); struct virtio_softc *vsc = device_private(parent); const struct sysctlnode *node; + uint32_t features; + char buf[256]; if (vsc->sc_child != NULL) { aprint_normal(": child already attached for %s; " @@ -129,7 +136,6 @@ viomb_attach(device_t parent, device_t s aprint_normal(": balloon already exists; something wrong...\n"); goto err_none; } - aprint_normal("\n"); sc->sc_dev = self; sc->sc_virtio = vsc; @@ -142,8 +148,11 @@ viomb_attach(device_t parent, device_t s vsc->sc_intrhand = virtio_vq_intr; vsc->sc_flags = 0; - virtio_negotiate_features(vsc, - VIRTIO_CONFIG_DEVICE_FEATURES); + features = virtio_negotiate_features(vsc, + VIRTIO_CONFIG_DEVICE_FEATURES); + + snprintb(buf, sizeof(buf), VIRTIO_BALLOON_FLAG_BITS, features); + aprint_normal(": Features: %s\n", buf); if ((virtio_alloc_vq(vsc, >sc_vq[0], 0, sizeof(uint32_t)*PGS_PER_REQ, 1, "inflate") != 0) || Index: src/sys/dev/pci/viornd.c diff -u src/sys/dev/pci/viornd.c:1.8 src/sys/dev/pci/viornd.c:1.9 --- src/sys/dev/pci/viornd.c:1.8 Tue May 5 06:56:13 2015 +++ src/sys/dev/pci/viornd.c Tue Oct 27 12:04:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: viornd.c,v 1.8 2015/05/05 10:56:13 ozaki-r Exp $ */ +/* $NetBSD: viornd.c,v 1.9 2015/10/27 16:04:19 christos Exp $ */ /* $OpenBSD: viornd.c,v 1.1 2014/01/21 21:14:58 sf Exp $ */ /* @@ -134,6 +134,8 @@ viornd_attach( device_t parent, device_t bus_dma_segment_t segs[1]; int nsegs; int error; + uint32_t features; + char buf[256]; vsc->sc_vqs = >sc_vq; vsc->sc_nvqs = 1; @@ -146,10 +148,11 @@ viornd_attach( device_t parent, device_t sc->sc_virtio = vsc; sc->sc_dev = self; - aprint_normal("\n"); + features = virtio_negotiate_features(vsc, 0); + snprintb(buf, sizeof(buf), VIRTIO_COMMON_FLAG_BITS, features); + aprint_normal(": Features: %s\n", buf); aprint_naive("\n"); - (void)virtio_negotiate_features(vsc, 0); mutex_init(>sc_mutex, MUTEX_DEFAULT, IPL_VM);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Tue Oct 27 16:04:05 UTC 2015 Modified Files: src/sys/dev/pci: virtioreg.h Log Message: add the common flag bits To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/virtioreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/virtioreg.h diff -u src/sys/dev/pci/virtioreg.h:1.4 src/sys/dev/pci/virtioreg.h:1.5 --- src/sys/dev/pci/virtioreg.h:1.4 Sun Oct 25 21:44:48 2015 +++ src/sys/dev/pci/virtioreg.h Tue Oct 27 12:04:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: virtioreg.h,v 1.4 2015/10/26 01:44:48 ozaki-r Exp $ */ +/* $NetBSD: virtioreg.h,v 1.5 2015/10/27 16:04:05 christos Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -100,6 +100,13 @@ #define VIRTIO_CONFIG_MSI_CONFIG_VECTOR 20 #define VIRTIO_CONFIG_MSI_QUEUE_VECTOR 22 +#define VIRTIO_COMMON_FLAG_BITS \ +"\20" \ + "\x1f""BAD_FEATURE" \ + "\x1e""EVENT_IDX" \ + "\x1d""INDIRECT_DESC" \ + "\x19""NOTIFY_ON_EMPTY" + /* Virtqueue */ /* This marks a buffer as continuing via the next field. */ #define VRING_DESC_F_NEXT 1
CVS commit: src/share/misc
Module Name:src Committed By: jakllsch Date: Tue Oct 27 15:33:07 UTC 2015 Modified Files: src/share/misc: acronyms.comp Log Message: EIDE is "enhanced", not "enchanced". To generate a diff of this commit: cvs rdiff -u -r1.153 -r1.154 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.153 src/share/misc/acronyms.comp:1.154 --- src/share/misc/acronyms.comp:1.153 Tue Oct 27 15:29:45 2015 +++ src/share/misc/acronyms.comp Tue Oct 27 15:33:07 2015 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.153 2015/10/27 15:29:45 jakllsch Exp $ +$NetBSD: acronyms.comp,v 1.154 2015/10/27 15:33:07 jakllsch Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -394,7 +394,7 @@ EFM eight to fourteen modulation EGA Enhanced Graphics Adapter EGP exterior gateway protocol EH extension header -EIDE enchanced IDE +EIDE enhanced IDE EISA extended industry standard architecture ELF executable and linking format ELS entry level system
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: christos Date: Tue Oct 27 15:53:58 UTC 2015 Modified Files: src/sys/arch/x86/x86: bus_dma.c Log Message: - If we succeeded allocating a buffer that did not need bouncing before, but the buffer in the previous mapping did, clear the bounce bit. Fixes the ld_virtio.c bug with machines 8GB and dd if=/dev/zero of=crash bs=1g count=4. - Allocate with M_ZERO instead of doing memset - The panic string can take a format, use it. - When checking for the bounce buffer boundary check addr + len < limit, not addr < limit. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/x86/x86/bus_dma.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/bus_dma.c diff -u src/sys/arch/x86/x86/bus_dma.c:1.71 src/sys/arch/x86/x86/bus_dma.c:1.72 --- src/sys/arch/x86/x86/bus_dma.c:1.71 Tue Dec 24 10:42:56 2013 +++ src/sys/arch/x86/x86/bus_dma.c Tue Oct 27 11:53:58 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.71 2013/12/24 15:42:56 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.72 2015/10/27 15:53:58 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71 2013/12/24 15:42:56 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.72 2015/10/27 15:53:58 christos Exp $"); /* * The following is included because _bus_dma_uiomove is derived from @@ -291,11 +291,10 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ error = 0; mapsize = sizeof(struct x86_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); - if ((mapstore = malloc(mapsize, M_DMAMAP, + if ((mapstore = malloc(mapsize, M_DMAMAP, M_ZERO | (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) return (ENOMEM); - memset(mapstore, 0, mapsize); map = (struct x86_bus_dmamap *)mapstore; map->_dm_size = size; map->_dm_segcnt = nsegments; @@ -331,12 +330,11 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ /* * Allocate our cookie. */ - if ((cookiestore = malloc(cookiesize, M_DMAMAP, + if ((cookiestore = malloc(cookiesize, M_DMAMAP, M_ZERO | (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) { error = ENOMEM; goto out; } - memset(cookiestore, 0, cookiesize); cookie = (struct x86_bus_dma_cookie *)cookiestore; cookie->id_flags = cookieflags; map->_dm_cookie = cookie; @@ -399,6 +397,7 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm } error = _bus_dmamap_load_buffer(t, map, buf, buflen, vm, flags); if (error == 0) { + cookie->id_flags &= ~X86_DMA_IS_BOUNCING; map->dm_mapsize = buflen; return 0; } @@ -797,7 +796,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm */ if ((ops & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)) != 0 && (ops & (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)) != 0) - panic("_bus_dmamap_sync: mix PRE and POST"); + panic("%s: mix PRE and POST", __func__); #ifdef DIAGNOSTIC if ((ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0) { @@ -927,16 +926,17 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm } case X86_DMA_BUFTYPE_RAW: - panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_RAW"); + panic("%s: X86_DMA_BUFTYPE_RAW", __func__); break; case X86_DMA_BUFTYPE_INVALID: - panic("_bus_dmamap_sync: X86_DMA_BUFTYPE_INVALID"); + panic("%s: X86_DMA_BUFTYPE_INVALID", __func__); break; default: - printf("unknown buffer type %d\n", cookie->id_buftype); - panic("_bus_dmamap_sync"); + panic("%s: unknown buffer type %d", __func__, + cookie->id_buftype); + break; } end: if (ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTWRITE)) { @@ -1244,19 +1244,20 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, curaddr = _BUS_VIRT_TO_BUS(pmap, vaddr); /* + * Compute the segment size, and adjust counts. + */ + sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET); + if (buflen < sgsize) + sgsize = buflen; + + /* * If we're beyond the bounce threshold, notify * the caller. */ if (map->_dm_bounce_thresh != 0 && - curaddr >= map->_dm_bounce_thresh) + curaddr + sgsize >= map->_dm_bounce_thresh) return (EINVAL); - /* - * Compute the segment size, and adjust counts. - */ - sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET); - if (buflen < sgsize) - sgsize = buflen; error = _bus_dmamap_load_busaddr(t, map, curaddr, sgsize); if (error)
CVS commit: src/usr.bin/chpass
Module Name:src Committed By: shm Date: Tue Oct 27 14:47:45 UTC 2015 Modified Files: src/usr.bin/chpass: edit.c Log Message: Fixed memory leak (CID 978341) OK kamil@ To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/chpass/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.bin/chpass/edit.c diff -u src/usr.bin/chpass/edit.c:1.21 src/usr.bin/chpass/edit.c:1.22 --- src/usr.bin/chpass/edit.c:1.21 Wed Aug 31 16:24:57 2011 +++ src/usr.bin/chpass/edit.c Tue Oct 27 14:47:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: edit.c,v 1.21 2011/08/31 16:24:57 plunky Exp $ */ +/* $NetBSD: edit.c,v 1.22 2015/10/27 14:47:45 shm Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: edit.c,v 1.21 2011/08/31 16:24:57 plunky Exp $"); +__RCSID("$NetBSD: edit.c,v 1.22 2015/10/27 14:47:45 shm Exp $"); #endif #endif /* not lint */ @@ -139,6 +139,7 @@ display(char *tempname, int fd, struct p (void)fchown(fd, getuid(), getgid()); (void)fclose(fp); + free(bp); } int
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Tue Oct 27 16:03:04 UTC 2015 Modified Files: src/sys/dev/pci: ld_virtio.c Log Message: - Print the negotiated feature bits - Define a constant for the minimum number of segments and use that. - Remove unused sc_lock - Use single variables instead of arrays of 1 element - To the transfer size and segment size negotiation more correctly - Make vr_bp NULL when unused. - Add missing abort calls To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ld_virtio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ld_virtio.c diff -u src/sys/dev/pci/ld_virtio.c:1.8 src/sys/dev/pci/ld_virtio.c:1.9 --- src/sys/dev/pci/ld_virtio.c:1.8 Tue May 5 06:56:13 2015 +++ src/sys/dev/pci/ld_virtio.c Tue Oct 27 12:03:04 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_virtio.c,v 1.8 2015/05/05 10:56:13 ozaki-r Exp $ */ +/* $NetBSD: ld_virtio.c,v 1.9 2015/10/27 16:03:04 christos Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.8 2015/05/05 10:56:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.9 2015/10/27 16:03:04 christos Exp $"); #include #include @@ -67,6 +67,23 @@ __KERNEL_RCSID(0, "$NetBSD: ld_virtio.c, #define VIRTIO_BLK_F_SCSI (1<<7) #define VIRTIO_BLK_F_FLUSH (1<<9) +/* + * Each block request uses at least two segments - one for the header + * and one for the status. +*/ +#define VIRTIO_BLK_MIN_SEGMENTS 2 + +#define VIRTIO_BLK_FLAG_BITS \ + VIRTIO_COMMON_FLAG_BITS \ + "\x0a""FLUSH" \ + "\x08""SCSI" \ + "\x07""BLK_SIZE" \ + "\x06""RO" \ + "\x05""GEOMETRY" \ + "\x03""SEG_MAX" \ + "\x02""SIZE_MAX" \ + "\x01""BARRIER" + /* Command */ #define VIRTIO_BLK_T_IN 0 #define VIRTIO_BLK_T_OUT 1 @@ -101,12 +118,10 @@ struct ld_virtio_softc { device_t sc_dev; struct virtio_softc *sc_virtio; - struct virtqueue sc_vq[1]; + struct virtqueue sc_vq; struct virtio_blk_req *sc_reqs; - bus_dma_segment_t sc_reqs_segs[1]; - - kmutex_t sc_lock; + bus_dma_segment_t sc_reqs_seg; int sc_readonly; }; @@ -142,7 +157,7 @@ ld_virtio_alloc_reqs(struct ld_virtio_so allocsize = sizeof(struct virtio_blk_req) * qsize; r = bus_dmamem_alloc(sc->sc_virtio->sc_dmat, allocsize, 0, 0, - >sc_reqs_segs[0], 1, , BUS_DMA_NOWAIT); + >sc_reqs_seg, 1, , BUS_DMA_NOWAIT); if (r != 0) { aprint_error_dev(sc->sc_dev, "DMA memory allocation failed, size %d, " @@ -150,7 +165,7 @@ ld_virtio_alloc_reqs(struct ld_virtio_so goto err_none; } r = bus_dmamem_map(sc->sc_virtio->sc_dmat, - >sc_reqs_segs[0], 1, allocsize, + >sc_reqs_seg, 1, allocsize, , BUS_DMA_NOWAIT); if (r != 0) { aprint_error_dev(sc->sc_dev, @@ -187,7 +202,8 @@ ld_virtio_alloc_reqs(struct ld_virtio_so } r = bus_dmamap_create(sc->sc_virtio->sc_dmat, ld->sc_maxxfer, - (ld->sc_maxxfer / NBPG) + 2, + (ld->sc_maxxfer / NBPG) + + VIRTIO_BLK_MIN_SEGMENTS, ld->sc_maxxfer, 0, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, @@ -217,7 +233,7 @@ err_reqs: } bus_dmamem_unmap(sc->sc_virtio->sc_dmat, sc->sc_reqs, allocsize); err_dmamem_alloc: - bus_dmamem_free(sc->sc_virtio->sc_dmat, >sc_reqs_segs[0], 1); + bus_dmamem_free(sc->sc_virtio->sc_dmat, >sc_reqs_seg, 1); err_none: return -1; } @@ -229,7 +245,8 @@ ld_virtio_attach(device_t parent, device struct ld_softc *ld = >sc_ld; struct virtio_softc *vsc = device_private(parent); uint32_t features; - int qsize, maxxfersize; + char buf[256]; + int qsize, maxxfersize, maxnsegs; if (vsc->sc_child != NULL) { aprint_normal(": child already attached for %s; " @@ -237,15 +254,13 @@ ld_virtio_attach(device_t parent, device device_xname(parent)); return; } - aprint_normal("\n"); - aprint_naive("\n"); sc->sc_dev = self; sc->sc_virtio = vsc; vsc->sc_child = self; vsc->sc_ipl = IPL_BIO; - vsc->sc_vqs = >sc_vq[0]; + vsc->sc_vqs = >sc_vq; vsc->sc_nvqs = 1; vsc->sc_config_change = NULL; vsc->sc_intrhand = virtio_vq_intr; @@ -262,29 +277,57 @@ ld_virtio_attach(device_t parent, device else sc->sc_readonly = 0; - ld->sc_secsize = 512; + snprintb(buf, sizeof(buf), VIRTIO_BLK_FLAG_BITS, features); + aprint_normal(": Features: %s\n", buf); + aprint_naive("\n"); if (features & VIRTIO_BLK_F_BLK_SIZE) { ld->sc_secsize = virtio_read_device_config_4(vsc, VIRTIO_BLK_CONFIG_BLK_SIZE); - } - maxxfersize = MAXPHYS; -#if 0 /* At least genfs_io assumes maxxfer == MAXPHYS. */ - if (features & VIRTIO_BLK_F_SEG_MAX) { + } else + ld->sc_secsize = 512; + + /* At least genfs_io assumes maxxfer == MAXPHYS. */ + if (features & VIRTIO_BLK_F_SIZE_MAX) { maxxfersize = virtio_read_device_config_4(vsc, - VIRTIO_BLK_CONFIG_SEG_MAX) -* ld->sc_secsize; - if (maxxfersize > MAXPHYS) +
CVS commit: src/usr.bin/login
Module Name:src Committed By: shm Date: Tue Oct 27 14:53:00 UTC 2015 Modified Files: src/usr.bin/login: common.c Log Message: Added namelen initialization in getpeername(3) call (CID 979631) OK kamil@ To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/login/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.bin/login/common.c diff -u src/usr.bin/login/common.c:1.6 src/usr.bin/login/common.c:1.7 --- src/usr.bin/login/common.c:1.6 Sat May 19 00:02:44 2012 +++ src/usr.bin/login/common.c Tue Oct 27 14:53:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.6 2012/05/19 00:02:44 christos Exp $ */ +/* $NetBSD: common.c,v 1.7 2015/10/27 14:53:00 shm Exp $ */ /*- * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994 @@ -29,7 +29,7 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: common.c,v 1.6 2012/05/19 00:02:44 christos Exp $"); +__RCSID("$NetBSD: common.c,v 1.7 2015/10/27 14:53:00 shm Exp $"); #include #include @@ -173,6 +173,7 @@ update_db(int quietlog, int rootlogin, i int remote; hname = (hostname == NULL) ? "?" : hostname; + alen = sizeof(ass); if (getpeername(STDIN_FILENO, (struct sockaddr *), ) != -1) { (void)sockaddr_snprintf(assbuf, sizeof(assbuf), "%A (%a)", (void *));
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Oct 27 15:28:22 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: uhci.c uhcivar.h Log Message: Rename uhci_xfer struct members. No funciotnal change. To generate a diff of this commit: cvs rdiff -u -r1.264.4.40 -r1.264.4.41 src/sys/dev/usb/uhci.c cvs rdiff -u -r1.52.14.11 -r1.52.14.12 src/sys/dev/usb/uhcivar.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/uhci.c diff -u src/sys/dev/usb/uhci.c:1.264.4.40 src/sys/dev/usb/uhci.c:1.264.4.41 --- src/sys/dev/usb/uhci.c:1.264.4.40 Tue Oct 27 14:22:38 2015 +++ src/sys/dev/usb/uhci.c Tue Oct 27 15:28:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.264.4.40 2015/10/27 14:22:38 skrll Exp $ */ +/* $NetBSD: uhci.c,v 1.264.4.41 2015/10/27 15:28:22 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.40 2015/10/27 14:22:38 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.41 2015/10/27 15:28:22 skrll Exp $"); #include "opt_usb.h" @@ -367,13 +367,13 @@ const struct usbd_pipe_methods uhci_devi }; #define uhci_add_intr_info(sc, ux) \ - TAILQ_INSERT_TAIL(&(sc)->sc_intrhead, (ux), list) + TAILQ_INSERT_TAIL(&(sc)->sc_intrhead, (ux), ux_list) #define uhci_del_intr_info(sc, ux) \ do { \ - TAILQ_REMOVE(&(sc)->sc_intrhead, (ux), list); \ - (ux)->list.tqe_prev = NULL; \ + TAILQ_REMOVE(&(sc)->sc_intrhead, (ux), ux_list); \ + (ux)->ux_list.tqe_prev = NULL; \ } while (0) -#define uhci_active_intr_info(ux) ((ux)->list.tqe_prev != NULL) +#define uhci_active_intr_info(ux) ((ux)->ux_list.tqe_prev != NULL) static inline uhci_soft_qh_t * uhci_find_prev_qh(uhci_soft_qh_t *pqh, uhci_soft_qh_t *sqh) @@ -625,7 +625,7 @@ uhci_allocx(struct usbd_bus *bus, unsign #ifdef DIAGNOSTIC struct uhci_xfer *uxfer = UHCI_XFER2UXFER(xfer); - uxfer->isdone = true; + uxfer->ux_isdone = true; xfer->ux_state = XFER_BUSY; #endif } @@ -640,7 +640,7 @@ uhci_freex(struct usbd_bus *bus, struct KASSERTMSG(xfer->ux_state == XFER_BUSY, "xfer %p state %d\n", xfer, xfer->ux_state); - KASSERTMSG(uxfer->isdone, "xfer %p not done\n", xfer); + KASSERTMSG(uxfer->ux_isdone, "xfer %p not done\n", xfer); #ifdef DIAGNOSTIC xfer->ux_state = XFER_FREE; #endif @@ -905,25 +905,25 @@ uhci_dump_ii(struct uhci_xfer *ux) printf("ux NULL\n"); return; } - pipe = ux->xfer.ux_pipe; + pipe = ux->ux_xfer.ux_pipe; if (pipe == NULL) { - printf("ux %p: done=%d pipe=NULL\n", ux, ux->isdone); + printf("ux %p: done=%d pipe=NULL\n", ux, ux->ux_isdone); return; } if (pipe->up_endpoint == NULL) { printf("ux %p: done=%d pipe=%p pipe->up_endpoint=NULL\n", - ux, ux->isdone, pipe); + ux, ux->ux_isdone, pipe); return; } if (pipe->up_dev == NULL) { printf("ux %p: done=%d pipe=%p pipe->up_dev=NULL\n", - ux, ux->isdone, pipe); + ux, ux->ux_isdone, pipe); return; } ed = pipe->up_endpoint->ue_edesc; dev = pipe->up_dev; printf("ux %p: done=%d dev=%p vid=0x%04x pid=0x%04x addr=%d pipe=%p ep=0x%02x attr=0x%02x\n", - ux, ux->isdone, dev, + ux, ux->ux_isdone, dev, UGETW(dev->ud_ddesc.idVendor), UGETW(dev->ud_ddesc.idProduct), dev->ud_addr, pipe, @@ -937,7 +937,7 @@ uhci_dump_iis(struct uhci_softc *sc) struct uhci_xfer *ux; printf("interrupt list:\n"); - for (ux = TAILQ_FIRST(>sc_intrhead); ux; ux = TAILQ_NEXT(ux, list)) + for (ux = TAILQ_FIRST(>sc_intrhead); ux; ux = TAILQ_NEXT(ux, ux_list)) uhci_dump_ii(ux); } @@ -1370,7 +1370,7 @@ uhci_softintr(void *v) * completed. */ for (ux = TAILQ_FIRST(>sc_intrhead); ux; ux = nextux) { - nextux = TAILQ_NEXT(ux, list); + nextux = TAILQ_NEXT(ux, ux_list); uhci_check_intr(sc, ux); } @@ -1392,16 +1392,16 @@ uhci_check_intr(uhci_softc_t *sc, struct KASSERT(ux != NULL); - struct usbd_xfer *xfer = >xfer; + struct usbd_xfer *xfer = >ux_xfer; if (xfer->ux_status == USBD_CANCELLED || xfer->ux_status == USBD_TIMEOUT) { DPRINTF("aborted xfer %p", xfer, 0, 0, 0); return; } - if (ux->stdstart == NULL) + if (ux->ux_stdstart == NULL) return; - lstd = ux->stdend; + lstd = ux->ux_stdend; KASSERT(lstd != NULL); @@ -1431,7 +1431,7 @@ uhci_check_intr(uhci_softc_t *sc, struct * short packet (SPD and not ACTIVE). */ DPRINTFN(12, "active ux=%p", ux, 0, 0, 0); - for (std = ux->stdstart; std != lstd; std = std->link.std) { + for (std = ux->ux_stdstart; std != lstd; std = std->link.std) { usb_syncmem(>dma, std->offs + offsetof(uhci_td_t, td_status), sizeof(std->td.td_status), @@ -1466,7 +1466,7 @@ uhci_check_intr(uhci_softc_t *sc, struct uhci_soft_td_t *stat = upipe->ctrl.stat; DPRINTFN(12, "ux=%p std=%p control status" - "phase needs completion", ux, ux->stdstart, 0, 0); +
CVS commit: src/share/misc
Module Name:src Committed By: jakllsch Date: Tue Oct 27 15:29:45 UTC 2015 Modified Files: src/share/misc: acronyms.comp Log Message: +EBCDIC To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.152 src/share/misc/acronyms.comp:1.153 --- src/share/misc/acronyms.comp:1.152 Sun Oct 11 10:02:15 2015 +++ src/share/misc/acronyms.comp Tue Oct 27 15:29:45 2015 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.152 2015/10/11 10:02:15 mbalmer Exp $ +$NetBSD: acronyms.comp,v 1.153 2015/10/27 15:29:45 jakllsch Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -371,6 +371,7 @@ DVR digital video recorder E-XER extended XML encoding rules EABI embedded-application binary interface EAP Extensible Authentication Protocol +EBCDIC Extended Binary Coded Decimal Interchange Code EBR extended boot record EC elliptical curve ECC error correction code
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Tue Oct 27 15:56:21 UTC 2015 Modified Files: src/sys/dev/pci: if_vioif.c Log Message: - Print the negotiated feature bits. - Use aprint_error_dev on error, instead of printf - Add missing abort call. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/if_vioif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_vioif.c diff -u src/sys/dev/pci/if_vioif.c:1.17 src/sys/dev/pci/if_vioif.c:1.18 --- src/sys/dev/pci/if_vioif.c:1.17 Sun Oct 25 21:44:48 2015 +++ src/sys/dev/pci/if_vioif.c Tue Oct 27 11:56:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vioif.c,v 1.17 2015/10/26 01:44:48 ozaki-r Exp $ */ +/* $NetBSD: if_vioif.c,v 1.18 2015/10/27 15:56:21 christos Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.17 2015/10/26 01:44:48 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.18 2015/10/27 15:56:21 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -92,6 +92,26 @@ __KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v #define VIRTIO_NET_F_CTRL_RX (1<<18) #define VIRTIO_NET_F_CTRL_VLAN (1<<19) +#define VIRTIO_NET_FLAG_BITS \ + VIRTIO_COMMON_FLAG_BITS \ + "\x14""CTRL_VLAN" \ + "\x13""CTRL_RX" \ + "\x12""CTRL_VQ" \ + "\x11""STATUS" \ + "\x10""MRG_RXBUF" \ + "\x0f""HOST_UFO" \ + "\x0e""HOST_ECN" \ + "\x0d""HOST_TSO6" \ + "\x0c""HOST_TSO4" \ + "\x0b""GUEST_UFO" \ + "\x0a""GUEST_ECN" \ + "\x09""GUEST_TSO6" \ + "\x08""GUEST_TSO4" \ + "\x07""GSO" \ + "\x06""MAC" \ + "\x02""GUEST_CSUM" \ + "\x01""CSUM" + /* Status */ #define VIRTIO_NET_S_LINK_UP 1 @@ -485,6 +505,7 @@ vioif_attach(device_t parent, device_t s struct vioif_softc *sc = device_private(self); struct virtio_softc *vsc = device_private(parent); uint32_t features; + char buf[256]; struct ifnet *ifp = >sc_ethercom.ec_if; u_int flags; int r; @@ -560,6 +581,8 @@ vioif_attach(device_t parent, device_t s sc->sc_mac[5]); } aprint_normal(": Ethernet address %s\n", ether_sprintf(sc->sc_mac)); + snprintb(buf, sizeof(buf), VIRTIO_NET_FLAG_BITS, features); + aprint_normal_dev(self, "Features: %s\n", buf); aprint_naive("\n"); #ifdef VIOIF_MPSAFE @@ -794,13 +817,14 @@ retry: m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); if (r != 0) { virtio_enqueue_abort(vsc, vq, slot); - printf("%s: tx dmamap load failed, error code %d\n", - device_xname(sc->sc_dev), r); + aprint_error_dev(sc->sc_dev, + "tx dmamap load failed, error code %d\n", r); break; } r = virtio_enqueue_reserve(vsc, vq, slot, sc->sc_tx_dmamaps[slot]->dm_nsegs + 1); if (r != 0) { + virtio_enqueue_abort(vsc, vq, slot); bus_dmamap_unload(vsc->sc_dmat, sc->sc_tx_dmamaps[slot]); ifp->if_flags |= IFF_OACTIVE;
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: christos Date: Tue Oct 27 18:19:05 UTC 2015 Modified Files: src/sys/arch/x86/x86: bus_dma.c Log Message: make sure we have a cookie before we try to clear it. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/arch/x86/x86/bus_dma.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/bus_dma.c diff -u src/sys/arch/x86/x86/bus_dma.c:1.72 src/sys/arch/x86/x86/bus_dma.c:1.73 --- src/sys/arch/x86/x86/bus_dma.c:1.72 Tue Oct 27 11:53:58 2015 +++ src/sys/arch/x86/x86/bus_dma.c Tue Oct 27 14:19:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.72 2015/10/27 15:53:58 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.73 2015/10/27 18:19:05 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.72 2015/10/27 15:53:58 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.73 2015/10/27 18:19:05 christos Exp $"); /* * The following is included because _bus_dma_uiomove is derived from @@ -397,7 +397,8 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm } error = _bus_dmamap_load_buffer(t, map, buf, buflen, vm, flags); if (error == 0) { - cookie->id_flags &= ~X86_DMA_IS_BOUNCING; + if (cookie != NULL) + cookie->id_flags &= ~X86_DMA_IS_BOUNCING; map->dm_mapsize = buflen; return 0; }
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: christos Date: Tue Oct 27 18:49:26 UTC 2015 Modified Files: src/sys/arch/x86/x86: bus_dma.c Log Message: fix operator precedence. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/x86/x86/bus_dma.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/bus_dma.c diff -u src/sys/arch/x86/x86/bus_dma.c:1.73 src/sys/arch/x86/x86/bus_dma.c:1.74 --- src/sys/arch/x86/x86/bus_dma.c:1.73 Tue Oct 27 14:19:05 2015 +++ src/sys/arch/x86/x86/bus_dma.c Tue Oct 27 14:49:26 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.73 2015/10/27 18:19:05 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.74 2015/10/27 18:49:26 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.73 2015/10/27 18:19:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.74 2015/10/27 18:49:26 christos Exp $"); /* * The following is included because _bus_dma_uiomove is derived from @@ -292,7 +292,7 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ mapsize = sizeof(struct x86_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); if ((mapstore = malloc(mapsize, M_DMAMAP, M_ZERO | - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) + ((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) return (ENOMEM); map = (struct x86_bus_dmamap *)mapstore; @@ -331,7 +331,7 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ * Allocate our cookie. */ if ((cookiestore = malloc(cookiesize, M_DMAMAP, M_ZERO | - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) { + ((flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK))) == NULL) { error = ENOMEM; goto out; }
CVS commit: src/sys/net/npf
Module Name:src Committed By: christos Date: Tue Oct 27 19:31:55 UTC 2015 Modified Files: src/sys/net/npf: npf.c Log Message: simplify (and fix) logic. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/net/npf/npf.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/net/npf/npf.c diff -u src/sys/net/npf/npf.c:1.28 src/sys/net/npf/npf.c:1.29 --- src/sys/net/npf/npf.c:1.28 Mon Oct 19 05:28:24 2015 +++ src/sys/net/npf/npf.c Tue Oct 27 15:31:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.c,v 1.28 2015/10/19 09:28:24 martin Exp $ */ +/* $NetBSD: npf.c,v 1.29 2015/10/27 19:31:55 christos Exp $ */ /*- * Copyright (c) 2009-2013 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.28 2015/10/19 09:28:24 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.29 2015/10/27 19:31:55 christos Exp $"); #include #include @@ -102,7 +102,6 @@ const struct cdevsw npf_cdevsw = { .d_flag = D_OTHER | D_MPSAFE }; -#if !defined(MODULAR) || defined(_MODULE) static int npf_init(void) { @@ -137,7 +136,6 @@ npf_init(void) return 0; #endif } -#endif static int npf_fini(void) @@ -177,7 +175,7 @@ npf_modcmd(modcmd_t cmd, void *arg) switch (cmd) { case MODULE_CMD_INIT: -#if defined(_MODULE) +#ifdef MODULAR return npf_init(); #else /* initialized by npfattach */ @@ -199,14 +197,12 @@ npf_modcmd(modcmd_t cmd, void *arg) void npfattach(int nunits) { -#ifdef MODULAR +#ifndef MODULAR /* * Modular kernels will automatically load any built-in modules * and call their modcmd() routine, so we don't need to do it * again as part of pseudo-device configuration. */ - return; -#else (void)npf_init(); #endif }
CVS commit: src/sys/net/npf
Module Name:src Committed By: christos Date: Tue Oct 27 19:58:09 UTC 2015 Modified Files: src/sys/net/npf: npf.c Log Message: modules don't define MODULAR. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/net/npf/npf.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/net/npf/npf.c diff -u src/sys/net/npf/npf.c:1.29 src/sys/net/npf/npf.c:1.30 --- src/sys/net/npf/npf.c:1.29 Tue Oct 27 15:31:55 2015 +++ src/sys/net/npf/npf.c Tue Oct 27 15:58:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.c,v 1.29 2015/10/27 19:31:55 christos Exp $ */ +/* $NetBSD: npf.c,v 1.30 2015/10/27 19:58:09 christos Exp $ */ /*- * Copyright (c) 2009-2013 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.29 2015/10/27 19:31:55 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.30 2015/10/27 19:58:09 christos Exp $"); #include #include @@ -175,7 +175,7 @@ npf_modcmd(modcmd_t cmd, void *arg) switch (cmd) { case MODULE_CMD_INIT: -#ifdef MODULAR +#if defined(MODULAR) || defined(_MODULE) return npf_init(); #else /* initialized by npfattach */
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Tue Oct 27 22:25:23 UTC 2015 Modified Files: src/sys/dev/usb: files.usb Log Message: update some dependancies: USB_DEBUG doesn't depend upon other options. USBHIST depends upon USB_DEBUG and KERNHIST. now i can build a kernel with just one of either USB_DEBUG or USBHIST and the right thing happens. To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/dev/usb/files.usb 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/files.usb diff -u src/sys/dev/usb/files.usb:1.135 src/sys/dev/usb/files.usb:1.136 --- src/sys/dev/usb/files.usb:1.135 Fri Oct 10 17:31:12 2014 +++ src/sys/dev/usb/files.usb Tue Oct 27 22:25:23 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.135 2014/10/10 17:31:12 uebayasi Exp $ +# $NetBSD: files.usb,v 1.136 2015/10/27 22:25:23 mrg Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -9,8 +9,8 @@ defparam opt_usb.h USBHIST_SIZE defflag opt_usb.h USB_FRAG_DMA_WORKAROUND # top level usb debug defines -defflag opt_usb.h USBHIST: KERNHIST -defflag opt_usb.h USB_DEBUG: USBHIST +defflag opt_usb.h USB_DEBUG +defflag opt_usb.h USBHIST: KERNHIST, USB_DEBUG # HC controllers defflag opt_usb.h EHCI_DEBUG: USB_DEBUG
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Tue Oct 27 22:28:56 UTC 2015 Modified Files: src/sys/arch/amd64/include: param.h src/sys/arch/hppa/include: param.h src/sys/arch/i386/include: param.h src/sys/arch/sparc64/include: param.h Log Message: make sure MSGBUFSIZE can't expand strangely by using parens. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/amd64/include/param.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hppa/include/param.h cvs rdiff -u -r1.77 -r1.78 src/sys/arch/i386/include/param.h cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sparc64/include/param.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/amd64/include/param.h diff -u src/sys/arch/amd64/include/param.h:1.18 src/sys/arch/amd64/include/param.h:1.19 --- src/sys/arch/amd64/include/param.h:1.18 Fri Apr 20 22:23:24 2012 +++ src/sys/arch/amd64/include/param.h Tue Oct 27 22:28:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.18 2012/04/20 22:23:24 rmind Exp $ */ +/* $NetBSD: param.h,v 1.19 2015/10/27 22:28:56 mrg Exp $ */ #ifdef __x86_64__ @@ -59,7 +59,7 @@ #define INTRSTACKSIZE 4096 #ifndef MSGBUFSIZE -#define MSGBUFSIZE 8*NBPG /* default message buffer size */ +#define MSGBUFSIZE (8*NBPG) /* default message buffer size */ #endif /* Index: src/sys/arch/hppa/include/param.h diff -u src/sys/arch/hppa/include/param.h:1.20 src/sys/arch/hppa/include/param.h:1.21 --- src/sys/arch/hppa/include/param.h:1.20 Mon Feb 24 07:23:43 2014 +++ src/sys/arch/hppa/include/param.h Tue Oct 27 22:28:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.20 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: param.h,v 1.21 2015/10/27 22:28:56 mrg Exp $ */ /* $OpenBSD: param.h,v 1.12 2001/07/06 02:07:41 provos Exp $ */ @@ -66,7 +66,7 @@ #define USPACE (UPAGES * NBPG) /* pages for user struct and kstack */ #ifndef MSGBUFSIZE -#define MSGBUFSIZE 2*NBPG /* default message buffer size */ +#define MSGBUFSIZE (2*NBPG) /* default message buffer size */ #endif /* Index: src/sys/arch/i386/include/param.h diff -u src/sys/arch/i386/include/param.h:1.77 src/sys/arch/i386/include/param.h:1.78 --- src/sys/arch/i386/include/param.h:1.77 Fri Apr 20 22:23:24 2012 +++ src/sys/arch/i386/include/param.h Tue Oct 27 22:28:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.77 2012/04/20 22:23:24 rmind Exp $ */ +/* $NetBSD: param.h,v 1.78 2015/10/27 22:28:56 mrg Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -101,7 +101,7 @@ #define INTRSTACKSIZE 8192 #ifndef MSGBUFSIZE -#define MSGBUFSIZE 8*NBPG /* default message buffer size */ +#define MSGBUFSIZE (8*NBPG) /* default message buffer size */ #endif /* Index: src/sys/arch/sparc64/include/param.h diff -u src/sys/arch/sparc64/include/param.h:1.55 src/sys/arch/sparc64/include/param.h:1.56 --- src/sys/arch/sparc64/include/param.h:1.55 Wed Oct 8 10:30:27 2014 +++ src/sys/arch/sparc64/include/param.h Tue Oct 27 22:28:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.55 2014/10/08 10:30:27 macallan Exp $ */ +/* $NetBSD: param.h,v 1.56 2015/10/27 22:28:56 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -197,7 +197,7 @@ extern int nbpg, pgofset, pgshift; #define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ #if !defined (MSGBUFSIZE) /* options MSGBUFSIZE=integer */ -#define MSGBUFSIZE 4 * NBPG +#define MSGBUFSIZE (4 * NBPG) #else #if INTSTACK - MSGBUF_VA - MSGBUFSIZE < 0 #error MSGBUFSIZE is too large
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Tue Oct 27 21:46:43 UTC 2015 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: push the real attach down via config_mountroot, like radeon, as we need firmware files.. which are currently missing: drm kern error: nouveau E[ PGRAPH][nouveau0] failed to load fuc409c To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.5 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.6 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.5 Tue Oct 27 13:21:19 2015 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Tue Oct 27 21:46:42 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.5 2015/10/27 13:21:19 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.6 2015/10/27 21:46:42 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.5 2015/10/27 13:21:19 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.6 2015/10/27 21:46:42 mrg Exp $"); #include #include @@ -51,6 +51,7 @@ SIMPLEQ_HEAD(nouveau_pci_task_head, nouv struct nouveau_pci_softc { device_t sc_dev; + struct pci_attach_args sc_pa; enum { NOUVEAU_TASK_ATTACH, NOUVEAU_TASK_WORKQUEUE, @@ -66,6 +67,7 @@ struct nouveau_pci_softc { static int nouveau_pci_match(device_t, cfdata_t, void *); static void nouveau_pci_attach(device_t, device_t, void *); +static void nouveau_attach_real(device_t); static int nouveau_pci_detach(device_t, int); static bool nouveau_pci_suspend(device_t, const pmf_qual_t *); @@ -102,17 +104,27 @@ nouveau_pci_attach(device_t parent, devi { struct nouveau_pci_softc *const sc = device_private(self); const struct pci_attach_args *const pa = aux; - uint64_t devname; - int error; pci_aprint_devinfo(pa, NULL); sc->sc_dev = self; + sc->sc_pa = *pa; if (!pmf_device_register(self, _pci_suspend, _pci_resume)) aprint_error_dev(self, "unable to establish power handler\n"); + config_mountroot(self, _attach_real); +} + +static void +nouveau_attach_real(device_t self) +{ + struct nouveau_pci_softc *const sc = device_private(self); + const struct pci_attach_args *const pa = >sc_pa; + uint64_t devname; + int error; + sc->sc_task_state = NOUVEAU_TASK_ATTACH; SIMPLEQ_INIT(>sc_task_u.attach);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Tue Oct 27 23:08:27 UTC 2015 Modified Files: src/sys/dev/pci: virtio.c Log Message: use dma64 if available so we don't have do bounce around too much. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/virtio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/virtio.c diff -u src/sys/dev/pci/virtio.c:1.11 src/sys/dev/pci/virtio.c:1.12 --- src/sys/dev/pci/virtio.c:1.11 Sun Oct 25 21:44:48 2015 +++ src/sys/dev/pci/virtio.c Tue Oct 27 19:08:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio.c,v 1.11 2015/10/26 01:44:48 ozaki-r Exp $ */ +/* $NetBSD: virtio.c,v 1.12 2015/10/27 23:08:27 christos Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.11 2015/10/26 01:44:48 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.12 2015/10/27 23:08:27 christos Exp $"); #include #include @@ -341,7 +341,10 @@ virtio_attach(device_t parent, device_t sc->sc_pc = pc; sc->sc_tag = tag; sc->sc_iot = pa->pa_iot; - sc->sc_dmat = pa->pa_dmat; + if (pci_dma64_available(pa)) + sc->sc_dmat = pa->pa_dmat64; + else + sc->sc_dmat = pa->pa_dmat; sc->sc_config_offset = VIRTIO_CONFIG_DEVICE_CONFIG_NOMSI; if (pci_mapreg_map(pa, PCI_MAPREG_START, PCI_MAPREG_TYPE_IO, 0,
CVS commit: src/lib/libpanel
Module Name:src Committed By: uwe Date: Tue Oct 27 23:13:18 UTC 2015 Modified Files: src/lib/libpanel: Makefile Added Files: src/lib/libpanel: panel.3 Log Message: Manual page for libpanel. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libpanel/Makefile cvs rdiff -u -r0 -r1.1 src/lib/libpanel/panel.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpanel/Makefile diff -u src/lib/libpanel/Makefile:1.1 src/lib/libpanel/Makefile:1.2 --- src/lib/libpanel/Makefile:1.1 Mon Oct 26 23:09:49 2015 +++ src/lib/libpanel/Makefile Tue Oct 27 23:13:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2015/10/26 23:09:49 uwe Exp $ +# $NetBSD: Makefile,v 1.2 2015/10/27 23:13:18 uwe Exp $ WARNS= 4 @@ -28,4 +28,6 @@ SRCS+= window.c #LIBDPLIBS+= curses ${.CURDIR}/../libcurses +MAN= panel.3 + .include Added files: Index: src/lib/libpanel/panel.3 diff -u /dev/null src/lib/libpanel/panel.3:1.1 --- /dev/null Tue Oct 27 23:13:18 2015 +++ src/lib/libpanel/panel.3 Tue Oct 27 23:13:18 2015 @@ -0,0 +1,73 @@ +.\" $NetBSD: panel.3,v 1.1 2015/10/27 23:13:18 uwe Exp $ +.\" +.\" Copyright (c) 2015 Valery Ushakov +.\" 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. +.\" +.Dd October 28, 2015 +.Dt PANEL 3 +.Os +.Sh NAME +.Nm panel +.Nd z-order for curses windows +.Sh LIBRARY +.Lb libpanel +.Sh SYNOPSIS +.In panel.h +.Sh DESCRIPTION +Overlapping curses windows have no notion of z-order, +what you see on the screen depends on the order of updates. +.Nm +library is an extension built on top of +.Xr curses(3) +that adds z-order to curses windows. +.Pp +Each panel has an associated curses window. +All currently visible panels form a +.Dq deck . +Panels have z-order only relative to other panels in the deck and to +.Xr stdscr(3) . +The latter doesn't have a panel of its own but implicitly lies below +all other panels in the deck. +If you mix plain curses windows and panels the visual results are +undefined since panel library is not aware of windows that are not +associated with panels. +.Bl -column ".Xr set_panel_userptr 3" +.It Sy "Function" Ta Sy "Summary" +.It Xr bottom_panel 3 Ta move the panel to the bottom of the deck +.It Xr del_panel 3 Ta delete the panel +.It Xr hide_panel 3Ta hide the panel, removing it from deck +.It Xr move_panel 3Ta move the panel to a new position on screen +.It Xr new_panel 3 Ta create new panel +.It Xr panel_above 3 Ta a panel above the given panel +.It Xr panel_below 3 Ta a panel below the given panel +.It Xr panel_hidden 3 Ta check if the panel is hidden +.It Xr panel_userptr 3 Ta user data associated with the panel +.It Xr panel_window 3 Ta curses window associated with the panel +.It Xr replace_panel 3 Ta associate a different window with the panel +.It Xr set_panel_userptr 3 Ta associate arbitrary user data with the panel +.It Xr show_panel 3Ta show hidden panel at the top of the deck +.It Xr top_panel 3 Ta move the panel to the top of the deck +.It Xr update_panels 3 Ta update terminal display +.El +.Sh SEE ALSO +.Xr curses(3)
CVS commit: src/sys/net/npf
Module Name:src Committed By: christos Date: Wed Oct 28 01:54:10 UTC 2015 Modified Files: src/sys/net/npf: npf_ctl.c Log Message: remove bogus KASSERT, there are error paths that don't satisfy this. XXX: should improve error reporting to userland. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/net/npf/npf_ctl.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/net/npf/npf_ctl.c diff -u src/sys/net/npf/npf_ctl.c:1.42 src/sys/net/npf/npf_ctl.c:1.43 --- src/sys/net/npf/npf_ctl.c:1.42 Sun Jun 7 21:00:43 2015 +++ src/sys/net/npf/npf_ctl.c Tue Oct 27 21:54:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_ctl.c,v 1.42 2015/06/08 01:00:43 rmind Exp $ */ +/* $NetBSD: npf_ctl.c,v 1.43 2015/10/28 01:54:10 christos Exp $ */ /*- * Copyright (c) 2009-2014 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf_ctl.c,v 1.42 2015/06/08 01:00:43 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_ctl.c,v 1.43 2015/10/28 01:54:10 christos Exp $"); #include #include @@ -609,7 +609,6 @@ fail: /* * Note: destroy rulesets first, to drop references to the tableset. */ - KASSERT(error == 0 || (nset || rpset || rlset || tblset)); if (nset) { npf_ruleset_destroy(nset); }
CVS commit: src/lib/libpanel
Module Name:src Committed By: uwe Date: Tue Oct 27 23:42:55 UTC 2015 Added Files: src/lib/libpanel: move_panel.3 new_panel.3 panel_above.3 panel_hidden.3 panel_userptr.3 update_panels.3 Log Message: Skeleton manual pages for libpanel functions. No content yet. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libpanel/move_panel.3 \ src/lib/libpanel/new_panel.3 src/lib/libpanel/panel_above.3 \ src/lib/libpanel/panel_hidden.3 src/lib/libpanel/panel_userptr.3 \ src/lib/libpanel/update_panels.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libpanel/move_panel.3 diff -u /dev/null src/lib/libpanel/move_panel.3:1.1 --- /dev/null Tue Oct 27 23:42:55 2015 +++ src/lib/libpanel/move_panel.3 Tue Oct 27 23:42:55 2015 @@ -0,0 +1,43 @@ +.\" $NetBSD: move_panel.3,v 1.1 2015/10/27 23:42:55 uwe Exp $ +.\" +.\" Copyright (c) 2015 Valery Ushakov +.\" 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. +.\" +.Dd October 28, 2015 +.Dt MOVE_PANEL 3 +.Os +.Sh NAME +.Nm move_panel +.Nd change panel position +.Sh LIBRARY +.Lb libpanel +.Sh SYNOPSIS +.In panel.h +.\" +.Ft int +.Fn move_panel "PANEL *p" "int y" "int x" +.\" +.Sh DESCRIPTION +Change panel position on screen... +.Sh SEE ALSO +.Xr panel 3 Index: src/lib/libpanel/new_panel.3 diff -u /dev/null src/lib/libpanel/new_panel.3:1.1 --- /dev/null Tue Oct 27 23:42:55 2015 +++ src/lib/libpanel/new_panel.3 Tue Oct 27 23:42:55 2015 @@ -0,0 +1,55 @@ +.\" $NetBSD: new_panel.3,v 1.1 2015/10/27 23:42:55 uwe Exp $ +.\" +.\" Copyright (c) 2015 Valery Ushakov +.\" 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. +.\" +.Dd October 28, 2015 +.Dt NEW_PANEL 3 +.Os +.Sh NAME +.Nm new_panel , +.Nm panel_window , +.Nm replace_panel , +.Nm del_panel +.Nd panel routines +.Sh LIBRARY +.Lb libpanel +.Sh SYNOPSIS +.In panel.h +.\" +.Ft PANEL * +.Fn new_panel "WINDOW *win" +.\" +.Ft WINDOW * +.Fn panel_window "PANEL *p" +.\" +.Ft int +.Fn replace_panel "PANEL *p" "WINDOW *win" +.\" +.Ft int +.Fn del_panel "PANEL *p" +.\" +.Sh DESCRIPTION +Routines to manage panels and associated curses windows... +.Sh SEE ALSO +.Xr panel 3 Index: src/lib/libpanel/panel_above.3 diff -u /dev/null src/lib/libpanel/panel_above.3:1.1 --- /dev/null Tue Oct 27 23:42:55 2015 +++ src/lib/libpanel/panel_above.3 Tue Oct 27 23:42:55 2015 @@ -0,0 +1,55 @@ +.\" $NetBSD: panel_above.3,v 1.1
CVS commit: src/lib/libpanel
Module Name:src Committed By: uwe Date: Wed Oct 28 02:23:50 UTC 2015 Modified Files: src/lib/libpanel: move_panel.3 new_panel.3 panel_above.3 panel_hidden.3 panel_userptr.3 Log Message: Provide descriptions of panel functions. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libpanel/move_panel.3 \ src/lib/libpanel/new_panel.3 src/lib/libpanel/panel_above.3 \ src/lib/libpanel/panel_hidden.3 src/lib/libpanel/panel_userptr.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpanel/move_panel.3 diff -u src/lib/libpanel/move_panel.3:1.1 src/lib/libpanel/move_panel.3:1.2 --- src/lib/libpanel/move_panel.3:1.1 Tue Oct 27 23:42:55 2015 +++ src/lib/libpanel/move_panel.3 Wed Oct 28 02:23:50 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: move_panel.3,v 1.1 2015/10/27 23:42:55 uwe Exp $ +.\" $NetBSD: move_panel.3,v 1.2 2015/10/28 02:23:50 uwe Exp $ .\" .\" Copyright (c) 2015 Valery Ushakov .\" All rights reserved. @@ -38,6 +38,32 @@ .Fn move_panel "PANEL *p" "int y" "int x" .\" .Sh DESCRIPTION -Change panel position on screen... +A panel can be moved to a new position by calling the +.Fn move_panel +function. +The +.Fa y +and +.Fa x +positions are the new origin of the panel on the screen. +.Pp +This function is panel library counterpart of curses +.Xr mvwin 3 . +Curses +.Fn mvwin +must never be directly used on a window associated with a panel. +.Sh RETURN VALUES +The +.Fn move_panel +function will return one of the following +values: +.Pp +.Bl -tag -width ".Dv ERR" -compact +.It Dv OK +The function completed successfully. +.It Dv ERR +An error occurred in the function. +.El .Sh SEE ALSO +.Xr mvwin 3 , .Xr panel 3 Index: src/lib/libpanel/new_panel.3 diff -u src/lib/libpanel/new_panel.3:1.1 src/lib/libpanel/new_panel.3:1.2 --- src/lib/libpanel/new_panel.3:1.1 Tue Oct 27 23:42:55 2015 +++ src/lib/libpanel/new_panel.3 Wed Oct 28 02:23:50 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: new_panel.3,v 1.1 2015/10/27 23:42:55 uwe Exp $ +.\" $NetBSD: new_panel.3,v 1.2 2015/10/28 02:23:50 uwe Exp $ .\" .\" Copyright (c) 2015 Valery Ushakov .\" All rights reserved. @@ -50,6 +50,33 @@ .Fn del_panel "PANEL *p" .\" .Sh DESCRIPTION -Routines to manage panels and associated curses windows... +The funcion +.Fn new_panel +creates a new panel associated with the curses window +.Fa win . +The new panel is visible and is placed at the top of the deck. +.Pp +Curses window associated with a panel may be obtained with +.Fn panel_window +and changed with +.Fn replace_panel . +.Pp +The funcion +.Fn del_panel +hides the panel and deletes it. +Note, that the curses window associated with the panel is not deleted. +.Sh RETURN VALUES +Functions returning pointers will return +.Dv NULL +if an error is detected. +The functions that return an int will return one of the following +values: +.Pp +.Bl -tag -width ".Dv ERR" -compact +.It Dv OK +The function completed successfully. +.It Dv ERR +An error occurred in the function. +.El .Sh SEE ALSO .Xr panel 3 Index: src/lib/libpanel/panel_above.3 diff -u src/lib/libpanel/panel_above.3:1.1 src/lib/libpanel/panel_above.3:1.2 --- src/lib/libpanel/panel_above.3:1.1 Tue Oct 27 23:42:55 2015 +++ src/lib/libpanel/panel_above.3 Wed Oct 28 02:23:50 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: panel_above.3,v 1.1 2015/10/27 23:42:55 uwe Exp $ +.\" $NetBSD: panel_above.3,v 1.2 2015/10/28 02:23:50 uwe Exp $ .\" .\" Copyright (c) 2015 Valery Ushakov .\" All rights reserved. @@ -50,6 +50,47 @@ .Fn panel_below "PANEL *p" .\" .Sh DESCRIPTION -Routines to manage z-order of panels... +Newly created panels are placed at the top of the deck. +Z-order of a visible panel can be changed with the functions +.Fn top_panel +and +.Fn bottom_panel +that move it to the top and bottom of the deck respectively. +.Pp +For a visible panel its neighbors in the deck can be obtained with +.Fn panel_above +and +.Fn panel_below . +.Sh IMPLEMENTATION NOTES +The +.Fn top_panel +function will return an error if the panel is currently hidden. +Use +.Xr show_panel 3 +to make a hidden panel visible again and put it at the top of the deck. +This is the behaviour specified by the original +.At V +panel library. +.Pp +In the ncurses implementation of the panel library +.Fn show_panel +and +.Fn top_panel +are identical and handle both visible and hidden panels. +This may be a source of bugs in programs tested only against ncurses. +.Sh RETURN VALUES +Functions returning pointers will return +.Dv NULL +if an error is detected. +The functions that return an int will return one of the following +values: +.Pp +.Bl -tag -width ".Dv ERR" -compact +.It Dv OK +The function completed successfully. +.It Dv ERR +An error occurred in the function. +.El + .Sh SEE ALSO .Xr panel 3 Index: src/lib/libpanel/panel_hidden.3 diff -u src/lib/libpanel/panel_hidden.3:1.1 src/lib/libpanel/panel_hidden.3:1.2 ---
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Oct 27 14:22:39 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: uhci.c Log Message: Make the previous compile with other options. To generate a diff of this commit: cvs rdiff -u -r1.264.4.39 -r1.264.4.40 src/sys/dev/usb/uhci.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/uhci.c diff -u src/sys/dev/usb/uhci.c:1.264.4.39 src/sys/dev/usb/uhci.c:1.264.4.40 --- src/sys/dev/usb/uhci.c:1.264.4.39 Tue Oct 27 14:05:29 2015 +++ src/sys/dev/usb/uhci.c Tue Oct 27 14:22:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.264.4.39 2015/10/27 14:05:29 skrll Exp $ */ +/* $NetBSD: uhci.c,v 1.264.4.40 2015/10/27 14:22:38 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.39 2015/10/27 14:05:29 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.40 2015/10/27 14:22:38 skrll Exp $"); #include "opt_usb.h" @@ -263,7 +263,7 @@ Static void uhci_dump_qhs(uhci_soft_qh_ Static void uhci_dump_qh(uhci_soft_qh_t *); Static void uhci_dump_tds(uhci_soft_td_t *); Static void uhci_dump_td(uhci_soft_td_t *); -Static void uhci_dump_ii(uhci_intr_info_t *); +Static void uhci_dump_ii(struct uhci_xfer *); void uhci_dump(void); #endif @@ -623,8 +623,8 @@ uhci_allocx(struct usbd_bus *bus, unsign if (xfer != NULL) { memset(xfer, 0, sizeof(struct uhci_xfer)); - struct uhci_xfer *uxfer = UHCI_XFER2UXFER(xfer); #ifdef DIAGNOSTIC + struct uhci_xfer *uxfer = UHCI_XFER2UXFER(xfer); uxfer->isdone = true; xfer->ux_state = XFER_BUSY; #endif @@ -895,7 +895,7 @@ uhci_dump_tds(uhci_soft_td_t *std) } Static void -uhci_dump_ii(uhci_intr_info_t *ux) +uhci_dump_ii(struct uhci_xfer *ux) { struct usbd_pipe *pipe; usb_endpoint_descriptor_t *ed; @@ -905,31 +905,25 @@ uhci_dump_ii(uhci_intr_info_t *ux) printf("ux NULL\n"); return; } - if (ux->xfer == NULL) { - printf("ux %p: done=%d xfer=NULL\n", - ux, ux->isdone); - return; - } - pipe = ux->xfer->ux_pipe; + pipe = ux->xfer.ux_pipe; if (pipe == NULL) { - printf("ux %p: done=%d xfer=%p pipe=NULL\n", - ux, ux->isdone, ux->xfer); + printf("ux %p: done=%d pipe=NULL\n", ux, ux->isdone); return; } if (pipe->up_endpoint == NULL) { - printf("ux %p: done=%d xfer=%p pipe=%p pipe->up_endpoint=NULL\n", - ux, ux->isdone, ux->xfer, pipe); + printf("ux %p: done=%d pipe=%p pipe->up_endpoint=NULL\n", + ux, ux->isdone, pipe); return; } if (pipe->up_dev == NULL) { - printf("ux %p: done=%d xfer=%p pipe=%p pipe->up_dev=NULL\n", - ux, ux->isdone, ux->xfer, pipe); + printf("ux %p: done=%d pipe=%p pipe->up_dev=NULL\n", + ux, ux->isdone, pipe); return; } ed = pipe->up_endpoint->ue_edesc; dev = pipe->up_dev; - printf("ux %p: done=%d xfer=%p dev=%p vid=0x%04x pid=0x%04x addr=%d pipe=%p ep=0x%02x attr=0x%02x\n", - ux, ux->isdone, ux->xfer, dev, + printf("ux %p: done=%d dev=%p vid=0x%04x pid=0x%04x addr=%d pipe=%p ep=0x%02x attr=0x%02x\n", + ux, ux->isdone, dev, UGETW(dev->ud_ddesc.idVendor), UGETW(dev->ud_ddesc.idProduct), dev->ud_addr, pipe, @@ -940,7 +934,7 @@ void uhci_dump_iis(struct uhci_softc *sc void uhci_dump_iis(struct uhci_softc *sc) { - uhci_intr_info_t *ii; + struct uhci_xfer *ux; printf("interrupt list:\n"); for (ux = TAILQ_FIRST(>sc_intrhead); ux; ux = TAILQ_NEXT(ux, list))
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue Oct 27 14:23:23 UTC 2015 Modified Files: src/sys/dev/pci: if_wmreg.h Log Message: Move the definition of CTRL_EXT_PHYPDEN and use __BIT(). No binary change. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/dev/pci/if_wmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wmreg.h diff -u src/sys/dev/pci/if_wmreg.h:1.86 src/sys/dev/pci/if_wmreg.h:1.87 --- src/sys/dev/pci/if_wmreg.h:1.86 Fri Oct 23 08:45:14 2015 +++ src/sys/dev/pci/if_wmreg.h Tue Oct 27 14:23:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wmreg.h,v 1.86 2015/10/23 08:45:14 msaitoh Exp $ */ +/* $NetBSD: if_wmreg.h,v 1.87 2015/10/27 14:23:23 msaitoh Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -318,6 +318,7 @@ struct livengood_tcpip_ctxdesc { #define CTRL_EXT_RO_DIS (1U << 17) /* relaxed ordering disabled */ #define CTRL_EXT_SDLPE (1U << 18) /* SerDes Low Power Enable */ #define CTRL_EXT_DMA_DYN_CLK (1U << 19) /* DMA Dynamic Gating Enable */ +#define CTRL_EXT_PHYPDEN __BIT(20) #define CTRL_EXT_LINK_MODE_MASK 0x00C0 #define CTRL_EXT_LINK_MODE_GMII 0x #define CTRL_EXT_LINK_MODE_KMRN 0x @@ -326,7 +327,6 @@ struct livengood_tcpip_ctxdesc { #define CTRL_EXT_LINK_MODE_PCIX_SERDES 0x0080 #define CTRL_EXT_LINK_MODE_TBI 0x00C0 #define CTRL_EXT_LINK_MODE_PCIE_SERDES 0x00C0 -#define CTRL_EXT_PHYPDEN 0x0010 #define CTRL_EXT_EIAME __BIT(24) /* Extended Interrupt Auto Mask En */ #define CTRL_EXT_I2C_ENA 0x0200 /* I2C enable */ #define CTRL_EXT_DRV_LOAD 0x1000
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Oct 27 14:05:29 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: uhci.c uhcivar.h Log Message: Collapse uhcl_intr_info into uhci_xfer and use TAILQ for list of transfers that are active. To generate a diff of this commit: cvs rdiff -u -r1.264.4.38 -r1.264.4.39 src/sys/dev/usb/uhci.c cvs rdiff -u -r1.52.14.10 -r1.52.14.11 src/sys/dev/usb/uhcivar.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/uhci.c diff -u src/sys/dev/usb/uhci.c:1.264.4.38 src/sys/dev/usb/uhci.c:1.264.4.39 --- src/sys/dev/usb/uhci.c:1.264.4.38 Tue Oct 27 08:02:31 2015 +++ src/sys/dev/usb/uhci.c Tue Oct 27 14:05:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.264.4.38 2015/10/27 08:02:31 skrll Exp $ */ +/* $NetBSD: uhci.c,v 1.264.4.39 2015/10/27 14:05:29 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.38 2015/10/27 08:02:31 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.39 2015/10/27 14:05:29 skrll Exp $"); #include "opt_usb.h" @@ -183,8 +183,8 @@ Static usbd_status uhci_alloc_std_chain( uhci_soft_td_t **, uhci_soft_td_t **); Static void uhci_poll_hub(void *); Static void uhci_waitintr(uhci_softc_t *, struct usbd_xfer *); -Static void uhci_check_intr(uhci_softc_t *, uhci_intr_info_t *); -Static void uhci_idone(uhci_intr_info_t *); +Static void uhci_check_intr(uhci_softc_t *, struct uhci_xfer *); +Static void uhci_idone(struct uhci_xfer *); Static void uhci_abort_xfer(struct usbd_xfer *, usbd_status); @@ -366,14 +366,14 @@ const struct usbd_pipe_methods uhci_devi .upm_done = uhci_device_isoc_done, }; -#define uhci_add_intr_info(sc, ii) \ - LIST_INSERT_HEAD(&(sc)->sc_intrhead, (ii), list) -#define uhci_del_intr_info(ii) \ +#define uhci_add_intr_info(sc, ux) \ + TAILQ_INSERT_TAIL(&(sc)->sc_intrhead, (ux), list) +#define uhci_del_intr_info(sc, ux) \ do { \ - LIST_REMOVE((ii), list); \ - (ii)->list.le_prev = NULL; \ + TAILQ_REMOVE(&(sc)->sc_intrhead, (ux), list); \ + (ux)->list.tqe_prev = NULL; \ } while (0) -#define uhci_active_intr_info(ii) ((ii)->list.le_prev != NULL) +#define uhci_active_intr_info(ux) ((ux)->list.tqe_prev != NULL) static inline uhci_soft_qh_t * uhci_find_prev_qh(uhci_soft_qh_t *pqh, uhci_soft_qh_t *sqh) @@ -538,7 +538,7 @@ uhci_init(uhci_softc_t *sc) BUS_DMASYNC_PREWRITE); - LIST_INIT(>sc_intrhead); + TAILQ_INIT(>sc_intrhead); sc->sc_xferpool = pool_cache_init(sizeof(struct uhci_xfer), 0, 0, 0, "uhcixfer", NULL, IPL_USB, NULL, NULL, NULL); @@ -625,7 +625,7 @@ uhci_allocx(struct usbd_bus *bus, unsign struct uhci_xfer *uxfer = UHCI_XFER2UXFER(xfer); #ifdef DIAGNOSTIC - uxfer->iinfo.isdone = true; + uxfer->isdone = true; xfer->ux_state = XFER_BUSY; #endif } @@ -640,7 +640,7 @@ uhci_freex(struct usbd_bus *bus, struct KASSERTMSG(xfer->ux_state == XFER_BUSY, "xfer %p state %d\n", xfer, xfer->ux_state); - KASSERTMSG(uxfer->iinfo.isdone, "xfer %p not done\n", xfer); + KASSERTMSG(uxfer->isdone, "xfer %p not done\n", xfer); #ifdef DIAGNOSTIC xfer->ux_state = XFER_FREE; #endif @@ -895,51 +895,45 @@ uhci_dump_tds(uhci_soft_td_t *std) } Static void -uhci_dump_ii(uhci_intr_info_t *ii) +uhci_dump_ii(uhci_intr_info_t *ux) { struct usbd_pipe *pipe; usb_endpoint_descriptor_t *ed; struct usbd_device *dev; -#ifdef DIAGNOSTIC -#define DONE ii->isdone -#else -#define DONE 0 -#endif - if (ii == NULL) { - printf("ii NULL\n"); + if (ux == NULL) { + printf("ux NULL\n"); return; } - if (ii->xfer == NULL) { - printf("ii %p: done=%d xfer=NULL\n", - ii, DONE); + if (ux->xfer == NULL) { + printf("ux %p: done=%d xfer=NULL\n", + ux, ux->isdone); return; } - pipe = ii->xfer->ux_pipe; + pipe = ux->xfer->ux_pipe; if (pipe == NULL) { - printf("ii %p: done=%d xfer=%p pipe=NULL\n", - ii, DONE, ii->xfer); + printf("ux %p: done=%d xfer=%p pipe=NULL\n", + ux, ux->isdone, ux->xfer); return; } if (pipe->up_endpoint == NULL) { - printf("ii %p: done=%d xfer=%p pipe=%p pipe->up_endpoint=NULL\n", - ii, DONE, ii->xfer, pipe); + printf("ux %p: done=%d xfer=%p pipe=%p pipe->up_endpoint=NULL\n", + ux, ux->isdone, ux->xfer, pipe); return; } if (pipe->up_dev == NULL) { - printf("ii %p: done=%d xfer=%p pipe=%p pipe->up_dev=NULL\n", - ii, DONE, ii->xfer, pipe); + printf("ux %p: done=%d xfer=%p pipe=%p pipe->up_dev=NULL\n", + ux, ux->isdone, ux->xfer, pipe); return; } ed = pipe->up_endpoint->ue_edesc; dev = pipe->up_dev; - printf("ii %p: done=%d xfer=%p dev=%p vid=0x%04x pid=0x%04x addr=%d pipe=%p ep=0x%02x attr=0x%02x\n", - ii, DONE, ii->xfer, dev, + printf("ux %p: done=%d xfer=%p dev=%p vid=0x%04x pid=0x%04x addr=%d pipe=%p ep=0x%02x