1
0
mirror of https://git.FreeBSD.org/src.git synced 2026-06-02 11:24:32 +00:00

309684 Commits

Author SHA1 Message Date
Andrew Gallatin 3118f1b99f bnxt: Fix build / load error for bnxt(4) in kernels without PCI_IOV
This change removes the hard-forcing of  PCI_IOV and adds shims to
allow the driver to compile and work when the kernel is missing
PCI_IOV support.

Fixes: 7c450d1127
Reviewed by: sumit.saxena_broadcom.com
Differential Revision: https://reviews.freebsd.org/D57300
Sponsored by: Netflix
2026-05-29 09:05:25 -04:00
Jose Luis Duran 283959bbe0 bsdinstall: script: Fix scripted DISTRIBUTIONS
Restore exporting DISTRIBUTIONS to make it available to other scripts.

Reviewed by:	imp, asomers
Fixes:		dc14ae4217 ("bsdinstall: do pkgbase installations with the "script" command")
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57319
2026-05-29 02:09:49 +00:00
Konstantin Belousov 804daf1664 imgact_elf: read program headers if not contained in the first page
PR:	295629
Reviewed by:	markj
Tested by:	Alex S <iwtcex@gmail.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57294
2026-05-28 23:59:26 +03:00
Konstantin Belousov 9b729333bb image activators: pass the current thread
Reviewed by:	markj
Tested by:	Alex S <iwtcex@gmail.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57294
2026-05-28 23:59:25 +03:00
Pouria Mousavizadeh Tehrani 97f7b21dd5 rtnetlink: Fix weight overflow in RTA_MULTIPATH
If the weight value is larger than 8 bits, set it to the maximum.
Also, only send RTA_WEIGHT if its value is not the default.
This reduces message size and matches the behavior of
non-multipath routes.

Reviewed by:	emaste, markj
Differential Revision: https://reviews.freebsd.org/D57266
2026-05-28 23:30:15 +03:30
Adrian Chadd 774543072d LinuxKPI: migrate key data access to functions
* Migrate the k->wk_key and k->wk_keylen access to the new crypto methods
  in net80211
* don't use ic_miclen, use the tx/rx mic len methods
* don't use wk_txmic and wk_rxmic, use the tx/rx mic data methods

This is in preparation to support GTK/IGTK keys and > 128 bit keys.

Reviewed by:	bz
Differential Revision:	https://reviews.freebsd.org/D54485
2026-05-28 12:50:12 -07:00
YAO, Xin 30c85b7cb9 linuxulator: return EBADF for O_PATH mmap()
This fixes LTP open13, which expects O_PATH mmap() to fail
with EBADF, but FreeBSD returned EACCES.

Signed-off-by:	YAO, Xin <mr.yaoxin@outlook.com>
PR:		295571
Reviewed by: 	kib
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2233
2026-05-28 23:17:04 +03:30
Navdeep Parhar a172f9e5b3 cxgbe(4): Improvements to the slow interrupt handler
* Add a flag to indicate that an INT_CAUSE should not be cleared
  automatically in the generic handler.  This is to ensure correct
  operation of some INT_CAUSEs that are related to each other and must
  be cleared in a certain order.
* Add decode for many more INT_CAUSE registers.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2026-05-28 12:05:57 -07:00
Konstantin Belousov 0a02a47fd9 x86: for wrmsr_early_safe(), catch all exceptions, not only #GP
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57264
2026-05-28 20:26:56 +03:00
Dag-Erling Smørgrav 95fc64cc29 ctld: More consistent error messages
The error messages ctld emits when it finds a port or LUN it did not
create were inconsistent with each other as well as with ctld's other
error messages.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D57270
2026-05-28 19:22:43 +02:00
Siva Mahadevan a7df326619 ptrace_test: expect PT_STEP tests to fail on riscv
ptrace_single_step currently returns EOPNOTSUPP on riscv.

This temporarily fixes the following CI failures:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__PT_STEP_with_signal/
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__step_siginfo/

Reviewed by:	kib
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D57288
2026-05-28 12:32:42 -04:00
Ricardo Branco 4dfc78e0e3 crashinfo: Create core.txt.last symlink
When saving a coredump, savecore(8) maintains .last symlinks for the
info and vmcore artifacts, but not for the crashinfo text report.

