CVS commit: src/libexec/ld.elf_so/arch/mips
Module Name:src Committed By: maya Date: Sun Dec 24 01:22:16 UTC 2017 Modified Files: src/libexec/ld.elf_so/arch/mips: mips_reloc.c Log Message: fix debug build To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/libexec/ld.elf_so/arch/mips/mips_reloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/mips/mips_reloc.c diff -u src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.69 src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.70 --- src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.69 Thu Aug 10 19:03:26 2017 +++ src/libexec/ld.elf_so/arch/mips/mips_reloc.c Sun Dec 24 01:22:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_reloc.c,v 1.69 2017/08/10 19:03:26 joerg Exp $ */ +/* $NetBSD: mips_reloc.c,v 1.70 2017/12/24 01:22:16 maya Exp $ */ /* * Copyright 1997 Michael L. Hitch@@ -30,7 +30,7 @@ #include #ifndef lint -__RCSID("$NetBSD: mips_reloc.c,v 1.69 2017/08/10 19:03:26 joerg Exp $"); +__RCSID("$NetBSD: mips_reloc.c,v 1.70 2017/12/24 01:22:16 maya Exp $"); #endif /* not lint */ #include @@ -413,7 +413,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry store_ptr(where, val, ELFSIZE / 8); rdbg(("DTPMOD %s in %s --> %p in %s", - obj->strtab + obj->symtab[r_symndx].st_name, + obj->strtab + obj->symtab[ELF_R_SYM(rel->r_info)].st_name, obj->path, (void *)old, defobj->path)); break; } @@ -434,7 +434,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry store_ptr(where, val, ELFSIZE / 8); rdbg(("DTPREL %s in %s --> %p in %s", - obj->strtab + obj->symtab[r_symndx].st_name, + obj->strtab + obj->symtab[ELF_R_SYM(rel->r_info)].st_name, obj->path, (void *)old, defobj->path)); break; } @@ -456,7 +456,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry store_ptr(where, val, ELFSIZE / 8); rdbg(("TPREL %s in %s --> %p in %s", - obj->strtab + obj->symtab[r_symndx].st_name, + obj->strtab + obj->symtab[ELF_R_SYM(rel->r_info)].st_name, obj->path, where, defobj->path)); break; } @@ -468,7 +468,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry (u_long)ELF_R_TYPE(rel->r_info), (void *)rel->r_offset, (void *)load_ptr(where, sizeof(Elf_Sword)), - obj->strtab + obj->symtab[r_symndx].st_name)); + obj->strtab + obj->symtab[ELF_R_SYM(rel->r_info)].st_name)); _rtld_error("%s: Unsupported relocation type %ld " "in non-PLT relocations", obj->path, (u_long) ELF_R_TYPE(rel->r_info));
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sat Dec 23 22:12:19 UTC 2017 Modified Files: src/sys/kern: sys_ptrace_common.c Log Message: Merge the code back; the problem was that since we are reading/writing to a kernel address for PT_{READ,WRITE}_{I,D} we need the kernel vmspace. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/kern/sys_ptrace_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/sys/kern/sys_ptrace_common.c diff -u src/sys/kern/sys_ptrace_common.c:1.30 src/sys/kern/sys_ptrace_common.c:1.31 --- src/sys/kern/sys_ptrace_common.c:1.30 Fri Dec 22 10:02:57 2017 +++ src/sys/kern/sys_ptrace_common.c Sat Dec 23 17:12:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace_common.c,v 1.30 2017/12/22 15:02:57 kamil Exp $ */ +/* $NetBSD: sys_ptrace_common.c,v 1.31 2017/12/23 22:12:19 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.30 2017/12/22 15:02:57 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.31 2017/12/23 22:12:19 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -904,7 +904,7 @@ out: static int ptrace_doio(struct lwp *l, struct proc *t, struct lwp *lt, -struct ptrace_io_desc *piod, void *addr, struct vmspace **vm) +struct ptrace_io_desc *piod, void *addr, bool sysspace) { struct uio uio; struct iovec iov; @@ -947,19 +947,23 @@ ptrace_doio(struct lwp *l, struct proc * error = EINVAL; break; } - if (error) - return error; - error = proc_vmspace_getref(l->l_proc, vm); + if (error) return error; - uio.uio_vmspace = *vm; + if (sysspace) { + uio.uio_vmspace = vmspace_kernel(); + } else { + error = proc_vmspace_getref(l->l_proc, _vmspace); + if (error) + return error; + } error = process_domem(l, lt, ); - if (error) { - uvmspace_free(*vm); + if (!sysspace) + uvmspace_free(uio.uio_vmspace); + if (error) return error; - } piod->piod_len -= uio.uio_resid; return 0; } @@ -972,10 +976,7 @@ do_ptrace(struct ptrace_methods *ptm, st struct lwp *lt = NULL; struct lwp *lt2; struct proc *t;/* target process */ - struct uio uio; - struct iovec iov; struct ptrace_io_desc piod; - struct vmspace *vm; int error, write, tmp, pheld; int signo = 0; int resume_all; @@ -1034,32 +1035,17 @@ do_ptrace(struct ptrace_methods *ptm, st case PT_WRITE_I: /* XXX no separate I and D spaces */ case PT_WRITE_D: -#if defined(__HAVE_RAS) - /* - * Can't write to a RAS - */ - if (ras_lookup(t, addr) != (void *)-1) { - error = EACCES; - break; - } -#endif write = 1; tmp = data; /* FALLTHROUGH */ case PT_READ_I: /* XXX no separate I and D spaces */ case PT_READ_D: - /* write = 0 done above. */ - iov.iov_base = (void *) - iov.iov_len = sizeof(tmp); - uio.uio_iov = - uio.uio_iovcnt = 1; - uio.uio_offset = (off_t)(unsigned long)addr; - uio.uio_resid = sizeof(tmp); - uio.uio_rw = write ? UIO_WRITE : UIO_READ; - UIO_SETUP_SYSSPACE(); - - error = process_domem(l, lt, ); - + piod.piod_addr = + piod.piod_len = sizeof(tmp); + piod.piod_offs = addr; + piod.piod_op = write ? PIOD_WRITE_D : PIOD_READ_D; + if ((error = ptrace_doio(l, t, lt, , addr, true)) != 0) + break; if (!write) *retval = tmp; break; @@ -1067,10 +1053,9 @@ do_ptrace(struct ptrace_methods *ptm, st case PT_IO: if ((error = ptm->ptm_copyin_piod(, addr, data)) != 0) break; - if ((error = ptrace_doio(l, t, lt, , addr, )) != 0) + if ((error = ptrace_doio(l, t, lt, , addr, false)) != 0) break; (void) ptm->ptm_copyout_piod(, addr, data); - uvmspace_free(vm); break; case PT_DUMPCORE:
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: christos Date: Sat Dec 23 22:07:57 UTC 2017 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: report which errno failed To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.17 src/tests/lib/libc/sys/t_ptrace_wait.c:1.18 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.17 Fri Dec 22 12:35:14 2017 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Sat Dec 23 17:07:57 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.17 2017/12/22 17:35:14 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.18 2017/12/23 22:07:57 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.17 2017/12/22 17:35:14 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.18 2017/12/23 22:07:57 christos Exp $"); #include #include @@ -71,6 +71,8 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.17 #define SYSCALL_REQUIRE(expr) ATF_REQUIRE_MSG(expr, "%s: %s", # expr, \ strerror(errno)) +#define SYSCALL_REQUIRE_ERRNO(res, exp) ATF_REQUIRE_MSG(res == exp, \ +"%d(%s) != %d", res, strerror(res), exp) static int debug = 0; @@ -2533,7 +2535,7 @@ ATF_TC_BODY(read_d1, tc) child, getpid()); errno = 0; lookup_me = ptrace(PT_READ_D, child, _me, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me, magic, "got value %#x != expected %#x", lookup_me, magic); @@ -2597,7 +2599,7 @@ ATF_TC_BODY(read_d2, tc) child, getpid()); errno = 0; lookup_me1 = ptrace(PT_READ_D, child, _me1, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me1, magic1, "got value %#x != expected %#x", lookup_me1, magic1); @@ -2606,7 +2608,7 @@ ATF_TC_BODY(read_d2, tc) child, getpid()); errno = 0; lookup_me2 = ptrace(PT_READ_D, child, _me2, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me2, magic2, "got value %#x != expected %#x", lookup_me2, magic2); @@ -2673,7 +2675,7 @@ ATF_TC_BODY(read_d3, tc) child, getpid()); errno = 0; lookup_me1 = ptrace(PT_READ_D, child, _me1, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me1, magic1, "got value %#x != expected %#x", lookup_me1, magic1); @@ -2682,7 +2684,7 @@ ATF_TC_BODY(read_d3, tc) child, getpid()); errno = 0; lookup_me2 = ptrace(PT_READ_D, child, _me2, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me2, magic2, "got value %#x != expected %#x", lookup_me2, magic2); @@ -2691,7 +2693,7 @@ ATF_TC_BODY(read_d3, tc) child, getpid()); errno = 0; lookup_me3 = ptrace(PT_READ_D, child, _me3, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me3, magic3, "got value %#x != expected %#x", lookup_me3, magic3); @@ -2761,7 +2763,7 @@ ATF_TC_BODY(read_d4, tc) child, getpid()); errno = 0; lookup_me1 = ptrace(PT_READ_D, child, _me1, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me1, magic1, "got value %#x != expected %#x", lookup_me1, magic1); @@ -2770,7 +2772,7 @@ ATF_TC_BODY(read_d4, tc) child, getpid()); errno = 0; lookup_me2 = ptrace(PT_READ_D, child, _me2, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me2, magic2, "got value %#x != expected %#x", lookup_me2, magic2); @@ -2779,7 +2781,7 @@ ATF_TC_BODY(read_d4, tc) child, getpid()); errno = 0; lookup_me3 = ptrace(PT_READ_D, child, _me3, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me3, magic3, "got value %#x != expected %#x", lookup_me3, magic3); @@ -2788,7 +2790,7 @@ ATF_TC_BODY(read_d4, tc) child, getpid()); errno = 0; lookup_me4 = ptrace(PT_READ_D, child, _me4, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me4, magic4, "got value %#x != expected %#x", lookup_me4, magic4); @@ -3292,7 +3294,7 @@ ATF_TC_BODY(read_d_write_d_handshake1, t errno = 0; lookup_me_fromtracee = ptrace(PT_READ_D, child, _me_fromtracee, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0); ATF_REQUIRE_EQ_MSG(lookup_me_fromtracee, magic_fromtracee, "got value %#x != expected %#x", lookup_me_fromtracee, @@ -3371,7 +3373,7 @@ ATF_TC_BODY(read_d_write_d_handshake2, t errno = 0; lookup_me_fromtracee = ptrace(PT_READ_D, child, _me_fromtracee, 0); - ATF_REQUIRE_EQ(errno, 0); + SYSCALL_REQUIRE_ERRNO(errno, 0);
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Sat Dec 23 19:56:01 UTC 2017 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: 450 To generate a diff of this commit: cvs rdiff -u -r1.1.2.95 -r1.1.2.96 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.95 src/doc/CHANGES-8.0:1.1.2.96 --- src/doc/CHANGES-8.0:1.1.2.95 Fri Dec 22 06:06:21 2017 +++ src/doc/CHANGES-8.0 Sat Dec 23 19:56:01 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.95 2017/12/22 06:06:21 snj Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.96 2017/12/23 19:56:01 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -8665,3 +8665,9 @@ sys/dev/usb/xhci.c1.78, 1.83 capabilities of a HS hub itself or the same upstream HS hub. [skrll, ticket #459] +sys/dev/pad/pad.c1.44 + + Rework so that module infrastructure is provided even when the + module is built-in to the kernel. + [pgoyette, ticket #450] +
CVS commit: [netbsd-8] src/sys/dev/pad
Module Name:src Committed By: snj Date: Sat Dec 23 18:48:42 UTC 2017 Modified Files: src/sys/dev/pad [netbsd-8]: pad.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #450): sys/dev/pad/pad.c: revision 1.44 Rework so that module infrastructure is provided even when the module is built-in to the kernel. To generate a diff of this commit: cvs rdiff -u -r1.32.2.1 -r1.32.2.2 src/sys/dev/pad/pad.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/pad/pad.c diff -u src/sys/dev/pad/pad.c:1.32.2.1 src/sys/dev/pad/pad.c:1.32.2.2 --- src/sys/dev/pad/pad.c:1.32.2.1 Sat Jun 10 06:05:47 2017 +++ src/sys/dev/pad/pad.c Sat Dec 23 18:48:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pad.c,v 1.32.2.1 2017/06/10 06:05:47 snj Exp $ */ +/* $NetBSD: pad.c,v 1.32.2.2 2017/12/23 18:48:41 snj Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.32.2.1 2017/06/10 06:05:47 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.32.2.2 2017/12/23 18:48:41 snj Exp $"); #include #include @@ -719,10 +719,10 @@ pad_swvol_dtor(stream_filter_t *this) kmem_free(this, sizeof(auvolconv_filter_t)); } -#ifdef _MODULE - MODULE(MODULE_CLASS_DRIVER, pad, "audio"); +#ifdef _MODULE + static const struct cfiattrdata audiobuscf_iattrdata = { "audiobus", 0, { { NULL, NULL, 0 }, } }; @@ -746,18 +746,22 @@ static struct cfdata pad_cfdata[] = { }, { NULL, NULL, 0, 0, NULL, 0, NULL } }; +#endif static int pad_modcmd(modcmd_t cmd, void *arg) { +#ifdef _MODULE devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR; - int error; +#endif + int error = 0; switch (cmd) { case MODULE_CMD_INIT: +#ifdef _MODULE error = config_cfdriver_attach(_cd); if (error) { - return error; + break; } error = config_cfattach_attach(pad_cd.cd_name, _ca); @@ -766,7 +770,7 @@ pad_modcmd(modcmd_t cmd, void *arg) aprint_error("%s: unable to register cfattach\n", pad_cd.cd_name); - return error; + break; } error = config_cfdata_attach(pad_cfdata, 1); @@ -776,41 +780,41 @@ pad_modcmd(modcmd_t cmd, void *arg) aprint_error("%s: unable to register cfdata\n", pad_cd.cd_name); - return error; + break; } error = devsw_attach(pad_cd.cd_name, NULL, , _cdevsw, ); if (error) { - error = config_cfdata_detach(pad_cfdata); - if (error) { -return error; - } + config_cfdata_detach(pad_cfdata); config_cfattach_detach(pad_cd.cd_name, _ca); config_cfdriver_detach(_cd); aprint_error("%s: unable to register devsw\n", pad_cd.cd_name); - return error; + break; } (void)config_attach_pseudo(pad_cfdata); +#endif - return 0; + break; case MODULE_CMD_FINI: +#ifdef _MODULE error = config_cfdata_detach(pad_cfdata); if (error) { - return error; + break; } config_cfattach_detach(pad_cd.cd_name, _ca); config_cfdriver_detach(_cd); devsw_detach(NULL, _cdevsw); +#endif - return 0; + break; default: - return ENOTTY; + error = ENOTTY; } -} -#endif + return error; +}
CVS commit: src/lib/libedit
Module Name:src Committed By: uwe Date: Sat Dec 23 18:25:03 UTC 2017 Modified Files: src/lib/libedit: history.c Log Message: The order in which the arguments to a function are evaluated is undefined, so don't use va_arg() twice. PR lib/52849 To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/lib/libedit/history.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libedit/history.c diff -u src/lib/libedit/history.c:1.58 src/lib/libedit/history.c:1.59 --- src/lib/libedit/history.c:1.58 Fri Sep 1 10:19:10 2017 +++ src/lib/libedit/history.c Sat Dec 23 18:25:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: history.c,v 1.58 2017/09/01 10:19:10 christos Exp $ */ +/* $NetBSD: history.c,v 1.59 2017/12/23 18:25:03 uwe Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: history.c,v 1.58 2017/09/01 10:19:10 christos Exp $"); +__RCSID("$NetBSD: history.c,v 1.59 2017/12/23 18:25:03 uwe Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -1082,11 +1082,13 @@ FUNW(history)(TYPE(History) *h, TYPE(His break; case H_NSAVE_FP: - retval = history_save_fp(h, va_arg(va, size_t), - va_arg(va, FILE *)); + { + size_t sz = va_arg(va, size_t); + retval = history_save_fp(h, sz, va_arg(va, FILE *)); if (retval == -1) he_seterrev(ev, _HE_HIST_WRITE); break; + } case H_PREV_EVENT: retval = history_prev_event(h, ev, va_arg(va, int));
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Dec 23 12:50:55 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_platform.c Log Message: Apply RTL8211E 'no-rx-delay' workaround on Pine64+ boards To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/sunxi/sunxi_platform.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/sunxi/sunxi_platform.c diff -u src/sys/arch/arm/sunxi/sunxi_platform.c:1.17 src/sys/arch/arm/sunxi/sunxi_platform.c:1.18 --- src/sys/arch/arm/sunxi/sunxi_platform.c:1.17 Tue Dec 19 09:04:19 2017 +++ src/sys/arch/arm/sunxi/sunxi_platform.c Sat Dec 23 12:50:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_platform.c,v 1.17 2017/12/19 09:04:19 skrll Exp $ */ +/* $NetBSD: sunxi_platform.c,v 1.18 2017/12/23 12:50:55 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -31,7 +31,7 @@ #include "opt_fdt_arm.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.17 2017/12/19 09:04:19 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.18 2017/12/23 12:50:55 jmcneill Exp $"); #include #include @@ -137,6 +137,15 @@ sunxi_platform_early_putchar(char c) static void sunxi_platform_device_register(device_t self, void *aux) { + prop_dictionary_t prop = device_properties(self); + + if (device_is_a(self, "rgephy")) { + /* Pine64+ gigabit ethernet workaround */ + const char * compat[] = { "pine64,pine64-plus", NULL }; + if (of_match_compatible(OF_finddevice("/"), compat)) { + prop_dictionary_set_bool(prop, "no-rx-delay", true); + } + } } static u_int
CVS commit: src/sys/dev/mii
Module Name:src Committed By: jmcneill Date: Sat Dec 23 12:49:55 UTC 2017 Modified Files: src/sys/dev/mii: rgephy.c Log Message: Add a no-rx-delay device property for RGE8211E that disables RX internal delay using some undocumented registers. Required for stable gigabit links on Pine64+. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/dev/mii/rgephy.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/mii/rgephy.c diff -u src/sys/dev/mii/rgephy.c:1.40 src/sys/dev/mii/rgephy.c:1.41 --- src/sys/dev/mii/rgephy.c:1.40 Fri Aug 21 12:22:22 2015 +++ src/sys/dev/mii/rgephy.c Sat Dec 23 12:49:54 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rgephy.c,v 1.40 2015/08/21 12:22:22 jmcneill Exp $ */ +/* $NetBSD: rgephy.c,v 1.41 2017/12/23 12:49:54 jmcneill Exp $ */ /* * Copyright (c) 2003 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.40 2015/08/21 12:22:22 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.41 2017/12/23 12:49:54 jmcneill Exp $"); /* @@ -634,6 +634,18 @@ rgephy_reset(struct mii_softc *sc) ssr &= ~RGEPHY_SSR_ALDPS; PHY_WRITE(sc, RGEPHY_MII_SSR, ssr); } + } else if (sc->mii_mpd_rev == 5) { + /* RTL8211E */ + prop_dictionary_t prop = device_properties(sc->mii_dev); + bool no_rx_delay = false; + prop_dictionary_get_bool(prop, "no-rx-delay", _rx_delay); + if (no_rx_delay) { + /* Disable RX internal delay (undocumented) */ + PHY_WRITE(sc, 0x1f, 0x0007); + PHY_WRITE(sc, 0x1e, 0x00a4); + PHY_WRITE(sc, 0x1c, 0xb591); + PHY_WRITE(sc, 0x1f, 0x); + } } else if (sc->mii_mpd_rev == 6) { /* RTL8211F */ phycr1 = PHY_READ(sc, RGEPHY_MII_PHYCR1);
CVS commit: src/external/mit/xorg/server/drivers
Module Name:src Committed By: nakayama Date: Sat Dec 23 10:15:52 UTC 2017 Modified Files: src/external/mit/xorg/server/drivers: Makefile Log Message: Remove duplicates. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/external/mit/xorg/server/drivers/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/Makefile diff -u src/external/mit/xorg/server/drivers/Makefile:1.94 src/external/mit/xorg/server/drivers/Makefile:1.95 --- src/external/mit/xorg/server/drivers/Makefile:1.94 Mon Aug 7 06:51:13 2017 +++ src/external/mit/xorg/server/drivers/Makefile Sat Dec 23 10:15:52 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.94 2017/08/07 06:51:13 mrg Exp $ +# $NetBSD: Makefile,v 1.95 2017/12/23 10:15:52 nakayama Exp $ .include @@ -307,19 +307,14 @@ SUBDIR+= \ .if ${XORG_SERVER_SUBDIR} == "xorg-server.old" SUBDIR+= \ xf86-video-ag10e \ - xf86-video-glint \ xf86-video-sunleo .endif # ${XORG_SERVER_SUBDIR} == "xorg-server.old" .if ${MACHINE} == "sparc" -.if ${XORG_SERVER_SUBDIR} == "xorg-server.old" -SUBDIR+= \ - xf86-video-pnozz -.endif # ${XORG_SERVER_SUBDIR} == "xorg-server.old" - SUBDIR+= \ xf86-video-suncg14 \ xf86-video-suntcx + .if ${XORG_SERVER_SUBDIR} == "xorg-server.old" SUBDIR+= \ xf86-video-pnozz
CVS commit: src/distrib/sets/lists/xserver
Module Name:src Committed By: nakayama Date: Sat Dec 23 10:07:07 UTC 2017 Modified Files: src/distrib/sets/lists/xserver: md.sparc Log Message: glint is enabled both xorg-server 1.10 and 1.18. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/distrib/sets/lists/xserver/md.sparc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/xserver/md.sparc diff -u src/distrib/sets/lists/xserver/md.sparc:1.67 src/distrib/sets/lists/xserver/md.sparc:1.68 --- src/distrib/sets/lists/xserver/md.sparc:1.67 Thu Jan 5 02:22:19 2017 +++ src/distrib/sets/lists/xserver/md.sparc Sat Dec 23 10:07:07 2017 @@ -1,4 +1,4 @@ -# $NetBSD: md.sparc,v 1.67 2017/01/05 02:22:19 christos Exp $ +# $NetBSD: md.sparc,v 1.68 2017/12/23 10:07:07 nakayama Exp $ ./usr/X11R7/bin/X -unknown- xorg ./usr/X11R7/bin/Xorg -unknown- xorg ./usr/X11R7/bin/cvt -unknown- xorg @@ -29,10 +29,8 @@ ./usr/X11R7/lib/modules/drivers/ag10e_drv.so.0 -unknown- xorg,xorg_server_ver=110 ./usr/X11R7/lib/modules/drivers/ati_drv.so -unknown- xorg ./usr/X11R7/lib/modules/drivers/ati_drv.so.6 -unknown- xorg -./usr/X11R7/lib/modules/drivers/glint_drv.so -unknown- xorg,xorg_server_ver=110 -./usr/X11R7/lib/modules/drivers/glint_drv.so -unknown- xorg,xorg_server_ver=118,obsolete -./usr/X11R7/lib/modules/drivers/glint_drv.so.1 -unknown- xorg,xorg_server_ver=110 -./usr/X11R7/lib/modules/drivers/glint_drv.so.1 -unknown- xorg,xorg_server_ver=118,obsolete +./usr/X11R7/lib/modules/drivers/glint_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/glint_drv.so.1 -unknown- xorg ./usr/X11R7/lib/modules/drivers/kbd_drv.so -unknown- xorg ./usr/X11R7/lib/modules/drivers/kbd_drv.so.1 -unknown- xorg ./usr/X11R7/lib/modules/drivers/mach64_drv.so -unknown- xorg @@ -190,8 +188,7 @@ ./usr/X11R7/man/cat4/ag10e.0-unknown- .cat,xorg,xorg_server_ver=110 ./usr/X11R7/man/cat4/ati.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/exa.0-unknown- .cat,xorg -./usr/X11R7/man/cat4/glint.0-unknown- .cat,xorg,xorg_server_ver=110 -./usr/X11R7/man/cat4/glint.0-unknown- .cat,xorg,xorg_server_ver=118,obsolete +./usr/X11R7/man/cat4/glint.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/kbd.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/mga.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/mousedrv.0-unknown- .cat,xorg @@ -217,8 +214,7 @@ ./usr/X11R7/man/html4/ag10e.html -unknown- html,xorg,xorg_server_ver=110 ./usr/X11R7/man/html4/ati.html-unknown- html,xorg ./usr/X11R7/man/html4/exa.html-unknown- html,xorg -./usr/X11R7/man/html4/glint.html -unknown- html,xorg,xorg_server_ver=110 -./usr/X11R7/man/html4/glint.html -unknown- html,xorg,xorg_server_ver=118,obsolete +./usr/X11R7/man/html4/glint.html -unknown- html,xorg ./usr/X11R7/man/html4/kbd.html-unknown- html,xorg ./usr/X11R7/man/html4/mga.html-unknown- html,xorg ./usr/X11R7/man/html4/mousedrv.html -unknown- html,xorg @@ -244,8 +240,7 @@ ./usr/X11R7/man/man4/ag10e.4-unknown- .man,xorg,xorg_server_ver=110 ./usr/X11R7/man/man4/ati.4-unknown- .man,xorg ./usr/X11R7/man/man4/exa.4-unknown- .man,xorg -./usr/X11R7/man/man4/glint.4-unknown- .man,xorg,xorg_server_ver=110 -./usr/X11R7/man/man4/glint.4-unknown- .man,xorg,xorg_server_ver=118,obsolete +./usr/X11R7/man/man4/glint.4-unknown- .man,xorg ./usr/X11R7/man/man4/kbd.4-unknown- .man,xorg ./usr/X11R7/man/man4/mga.4-unknown- .man,xorg ./usr/X11R7/man/man4/mousedrv.4-unknown- .man,xorg