nvme: Add quirk for Amazon EBS NVMe Controller
This controller exhibits QUIRK_EMPTY_NAMESPACE_CHANGED_LOG behaviour.
A bug report has been filed with the vendor.
Reviewed by: imp
MFC after: 1 week
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D58232
(cherry picked from commit 14f5fd2395e3f1c3fadeee8b95756c142f7dcb0b)
rc+devd: Add growfs_postboot
In VM and cloud environments it is often possible to enlarge virtual
disks; this can be useful, for example, if a system is launched with a
small root disk and it later becomes clear that more space is needed.
On kernels which support run-time resizing of disks (for NVMe, this was
added in November 2025; some other disk types have supported this for
longer) a SIZECHANGE notification is sent to userland via devd.
Add a "nostart" rc.d script (runnable manually but not automatically at
boot time) and a devd script which invokes it when a notification
arrives. The rc.d script enlarges the "final partition" on partitioned
geoms, or the UFS filesystem or zpool device when triggered on a disk
containing either of those.
Reviewed by: imp, ziaee
MFC after: 2 weeks
Relnotes: Disk partitions and filesystems can be enlarged
[6 lines not shown]
nvme: Add quirk for broken namespace-change log
Add a QUIRK_EMPTY_NAMESPACE_CHANGED_LOG quirk which indicates that the
nvme controller may not properly populate the namespace-changed log
page. If we receive a NVME_LOG_CHANGED_NAMESPACE page for a device
with this quirk and the page is empty, probe all of the namespaces
rather than none of them.
Reviewed by: imp
MFC after: 1 week
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D58231
(cherry picked from commit 954098103ee287f39ecbf5d3144bcdfd16e7c41d)
bcm2835_pwm: Fix dev.pwm.0.ratio2 register
A typo in the sysctl for RPI0 PWM channel 2 was causing it to
write to the wrong register, leaving it misconfigured if used.
PR: 298301
MFC after: 3 days (problem reported on 14.4)
Reviewed by: adrian
Reported by: Attila Kover <attila.kover at guardian.co.uk>
Differential Revision: https://reviews.freebsd.org/D59644
Remove source_rc_confs, inlined from defaults/rc.conf
Inlining source_rc_confs broke sysrc_test:A_flag
While here, switch to SPDX, bump version/copyrights, fixup comments.
Prevent common function override when bsdconfig includes new
sysrc.subr that contains inlined commons. Fix non-unique duplicate
header variable incorrectly shared between bsdconfig's sysrc.subr
include and new sysrc.subr include.
Harden RC_DEFAULTS parameter expansion from DoS-via-glob (SC2223).
Move pgm to the correct location to not override bsdconfig's pgm.
Drop _SYSRC_JAILED=1 that is no-longer needed. Drop i18n from
jail_depend now that messages are inlined to subr.
Reported by: siva
Fixes: eaeb5f29bc6f sysrc: make independant from bsdconfig(8)
Implement vmemdup_{array}_user
This is what FreeBSD now does for memdup_user and memdup_array_user
(which is wrong for memdup, but correct for vmemdup).
The amdgpu DRM driver started this in Linux ~6.12.86+
Reviewed by: wulf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D57444
iflib: Clear simple-TX quiescence before publishing admission
Initialization publishes RUNNING and enables interrupts before clearing
the simple-TX producer barrier. A transmitter admitted in that window
still sees IFLIB_TXQ_QUIESCING and drops its packet with ENETDOWN. A TX
completion task can likewise return without draining deferred packets.
Clear the barrier on every TX queue after driver initialization and RX
buffer setup succeed, before publishing admission. Keep failed init
paths closed and retain the existing stop, interrupt and timer ordering.
This changes only initialization; no work is added to the packet path.
Reviewed by: iflib (gallatin)
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59690
e1000: Express TSO restart policy without OACTIVE
After a link speed change updates TSO capabilities, request a restart
when iflib is running or the interface is administratively up. Leave
an administratively down, stopped interface to apply the change at its
next initialization.
Do not infer initialization from IFF_DRV_OACTIVE, which also remains
set after stop and failed initialization. Use iflib_is_running() for
software admission and IFF_UP for intent; iflib retains responsibility
for quiescing any partially initialized queues before restarting.
This also permits a restart request for an administratively up
interface before its first initialization attempt.
Reviewed by: iflib (gallatin)
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59599
iflib: Use the framework run-state accessor in drivers
Replace direct IFF_DRV_RUNNING reads in igbv, ixgbe, ixv, iavf, ixl,
ice, bnxt Ethernet, aq, enic and the axgbe PCI frontend with
iflib_is_running(). Keep each existing mailbox-ready, fault-state,
link-state and administrative-up condition: framework admission is not
a substitute for device specific readiness.
This covers interrupt admission, operational link publication, VF
mailbox and VLAN replay, and live-configuration decisions. Remove
ifnet temporaries used only to read the driver flags.
Replace the em and igc debug dumps' RUNNING/OACTIVE text with one
framework admission snapshot. OACTIVE does not mean that the interface
or hardware is inactive. Label the result as software admission rather
than link state or proof that DMA has stopped, and retain the queue
head/tail dumps and separate RS diagnostics. Keep the filter register
and requested interface flags in the axgbe PCI promiscuous-mode trace,
but remove its unrelated legacy driver flags.
[14 lines not shown]
iflib: Separate software admission from legacy driver flags
Publish an atomic software run state snapshot through iflib_is_running().
Use it for iflib traffic admission, queue tasks, timers, debugnet and
live-configuration checks instead of reading the unsynchronized
ifnet driver flags. Keep admission closed after failed initialization
and close it when a watchdog requests deferred recovery.
Retain the context-locked datapath state for DMA ownership: a closed
admission gate does not establish that the hardware is stopped. Open
the gate after receive buffer setup and before interrupt enable, at the
existing RUNNING publication point. Serialize the writers with the
state mutex and continue publishing RUNNING/OACTIVE for network stack
consumers. The accessor takes no lock and is usable from filters, but
is only a snapshot, not a context reference or a queue-user drain.
Recheck multicast and VFLR admission under the context lock. Replace
the OACTIVE drain check with the same private admission gate, retaining
the separate per-queue descriptor backpressure policy. Rename its
[11 lines not shown]
iflib: Use private lifecycle state for control work
Use the context-locked datapath state for netmap initialization results,
resume completion and administrative work eligibility. Keep stopped
and failed interfaces eligible for link and mailbox recovery without
using IFF_DRV_OACTIVE as an implicit indication that initialization has
been attempted. Evaluate media and deferred admin eligibility under
the context lock rather than from an earlier IFF_DRV_ flag snapshot.
Always pass through iflib_stop() before an IOV-init callback which
changes the PF queue layout, as the IOV-uninit counterpart already does.
Neither administrative down nor a cleared IFF_DRV_RUNNING proves that
queue DMA is stopped. The private lifecycle state decides whether the
hardware stop is necessary; IFF_UP only decides whether to initialize
again afterward.
Reviewed by: iflib (gallatin)
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59597
video(4): add extended controls and remaining V4L2 compat symbols
Add the extended control interface
Values match the reference ABI; the new struct layouts are pinned
with static assertions.
Reported by: thierry
Reviewed by: adrian, thierry
Differential Revision: https://reviews.freebsd.org/D59496
intel: add hfsts debug-probe driver for Intel ME/HECI firmware status
Add an amd64-only, Intel-only diagnostic driver that reads ME Host
Firmware Status registers from PCI configuration space without mapping the messaging BAR.
Select the HFS register count per device generation, decode sparse
HFS1 state, mode, and error fields, and expose raw and summarized
status via sysctl. Register an ISA-side hfstsfd probe for supported
RCBA/FD2 generations so firmware-hidden HECI functions can be diagnosed.
Reviewed by: kbowling, adrian
Differential Revision: https://reviews.freebsd.org/D58863
iw_cxgbe: Remove unused return value from destroy_cq
Part of the original Linux commit was already applied during a prior
OFED update in commit b633e08c705fe43180567eae26923d6f6f98c8d9, but
this portion of the changes to the Linux iw_cxgb4 driver were not
included.
Obtained from: Linux commit a52c8e2469c30cf7ac453d624aed9c168b23d1af
iw_cxgbe: Fix qpid leak
Add await in destroy_qp() so that all references to qp are dereferenced
and qp is freed in destroy_qp() itself. This ensures freeing of all QPs
before invocation of dealloc_ucontext(), which prevents loss of in use
qpids stored in the ucontext.
Obtained from: Linux commit f70baa7ee3d1b5a9e66ac7549e31641a656f23c1
Sponsored by: Chelsio Communications
iw_cxgbe: Miscellaneous changes from the iw_cxgb4 driver
These include changes to use newer APIs, cosmetic changes to reduce
diffs between the two drivers, and other minor fixes.
Sponsored by: Chelsio Communications
Co-authored-by: Arjun V <arjun at chelsio.com>
Co-authored-by: Krishnamraju Eraparaju <krishna2 at chelsio.com>
Co-authored-by: Vishal Kulkarni <vishal at chelsio.com>
iw_cxgbe/libcxgb4: Pass ftid_base to libcxgb4 through status page
While here, fix incorrect frees in error paths in c4iw_alloc_context().
Sponsored by: Chelsio Communications
cxgbe: Enable RDMA WRITE_CMPL work requests if the firmware supports them
This work request permits combining RDMA WRITE and SEND_INV commands
into a single work request.
Sponsored by: Chelsio Communications
libcxgb4: remove update_qp_state()
Remove it because it is not needed. If we're flushing the qp, it is
because we've had a fatal error, so just set the user qp state to ERR
and continue on.
Sponsored by: Chelsio Communications
iw_cxgbe/libcxgb4: Support for RDMA WRITE_COMPL work requests
To optimize NVME-oF READ IOPs, use a specialized work request that
combines a RDMA WRITE and SEND_INV chain into a single request.
Sponsored by: Chelsio Communications
Co-authored-by: Potnuri Bharat Teja <bharat at chelsio.com>