Make crashinfo(8) create the link, pointing at the current
core.txt.<bounds> file.

This makes /var/crash/core.txt.last track the same core dump as
info.last and vmcore.last.

[mhorne: I tweaked the submission, such that the link will be created as
soon as the core.txt.X file is generated; not only after a successful
report has been written.]

Signed-off-by:	Ricardo Branco <rbranco@suse.de>
Reviewed by:	mhorne
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2199
2026-05-28 13:20:30 -03:00
Christos Margiolis 453de99b38 virtual_oss(8): Fix buffer overflow in voss_compressor() call
This particular calls swaps the samples and maxchan arguments, which can
cause a buffer overflow in p_ch_chain if maxchan exceeds its bounds
(VMAX_CHAN).

Reported by:	Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste
2026-05-28 16:46:01 +02:00
ShengYi Hung df5e9e3da5 usb: Add missing mtx lock and unlock in pushing dma queue
Accessing usb_xfer_queue requires bus lock, we added this missing lock
in here to prevent racing issue.

Reviewed by:    adrian
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57293
2026-05-28 22:36:10 +08:00
Christos Margiolis 9fb5642142 sound: Centralize and improve hot-swapping
Introduce pcm_hotswap(), which is responsible for sending devctl
SND/CONN notifications.

There are two user-visible improvements with this patch:

First, in pcm_unregister(), instead of just sending a SND/CONN/NODEV
notification when all devices have detached, we also switch to the new
default device if the previously default one has detached, but there are
more left.

Second, in pcm_register(), if the device happens to also be the new
default device, we hot-swap to it. Additionally, if hw.snd.default_auto
is set to 2, then we will essentially be hot-swapping to the newest
attached device.

The latter is especially useful for laptops like the Framework 16, which
comes with a built-in snd_hda(4) speaker-microphone-only device, and
headphones can work with the Framework Audio Expansion Card, which does
not extend the snd_hda(4) device, but is in fact a separate
snd_uaudio(4) device. To achieve automatic audio redirection between
headphones and speakers in this case, there has to be a way to switch
between different devices. The way the Audio Expansion Card works is by
having snd_uaudio(4) attach to it when the headphones are plugged, and
detach when unplugged, so this patch, along with hw.snd.default_auto=2,
can pick up those attach events and switch automatically. Combined with
the pcm_unregister() update, it becomes possible to switch back and
forth between headphones and speakers.

While here, be more robust and lock around snd_unit reads.

In collaboration with:	jrm
Sponsored by:		The FreeBSD Foundation
MFC after:		1 week
2026-05-28 16:08:20 +02:00
Christos Margiolis b2677d002e rc: virtual_oss: Handle absent pidfile properly
Instead of throwing errors from the programs that use it, print a
warning if the file does not exist.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	0mp, jrm
Pull-Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/33
2026-05-28 16:06:06 +02:00
Christos Margiolis 803f686938 rc: virtual_oss: Wait for process to exit
Sometimes virtual_oss processes do not exit immediatelly. If we do not
wait for the processes to fully exit before returning from
virtual_oss_stop(), then the service restart operation might call
virtual_oss_start() too early and fail, because it will think the
service wasn't stopped and is still running.

Reported by:	jrm
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	0mp, jrm
Pull-Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/33
2026-05-28 16:06:06 +02:00
Christos Margiolis a576e5140e rc: virtual_oss: Define some variables in rc.conf
They will now be part of /etc/defaults/rc.conf and be accessible by
sysrc(8).

Fixes:		70e27ecba5 ("virtual_oss: Introduce virtual_oss_default_control_device rc variable")
PR:		295560
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	0mp, jrm
Pull-Reqeust:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/33
2026-05-28 16:06:06 +02:00
Ed Maste f9f46294d6 bsdinstall: Use libarchive secure flags for extract
This doesn't really matter, as we trust that the installer tarballs are
not malicious, but it doesn't hurt to set these flags.

Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57274
2026-05-28 09:03:45 -04:00
Christos Margiolis fc9dc84823 snd_uaudio: Lock usbd_transfer_start() in uaudio_mixer_ctl_set()
This section would be previously locked by sound(4)'s mixer lock (see
e87654db5a ("snd_uaudio: Stop using mixer_get_lock()")), but
snd_uaudio(4) no longer uses it. This particular code path was missed
during testing, because my sound card does not reach it.

