Commit Graph
311837 Commits
Author SHA1 Message Date
Konstantin Belousov 1a71d24ecd kern/sys_process.c: make vmspace_rwmem() similar to io functions
In particular, if there were any bytes moved, and then vm_fault()
faulted, do not return an error, but report the short io instead.

PR:	297512
Reviewed by:	markj
Tested by:	Stéphane D'Alu <[email protected]>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58838
2026-08-14 17:35:38 +03:00
Konstantin Belousov f6000e9dd9 kern/kern_proc.c: do not throw out read data in get_ps_strings()
Since vmspace_iop()/proc_readmem() might return -1 on error from
vmspace_rwmem(), account for this and stop reading but return already
accumulated data if any, instead of returning an error.

PR:	297512
Reported and tested by:	Stéphane D'Alu <[email protected]>
Reviewed by:	markj
Fixes:	e1b0d051bb ("proc: Allow to make proc_rwmem() operate on a consistent address space")
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58838
2026-08-14 17:35:38 +03:00
Konstantin Belousov 01d4e3c1d3 netipsec/xform_ipcomp.c: fix sockaddr type set in ipcomp6_nonexp_encapcheck()
Noted and reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58646
2026-08-14 17:35:38 +03:00
Konstantin Belousov cba481a7bf PF_KEY socket: limit the length of copied socket address
for SADB_UPDATE op SADB_X_EXT_NEW_ADDRESS_SRC/DST extensions, by
checking the sa_len matching the address family requirements before
doing the copy.

Also convert KEY_SETSECASIDX() and KEY_SETSECSPIDX() to functions and
apply the sa_len clamping there.

See https://github.com/0xdeadbeefnetwork/pfkey-sadb-overflow

PR:	297264
Tested by:	Wafa Hamzah <[email protected]> (previous version)
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58646
2026-08-14 17:35:38 +03:00
Konstantin Belousov fbe9aa7ebf netipsec/key.c::key_checksockaddrs(): constify src/dst address buffer pointers
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58646
2026-08-14 17:35:38 +03:00
Alan Somers d9cf2a8671 Increase the default mlock limit from 64k to 256k
The current default has been unchanged for 14 years.  Increase it to
keep pace with modern hardware and software.  security/pinentry-gnome,
in particular, can sometimes need 112 kB.

PR:		297452
MFC after:	2 weeks
Sponsored by:	ConnectWise
Reviewed by:	cye, emaste
Differential Revision: https://reviews.freebsd.org/D58811
2026-08-14 08:31:27 -06:00
Alexander Leidinger d0f0a3b89b etc/rc.subr: svcj - use the filename for services
We have ports and basesystem services, where the internal name and the
filename differ. While the documentation recommends to keep them in
sync, the reality is different. For service jails use the basename of
the service filename.
Fixes:		2efbd48 rc: add service jails framework
Suggested by:	joneum
MFC after:	1 week
MFC to:		stable/15
2026-08-14 09:49:35 +02:00
Alexander Leidinger 84d8d2878a rc.d/bgfsck: use the correct variable name
The name of the script and the name used internally for rc.conf differ,
as such the hardcoded disabling of service jails for the didn't work.
Fix by using the correct name.
Fixes:		f99f0ee14e rc.d: add a service jails config to all base system services
2026-08-14 09:42:47 +02:00
Dag-Erling Smørgrav 79a6ad63e6 libifconfig: Fix table size
Tables that have one element per protocol or address family were
previously sized by AF_MAX + 1 since AF_MAX was off by one.  Now that
AF_MAX has been corrected, we need to apply the opposite correction to
these tables.

Fixes:		ddd850aa77 ("sys/socket.h: Fix AF_MAX")
MFC after:	3 days
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D58827
2026-08-14 00:54:27 +00:00
Dag-Erling Smørgrav 6c41d928bc routing: Fix table sizes
Tables that have one element per protocol or address family were
previously sized by AF_MAX + 1 since AF_MAX was off by one.  Now that
AF_MAX has been corrected, we need to apply the opposite correction to
these tables.

