Commit graph

4883 commits

Author SHA1 Message Date
Bjoern A. Zeeb
be330cd9f9 rtw89: turn on debugfs support
Following 07f6575585bf also turn on debugfs support for rtw89.

Sponnsored by:	The FreeBSD Foundation

(cherry picked from commit 446eab491e523e3d7586e11cb16448e524297da4)
2025-02-10 14:52:11 +00:00
Bjoern A. Zeeb
787787fa89 iwlwifi: module correct -DCONFIG_*
Remove the =1 from -DCONFIG_* in the conditional cases.
They are not needed.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 411c857b4ccedd6491dff9a35e952bc49d053053)
2025-02-10 14:52:11 +00:00
Bjoern A. Zeeb
bd42a25673 LinuxKPI: 802.11: turn on debugfs for iwlwifi and rtw88
Make iwlwifi compile with debugfs after the last updates and turn it on
for both iwlwifi and rtw88 in order to be able to get at least some
useful information on driver/firwmare state.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 07f6575585bf69ae48dffe87c4578057ae4782d8)
2025-02-10 14:52:11 +00:00
Bjoern A. Zeeb
e6698f0614 rtw89: update Realtek's rtw89 driver.
This adds support for the Realtek 8922AE PCI
wireless network (Wi-Fi 7) adapter.

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 6d67aabd63555ab62a2f2b7f52a75ef100a2fe75)
2025-02-10 14:52:07 +00:00
Bjoern A. Zeeb
3de0d1929d rtw88: update Realtek's rtw88 driver.
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 11c53278a8a3e86e14377f09bbaa7bad193d3713)
2025-02-10 14:52:07 +00:00
Bjoern A. Zeeb
f4e352ef16 iwlwifi: update Intel's iwlwifi/mvm driver.
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit a4128aad8503277614f2d214011ef60a19447b83)
2025-02-10 14:52:07 +00:00
Mark Johnston
18a39dedbd dtrace: Build systrace_freebsd32 only if COMPAT_FREEBSD32 is configured
MFC after:	1 week
Sponsored by:	Innovate UK

(cherry picked from commit 1e734f15c7099408f45d3b1ea433868d0468916f)
2025-01-30 15:23:04 +00:00
Ed Maste
96ef85cc51 lindebugfs: Export symbols
We currently rely on the kernel linker resolving undefined references
against local symbols from other kernel modules.  Be explicit about the
symbols to export, in advance of changing that behaviour.

PR:		207898
Reviewed by:	kib, bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47980

(cherry picked from commit c3d2c959b5c0ea05d6e5162def35d51ec267590c)
2025-01-07 13:48:33 -05:00
Vladimir Kondratyev
f5b685add0 ng_ubt(4): do not attach Realtek 87XX/88XX adaptors in bootloader mode.
Attempt to initialize FreeBSD bluetooth stack while such a device is in
bootloader mode locks the adapter hardly so it requires power on/off
cycle to restore.

This change blocks ng_ubt attachment unless operational firmware is
loaded thus preventing the lock up.

Sponsored by:	Future Crew LLC
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D46738

(cherry picked from commit 24ae172a50352ad4fd22989477f29ecca5aed6e3)
2024-12-22 06:34:09 +03:00
Martin Matuska
2ec8b69480 zfs: merge openzfs/zfs@e269af1b3 (zfs-2.2-release) into stable/14
OpenZFS release 2.2.7

