snd_hda: Add the full Intel Meteor/Arrow/Lunar Lake HD Audio PCI IDs
This is based off the Linux file sound/hda/intel-dsp-config.c.
Tested on: Lenovo Thinkbook 16 G6+ IMH
MFC after: 3 days
Reviewed by: markj, christos
Differential Revision: https://reviews.freebsd.org/D44777
Sponsored by: Postgres Professional
(cherry picked from commit 1dd1a696c58fb275aa0e01666d57861eeb51878d)
snd_hda: fix "duplicated free" on module unloading
This is trivial fix of hdacc_detach to avoid duplicated free on snd_hda
unloading.
The first try of detaching (kldunload) may results into "device busy" error,
but codec->fgs is freed by detach. Second try attempts to free codec->fgs again
and system panicks.
Here is example:
pcm0: unregister: channel pcm0:virtual:dsp0.vp0 busy (pid 3428)
pulseaudio[3428] [oss] module-oss.c: DSP shutdown.
pcm0: detached
hdaa0: detached
panic: Duplicate free of 0xfffff80412ee7d20 from zone 0xfffffe006bc0ba00
(malloc-32) slab 0xfffff80412ee7fc8(105)
cpuid = 6
time = 1712999565
[24 lines not shown]
snd_hda: fix "duplicated free" on module unloading
This is trivial fix of hdacc_detach to avoid duplicated free on snd_hda
unloading.
The first try of detaching (kldunload) may results into "device busy" error,
but codec->fgs is freed by detach. Second try attempts to free codec->fgs again
and system panicks.
Here is example:
pcm0: unregister: channel pcm0:virtual:dsp0.vp0 busy (pid 3428)
pulseaudio[3428] [oss] module-oss.c: DSP shutdown.
pcm0: detached
hdaa0: detached
panic: Duplicate free of 0xfffff80412ee7d20 from zone 0xfffffe006bc0ba00
(malloc-32) slab 0xfffff80412ee7fc8(105)
cpuid = 6
time = 1712999565
[24 lines not shown]
snd_hda: Add the full Intel Meteor/Arrow/Lunar Lake HD Audio PCI IDs
This is based off the Linux file sound/hda/intel-dsp-config.c.
Tested on: Lenovo Thinkbook 16 G6+ IMH
MFC after: 3 days
Reviewed by: markj, christos
Differential Revision: https://reviews.freebsd.org/D44777
Sponsored by: Postgres Professional
(cherry picked from commit 1dd1a696c58fb275aa0e01666d57861eeb51878d)
acpi_battery: avoid divide-by-zero when no devices have capacity info
On laptops with builtin batteries, disconnecting the battery may show up
as a battery without any capacity information. (The theory is that one
is disconnecting the cells but the electronics identifying the battery
are still connected.) As a result, the loop over all batteries in
acpi_battery_get_battinfo results in total_lfcap == 0.
So, just check that total_lfcap is non-zero to avoid a division by zero
(triggerable by sysctl hw.acpi.battery).
Reported by: Stefano Marinelli
Tested by: Stefano Marinelli
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44818
(cherry picked from commit 2e850b832f5d2adb9b230d191277d67c00caaab9)
14.1: update stable/14 to -PRERELEASE
This marks the start of the FreeBSD 14.1 release cycle; the stable/14
tree is now in "code slush".
Developers are encouraged to prioritize fixing bugs (and/or merging bug
fixes from HEAD) over new features at this time. Commit approval from
re@ is not required but if new features introduce problems they may be
removed from the release.
Approved by: re (implicit)
ice(4): Update copyright year to 2024
Signed-off-by: Eric Joyner <erj at FreeBSD.org>
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D44003
iflib: Add subinterface interrupt allocation function
The ice(4) driver will add the ability to create extra interfaces
that hang off of the base interface; to do that the driver requires
a method for the subinterface to request hardware interrupt resources
from the base interface.
Signed-off-by: Eric Joyner <erj at FreeBSD.org>
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D39930
iflib: Add sysctl to request extra MSIX vectors on driver load
Intended to be used with upcoming feature to add sub-interfaces, since
those new interfaces will be dynamically created and will need to have
spare MSI-X interrupts already allocated for them on driver load.
This sysctl is marked as a tunable since it will need to be set before
the driver is loaded since MSI-X interrupt allocation and setup is
done during the attach process.
Signed-off-by: Eric Joyner <erj at FreeBSD.org>
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41326
Update sys.dirdeps.mk set default DEP_*
Even at level 0 it is handy to default DEP_*
used by Makefile.depend* to aid the first include if
in a leaf dir.
Reviewed by: stevek
sound: Remove obsolete DV_F_* flags
The ISA sound drivers that used them are retired.
Last reference of DV_F_DRQ_MASK and DV_F_DUAL_DMA:
716924cb4832ea0a440daf09913a06f3166f243e ("Retire snd_sbc ISA sound card
driver")
Last reference of DV_F_DEV_MASK and DV_F_DEV_SHIFT:
5126e5eeeb5e07ceef3c809452a8c9f508b2d4d1 ("Retire snd_mss ISA sound card
driver")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D44858
sound: Get rid of snddev_info->devcount
snddev_info->devcount keeps track of the total number of channels for a
given device. However, it is redundant to have it, since it is only used
in sound_oss_sysinfo() to populate the "numaudios" field, and we also
keep track of the channel counts in the playcount, pvchancount, reccount
and rvchancount fields anyway. We can simply sum those fields together
instead of updating a separate variable upon every channel
addition/deletion.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44852
sound: Simplify unit fetching in dsp_oss_audioinfo()
"i" keeps the value of the current unit, so we do not have to call
PCMUNIT() and device_get_unit() to fetch it.
In the mixer case, I think it is more correct to do it like this, since
mixer and DSP device units have a 1-1 relationship (i.e the mixer unit
is always the same as the corresponding DSP device one) and that way we
can make it more clear.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44855
sound: Remove obsolete chn_setvolume()
It is marked as obsolete and there are no consumers of it anymore.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D44853
sound: Call device_get_name() and device_get_unit() only once in mixer_init()
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D44840
sound: Be more verbose with virtual channel descriptions
Non-virtual channel description denote "play" or "record", so do the
same for virtual ones as well.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D44839
tcp: drop data received after a FIN has been processed
RFC 9293 describes the handling of data in the CLOSE-WAIT, CLOSING,
LAST-ACK, and TIME-WAIT states:
This should not occur since a FIN has been received from the remote
side. Ignore the segment text.
Therefore, implement this handling.
Reviewed by: rrs, rscheff
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D44746
Fix "set but not used" for the sym driver.
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 5045cb8f18f9f79354f93174ba7f9fd2f7ea6994)
fib_algo(4): Lower level of algorithm switching messages to LOG_INFO
Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather
easy to trigger debug messages such as:
[fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to
radix4_lockless
Also, the "severity" of these events generally only justifies LOG_INFO
and not LOG_NOTICE.
Reviewed by: melifaro
(cherry picked from commit ed81a15517b8a8f587fd7282c3690513bb798242)
fib_algo(4): Lower level of algorithm switching messages to LOG_INFO
Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather
easy to trigger debug messages such as:
[fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to
radix4_lockless
Also, the "severity" of these events generally only justifies LOG_INFO
and not LOG_NOTICE.
Reviewed by: melifaro
(cherry picked from commit ed81a15517b8a8f587fd7282c3690513bb798242)
CONTRIBUTING: request only one submission type per change
We have some instances of contributors opening a GitHub pull request and
a Phabricator review for the same change, which divides or duplicates
review effort.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44856
CONTRIBUTING: mention sys/crypto as another "contrib" directory
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44857
share/mk/bsd.cpu.mk: add F16C feature for i386 and amd64 architectures
As discussed in bug 278417, some ports require the F16C instruction set
to compile, but there is no way yet to detect whether the currently
chosen CPUTYPE supports this feature.
Add the feature to the MACHINE_CPU variable, for each processor that
supports it. The list of processors was extracted from clang 18's -dM
output, filtered on the __F16C__ define.
PR: 278417
Reviewed by: brooks, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44848