Fixes:          ddd850aa77 ("sys/socket.h: Fix AF_MAX")
MFC after:	3 days
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	pouria, kevans, glebius
Differential Revision:	https://reviews.freebsd.org/D58826
2026-08-14 00:54:27 +00:00
Devin Teske a8347f4428 git-arc: Add a diff subcommand
Show the differences between local commits and their associated
Phabricator reviews, i.e., what "git arc update" would upload.  For
each commit, the review's current raw diff is applied to the commit's
parent in a temporary index and the resulting tree is compared against
the commit itself.  An empty diff means the commit and the review are
in sync.

This makes it easy to check whether local amendments have diverged
from the posted review before updating it, or to confirm that a
review is current before landing.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D58789
2026-08-13 13:31:36 -07:00
Devin Teske 3baada83bf unix: only treat an empty sun_path as a peer descriptor for connectat(2)
connect(2) passes AT_FDCWD to unp_connectat(), so the empty-path
descriptor branch added in 6563dcb6b1 turned any sockaddr whose
sun_path begins with a NUL byte into getsock(AT_FDCWD), failing with
EBADF where the pathname lookup historically failed with ENOENT.

Linux abstract namespace names are exactly that: the linuxulator
passes them through with the leading NUL intact, and libxcb tries the
abstract socket first, falling back to the pathname socket only on
ENOENT or ECONNREFUSED. The EBADF made every Linux X11 client fail
at startup with "Missing X server or $DISPLAY".

Restrict the descriptor interpretation to fd != AT_FDCWD, matching
the contract stated in 6563dcb6b1f5's commit message ("Accept an
empty sun_path when fd is not AT_FDCWD"): connect(2) again reaches
the pathname lookup and fails with ENOENT as it always did.

Add a regression test: a NUL-leading, nonzero-length sun_path through
connect(2) or connectat(2) with AT_FDCWD must fail the pathname
lookup with ENOENT, not EBADF.

Fixes:  6563dcb6b1 ("unix: allow connectat(2) to name the peer socket by descriptor")

Reviewed by:	John Ericson <[email protected]>, markj
Differential Revision:	https://reviews.freebsd.org/D58792
2026-08-13 13:17:09 -07:00
Faraz Vahedi 7271ee7b4b jng: Fix mislabeled stats output
Reviewed by:	dteske, pouria
Approved by:	dteske (mentor), pouria
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2129
2026-08-13 21:13:43 +03:30
John Baldwin 6c41d1e266 libcxgb4: Use t4fw_interface.h from the cxgbe driver sources
In Linux these are maintained in separate places so a separate copy is
needed, but in FreeBSD take advantage of the shared tree to avoid
having a duplicate copy that can be stale.

Reviewed by:	np
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D58575
2026-08-13 13:02:17 -04:00
John Baldwin ec8985a100 rtld: Remove a stale #ifdef PIC
rtld has always been built PIC since commit
7ca8e6a670.  The stale #ifdef might
confuse a reader by thinking rtld can be built as non-PIC.

Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D58623
2026-08-13 13:02:17 -04:00
Faraz Vahedi f9dfe9b8de libc: Use C23 pseudo-types in qualifier-preserving man page synopses
Reviewed by:	fuz
Approved by:	fuz (mentor)
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2288
2026-08-13 20:08:50 +03:30
Faraz Vahedi d08296c7ab libc: Implement qualifier-preserving standard library functions
Several standard library functions are specified to return an unqualified
pointer while accepting a pointer to a potentially const-qualified object.
N3020 addresses this behaviour, discarding qualifiers due to incompatible
pointer types, by introducing qualifier-preserving macros for the affected
set of standard library functions.

Add `__qualsel()` helper to `<sys/cdefs.h>`, implemented using the generic
selection, and define qualifier-preserving macros for that set of functions
in `<string.h>`, `<wchar.h>`, and `<stdlib.h>`.

Macros are gated on `_STDC_VERSION__ >= 202311L && !__cplusplus`, therefore
there is no behavioural change for earlier C modes or C++ translation units.
The kernel is likewise unaffected, as it does not include userland headers.