Notable upstream pull request merges:
 #15457 022bf8637 Increase L2ARC write rate and headroom
 #15527 1ba5b2ef8 freebsd: remove __FBSDID macro use
 #15792 9e7af55e8 Add custom debug printing for your asserts
 #15793 a1ea40af8 libzfs: use zfs_strerror() in place of strerror()
 #16181 -multiple zdb/ztest: improve and harmonise crash output
 #16208 e5e4957a5 Allow block cloning to be interrupted by a signal
 #16210 ba4e582a6 FreeBSD: Add const qualifier to members of struct
                  opensolaris_utsname
 #16225 a6198f34b Simplify issig()
 #16335 25ec9a903 zdb: fix BRT dump
 #16364 cf80a803d zvol: ensure device minors are properly cleaned up
 #16404 384b53be8 FreeBSD: Add missing memory reclamation accounting
 #16492 -multiple Split "shared" userspace & kernel code into separate files
 #16496 f1694496a zfs_file: rename zfs_file_fallocate to zfs_file_deallocate
 #16511 bc0d89bfc Fix an uninitialized data access
 #16529 2dc8529d9 Fix handling of DNS names with '-' in them for sharenfs
 #16539 30ea44296 zfs_log: add flex array fields to log record structs
 #16546 098789216 Evicting too many bytes from MFU metadata
 #16551 54278533a Reduce and handle EAGAIN errors on AIO label reads
 #16554 84ad1d536 FreeBSD: restore zfs_znode_update_vfs()
 #16565 21c40e6d9 FreeBSD: Sync taskq_cancel_id() returns with Linux
 #16567 48482bb2f Properly release key in spa_keystore_dsl_key_hold_dd()
 #16584 e8f4592a1 Avoid computing strlen() inside loops
 #16605 acc8a3186 ARC: Cache arc_c value during arc_evict()
 #16650 fc60e0c6e freebsd: Use compiler.h from FreeBSD's base's linuxkpi
 #16667 b32b35cea zdb: show bp in uberblock dump
 #16684 1f5e1b919 Pack dmu_buf_impl_t by 16 bytes
 #16688 73b3e8ace Fix gcc uninitialized warning in FreeBSD zio_crypt.c
 #16690 727506c94 On the first vdev open ignore impossible ashift hints
 #16692 d83cd5307 zdb: add extra -T flag to show histograms of BRT refcounts
 #16693 82ab837a0 Fix gcc unused value warning in FreeBSD simd.h
 #16740 2bba6e3c5 BRT: Don't call brt_pending_remove() on holes/embedded
 #16801 299da6ace Fix race in libzfs_run_process_impl

Obtained from:	OpenZFS
OpenZFS commit: e269af1b3c
OpenZFS tag:	zfs-2.2.7
2024-12-12 13:22:56 +01:00
Christos Margiolis
01f650cb8d sound: Merge ac97 and ac97_patch
No functional change intended.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D47732

(cherry picked from commit 0b4e32912566d802c7a6501d9ce8119f04dbc2fb)
2024-12-04 13:03:36 +01:00
Shailend Chand
c7aea09126 gve: Add DQO RDA support
DQO is the descriptor format for our next generation virtual NIC.
It is necessary to make full use of the hardware bandwidth on many
newer GCP VM shapes.

One major change with DQO from its predecessor GQI is that it uses
dual descriptor rings for both TX and RX queues.

The TX path uses a descriptor ring to send descriptors to HW, and
receives packet completion events on a TX completion ring.

The RX path posts buffers to HW using an RX descriptor ring and
receives incoming packets on an RX completion ring.

In GQI-QPL, the hardware could not access arbitrary regions of
guest memory, which is why there was a pre-negotitated bounce buffer
(QPL: Queue Page List). DQO-RDA has no such limitation.

"RDA" is in contrast to QPL and stands for "Raw DMA Addressing" which
just means that HW does not need a fixed bounce buffer and can DMA
arbitrary regions of guest memory.

A subsequent patch will introduce the DQO-QPL datapath that uses the
same descriptor format as in this patch, but will have a fixed
bounce buffer.

Signed-off-by: Shailend Chand <shailend@google.com>
Reviewed-by: markj
MFC-after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D46690

(cherry picked from commit d438b4ef0cfc6986b93d0754f49ebf3ead50f269)
2024-11-20 21:41:08 +00:00
Mark Johnston
f5f29d3c13 vmm: Rename the amdiommu driver to amdviiommu
(cherry picked from commit f95acbd89d594b5932197679d94d2ba23c1d0331)
2024-11-09 21:31:28 +02:00
Ravi Pokala
393bbd23b3 modules: gpioaei: Fix arm64.LINT-FDT breakage
'acpi_if.h' was accidentally omitted from the module Makefile; add it.

Fixes:	9709bda03cd0
(cherry picked from commit bb8b3b1741188ab284e8b48ec367961a480421cb)
2024-11-03 08:01:28 -08:00
Colin Percival
5a53843aef modules: gpioaei only on ACPI-supporting archs
Fixes:	9709bda03cd0 ("GPIO: Add ACPI _AEI support")
Pointy-hat to:	cperciva
Sponsored by:	Amazon

