CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: mlelstv Date: Mon Jun 7 05:29:22 UTC 2021 Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: Don't overwrite changed autofs config files. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: mlelstv Date: Mon Jun 7 05:29:22 UTC 2021 Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: Don't overwrite changed autofs config files. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/postinstall/postinstall.in 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/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.38 src/usr.sbin/postinstall/postinstall.in:1.39 --- src/usr.sbin/postinstall/postinstall.in:1.38 Sun Apr 25 06:21:37 2021 +++ src/usr.sbin/postinstall/postinstall.in Mon Jun 7 05:29:22 2021 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.38 2021/04/25 06:21:37 lukem Exp $ +# $NetBSD: postinstall.in,v 1.39 2021/06/07 05:29:22 mlelstv Exp $ # # Copyright (c) 2002-2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -902,12 +902,12 @@ special_null mkdir -p "${DEST_DIR}/etc/autofs" fi failed=$(( ${failed} + $? )) - populate_dir "$op" false "${SRC_DIR}/etc" \ + populate_dir "$op" true "${SRC_DIR}/etc" \ "${DEST_DIR}/etc" \ 644 \ auto_master failed=$(( ${failed} + $? )) - populate_dir "$op" false "${SRC_DIR}/etc/autofs" \ + populate_dir "$op" true "${SRC_DIR}/etc/autofs" \ "${DEST_DIR}/etc/autofs" \ 644 \ ${autofs_files}
CVS commit: src/share/man/man4
Module Name:src Committed By: dholland Date: Mon Jun 7 03:04:50 UTC 2021 Modified Files: src/share/man/man4: ums.4 Log Message: Mention in ums(4) that a lot of usb mice detach/reattcah when not in use. Prompted by PR 56209 but not related to the actual problem there. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/ums.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ums.4 diff -u src/share/man/man4/ums.4:1.11 src/share/man/man4/ums.4:1.12 --- src/share/man/man4/ums.4:1.11 Wed Sep 6 14:47:35 2017 +++ src/share/man/man4/ums.4 Mon Jun 7 03:04:50 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: ums.4,v 1.11 2017/09/06 14:47:35 ryoon Exp $ +.\" $NetBSD: ums.4,v 1.12 2021/06/07 03:04:50 dholland Exp $ .\" .\" Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 6, 2017 +.Dd June 6, 2021 .Dt UMS 4 .Os .Sh NAME @@ -43,6 +43,16 @@ driver provides support for USB mice and Access to the movement data is through the .Xr wsmouse 4 driver. +.Pp +Be aware that many USB mice will, if the mouse device is not open, +detach and reattach themselves repeatedly at regular intervals +(usually around one minute) causing spam on the console and the system +log. +This is apparently intentional behavior on the part of the hardware +manufacturers. +The best workaround is to keep the mouse device open, either via +X11, or, if not using the window system, by running +.Xr wsmoused 8 . .Sh SEE ALSO .Xr uhidev 4 , .Xr usb 4 ,
CVS commit: src/share/man/man4
Module Name:src Committed By: dholland Date: Mon Jun 7 03:04:50 UTC 2021 Modified Files: src/share/man/man4: ums.4 Log Message: Mention in ums(4) that a lot of usb mice detach/reattcah when not in use. Prompted by PR 56209 but not related to the actual problem there. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/ums.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [cjep_sun2x] src
Module Name:src Committed By: cjep Date: Sun Jun 6 20:30:55 UTC 2021 Modified Files: src/bin/ps [cjep_sun2x]: ps.1 ps.c src/distrib/amd64/installimage [cjep_sun2x]: Makefile src/distrib/common/bootimage [cjep_sun2x]: Makefile.bootimage src/distrib/sets/lists/man [cjep_sun2x]: mi src/distrib/sets/lists/tests [cjep_sun2x]: mi src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el [cjep_sun2x]: config.h src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el [cjep_sun2x]: c++config.h symver-config.h src/external/gpl3/gcc/usr.bin/gcc/arch/mipsn64el [cjep_sun2x]: auto-host.h configargs.h src/external/gpl3/gcc/usr.bin/libcpp/arch/mipsn64el [cjep_sun2x]: config.h src/external/gpl3/gdb/dist/gdb [cjep_sun2x]: aarch64-nbsd-tdep.c src/external/mit/xorg/bin/beforelight [cjep_sun2x]: Makefile src/external/mit/xorg/bin/cxpm [cjep_sun2x]: Makefile src/external/mit/xorg/bin/ssh-askpass [cjep_sun2x]: Makefile src/external/mit/xorg/bin/sxpm [cjep_sun2x]: Makefile src/external/mit/xorg/bin/viewres [cjep_sun2x]: Makefile src/external/mit/xorg/bin/x11perf [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xauth [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xclock [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xditview [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xdm [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xdm/chooser [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xdpyinfo [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xeyes [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xfd [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xgamma [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xinput [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xkbutils [cjep_sun2x]: Makefile.xkbutils src/external/mit/xorg/bin/xlogo [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xset [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xsetroot [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xterm [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xvidtune [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xwininfo [cjep_sun2x]: Makefile src/external/mit/xorg/server/drivers/xf86-input-keyboard [cjep_sun2x]: Makefile src/games/fortune/datfiles [cjep_sun2x]: netbsd-tips src/lib/libcurses [cjep_sun2x]: addbytes.c src/sbin/cgdconfig [cjep_sun2x]: params.c src/sbin/mount [cjep_sun2x]: mount.8 mount.c src/sbin/mount_chfs [cjep_sun2x]: mount_chfs.c mount_chfs.h src/share/man/man4 [cjep_sun2x]: options.4 urtwn.4 src/share/man/man4/man4.i386 [cjep_sun2x]: Makefile intro.4 src/share/man/man4/man4.x86 [cjep_sun2x]: Makefile src/share/man/man8 [cjep_sun2x]: afterboot.8 src/share/mk [cjep_sun2x]: bsd.own.mk bsd.x11.mk src/sys/arch/aarch64/aarch64 [cjep_sun2x]: aarch64_machdep.c src/sys/arch/algor/conf [cjep_sun2x]: std.algor64 src/sys/arch/amiga/dev [cjep_sun2x]: kbd.c ms.c src/sys/arch/arm/arm32 [cjep_sun2x]: arm32_boot.c src/sys/arch/epoc32/include [cjep_sun2x]: intr.h src/sys/arch/evbppc/conf [cjep_sun2x]: DHT src/sys/arch/hp300/dev [cjep_sun2x]: rdvar.h src/sys/arch/hpcarm/include [cjep_sun2x]: intr.h src/sys/arch/m68k/conf [cjep_sun2x]: std.m68k src/sys/arch/playstation2/conf [cjep_sun2x]: std.playstation2 src/sys/arch/playstation2/ee [cjep_sun2x]: timer.c src/sys/arch/playstation2/playstation2 [cjep_sun2x]: interrupt.c src/sys/arch/sbmips/stand/netboot [cjep_sun2x]: dev_net.c src/sys/arch/sh3/conf [cjep_sun2x]: std.sh3 src/sys/arch/sparc/conf [cjep_sun2x]: std.sparc src/sys/arch/vax/conf [cjep_sun2x]: std.vax src/sys/arch/x86/pci [cjep_sun2x]: amdzentemp.c src/sys/arch/zaurus/include [cjep_sun2x]: intr.h src/sys/conf [cjep_sun2x]: Makefile.kern.inc src/sys/dev [cjep_sun2x]: ipmi.c src/sys/dev/audio [cjep_sun2x]: audio.c src/sys/dev/dkwedge [cjep_sun2x]: dk.c src/sys/dev/hpc [cjep_sun2x]: hpcfb.c src/sys/dev/ic [cjep_sun2x]: tpm.c src/sys/dev/isa [cjep_sun2x]: itesio_isavar.h src/sys/dev/iscsi [cjep_sun2x]: iscsi_main.c iscsi_send.c src/sys/dev/mii [cjep_sun2x]: mii_verbose.c src/sys/dev/pci [cjep_sun2x]: if_ti.c if_tireg.h src/sys/dev/scsipi [cjep_sun2x]: scsipi_verbose.c src/sys/external/bsd/drm2/drm [cjep_sun2x]: files.drmkms src/sys/external/bsd/drm2/i915drm [cjep_sun2x]: files.i915drmkms src/sys/external/bsd/drm2/nouveau [cjep_sun2x]: files.nouveau src/sys/external/bsd/drm2/radeon [cjep_sun2x]: files.radeon src/sys/kern [cjep_sun2x]: kern_ksyms.c kern_tc.c
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jdolecek Date: Sun Jun 6 18:37:20 UTC 2021 Modified Files: src/sys/dev/usb: xhci.c Log Message: also reset xs->xs_xr[dci] to NULL when closing the pipe avoids KASSERT() on next xhci_open() should fix PR kern/56194 by nia To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/dev/usb/xhci.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/xhci.c diff -u src/sys/dev/usb/xhci.c:1.143 src/sys/dev/usb/xhci.c:1.144 --- src/sys/dev/usb/xhci.c:1.143 Sat May 29 16:49:30 2021 +++ src/sys/dev/usb/xhci.c Sun Jun 6 18:37:20 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.143 2021/05/29 16:49:30 riastradh Exp $ */ +/* $NetBSD: xhci.c,v 1.144 2021/06/06 18:37:20 jdolecek Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.143 2021/05/29 16:49:30 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.144 2021/06/06 18:37:20 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -2159,6 +2159,7 @@ xhci_close_pipe(struct usbd_pipe *pipe) usb_syncmem(>xs_dc_dma, 0, sc->sc_pgsz, BUS_DMASYNC_POSTREAD); xhci_ring_free(sc, >xs_xr[dci]); + xs->xs_xr[dci] = NULL; } /*
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jdolecek Date: Sun Jun 6 18:37:20 UTC 2021 Modified Files: src/sys/dev/usb: xhci.c Log Message: also reset xs->xs_xr[dci] to NULL when closing the pipe avoids KASSERT() on next xhci_open() should fix PR kern/56194 by nia To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/dev/usb/xhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/tests/lib/csu
In article , Joerg Sonnenberger wrote: >On Fri, Jun 04, 2021 at 10:20:24PM -, Christos Zoulas wrote: >> In article , Joerg Sonnenberger > wrote: >> >On Thu, Jun 03, 2021 at 04:17:37PM -0400, Christos Zoulas wrote: >> >> Module Name: src >> >> Committed By: christos >> >> Date: Thu Jun 3 20:17:37 UTC 2021 >> >> >> >> Modified Files: >> >> src/tests/lib/csu: h_ifunc_static.c >> >> >> >> Log Message: >> >> PR/56230: Jan-Benedict Glaw: arm oabi does not and will not have ifunc >> >support. >> > >> >As I mentioned elsewhere, I disagree with this change. OABI is dead and >> >only really support for legacy compatibility. All the OABI build >> >variants should be removed and this is strongly a step in the wrong >> >direction. >> >> I think it is better to do it after the 10 branch. It is not just removing >> the build.sh targets, we need to remove the compat glue and fix the sets, >> and perhaps something else I am missing. I will revert the two changes >> once we remove all oabi support. > >I don't see how that's related. I'm not talking about removing the >compat layer right now. Remove the build.sh targets and call it a day. CC:ed tech-toolchain. Does everyone agree to remove the oabi build targets? christos
CVS commit: src/sys/arch/algor/conf
Module Name:src Committed By: christos Date: Sun Jun 6 13:59:48 UTC 2021 Modified Files: src/sys/arch/algor/conf: std.algor64 Log Message: Don't reset MACHINE_ARCH; it can be mipsn64el now, and we need to be able to find the compiler. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/algor/conf/std.algor64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/algor/conf
Module Name:src Committed By: christos Date: Sun Jun 6 13:59:48 UTC 2021 Modified Files: src/sys/arch/algor/conf: std.algor64 Log Message: Don't reset MACHINE_ARCH; it can be mipsn64el now, and we need to be able to find the compiler. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/algor/conf/std.algor64 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/algor/conf/std.algor64 diff -u src/sys/arch/algor/conf/std.algor64:1.2 src/sys/arch/algor/conf/std.algor64:1.3 --- src/sys/arch/algor/conf/std.algor64:1.2 Sun Dec 13 19:46:00 2009 +++ src/sys/arch/algor/conf/std.algor64 Sun Jun 6 09:59:48 2021 @@ -1,8 +1,8 @@ -# $NetBSD: std.algor64,v 1.2 2009/12/14 00:46:00 matt Exp $ +# $NetBSD: std.algor64,v 1.3 2021/06/06 13:59:48 christos Exp $ # standard, required pmax info no makeoptions MACHINE_ARCH -makeoptions MACHINE_ARCH="mips64el" +#makeoptions MACHINE_ARCH="mips64el" # Standard exec-package options options EXEC_ELF64 # 64-bit ELF support (native format)
CVS commit: src/sys/dev
Module Name:src Committed By: mlelstv Date: Sun Jun 6 11:48:55 UTC 2021 Modified Files: src/sys/dev: ipmi.c Log Message: Fail open when ipmi device was found. Clear sc_envsys on failure to prevent double-free. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ipmi.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
Module Name:src Committed By: mlelstv Date: Sun Jun 6 11:48:55 UTC 2021 Modified Files: src/sys/dev: ipmi.c Log Message: Fail open when ipmi device was found. Clear sc_envsys on failure to prevent double-free. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ipmi.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/ipmi.c diff -u src/sys/dev/ipmi.c:1.5 src/sys/dev/ipmi.c:1.6 --- src/sys/dev/ipmi.c:1.5 Mon Aug 17 08:34:36 2020 +++ src/sys/dev/ipmi.c Sun Jun 6 11:48:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ipmi.c,v 1.5 2020/08/17 08:34:36 nonaka Exp $ */ +/* $NetBSD: ipmi.c,v 1.6 2021/06/06 11:48:55 mlelstv Exp $ */ /* * Copyright (c) 2019 Michael van Elst @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.5 2020/08/17 08:34:36 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.6 2021/06/06 11:48:55 mlelstv Exp $"); #include #include @@ -238,7 +238,6 @@ static int bmc_io_wait(struct ipmi_softc static int bmc_io_wait_spin(struct ipmi_softc *, int, uint8_t, uint8_t); static int bmc_io_wait_sleep(struct ipmi_softc *, int, uint8_t, uint8_t); -static void *bt_buildmsg(struct ipmi_softc *, int, int, int, const void *, int *); static void *cmn_buildmsg(struct ipmi_softc *, int, int, int, const void *, int *); static int getbits(uint8_t *, int, int); @@ -268,6 +267,7 @@ static int kcs_reset(struct ipmi_softc * static int kcs_sendmsg(struct ipmi_softc *, int, const uint8_t *); static int kcs_recvmsg(struct ipmi_softc *, int, int *len, uint8_t *); +static void *bt_buildmsg(struct ipmi_softc *, int, int, int, const void *, int *); static int bt_probe(struct ipmi_softc *); static int bt_reset(struct ipmi_softc *); static int bt_sendmsg(struct ipmi_softc *, int, const uint8_t *); @@ -2034,6 +2034,7 @@ ipmi_thread(void *cookie) if (sysmon_envsys_register(sc->sc_envsys)) { aprint_error_dev(self, "unable to register with sysmon\n"); sysmon_envsys_destroy(sc->sc_envsys); + sc->sc_envsys = NULL; } /* initialize sensor list for thread */ @@ -2314,6 +2315,13 @@ ipmi_suspend(device_t dev, const pmf_qua static int ipmi_open(dev_t dev, int flag, int fmt, lwp_t *l) { + struct ipmi_softc *sc; + int unit; + + unit = IPMIUNIT(dev); + if ((sc = device_lookup_private(_cd, unit)) == NULL) + return (ENXIO); + return 0; }
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: nonaka Date: Sun Jun 6 11:35:22 UTC 2021 Modified Files: src/sys/arch/x86/pci: amdzentemp.c Log Message: Fix build failure on i386. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x86/pci/amdzentemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/amdzentemp.c diff -u src/sys/arch/x86/pci/amdzentemp.c:1.13 src/sys/arch/x86/pci/amdzentemp.c:1.14 --- src/sys/arch/x86/pci/amdzentemp.c:1.13 Sun Jun 6 08:45:18 2021 +++ src/sys/arch/x86/pci/amdzentemp.c Sun Jun 6 11:35:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amdzentemp.c,v 1.13 2021/06/06 08:45:18 nonaka Exp $ */ +/* $NetBSD: amdzentemp.c,v 1.14 2021/06/06 11:35:22 nonaka Exp $ */ /* $OpenBSD: kate.c,v 1.2 2008/03/27 04:52:03 cnst Exp $ */ /* @@ -53,7 +53,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.13 2021/06/06 08:45:18 nonaka Exp $ "); +__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.14 2021/06/06 11:35:22 nonaka Exp $ "); #include #include @@ -431,8 +431,9 @@ static void amdzentemp_setup_ccd_sensors(struct amdzentemp_softc *sc) { envsys_data_t *edata; + size_t i; uint32_t temp; - int i, error; + int error; for (i = 0; i < sc->sc_numsensors - 1; i++) { error = amdsmn_read(sc->sc_smn, @@ -446,7 +447,7 @@ amdzentemp_setup_ccd_sensors(struct amdz edata->flags = ENVSYS_FHAS_ENTROPY; edata->private = CCD_BASE + i; snprintf(edata->desc, sizeof(edata->desc), - "cpu%u ccd%u temperature", device_unit(sc->sc_dev), i); + "cpu%u ccd%zu temperature", device_unit(sc->sc_dev), i); } }
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: nonaka Date: Sun Jun 6 11:35:22 UTC 2021 Modified Files: src/sys/arch/x86/pci: amdzentemp.c Log Message: Fix build failure on i386. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x86/pci/amdzentemp.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/iscsi
Module Name:src Committed By: mlelstv Date: Sun Jun 6 10:40:14 UTC 2021 Modified Files: src/sys/dev/iscsi: iscsi_main.c Log Message: Provide missing file ops. Before a simple read() would panic the kernel. No longer fail close(). To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/iscsi/iscsi_main.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/iscsi
Module Name:src Committed By: mlelstv Date: Sun Jun 6 10:40:14 UTC 2021 Modified Files: src/sys/dev/iscsi: iscsi_main.c Log Message: Provide missing file ops. Before a simple read() would panic the kernel. No longer fail close(). To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/iscsi/iscsi_main.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/iscsi/iscsi_main.c diff -u src/sys/dev/iscsi/iscsi_main.c:1.35 src/sys/dev/iscsi/iscsi_main.c:1.36 --- src/sys/dev/iscsi/iscsi_main.c:1.35 Sat Apr 24 23:36:56 2021 +++ src/sys/dev/iscsi/iscsi_main.c Sun Jun 6 10:40:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_main.c,v 1.35 2021/04/24 23:36:56 thorpej Exp $ */ +/* $NetBSD: iscsi_main.c,v 1.36 2021/06/06 10:40:14 mlelstv Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -87,8 +87,15 @@ static int iscsiclose(struct file *); static const struct fileops iscsi_fileops = { .fo_name = "iscsi", + .fo_read = fbadop_read, + .fo_write = fbadop_write, .fo_ioctl = iscsiioctl, + .fo_fcntl = fnullop_fcntl, + .fo_poll = fnullop_poll, + .fo_stat = fbadop_stat, .fo_close = iscsiclose, + .fo_kqfilter = fnullop_kqfilter, + .fo_restart = fnullop_restart }; struct cdevsw iscsi_cdevsw = { @@ -166,15 +173,12 @@ iscsiclose(struct file *fp) struct iscsi_softc *sc; sc = device_lookup_private(_cd, d->fd_unit); - if (sc == NULL) { - DEBOUT(("%s: Cannot find private data\n",__func__)); - return ENXIO; + if (sc != NULL) { + mutex_enter(>lock); + TAILQ_REMOVE(>fds, d, fd_link); + mutex_exit(>lock); } - mutex_enter(>lock); - TAILQ_REMOVE(>fds, d, fd_link); - mutex_exit(>lock); - kmem_free(d, sizeof(*d)); fp->f_iscsi = NULL;
CVS commit: src/sys/dev/iscsi
Module Name:src Committed By: mlelstv Date: Sun Jun 6 10:39:10 UTC 2021 Modified Files: src/sys/dev/iscsi: iscsi_send.c Log Message: Schedule command timeout without connection lock being held to prevent a deadlock. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/iscsi/iscsi_send.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/iscsi/iscsi_send.c diff -u src/sys/dev/iscsi/iscsi_send.c:1.37 src/sys/dev/iscsi/iscsi_send.c:1.38 --- src/sys/dev/iscsi/iscsi_send.c:1.37 Sun Mar 4 07:39:45 2018 +++ src/sys/dev/iscsi/iscsi_send.c Sun Jun 6 10:39:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_send.c,v 1.37 2018/03/04 07:39:45 mlelstv Exp $ */ +/* $NetBSD: iscsi_send.c,v 1.38 2021/06/06 10:39:10 mlelstv Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -548,9 +548,10 @@ resend_pdu(ccb_t *ccb) } else { TAILQ_INSERT_TAIL(>c_pdus_to_send, pdu, pdu_send_chain); } - ccb_timeout_start(ccb, COMMAND_TIMEOUT); cv_broadcast(>c_conn_cv); mutex_exit(>c_lock); + + ccb_timeout_start(ccb, COMMAND_TIMEOUT); }
CVS commit: src/sys/dev/iscsi
Module Name:src Committed By: mlelstv Date: Sun Jun 6 10:39:10 UTC 2021 Modified Files: src/sys/dev/iscsi: iscsi_send.c Log Message: Schedule command timeout without connection lock being held to prevent a deadlock. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/iscsi/iscsi_send.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: nonaka Date: Sun Jun 6 08:45:18 UTC 2021 Modified Files: src/sys/arch/x86/pci: amdzentemp.c Log Message: amdzentemp(4): Add support for per CCD temperature sensor from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/pci/amdzentemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/amdzentemp.c diff -u src/sys/arch/x86/pci/amdzentemp.c:1.12 src/sys/arch/x86/pci/amdzentemp.c:1.13 --- src/sys/arch/x86/pci/amdzentemp.c:1.12 Sat Jun 5 01:38:22 2021 +++ src/sys/arch/x86/pci/amdzentemp.c Sun Jun 6 08:45:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amdzentemp.c,v 1.12 2021/06/05 01:38:22 nonaka Exp $ */ +/* $NetBSD: amdzentemp.c,v 1.13 2021/06/06 08:45:18 nonaka Exp $ */ /* $OpenBSD: kate.c,v 1.2 2008/03/27 04:52:03 cnst Exp $ */ /* @@ -53,7 +53,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.12 2021/06/05 01:38:22 nonaka Exp $ "); +__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.13 2021/06/06 08:45:18 nonaka Exp $ "); #include #include @@ -76,6 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: amdzentemp.c #define AMD_CURTMP_RANGE_ADJUST 4900 /* in microKelvins (ie, 49C) */ #define AMD_CURTMP_RANGE_CHECK __BIT(19) #define F10_TEMP_CURTMP __BITS(31,21) /* XXX same as amdtemp.c */ +#define F10_TEMP_CURTMP_MASK 0x7ff #define F15M60_CURTMP_TJSEL __BITS(17,16) /* @@ -96,7 +97,17 @@ __KERNEL_RCSID(0, "$NetBSD: amdzentemp.c */ #define AMD_17H_CUR_TMP 0x59800 +/* + * The following register set was discovered experimentally by Ondrej Čerman + * and collaborators, but is not (yet) documented in a PPR/OSRR (other than + * the M70H PPR SMN memory map showing [0x59800, +0x314] as allocated to + * SMU::THM). It seems plausible and the Linux sensor folks have adopted it. + */ +#define AMD_17H_CCD_TMP_BASE 0x59954 +#define AMD_17H_CCD_TMP_VALID __BIT(11) + struct amdzentemp_softc { + device_t sc_dev; struct sysmon_envsys *sc_sme; device_t sc_smn; envsys_data_t *sc_sensor; @@ -105,15 +116,33 @@ struct amdzentemp_softc { int32_t sc_offset; }; +enum { + NOSENSOR = 0, + CORE0_SENSOR0, + CCD_BASE, + CCD0 = CCD_BASE, + CCD1, + CCD2, + CCD3, + CCD4, + CCD5, + CCD6, + CCD7, + CCD_MAX, + NUM_CCDS = CCD_MAX - CCD_BASE +}; + static int amdzentemp_match(device_t, cfdata_t, void *); static void amdzentemp_attach(device_t, device_t, void *); static int amdzentemp_detach(device_t, int); -static void amdzentemp_init(struct amdzentemp_softc *); -static void amdzentemp_setup_sensors(struct amdzentemp_softc *, int); +static void amdzentemp_init(struct amdzentemp_softc *, int, int); +static void amdzentemp_setup_sensors(struct amdzentemp_softc *); static void amdzentemp_family15_refresh(struct sysmon_envsys *, envsys_data_t *); static void amdzentemp_family17_refresh(struct sysmon_envsys *, envsys_data_t *); +static int amdzentemp_probe_ccd_sensors(struct amdzentemp_softc *, int, int); +static void amdzentemp_setup_ccd_sensors(struct amdzentemp_softc *); CFATTACH_DECL_NEW(amdzentemp, sizeof(struct amdzentemp_softc), amdzentemp_match, amdzentemp_attach, amdzentemp_detach, NULL); @@ -124,9 +153,9 @@ amdzentemp_match(device_t parent, cfdata struct pci_attach_args *pa __diagused = aux; KASSERT(PCI_VENDOR(pa->pa_id) == PCI_VENDOR_AMD); - + cfdata_t parent_cfdata = device_cfdata(parent); - + /* Got AMD family 17h system management network */ return parent_cfdata->cf_name && memcmp(parent_cfdata->cf_name, "amdsmn", 6) == 0; @@ -137,18 +166,20 @@ amdzentemp_attach(device_t parent, devic { struct amdzentemp_softc *sc = device_private(self); struct cpu_info *ci = curcpu(); - int family; + int family, model; int error; size_t i; + sc->sc_dev = self; + family = CPUID_TO_FAMILY(ci->ci_signature); + model = CPUID_TO_MODEL(ci->ci_signature); aprint_naive("\n"); - aprint_normal(": AMD CPU Temperature Sensors (Family%xh)", - family); + aprint_normal(": AMD CPU Temperature Sensors (Family%xh)", family); sc->sc_smn = parent; - amdzentemp_init(sc); + amdzentemp_init(sc, family, model); aprint_normal("\n"); @@ -156,12 +187,14 @@ amdzentemp_attach(device_t parent, devic sc->sc_sensor_len = sizeof(envsys_data_t) * sc->sc_numsensors; sc->sc_sensor = kmem_zalloc(sc->sc_sensor_len, KM_SLEEP); - amdzentemp_setup_sensors(sc, device_unit(self)); + amdzentemp_setup_sensors(sc); /* * Set properties in sensors. */ for (i = 0; i < sc->sc_numsensors; i++) { + if (sc->sc_sensor[i].private == NOSENSOR) + continue; if (sysmon_envsys_sensor_attach(sc->sc_sme, >sc_sensor[i])) goto bad; } @@ -223,10 +256,10 @@ amdzentemp_detach(device_t self, int fla static void -amdzentemp_init(struct amdzentemp_softc *sc) +amdzentemp_init(struct amdzentemp_softc *sc, int family, int model) { - sc->sc_numsensors = 1; +
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: nonaka Date: Sun Jun 6 08:45:18 UTC 2021 Modified Files: src/sys/arch/x86/pci: amdzentemp.c Log Message: amdzentemp(4): Add support for per CCD temperature sensor from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/pci/amdzentemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.