Commit graph

150710 commits

Author SHA1 Message Date
Henrich Hartzer
1f2776e123 Add support for Intel Atom S1200 UART
PR: 278316

Signed-off-by: Henrich Hartzer <henrichhartzer@tuta.io>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1164
2024-04-19 16:52:51 -06:00
Ricardo Branco
a8fd0a5f44 glabel: Remove support for old reiserfs
Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1101
2024-04-19 16:48:28 -06:00
Ahmad Khalifa
67677a654a acpi_iicbus: Shift slave address
The address is expected to need shifting.
see https://uefi.org/specs/ACPI/6.5/13_System_Mgmt_Bus_Interface_Specification.html#smbus-slave-addresses

Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125
2024-04-19 16:44:57 -06:00
Ahmad Khalifa
493715f9b8 ig4_iic: Warn on NACK
Some DSDTs define non-existent devices, warn the user when an access is attempted on one of these devices.

Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125
2024-04-19 16:44:57 -06:00
Ahmad Khalifa
d0cc25f770 acpi_cmbat: Use nitems instead of sizeof
Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125
2024-04-19 16:44:57 -06:00
Ahmad Khalifa
bf2fd47550 ig4_reg: Update datasheet link
Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125
2024-04-19 16:44:57 -06:00
Denis Bodor
54e231b373 Add support for i2c-tiny-usb: usb to iic bridge
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1123
2024-04-19 16:40:23 -06:00
Brooks Davis
04e0313a71 ztest: use ASSERT3P to compare pointers
Fixes i386-gcc13 build.  Direct commit while waiting for upstream.

Pull Request: https://github.com/openzfs/zfs/pull/16115
2024-04-19 22:31:53 +01:00
Ka Ho Ng
68a3a7fc94 kasan: fix false-positive kasan_report upon thread reuse
In fork1(), if a thread is reused and thread_alloc_stack() is not
called, mark the reused thread's kstack pages clean in the KASAN shadow
buffer.

Sponsored by:	Juniper Networks, Inc.
MFC after:	3 days
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44875
2024-04-19 15:18:27 -04:00
Seth Hoffert
2cb0fce24d bpf: Make BPF interop consistent with if_loop
The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:		256587
Reviewed by:	markj
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/876
2024-04-19 14:48:37 -04:00
Bjoern A. Zeeb
563c72e213 LinuxKPI: utsname.h add missing SPDX-License-Identifier
Reported by:	markj (2023-05-24; sorry took me a while)
MFC after:	3 days
2024-04-19 18:23:12 +00:00
Gordon Bergling
178cf4b9db arm: Fix a typo in a KASSERT message
- s/resoure/resource/

MFC after:	5 days
2024-04-19 08:54:39 +02:00
Mark Johnston
e411b22736 uipc_shm: Fix a free() of an uninitialized variable
Reported by:	Coverity
CID:		1544043
Fixes:		b112232e4f ("uipc_shm: Copyin userpath for ktrace(2)")
2024-04-18 20:18:29 -04:00
Eric Joyner
9e54973fc3
ice(4): Update to 1.39.13-k
- Adds mirror interface functionality
- Remove unused virtchnl headers

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

MFC-with:	768329961d
MFC after:	3 days
Sponsored by:	Intel Corporation
Tested by:	jeffrey.e.pieper@intel.com
Differential Revision:	https://reviews.freebsd.org/D44004
2024-04-18 16:21:22 -07:00
Eric Joyner
015f8cc5b0
ice(4): Update copyright year to 2024
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D44003
2024-04-18 16:14:03 -07:00
Eric Joyner
ed34a6b6ea
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@FreeBSD.org>

MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D39930
2024-04-18 16:14:02 -07:00
Eric Joyner
3c7da27a47
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@FreeBSD.org>

MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41326
2024-04-18 16:13:47 -07:00
Christos Margiolis
1b82d425ec 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:
716924cb48 ("Retire snd_sbc ISA sound card
driver")

Last reference of DV_F_DEV_MASK and DV_F_DEV_SHIFT:
5126e5eeeb ("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
2024-04-18 22:35:41 +02:00
Christos Margiolis
a44c45c7f5 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
2024-04-18 22:35:41 +02:00
Christos Margiolis
8b97dce697 sound: Remove PCMMINOR()
It's a NO-OP.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D44854
2024-04-18 22:35:41 +02:00
Christos Margiolis
17969e6963 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
2024-04-18 22:35:41 +02:00
Christos Margiolis
4d2be7be38 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
2024-04-18 22:35:41 +02:00
Christos Margiolis
41ab202ff7 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
2024-04-18 22:35:40 +02:00
Christos Margiolis
d0032e6a9e 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
2024-04-18 22:35:36 +02:00
Michael Tuexen
1941914d3b tcp rack: improve BBR_LOG_CWND event
Fix a typo, which resulted in missing r_ctl.gate_to_fs in the BBLog
event.

Reported by:		Coverity Scan
CID:			1540024
Reviewed by:		rrs, rscheff
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44648
2024-04-18 21:57:44 +02:00
Michael Tuexen
c9cd686bd4 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
2024-04-18 21:54:42 +02:00
Gleb Smirnoff
a01c7081fe vtnet: use CURVNET_SET() instead of CURVNET_SET_QUIET()
We don't expect the VNET context to be set for virtqueue neither
for taskqueue handlers.

Suggested by:	zec
Fixes:		3f2b960775
2024-04-18 07:58:00 -07:00
Gordon Bergling
e991acd5d0 oce(4): Fix a typo in a source code comment
- s/addres/address/

MFC after:	3 days
2024-04-18 16:19:18 +02:00
Gordon Bergling
046fe202e7 muge(4): Fix a typo in a source code comment
- s/addres/address/

MFC after:	3 days
2024-04-18 16:18:26 +02:00
Gordon Bergling
8ce3ef5f35 netpfil: Fix typos in source code comments
- s/addres/address/

MFC after:	3 days
2024-04-18 16:17:10 +02:00
Mark Johnston
b7e4666d7b nfsserver: Rate-limit messages about requests from unprivileged ports
If access from unreserved ports is disabled, then a remote host can
cause an NFS server to log a message by sending a packet.  This is
useful for diagnosing problems but bad for resiliency in the case where
the server is being spammed with a large number of rejected requests.

Limit prints to once per second (racily).

Reviewed by:	rmacklem, emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44819
2024-04-17 10:36:58 -04:00
Martin Matuska
b9dee1dca2 zfs: unbreak aarch64 build with non-gcc compilers
Workaround until a permanent fix comes from vendor
2024-04-17 06:44:12 +02:00
Warner Losh
97b77de2d9 nvme: Eliminate intel_log_temp_stats_swapbytes
We can't post a AER for this page, so there's no need to be able to swap
it to host byte order. It's not one of the standard defined pages that
can post via AER, and the vendor's public docs for this temperature page
don't suggest it's possible to get over or under event changes. Since
nvmecontrol no longer needsd the swap routine, remove it since it's
now unused.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44659
2024-04-16 21:30:19 -06:00
Warner Losh
de22251127 arm_kernel_bothdr.awk: Update to latest ota
The latest ota is the first one in FreeBSD that treats 0 + "0xf" as
being '0' instead of '15'. Don't use this old trick anymore to convert
from hexidecimal to a number. Write a function to do that instead. This
fixes kernel.bin building on arm*. awk on 14 doesn't need this, but to
build FreeBSD stable/14's kernel.bin on 15 we'll need it, so fast MFC.

MFC After:		3 days
Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:  https://reviews.freebsd.org/D44801
2024-04-16 21:30:17 -06:00
Josef 'Jeff' Sipek
2e850b832f 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
2024-04-16 19:39:45 -04:00
Martin Matuska
1719886f6d zfs: merge openzfs/zfs@90ba19eb7
Notable upstream pull request merges:
 #15784 90ba19eb7b Do no use .cfi_negate_ra_state within the assembly
                   on Arm64
 #15942 b6bbaa8372 Give a better message from 'zpool get' with invalid
                   pool name
 #15943 ca678bc0bc Makefile.bsd: sort and cleanup source file list
 #15953 fa480fe5ba zinject: show more device fault fields
 #15983 30c4eba4ea Fix panics when truncating/deleting files
 #15992 99741bde59 zvol: use multiple taskq
 #16015 a100a195fa Add support for zfs mount -R <filesystem>
 #16022 5e5fd0a178 Speculative prefetch for reordered requests
 #16040 997f85b4d3 L2ARC: Relax locking during write
 #16042 b12738182c Improve dbuf_read() error reporting
 #16051 a9a4290173 xdr: header cleanup
 #16052 eeca9a91d6 Fix read errors race after block cloning
 #16057 aa5445c28b Remove db_state DB_NOFILL checks from syncing context
 #16061 76d1dde94c zinject: inject device errors into ioctls
 #16072 9e63631dea Small fix to prefetch ranges aggregation
 #16077 44f337be30 Illumos#16463 zfs_ioc_recv leaks nvlist
 #16085 4725e543be zinject: "no-op" error injection
 #16086 c6da985e28 Add the BTI elf note to the AArch64 SHA2 assembly

Obtained from:	OpenZFS
OpenZFS commit:	90ba19eb7b
2024-04-16 22:54:07 +02:00
Stephen J. Kiernan
e4a0c92e7a iflib: Correct indentation according to style(9)
The indentation style for the SYSCTL_* macros used was not matching KNF.

Reported by:	jhb
Differential Revision:	https://reviews.freebsd.org/D44811
2024-04-16 16:36:25 -04:00
Brooks Davis
1fd880742a libsys: add a libsys.h
This declares an API for libsys which currently consists of
__sys_<foo>() declarations for system call stubs and function pointer
typedefs of the form __sys_<foo>_t.  The vast majority of the
implementation resides in a generated _libsys.h which ensures that all
system call stub declarations match syscalls.master.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44387
2024-04-16 17:48:07 +01:00
Brooks Davis
79b758e327 makesyscalls: generate core libsys header
Create a header covering most of the "stable" libsys interfaces.
Specifically __sys_<foo> syscall stubs and __sys_<foo>_t typedefs for
those interfaces.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44386
2024-04-16 17:48:07 +01:00
Roger Pau Monné
f750dce972 x86/xen: fix accounted interrupt time
The current addition to the interrupt nesting level in
xen_arch_intr_handle_upcall() needs to be compensated in
xen_intr_handle_upcall(), otherwise interrupts dispatched by the upcall handler
end up seeing a td_intr_nesting_level of 2 or more, which makes them assume
there's been an interrupt nesting.

Such extra interrupt nesting count lead to statclock() reporting idle time as
interrupt, as the call from interrupt context will always be seen as a nested
one (td->td_intr_nesting_level >= 2) due to the nesting count increase done by
both xen_arch_intr_handle_upcall() and intr_execute_handlers().

Fix this by adjusting the nested interrupt count before dispatching interrupts
from xen_intr_handle_upcall().

PR: 277231
Reported by: Matthew Grooms <mgrooms@shrew.net>
Fixes: af610cabf1 ('xen/intr: adjust xen_intr_handle_upcall() to match driver filter')
Sponsored by: Cloud Software Group
Reviewed by: Elliott Mitchell <ehem+freebsd@m5p.com>
2024-04-16 09:06:33 +02:00
Michael Tuexen
605a00660e tcp bbr: improve code consistency
Improve code consistency with the RACK stack.
Reviewed by:		gallatin, rscheff
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44800
2024-04-15 23:52:08 +02:00
Brooks Davis
dcda49233d sys/acl.h: reduce header pollution
In commit d1dfd92177 the acl allocator was switched from malloc(9) to
uma(9) and done in a way required vm/uma.h and prerequisites.  This added
considerable header pollution to sys/sysproto.h.  The uma details were
hidden in commit b998d381f2, but the header pollution remained.  Add
less broad includes as required to keep the header self contained.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44468
2024-04-15 21:35:41 +01:00
Brooks Davis
5d88a2aacf sysproto.h: sys/acl.h -> sys/types.h
In sysproto.h, stop including sys/acl.h as syscall defintions now use
__acl* types from sys/_types.h.  Add sys/types.h to provide types
previously provided by sys/param.h (via sys/acl.h).

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44467
2024-04-15 21:35:41 +01:00
Brooks Davis
b83d3eb5b7 sys/_{cpu,domain}set.h: don't require sys/param.h
Add machine/param.h for MAXCPU and MAXMEMDOM in the _KERNEL case of
sys/_cpuset.h and sys/_domainset.h, making them more self contained.

This eliminates the need to include sys/param.h before sys/cpuset.h and
sys/domainset.h.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44466
2024-04-15 21:35:40 +01:00
Brooks Davis
6bb132ba1e Reduce reliance on sys/sysproto.h pollution
Add sys/errno.h, sys/malloc.h, sys/queue.h, and vm/uma.h as needed.

sys/sysproto.h currently includes sys/acl.h which currently includes
sys/param.h, sys/queue.h, and vm/uma.h which in turn bring in
sys/errno.h sys/malloc.h.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44465
2024-04-15 21:35:40 +01:00
Brooks Davis
101c80fe46 sys/malloc.h: move sys/proc.h MALLOC_DECLAREs here
This avoids the need to explicitly include sys/malloc.h before
sys/proc.h.

Suggested by:	kib
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44766
2024-04-15 21:35:40 +01:00
Bjoern A. Zeeb
2a8c50592f LinuxKPI: add __counted_by() and __nonstring
Add checks for __counted_by(_x) and __nonstring as and depending
on compiler support enable the attribute/feature.

This is needed to make mtk76 and ath1xk drivers compile.

Sposnored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste, dim
Differential Revision: https://reviews.freebsd.org/D44587
2024-04-15 19:31:49 +00:00
Bjoern A. Zeeb
1665ef979d LinuxKPI: 802.11: disable early queue wakeup workaround; better classify
We used to call lkpi_wake_tx_queues() for all queues early on in order
to make sure they are ready.  Turns out whatever logic in iwlwifi
startup is working correctly these days under LinuxKPI so this is no
longer needed.  As the comment indicated the "workaround" did not
always work.  Disable it for now.

The second part of the improvement is to properly classify Non-QOS
non-data frames (mgmt and ctl frames for now, unless we have to be
even more careful in the future about certain sub-types) as TID 7/VO.
Contrary to net80211 we must not promote PAE frames.

PR:		274382
MFC after:	3 day
Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43944
2024-04-15 17:44:00 +00:00
Bjoern A. Zeeb
cd9fee3d2c net80211: amrr_init: change order of commands
First run the KASSERT before trying to do the free operation.
Better for reporting and debugging.
Add a guard setting the value to NULL afterwards.  NULL pointers
are a lot easier to test for.

MFC after:	3 days
Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43751
2024-04-15 17:32:28 +00:00
Bjoern A. Zeeb
ac867c20e6 LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one()
Given we are passed the lsta in as a function argument there is no
need to re-lookup the sta by ni and possibly not find it.
We know the sta and ni from the lsta and whether it is uploaded to
firmware or not we can check directly from the local lsta flag.

MFC after:	3 days
Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43965
2024-04-15 17:09:06 +00:00