(cherry picked from commit 6540ac118473dde29cb02f786c79c64f73834ca1)
2024-11-03 08:01:28 -08:00
Colin Percival
c2cd78d944 GPIO: Add ACPI _AEI support
Changes to acpi_gpiobus.c handle discovering and parsing the _AEI
objects and storing necessary data in device ivars.  A new gpioaei.c
file implements the device, which simply requests an interrupt when
the pin is triggered and invokes the appropriate _Exx or _Lxx ACPI
method.

This makes the GPIO "power button" work on arm64 Graviton systems,
allowing EC2 "Stop"/"Reboot" instance calls to be handled cleanly.
(Prior to this change, those requests would time out after 4 minutes
and the instance would be forcibly killed.)

Reviwed by:	imp, andrew, Ahmad Khalifa
MFC after:	3 days
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47253
Co-authored-by:	Andrew Turner <andrew@FreeBSD.org>

(cherry picked from commit 9709bda03cd0f20eba0ba4276fc3c2e06354a54f)
2024-11-03 08:01:28 -08:00
Ahmad Khalifa
14887d2c86 gpiobus(4): Add an acpi variant of gpiobus
This currently only implements the address space handler and attempts to
configure pins with flags obtained from ACPI.

Reviewed by:	wulf
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1359

(cherry picked from commit 92adaa5862d5ea94318a011e0618622d0fb72521)
2024-11-03 08:01:27 -08:00
Osama Abboud
b1718de62f ena: Update license signatures to 2024
This commit updates all the license signatures to 2024.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit 8d6806cd08c093fc001db1f94cf122368b8d1549)
2024-10-31 14:54:10 +00:00
Bjoern A. Zeeb
1579a25f0a LinuxKPI: pci: rename PCI_IRQ_LEGACY to PCI_IRQ_INTX
PCI_IRQ_LEGACY was added in 366d68f283 (likely) for rtw88 only.
The define now got renamed and I cannot find any other use but
rtw88 and rtw89.
We keep the old name as comapt while driver updates are in
progress enabling it defining LINUXKPI_VERSION for the two drivers.

Sponsored by;	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46822

(cherry picked from commit 157e93e0e8138fbaa6ab5d5b20b0c23f903667a6)
2024-10-31 14:33:56 +00:00
Eric Joyner
a9d78bb714
ice_ddp: Update to 1.3.41.0
Primarily adds support for E830 devices, unlocking all of their
functionality.

As well, update the README and remove the non-FreeBSD sections
from it.

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

Sponsored by:	Intel Corporation

(cherry picked from commit f9a039060e834e89e0b2de1e8a442d78bd5c083d)
2024-10-30 13:51:47 -07:00
Dan McGregor
cfcf4ea70d
Address module reproducibility issues
Use .PATH & bare filename. This prevents the real source path from
being included in the built object, which improves reproducibility.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1211
(cherry picked from commit 8c2f6c3be0125142d3c1782e4b0ee0634c584b9e)
2024-10-30 13:51:34 -07:00
Andrew Turner
11b099f803 Add an Armv8 rndr random number provider
Armv8.5 adds an optional random number generator. This is implemented
as two special registers one to read a random number, the other to
re-seed the entropy pool before reading a random number. Both registers
will set the condition flags to tell the caller they can't produce a
random number in a reasonable amount of time.

Without a signal to reseed the entropy pool use the latter register
to provide random numbers to the kernel pool. If at a later time we
had a way to tell the provider if it needs to reseed or not we could
use the former.

On an Amazon AWS Graviton3 VM this never failed, however this may not
be the case on low end CPUs so retry reading the random number 10 times
before returning an error.

Reviewed by:	imp, delphij (csprng)
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D35411

(cherry picked from commit 9eecef052155646fbc5f8f533b952b372572d06a)
2024-10-21 15:03:26 +00:00
Bjoern A. Zeeb
71f81398f7 rtw89fw: remove module build dirs and firmware
rtw89 firmware files were removed from main a year ago after core members
asked to not import more biinary blobs into main.
Also remove the module build framework for them on stable/14 to
avoid any confusion (it was never attached to the build).

People are asked to use fwget(8) to automatically install firmware
from ports according to the man page.  A solution for the install
media is still pending.