Fixes:		9a00e0b8ca ("snd_uaudio: Do not use snd_mixer->lock as mixer_lock")
Reported by:	netchild
Tested by:	netchild
Sponsored by:	The FreeBSD Foundation
MFC after:	6 days
2026-05-28 15:02:01 +02:00
Konstantin Belousov 7b2702ee25 sys: add safe_read(9)
The MD function with MI interface to provide a way to read arbitrary
(canonical) KVA.  amd64 only for now.

Reviewed by:	markj
Tested by:	aokblast
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D49566
2026-05-28 15:38:25 +03:00
Konstantin Belousov 67d61d18bb amd64: extract uiomove_mem() from memrw()
Reviewed by:	markj
Tested by:	aokblast
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D49566
2026-05-28 15:38:25 +03:00
Dag-Erling Smørgrav 39f23af2ba certctl: Style nits
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D57298
2026-05-28 14:28:22 +02:00
Dag-Erling Smørgrav 05039fda7e tests: Fix reliability issues in POSIX ACL tests
The ACL tests use UIDs and GIDs 41 through 49 and expect them to be
unassigned.  Since GID 43 is now assigned to the audio group, some
tests have begun to fail.

While here, also fix a benign Perl syntax issue in the test runner.

MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D57297
2026-05-28 14:26:26 +02:00
Mike Belanger b29842622d if_ffec: correctly trim 2 bytes from the beginning
PR:		283315
Tested by:	tuexen
MFC after:	3 days
2026-05-28 13:09:52 +02:00
Olivier Cochard ff873565bc ping: fix test timestamp_origin when tstamprepl is disabled
The timestamp_origin test sends an ICMP Timestamp Request (ping -Mt) and parses
the tso/tsr fields out of the reply.
When the sysctl net.inet.icmp.tstamprepl is 0, the kernel silently drops the
request, ping receives no reply, and the sed extraction yields an empty $tso.
The test then fails inside atf_check test -n "$tso" with the unhelpful message

Approved by:	maxim
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D57287
2026-05-28 12:40:48 +02:00
Gleb Smirnoff d62e8c5c6f inpcb: update inpcb multipath routing information only on success
This is very similar to IPv4 change 24e5c2ee2a.  Don't modify inpcb
until we are sure connect(2) will be successful.

Fixes:	0c325f53f1
2026-05-27 21:46:38 -07:00
Gleb Smirnoff ca91300c07 inpcb: a pcb may travel only from the wild hash to exact, not vice versa
The only possible way to exercise in_pcbrehash() is to bind(2) and then
connect(2).  The second branch was a dead code since fdb987bebd.

Reviewed by:		markj
Differential Revision:	https://reviews.freebsd.org/D57241
2026-05-27 21:46:27 -07:00
Aleksandr Rybalko 5a8e0e03ae install: Bump compare size limit (128MB) to support large binaries
Preserve metadata and prevent redundant disk writes during builds with
the install's -C (compare) flag.

The previous historical comparison limit of 16MB is insufficient for
modern toolchains, frequently choked or bypassed by a large base
components like LLVM/Clang, kernels, Rust apps, and large runtime
libraries.

By leaving matching files alone, install keeps their modification timestamps
intact. make(1) safely ignores those files on subsequent runs.

Base examples: 15.0 amd64 GENERIC kernel - 28MB, clang - 105MB, lldb - 97MB, etc.

Reviewed by:    glebius
Approved by:    glebius (mentor)
Obtained from:  Fudo Security
MFC after:      2 weeks
Sponsored by:   Fudo Security
Differential Revision:	https://reviews.freebsd.org/D57271
2026-05-28 01:55:57 +03:00
Aleksandr Rybalko 97cad013a5 install: add -z <max_cmp_size> option
Introduces the -z <max_cmp_size> flag, enabling users to set a custom file
size limit for pre-installation change checks and avoiding future hard-coded
limit modifications.

Reviewed by:    glebius
Approved by:    glebius (mentor)
Obtained from:  Fudo Security
MFC after:      2 weeks
Sponsored by:   Fudo Security
Differential Revision:	https://reviews.freebsd.org/D57230
2026-05-28 01:55:57 +03:00
Mark Johnston 96256587b0 ucode: ucode_error can be defined with static
MFC after:	1 week
2026-05-27 21:12:35 +00:00
Mark Johnston 0beb172898 ucode: Fix validation on Intel platforms
The check for the extended signature table was backwards, so we always
ignored it.