As function-like macros, they are transparent except at a call site where
the address-of operator is applied, the macro is suppressed via `#undef`,
or the identifier appears in parenthesised form; all of which cause the
underlying function designator to be used instead.

Reviewed by:	fuz
Approved by:	fuz (mentor)
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2288
2026-08-13 20:08:49 +03:30
Kristof Provost 4a8bf4de7b pfsync test: reduce the number of states to bulk-sync
We created so many states that our bulk-sync occasionally caused epair
to drop packets, which in turn caused the test to fail. That's not what
we're testing here, make it more robust by creating fewer states.

PR:		297307
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-08-13 18:20:00 +02:00
Mitchell Horne 49749f2128 release/riscv: tweak GENERICSD partition placement
Increase EFI partition size to begin rootfs at 64mb. I believe this was
my original intention. I have a microSD card with 8mb block size which
emits an advisory in verbose dmesg about the misaligned partition.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2026-08-13 12:39:32 -03:00
ShengYi Hung 1c1bce5bbd libusb: Mark defualt smybol tag as latest stable version
As we might change the libusb ABI in 16, we should mark thje first
version as FBSD_1.8 instead of 1.9. Since versioning patch has not
landed for a long time, it makes sense to change it directly.

Discussed with: kib
Fixes: 527a82474c ("libusb: versioning symbols")
Sponsored by:   The FreeBSD Foundation
2026-08-13 23:38:08 +08:00
Kevin Bowling 98b5640786 bnxt: Add led(4) identification support
Query the firmware for the LEDs on each physical port and expose
/dev/led/bnxt* only when alternate blinking is supported.  Configure
every LED in the advertised group for identification and restore its
default firmware state before a function reset.

This follows the DPDK and Linux bnxt HWRM identification paths.

Reviewed against: DPDK, Linux

Reviewed by:	Sumit Saxena <[email protected]>
MFC after:	2 weeks
Sponsored by:	BBOX.io
2026-08-13 08:32:07 -07:00
Konstantin Belousov 6747bf7e22 linuxkpi: stop inlining accesses to curthread->td_lkpi_task
This should provide much higher resistence against struct thread layout
changes for out-of-tree modules depending on linuxkpi.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58733
2026-08-13 18:29:14 +03:00
Konstantin Belousov e2cfbd498a tty: do not recurse on ttydev_close()
When the terminal cdev is closed due to revoke, ttydev_close() destroys
t_inpoll and t_outpoll selinfos.  Since corresponding knotes reference
files pointing to the same tty cdev, it fdrop()s them.  But then the
VOP_CLOSE() call would recurse into the ttydev_close() for the same tty.
More, because the devfs vnode is already doomed, each close call gets
the FREVOKE flag set.

As result, the kernel is recursing as deep into the ttydev_close() as
there are opened files referencing the same tty, which have the knotes
installed.  Basically, the recursion level is controlled by userspace.

Prevent it by marking the tty that is handled by ttydev_close(), with
the TF_INDEVCLOSE flag.  Do nothing in ttydev_close() when the flag is
already set, avoiding recursion.

Fixes:	acd5638e26 ("tty: delete knotes when TTY is revoked")
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58706
2026-08-13 18:29:14 +03:00
Nimish Jain 17952b6532 vmm: fix compilation errors for static kernel on arm64
Fixes: 		35164034e3 ("arm64/vmm: Make remaining registers use hypctx_*_sys_reg")
Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D58690
2026-08-13 15:15:16 +00:00
Mark Johnston 79e0b69ce8 unix: Fix mchain handling in uipc_sosend_stream_or_seqpacket()
Empty mchains cannot be copied with simple assignment.

I think this bug is mostly harmless: if mcnext is empty, then it won't
be accessed again before it is reinitialized in the next loop iteration.
So the bug only trips an assertion in INVARIANTS kernels and won't be
visible otherwise.

Add a regression test which triggers this corner case.