X-MFC after:	rtw89 only
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit cf94672363d6638b7268c05b4628b62bbfc8dbe5)
(cherry picked from commit 7ff12dd25ada486c4d33e854977514b2db690e7f)
2024-10-16 22:01:56 +00:00
Bjoern A. Zeeb
a2d1e07f64 rtw89: add man page and hook driver up to the build
After two years, add the initial man page and hook Realteks rtw89
driver up to the build for more people to test given successful
reports.
devd.conf is already providing support based on the rtw<n+> regex.
The driver uses the LinuxKPI compat layer.

Firmware is provided by ports: net/wifi-firmware-rtw89-kmod or
one of the flavours.  People are advised to used fwget(8) to
automatically install the correct firmware for their chipset.

Please note that for the moment the driver requires a tunable to
be set in loader.conf: compat.linuxkpi.skb.mem_limit=1

Many thanks to everyone who in the last two years helped testing,
debugged, submitted patches to get the driver to this stage where
initial functionality seems working.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 310c31d3f04ef9d3ebe598fd076d017a48d0ca0d)
2024-10-16 21:49:29 +00:00
Bjoern A. Zeeb
dd4d05b25f mt76: add mt7615 to the pile of buildable drivers
Ignoring page_pools with the few needed adjustments and ignoring 7622
mt7615 seems to build as well.  Add it so once we can connect it to
the build people can start testing and debugging.
(The actual work was done on a newer version of the mt76 drivers but
it seems the to-build-changes equally apply here already).

Requested by:	Radu-Cristian Fotescu (freebsd-wireless, 2024-07-31)
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 7728586800bd5bb4655cff6d661133ed10cc2ff7)
2024-10-09 19:18:49 +00:00
Martin Matuska
755e773877 zfs: merge openzfs/zfs@33174af15 (zfs-2.2-release) into stable/14
OpenZFS release 2.2.6

Notable upstream pull request merges:
 #15557 bce36e21c module/icp/asm-arm/sha2: auto detect __ARM_ARCH
 #15623 2ca151537 module/icp/asm-arm/sha2: enable non-SIMD asm kernels on
                  armv5/6
 #16308 ac6500389 zfs: add bounds checking to zil_parse
 #16316 859f906a4 Fix null ptr deref when renaming a zvol with snaps and
                  snapdev=visible
 #16343 cd42e992b Enable L2 cache of all (MRU+MFU) metadata but MFU data
                  only
 #16382 3a36797ad FreeBSD: Fix RLIMIT_FSIZE handling for block cloning

Obtained from:	OpenZFS
OpenZFS commit:	33174af151
OpenZFS tag:	zfs-2.2.6
2024-09-09 22:41:36 +02:00
Andrew Turner
d5e29c62e9 linux64: Fix the build on arm64 with bti checking
When we enable checking for BTI on arm64 we need to include an ELF
note in all object files linked into a module.

As using objcopy from a binary to an ELF object file doesn't add the
note switch to using .incbin from an assembly file. This allows us to
add the needed note without affecting the included object.

Reviewed by:	imp, kib, emaste
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45468

(cherry picked from commit bed65d85c631c3a8e60a81a15a5a745c8ef92fbe)
(cherry picked from commit ec69d230933f82c7c142b053882255aa57475463)
2024-09-02 08:48:10 +00:00
Martin Matuska
d27c973264 zfs: merge openzfs/zfs@33174af15 (zfs-2.2-release) into stable/14
OpenZFS release 2.2.5

Notable upstream pull request merges:
 #15609 566841171 Only provide execvpe(3) when needed
 #15940 9edf6af4a Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN
 #16038 0f1e8ba2f L2ARC: Cleanup buffer re-compression
 #16104 b474dfad0 Refactor dbuf_read() for safer decryption
 #16118 938d1588e Make more taskq parameters writable
 #16131 672474659 Slightly improve dnode hash
 #16138 4c0fbd8d6 FreeBSD: Add zfs_link_create() error handling
 #16159 fa4b1a404 ZAP: Fix leaf references on zap_expand_leaf() errors
 #16162 41f2a9c81 Fix scn_queue races on very old pools
 #16165 4c484d66b Fix ZIL clone records for legacy holes
 #16206 27cc6df76 Use memset to zero stack allocations containing unions
 #16207 2eab4f7b3 Fix assertion in Persistent L2ARC
 #16214 13ccbbb47 Some improvements to metaslabs eviction
 #16216 ba3c7692c Destroy ARC buffer in case of fill error
 #16258 4d2f7f983 vdev_open: clear async fault flag after reopen
 #16264 ef08cb26d Fix long_free_dirty accounting for small files
 #16273 54ef0fdf6 head_errlog: fix use-after-free
 #16284 14cce09a6 FreeBSD: Use a statement expression to implement
                  SET_ERROR()
 #16406 6f27c4cad Make 'rmmod zfs' work after zfs-2.2.4

