sound/midi: Pass the queue sizes as arguments to midi_init()
There is no reason to have kobj methods for this.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sound/midi: Pair kobj_init() with kobj_delete()
kobj_init() bumps the class refcount, so without a matching
kobj_delete() it never drops to zero.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sound/midi: Use size_t instead of int where appropriate
Also switch the affected min() calls to ulmin().
No functional change intended.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sound/midi: Centralize snd_midi cleanup
midi_init()'s error path leaked both unit numbers and duplicated
existing code.
While here, drop the locking in midi_init(), because nothing can reach m
before make_dev() publishes it.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sound/midi: Always notify the provider from midi_close()
Be consistent with midi_open() which also invokes the callback
unconditionally.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sound/midi: Fix inverted POLLOUT test in midi_poll()
midi_queue_avail() returns the free space, so the test had it backwards.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sound/midi: Do not return from midi_close() with the lock held
This was already fixed in midi_open().
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sound/midi: Retire M_RXEN
It was always set and cleared together with M_RX and never tested on its
own, so it was redundant. The only thing that read it was midi_close()'s
check for whether the flags had changed, which can be reduced to a plain
FREAD test.
No functional change intended.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sound/midi: Create the device node with make_dev_s()
make_dev(9) publishes the node before si_drv1 is assigned, so an open(2)
racing with midi_init() could dereference si_drv1 before it's set.
Triggering a UAF is not currently an issue because all cdevsw methods
check for NULL, but the fix makes it more robust in any case.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sound/midi: Rename M_TXEN to M_TXPEND
The flag means that there is data queued to transmit, not that
transmission is enabled.
No functional change intended.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
snd_dummy: Do not use dummy_chan_io() as mpu401's interrupt handler
dummy_chan_io() runs with sc->lock held, but mpu401 calls its handler
from a callout with no mutex associated with it, so writing to the MIDI
device node caused a panic.
Give mpu401 its own handler, and leave MIDI to mpu401's timer instead of
the PCM callout.
Fixes: e963472ef853 ("snd_dummy: Initial MIDI support")
Sponsored by: The FreeBSD Foundation
www/comentario: Update to 3.19.0
Refresh frontend dependencies, require Go 1.27, and update the Angular
API generator version. Select the JavaScript Sass compiler to avoid a
frontend build hang on FreeBSD.
Changelog: https://gitlab.com/comentario/comentario/-/releases/v3.19.0
uart: Set the bus space tag before parsing hw.uart.console
uart_cpu_getdev() lets hw.uart.console override the FDT, but
uart_getenv() maps an "mm:" address with uart_bus_space_mem, which is
only assigned after the FDT probe. On riscv and arm it is still NULL
at that point, so bus_space_map() faults before there is a console.
On riscv this happens on any EFI boot where the firmware provides an
SPCR table, since the loader turns it into hw.uart.console.
Initialize uart_bus_space_mem to fdtbus_bs_tag, as uart_cpu_arm64.c
does with &memmap_bus (See also 0624eddcffefe).
PR: 299089
Reviewed by: mhorne
MFC after: 1 week
Signed-off-by: Rick Richard <rick at sloservers.com>
(cherry picked from commit 9db8ae83e62e9a1391674a14b0b7d76de2e3c3f7)
uart: Set the bus space tag before parsing hw.uart.console
uart_cpu_getdev() lets hw.uart.console override the FDT, but
uart_getenv() maps an "mm:" address with uart_bus_space_mem, which is
only assigned after the FDT probe. On riscv and arm it is still NULL
at that point, so bus_space_map() faults before there is a console.
On riscv this happens on any EFI boot where the firmware provides an
SPCR table, since the loader turns it into hw.uart.console.
Initialize uart_bus_space_mem to fdtbus_bs_tag, as uart_cpu_arm64.c
does with &memmap_bus (See also 0624eddcffefe).
PR: 299089
Reviewed by: mhorne
MFC after: 1 week
Signed-off-by: Rick Richard <rick at sloservers.com>
(cherry picked from commit 9db8ae83e62e9a1391674a14b0b7d76de2e3c3f7)
hwpmc: refuse MOD_UNLOAD while PMC owners exist
Unloading hwpmc while processes own PMCs frees state they still use.
Return EBUSY instead. Use a try-lock on pmc_sx, since MOD_UNLOAD runs
with kld_sx held. MOD_SHUTDOWN still always cleans up.
Reviewed by: mhorne
MFC after: 1 week
Sponsored by: Advanced Micro Devices, Inc.
Differential Revision: https://reviews.freebsd.org/D60561
databases/mongodb80: cleanup of local distfile
Remove huge local bazel-cache distfile by downloading the original distfiles.
This change is similar to commit f09187effdb3db1d3e5097d0b79dec9ac85cc1fb of mongodb90.
No functional change intended. All hashes of the distfiles are the same.
aq(4): arm PHY thermal shutdown from the admin poll
move thermal shutdown arming to the admin poll
this gives a more reasonable delay prior to the first attempt, and also
allows us to retry and make the option runtime-tuneable via a new
disable_thermal_arm sysctl
Approved by: adrian (mentor)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D59593
Signed-off-by: Nick Price <nprice at FreeBSD.org>
(cherry picked from commit 75a1939f6360d4a329891e2075d18eef069db9bb)
ports-mgmt/pkgfe: [NEW PORT] Ncurses frontend for ports collection
Package Frontend is a ncurses-based, graphical frontend for
the FreeBSD ports collection.
WWW: http://ketas.si.pri.ee/pkgfe/
PR: 295922