Reported by:	Jan Bramkamp
Fixes:		d157927807 ("unix: new implementation of unix/stream & unix/seqpacket")
Reviewed by:	glebius
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D58791
2026-08-13 14:59:14 +00:00
Andre Albsmeier fe06e383cc daemon(8): Add option to write pidfile w/o supervising it
Co-authored-by:	Michael Osipov <[email protected]>
PR:		280487
Reviewed by:	kevans, michaelo
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46313
2026-08-13 16:21:52 +02:00
Mitchell Horne 2ea905c875 cdefs(9): document __nonstring
Reviewed by:	emaste
Discussed with:	imp
Fixes:	802c6d5d61 ("cdefs.h: Introduce __nonstring attribute")
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D58804
2026-08-13 10:47:41 -03:00
Siva Mahadevan 3c33729ce2 rc_subr_test: ignore stderr in no_cycles test
nuageinit_user_data_script references 'firstboot_freebsd_update'
and 'firstboot_pkg_upgrade', which are from Ports. In a default
base system test without sysutils/firstboot-freebsd-update and
sysutils/firstboot-pkg-upgrade, rcorder will warn on "unknown
provisions" to stderr, but is otherwise harmless.

Reviewed by:	arrowd
Fixes:		16e47f317c
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-08-13 09:29:43 -04:00
Dag-Erling Smørgrav 336b6d1192 build: Use -f when copying sources
If one of the source files we copy is non-writeable, cp will create a
non-writeable copy.  If the original is later modified, cp will fail to
overwrite the copy since it is not writeable.  Using cp -f ensures the
copy always succeeds, as long as the object directory is writeable.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
2026-08-13 14:31:54 +02:00
Faraz Vahedi b54dcb897a libc/tests: Add assertions for BOOL_WIDTH, BOOL_MAX, and BITINT_MAXWIDTH
Reviewed by:	fuz
Approved by:	fuz (mentor)
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2352
2026-08-13 13:11:41 +03:30
Faraz Vahedi ca1c1eceb3 sys/limits.h: Fix typo
Reviewed by:	fuz
Approved by:	fuz (mentor)
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2352
2026-08-13 13:11:37 +03:30
Faraz Vahedi 1f09e35429 sys/limits.h: Add BOOL_MAX, BITINT_MAXWIDTH, and C23 feature test macro
Add BOOL_MAX and BITINT_MAXWIDTH macros for C23 compliance, and
define the __STDC_VERSION_LIMITS_H__ feature test macro now that
the header fully conforms to C23.

Reviewed by:	fuz
Approved by:	fuz (mentor)
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2352
2026-08-13 13:11:25 +03:30
Aymeric Wibo 7858a57baa thunderbolt: Explicitly read NHI ISR0 register to clear it
This fixes and issue where Pink Sardine controllers were not receiving
interrupts for more than the first command sent on the ring.

Reviewed by:	emaste, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D52862
2026-08-13 07:46:14 +02:00
Aymeric Wibo efdb824139 thunderbolt: Reset controllers
Reset routine for both v1.0 and v2.0 routes, chosen depending on version
reported in caps.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D49452
2026-08-12 23:53:13 +02:00
Aymeric Wibo 529177b332 thunderbolt: Get NHI version number from caps
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D49452
2026-08-12 23:51:18 +02:00
Kevin Bowling 2519e19f05 iflib: Allow conditional LED device support
A driver class may implement LED control even though the capability is
not available on every device or firmware version it supports.  Add an
optional capability method and consult it before creating the led(4)
device.  Default to supported so existing providers are unchanged.

This will be used by bnxt which blends PF and VF in the same driver.

MFC after:	2 weeks
2026-08-12 13:06:16 -07:00
Kevin Bowling 9f7633b932 igc: Report corrected internal ECC errors
I225 and I226 do not interrupt for corrected internal ECC errors.
Instead, the DMA packet buffer and PCIe memories expose sticky status
bits in PBECCSTS and PCIEECCSTS.

Sample these bits with the regular hardware statistics update, preserve
the PBECCSTS ECC enable state while clearing its RW1C indication, and
expose separate counters for the DMA packet buffer, PCIe transmit-data
memory, and PCIe retry buffer.

These counters represent observed indications rather than an exact error
count because multiple corrections between samples collapse into one
sticky status bit.