Obtained from:	OpenZFS
OpenZFS commit:	33174af151
OpenZFS tag:	zfs-2.2.5
2024-08-13 09:52:28 +02:00
Vladimir Kondratyev
59d36b8969 LinuxKPI: update linuxkpi_video to Linux 6.6
disable hdmi_audio_infoframe_pack_for_dp function for now as it depends
on not imported yet drm sources and is not used by drm-kmod.

Reviewed by:	manu
Sponsored by:	Serenity CyberSecurity, LLC
Differential Revision:	https://reviews.freebsd.org/D46224

(cherry picked from commit c89d94ad5d95fd15e891b2723caae8a6104ee153)
2024-08-11 13:12:38 +03:00
Mark Johnston
096cb89033 dtrace: Avoid including dtrace_isa.c directly into dtrace.c
This was done in the original DTrace import, presumably because that
made it a bit easier to handle includes.  However, this can cause
dtrace_getpcstack() to be inlined into dtrace_probe(), resulting in a
missing frame in stack traces since dtrace_getpcstack() takes care to
bump "aframes" to account for its own stack frame.

To avoid this, compile dtrace_isa.c separately on all platforms.  Add
requisite includes.

MFC after:	2 weeks
Sponsored by:	Innovate UK

(cherry picked from commit 82283cad12a417abfb1469d899b2d7cfb1d38f77)
2024-08-08 15:53:50 +00:00
Christos Margiolis
1ff260a6e1 sound: Implement dummy driver
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D45967

(cherry picked from commit c15c9315b2cb7601cc337f7d5a8e124f4b2d5861)
2024-07-29 18:34:54 +03:00
John Baldwin
24687a65dd sys: Enable NVMe drivers on all architectures
The NVMe drivers are portable and are already included statically in
GENERIC on other architectures such as aarch64 and riscv64.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44690

(cherry picked from commit 16e846fa1ed3c97419b55b292f77b0f4209f0875)
2024-07-18 13:19:18 -04:00
Warner Losh
125a2a6b67 MFC: linux: Make module standalone-buildable
Add opt_inet.h and opt_usb.h to make linux module buildable standalone.

(cherry picked from commit c5f906d32d2bc8e37f1e1911382e27af7e6240ff)
2024-07-04 02:37:57 +07:00
Souradeep Chakrabarti
7ece5993b7 Hyper-V: TLB flush enlightment using hypercall
Currently FreeBSD uses IPI based TLB flushing for remote
TLB flushing. Hyper-V allows hypercalls to flush local and
remote TLB. The use of Hyper-V hypercalls gives significant
performance improvement in TLB operations.

This patch set during test has shown near to 40 percent
TLB performance improvement.

Also this patch adds rep hypercall implementation as well.

Reviewed by:	whu, kib
Tested by:	whu
Authored-by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Co-Authored-by:	Erni Sri Satya Vennela <ernis@microsoft.com>
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D45521

(cherry picked from commit 2b887687edc25bb4553f0d8a1183f454a85d413d)
2024-07-01 13:21:14 +00:00
Baptiste Daroussin
c333758fca mac_do: add a new MAC/do policy and mdo(1) utility
This policy enables a user to become another user without having to be
root (hence no setuid binary). it is configured via rules using sysctl
security.mac.do.rules

For example:
security.mac.do.rules=uid=1001:80,gid=0:any

The above rule means the user identifier by the uid 1001 is able to
become user 80
Any user of the group 0 are allowed to become any user on the system.

The mdo(1) utility expects the MAC/do policy to be installed and its
rules defined.

Reviewed by:	des
Differential Revision:	https://reviews.freebsd.org/D45145

