CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Tue Nov 26 07:51:35 UTC 2019 Modified Files: src/doc: CHANGES.prev Log Message: Move notes about ipgphy(4), jmphy(4), smscphy(4), micphy(4) and alc(4) from post 9.0 to pre 9.0. To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/doc/CHANGES.prev 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.prev diff -u src/doc/CHANGES.prev:1.149 src/doc/CHANGES.prev:1.150 --- src/doc/CHANGES.prev:1.149 Tue Nov 12 08:35:56 2019 +++ src/doc/CHANGES.prev Tue Nov 26 07:51:35 2019 @@ -1,4 +1,4 @@ -LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.149 $> +LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.150 $> Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8: @@ -12642,3 +12642,12 @@ Changes from NetBSD 8.0 to NetBSD 9.0: [jmcneill 20190921] evbarm: Add support for Amazon Graviton "a1.metal" instances. [jmcneill 20191015] + ipgphy(4): Add support for IC Plus IP1000* PHY. [msaitoh 20191017] + alc(4): Add support for Killer E2400 and E2500. [msaitoh 20191017] + jmphy(4): Add support for JMicron JMP202 and JMP211 PHY. + [msaitoh 20191030] + smscphy(4): Add support for SMSC LAN87xx 10/100 Ethernet PHY. + [msaitoh 20191101] + micphy(4): Add support for Microchip KSZ80[0456]1, KSZ8721, KSZ9[01]31, + KS8731 and KSZ9477. + [msaitoh 20191107]
CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Tue Nov 26 07:51:35 UTC 2019 Modified Files: src/doc: CHANGES.prev Log Message: Move notes about ipgphy(4), jmphy(4), smscphy(4), micphy(4) and alc(4) from post 9.0 to pre 9.0. To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/doc/CHANGES.prev Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Tue Nov 26 07:17:42 UTC 2019 Modified Files: src/doc: CHANGES Log Message: Remove notes about ipgphy(4), jmphy(4), smscphy(4), micphy(4) and alc(4) because those will be included in NetBSD 9.0. To generate a diff of this commit: cvs rdiff -u -r1.2615 -r1.2616 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Tue Nov 26 07:17:42 UTC 2019 Modified Files: src/doc: CHANGES Log Message: Remove notes about ipgphy(4), jmphy(4), smscphy(4), micphy(4) and alc(4) because those will be included in NetBSD 9.0. To generate a diff of this commit: cvs rdiff -u -r1.2615 -r1.2616 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.2615 src/doc/CHANGES:1.2616 --- src/doc/CHANGES:1.2615 Wed Nov 20 09:37:45 2019 +++ src/doc/CHANGES Tue Nov 26 07:17:42 2019 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2615 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2616 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -53,8 +53,6 @@ Changes from NetBSD 9.0 to NetBSD 10.0: sup: removed, use ftp://ftp.astron.com/pub/sup [christos 20191015] dhcpcd(8): Import dhcpcd-8.1.1 [roy 20191016] evbarm: Add support for the NanoPi R1 and Duo2. [bad 20191016] - ipgphy(4): Add support for IC Plus IP1000* PHY. [msaitoh 20191017] - alc(4): Add support for Killer E2400 and E2500. [msaitoh 20191017] bind: Import version 9.14.7. [christos 20191017] libc: Changed the iconv(3) function signature to the POSIX variation [kamil 20191024] @@ -63,17 +61,10 @@ Changes from NetBSD 9.0 to NetBSD 10.0: [ozaki-r 20191028] evbarm: Update TI AM335x SoC support to use FDT based configuration. [jmcneill 20191028] - jmphy(4): Add support for JMicron JMP202 and JMP211 PHY. - [msaitoh 20191030] - smscphy(4): Add support for SMSC LAN87xx 10/100 Ethernet PHY. - [msaitoh 20191101] evbarm: Update TI OMAP3 SoC support to use FDT based configuration. [jmcneill 20191101] amd64: Add support for kCSan - Kernel Concurrency Sanitizer. [maxv 20191105] - micphy(4): Add support for Microchip KSZ80[0456]1, KSZ8721, KSZ9[01]31, - KS8731 and KSZ9477. - [msaitoh 20191107] tmux(1): Imported 2.9a. [christos 20191112] dhcpcd(8): Import 8.1.2. [roy 20191113] amd64: Add support for kMSan - Kernel Memory Sanitizer.
CVS commit: src/sys/dev/spi
Module Name:src Committed By: hkenken Date: Tue Nov 26 02:41:58 UTC 2019 Modified Files: src/sys/dev/spi: m25p.c Log Message: Change manufacturer to Micron from Numonyx. N25Q -> MT25Q To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/spi/m25p.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/spi
Module Name:src Committed By: hkenken Date: Tue Nov 26 02:41:58 UTC 2019 Modified Files: src/sys/dev/spi: m25p.c Log Message: Change manufacturer to Micron from Numonyx. N25Q -> MT25Q To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/spi/m25p.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/spi/m25p.c diff -u src/sys/dev/spi/m25p.c:1.14 src/sys/dev/spi/m25p.c:1.15 --- src/sys/dev/spi/m25p.c:1.14 Sat Sep 14 15:12:12 2019 +++ src/sys/dev/spi/m25p.c Tue Nov 26 02:41:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: m25p.c,v 1.14 2019/09/14 15:12:12 tnn Exp $ */ +/* $NetBSD: m25p.c,v 1.15 2019/11/26 02:41:58 hkenken Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: m25p.c,v 1.14 2019/09/14 15:12:12 tnn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: m25p.c,v 1.15 2019/11/26 02:41:58 hkenken Exp $"); #include #include @@ -96,7 +96,8 @@ static const struct m25p_info { { 0x14, 0x20, 0x2015, "STMicro M25P16", 2048, 64 }, /* 16Mbit */ { 0x12, 0x20, 0x2013, "STMicro M25P40", 512, 64 }, /* 4Mbit */ { 0xc0, 0x20, 0x7117, "STMicro M25PX64", 8192, 64 }, /* 64Mbit */ - { 0x00, 0x20, 0xBB18, "Numonyx N25Q128", 16384, 64 }, /* 128Mbit */ + { 0x00, 0x20, 0xBA18, "Micron MT25QL128", 16384, 64 }, /* 128Mbit (3V) */ + { 0x00, 0x20, 0xBB18, "Micron MT25QU128", 16384, 64 }, /* 128Mbit (1.8V) */ { 0x00, 0xBF, 0x2541, "Microchip SST25VF016B", 2048, 64 }, /* 16Mbit */ { 0x00, 0xC2, 0x2011, "Macronix MX25L10", 128, 64 }, /* 1Mbit */ { 0x00, 0xC2, 0x2012, "Macronix MX25L20", 256, 64 }, /* 2Mbit */
CVS commit: src/sys/dev/hyperv
Module Name:src Committed By: nonaka Date: Tue Nov 26 01:46:32 UTC 2019 Modified Files: src/sys/dev/hyperv: if_hvn.c Log Message: hvn(4): Fix incorrect ident when waiting for NVS command response. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.10 src/sys/dev/hyperv/if_hvn.c:1.11 --- src/sys/dev/hyperv/if_hvn.c:1.10 Mon Nov 25 08:53:39 2019 +++ src/sys/dev/hyperv/if_hvn.c Tue Nov 26 01:46:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.10 2019/11/25 08:53:39 nonaka Exp $ */ +/* $NetBSD: if_hvn.c,v 1.11 2019/11/26 01:46:31 nonaka Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.10 2019/11/25 08:53:39 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.11 2019/11/26 01:46:31 nonaka Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1091,7 +1091,8 @@ hvn_nvs_cmd(struct hvn_softc *sc, void * hvn_nvs_intr(sc); splx(s); } else - tsleep(sc, PRIBIO | PCATCH, "nvscmd", mstohz(1)); + tsleep(sc->sc_nvsrsp, PRIBIO | PCATCH, "nvscmd", + mstohz(1)); } while (--timo > 0 && sc->sc_nvsdone != 1); if (timo == 0 && sc->sc_nvsdone != 1) {
CVS commit: src/sys/dev/hyperv
Module Name:src Committed By: nonaka Date: Tue Nov 26 01:46:32 UTC 2019 Modified Files: src/sys/dev/hyperv: if_hvn.c Log Message: hvn(4): Fix incorrect ident when waiting for NVS command response. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Mon Nov 25 20:47:25 UTC 2019 Modified Files: src/distrib/sets/lists/man [netbsd-9]: mi src/share/man/man4 [netbsd-9]: Makefile jme.4 mii.4 src/sys/arch/amd64/conf [netbsd-9]: ALL GENERIC src/sys/arch/i386/conf [netbsd-9]: ALL GENERIC src/sys/dev [netbsd-9]: DEVNAMES Added Files: src/share/man/man4 [netbsd-9]: jmphy.4 smscphy.4 Log Message: Pull up following revision(s) (requested by msaitoh in ticket #478): sys/dev/mii/smscphy.c: revision 1.1 sys/arch/amd64/conf/ALL: revision 1.127 sys/arch/amd64/conf/ALL: revision 1.128 sys/dev/mii/files.mii: revision 1.52 sys/dev/mii/files.mii: revision 1.53 sys/arch/i386/conf/ALL: revision 1.473 share/man/man4/mii.4: revision 1.29 sys/arch/i386/conf/ALL: revision 1.474 sys/arch/amd64/conf/GENERIC: revision 1.543 sys/arch/amd64/conf/GENERIC: revision 1.544 sys/dev/mii/jmphyreg.h: revision 1.1 share/man/man4/Makefile: revision 1.687 share/man/man4/smscphy.4: revision 1.1 share/man/man4/Makefile: revision 1.688 sys/dev/mii/jmphy.c: revision 1.1 sys/dev/DEVNAMES: revision 1.324 sys/dev/DEVNAMES: revision 1.325 distrib/sets/lists/man/mi: revision 1.1661 sys/arch/i386/conf/GENERIC: revision 1.1214 distrib/sets/lists/man/mi: revision 1.1662 sys/arch/i386/conf/GENERIC: revision 1.1215 share/man/man4/jmphy.4: revision 1.1 share/man/man4/jme.4: revision 1.8 Add jmphy(4) from OpenBSD. Add jmphy.4. Port SMSC LAN87xx 10/100 Ethernet PHY driver from FreeBSD with some cleanup and IFM_NONE support. To generate a diff of this commit: cvs rdiff -u -r1.1649.2.4 -r1.1649.2.5 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.680.2.2 -r1.680.2.3 src/share/man/man4/Makefile cvs rdiff -u -r1.7 -r1.7.8.1 src/share/man/man4/jme.4 cvs rdiff -u -r0 -r1.2.2.2 src/share/man/man4/jmphy.4 \ src/share/man/man4/smscphy.4 cvs rdiff -u -r1.27.28.1 -r1.27.28.2 src/share/man/man4/mii.4 cvs rdiff -u -r1.120.2.2 -r1.120.2.3 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.531.2.5 -r1.531.2.6 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.469.2.1 -r1.469.2.2 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1208.2.3 -r1.1208.2.4 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.321.2.1 -r1.321.2.2 src/sys/dev/DEVNAMES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Mon Nov 25 20:47:25 UTC 2019 Modified Files: src/distrib/sets/lists/man [netbsd-9]: mi src/share/man/man4 [netbsd-9]: Makefile jme.4 mii.4 src/sys/arch/amd64/conf [netbsd-9]: ALL GENERIC src/sys/arch/i386/conf [netbsd-9]: ALL GENERIC src/sys/dev [netbsd-9]: DEVNAMES Added Files: src/share/man/man4 [netbsd-9]: jmphy.4 smscphy.4 Log Message: Pull up following revision(s) (requested by msaitoh in ticket #478): sys/dev/mii/smscphy.c: revision 1.1 sys/arch/amd64/conf/ALL: revision 1.127 sys/arch/amd64/conf/ALL: revision 1.128 sys/dev/mii/files.mii: revision 1.52 sys/dev/mii/files.mii: revision 1.53 sys/arch/i386/conf/ALL: revision 1.473 share/man/man4/mii.4: revision 1.29 sys/arch/i386/conf/ALL: revision 1.474 sys/arch/amd64/conf/GENERIC: revision 1.543 sys/arch/amd64/conf/GENERIC: revision 1.544 sys/dev/mii/jmphyreg.h: revision 1.1 share/man/man4/Makefile: revision 1.687 share/man/man4/smscphy.4: revision 1.1 share/man/man4/Makefile: revision 1.688 sys/dev/mii/jmphy.c: revision 1.1 sys/dev/DEVNAMES: revision 1.324 sys/dev/DEVNAMES: revision 1.325 distrib/sets/lists/man/mi: revision 1.1661 sys/arch/i386/conf/GENERIC: revision 1.1214 distrib/sets/lists/man/mi: revision 1.1662 sys/arch/i386/conf/GENERIC: revision 1.1215 share/man/man4/jmphy.4: revision 1.1 share/man/man4/jme.4: revision 1.8 Add jmphy(4) from OpenBSD. Add jmphy.4. Port SMSC LAN87xx 10/100 Ethernet PHY driver from FreeBSD with some cleanup and IFM_NONE support. To generate a diff of this commit: cvs rdiff -u -r1.1649.2.4 -r1.1649.2.5 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.680.2.2 -r1.680.2.3 src/share/man/man4/Makefile cvs rdiff -u -r1.7 -r1.7.8.1 src/share/man/man4/jme.4 cvs rdiff -u -r0 -r1.2.2.2 src/share/man/man4/jmphy.4 \ src/share/man/man4/smscphy.4 cvs rdiff -u -r1.27.28.1 -r1.27.28.2 src/share/man/man4/mii.4 cvs rdiff -u -r1.120.2.2 -r1.120.2.3 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.531.2.5 -r1.531.2.6 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.469.2.1 -r1.469.2.2 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1208.2.3 -r1.1208.2.4 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.321.2.1 -r1.321.2.2 src/sys/dev/DEVNAMES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1649.2.4 src/distrib/sets/lists/man/mi:1.1649.2.5 --- src/distrib/sets/lists/man/mi:1.1649.2.4 Mon Nov 25 16:44:32 2019 +++ src/distrib/sets/lists/man/mi Mon Nov 25 20:47:25 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1649.2.4 2019/11/25 16:44:32 martin Exp $ +# $NetBSD: mi,v 1.1649.2.5 2019/11/25 20:47:25 martin Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1379,6 +1379,7 @@ ./usr/share/man/cat4/iy.0 man-sys-catman .cat ./usr/share/man/cat4/jme.0 man-sys-catman .cat ./usr/share/man/cat4/jmide.0 man-sys-catman .cat +./usr/share/man/cat4/jmphy.0 man-sys-catman .cat ./usr/share/man/cat4/joy.0 man-sys-catman .cat ./usr/share/man/cat4/kame_ipsec.0 man-obsolete obsolete ./usr/share/man/cat4/kcov.0 man-sys-catman .cat @@ -1709,6 +1710,7 @@ ./usr/share/man/cat4/slip.0 man-sys-catman .cat ./usr/share/man/cat4/sm.0 man-sys-catman .cat ./usr/share/man/cat4/smsc.0 man-sys-catman .cat +./usr/share/man/cat4/smscphy.0 man-sys-catman .cat ./usr/share/man/cat4/smscmon.0 man-sys-catman .cat ./usr/share/man/cat4/smsh.0 man-sys-catman .cat ./usr/share/man/cat4/sn.0 man-sys-catman .cat @@ -4518,6 +4520,7 @@ ./usr/share/man/html4/iy.html man-sys-htmlman html ./usr/share/man/html4/jme.html man-sys-htmlman html ./usr/share/man/html4/jmide.html man-sys-htmlman html +./usr/share/man/html4/jmphy.html man-sys-htmlman html ./usr/share/man/html4/joy.html man-sys-htmlman html ./usr/share/man/html4/kame_ipsec.html man-obsolete obsolete ./usr/share/man/html4/kcov.html man-sys-htmlman html @@ -4815,6 +4818,7 @@ ./usr/share/man/html4/slip.html man-sys-htmlman html ./usr/share/man/html4/sm.html man-sys-htmlman html ./usr/share/man/html4/smsc.html man-sys-htmlman html +./usr/share/man/html4/smscphy.html man-sys-htmlman html ./usr/share/man/html4/smscmon.html man-sys-htmlman html ./usr/share/man/html4/smsh.html man-sys-htmlman html ./usr/share/man/html4/sn.html man-sys-htmlman html @@ -7497,6 +7501,7 @@ ./usr/share/man/man4/iy.4 man-sys-man .man ./usr/share/man/man4/jme.4 man-sys-man .man ./usr/share/man/man4/jmide.4 man-sys-man .man +./usr/share/man/man4/jmphy.4 man-sys-man .man ./usr/share/man/man4/joy.4 man-sys-man .man ./usr/share/man/man4/kame_ipsec.4 man-obsolete obsolete
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Mon Nov 25 20:16:23 UTC 2019 Modified Files: src/sys/kern: kern_rwlock.c Log Message: Remove some unneeded memory barriers and reads of the lock word. Prodded by Mateusz Guzik. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/kern/kern_rwlock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Mon Nov 25 20:16:23 UTC 2019 Modified Files: src/sys/kern: kern_rwlock.c Log Message: Remove some unneeded memory barriers and reads of the lock word. Prodded by Mateusz Guzik. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/kern/kern_rwlock.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/kern_rwlock.c diff -u src/sys/kern/kern_rwlock.c:1.54 src/sys/kern/kern_rwlock.c:1.55 --- src/sys/kern/kern_rwlock.c:1.54 Thu May 9 05:00:31 2019 +++ src/sys/kern/kern_rwlock.c Mon Nov 25 20:16:22 2019 @@ -1,7 +1,7 @@ -/* $NetBSD: kern_rwlock.c,v 1.54 2019/05/09 05:00:31 ozaki-r Exp $ */ +/* $NetBSD: kern_rwlock.c,v 1.55 2019/11/25 20:16:22 ad Exp $ */ /*- - * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. + * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.54 2019/05/09 05:00:31 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.55 2019/11/25 20:16:22 ad Exp $"); #define __RWLOCK_PRIVATE @@ -112,6 +112,19 @@ do { \ #define RW_INHERITDEBUG(n, o) /* nothing */ #endif /* defined(LOCKDEBUG) */ +/* + * Memory barriers. + */ +#ifdef __HAVE_ATOMIC_AS_MEMBAR +#define RW_MEMBAR_ENTER() +#define RW_MEMBAR_EXIT() +#define RW_MEMBAR_PRODUCER() +#else +#define RW_MEMBAR_ENTER() membar_enter() +#define RW_MEMBAR_EXIT() membar_exit() +#define RW_MEMBAR_PRODUCER() membar_producer() +#endif + static void rw_abort(const char *, size_t, krwlock_t *, const char *); static void rw_dump(const volatile void *, lockop_printer_t); static lwp_t *rw_owner(wchan_t); @@ -321,7 +334,7 @@ rw_vector_enter(krwlock_t *rw, const krw LOCKSTAT_ENTER(lsflag); KPREEMPT_DISABLE(curlwp); - for (owner = rw->rw_owner; ;) { + for (owner = rw->rw_owner;;) { /* * Read the lock owner field. If the need-to-wait * indicator is clear, then try to acquire the lock. @@ -331,7 +344,7 @@ rw_vector_enter(krwlock_t *rw, const krw ~RW_WRITE_WANTED); if (__predict_true(next == owner)) { /* Got it! */ -membar_enter(); +RW_MEMBAR_ENTER(); break; } @@ -460,7 +473,7 @@ rw_vector_exit(krwlock_t *rw) * proceed to do direct handoff if there are waiters, and if the * lock would become unowned. */ - membar_exit(); + RW_MEMBAR_EXIT(); for (;;) { newown = (owner - decr); if ((newown & (RW_THREAD | RW_HAS_WAITERS)) == RW_HAS_WAITERS) @@ -554,13 +567,12 @@ rw_vector_tryenter(krwlock_t *rw, const } for (owner = rw->rw_owner;; owner = next) { - owner = rw->rw_owner; if (__predict_false((owner & need_wait) != 0)) return 0; next = rw_cas(rw, owner, owner + incr); if (__predict_true(next == owner)) { /* Got it! */ - membar_enter(); + RW_MEMBAR_ENTER(); break; } } @@ -576,7 +588,8 @@ rw_vector_tryenter(krwlock_t *rw, const /* * rw_downgrade: * - * Downgrade a write lock to a read lock. + * Downgrade a write lock to a read lock. Optimise memory accesses for + * the uncontended case. */ void rw_downgrade(krwlock_t *rw) @@ -594,24 +607,20 @@ rw_downgrade(krwlock_t *rw) __USE(curthread); #endif - - membar_producer(); - owner = rw->rw_owner; - if ((owner & RW_HAS_WAITERS) == 0) { - /* - * There are no waiters, so we can do this the easy way. - * Try swapping us down to one read hold. If it fails, the - * lock condition has changed and we most likely now have - * waiters. - */ - next = rw_cas(rw, owner, RW_READ_INCR); - if (__predict_true(next == owner)) { - RW_LOCKED(rw, RW_READER); - RW_DASSERT(rw, (rw->rw_owner & RW_WRITE_LOCKED) == 0); - RW_DASSERT(rw, RW_COUNT(rw) != 0); - return; - } - owner = next; + /* + * If there are no waiters, so we can do this the easy way. + * Try swapping us down to one read hold. If it fails, the + * lock condition has changed and we most likely now have + * waiters. + */ + RW_MEMBAR_PRODUCER(); + owner = curthread | RW_WRITE_LOCKED; + next = rw_cas(rw, owner, RW_READ_INCR); + if (__predict_true(next == owner)) { + RW_LOCKED(rw, RW_READER); + RW_DASSERT(rw, (rw->rw_owner & RW_WRITE_LOCKED) == 0); + RW_DASSERT(rw, RW_COUNT(rw) != 0); + return; } /* @@ -619,7 +628,8 @@ rw_downgrade(krwlock_t *rw) * on the sleep queue. Once we have that, we can adjust the * waiter bits. */ - for (;; owner = next) { + for (;;) { + owner = next; ts = turnstile_lookup(rw); RW_DASSERT(rw, ts != NULL); @@ -670,8 +680,8 @@ rw_downgrade(krwlock_t *rw) /* * rw_tryupgrade: * - * Try to upgrade a read lock to a write lock. We must be the - * only reader. + * Try to upgrade a read lock to a write lock. We must be the only + * reader. Optimise
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Mon Nov 25 17:24:59 UTC 2019 Modified Files: src/sys/kern: kern_softint.c Log Message: port-sparc/54718 (sparc install hangs since recent scheduler changes) To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/kern/kern_softint.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/kern_softint.c diff -u src/sys/kern/kern_softint.c:1.50 src/sys/kern/kern_softint.c:1.51 --- src/sys/kern/kern_softint.c:1.50 Sat Nov 23 19:42:52 2019 +++ src/sys/kern/kern_softint.c Mon Nov 25 17:24:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_softint.c,v 1.50 2019/11/23 19:42:52 ad Exp $ */ +/* $NetBSD: kern_softint.c,v 1.51 2019/11/25 17:24:59 ad Exp $ */ /*- * Copyright (c) 2007, 2008, 2019 The NetBSD Foundation, Inc. @@ -170,7 +170,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.50 2019/11/23 19:42:52 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.51 2019/11/25 17:24:59 ad Exp $"); #include #include @@ -689,14 +689,14 @@ softint_trigger(uintptr_t machdep) struct cpu_info *ci; lwp_t *l; - l = curlwp; - ci = l->l_cpu; + ci = curcpu(); ci->ci_data.cpu_softints |= machdep; + l = ci->ci_data.cpu_onproc; if (l == ci->ci_data.cpu_idlelwp) { atomic_or_uint(>ci_want_resched, RESCHED_UPREEMPT); } else { /* MI equivalent of aston() */ - lwp_need_userret(l); + cpu_signotify(l); } }
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Mon Nov 25 17:24:59 UTC 2019 Modified Files: src/sys/kern: kern_softint.c Log Message: port-sparc/54718 (sparc install hangs since recent scheduler changes) To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/kern/kern_softint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 17:03:50 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Tickets #470, #472 - #481 To generate a diff of this commit: cvs rdiff -u -r1.1.2.117 -r1.1.2.118 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.0 diff -u src/doc/CHANGES-9.0:1.1.2.117 src/doc/CHANGES-9.0:1.1.2.118 --- src/doc/CHANGES-9.0:1.1.2.117 Mon Nov 25 05:52:54 2019 +++ src/doc/CHANGES-9.0 Mon Nov 25 17:03:50 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.0,v 1.1.2.117 2019/11/25 05:52:54 msaitoh Exp $ +# $NetBSD: CHANGES-9.0,v 1.1.2.118 2019/11/25 17:03:50 martin Exp $ A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30 until the 9.0 release: @@ -6308,3 +6308,124 @@ distrib/notes/x68k/contents 1.21 - Adapt to cdn/nycdn and our current auto-build conventions. - Automate where possible. [martin, ticket #471] + +sys/arch/arm/dts/sun50i-a64-pinebook.dts1.17 +sys/arch/arm/sunxi/sun50i_a64_ccu.c 1.16-1.20 +sys/arch/arm/sunxi/sunxi_ccu.h 1.22 +sys/arch/arm/sunxi/sunxi_ccu_fractional.c 1.5,1.6 +sys/arch/arm/sunxi/sunxi_dwhdmi.c 1.5-1.8 +sys/arch/arm/sunxi/sunxi_hdmiphy.c 1.3,1.4 +sys/arch/arm/sunxi/sunxi_hdmiphy.h 1.2 +sys/arch/arm/sunxi/sunxi_lcdc.c 1.7 +sys/arch/arm/sunxi/sunxi_mixer.c1.8-1.10 +sys/arch/arm/sunxi/sunxi_platform.c 1.38 +sys/dev/fdt/fdt_port.c 1.3,1.4 +sys/dev/ic/dw_hdmi.c1.5,1.6 +sys/dev/ic/dw_hdmi.h1.5 + +Add Pinebook HDMI support. + [jmcneill, ticket #470] + +sys/arch/arm/sunxi/sunxi_drm.c 1.9 + + Reclaim bootloader FB memory for CMA pool. + [jmcneill, ticket #472] + +sys/dev/mii/miidevs1.155-1.157,1.159,1.160 +sys/dev/mii/rlphy.c1.37 +sys/dev/mii/miidevs.h(regen) +sys/dev/mii/miidevs_data.h (regen) + + - miidevs update: + - Add Teranetics, Aquantia and Renesas. + - Change ICPLUS(0x0090c3) to xxICPLUS(0x0009c3). + - Fix typo in comment. from vezhlys. + - Rename JMICRON 0x0021 from JMC250 to JMP211 + - Rename JMICRON 0x0022 from JMC260 to JMP202 + - rlphy(4): Print model name if it's ICPLUS IP101 to avoid printing + "Realtek internal PHY". + [msaitoh, ticket #473] + +sys/dev/usb/if_upl.c1.68 + + Make it compilable with UPL_DEBUG. + [msaitoh, ticket #474] + +sys/dev/nvmm/x86/nvmm_x86_svm.c 1.54 +sys/dev/nvmm/x86/nvmm_x86_vmx.c 1.45 +tests/lib/libnvmm/h_mem_assist.c 1.18 + + Hide XSAVES-specific stuff and the masked extended states. + Several improvements. In particular, reduce CS.limit, because + Intel CPUs perform strict sanity checks, and the previous (too high) + limit caused the VM entry to fail. + [maxv, ticket #475] + +distrib/sets/lists/man/mi 1.1656 +share/man/man4/Makefile1.684 +share/man/man4/ipgphy.41.1,1.2 +share/man/man4/mii.41.28 +share/man/man4/vge.41.8,1.9 +sys/arch/amd64/conf/ALL1.124 +sys/arch/amd64/conf/GENERIC 1.537 +sys/arch/i386/conf/ALL1.471 +sys/arch/i386/conf/GENERIC 1.1211 +sys/dev/DEVNAMES1.322 +sys/dev/mii/files.mii1.51 +sys/dev/mii/ipgphy.c1.1.1.5 +sys/dev/mii/ipgphyreg.h1.1-1.3 +sys/dev/pci/if_stge.c1.71 +sys/dev/pci/if_stgereg.h 1.6 + + Add support IC Plus IP1000* PHYs. PR/kern 42314 first reported by + Tomokazu HARADA and patch provided by Andrius V. + [msaitoh, ticket #476] + +sys/dev/pci/if_vge.c1.76,1.77 + + - Fixes a bug that "ifmedia vge0 media 1000baseT-FDX" causes device + time out. + - When the link is up, set VGE_DIAGCTL not from user media setting + but from the current active link status. + [msaitoh, ticket #477] + +distrib/sets/lists/man/mi 1.1661,1.1662 +share/man/man4/Makefile1.687,1.688 +share/man/man4/jme.41.8 +share/man/man4/jmphy.41.1 +share/man/man4/mii.41.29 +share/man/man4/smscphy.4 1.1 +sys/arch/amd64/conf/ALL1.127,1.128 +sys/arch/amd64/conf/GENERIC 1.543,1.544 +sys/arch/i386/conf/ALL1.473,1.474 +sys/arch/i386/conf/GENERIC 1.1214,1.1215 +sys/dev/DEVNAMES1.324,1.325 +sys/dev/mii/files.mii1.52,1.53 +sys/dev/mii/jmphy.c1.1 +sys/dev/mii/jmphyreg.h1.1 +sys/dev/mii/smscphy.c1.1 + + - Add jmphy(4) from OpenBSD. + - Port SMSC LAN87xx 10/100 Ethernet PHY driver from FreeBSD with + some cleanup and IFM_NONE support. + [msaitoh, ticket #478] + +share/man/man4/micphy.41.3 +sys/dev/mii/micphy.c1.9 +sys/dev/mii/miidevs1.161 + + Add support for KSZ80[0456]1, KSZ8721, KSZ9[01]31, KS8731 and KSZ9477. + It also supports LAN7430's internal PHY. + [msaitoh, ticket #479] + +sys/dev/hyperv/hvs.c1.3 +sys/dev/hyperv/if_hvn.c1.10 + + hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). + [nonaka, ticket #480] + +sys/kern/subr_cprng.c1.33 + + Use
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 17:03:50 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Tickets #470, #472 - #481 To generate a diff of this commit: cvs rdiff -u -r1.1.2.117 -r1.1.2.118 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 17:00:22 UTC 2019 Modified Files: src/sys/kern [netbsd-9]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #481): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.30.2.1 -r1.30.2.2 src/sys/kern/subr_cprng.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/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.30.2.1 src/sys/kern/subr_cprng.c:1.30.2.2 --- src/sys/kern/subr_cprng.c:1.30.2.1 Tue Sep 3 07:48:00 2019 +++ src/sys/kern/subr_cprng.c Mon Nov 25 17:00:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.30.2.1 2019/09/03 07:48:00 martin Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.30.2.2 2019/11/25 17:00:22 martin Exp $ */ /*- * Copyright (c) 2011-2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.30.2.1 2019/09/03 07:48:00 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.30.2.2 2019/11/25 17:00:22 martin Exp $"); #include #include @@ -539,6 +539,7 @@ cprng_strong_rndsink_callback(void *cont mutex_exit(>cs_lock); } +static ONCE_DECL(sysctl_prng_once); static cprng_strong_t *sysctl_prng; static int @@ -558,10 +559,9 @@ makeprng(void) static int sysctl_kern_urnd(SYSCTLFN_ARGS) { - static ONCE_DECL(control); int v, rv; - RUN_ONCE(, makeprng); + RUN_ONCE(_prng_once, makeprng); rv = cprng_strong(sysctl_prng, , sizeof(v), 0); if (rv == sizeof(v)) { struct sysctlnode node = *rnode; @@ -590,6 +590,7 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) int error; void *v; struct sysctlnode node = *rnode; + size_t n __diagused; switch (*oldlenp) { case 0: @@ -598,8 +599,10 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) if (*oldlenp > 256) { return E2BIG; } + RUN_ONCE(_prng_once, makeprng); v = kmem_alloc(*oldlenp, KM_SLEEP); - cprng_fast(v, *oldlenp); + n = cprng_strong(sysctl_prng, v, *oldlenp, 0); + KASSERT(n == *oldlenp); node.sysctl_data = v; node.sysctl_size = *oldlenp; error = sysctl_lookup(SYSCTLFN_CALL());
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 17:00:22 UTC 2019 Modified Files: src/sys/kern [netbsd-9]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #481): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.30.2.1 -r1.30.2.2 src/sys/kern/subr_cprng.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Mon Nov 25 16:58:55 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvs.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #480): sys/dev/hyperv/hvs.c: revision 1.3 sys/dev/hyperv/if_hvn.c: revision 1.10 hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.8.1 src/sys/dev/hyperv/hvs.c cvs rdiff -u -r1.4.2.3 -r1.4.2.4 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Mon Nov 25 16:58:55 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-9]: hvs.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #480): sys/dev/hyperv/hvs.c: revision 1.3 sys/dev/hyperv/if_hvn.c: revision 1.10 hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.8.1 src/sys/dev/hyperv/hvs.c cvs rdiff -u -r1.4.2.3 -r1.4.2.4 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/hvs.c diff -u src/sys/dev/hyperv/hvs.c:1.1 src/sys/dev/hyperv/hvs.c:1.1.8.1 --- src/sys/dev/hyperv/hvs.c:1.1 Fri Feb 15 08:54:01 2019 +++ src/sys/dev/hyperv/hvs.c Mon Nov 25 16:58:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hvs.c,v 1.1 2019/02/15 08:54:01 nonaka Exp $ */ +/* $NetBSD: hvs.c,v 1.1.8.1 2019/11/25 16:58:54 martin Exp $ */ /* $OpenBSD: hvs.c,v 1.17 2017/08/10 17:22:48 mikeb Exp $ */ /*- @@ -37,7 +37,7 @@ /* #define HVS_DEBUG_IO */ #include -__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.1 2019/02/15 08:54:01 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.1.8.1 2019/11/25 16:58:54 martin Exp $"); #include #include @@ -1095,7 +1095,8 @@ hvs_free_ccbs(struct hvs_softc *sc) if (ccb->ccb_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, + 0, ccb->ccb_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ccb->ccb_dmap); bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmap); Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.4.2.3 src/sys/dev/hyperv/if_hvn.c:1.4.2.4 --- src/sys/dev/hyperv/if_hvn.c:1.4.2.3 Sun Nov 24 08:13:07 2019 +++ src/sys/dev/hyperv/if_hvn.c Mon Nov 25 16:58:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $ */ +/* $NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -632,7 +632,8 @@ hvn_decap(struct hvn_softc *sc, struct h { struct ifnet *ifp = SC2IFP(sc); - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); txd->txd_buf = NULL; @@ -667,7 +668,8 @@ hvn_txeof(struct hvn_softc *sc, uint64_t } txd->txd_buf = NULL; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); m_freem(m); @@ -844,7 +846,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc txd = >sc_tx_desc[i]; if (txd->txd_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); bus_dmamap_destroy(sc->sc_dmat, txd->txd_dmap); @@ -855,7 +858,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc txd->txd_buf = NULL; } if (sc->sc_tx_rmap) { - bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, sc->sc_tx_rmap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_tx_rmap);
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: tkusumi Date: Mon Nov 25 16:57:09 UTC 2019 Modified Files: src/usr.sbin/autofs: automountd.8 Log Message: autofs: Add missing description for automountd option -T To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/autofs/automountd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: tkusumi Date: Mon Nov 25 16:57:09 UTC 2019 Modified Files: src/usr.sbin/autofs: automountd.8 Log Message: autofs: Add missing description for automountd option -T To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/autofs/automountd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/automountd.8 diff -u src/usr.sbin/autofs/automountd.8:1.4 src/usr.sbin/autofs/automountd.8:1.5 --- src/usr.sbin/autofs/automountd.8:1.4 Thu Nov 21 15:24:17 2019 +++ src/usr.sbin/autofs/automountd.8 Mon Nov 25 16:57:09 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: automountd.8,v 1.4 2019/11/21 15:24:17 tkusumi Exp $ +.\" $NetBSD: automountd.8,v 1.5 2019/11/25 16:57:09 tkusumi Exp $ .\" .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 25, 2017 +.Dd November 26, 2019 .Dt AUTOMOUNTD 8 .Os .Sh NAME @@ -85,6 +85,9 @@ The default is 30. Specify mount options. Options specified here will be overridden by options entered in maps or .Xr auto_master 5 . +.It Fl T +Increase verbosity. +For compatibility with other implementations, such as OS X. .It Fl v Increase verbosity. .El
CVS commit: [netbsd-9] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 16:55:09 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-9]: miidevs.h miidevs_data.h Log Message: Regen for ticket 479 To generate a diff of this commit: cvs rdiff -u -r1.151.2.4 -r1.151.2.5 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.139.2.4 -r1.139.2.5 src/sys/dev/mii/miidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 16:55:09 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-9]: miidevs.h miidevs_data.h Log Message: Regen for ticket 479 To generate a diff of this commit: cvs rdiff -u -r1.151.2.4 -r1.151.2.5 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.139.2.4 -r1.139.2.5 src/sys/dev/mii/miidevs_data.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/mii/miidevs.h diff -u src/sys/dev/mii/miidevs.h:1.151.2.4 src/sys/dev/mii/miidevs.h:1.151.2.5 --- src/sys/dev/mii/miidevs.h:1.151.2.4 Mon Nov 25 16:53:55 2019 +++ src/sys/dev/mii/miidevs.h Mon Nov 25 16:55:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: miidevs.h,v 1.151.2.4 2019/11/25 16:53:55 martin Exp $ */ +/* $NetBSD: miidevs.h,v 1.151.2.5 2019/11/25 16:55:09 martin Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. Index: src/sys/dev/mii/miidevs_data.h diff -u src/sys/dev/mii/miidevs_data.h:1.139.2.4 src/sys/dev/mii/miidevs_data.h:1.139.2.5 --- src/sys/dev/mii/miidevs_data.h:1.139.2.4 Mon Nov 25 16:53:55 2019 +++ src/sys/dev/mii/miidevs_data.h Mon Nov 25 16:55:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: miidevs_data.h,v 1.139.2.4 2019/11/25 16:53:55 martin Exp $ */ +/* $NetBSD: miidevs_data.h,v 1.139.2.5 2019/11/25 16:55:09 martin Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
CVS commit: [netbsd-9] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 16:53:55 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-9]: files.mii miidevs.h miidevs_data.h Added Files: src/sys/dev/mii [netbsd-9]: jmphy.c jmphyreg.h smscphy.c Log Message: Regen for ticket 479 To generate a diff of this commit: cvs rdiff -u -r1.50.26.1 -r1.50.26.2 src/sys/dev/mii/files.mii cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/mii/jmphy.c src/sys/dev/mii/jmphyreg.h \ src/sys/dev/mii/smscphy.c cvs rdiff -u -r1.151.2.3 -r1.151.2.4 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.139.2.3 -r1.139.2.4 src/sys/dev/mii/miidevs_data.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/mii/files.mii diff -u src/sys/dev/mii/files.mii:1.50.26.1 src/sys/dev/mii/files.mii:1.50.26.2 --- src/sys/dev/mii/files.mii:1.50.26.1 Mon Nov 25 16:44:31 2019 +++ src/sys/dev/mii/files.mii Mon Nov 25 16:53:55 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.mii,v 1.50.26.1 2019/11/25 16:44:31 martin Exp $ +# $NetBSD: files.mii,v 1.50.26.2 2019/11/25 16:53:55 martin Exp $ defflag opt_mii.h MIIVERBOSE @@ -103,6 +103,10 @@ device ipgphy: mii_phy attach ipgphy at mii file dev/mii/ipgphy.c ipgphy +device jmphy: mii_phy +attach jmphy at mii +file dev/mii/jmphy.cjmphy + device sqphy: mii_phy attach sqphy at mii file dev/mii/sqphy.csqphy @@ -162,3 +166,7 @@ file dev/mii/rdcphy.c rdcphy device micphy: mii_phy, ukphy_subr attach micphy at mii file dev/mii/micphy.c micphy + +device smscphy: mii_phy +attach smscphy at mii +file dev/mii/smscphy.c smscphy Index: src/sys/dev/mii/miidevs.h diff -u src/sys/dev/mii/miidevs.h:1.151.2.3 src/sys/dev/mii/miidevs.h:1.151.2.4 --- src/sys/dev/mii/miidevs.h:1.151.2.3 Mon Nov 25 16:26:31 2019 +++ src/sys/dev/mii/miidevs.h Mon Nov 25 16:53:55 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs.h,v 1.151.2.3 2019/11/25 16:26:31 martin Exp $ */ +/* $NetBSD: miidevs.h,v 1.151.2.4 2019/11/25 16:53:55 martin Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.153.2.3 2019/11/25 16:26:00 martin Exp + * NetBSD: miidevs,v 1.153.2.4 2019/11/25 16:53:29 martin Exp */ /*- @@ -494,13 +494,27 @@ #define MII_MODEL_MARVELL_E 0x000c #define MII_STR_MARVELL_E "Marvell 88E Gigabit PHY" -/* Micrel PHYs */ +/* Micrel PHYs (Kendin and Microchip) */ +#define MII_MODEL_MICREL_KSZ8041 0x0011 +#define MII_STR_MICREL_KSZ8041 "Micrel KSZ8041TL/FTL/MLL 10/100 PHY" +#define MII_MODEL_MICREL_KSZ8041RNLI 0x0013 +#define MII_STR_MICREL_KSZ8041RNLI "Micrel KSZ8041RNLI 10/100 PHY" +#define MII_MODEL_MICREL_KSZ8051 0x0015 +#define MII_STR_MICREL_KSZ8051 "Micrel KSZ80[235]1 10/100 PHY" #define MII_MODEL_MICREL_KSZ8081 0x0016 -#define MII_STR_MICREL_KSZ8081 "Micrel KSZ8081 10/100 PHY" -#define MII_MODEL_MICREL_KSZ9021RNI 0x0021 -#define MII_STR_MICREL_KSZ9021RNI "Micrel KSZ9021RNI 10/100/1000 PHY" +#define MII_STR_MICREL_KSZ8081 "Micrel KSZ80[89]1 10/100 PHY" +#define MII_MODEL_MICREL_KSZ8061 0x0017 +#define MII_STR_MICREL_KSZ8061 "Micrel KSZ8061 10/100 PHY" +#define MII_MODEL_MICREL_KSZ9021_8001_8721 0x0021 +#define MII_STR_MICREL_KSZ9021_8001_8721 "Micrel KSZ9021 Gb & KSZ8001/8721 10/100 PHY" #define MII_MODEL_MICREL_KSZ9031 0x0022 #define MII_STR_MICREL_KSZ9031 "Micrel KSZ9031 10/100/1000 PHY" +#define MII_MODEL_MICREL_KSZ9477 0x0023 +#define MII_STR_MICREL_KSZ9477 "Micrel KSZ9477 10/100/1000 PHY" +#define MII_MODEL_MICREL_KSZ9131 0x0024 +#define MII_STR_MICREL_KSZ9131 "Micrel KSZ9131 10/100/1000 PHY" +#define MII_MODEL_MICREL_KS8737 0x0032 +#define MII_STR_MICREL_KS8737 "Micrel KS8737 10/100 PHY" /* Myson Technology PHYs */ #define MII_MODEL_xxMYSON_MTD972 0x Index: src/sys/dev/mii/miidevs_data.h diff -u src/sys/dev/mii/miidevs_data.h:1.139.2.3 src/sys/dev/mii/miidevs_data.h:1.139.2.4 --- src/sys/dev/mii/miidevs_data.h:1.139.2.3 Mon Nov 25 16:26:31 2019 +++ src/sys/dev/mii/miidevs_data.h Mon Nov 25 16:53:55 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs_data.h,v 1.139.2.3 2019/11/25 16:26:31 martin Exp $ */ +/* $NetBSD: miidevs_data.h,v 1.139.2.4 2019/11/25 16:53:55 martin Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.153.2.3 2019/11/25 16:26:00 martin Exp + * NetBSD: miidevs,v 1.153.2.4 2019/11/25 16:53:29 martin Exp */ /*- @@ -204,9 +204,16 @@ struct mii_knowndev mii_knowndevs[] = { { MII_OUI_MARVELL, MII_MODEL_MARVELL_E1000_5, MII_STR_MARVELL_E1000_5 }, { MII_OUI_MARVELL, MII_MODEL_MARVELL_E1000_6, MII_STR_MARVELL_E1000_6 }, { MII_OUI_MARVELL, MII_MODEL_MARVELL_E, MII_STR_MARVELL_E }, + { MII_OUI_MICREL, MII_MODEL_MICREL_KSZ8041, MII_STR_MICREL_KSZ8041 }, + { MII_OUI_MICREL, MII_MODEL_MICREL_KSZ8041RNLI, MII_STR_MICREL_KSZ8041RNLI }, + { MII_OUI_MICREL, MII_MODEL_MICREL_KSZ8051, MII_STR_MICREL_KSZ8051 }, { MII_OUI_MICREL, MII_MODEL_MICREL_KSZ8081,
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Mon Nov 25 16:53:29 UTC 2019 Modified Files: src/share/man/man4 [netbsd-9]: micphy.4 src/sys/dev/mii [netbsd-9]: micphy.c miidevs Log Message: Pull up following revision(s) (requested by msaitoh in ticket #479): sys/dev/mii/micphy.c: revision 1.9 sys/dev/mii/miidevs: revision 1.161 share/man/man4/micphy.4: revision 1.3 Add Micrel (now Microchip) KSZ80[0456]1, KSZ8721, KSZ9[01]31, KS8731 and KSZ9477. Add support for KSZ80[0456]1, KSZ8721, KSZ9[01]31, KS8731 and KSZ9477. It also supports LAN7430's internal PHY. First wrote by nisimura@ and added some device support by me. Not tested well. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.32.1 src/share/man/man4/micphy.4 cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/dev/mii/micphy.c cvs rdiff -u -r1.153.2.3 -r1.153.2.4 src/sys/dev/mii/miidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 16:53:55 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-9]: files.mii miidevs.h miidevs_data.h Added Files: src/sys/dev/mii [netbsd-9]: jmphy.c jmphyreg.h smscphy.c Log Message: Regen for ticket 479 To generate a diff of this commit: cvs rdiff -u -r1.50.26.1 -r1.50.26.2 src/sys/dev/mii/files.mii cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/mii/jmphy.c src/sys/dev/mii/jmphyreg.h \ src/sys/dev/mii/smscphy.c cvs rdiff -u -r1.151.2.3 -r1.151.2.4 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.139.2.3 -r1.139.2.4 src/sys/dev/mii/miidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Mon Nov 25 16:53:29 UTC 2019 Modified Files: src/share/man/man4 [netbsd-9]: micphy.4 src/sys/dev/mii [netbsd-9]: micphy.c miidevs Log Message: Pull up following revision(s) (requested by msaitoh in ticket #479): sys/dev/mii/micphy.c: revision 1.9 sys/dev/mii/miidevs: revision 1.161 share/man/man4/micphy.4: revision 1.3 Add Micrel (now Microchip) KSZ80[0456]1, KSZ8721, KSZ9[01]31, KS8731 and KSZ9477. Add support for KSZ80[0456]1, KSZ8721, KSZ9[01]31, KS8731 and KSZ9477. It also supports LAN7430's internal PHY. First wrote by nisimura@ and added some device support by me. Not tested well. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.32.1 src/share/man/man4/micphy.4 cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/dev/mii/micphy.c cvs rdiff -u -r1.153.2.3 -r1.153.2.4 src/sys/dev/mii/miidevs 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/micphy.4 diff -u src/share/man/man4/micphy.4:1.2 src/share/man/man4/micphy.4:1.2.32.1 --- src/share/man/man4/micphy.4:1.2 Mon Mar 3 09:10:46 2014 +++ src/share/man/man4/micphy.4 Mon Nov 25 16:53:29 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: micphy.4,v 1.2 2014/03/03 09:10:46 wiz Exp $ +.\" $NetBSD: micphy.4,v 1.2.32.1 2019/11/25 16:53:29 martin Exp $ .\" .\" Copyright (c) 2014 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -15,18 +15,20 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd March 3, 2014 +.Dd November 6, 2019 .Dt MICPHY 4 .Os .Sh NAME .Nm micphy -.Nd Micrel KSZ9021 10/100/1000 PHY driver +.Nd Micrel KSZ8xxx 10/100 and KSZ9xxx 10/100/1000 PHY driver .Sh SYNOPSIS .Cd "micphy* at mii? phy ?" .Sh DESCRIPTION The .Nm -driver currently supports only Micrel KSZ9021RN PHY. +driver currently supports KSZ80[2345689]1, KSZ87[23]x, KSZ90[23]1, KSZ9131 and +KSZ9477. +It also supports LAN7430's internal PHY. The driver has a fixup for .Xr evbarm/cpsw 4 which requires Gig-E PHYs to adjust RGMII signal timing. Index: src/sys/dev/mii/micphy.c diff -u src/sys/dev/mii/micphy.c:1.8 src/sys/dev/mii/micphy.c:1.8.4.1 --- src/sys/dev/mii/micphy.c:1.8 Mon Mar 25 07:34:13 2019 +++ src/sys/dev/mii/micphy.c Mon Nov 25 16:53:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: micphy.c,v 1.8 2019/03/25 07:34:13 msaitoh Exp $ */ +/* $NetBSD: micphy.c,v 1.8.4.1 2019/11/25 16:53:29 martin Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -55,11 +55,11 @@ */ /* - * Driver for Micrel KSZ9021RN PHYs + * Driver for Micrel KSZ8xxx 10/100 and KSZ9xxx 10/100/1000 PHY. */ #include -__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.8 2019/03/25 07:34:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.8.4.1 2019/11/25 16:53:29 martin Exp $"); #include "opt_mii.h" @@ -87,19 +87,98 @@ CFATTACH_DECL3_NEW(micphy, sizeof(struct DVF_DETACH_SHUTDOWN); static int micphy_service(struct mii_softc *, struct mii_data *, int); +static void micphy_status(struct mii_softc *); static void micphy_fixup(struct mii_softc *, int, int, device_t); static const struct mii_phy_funcs micphy_funcs = { - micphy_service, ukphy_status, micphy_reset, + micphy_service, micphy_status, micphy_reset, +}; + +struct micphy_softc { + struct mii_softc sc_mii; + uint32_t sc_lstype; /* Type of link status register */ }; static const struct mii_phydesc micphys[] = { - MII_PHY_DESC(MICREL, KSZ8081), - MII_PHY_DESC(MICREL, KSZ9021RNI), + MII_PHY_DESC(MICREL, KSZ8041), + MII_PHY_DESC(MICREL, KSZ8051), /* +8021,8031 */ + MII_PHY_DESC(MICREL, KSZ8061), + MII_PHY_DESC(MICREL, KSZ8081), /* +8051,8091 */ + MII_PHY_DESC(MICREL, KS8737), + MII_PHY_DESC(MICREL, KSZ9021_8001_8721), + MII_PHY_DESC(MICREL, KSZ9031), + MII_PHY_DESC(MICREL, KSZ9131), + MII_PHY_DESC(MICREL, KSZ9477), /* +LAN7430internal */ MII_PHY_END, }; -#define MII_KSZ8081_PHYCTL2 0x1f +/* + * Model Rev. Media LSTYPE Devices + * + * 0x11 1001F_42 KSZ8041 + * 0x13 1001F_42? KSZ8041RNLI + * 0x15 ? 1001E_20 KSZ8051 + * 0x5 1001E_20 KSZ8021 + * 0x6 1001E_20 KSZ8031 + * 0x16 ? 1001E_20 KSZ8081 + * ? 1001E_20 KSZ8091 + * 0x17 1001E_20 KSZ8061 + * 0x21 0x0 giga GIGA KSZ9021 + * 0x1 giga GIGA KSZ9021RLRN + * 0x9 1001F_42 KSZ8721BL/SL + * 0x9 100none? KSZ8721CL + * 0xa 1001F_42 KSZ8001 + * 0x22 giga GIGA KSZ9031 + * 0x23 1? gigasw GIGA KSZ9477 (No master/slave bit) + * 5? giga GIGA LAN7430internal + * 0x24 giga GIGA KSZ9131 + * 0x32 1001F_42 KS8737 + */ + +/* Type of link status register */ +#define MICPHYF_LSTYPE_DEFAULT 0 +#define MICPHYF_LSTYPE_1F_42 1 +#define MICPHYF_LSTYPE_1E_20 2 +#define MICPHYF_LSTYPE_GIGA 3 + +/* Return if the
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Mon Nov 25 16:47:16 UTC 2019 Modified Files: src/sys/dev/pci [netbsd-9]: if_vge.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #477): sys/dev/pci/if_vge.c: revision 1.76 sys/dev/pci/if_vge.c: revision 1.77 Fixes a bug that "ifmedia vge0 media 1000baseT-FDX" causes device timeout. If the interface's media is NOT in the "best" mode (i.e. other than IFM_AUTO), control VGE_DIAGCTL_GMII bit. - Set duplex correctly when user setting is not IFM_AUTO. - When the link is up, set VGE_DIAGCTL not from user media setting but from the current active link status. To generate a diff of this commit: cvs rdiff -u -r1.73.2.1 -r1.73.2.2 src/sys/dev/pci/if_vge.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_vge.c diff -u src/sys/dev/pci/if_vge.c:1.73.2.1 src/sys/dev/pci/if_vge.c:1.73.2.2 --- src/sys/dev/pci/if_vge.c:1.73.2.1 Thu Oct 17 18:58:33 2019 +++ src/sys/dev/pci/if_vge.c Mon Nov 25 16:47:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vge.c,v 1.73.2.1 2019/10/17 18:58:33 martin Exp $ */ +/* $NetBSD: if_vge.c,v 1.73.2.2 2019/11/25 16:47:16 martin Exp $ */ /*- * Copyright (c) 2004 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.73.2.1 2019/10/17 18:58:33 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.73.2.2 2019/11/25 16:47:16 martin Exp $"); /* * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver. @@ -1916,6 +1916,7 @@ vge_miibus_statchg(struct ifnet *ifp) struct vge_softc *sc = ifp->if_softc; struct mii_data *mii = >sc_mii; struct ifmedia_entry *ife = mii->mii_media.ifm_cur; + uint8_t dctl; /* * If the user manually selects a media mode, we need to turn @@ -1927,31 +1928,37 @@ vge_miibus_statchg(struct ifnet *ifp) * always implied, so we turn on the forced mode bit but leave * the FDX bit cleared. */ + dctl = CSR_READ_1(sc, VGE_DIAGCTL); - switch (IFM_SUBTYPE(ife->ifm_media)) { - case IFM_AUTO: - CSR_CLRBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_MACFORCE); - CSR_CLRBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_FDXFORCE); - break; - case IFM_1000_T: - CSR_SETBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_MACFORCE); - CSR_CLRBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_FDXFORCE); - break; - case IFM_100_TX: - case IFM_10_T: - CSR_SETBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_MACFORCE); - if ((ife->ifm_media & IFM_FDX) != 0) { - CSR_SETBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_FDXFORCE); - } else { - CSR_CLRBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_FDXFORCE); - } - break; - default: - printf("%s: unknown media type: %x\n", - device_xname(sc->sc_dev), - IFM_SUBTYPE(ife->ifm_media)); - break; + if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) { + dctl &= ~VGE_DIAGCTL_MACFORCE; + dctl &= ~VGE_DIAGCTL_FDXFORCE; + } else { + u_int ifmword; + + /* If the link is up, use the current active media. */ + if ((mii->mii_media_status & IFM_ACTIVE) != 0) + ifmword = mii->mii_media_active; + else + ifmword = ife->ifm_media; + + dctl |= VGE_DIAGCTL_MACFORCE; + if ((ifmword & IFM_FDX) != 0) + dctl |= VGE_DIAGCTL_FDXFORCE; + else + dctl &= ~VGE_DIAGCTL_FDXFORCE; + + if (IFM_SUBTYPE(ifmword) == IFM_1000_T) { + /* + * It means the user setting is not auto but it's + * 1000baseT-FDX or 1000baseT. + */ + dctl |= VGE_DIAGCTL_GMII; + } else + dctl &= ~VGE_DIAGCTL_GMII; } + + CSR_WRITE_1(sc, VGE_DIAGCTL, dctl); } static int
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Mon Nov 25 16:47:16 UTC 2019 Modified Files: src/sys/dev/pci [netbsd-9]: if_vge.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #477): sys/dev/pci/if_vge.c: revision 1.76 sys/dev/pci/if_vge.c: revision 1.77 Fixes a bug that "ifmedia vge0 media 1000baseT-FDX" causes device timeout. If the interface's media is NOT in the "best" mode (i.e. other than IFM_AUTO), control VGE_DIAGCTL_GMII bit. - Set duplex correctly when user setting is not IFM_AUTO. - When the link is up, set VGE_DIAGCTL not from user media setting but from the current active link status. To generate a diff of this commit: cvs rdiff -u -r1.73.2.1 -r1.73.2.2 src/sys/dev/pci/if_vge.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Mon Nov 25 16:44:32 UTC 2019 Modified Files: src/distrib/sets/lists/man [netbsd-9]: mi src/share/man/man4 [netbsd-9]: Makefile mii.4 vge.4 src/sys/arch/amd64/conf [netbsd-9]: ALL GENERIC src/sys/arch/i386/conf [netbsd-9]: ALL GENERIC src/sys/dev [netbsd-9]: DEVNAMES src/sys/dev/mii [netbsd-9]: files.mii src/sys/dev/pci [netbsd-9]: if_stge.c if_stgereg.h Added Files: src/share/man/man4 [netbsd-9]: ipgphy.4 src/sys/dev/mii [netbsd-9]: ipgphy.c ipgphyreg.h Log Message: Pull up following revision(s) (requested by msaitoh in ticket #476): sys/dev/pci/if_stgereg.h: revision 1.6 sys/arch/amd64/conf/ALL: revision 1.124 sys/dev/mii/files.mii: revision 1.51 share/man/man4/vge.4: revision 1.8 share/man/man4/vge.4: revision 1.9 distrib/sets/lists/man/mi: revision 1.1656 sys/arch/i386/conf/ALL: revision 1.471 share/man/man4/mii.4: revision 1.28 sys/dev/pci/if_stge.c: revision 1.71 sys/dev/mii/ipgphy.c: revision 1.1 sys/dev/mii/ipgphy.c: revision 1.2 share/man/man4/Makefile: revision 1.684 sys/dev/mii/ipgphy.c: revision 1.3 sys/dev/mii/ipgphyreg.h: revision 1.1 sys/dev/mii/ipgphy.c: revision 1.4 sys/dev/mii/ipgphyreg.h: revision 1.2 sys/dev/mii/ipgphy.c: revision 1.5 sys/dev/mii/ipgphyreg.h: revision 1.3 sys/dev/DEVNAMES: revision 1.322 sys/arch/i386/conf/GENERIC: revision 1.1211 sys/arch/amd64/conf/GENERIC: revision 1.537 share/man/man4/ipgphy.4: revision 1.1 share/man/man4/ipgphy.4: revision 1.2 Add support IC Plus IP1000* PHYs. PR/kern 42314 first reported by Tomokazu HARADA and patch provided by Andrius V. New sentence, new line. Fix date. Add RCS Id. KNF. No functional change. STGE_PhyCtrl is not PHY register but MAC register, so use ukphy_status() for IP1000A device. - Use auto-negotiation when forcing 1000BASE-T. - Add XXX comment for strange pause setting code. I suspect this is wrong. - On my environments, 1000BASE-T half duplex doesn't work, so we might remove IFM_1000T_HDX from this device in future. - Define IPGPHY_SCR's address. - Whitespace fix. Add missing NetBSD RCS Id. Reported by Andrius V. To generate a diff of this commit: cvs rdiff -u -r1.1649.2.3 -r1.1649.2.4 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.680.2.1 -r1.680.2.2 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.2.2.2 src/share/man/man4/ipgphy.4 cvs rdiff -u -r1.27 -r1.27.28.1 src/share/man/man4/mii.4 cvs rdiff -u -r1.7 -r1.7.28.1 src/share/man/man4/vge.4 cvs rdiff -u -r1.120.2.1 -r1.120.2.2 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.531.2.4 -r1.531.2.5 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.469 -r1.469.2.1 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1208.2.2 -r1.1208.2.3 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.321 -r1.321.2.1 src/sys/dev/DEVNAMES cvs rdiff -u -r1.50 -r1.50.26.1 src/sys/dev/mii/files.mii cvs rdiff -u -r0 -r1.6.2.2 src/sys/dev/mii/ipgphy.c cvs rdiff -u -r0 -r1.3.2.2 src/sys/dev/mii/ipgphyreg.h cvs rdiff -u -r1.70.2.2 -r1.70.2.3 src/sys/dev/pci/if_stge.c cvs rdiff -u -r1.5 -r1.5.94.1 src/sys/dev/pci/if_stgereg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Mon Nov 25 16:44:32 UTC 2019 Modified Files: src/distrib/sets/lists/man [netbsd-9]: mi src/share/man/man4 [netbsd-9]: Makefile mii.4 vge.4 src/sys/arch/amd64/conf [netbsd-9]: ALL GENERIC src/sys/arch/i386/conf [netbsd-9]: ALL GENERIC src/sys/dev [netbsd-9]: DEVNAMES src/sys/dev/mii [netbsd-9]: files.mii src/sys/dev/pci [netbsd-9]: if_stge.c if_stgereg.h Added Files: src/share/man/man4 [netbsd-9]: ipgphy.4 src/sys/dev/mii [netbsd-9]: ipgphy.c ipgphyreg.h Log Message: Pull up following revision(s) (requested by msaitoh in ticket #476): sys/dev/pci/if_stgereg.h: revision 1.6 sys/arch/amd64/conf/ALL: revision 1.124 sys/dev/mii/files.mii: revision 1.51 share/man/man4/vge.4: revision 1.8 share/man/man4/vge.4: revision 1.9 distrib/sets/lists/man/mi: revision 1.1656 sys/arch/i386/conf/ALL: revision 1.471 share/man/man4/mii.4: revision 1.28 sys/dev/pci/if_stge.c: revision 1.71 sys/dev/mii/ipgphy.c: revision 1.1 sys/dev/mii/ipgphy.c: revision 1.2 share/man/man4/Makefile: revision 1.684 sys/dev/mii/ipgphy.c: revision 1.3 sys/dev/mii/ipgphyreg.h: revision 1.1 sys/dev/mii/ipgphy.c: revision 1.4 sys/dev/mii/ipgphyreg.h: revision 1.2 sys/dev/mii/ipgphy.c: revision 1.5 sys/dev/mii/ipgphyreg.h: revision 1.3 sys/dev/DEVNAMES: revision 1.322 sys/arch/i386/conf/GENERIC: revision 1.1211 sys/arch/amd64/conf/GENERIC: revision 1.537 share/man/man4/ipgphy.4: revision 1.1 share/man/man4/ipgphy.4: revision 1.2 Add support IC Plus IP1000* PHYs. PR/kern 42314 first reported by Tomokazu HARADA and patch provided by Andrius V. New sentence, new line. Fix date. Add RCS Id. KNF. No functional change. STGE_PhyCtrl is not PHY register but MAC register, so use ukphy_status() for IP1000A device. - Use auto-negotiation when forcing 1000BASE-T. - Add XXX comment for strange pause setting code. I suspect this is wrong. - On my environments, 1000BASE-T half duplex doesn't work, so we might remove IFM_1000T_HDX from this device in future. - Define IPGPHY_SCR's address. - Whitespace fix. Add missing NetBSD RCS Id. Reported by Andrius V. To generate a diff of this commit: cvs rdiff -u -r1.1649.2.3 -r1.1649.2.4 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.680.2.1 -r1.680.2.2 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.2.2.2 src/share/man/man4/ipgphy.4 cvs rdiff -u -r1.27 -r1.27.28.1 src/share/man/man4/mii.4 cvs rdiff -u -r1.7 -r1.7.28.1 src/share/man/man4/vge.4 cvs rdiff -u -r1.120.2.1 -r1.120.2.2 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.531.2.4 -r1.531.2.5 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.469 -r1.469.2.1 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1208.2.2 -r1.1208.2.3 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.321 -r1.321.2.1 src/sys/dev/DEVNAMES cvs rdiff -u -r1.50 -r1.50.26.1 src/sys/dev/mii/files.mii cvs rdiff -u -r0 -r1.6.2.2 src/sys/dev/mii/ipgphy.c cvs rdiff -u -r0 -r1.3.2.2 src/sys/dev/mii/ipgphyreg.h cvs rdiff -u -r1.70.2.2 -r1.70.2.3 src/sys/dev/pci/if_stge.c cvs rdiff -u -r1.5 -r1.5.94.1 src/sys/dev/pci/if_stgereg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1649.2.3 src/distrib/sets/lists/man/mi:1.1649.2.4 --- src/distrib/sets/lists/man/mi:1.1649.2.3 Sun Nov 10 12:58:31 2019 +++ src/distrib/sets/lists/man/mi Mon Nov 25 16:44:32 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1649.2.3 2019/11/10 12:58:31 martin Exp $ +# $NetBSD: mi,v 1.1649.2.4 2019/11/25 16:44:32 martin Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1336,6 +1336,7 @@ ./usr/share/man/cat4/ip6.0 man-sys-catman .cat ./usr/share/man/cat4/ipf.0 man-ipf-catman ipfilter,.cat ./usr/share/man/cat4/ipfilter.0 man-ipf-catman ipfilter,.cat +./usr/share/man/cat4/ipgphy.0 man-sys-catman .cat ./usr/share/man/cat4/ipip.0 man-obsolete obsolete ./usr/share/man/cat4/ipkdb.0 man-obsolete obsolete ./usr/share/man/cat4/ipl.0 man-ipf-catman ipfilter,.cat @@ -4476,6 +4477,7 @@ ./usr/share/man/html4/ip6.html man-sys-htmlman html ./usr/share/man/html4/ipf.html man-ipf-htmlman ipfilter,html ./usr/share/man/html4/ipfilter.html man-ipf-htmlman ipfilter,html +./usr/share/man/html4/ipgphy.html man-sys-htmlman html ./usr/share/man/html4/ipkdb.html man-obsolete obsolete ./usr/share/man/html4/ipl.html man-ipf-htmlman ipfilter,html ./usr/share/man/html4/ipmi.html man-sys-htmlman html @@ -7452,6 +7454,7 @@ ./usr/share/man/man4/ip6.4 man-sys-man .man ./usr/share/man/man4/ipf.4 man-sys-man ipfilter,.man ./usr/share/man/man4/ipfilter.4 man-sys-man ipfilter,.man +./usr/share/man/man4/ipgphy.4
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Mon Nov 25 16:39:30 UTC 2019 Modified Files: src/sys/dev/nvmm/x86 [netbsd-9]: nvmm_x86_svm.c nvmm_x86_vmx.c src/tests/lib/libnvmm [netbsd-9]: h_mem_assist.c Log Message: Pull up following revision(s) (requested by maxv in ticket #475): tests/lib/libnvmm/h_mem_assist.c: revision 1.18 sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.45 sys/dev/nvmm/x86/nvmm_x86_svm.c: revision 1.54 Hide XSAVES-specific stuff and the masked extended states. Several improvements. In particular, reduce CS.limit, because Intel CPUs perform strict sanity checks, and the previous (too high) limit caused the VM entry to fail. To generate a diff of this commit: cvs rdiff -u -r1.46.4.2 -r1.46.4.3 src/sys/dev/nvmm/x86/nvmm_x86_svm.c cvs rdiff -u -r1.36.2.3 -r1.36.2.4 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c cvs rdiff -u -r1.11.4.1 -r1.11.4.2 src/tests/lib/libnvmm/h_mem_assist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/nvmm/x86/nvmm_x86_svm.c diff -u src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.46.4.2 src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.46.4.3 --- src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.46.4.2 Sun Nov 10 12:58:30 2019 +++ src/sys/dev/nvmm/x86/nvmm_x86_svm.c Mon Nov 25 16:39:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86_svm.c,v 1.46.4.2 2019/11/10 12:58:30 martin Exp $ */ +/* $NetBSD: nvmm_x86_svm.c,v 1.46.4.3 2019/11/25 16:39:30 martin Exp $ */ /* * Copyright (c) 2018-2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.46.4.2 2019/11/10 12:58:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.46.4.3 2019/11/25 16:39:30 martin Exp $"); #include #include @@ -828,7 +828,18 @@ svm_inkernel_handle_cpuid(struct nvmm_cp cpudata->gprs[NVMM_X64_GPR_RDX] = svm_xcr0_mask >> 32; break; case 1: - cpudata->vmcb->state.rax &= ~CPUID_PES1_XSAVES; + cpudata->vmcb->state.rax &= + (CPUID_PES1_XSAVEOPT | CPUID_PES1_XSAVEC | + CPUID_PES1_XGETBV); + cpudata->gprs[NVMM_X64_GPR_RBX] = 0; + cpudata->gprs[NVMM_X64_GPR_RCX] = 0; + cpudata->gprs[NVMM_X64_GPR_RDX] = 0; + break; + default: + cpudata->vmcb->state.rax = 0; + cpudata->gprs[NVMM_X64_GPR_RBX] = 0; + cpudata->gprs[NVMM_X64_GPR_RCX] = 0; + cpudata->gprs[NVMM_X64_GPR_RDX] = 0; break; } break; Index: src/sys/dev/nvmm/x86/nvmm_x86_vmx.c diff -u src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.36.2.3 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.36.2.4 --- src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.36.2.3 Sun Nov 10 12:58:30 2019 +++ src/sys/dev/nvmm/x86/nvmm_x86_vmx.c Mon Nov 25 16:39:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86_vmx.c,v 1.36.2.3 2019/11/10 12:58:30 martin Exp $ */ +/* $NetBSD: nvmm_x86_vmx.c,v 1.36.2.4 2019/11/25 16:39:30 martin Exp $ */ /* * Copyright (c) 2018-2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.36.2.3 2019/11/10 12:58:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.36.2.4 2019/11/25 16:39:30 martin Exp $"); #include #include @@ -1203,7 +1203,18 @@ vmx_inkernel_handle_cpuid(struct nvmm_cp cpudata->gprs[NVMM_X64_GPR_RDX] = vmx_xcr0_mask >> 32; break; case 1: - cpudata->gprs[NVMM_X64_GPR_RAX] &= ~CPUID_PES1_XSAVES; + cpudata->gprs[NVMM_X64_GPR_RAX] &= + (CPUID_PES1_XSAVEOPT | CPUID_PES1_XSAVEC | + CPUID_PES1_XGETBV); + cpudata->gprs[NVMM_X64_GPR_RBX] = 0; + cpudata->gprs[NVMM_X64_GPR_RCX] = 0; + cpudata->gprs[NVMM_X64_GPR_RDX] = 0; + break; + default: + cpudata->gprs[NVMM_X64_GPR_RAX] = 0; + cpudata->gprs[NVMM_X64_GPR_RBX] = 0; + cpudata->gprs[NVMM_X64_GPR_RCX] = 0; + cpudata->gprs[NVMM_X64_GPR_RDX] = 0; break; } break; Index: src/tests/lib/libnvmm/h_mem_assist.c diff -u src/tests/lib/libnvmm/h_mem_assist.c:1.11.4.1 src/tests/lib/libnvmm/h_mem_assist.c:1.11.4.2 --- src/tests/lib/libnvmm/h_mem_assist.c:1.11.4.1 Sun Nov 10 12:58:30 2019 +++ src/tests/lib/libnvmm/h_mem_assist.c Mon Nov 25 16:39:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: h_mem_assist.c,v 1.11.4.1 2019/11/10 12:58:30 martin Exp $ */ +/* $NetBSD: h_mem_assist.c,v 1.11.4.2 2019/11/25 16:39:29 martin Exp $ */ /* * Copyright (c) 2018-2019 The NetBSD Foundation, Inc. @@ -113,7 +113,7 @@ run_machine(struct nvmm_machine *mach, s return; default: - printf("Invalid!\n"); + printf("Invalid VMEXIT: 0x%lx\n", exit->reason); return; } } @@ -177,22 +177,22 @@ extern uint8_t test_64bit_15_begin, test extern uint8_t test_64bit_16_begin, test_64bit_16_end; static const struct test tests64[] = { - { "test1 - MOV", _begin, _end, 0x3004, 0 }, - { "test2 - OR", _begin, _end, 0x16FF, 0 }, - { "test3 - AND", _begin, _end, 0x1FC0, 0 }, - { "test4 - XOR", _begin, _end, 0x10CF, 0 }, - { "test5 - Address Sizes", _begin, _end, 0x1F00, 0 }, - { "test6 -
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Mon Nov 25 16:39:30 UTC 2019 Modified Files: src/sys/dev/nvmm/x86 [netbsd-9]: nvmm_x86_svm.c nvmm_x86_vmx.c src/tests/lib/libnvmm [netbsd-9]: h_mem_assist.c Log Message: Pull up following revision(s) (requested by maxv in ticket #475): tests/lib/libnvmm/h_mem_assist.c: revision 1.18 sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.45 sys/dev/nvmm/x86/nvmm_x86_svm.c: revision 1.54 Hide XSAVES-specific stuff and the masked extended states. Several improvements. In particular, reduce CS.limit, because Intel CPUs perform strict sanity checks, and the previous (too high) limit caused the VM entry to fail. To generate a diff of this commit: cvs rdiff -u -r1.46.4.2 -r1.46.4.3 src/sys/dev/nvmm/x86/nvmm_x86_svm.c cvs rdiff -u -r1.36.2.3 -r1.36.2.4 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c cvs rdiff -u -r1.11.4.1 -r1.11.4.2 src/tests/lib/libnvmm/h_mem_assist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Mon Nov 25 16:37:06 UTC 2019 Modified Files: src/sys/dev/usb [netbsd-9]: if_upl.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #474): sys/dev/usb/if_upl.c: revision 1.68 Make it compilable with UPL_DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.64.2.2 -r1.64.2.3 src/sys/dev/usb/if_upl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Mon Nov 25 16:37:06 UTC 2019 Modified Files: src/sys/dev/usb [netbsd-9]: if_upl.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #474): sys/dev/usb/if_upl.c: revision 1.68 Make it compilable with UPL_DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.64.2.2 -r1.64.2.3 src/sys/dev/usb/if_upl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_upl.c diff -u src/sys/dev/usb/if_upl.c:1.64.2.2 src/sys/dev/usb/if_upl.c:1.64.2.3 --- src/sys/dev/usb/if_upl.c:1.64.2.2 Fri Sep 13 06:51:58 2019 +++ src/sys/dev/usb/if_upl.c Mon Nov 25 16:37:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_upl.c,v 1.64.2.2 2019/09/13 06:51:58 martin Exp $ */ +/* $NetBSD: if_upl.c,v 1.64.2.3 2019/11/25 16:37:06 martin Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.64.2.2 2019/09/13 06:51:58 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.64.2.3 2019/11/25 16:37:06 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -229,8 +229,8 @@ upl_rx_loop(struct usbnet * un, struct u { usbnet_isowned_rx(un); - DPRINTFN(9,("%s: %s: enter status=%d length=%d\n", - device_xname(un->un_dev), __func__, status, total_len)); + DPRINTFN(9,("%s: %s: enter length=%d\n", + device_xname(un->un_dev), __func__, total_len)); usbnet_input(un, c->unc_buf, total_len); }
CVS commit: [netbsd-9] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 16:26:31 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-9]: miidevs.h miidevs_data.h Log Message: Regen for ticket #473 To generate a diff of this commit: cvs rdiff -u -r1.151.2.2 -r1.151.2.3 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.139.2.2 -r1.139.2.3 src/sys/dev/mii/miidevs_data.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/mii/miidevs.h diff -u src/sys/dev/mii/miidevs.h:1.151.2.2 src/sys/dev/mii/miidevs.h:1.151.2.3 --- src/sys/dev/mii/miidevs.h:1.151.2.2 Wed Oct 23 19:46:53 2019 +++ src/sys/dev/mii/miidevs.h Mon Nov 25 16:26:31 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs.h,v 1.151.2.2 2019/10/23 19:46:53 martin Exp $ */ +/* $NetBSD: miidevs.h,v 1.151.2.3 2019/11/25 16:26:31 martin Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.153.2.2 2019/10/23 19:45:56 martin Exp + * NetBSD: miidevs,v 1.153.2.3 2019/11/25 16:26:00 martin Exp */ /*- @@ -72,7 +72,9 @@ #define MII_OUI_ENABLESEMI 0x0010dd /* Enable Semiconductor */ #define MII_OUI_SUNPLUS 0x001105 /* Sunplus Technology */ #define MII_OUI_ATHEROS 0x001374 /* Atheros */ +#define MII_OUI_TERANETICS 0x0014a6 /* Teranetics */ #define MII_OUI_RALINK2 0x0017a5 /* Ralink Technology */ +#define MII_OUI_AQUANTIA 0x0017b6 /* Aquantia Corporation */ #define MII_OUI_BROADCOM3 0x001be9 /* Broadcom Corporation */ #define MII_OUI_LEVEL1 0x00207b /* Level 1 */ #define MII_OUI_VIA 0x004063 /* VIA Technologies */ @@ -81,7 +83,6 @@ #define MII_OUI_AMLOGIC 0x006051 /* Amlogic */ #define MII_OUI_DAVICOM 0x00606e /* Davicom Semiconductor */ #define MII_OUI_SMSC 0x00800f /* SMSC */ -#define MII_OUI_ICPLUS 0x0090c3 /* IC Plus Corp. */ #define MII_OUI_SEEQ 0x00a07d /* Seeq */ #define MII_OUI_ICS 0x00a0be /* Integrated Circuit Systems */ #define MII_OUI_INTEL 0x00aa00 /* Intel */ @@ -98,8 +99,9 @@ #define MII_OUI_NATSEMI 0x080017 /* National Semiconductor */ #define MII_OUI_TI 0x080028 /* Texas Instruments */ #define MII_OUI_BROADCOM4 0x18c086 /* Broadcom Corporation */ +#define MII_OUI_RENESAS 0x749050 /* Renesas */ -/* Unregisterd or wrong OUI */ +/* Unregistered or wrong OUI */ #define MII_OUI_yyREALTEK 0x04 /* Realtek */ #define MII_OUI_yyAMD 0x58 /* Advanced Micro Devices */ #define MII_OUI_xxMYSON 0x00032d /* Myson Technology */ @@ -111,6 +113,7 @@ #define MII_OUI_xxREALTEK 0x000732 /* Realtek */ #define MII_OUI_xxBROADCOM 0x000818 /* Broadcom Corporation */ #define MII_OUI_xxPMCSIERRA 0x0009c0 /* PMC-Sierra */ +#define MII_OUI_xxICPLUS 0x0009c3 /* IC Plus Corp. */ #define MII_OUI_xxMARVELL 0x000ac2 /* Marvell Semiconductor */ #define MII_OUI_xxINTEL 0x001f00 /* Intel */ #define MII_OUI_xxBROADCOM_ALT1 0x0050ef /* Broadcom Corporation */ @@ -343,14 +346,14 @@ #define MII_STR_xxDAVICOM_DM9601 "DM9601 internal 10/100 media interface" /* IC Plus Corp. PHYs */ -#define MII_MODEL_ICPLUS_IP100 0x0004 -#define MII_STR_ICPLUS_IP100 "IP100 10/100 PHY" -#define MII_MODEL_ICPLUS_IP101 0x0005 -#define MII_STR_ICPLUS_IP101 "IP101 10/100 PHY" -#define MII_MODEL_ICPLUS_IP1000A 0x0008 -#define MII_STR_ICPLUS_IP1000A "IP1000A 10/100/1000 PHY" -#define MII_MODEL_ICPLUS_IP1001 0x0019 -#define MII_STR_ICPLUS_IP1001 "IP1001 10/100/1000 PHY" +#define MII_MODEL_xxICPLUS_IP100 0x0004 +#define MII_STR_xxICPLUS_IP100 "IP100 10/100 PHY" +#define MII_MODEL_xxICPLUS_IP101 0x0005 +#define MII_STR_xxICPLUS_IP101 "IP101 10/100 PHY" +#define MII_MODEL_xxICPLUS_IP1000A 0x0008 +#define MII_STR_xxICPLUS_IP1000A "IP1000A 10/100/1000 PHY" +#define MII_MODEL_xxICPLUS_IP1001 0x0019 +#define MII_STR_xxICPLUS_IP1001 "IP1001 10/100/1000 PHY" /* Integrated Circuit Systems PHYs */ #define MII_MODEL_ICS_1889 0x0001 @@ -408,10 +411,10 @@ /* JMicron PHYs */ -#define MII_MODEL_JMICRON_JMC250 0x0021 -#define MII_STR_JMICRON_JMC250 "JMC250 10/100/1000 media interface" -#define MII_MODEL_JMICRON_JMC260 0x0022 -#define MII_STR_JMICRON_JMC260 "JMC260 10/100 media interface" +#define MII_MODEL_JMICRON_JMP211 0x0021 +#define MII_STR_JMICRON_JMP211 "JMP211 10/100/1000 media interface" +#define MII_MODEL_JMICRON_JMP202 0x0022 +#define MII_STR_JMICRON_JMP202 "JMP202 10/100 media interface" /* Level 1 PHYs */ #define MII_MODEL_xxLEVEL1_LXT970 0x Index: src/sys/dev/mii/miidevs_data.h diff -u src/sys/dev/mii/miidevs_data.h:1.139.2.2 src/sys/dev/mii/miidevs_data.h:1.139.2.3 --- src/sys/dev/mii/miidevs_data.h:1.139.2.2 Wed Oct 23 19:46:53 2019 +++ src/sys/dev/mii/miidevs_data.h Mon Nov 25 16:26:31 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs_data.h,v 1.139.2.2 2019/10/23 19:46:53 martin Exp $ */ +/* $NetBSD: miidevs_data.h,v 1.139.2.3 2019/11/25 16:26:31 martin Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.153.2.2 2019/10/23 19:45:56 martin Exp + *
CVS commit: [netbsd-9] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 16:26:31 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-9]: miidevs.h miidevs_data.h Log Message: Regen for ticket #473 To generate a diff of this commit: cvs rdiff -u -r1.151.2.2 -r1.151.2.3 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.139.2.2 -r1.139.2.3 src/sys/dev/mii/miidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 16:26:01 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-9]: miidevs rlphy.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #473): sys/dev/mii/rlphy.c: revision 1.37 sys/dev/mii/miidevs: revision 1.155 sys/dev/mii/miidevs: revision 1.156 sys/dev/mii/miidevs: revision 1.157 sys/dev/mii/miidevs: revision 1.159 sys/dev/mii/miidevs: revision 1.160 Add Teranetics, Aquantia and Renesas. Use uppercase for vendor name. Change ICPLUS(0x0090c3) to xxICPLUS(0x0009c3) - ICPLUS -> xxICPLUS - Print model name if it's ICPLUS IP101 to avoid "Realtek internal PHY". Fix typo. from vezhlys - Rename JMICRON 0x0021 from JMC250 to JMP211 - Rename JMICRON 0x0022 from JMC260 to JMP202 To generate a diff of this commit: cvs rdiff -u -r1.153.2.2 -r1.153.2.3 src/sys/dev/mii/miidevs cvs rdiff -u -r1.36 -r1.36.4.1 src/sys/dev/mii/rlphy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 16:26:01 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-9]: miidevs rlphy.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #473): sys/dev/mii/rlphy.c: revision 1.37 sys/dev/mii/miidevs: revision 1.155 sys/dev/mii/miidevs: revision 1.156 sys/dev/mii/miidevs: revision 1.157 sys/dev/mii/miidevs: revision 1.159 sys/dev/mii/miidevs: revision 1.160 Add Teranetics, Aquantia and Renesas. Use uppercase for vendor name. Change ICPLUS(0x0090c3) to xxICPLUS(0x0009c3) - ICPLUS -> xxICPLUS - Print model name if it's ICPLUS IP101 to avoid "Realtek internal PHY". Fix typo. from vezhlys - Rename JMICRON 0x0021 from JMC250 to JMP211 - Rename JMICRON 0x0022 from JMC260 to JMP202 To generate a diff of this commit: cvs rdiff -u -r1.153.2.2 -r1.153.2.3 src/sys/dev/mii/miidevs cvs rdiff -u -r1.36 -r1.36.4.1 src/sys/dev/mii/rlphy.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/miidevs diff -u src/sys/dev/mii/miidevs:1.153.2.2 src/sys/dev/mii/miidevs:1.153.2.3 --- src/sys/dev/mii/miidevs:1.153.2.2 Wed Oct 23 19:45:56 2019 +++ src/sys/dev/mii/miidevs Mon Nov 25 16:26:00 2019 @@ -1,4 +1,4 @@ -$NetBSD: miidevs,v 1.153.2.2 2019/10/23 19:45:56 martin Exp $ +$NetBSD: miidevs,v 1.153.2.3 2019/11/25 16:26:00 martin Exp $ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -65,7 +65,9 @@ oui ALTIMA 0x0010a9 Altima Communicati oui ENABLESEMI 0x0010dd Enable Semiconductor oui SUNPLUS 0x001105 Sunplus Technology oui ATHEROS 0x001374 Atheros +oui TERANETICS 0x0014a6 Teranetics oui RALINK2 0x0017a5 Ralink Technology +oui AQUANTIA 0x0017b6 Aquantia Corporation oui BROADCOM3 0x001be9 Broadcom Corporation oui LEVEL1 0x00207b Level 1 oui VIA0x004063 VIA Technologies @@ -74,7 +76,6 @@ oui QUALSEMI 0x006051 Quality Semicond oui AMLOGIC 0x006051 Amlogic oui DAVICOM 0x00606e Davicom Semiconductor oui SMSC 0x00800f SMSC -oui ICPLUS 0x0090c3 IC Plus Corp. oui SEEQ 0x00a07d Seeq oui ICS0x00a0be Integrated Circuit Systems oui INTEL 0x00aa00 Intel @@ -91,8 +92,9 @@ oui XAQTI 0x00e0ae XaQti Corp. oui NATSEMI 0x080017 National Semiconductor oui TI0x080028 Texas Instruments oui BROADCOM4 0x18c086 Broadcom Corporation +oui RENESAS 0x749050 Renesas -/* Unregisterd or wrong OUI */ +/* Unregistered or wrong OUI */ oui yyREALTEK 0x04 Realtek oui yyAMD 0x58 Advanced Micro Devices oui xxMYSON 0x00032d Myson Technology @@ -104,6 +106,7 @@ oui xxQUALSEMI 0x00068a Quality Semico oui xxREALTEK 0x000732 Realtek oui xxBROADCOM 0x000818 Broadcom Corporation oui xxPMCSIERRA 0x0009c0 PMC-Sierra +oui xxICPLUS 0x0009c3 IC Plus Corp. oui xxMARVELL 0x000ac2 Marvell Semiconductor oui xxINTEL 0x001f00 Intel oui xxBROADCOM_ALT1 0x0050ef Broadcom Corporation @@ -242,10 +245,10 @@ model xxDAVICOM DM9161B 0x000b DM9161[B model xxDAVICOM DM9601 0x000c DM9601 internal 10/100 media interface /* IC Plus Corp. PHYs */ -model ICPLUS IP100 0x0004 IP100 10/100 PHY -model ICPLUS IP101 0x0005 IP101 10/100 PHY -model ICPLUS IP1000A 0x0008 IP1000A 10/100/1000 PHY -model ICPLUS IP1001 0x0019 IP1001 10/100/1000 PHY +model xxICPLUS IP100 0x0004 IP100 10/100 PHY +model xxICPLUS IP101 0x0005 IP101 10/100 PHY +model xxICPLUS IP1000A 0x0008 IP1000A 10/100/1000 PHY +model xxICPLUS IP1001 0x0019 IP1001 10/100/1000 PHY /* Integrated Circuit Systems PHYs */ model ICS 1889 0x0001 ICS1889 10/100 media interface @@ -278,8 +281,8 @@ model ATTANSIC I82578 0x0004 Intel 8257 /* JMicron PHYs */ -model JMICRON JMC250 0x0021 JMC250 10/100/1000 media interface -model JMICRON JMC260 0x0022 JMC260 10/100 media interface +model JMICRON JMP211 0x0021 JMP211 10/100/1000 media interface +model JMICRON JMP202 0x0022 JMP202 10/100 media interface /* Level 1 PHYs */ model xxLEVEL1 LXT970 0x LXT970 10/100 media interface Index: src/sys/dev/mii/rlphy.c diff -u src/sys/dev/mii/rlphy.c:1.36 src/sys/dev/mii/rlphy.c:1.36.4.1 --- src/sys/dev/mii/rlphy.c:1.36 Mon Mar 25 09:20:46 2019 +++ src/sys/dev/mii/rlphy.c Mon Nov 25 16:26:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rlphy.c,v 1.36 2019/03/25 09:20:46 msaitoh Exp $ */ +/* $NetBSD: rlphy.c,v 1.36.4.1 2019/11/25 16:26:00 martin Exp $ */ /* $OpenBSD: rlphy.c,v 1.20 2005/07/31 05:27:30 pvalchev Exp $ */ /* @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.36 2019/03/25 09:20:46 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.36.4.1 2019/11/25 16:26:00 martin Exp $"); #include #include @@ -78,7 +78,7 @@ const struct mii_phy_funcs rlphy_funcs = static const struct mii_phydesc rlphys[] = { MII_PHY_DESC(yyREALTEK, RTL8201L), MII_PHY_DESC(REALTEK, RTL8201E), - MII_PHY_DESC(ICPLUS, IP101), + MII_PHY_DESC(xxICPLUS,
CVS commit: [netbsd-9] src/sys/arch/arm/sunxi
Module Name:src Committed By: martin Date: Mon Nov 25 16:20:41 UTC 2019 Modified Files: src/sys/arch/arm/sunxi [netbsd-9]: sunxi_drm.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #472): sys/arch/arm/sunxi/sunxi_drm.c: revision 1.9 Reclaim bootloader FB memory for CMA pool. To generate a diff of this commit: cvs rdiff -u -r1.7.6.1 -r1.7.6.2 src/sys/arch/arm/sunxi/sunxi_drm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/arm/sunxi
Module Name:src Committed By: martin Date: Mon Nov 25 16:20:41 UTC 2019 Modified Files: src/sys/arch/arm/sunxi [netbsd-9]: sunxi_drm.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #472): sys/arch/arm/sunxi/sunxi_drm.c: revision 1.9 Reclaim bootloader FB memory for CMA pool. To generate a diff of this commit: cvs rdiff -u -r1.7.6.1 -r1.7.6.2 src/sys/arch/arm/sunxi/sunxi_drm.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_drm.c diff -u src/sys/arch/arm/sunxi/sunxi_drm.c:1.7.6.1 src/sys/arch/arm/sunxi/sunxi_drm.c:1.7.6.2 --- src/sys/arch/arm/sunxi/sunxi_drm.c:1.7.6.1 Wed Nov 6 09:48:31 2019 +++ src/sys/arch/arm/sunxi/sunxi_drm.c Mon Nov 25 16:20:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_drm.c,v 1.7.6.1 2019/11/06 09:48:31 martin Exp $ */ +/* $NetBSD: sunxi_drm.c,v 1.7.6.2 2019/11/25 16:20:41 martin Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.7.6.1 2019/11/06 09:48:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.7.6.2 2019/11/25 16:20:41 martin Exp $"); #include #include @@ -296,6 +296,27 @@ static struct drm_mode_config_funcs sunx }; static int +sunxi_drm_simplefb_lookup(bus_addr_t *paddr, bus_size_t *psize) +{ + static const char * compat[] = { "simple-framebuffer", NULL }; + int chosen, child; + + chosen = OF_finddevice("/chosen"); + if (chosen == -1) + return ENOENT; + + for (child = OF_child(chosen); child; child = OF_peer(child)) { + if (!fdtbus_status_okay(child)) + continue; + if (!of_match_compatible(child, compat)) + continue; + return fdtbus_get_reg(child, 0, paddr, psize); + } + + return ENOENT; +} + +static int sunxi_drm_fb_probe(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) { struct sunxi_drm_softc * const sc = sunxi_drm_private(helper->dev); @@ -303,6 +324,8 @@ sunxi_drm_fb_probe(struct drm_fb_helper struct sunxi_drm_framebuffer *sfb = to_sunxi_drm_framebuffer(helper->fb); struct drm_framebuffer *fb = helper->fb; struct sunxi_drmfb_attach_args sfa; + bus_addr_t sfb_addr; + bus_size_t sfb_size; size_t cma_size; int error; @@ -312,14 +335,31 @@ sunxi_drm_fb_probe(struct drm_fb_helper const size_t size = roundup(height * pitch, PAGE_SIZE); - /* Reserve enough memory for the FB console plus a 4K plane, rounded to 1MB */ - cma_size = size; - cma_size += (SUNXI_DRM_MAX_WIDTH * SUNXI_DRM_MAX_HEIGHT * 4); + if (sunxi_drm_simplefb_lookup(_addr, _size) != 0) + sfb_size = 0; + + /* Reserve enough memory for a 4K plane, rounded to 1MB */ + cma_size = (SUNXI_DRM_MAX_WIDTH * SUNXI_DRM_MAX_HEIGHT * 4); + if (sfb_size == 0) { + /* Add memory for FB console if we cannot reclaim bootloader memory */ + cma_size += size; + } cma_size = roundup(cma_size, 1024 * 1024); sc->sc_ddev->cma_pool = sunxi_drm_alloc_cma_pool(sc->sc_ddev, cma_size); - if (sc->sc_ddev->cma_pool != NULL) - aprint_normal_dev(sc->sc_dev, "reserved %u MB DRAM for CMA\n", - (u_int)(cma_size / (1024 * 1024))); + if (sc->sc_ddev->cma_pool != NULL) { + if (sfb_size != 0) { + error = vmem_add(sc->sc_ddev->cma_pool, sfb_addr, + sfb_size, VM_SLEEP); + if (error != 0) +sfb_size = 0; + } + aprint_normal_dev(sc->sc_dev, "reserved %u MB DRAM for CMA", + (u_int)((cma_size + sfb_size) / (1024 * 1024))); + if (sfb_size != 0) + aprint_normal(" (%u MB reclaimed from bootloader)", + (u_int)(sfb_size / (1024 * 1024))); + aprint_normal("\n"); + } sfb->obj = drm_gem_cma_create(ddev, size); if (sfb->obj == NULL) {
CVS commit: [netbsd-9] src/sys
Module Name:src Committed By: martin Date: Mon Nov 25 16:18:41 UTC 2019 Modified Files: src/sys/arch/arm/dts [netbsd-9]: sun50i-a64-pinebook.dts src/sys/arch/arm/sunxi [netbsd-9]: sun50i_a64_ccu.c sunxi_ccu.h sunxi_ccu_fractional.c sunxi_dwhdmi.c sunxi_hdmiphy.c sunxi_hdmiphy.h sunxi_lcdc.c sunxi_mixer.c sunxi_platform.c src/sys/dev/fdt [netbsd-9]: fdt_port.c src/sys/dev/ic [netbsd-9]: dw_hdmi.c dw_hdmi.h Log Message: Pull up following revision(s) (requested by jmcneill in ticket #470): sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16 sys/dev/ic/dw_hdmi.c: revision 1.5 sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17 sys/dev/ic/dw_hdmi.c: revision 1.6 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19 sys/dev/ic/dw_hdmi.h: revision 1.5 sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8 sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9 sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22 sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5 sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6 sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7 sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20 sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10 sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17 sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38 sys/dev/fdt/fdt_port.c: revision 1.3 sys/dev/fdt/fdt_port.c: revision 1.4 sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5 sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7 sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6 sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3 Fix CLK_BUS_HDMI bit Enable TMDS clock Store the flags passed to SUNXI_CCU_FRACTIONAL macro. Previously the macro dropped the flags argument entirely, and did not initialize the structure with it. Allow bus glue to setup DDC clocks Add TCON0 clock HDMI PHY and TX share the same clocks. Do not enable clocks until both reset resources have been deasserted. Explicitly set DDC clock dividers. Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode Use fdtbus_get_reg to read "reg" property Need to initialize the PHY before HPD sense and DDC will work Set pixel clock on mode set Set TCON1 parent to PLL_VIDEO1(1X) Do not assume that an fb's pitch is width * 4 bytes. Use actual hw mode, not proposed mode. Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak. Support non-zero fb start pixels. Set video PLLs to 297MHz Do not assume the cursor pitch is the same as the primary fb Enable HDMI and HDMI audio Try to avoid changing hardware settings when the "nomodeset" kernel arg is present. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.2.1 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts cvs rdiff -u -r1.13.2.2 -r1.13.2.3 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c cvs rdiff -u -r1.21 -r1.21.4.1 src/sys/arch/arm/sunxi/sunxi_ccu.h cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/arch/arm/sunxi/sunxi_ccu_fractional.c cvs rdiff -u -r1.3.6.1 -r1.3.6.2 src/sys/arch/arm/sunxi/sunxi_dwhdmi.c cvs rdiff -u -r1.2 -r1.2.6.1 src/sys/arch/arm/sunxi/sunxi_hdmiphy.c cvs rdiff -u -r1.1 -r1.1.6.1 src/sys/arch/arm/sunxi/sunxi_hdmiphy.h cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/arm/sunxi/sunxi_lcdc.c cvs rdiff -u -r1.7 -r1.7.6.1 src/sys/arch/arm/sunxi/sunxi_mixer.c cvs rdiff -u -r1.37 -r1.37.2.1 src/sys/arch/arm/sunxi/sunxi_platform.c cvs rdiff -u -r1.2 -r1.2.4.1 src/sys/dev/fdt/fdt_port.c cvs rdiff -u -r1.1.6.1 -r1.1.6.2 src/sys/dev/ic/dw_hdmi.c \ src/sys/dev/ic/dw_hdmi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/dts/sun50i-a64-pinebook.dts diff -u src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.16 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.16.2.1 --- src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.16 Thu Jun 6 23:19:45 2019 +++ src/sys/arch/arm/dts/sun50i-a64-pinebook.dts Mon Nov 25 16:18:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sun50i-a64-pinebook.dts,v 1.16 2019/06/06 23:19:45 jmcneill Exp $ */ +/* $NetBSD: sun50i-a64-pinebook.dts,v 1.16.2.1 2019/11/25 16:18:40 martin Exp $ */ /*- * Copyright (c) 2017-2019 Jared McNeill @@ -54,6 +54,17 @@ sound_spdif { status = "disabled"; }; + + hdmi-connector { + compatible = "hdmi-connector"; + type = "c"; + + port { + hdmi_con_in: endpoint { +remote-endpoint = <_out_con>; + }; + }; + }; }; { @@ -151,3 +162,28 @@ }; }; }; + +_dldo1 { + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-name =
CVS commit: [netbsd-9] src/sys
Module Name:src Committed By: martin Date: Mon Nov 25 16:18:41 UTC 2019 Modified Files: src/sys/arch/arm/dts [netbsd-9]: sun50i-a64-pinebook.dts src/sys/arch/arm/sunxi [netbsd-9]: sun50i_a64_ccu.c sunxi_ccu.h sunxi_ccu_fractional.c sunxi_dwhdmi.c sunxi_hdmiphy.c sunxi_hdmiphy.h sunxi_lcdc.c sunxi_mixer.c sunxi_platform.c src/sys/dev/fdt [netbsd-9]: fdt_port.c src/sys/dev/ic [netbsd-9]: dw_hdmi.c dw_hdmi.h Log Message: Pull up following revision(s) (requested by jmcneill in ticket #470): sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16 sys/dev/ic/dw_hdmi.c: revision 1.5 sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17 sys/dev/ic/dw_hdmi.c: revision 1.6 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19 sys/dev/ic/dw_hdmi.h: revision 1.5 sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8 sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9 sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22 sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5 sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6 sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7 sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8 sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20 sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10 sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17 sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38 sys/dev/fdt/fdt_port.c: revision 1.3 sys/dev/fdt/fdt_port.c: revision 1.4 sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5 sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7 sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6 sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3 Fix CLK_BUS_HDMI bit Enable TMDS clock Store the flags passed to SUNXI_CCU_FRACTIONAL macro. Previously the macro dropped the flags argument entirely, and did not initialize the structure with it. Allow bus glue to setup DDC clocks Add TCON0 clock HDMI PHY and TX share the same clocks. Do not enable clocks until both reset resources have been deasserted. Explicitly set DDC clock dividers. Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode Use fdtbus_get_reg to read "reg" property Need to initialize the PHY before HPD sense and DDC will work Set pixel clock on mode set Set TCON1 parent to PLL_VIDEO1(1X) Do not assume that an fb's pitch is width * 4 bytes. Use actual hw mode, not proposed mode. Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak. Support non-zero fb start pixels. Set video PLLs to 297MHz Do not assume the cursor pitch is the same as the primary fb Enable HDMI and HDMI audio Try to avoid changing hardware settings when the "nomodeset" kernel arg is present. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.2.1 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts cvs rdiff -u -r1.13.2.2 -r1.13.2.3 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c cvs rdiff -u -r1.21 -r1.21.4.1 src/sys/arch/arm/sunxi/sunxi_ccu.h cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/arch/arm/sunxi/sunxi_ccu_fractional.c cvs rdiff -u -r1.3.6.1 -r1.3.6.2 src/sys/arch/arm/sunxi/sunxi_dwhdmi.c cvs rdiff -u -r1.2 -r1.2.6.1 src/sys/arch/arm/sunxi/sunxi_hdmiphy.c cvs rdiff -u -r1.1 -r1.1.6.1 src/sys/arch/arm/sunxi/sunxi_hdmiphy.h cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/arm/sunxi/sunxi_lcdc.c cvs rdiff -u -r1.7 -r1.7.6.1 src/sys/arch/arm/sunxi/sunxi_mixer.c cvs rdiff -u -r1.37 -r1.37.2.1 src/sys/arch/arm/sunxi/sunxi_platform.c cvs rdiff -u -r1.2 -r1.2.4.1 src/sys/dev/fdt/fdt_port.c cvs rdiff -u -r1.1.6.1 -r1.1.6.2 src/sys/dev/ic/dw_hdmi.c \ src/sys/dev/ic/dw_hdmi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 16:04:46 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.2 Log Message: Tickets #1457 - #1459 To generate a diff of this commit: cvs rdiff -u -r1.1.2.71 -r1.1.2.72 src/doc/CHANGES-8.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.2 diff -u src/doc/CHANGES-8.2:1.1.2.71 src/doc/CHANGES-8.2:1.1.2.72 --- src/doc/CHANGES-8.2:1.1.2.71 Sun Nov 24 08:16:11 2019 +++ src/doc/CHANGES-8.2 Mon Nov 25 16:04:46 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.2,v 1.1.2.71 2019/11/24 08:16:11 martin Exp $ +# $NetBSD: CHANGES-8.2,v 1.1.2.72 2019/11/25 16:04:46 martin Exp $ A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2 release: @@ -1686,3 +1686,29 @@ sys/kern/sys_ptrace_common.c 1.73 Size of registers should be determined from tracer, NOT tracee. [rin, ticket #1456] +sys/dev/mii/miidevs 1.155-1.157, 1.159-1.160 +sys/dev/mii/miidevs.h regen +sys/dev/mii/miidevs_data.h regen +sys/dev/mii/rlphy.c 1.37 via patch + + - miidevs update: + - Add Teranetics, Aquantia and Renesas. + - Change ICPLUS(0x0090c3) to xxICPLUS(0x0009c3). + - Fix typo. from vezhlys. + - Rename JMICRON 0x0021 from JMC250 to JMP211 + - Rename JMICRON 0x0022 from JMC260 to JMP202 + - rlphy(4): Print model name if it's ICPLUS IP101 to avoid printing + "Realtek internal PHY". + [msaitoh, ticket #1457] + +sys/dev/hyperv/hvs.c1.3 +sys/dev/hyperv/if_hvn.c1.10 + + hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). + [nonaka, ticket #1458] + +sys/kern/subr_cprng.c1.33 + + Use cprng_strong, not cprng_fast, for sysctl kern.arnd. + [riastradh, ticket #1459] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 16:04:46 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.2 Log Message: Tickets #1457 - #1459 To generate a diff of this commit: cvs rdiff -u -r1.1.2.71 -r1.1.2.72 src/doc/CHANGES-8.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 16:03:08 UTC 2019 Modified Files: src/sys/kern [netbsd-8]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1459): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.27.10.1 -r1.27.10.2 src/sys/kern/subr_cprng.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/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.27.10.1 src/sys/kern/subr_cprng.c:1.27.10.2 --- src/sys/kern/subr_cprng.c:1.27.10.1 Tue Sep 3 12:08:22 2019 +++ src/sys/kern/subr_cprng.c Mon Nov 25 16:03:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.27.10.1 2019/09/03 12:08:22 martin Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.27.10.2 2019/11/25 16:03:08 martin Exp $ */ /*- * Copyright (c) 2011-2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.27.10.1 2019/09/03 12:08:22 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.27.10.2 2019/11/25 16:03:08 martin Exp $"); #include #include @@ -507,6 +507,7 @@ cprng_strong_rndsink_callback(void *cont mutex_exit(>cs_lock); } +static ONCE_DECL(sysctl_prng_once); static cprng_strong_t *sysctl_prng; static int @@ -526,10 +527,9 @@ makeprng(void) static int sysctl_kern_urnd(SYSCTLFN_ARGS) { - static ONCE_DECL(control); int v, rv; - RUN_ONCE(, makeprng); + RUN_ONCE(_prng_once, makeprng); rv = cprng_strong(sysctl_prng, , sizeof(v), 0); if (rv == sizeof(v)) { struct sysctlnode node = *rnode; @@ -558,6 +558,7 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) int error; void *v; struct sysctlnode node = *rnode; + size_t n __diagused; switch (*oldlenp) { case 0: @@ -566,8 +567,10 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) if (*oldlenp > 256) { return E2BIG; } + RUN_ONCE(_prng_once, makeprng); v = kmem_alloc(*oldlenp, KM_SLEEP); - cprng_fast(v, *oldlenp); + n = cprng_strong(sysctl_prng, v, *oldlenp, 0); + KASSERT(n == *oldlenp); node.sysctl_data = v; node.sysctl_size = *oldlenp; error = sysctl_lookup(SYSCTLFN_CALL());
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 16:03:08 UTC 2019 Modified Files: src/sys/kern [netbsd-8]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1459): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.27.10.1 -r1.27.10.2 src/sys/kern/subr_cprng.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Mon Nov 25 16:01:25 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-8]: hvs.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #1458): sys/dev/hyperv/hvs.c: revision 1.3 sys/dev/hyperv/if_hvn.c: revision 1.10 hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/dev/hyperv/hvs.c cvs rdiff -u -r1.2.2.5 -r1.2.2.6 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/hvs.c diff -u src/sys/dev/hyperv/hvs.c:1.1.2.2 src/sys/dev/hyperv/hvs.c:1.1.2.3 --- src/sys/dev/hyperv/hvs.c:1.1.2.2 Sat Mar 9 17:10:19 2019 +++ src/sys/dev/hyperv/hvs.c Mon Nov 25 16:01:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hvs.c,v 1.1.2.2 2019/03/09 17:10:19 martin Exp $ */ +/* $NetBSD: hvs.c,v 1.1.2.3 2019/11/25 16:01:25 martin Exp $ */ /* $OpenBSD: hvs.c,v 1.17 2017/08/10 17:22:48 mikeb Exp $ */ /*- @@ -37,7 +37,7 @@ /* #define HVS_DEBUG_IO */ #include -__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.1.2.2 2019/03/09 17:10:19 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.1.2.3 2019/11/25 16:01:25 martin Exp $"); #include #include @@ -1095,7 +1095,8 @@ hvs_free_ccbs(struct hvs_softc *sc) if (ccb->ccb_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, + 0, ccb->ccb_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ccb->ccb_dmap); bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmap); Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.2.2.5 src/sys/dev/hyperv/if_hvn.c:1.2.2.6 --- src/sys/dev/hyperv/if_hvn.c:1.2.2.5 Sun Nov 24 08:11:06 2019 +++ src/sys/dev/hyperv/if_hvn.c Mon Nov 25 16:01:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.2.2.5 2019/11/24 08:11:06 martin Exp $ */ +/* $NetBSD: if_hvn.c,v 1.2.2.6 2019/11/25 16:01:25 martin Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.2.2.5 2019/11/24 08:11:06 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.2.2.6 2019/11/25 16:01:25 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -638,7 +638,8 @@ hvn_decap(struct hvn_softc *sc, struct h { struct ifnet *ifp = SC2IFP(sc); - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); txd->txd_buf = NULL; @@ -673,7 +674,8 @@ hvn_txeof(struct hvn_softc *sc, uint64_t } txd->txd_buf = NULL; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); m_freem(m); @@ -850,7 +852,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc txd = >sc_tx_desc[i]; if (txd->txd_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); bus_dmamap_destroy(sc->sc_dmat, txd->txd_dmap); @@ -861,7 +864,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc txd->txd_buf = NULL; } if (sc->sc_tx_rmap) { - bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, sc->sc_tx_rmap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_tx_rmap);
CVS commit: [netbsd-8] src/sys/dev/hyperv
Module Name:src Committed By: martin Date: Mon Nov 25 16:01:25 UTC 2019 Modified Files: src/sys/dev/hyperv [netbsd-8]: hvs.c if_hvn.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #1458): sys/dev/hyperv/hvs.c: revision 1.3 sys/dev/hyperv/if_hvn.c: revision 1.10 hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/dev/hyperv/hvs.c cvs rdiff -u -r1.2.2.5 -r1.2.2.6 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 15:57:50 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h Log Message: Regen for ticket #1457 To generate a diff of this commit: cvs rdiff -u -r1.128.6.7 -r1.128.6.8 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.116.6.7 -r1.116.6.8 src/sys/dev/mii/miidevs_data.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/mii/miidevs.h diff -u src/sys/dev/mii/miidevs.h:1.128.6.7 src/sys/dev/mii/miidevs.h:1.128.6.8 --- src/sys/dev/mii/miidevs.h:1.128.6.7 Thu Oct 24 15:59:13 2019 +++ src/sys/dev/mii/miidevs.h Mon Nov 25 15:57:49 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs.h,v 1.128.6.7 2019/10/24 15:59:13 martin Exp $ */ +/* $NetBSD: miidevs.h,v 1.128.6.8 2019/11/25 15:57:49 martin Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.125.6.7 2019/10/24 15:58:45 martin Exp + * NetBSD: miidevs,v 1.125.6.8 2019/11/25 15:57:23 martin Exp */ /*- @@ -72,7 +72,9 @@ #define MII_OUI_ENABLESEMI 0x0010dd /* Enable Semiconductor */ #define MII_OUI_SUNPLUS 0x001105 /* Sunplus Technology */ #define MII_OUI_ATHEROS 0x001374 /* Atheros */ +#define MII_OUI_TERANETICS 0x0014a6 /* Teranetics */ #define MII_OUI_RALINK2 0x0017a5 /* Ralink Technology */ +#define MII_OUI_AQUANTIA 0x0017b6 /* Aquantia Corporation */ #define MII_OUI_BROADCOM3 0x001be9 /* Broadcom Corporation */ #define MII_OUI_LEVEL1 0x00207b /* Level 1 */ #define MII_OUI_VIA 0x004063 /* VIA Technologies */ @@ -81,7 +83,6 @@ #define MII_OUI_AMLOGIC 0x006051 /* Amlogic */ #define MII_OUI_DAVICOM 0x00606e /* Davicom Semiconductor */ #define MII_OUI_SMSC 0x00800f /* SMSC */ -#define MII_OUI_ICPLUS 0x0090c3 /* IC Plus Corp. */ #define MII_OUI_SEEQ 0x00a07d /* Seeq */ #define MII_OUI_ICS 0x00a0be /* Integrated Circuit Systems */ #define MII_OUI_INTEL 0x00aa00 /* Intel */ @@ -98,8 +99,9 @@ #define MII_OUI_NATSEMI 0x080017 /* National Semiconductor */ #define MII_OUI_TI 0x080028 /* Texas Instruments */ #define MII_OUI_BROADCOM4 0x18c086 /* Broadcom Corporation */ +#define MII_OUI_RENESAS 0x749050 /* Renesas */ -/* Unregisterd or wrong OUI */ +/* Unregistered or wrong OUI */ #define MII_OUI_yyREALTEK 0x04 /* Realtek */ #define MII_OUI_yyAMD 0x58 /* Advanced Micro Devices */ #define MII_OUI_xxMYSON 0x00032d /* Myson Technology */ @@ -111,6 +113,7 @@ #define MII_OUI_xxREALTEK 0x000732 /* Realtek */ #define MII_OUI_xxBROADCOM 0x000818 /* Broadcom Corporation */ #define MII_OUI_xxPMCSIERRA 0x0009c0 /* PMC-Sierra */ +#define MII_OUI_xxICPLUS 0x0009c3 /* IC Plus Corp. */ #define MII_OUI_xxMARVELL 0x000ac2 /* Marvell Semiconductor */ #define MII_OUI_xxINTEL 0x001f00 /* Intel */ #define MII_OUI_xxBROADCOM_ALT1 0x0050ef /* Broadcom Corporation */ @@ -341,14 +344,14 @@ #define MII_STR_xxDAVICOM_DM9601 "DM9601 internal 10/100 media interface" /* IC Plus Corp. PHYs */ -#define MII_MODEL_ICPLUS_IP100 0x0004 -#define MII_STR_ICPLUS_IP100 "IP100 10/100 PHY" -#define MII_MODEL_ICPLUS_IP101 0x0005 -#define MII_STR_ICPLUS_IP101 "IP101 10/100 PHY" -#define MII_MODEL_ICPLUS_IP1000A 0x0008 -#define MII_STR_ICPLUS_IP1000A "IP1000A 10/100/1000 PHY" -#define MII_MODEL_ICPLUS_IP1001 0x0019 -#define MII_STR_ICPLUS_IP1001 "IP1001 10/100/1000 PHY" +#define MII_MODEL_xxICPLUS_IP100 0x0004 +#define MII_STR_xxICPLUS_IP100 "IP100 10/100 PHY" +#define MII_MODEL_xxICPLUS_IP101 0x0005 +#define MII_STR_xxICPLUS_IP101 "IP101 10/100 PHY" +#define MII_MODEL_xxICPLUS_IP1000A 0x0008 +#define MII_STR_xxICPLUS_IP1000A "IP1000A 10/100/1000 PHY" +#define MII_MODEL_xxICPLUS_IP1001 0x0019 +#define MII_STR_xxICPLUS_IP1001 "IP1001 10/100/1000 PHY" /* Integrated Circuit Systems PHYs */ #define MII_MODEL_ICS_1889 0x0001 @@ -406,10 +409,10 @@ /* JMicron PHYs */ -#define MII_MODEL_JMICRON_JMC250 0x0021 -#define MII_STR_JMICRON_JMC250 "JMC250 10/100/1000 media interface" -#define MII_MODEL_JMICRON_JMC260 0x0022 -#define MII_STR_JMICRON_JMC260 "JMC260 10/100 media interface" +#define MII_MODEL_JMICRON_JMP211 0x0021 +#define MII_STR_JMICRON_JMP211 "JMP211 10/100/1000 media interface" +#define MII_MODEL_JMICRON_JMP202 0x0022 +#define MII_STR_JMICRON_JMP202 "JMP202 10/100 media interface" /* Level 1 PHYs */ #define MII_MODEL_xxLEVEL1_LXT970 0x Index: src/sys/dev/mii/miidevs_data.h diff -u src/sys/dev/mii/miidevs_data.h:1.116.6.7 src/sys/dev/mii/miidevs_data.h:1.116.6.8 --- src/sys/dev/mii/miidevs_data.h:1.116.6.7 Thu Oct 24 15:59:13 2019 +++ src/sys/dev/mii/miidevs_data.h Mon Nov 25 15:57:49 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs_data.h,v 1.116.6.7 2019/10/24 15:59:13 martin Exp $ */ +/* $NetBSD: miidevs_data.h,v 1.116.6.8 2019/11/25 15:57:49 martin Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.125.6.7 2019/10/24 15:58:45 martin Exp + *
CVS commit: [netbsd-8] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 15:57:50 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h Log Message: Regen for ticket #1457 To generate a diff of this commit: cvs rdiff -u -r1.128.6.7 -r1.128.6.8 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.116.6.7 -r1.116.6.8 src/sys/dev/mii/miidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 15:57:23 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-8]: miidevs rlphy.c Log Message: Pull up the following revisions, requested by msaitoh in ticket #1457: sys/dev/mii/miidevs 1.155-1.157, 1.159-1.160 sys/dev/mii/rlphy.c 1.37 via patch - miidevs update: - Add Teranetics, Aquantia and Renesas. - Change ICPLUS(0x0090c3) to xxICPLUS(0x0009c3). - Fix typo. from vezhlys. - Rename JMICRON 0x0021 from JMC250 to JMP211 - Rename JMICRON 0x0022 from JMC260 to JMP202 - rlphy(4): Print model name if it's ICPLUS IP101 to avoid printing "Realtek internal PHY". To generate a diff of this commit: cvs rdiff -u -r1.125.6.7 -r1.125.6.8 src/sys/dev/mii/miidevs cvs rdiff -u -r1.30 -r1.30.10.1 src/sys/dev/mii/rlphy.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/miidevs diff -u src/sys/dev/mii/miidevs:1.125.6.7 src/sys/dev/mii/miidevs:1.125.6.8 --- src/sys/dev/mii/miidevs:1.125.6.7 Thu Oct 24 15:58:45 2019 +++ src/sys/dev/mii/miidevs Mon Nov 25 15:57:23 2019 @@ -1,4 +1,4 @@ -$NetBSD: miidevs,v 1.125.6.7 2019/10/24 15:58:45 martin Exp $ +$NetBSD: miidevs,v 1.125.6.8 2019/11/25 15:57:23 martin Exp $ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -65,7 +65,9 @@ oui ALTIMA 0x0010a9 Altima Communicati oui ENABLESEMI 0x0010dd Enable Semiconductor oui SUNPLUS 0x001105 Sunplus Technology oui ATHEROS 0x001374 Atheros +oui TERANETICS 0x0014a6 Teranetics oui RALINK2 0x0017a5 Ralink Technology +oui AQUANTIA 0x0017b6 Aquantia Corporation oui BROADCOM3 0x001be9 Broadcom Corporation oui LEVEL1 0x00207b Level 1 oui VIA0x004063 VIA Technologies @@ -74,7 +76,6 @@ oui QUALSEMI 0x006051 Quality Semicond oui AMLOGIC 0x006051 Amlogic oui DAVICOM 0x00606e Davicom Semiconductor oui SMSC 0x00800f SMSC -oui ICPLUS 0x0090c3 IC Plus Corp. oui SEEQ 0x00a07d Seeq oui ICS0x00a0be Integrated Circuit Systems oui INTEL 0x00aa00 Intel @@ -91,8 +92,9 @@ oui XAQTI 0x00e0ae XaQti Corp. oui NATSEMI 0x080017 National Semiconductor oui TI0x080028 Texas Instruments oui BROADCOM4 0x18c086 Broadcom Corporation +oui RENESAS 0x749050 Renesas -/* Unregisterd or wrong OUI */ +/* Unregistered or wrong OUI */ oui yyREALTEK 0x04 Realtek oui yyAMD 0x58 Advanced Micro Devices oui xxMYSON 0x00032d Myson Technology @@ -104,6 +106,7 @@ oui xxQUALSEMI 0x00068a Quality Semico oui xxREALTEK 0x000732 Realtek oui xxBROADCOM 0x000818 Broadcom Corporation oui xxPMCSIERRA 0x0009c0 PMC-Sierra +oui xxICPLUS 0x0009c3 IC Plus Corp. oui xxMARVELL 0x000ac2 Marvell Semiconductor oui xxINTEL 0x001f00 Intel oui xxBROADCOM_ALT1 0x0050ef Broadcom Corporation @@ -241,10 +244,10 @@ model xxDAVICOM DM9161B 0x000b DM9161[B model xxDAVICOM DM9601 0x000c DM9601 internal 10/100 media interface /* IC Plus Corp. PHYs */ -model ICPLUS IP100 0x0004 IP100 10/100 PHY -model ICPLUS IP101 0x0005 IP101 10/100 PHY -model ICPLUS IP1000A 0x0008 IP1000A 10/100/1000 PHY -model ICPLUS IP1001 0x0019 IP1001 10/100/1000 PHY +model xxICPLUS IP100 0x0004 IP100 10/100 PHY +model xxICPLUS IP101 0x0005 IP101 10/100 PHY +model xxICPLUS IP1000A 0x0008 IP1000A 10/100/1000 PHY +model xxICPLUS IP1001 0x0019 IP1001 10/100/1000 PHY /* Integrated Circuit Systems PHYs */ model ICS 1889 0x0001 ICS1889 10/100 media interface @@ -277,8 +280,8 @@ model ATTANSIC I82578 0x0004 Intel 8257 /* JMicron PHYs */ -model JMICRON JMC250 0x0021 JMC250 10/100/1000 media interface -model JMICRON JMC260 0x0022 JMC260 10/100 media interface +model JMICRON JMP211 0x0021 JMP211 10/100/1000 media interface +model JMICRON JMP202 0x0022 JMP202 10/100 media interface /* Level 1 PHYs */ model xxLEVEL1 LXT970 0x LXT970 10/100 media interface Index: src/sys/dev/mii/rlphy.c diff -u src/sys/dev/mii/rlphy.c:1.30 src/sys/dev/mii/rlphy.c:1.30.10.1 --- src/sys/dev/mii/rlphy.c:1.30 Thu Jul 7 06:55:41 2016 +++ src/sys/dev/mii/rlphy.c Mon Nov 25 15:57:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rlphy.c,v 1.30 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: rlphy.c,v 1.30.10.1 2019/11/25 15:57:23 martin Exp $ */ /* $OpenBSD: rlphy.c,v 1.20 2005/07/31 05:27:30 pvalchev Exp $ */ /* @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.30 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.30.10.1 2019/11/25 15:57:23 martin Exp $"); #include #include @@ -79,8 +79,8 @@ const struct mii_phy_funcs rlphy_funcs = static const struct mii_phydesc rlphys[] = { { MII_OUI_yyREALTEK, MII_MODEL_yyREALTEK_RTL8201L, MII_STR_yyREALTEK_RTL8201L }, - { MII_OUI_ICPLUS, MII_MODEL_ICPLUS_IP101, - MII_STR_ICPLUS_IP101 }, + { MII_OUI_xxICPLUS, MII_MODEL_xxICPLUS_IP101, + MII_STR_xxICPLUS_IP101 }, { 0,0,
CVS commit: [netbsd-8] src/sys/dev/mii
Module Name:src Committed By: martin Date: Mon Nov 25 15:57:23 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-8]: miidevs rlphy.c Log Message: Pull up the following revisions, requested by msaitoh in ticket #1457: sys/dev/mii/miidevs 1.155-1.157, 1.159-1.160 sys/dev/mii/rlphy.c 1.37 via patch - miidevs update: - Add Teranetics, Aquantia and Renesas. - Change ICPLUS(0x0090c3) to xxICPLUS(0x0009c3). - Fix typo. from vezhlys. - Rename JMICRON 0x0021 from JMC250 to JMP211 - Rename JMICRON 0x0022 from JMC260 to JMP202 - rlphy(4): Print model name if it's ICPLUS IP101 to avoid printing "Realtek internal PHY". To generate a diff of this commit: cvs rdiff -u -r1.125.6.7 -r1.125.6.8 src/sys/dev/mii/miidevs cvs rdiff -u -r1.30 -r1.30.10.1 src/sys/dev/mii/rlphy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 15:48:04 UTC 2019 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.3 Log Message: Ticket #1714 To generate a diff of this commit: cvs rdiff -u -r1.1.2.61 -r1.1.2.62 src/doc/CHANGES-7.1.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 15:48:40 UTC 2019 Modified Files: src/sys/kern [netbsd-7-0]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1714): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.24.2.1.2.1 -r1.24.2.1.2.2 src/sys/kern/subr_cprng.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 15:49:05 UTC 2019 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: Ticket #1714 To generate a diff of this commit: cvs rdiff -u -r1.1.2.154 -r1.1.2.155 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 15:48:04 UTC 2019 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.3 Log Message: Ticket #1714 To generate a diff of this commit: cvs rdiff -u -r1.1.2.61 -r1.1.2.62 src/doc/CHANGES-7.1.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1.3 diff -u src/doc/CHANGES-7.1.3:1.1.2.61 src/doc/CHANGES-7.1.3:1.1.2.62 --- src/doc/CHANGES-7.1.3:1.1.2.61 Thu Oct 31 01:54:21 2019 +++ src/doc/CHANGES-7.1.3 Mon Nov 25 15:48:04 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.3,v 1.1.2.61 2019/10/31 01:54:21 martin Exp $ +# $NetBSD: CHANGES-7.1.3,v 1.1.2.62 2019/11/25 15:48:04 martin Exp $ A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3 release: @@ -607,3 +607,8 @@ sys/modules/filemon/Makefile 1.4 (manu Do not install the filemon module. [maya, ticket #1710] +sys/kern/subr_cprng.c1.33 + + Use cprng_strong, not cprng_fast, for sysctl kern.arnd. + [riastradh, ticket #1714] +
CVS commit: [netbsd-7-0] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 15:48:40 UTC 2019 Modified Files: src/sys/kern [netbsd-7-0]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1714): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.24.2.1.2.1 -r1.24.2.1.2.2 src/sys/kern/subr_cprng.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/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.24.2.1.2.1 src/sys/kern/subr_cprng.c:1.24.2.1.2.2 --- src/sys/kern/subr_cprng.c:1.24.2.1.2.1 Tue Sep 3 12:30:46 2019 +++ src/sys/kern/subr_cprng.c Mon Nov 25 15:48:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.24.2.1.2.1 2019/09/03 12:30:46 martin Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.24.2.1.2.2 2019/11/25 15:48:40 martin Exp $ */ /*- * Copyright (c) 2011-2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.24.2.1.2.1 2019/09/03 12:30:46 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.24.2.1.2.2 2019/11/25 15:48:40 martin Exp $"); #include #include @@ -508,6 +508,7 @@ cprng_strong_rndsink_callback(void *cont mutex_exit(>cs_lock); } +static ONCE_DECL(sysctl_prng_once); static cprng_strong_t *sysctl_prng; static int @@ -527,10 +528,9 @@ makeprng(void) static int sysctl_kern_urnd(SYSCTLFN_ARGS) { - static ONCE_DECL(control); int v, rv; - RUN_ONCE(, makeprng); + RUN_ONCE(_prng_once, makeprng); rv = cprng_strong(sysctl_prng, , sizeof(v), 0); if (rv == sizeof(v)) { struct sysctlnode node = *rnode; @@ -559,6 +559,7 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) int error; void *v; struct sysctlnode node = *rnode; + size_t n __diagused; switch (*oldlenp) { case 0: @@ -567,8 +568,10 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) if (*oldlenp > 256) { return E2BIG; } + RUN_ONCE(_prng_once, makeprng); v = kmem_alloc(*oldlenp, KM_SLEEP); - cprng_fast(v, *oldlenp); + n = cprng_strong(sysctl_prng, v, *oldlenp, 0); + KASSERT(n == *oldlenp); node.sysctl_data = v; node.sysctl_size = *oldlenp; error = sysctl_lookup(SYSCTLFN_CALL());
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 15:47:16 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1714 To generate a diff of this commit: cvs rdiff -u -r1.1.2.68 -r1.1.2.69 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.68 src/doc/CHANGES-7.3:1.1.2.69 --- src/doc/CHANGES-7.3:1.1.2.68 Sat Nov 16 16:17:37 2019 +++ src/doc/CHANGES-7.3 Mon Nov 25 15:47:16 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.68 2019/11/16 16:17:37 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.69 2019/11/25 15:47:16 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -726,3 +726,8 @@ sys/dev/usb/usbdi.h1.97 (patch) Work around memory corruption problem triggered by axe(4). [mrg, ticket #1713] +sys/kern/subr_cprng.c1.33 + + Use cprng_strong, not cprng_fast, for sysctl kern.arnd. + [riastradh, ticket #1714] +
CVS commit: [netbsd-7-1] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 15:47:44 UTC 2019 Modified Files: src/sys/kern [netbsd-7-1]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1714): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.24.2.1.6.1 -r1.24.2.1.6.2 src/sys/kern/subr_cprng.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/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.24.2.1.6.1 src/sys/kern/subr_cprng.c:1.24.2.1.6.2 --- src/sys/kern/subr_cprng.c:1.24.2.1.6.1 Tue Sep 3 12:28:31 2019 +++ src/sys/kern/subr_cprng.c Mon Nov 25 15:47:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.24.2.1.6.1 2019/09/03 12:28:31 martin Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.24.2.1.6.2 2019/11/25 15:47:44 martin Exp $ */ /*- * Copyright (c) 2011-2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.24.2.1.6.1 2019/09/03 12:28:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.24.2.1.6.2 2019/11/25 15:47:44 martin Exp $"); #include #include @@ -508,6 +508,7 @@ cprng_strong_rndsink_callback(void *cont mutex_exit(>cs_lock); } +static ONCE_DECL(sysctl_prng_once); static cprng_strong_t *sysctl_prng; static int @@ -527,10 +528,9 @@ makeprng(void) static int sysctl_kern_urnd(SYSCTLFN_ARGS) { - static ONCE_DECL(control); int v, rv; - RUN_ONCE(, makeprng); + RUN_ONCE(_prng_once, makeprng); rv = cprng_strong(sysctl_prng, , sizeof(v), 0); if (rv == sizeof(v)) { struct sysctlnode node = *rnode; @@ -559,6 +559,7 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) int error; void *v; struct sysctlnode node = *rnode; + size_t n __diagused; switch (*oldlenp) { case 0: @@ -567,8 +568,10 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) if (*oldlenp > 256) { return E2BIG; } + RUN_ONCE(_prng_once, makeprng); v = kmem_alloc(*oldlenp, KM_SLEEP); - cprng_fast(v, *oldlenp); + n = cprng_strong(sysctl_prng, v, *oldlenp, 0); + KASSERT(n == *oldlenp); node.sysctl_data = v; node.sysctl_size = *oldlenp; error = sysctl_lookup(SYSCTLFN_CALL());
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 15:47:16 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1714 To generate a diff of this commit: cvs rdiff -u -r1.1.2.68 -r1.1.2.69 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 15:46:39 UTC 2019 Modified Files: src/sys/kern [netbsd-7]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1714): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.24.2.2 -r1.24.2.3 src/sys/kern/subr_cprng.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/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.24.2.2 src/sys/kern/subr_cprng.c:1.24.2.3 --- src/sys/kern/subr_cprng.c:1.24.2.2 Tue Sep 3 12:20:43 2019 +++ src/sys/kern/subr_cprng.c Mon Nov 25 15:46:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.24.2.2 2019/09/03 12:20:43 martin Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.24.2.3 2019/11/25 15:46:39 martin Exp $ */ /*- * Copyright (c) 2011-2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.24.2.2 2019/09/03 12:20:43 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.24.2.3 2019/11/25 15:46:39 martin Exp $"); #include #include @@ -508,6 +508,7 @@ cprng_strong_rndsink_callback(void *cont mutex_exit(>cs_lock); } +static ONCE_DECL(sysctl_prng_once); static cprng_strong_t *sysctl_prng; static int @@ -527,10 +528,9 @@ makeprng(void) static int sysctl_kern_urnd(SYSCTLFN_ARGS) { - static ONCE_DECL(control); int v, rv; - RUN_ONCE(, makeprng); + RUN_ONCE(_prng_once, makeprng); rv = cprng_strong(sysctl_prng, , sizeof(v), 0); if (rv == sizeof(v)) { struct sysctlnode node = *rnode; @@ -559,6 +559,7 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) int error; void *v; struct sysctlnode node = *rnode; + size_t n __diagused; switch (*oldlenp) { case 0: @@ -567,8 +568,10 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) if (*oldlenp > 256) { return E2BIG; } + RUN_ONCE(_prng_once, makeprng); v = kmem_alloc(*oldlenp, KM_SLEEP); - cprng_fast(v, *oldlenp); + n = cprng_strong(sysctl_prng, v, *oldlenp, 0); + KASSERT(n == *oldlenp); node.sysctl_data = v; node.sysctl_size = *oldlenp; error = sysctl_lookup(SYSCTLFN_CALL());
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 15:46:39 UTC 2019 Modified Files: src/sys/kern [netbsd-7]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1714): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.24.2.2 -r1.24.2.3 src/sys/kern/subr_cprng.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Mon Nov 25 15:49:05 UTC 2019 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: Ticket #1714 To generate a diff of this commit: cvs rdiff -u -r1.1.2.154 -r1.1.2.155 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.154 src/doc/CHANGES-7.0.3:1.1.2.155 --- src/doc/CHANGES-7.0.3:1.1.2.154 Thu Oct 31 01:55:22 2019 +++ src/doc/CHANGES-7.0.3 Mon Nov 25 15:49:05 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.154 2019/10/31 01:55:22 martin Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.155 2019/11/25 15:49:05 martin Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -5915,3 +5915,8 @@ sys/modules/filemon/Makefile 1.4 (manu Do not install the filemon module. [maya, ticket #1710] +sys/kern/subr_cprng.c1.33 + + Use cprng_strong, not cprng_fast, for sysctl kern.arnd. + [riastradh, ticket #1714] +
CVS commit: [netbsd-7-1] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 25 15:47:44 UTC 2019 Modified Files: src/sys/kern [netbsd-7-1]: subr_cprng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1714): sys/kern/subr_cprng.c: revision 1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.24.2.1.6.1 -r1.24.2.1.6.2 src/sys/kern/subr_cprng.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes/common
Module Name:src Committed By: pgoyette Date: Mon Nov 25 15:40:18 UTC 2019 Modified Files: src/distrib/notes/common: main Log Message: Improve heading a bit. While here, use quotes to group some of the words to avoid the 9-arg limitation of .Ss To generate a diff of this commit: cvs rdiff -u -r1.555 -r1.556 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes/common
Module Name:src Committed By: pgoyette Date: Mon Nov 25 15:40:18 UTC 2019 Modified Files: src/distrib/notes/common: main Log Message: Improve heading a bit. While here, use quotes to group some of the words to avoid the 9-arg limitation of .Ss To generate a diff of this commit: cvs rdiff -u -r1.555 -r1.556 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.555 src/distrib/notes/common/main:1.556 --- src/distrib/notes/common/main:1.555 Sun Nov 24 16:16:21 2019 +++ src/distrib/notes/common/main Mon Nov 25 15:40:18 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.555 2019/11/24 16:16:21 pgoyette Exp $ +.\" $NetBSD: main,v 1.556 2019/11/25 15:40:18 pgoyette Exp $ .\" .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -519,8 +519,8 @@ would not exist. . .ie \n[RELEASE_BRANCH] .Ss Changes Between The NetBSD \n[oldvers] \ and \n[major] Releases -.el .Ss Changes Between The NetBSD \n[oldvers], \ -the \n[major] Releases, and newer. +.el .Ss "Changes Between The NetBSD \n[oldvers] and" \ +\n[major] Releases, and newer. .Pp The .Nx
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Mon Nov 25 15:19:54 UTC 2019 Modified Files: src/sys/kern: subr_cprng.c Log Message: Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/kern/subr_cprng.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/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.32 src/sys/kern/subr_cprng.c:1.33 --- src/sys/kern/subr_cprng.c:1.32 Sun Nov 17 12:32:31 2019 +++ src/sys/kern/subr_cprng.c Mon Nov 25 15:19:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.32 2019/11/17 12:32:31 nia Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.33 2019/11/25 15:19:54 riastradh Exp $ */ /*- * Copyright (c) 2011-2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.32 2019/11/17 12:32:31 nia Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.33 2019/11/25 15:19:54 riastradh Exp $"); #include #include @@ -539,6 +539,7 @@ cprng_strong_rndsink_callback(void *cont mutex_exit(>cs_lock); } +static ONCE_DECL(sysctl_prng_once); static cprng_strong_t *sysctl_prng; static int @@ -558,10 +559,9 @@ makeprng(void) static int sysctl_kern_urnd(SYSCTLFN_ARGS) { - static ONCE_DECL(control); int v, rv; - RUN_ONCE(, makeprng); + RUN_ONCE(_prng_once, makeprng); rv = cprng_strong(sysctl_prng, , sizeof(v), 0); if (rv == sizeof(v)) { struct sysctlnode node = *rnode; @@ -591,6 +591,7 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) int error; void *v; struct sysctlnode node = *rnode; + size_t n __diagused; switch (*oldlenp) { case 0: @@ -599,8 +600,10 @@ sysctl_kern_arnd(SYSCTLFN_ARGS) if (*oldlenp > 256) { return E2BIG; } + RUN_ONCE(_prng_once, makeprng); v = kmem_alloc(*oldlenp, KM_SLEEP); - cprng_fast(v, *oldlenp); + n = cprng_strong(sysctl_prng, v, *oldlenp, 0); + KASSERT(n == *oldlenp); node.sysctl_data = v; node.sysctl_size = *oldlenp; error = sysctl_lookup(SYSCTLFN_CALL());
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Mon Nov 25 15:19:54 UTC 2019 Modified Files: src/sys/kern: subr_cprng.c Log Message: Use cprng_strong, not cprng_fast, for sysctl kern.arnd. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/kern/subr_cprng.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/hyperv
Module Name:src Committed By: nonaka Date: Mon Nov 25 08:53:39 UTC 2019 Modified Files: src/sys/dev/hyperv: hvs.c if_hvn.c Log Message: hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hyperv/hvs.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/hyperv
Module Name:src Committed By: nonaka Date: Mon Nov 25 08:53:39 UTC 2019 Modified Files: src/sys/dev/hyperv: hvs.c if_hvn.c Log Message: hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hyperv/hvs.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/hyperv/if_hvn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hyperv/hvs.c diff -u src/sys/dev/hyperv/hvs.c:1.2 src/sys/dev/hyperv/hvs.c:1.3 --- src/sys/dev/hyperv/hvs.c:1.2 Tue Oct 1 18:00:08 2019 +++ src/sys/dev/hyperv/hvs.c Mon Nov 25 08:53:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hvs.c,v 1.2 2019/10/01 18:00:08 chs Exp $ */ +/* $NetBSD: hvs.c,v 1.3 2019/11/25 08:53:39 nonaka Exp $ */ /* $OpenBSD: hvs.c,v 1.17 2017/08/10 17:22:48 mikeb Exp $ */ /*- @@ -37,7 +37,7 @@ /* #define HVS_DEBUG_IO */ #include -__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.2 2019/10/01 18:00:08 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.3 2019/11/25 08:53:39 nonaka Exp $"); #include #include @@ -1084,7 +1084,8 @@ hvs_free_ccbs(struct hvs_softc *sc) if (ccb->ccb_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, + 0, ccb->ccb_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ccb->ccb_dmap); bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmap); Index: src/sys/dev/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.9 src/sys/dev/hyperv/if_hvn.c:1.10 --- src/sys/dev/hyperv/if_hvn.c:1.9 Fri Nov 22 12:40:07 2019 +++ src/sys/dev/hyperv/if_hvn.c Mon Nov 25 08:53:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.9 2019/11/22 12:40:07 nonaka Exp $ */ +/* $NetBSD: if_hvn.c,v 1.10 2019/11/25 08:53:39 nonaka Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.9 2019/11/22 12:40:07 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.10 2019/11/25 08:53:39 nonaka Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -632,7 +632,8 @@ hvn_decap(struct hvn_softc *sc, struct h { struct ifnet *ifp = SC2IFP(sc); - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); txd->txd_buf = NULL; @@ -667,7 +668,8 @@ hvn_txeof(struct hvn_softc *sc, uint64_t } txd->txd_buf = NULL; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); m_freem(m); @@ -844,7 +846,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc txd = >sc_tx_desc[i]; if (txd->txd_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); bus_dmamap_destroy(sc->sc_dmat, txd->txd_dmap); @@ -855,7 +858,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc txd->txd_buf = NULL; } if (sc->sc_tx_rmap) { - bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, sc->sc_tx_rmap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_tx_rmap);