Hardware validation used an I225-IT (rev 3) and a debug kernel that
wrote only the documented self-clearing injection bits.  Each test
armed the injector, exercised the owning RAM with traffic, and compared
the corresponding counter before and after.

Coverage:
    Memory                Observed result
    DMA packet buffer     corrected_dma advanced once
    PCIe transmit data    corrected_pcie_tx_data advanced once
    PCIe retry buffer     No PCIe replay source; not exercised

The retry-buffer injector requires a real PCIe replay to read the
corrupted entry.  The test root port exposed AER and DPC reporting but
no protocol error injector, so ordinary traffic could not cover that
case.

MFC after:	2 weeks
Sponsored by:	BBOX.io
2026-08-12 12:39:54 -07:00
Kevin Bowling bbf93227fe igc: Recover from fatal internal memory errors
I225 and I226 report uncorrectable internal memory errors through
ICR.FER and identify the affected region in PEIND.  Depending on the
region, hardware stops transmit or all PCIe and DMA traffic until the
port is reset and reinitialized.

Enable the fatal error interrupt and capture its read clear status in
the interrupt filter.  Mask the cause while an iflib reset is pending,
report the affected memory regions, and expose per region indication
counters.

PCIe region parity failures require a different recovery order from a
normal reset: assert DEV_RST, wait at least 3 ms, disable PCIe master
requests, clear PCIEERRSTS, and then reinitialize the port.  Follow that
sequence before entering the normal reset path and clear the remaining
LAN status afterward.

The I225/I226 PBECCSTS layout is unrelated to the PCH layout previously
copied into the igc headers.  Replace those unused definitions with the
I225/I226 memory error register definitions.

Hardware validation used an I225-IT revision 3 and a debug kernel that
wrote only the documented self-clearing injection bits.  It did not
synthesize interrupt or status state.

Coverage, notably DMA and Mgmt are not fully testable in my setup:
    Region  Observed hardware status          Result
    LAN     PEIND 0x1, LANPERRSTS 0x200       Reset and recovered
    PCIe    PEIND 0x4, PCIEERRSTS 0x8         Reset and recovered
    DMA     DRPARC injection read back zero   DFT-gated on test NIC
    Mgmt    Host debug strap unavailable      Not injectable

The repeated LAN and PCIe tests recovered without a panic or watchdog.
A PCIe-to-LAN sequence also verified that reset-time PEIND indications
are drained before FER is unmasked.

MFC after:	2 weeks
Sponsored by:	BBOX.io
2026-08-12 12:39:54 -07:00
Mark Johnston e15d22609c mfc-candidates: Fix remote repo detection
In my repos the remote "freebsd" is [email protected]:src.git.
In particular, the last component is delimited by a colon, not a slash.

Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D48951
2026-08-12 14:29:48 -04:00
Abdelkader Boudih f77fa28422 video: bump __FreeBSD_version for video(4) refactor
Reviewed by:	manu, adrian
Differential Revision:	https://reviews.freebsd.org/D58798
2026-08-12 09:52:36 -07:00
Abdelkader Boudih a8c126b690 video: add V4L2 compat symbols for ffmpeg/opencv
Adds v4l2_std_id, struct v4l2_standard/v4l2_plane, VIDIOC_G_STD/S_STD/
ENUMSTD, V4L2_STD_NTSC*, the MPLANE capability flag, multiplanar types
(VIDEO_MAX_PLANES, v4l2_plane_pix_format, v4l2_pix_format_mplane,
V4L2_TYPE_IS_MULTIPLANAR), V4L2_PIX_FMT_JPEG/YUV411P/SN9C10X, and the
MPEG control class (V4L2_CID_MPEG_BASE, V4L2_CID_MPEG_VIDEO_B_FRAMES).

video(4) capture devices are digital-only and never expose these, but
ffmpeg's libavdevice/v4l2.c and opencv's cap_v4l.cpp both reference
them unconditionally. Fixes their build against sys/videoio.h.

PR:		297454