(cherry picked from commit 8aac90f18aef7c9eea906c3ff9a001ca7b94f375)
2024-06-27 10:44:29 +02:00
Emmanuel Vadot
04a191c251 puc: Make kernel module working
We need uart_bus_puc.c in the module for it to work.

Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 304ac69eca623d63510aa61853adc1ea60593323)
2024-06-04 14:23:21 +02:00
Emmanuel Vadot
5080cf0846 linuxkpi: Add linuxkpi_video module
This contain the hdmi code and the aperture code like in linux.

Differential Revision:	https://reviews.freebsd.org/D44925
Reviewed by:		bz
Obtained from:		drm-kmod
Sponsored by:		Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 11d79c4756b7c85faf7c4a268c301a41ce0887b9)
2024-06-04 13:06:45 +02:00
Emmanuel Vadot
13671022eb linuxkpi: hdmi: Split the module declaration to a new file
In order to have a proper linuxkpi_video kmod, move the module declaration
to a new file as linuxkpi_video will also include linux_hdmi.c

Differential Revision:	https://reviews.freebsd.org/D44926
Reviewed by:		bz, emaste, wulf
Sponsored by:		Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 7f84bb34a1d191949ec519a01c0c574f5e827c88)
2024-06-04 13:06:40 +02:00
Warner Losh
eff27c3872 Fix bnxt build in LINT
LINT includes bnxt_re driver. Adjust the path in files, add missing
files and add a new BNXT_C to build (which thinly wraps OFED version
with bnxt specicif stuff).

Sponsored by:		Netflix
Fixes: acd884dec99a ("RDMA/bnxt_re: Add bnxt_re RoCE driver")

(cherry picked from commit 175b2c00a6bcb0c8c1f6b76b6da9bf4879a5848e)
2024-06-03 13:23:15 -06:00
Mark Johnston
bce36dfef8 bnxt: Do not compile on 32-bit platforms
The new bnxt_re driver doesn't compile on any of them (it uses writeq()
from the LinuxKPI, which isn't implemented there), and had already been
disconnected from the build on i386.

Reported by:	Jenkins
Fixes:	acd884dec99a ("RDMA/bnxt_re: Add bnxt_re RoCE driver")

(cherry picked from commit c867ba72889de51b0bd2c6a7049f539abaafd46e)
2024-06-03 13:23:15 -06:00
Mark Johnston
20213402c6 bnxt: Add a module makefile to fix the build
Fixes:	35b53f8c989f ("bnxt_en: Add PFC, ETS & App TLVs protocols support")
(cherry picked from commit bf56e8b9c8639ac4447d223b83cdc128107cc3cd)
2024-06-03 13:23:15 -06:00
Chandrakanth patil
76a34e9d94 bnxt_{en/re}: Update bnxt_en and bnxt_re Makefile
Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D45202

(cherry picked from commit faeff3b851dae6e9eb836c59756476e162ea3c40)
2024-06-03 13:23:15 -06:00
Sumit Saxena
93265fb21c RDMA/bnxt_re: Add bnxt_re RoCE driver
This patch introduces the RoCE driver for the
Broadcom NetXtreme-E 10/25/50/100/200G RoCE HCAs.

The RoCE driver is a two part driver that relies
on the bnxt_en NIC driver to operate. The changes
needed in the bnxt_en driver is included through
another patch "L2-RoCE driver communication interface"
in this set.

Presently, There is no user space support, Hence
recommendation to use the krping kernel module for
testing. User space support will be incorporated in
subsequent patch submissions.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D45011

(cherry picked from commit acd884dec99adcf8c4cdd0aa8a50be79c216f8e8)
2024-06-03 13:23:15 -06:00
Chandrakanth patil
107e02d706 bnxt_en: L2-RoCE driver communication interface
- Added Aux bus support for RoCE.
- Implemented the ulp ops that are required by RoCE driver.
- Restructure context memory data structures
- DBR pacing support

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D45006

(cherry picked from commit 050d28e13cdede7528944c0abf8d0455729c63fd)
2024-06-03 13:23:14 -06:00
Chandrakanth patil
ac940a8b92 bnxt_en: Add PFC, ETS & App TLVs protocols support
Created new directory "bnxt_en" in /dev/bnxt and /modules/bnxt
and moved source files and Makefile into respective directory.

