ice(4): Fix link speed after changing cable type
When interface was connected to a link partner with a cable
type limitting maximum supported speed, e.g. SFP+ cable
in 25G port, driver incorrectly saved a supported speed
as the user configured speed. This prevented interface
from using all supported speeds after switching cable to SFP28.
Link was established at 10G as supported by previously used
SFP+ cable. Don't set user requested speed unless actually
configured by an user, to allow automatic selection of highest
available speed. Only when user sets custom config
using advertise_speed sysctl save it and try
to apply after cable is changed.
Also don't save initial supported speeds if FW supports
reporting default PHY config.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
[4 lines not shown]
libpfctl: fix memory leak
When we snl_init_writer() we allocate memory in the struct snl_state in the struct pfctl_handle.
This memory was never released again, leading to a memory leak. We still
had a reference to the memory and would release it on pfctl_close()
(so valgrind did not detect it as a leak), but long-lived users (e.g.
bsnmpd) would eventually run out of memory.
Explicitly reset the snl_state when we're done to prevent this.
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
libpfctl: retrieve family id only once
Look up the pfctl family id when we open the handle, rather than for
every function call.
This saves us a lot of netlink calls, at the expense of storing one
extra int in the handle.
Sponsored by: Rubicon Communications, LLC ("Netgate")
ice(4): Add support for new E810-XXV-2 adapters
Add two new subdevice IDs for E810-XXV-2 and E810-XXV-2 for OCP 3.0.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Reviewed by: kbowling, erj, mateusz.moga_intel.com
Sponsored by: Intel Corporation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54069
bhyve: Document vCPU range pinning
This change documents the recently introduced changes to -p
that allow users to specify CPU ranges instead of having to
specify each individual mapping.
While we're here, move the -p examples to the EXAMPLES section.
Reviewed by: bcr
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D57480
Remove fips-module related diff
This particular change didn't come from upstream. It was added locally
in 7a991ecd1 when attempting to enable the fips provider with 3.0.
Given the fact that we no longer build the fips provider and the fips
provider build process (including sources) is very prescribed to
specific build steps and source versions, there's no reason why we need
to continue carrying around this diff anymore.
MFC after: 1 week
Signed-off-by: Enji Cooper <ngie at FreeBSD.org>
Update in preparation for 15.1-RELEASE
- Bump BRANCH to RELEASE
- Add the anticipated RELEASE announcement date
- Set a static __FreeBSD_version
Approved by: re (implicit)
Sponsored by: OpenSats Initiative
vt: Do not lock request comming from terminal
only those originated by mouse. Because the terminal surrounds
requests to vt(4) with locking.
Reported by: bz, adrian
Reviewed by: adrian, glebius
Approved by: glebius (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D57442
pf: switch to getmicro(up)time()
It is reported that micro(up)time() performs poorly in certain
virtualisation scenarios. Absolute accuracy isn't required here, so
switch to the slightly less accurate (as per the man page) get-variants.
PR: 295043
MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit e4130ac13d2fe9c17b8f8e86d39a7b5223fe7b79)
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 at isrc.iscas.ac.cn>
Reviewed by: mhorne
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/2241
(cherry picked from commit d1488cd762bee79240a715bf04f3d30e9a121b26)
linux/io: handle memtype_wc mapping for !DMAP range
The amdgpu driver in drm-kmod will attempt to update/reserve certain GPU
VRAM ranges as write-combining. Depending on the system, this address
range may fall outside of FreeBSD's constructed DMAP. We cannot use
pmap_change_attr() in this case.
When INVARIANTS is enabled, this results in the following:
panic: physical address 0x880000000 not covered by the DMAP
Add a guard against triggering the KASSERT in PHYS_TO_DMAP().
This limitation in our implementation of arch_io_reserve_memtype_wc() is
already known in drm-kmod's amdgpu_bo_init(), and errors are ignored
there (see "BSDFIXME"). This change is only to eliminate the preventable
assertion failure within this scheme.
Tested by: kevans
[6 lines not shown]
amd64: Make EFI runtime faults look less like panics
EFI runtime faults may be mistaken for kernel panics, and do not
necessarily represent actual problems. Try to differentiate them some
more by printing "EFI runtime trap" rather than "Fatal trap".
PR: 291193
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56309
(cherry picked from commit ddabf7f3ea4f0497dc5a5ffcbbb1d852ea77a4cd)
netlink: Use unsigned type in nl_process_nbuf
nlmsghdr::nlmsg_len and nl_buf::offset are u_int. Make msglen match.
Reviewed by: pouria, glebius
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57474
(cherry picked from commit 888d9236e2249cb1bda686aca8729fdcc69a10ac)
pmc: add sapphire rapids model
This commit adds the sapphire rapids CPU model to hwpmc_intel.c,
allowing hwpmc to be used on this CPU family.
Reviewed by: mhorne
MFC after: 3 days
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D57263
(cherry picked from commit 03c69dd90122c4ffa91a749f668a2ac8fa6843a2)
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 at isrc.iscas.ac.cn>
Reviewed by: mhorne
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/2241
(cherry picked from commit d1488cd762bee79240a715bf04f3d30e9a121b26)
linux/io: handle memtype_wc mapping for !DMAP range
The amdgpu driver in drm-kmod will attempt to update/reserve certain GPU
VRAM ranges as write-combining. Depending on the system, this address
range may fall outside of FreeBSD's constructed DMAP. We cannot use
pmap_change_attr() in this case.
When INVARIANTS is enabled, this results in the following:
panic: physical address 0x880000000 not covered by the DMAP
Add a guard against triggering the KASSERT in PHYS_TO_DMAP().
This limitation in our implementation of arch_io_reserve_memtype_wc() is
already known in drm-kmod's amdgpu_bo_init(), and errors are ignored
there (see "BSDFIXME"). This change is only to eliminate the preventable
assertion failure within this scheme.
Tested by: kevans
[6 lines not shown]
if_eqos_starfive: Read MAC address from device tree
u-boot/opensbi determines the ethernet MAC address from ROM and passes
it to the OS in the device tree. This change sets the correct MAC
address from this source. This prevents the eqos class driver from
generating random MAC addresses at each boot.
Tested on Starfive VisionFive 2, riscv64 SBC.
Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56782
(cherry picked from commit 351fad05e075c388dece4cd6dd8613494b870bad)
hwpmc_ibs: Add Zen6 IBS ctl2 filters and alternate disable
Add kernel and userland support for Zen6 IBS extensions per AMD pub
69205 (rev 1.00, March 2026): alternate fetch/op disable via ctl2[0],
fetch latency filtering, virtual address bit 63 filtering, and
streaming-store filtering. Decode the new IbsOpData2 StrmSt and
RmtSocket bits. Update libpmc, pmcstat and manpage.
Pre-Zen6 systems work unchanged with ibs_ctl2 == 0.
Signed-off-by: Andre Silva <andasilv at amd.com>
Reviewed by: Ali Mashtizadeh <ali at mashtizadeh.com>, mhorne
Sponsored by: AMD
Differential Revision: https://reviews.freebsd.org/D56914