Reviewed by:	manu, adrian
Differential Revision:	https://reviews.freebsd.org/D58793
2026-08-12 09:52:12 -07:00
Abdelkader Boudih fb3564b44f video: fix v4l2_buffer size assert on non-i386 32-bit ports
Split the #else branch into an explicit __i386__ case (68) and a
generic ILP32-with-64-bit-time_t case (80) covering arm and powerpc.

Fixes: 0343ab8a6a

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D58790
2026-08-12 09:51:50 -07:00
ShengYi Hung 527a82474c libusb: versioning symbols
Reviewed by:    bapt, kevans
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55686
2026-08-12 22:49:35 +08:00
Poul-Henning Kamp 7d576f1d65 Change /dev/geom.ctl from root:operator to root:wheel. 2026-08-12 05:12:33 +00:00
Kevin Bowling 3aac283613 ixgbe: Defer E610 thermal shutdown to iflib
The E610 firmware event handler invoked ixgbe_if_stop() directly from
IFDI_UPDATE_ADMIN_STATUS().  This reset the device without the iflib
queue lifecycle and left the interface marked running after its hardware
was stopped.

Request an iflib reset instead.  Fail the automatic initialization once
so the reset transaction stops the interface and publishes that state.
A later operator-requested initialization remains possible, matching the
previous recovery policy without bypassing iflib.

MFC after:	2 weeks
2026-08-11 21:07:20 -07:00
Kevin Bowling 43aa553ef4 ixgbe: Defer firmware recovery transitions to iflib
The firmware-mode callout invoked ixgbe_if_stop() directly.  This
performed a full device reset without the iflib context lock or the
iflib queue lifecycle.  It could also poll the E610 firmware command
interface from callout context while identification was active.

Request an iflib reset from the callout instead.  Reject initialization
while firmware recovery remains active.  This leaves the interface
stopped and lets iflib publish that state.  Request initialization when
firmware exits recovery so an administratively-up interface can recover
without operator intervention.

MFC after:	2 weeks
2026-08-11 20:39:40 -07:00
Kevin Bowling c28f2c551d ixgbe: Defer ECC recovery to iflib
The link interrupt filter performed a full hardware reset in interrupt
context.  This bypassed iflib stop and initialization, including queue
quiescence and restoration of temporary LED state.

Record the ECC event in the administrative request mask and ask iflib
to perform the reset from its taskqueue.  Keep the ECC cause masked
until reset so the intermediate admin pass cannot re-enable a sticky
condition.  Handle ECC independently of Flow Director and in legacy
interrupt mode.

Remove the redundant EICR write; the filter has already cleared the
reported causes.  Also remove the accompanying complement-mask update
of mac.flags.  It set every flag except DOUBLE_RESET_REQUIRED and had
no place in ECC recovery.

MFC after:	2 weeks
2026-08-11 20:39:39 -07:00
Kevin Bowling 8b2e75970c ixl: Add led(4) identification support
Expose each physical port identification LED through /dev/led/ixl*.
Use the existing GPIO LED helpers for most devices and the PHY
provisioning interface for X710 10GBASE-T adapters.

Preserve and restore the original GPIO or PHY indication mode,
including before the interface is stopped.

MFC after:	2 weeks
2026-08-11 20:16:08 -07:00
Kevin Bowling fb7e249ce4 ixgbe: Add led(4) identification support
Expose the physical port identification LED through /dev/led/ix*.
Save and restore the NVM-selected LEDCTL value around each request.
The X550 operations also clear their PHY manual override before the
register is restored.

Use the dedicated firmware port-identification command on E610.  Its
interface selects between firmware blinking and the original mode
rather than directly controlling LEDCTL.

Restore the normal indication before a device stop or reset.

MFC after:	2 weeks
2026-08-11 20:06:41 -07:00
Kevin Bowling 423927d6c3 igc: Remove invalid debug ring pointer iteration
The debug routine reads queue registers by queue index.  It also
advanced unused pointers to rings embedded in queue structures.  Those
pointers had the wrong stride and could proceed beyond the ring object.

Remove the unused pointer arithmetic.

MFC after:	2 weeks
2026-08-11 20:03:11 -07:00