ETS support:

   - Added new files bnxt_dcb.c & bnxt_dcb.h
   - Added sysctl node 'dcb' and created handlers 'ets' and
     'dcbx_cap'
   - Add logic to validate user input and configure ETS in
     the firmware
   - Updated makefile to include bnxt_dcb.c & bnxt_dcb.h

PFC support:

   - Created sysctl handlers 'pfc' under node 'dcb'
   - Added logic to validate user input and configure PFC in
     the firmware.

App TLV support:

   - Created 3 new sysctl handlers under node 'dcb'
       - set_apptlv (write only): Sets a specified TLV
       - del_apptlv (write only): Deletes a specified TLV
       - list_apptlv (read only): Lists all APP TLVs configured
   - Added logic to validate user input and configure APP TLVs
     in the firmware.

Added Below DCB ops for management interface:

   - Set PFC, Get PFC, Set ETS, Get ETS, Add App_TLV, Del App_TLV
     Lst App_TLV

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D45005

(cherry picked from commit 35b53f8c989f62286aad075ef2e97bba358144f8)
2024-06-03 13:23:14 -06:00
Lexi Winter
040a7e0dcb sys/modules/dpdk_lpm4: do not build without INET
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1236

(cherry picked from commit 304a03275a65cf811fb6c06fa1c37783d07c99a4)
2024-05-20 21:13:24 -06:00
Christos Margiolis
ad677fb457 sound: Retire unit.*
The unit.* code is largely obsolete and imposes limits that are no
longer needed nowadays.

- Capping the maximum allowed soundcards in a given machine. By default,
  the limit is 512 (snd_max_u() in unit.c), and the maximum possible is
  2048 (SND_UNIT_UMAX in unit.h). It can also be tuned through the
  hw.snd.maxunit loader(8) tunable. Even though these limits are large
  enough that they should never cause problems, there is no need for
  this limit to exist in the first place.
- Capping the available device/channel types. By default, this is 32
  (snd_max_d() in unit.c). However, these types are pre-defined in
  pcm/sound.h (see SND_DEV_*), so the cap is unnecessary when we know
  that their number is constant.
- Capping the number of channels per-device. By default, the limit 1024
  (snd_max_c() in unit.c). This is probably the most problematic of the
  limits mentioned, because this limit can never be reached, as the
  maximum is hard-capped at either hw.snd.maxautovchans (16 by default),
  or SND_MAXHWCHAN and SND_MAXVCHANS.

These limtits are encoded in masks (see SND_U_MASK, SND_D_MASK,
SND_C_MASK in unit.h) and are used to construct a bitfield of the form
[dsp_unit, type, channel_unit] in snd_mkunit() which is assigned to
pcm_channel->unit.

This patch gets rid of everything unit.*-related and makes a slightly
different use of the "unit" field to only contain the channel unit
number. The channel type is stored in a new pcm_channel->type field, and
the DSP unit number need not be stored at all, since we can fetch it
from device_get_unit(pcm_channel->dev). This change has the effect that
we no longer need to impose caps on the number of soundcards,
device/channel types and per-device channels. As a result the code is
noticeably simplified and more readable.

Apart from the fact that the hw.snd.maxunit loader(8) tunable is also
retired as a side-effect of this patch, sound(4)'s behavior remains the
same.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D44912

(cherry picked from commit 25723d66369fe6786e9e4f5f77381b944755f267)
2024-05-17 21:30:25 +02:00
Martin Matuska
9a5f0cb5b6 zfs: merge openzfs/zfs@256659204 (zfs-2.2-release) into stable/14
OpenZFS release 2.2.4