We should verify that the extended signature table fits within the total
image size.

Reviewed by:	jrm, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D57209
2026-05-27 21:12:35 +00:00
John Baldwin 887841731b ctl: Use CAM_PRIORITY_NORMAL for queued CCBs
Previously this was using CAM_PRIORITY_NONE which tripped over the
assertion added in b4b166b8c4.

PR:		293076
Reported by:	Ken J. Thomson <thomsonk@yandex.com>
Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D56995
2026-05-27 16:58:05 -04:00
John Baldwin d1a8fa2e0f ctld: Only check physical port linking in a single configuration context
Commit 969876fcee moved struct pport from being per-configuration to
being a "global" object shared across multiple configurations.  As a
result, the check for duplicate ports actually spanned across
configurations, such that reloading a configuration would now think
that existing physical ports were already linked.

The linking field in pport added in the C++-ification (commit
6acc7afa34) faithfully replicated this bug (albeit simpler as I had
noticed that the TAILQ links weren't used after the earlier commit).

To restore the desired behavior, remove the linking field from struct
pport entirely and use a local unordered_map in conf::add_pports which
tracks if a given pport is claimed by more than one target.

PR:		293076
Reported by:	Ken J. Thomson <thomsonk@yandex.com>
Fixes:		969876fcee ("ctld: parse config file independently of getting kernel info")
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D57093
2026-05-27 16:57:38 -04:00
John Baldwin caef3c50ac ctld: Refactor ioctl port handling
- Normalize ioctl port names when the port name is first added to
  the configuration.  This can catch potential duplicate port names
  sooner and helps with other parts of this change.

- When recognizing existing ioctl ports, always expand the name to
  include the physical and virtual port numbers.  This permits binding
  ioctl/0/0 or ioctl/1/0 to a target, for example.

- When adding physical ports to a target, first check for an existing
  kernel port to reuse.  This handles both ioctl and non-ioctl ports
  and removes the need for the conf::add_port method for ioctl ports
  to check in kports.

- If an existing kport isn't found when adding physical ports, check
  to see if the port name is an ioctl port.  If so, call conf::add_port
  to add an ioctl port.  This add_port method overload is now simpler
  as it always creates a new port.

NB: The kernel_port class handles CTL ports that already existed
before ctld started including existing ioctl ports, whereas the
ioctl_port class handles ioctl ports that are created and completely
managed by ctld.  This was true before this change but is perhaps more
obvious after this change.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D57092
2026-05-27 16:57:23 -04:00
John Baldwin 7a436d3789 ctld: Don't ignore pp/vp values of kernel ports with pp == 0 but vp != 0
Fixes:		c6f1e9b8a4 ("ctld: Simplify XML parsing memory management")
Sponsored by:	Chelsio Communications
2026-05-27 16:56:56 -04:00
Dag-Erling Smørgrav 40c846dc07 uart: Tidy the compat tables
No functional change intended.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	royger
Differential Revision:	https://reviews.freebsd.org/D57269
2026-05-27 22:14:58 +02:00
Kyle Crenshaw ccda002ca1 rk_gpio: implement PIC masking methods and mask unhandled IRQs
The Rockchip GPIO controller implements PIC operations for the INTRNG
framework but is missing four masking methods that INTRNG calls during
the filter/ithread handoff: pic_disable_intr, pic_enable_intr,
pic_pre_ithread, pic_post_ithread.

Without them, level-sensitive interrupt sources connected to a
Rockchip GPIO pin re-fire continuously while their ithread runs.  On
a RockPro64 with a FUSB302B Type-C controller (i2c) attached to
gpio1 INT_N, the system enters a ~210 kHz interrupt storm the moment
the fusb302 driver attaches and INT_N goes low.

Two complementary changes:

1. Add the four pic_disable_intr/pic_enable_intr/pic_pre_ithread/
   pic_post_ithread method bodies.  Each toggles the pin's
   RK_GPIO_INTMASK bit so the source is masked during the in-flight
   ithread window and unmasked on return, honouring the generic
   INTRNG mask/unmask sequence.

2. When the GPIO IRQ filter dispatches a pin and finds no consumer
   registered, mask the pin at the controller (INTMASK=1, INTEN=0)
   before continuing.  Level-triggered sources keep asserting until
   acked, so a single stuck pin used to flood the console with
   thousands of "Interrupt pin=N unhandled" lines per second.  The
   mask survives until something re-attaches and re-enables the IRQ
   via the standard pic_enable_intr path.

Affects all level-triggered IRQs on Rockchip GPIO banks; edge-
triggered IRQs were already self-acking and unaffected.

Signed-off-by:	Kyle Crenshaw <B1nc0d3x@gmail.com>
Reviewed by:	mhorne
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2197
2026-05-27 15:21:19 -03:00
Haoxiang Li d1488cd762 bcm2835_sdhci: Clean up DMA resources on attach failure
bcm_sdhci_attach() allocates a DMA channel with bcm_dma_allocate()
before creating the bus_dma tag and map.  If a later initialization
step fails, the common error path releases the interrupt and memory
resources, but leaves the DMA channel allocated.

Call bcm_dma_free() for cleanup, as it already performs the required
internal checks and can therefore be invoked directly.

Signed-off-by:	Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2241
2026-05-27 15:12:09 -03:00
Dag-Erling Smørgrav 6880405bf9 cap_mkdb: Fix memory leak
This is not a big deal since it only iterates once before exiting, but
that's no reason to set a bad example.

PR:		195128
MFC after:	1 week
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D57251
2026-05-27 19:02:12 +02:00
Dag-Erling Smørgrav f2a89e7e1d limits: Improve consistency
Historical precedent seems pretty consistent: size limits have singular
names, number limits have plural names.  RLIMIT_VMM broke this, and I
made matters worse by referring to this limit as “vmms” in limits(1).
Consistently use “vms” everywhere user-visible, while leaving the
question of whether or not to rename RLIMIT_VMM itself for another day.

Fixes:		1092ec8b33 ("kern: Introduce RLIMIT_VMM")
Fixes:		53af2026f2 ("limits: Unbreak after RLIMIT_VMM addition")
Reviewed by:	bnovkov
Differential Revision:	https://reviews.freebsd.org/D57265
2026-05-27 19:02:07 +02:00
Christos Margiolis 773bbfc573 sound: Update mixer.c LICENSE header
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:12 +02:00
Christos Margiolis 64ebbb1d74 sound: Retire MIXER_SIZE and use correct size in DEFINE_CLASS
I am not sure why this hack was needed, but the size should be
sizeof(struct snd_mixer). Unfortunately, we have to expose snd_mixer,
but it should be better than relying on a hack.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:12 +02:00
Christos Margiolis 5589a7499a sound: Retire snd_mixer->enuminfo
Instead of caching this when mix_setrecdevs() is called (which many
drivers never call), calculate it when we need it. After all, it is
quite rare that this structure is used by applications.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:12 +02:00
Christos Margiolis 7485519d56 sound: Do not lock before destroying snd_mixer->lock
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:12 +02:00
Christos Margiolis 6a3a42c57c sound: Retire unused mixer_get_lock()
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:12 +02:00
Christos Margiolis 1e72608a3c sound: Remove all remaining uses of mixer_get_lock()
These functions are called from sound(4) through MIXER_SET() in
mixer_set(), but nothing mixer-related is used or needs to be locked in
these cases.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:12 +02:00
Christos Margiolis e87654db5a snd_uaudio: Stop using mixer_get_lock()
There is no reason to lock snd_mixer->lock here, since the only thing we
are doing with snd_mixer is to call mix_getdevinfo() and mix_get_dev(),
which are one-line getters, which are needed to eventually call
uaudio_get_child_index_by_dev().

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:11 +02:00
Christos Margiolis 9a00e0b8ca snd_uaudio: Do not use snd_mixer->lock as mixer_lock
In similar fashion to c234740c9d ("snd_uaudio: Do not use
pcm_channel->lock to protect uaudio_chan"), stop this layering
violation, and introduce a snd_uaudio(4)-internal mixer_lock.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:11 +02:00
Christos Margiolis 22730c4b10 sound: Remove unused "from" mixer_ioctl_cmd() argument
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:11 +02:00