Notable upstream pull request merges:
 #15076 fdd97e009 Refactor dmu_prefetch()
 #15225 5972bb856 Use ASSERT0P() to check that a pointer is NULL
 #15381 7ea833100 ZIL: Detect single-threaded workloads
 #15515 8b1a132de ZIO: Optimize zio_flush()
 #15225 d6da6cbd7 Clean up existing VERIFY*() macros
 #15225 5dda8c091 Add VERIFY0P() and ASSERT0P() macros
 #15436 61f3638a3 Add prefetch property
 #15509 6f323353d Add ashift validation when adding devices to a pool
 #15539 ea3f7c12a Extend import_progress kstat with a notes field
 #15635 25ea8ce94 ZIL: Improve next log block size prediction
 #15784 16c223eec Do no use .cfi_negate_ra_state within the assembly on
                  Arm64
 #15839 706307445 vdev probe to slow disk can stall mmp write checker
 #15879 86b39b41a zpool: Fix locale-specific time
 #15927 fa5de0c5c Update resume token at object receive
 #15941 fdd8c0aea BRT: Skip duplicate BRT prefetches
 #15942 889152ce4 Give better message from 'zpool get' with invalid pool
                  name
 #15950 3e91a9c52 BRT: Skip getting length in brt_entry_lookup()
 #15951 19bf54b76 ZAP: Massively switch to _by_dnode() interfaces
 #15954 f7c1db636 BRT: Change brt_pending_tree sorting order
 #15955 457e62d7c BRT: Relax brt_pending_apply() locking
 #15967 c94f73007 BRT: Make BRT block sizes configurable
 #15976 dced953b6 ZAP: Some cleanups/micro-optimizations
 #15983 531572b59 Fix panics when truncating/deleting files
 #15992 5fc134ff2 zvol: use multiple taskq
 #16007 2ea370a4e BRT: Fix holes cloning
 #16008 67995229a zpool: Fix option string, adding -e and fixing order
 #16015 8a5604713 Add support for zfs mount -R <filesystem>
 #16022 026fe7964 Speculative prefetch for reordered requests
 #16040 575872cc3 L2ARC: Relax locking during write
 #16042 d5fb6abd3 Improve dbuf_read() error reporting
 #16051 5d859a2e2 xdr: header cleanup
 #16052 602b5dca7 Fix read errors race after block cloning
 #16057 97d7228f4 Remove db_state DB_NOFILL checks from syncing context
 #16072 f4ce02ae4 Small fix to prefetch ranges aggregation
 #16074 97889c037 return NULL at end of send_progress_thread
 #16086 7aaf6ce9d Add the BTI elf note to the AArch64 SHA2 assembly
 #16094 4d17e200d Add zfetch stats in arcstats
 #16128 3d4d61988 Fix updating the zvol_htable when renaming a zvol
 #16141 b3b37b84e Fix arcstats for FreeBSD after zfetch support

Obtained from:	OpenZFS
OpenZFS commit:	2566592045
OpenZFS tag:	zfs-2.2.4
2024-05-03 23:52:01 +02:00
Eric Joyner
eafd6c26f9
ice_ddp: Update package to 1.3.36.0
This is intended to be used with the upcoming ice 1.39.13-k
driver update, but is still backwards compatible with
previous versions of the driver.

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

Sponsored by:	Intel Corporation

(cherry picked from commit 768329961dc0c041f7647f1c4549944a2ca168aa)
2024-04-24 15:14:48 -07:00
Christos Margiolis
e6c51f6db8 sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)
Currently the snd_clone framework creates device nodes on-demand for
every channel, through the dsp_clone() callback, and is responsible for
routing audio to the appropriate channel(s). This patch gets rid of the
whole snd_clone framework (including any related sysctls) and instead
uses DEVFS_CDEVPRIV(9) to handle device opening, channel allocation and
audio routing. This results in a significant reduction in code size as
well as complexity.

Behavior that is preserved:

- hw.snd.basename_clone.
- Exclusive access of an audio device (i.e VCHANs disabled).
- Multiple processes can read from/write to the device.
- A device can only be opened as many times as the maximum allowed
  channel number (see SND_MAXHWCHAN in pcm/sound.h).
- OSSv4 compatibility aliases are preserved.

Behavior changes:

Only one /dev/dspX device node is created (on attach) for each audio
device, as opposed to the current /dev/dspX.Y devices created by
snd_clone. According to the sound(4) man page, devices are not meant to
be opened through /dev/dspX.Y anyway, so it is best if we do not create
device nodes for them in the first place. As a result of this, modify
dsp_oss_audioinfo() to print /dev/dspX in the "ai->devnode", instead of
/dev/dspX.Y.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 months
Reviewed by:	dev_submerge.ch, bapt, markj
Differential Revision:	https://reviews.freebsd.org/D44411

(cherry picked from commit e8c0d15a64fadb4a330f2da7244becaac161bb70)
2024-04-18 14:39:26 +02:00