From nobody Wed Aug 26 00:57:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hV5p86SM6z6qLCf for ; Wed, 26 Aug 2026 00:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hV5p84yDrz3vWX for ; Wed, 26 Aug 2026 00:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787705824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aCfm/IlyCd+AQcILSYK6ZADIb9dQTwNpZcgA6zW9NFc=; b=Wj3638JpL/44PDpfQbPZv/XEfsKl7UdsrSCIQzlPzBcfZkzkpxUpuMseRLTxO1zeUTwltt OQUzizXD/Bv4x+1/L3UkR7+ZQqmz0j75urv9RuCs3RAxTE/rJpaEIfvCwkZ916L+nRs8YH ujfTKm4UWHC1it4RtiDwg0++dR6/pYZjt0uN1ZQjvNbpU8f9vGKWVV1VHVaaDiTOH8RFmI ikKKrzrArvqcjRXWCCeWNvXUGcJ+6VCJmy5bIt/YSHq8X3GLusdoX6uBtHXf5v9jBk/MbW sRzfVf0645+b71aQZjm3K73kF4YFqOSvn0rKNgUnVtl3RMcVNNCdsCx4PAB/YQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787705824; a=rsa-sha256; cv=none; b=kC7d4a8sv7kybC2lidaWNDfwySM6i9/mDFzcaGWDw4znUJZpwLGo3+K/hVVeeHyBHqkPBo jJweXYWQ5gAnsqO5NeQw7b6i/isGkveSJihLSrd0RqXaDL4HqgReirXHAfMa93hWokP1YU jjyHM7L55sw0ek0hhrYa+G1G6jznLrRa8T0VR1+PiSKYpA6DIJClwlblo32n7XxSdSt0Zr G46P7u7bqFWSQ1g3SSdONlZaQRx970JENoL6R7VaJgb7vDXwJ49lZkBJhrAQkqCny1V1vp 8LPDGPYiq/fqs60GfrKhMy2CXi01yZtLulDqrPDkHsnso/N53Kvi6D403Bae5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787705824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aCfm/IlyCd+AQcILSYK6ZADIb9dQTwNpZcgA6zW9NFc=; b=NAGJxD/OzFLe7VzwVT4i7h1JJtmDekQhceNLv8sA9uqC5lQclGz4AcLpZhH7aA9GmN4F2R Xhti1wsu3BQVcOIWHNn7+hrFL/QNdLPYZ/n/B1kZY9Ddvoa5p0goy7c7Jp2WfynnATxPt3 QqXcECKEwTMJephpEK5J43ou10y+SlD7vJzveFPYgd6dbB19lCKMzaurSxp/R9QDjPpOWa fRrMvwUm7eK61wcspoqw7W1CCRLvkOIqYx9Nf4TSlwOIRBEW9AdAWHQBO46MuRvWV/bBKF zgUEHSPpdd4Hy6RbXh80kigutgP7IlREoJwbynJj0YaSZ8lgzZ7457dz7FtlkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hV5p82FZ1z19L for ; Wed, 26 Aug 2026 00:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43c8e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Aug 2026 00:57:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 623b7198c7a8 - stable/15 - ixgbe: Add led(4) identification support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 623b7198c7a83499d72e10c2b132fbd6b9a5076f Auto-Submitted: auto-generated Date: Wed, 26 Aug 2026 00:57:04 +0000 Message-Id: <6a8e39e0.43c8e.303d3f48@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=623b7198c7a83499d72e10c2b132fbd6b9a5076f commit 623b7198c7a83499d72e10c2b132fbd6b9a5076f Author: Kevin Bowling AuthorDate: 2026-08-12 00:54:21 +0000 Commit: Kevin Bowling CommitDate: 2026-08-26 00:56:51 +0000 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. (cherry picked from commit fb7e249ce4fd03fe53e4407efe661f9e94852bb6) --- share/man/man4/ix.4 | 7 ++++++- sys/dev/ixgbe/if_ix.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe.h | 2 ++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index 7177f0f9c962..433ec164688e 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -29,7 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd August 10, 2026 +.Dd August 12, 2026 .Dt IX 4 .Os .Sh NAME @@ -56,6 +56,10 @@ The driver provides support for Intel(R) 10Gb Ethernet PCIe adapters. The driver supports Jumbo Frames, MSIX, TSO, and RSS. .Pp +The identification LED for each port is controlled through its +.Pa /dev/led/ix* +device node. +.Pp For questions related to hardware requirements, refer to the documentation supplied with your Intel 10GbE adapter. All hardware requirements listed apply to use with @@ -272,6 +276,7 @@ issue to .Xr altq 4 , .Xr arp 4 , .Xr iflib 4 , +.Xr led 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 18645950766b..a1d64222a2e9 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -196,6 +196,8 @@ static void ixgbe_if_vlan_register(if_ctx_t, u16); static void ixgbe_if_vlan_unregister(if_ctx_t, u16); static int ixgbe_if_i2c_req(if_ctx_t, struct ifi2creq *); static bool ixgbe_if_needs_restart(if_ctx_t, enum iflib_restart_event); +static void ixgbe_if_led_func(if_ctx_t, int); +static void ixgbe_led_restore(struct ixgbe_softc *); int ixgbe_intr(void *); static int ixgbe_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data); @@ -366,6 +368,7 @@ static device_method_t ixgbe_if_methods[] = { DEVMETHOD(ifdi_i2c_req, ixgbe_if_i2c_req), DEVMETHOD(ifdi_needs_restart, ixgbe_if_needs_restart), DEVMETHOD(ifdi_priv_ioctl, ixgbe_if_priv_ioctl), + DEVMETHOD(ifdi_led_func, ixgbe_if_led_func), #ifdef PCI_IOV DEVMETHOD(ifdi_iov_init, ixgbe_if_iov_init), DEVMETHOD(ifdi_iov_uninit, ixgbe_if_iov_uninit), @@ -4811,6 +4814,7 @@ ixgbe_if_stop(if_ctx_t ctx) INIT_DEBUGOUT("ixgbe_if_stop: begin\n"); + ixgbe_led_restore(sc); if (sc->feat_en & IXGBE_FEATURE_SRIOV) { ixgbe_disable_mdd(hw); ixgbe_quiesce_vfs(sc); @@ -4836,6 +4840,56 @@ ixgbe_if_stop(if_ctx_t ctx) return; } /* ixgbe_if_stop */ +/* + * Identify the physical port while retaining the NVM-selected LED mode. + * E610 exposes identification through firmware rather than LEDCTL. + */ +static void +ixgbe_if_led_func(if_ctx_t ctx, int onoff) +{ + struct ixgbe_softc *sc; + struct ixgbe_hw *hw; + + sc = iflib_get_softc(ctx); + hw = &sc->hw; + if (!onoff) { + ixgbe_led_restore(sc); + return; + } + if (sc->led_active) + return; + + if (hw->mac.type == ixgbe_mac_E610) { + if (ixgbe_aci_set_port_id_led(hw, false) == IXGBE_SUCCESS) + sc->led_active = true; + return; + } + + sc->ledctl_default = IXGBE_READ_REG(hw, IXGBE_LEDCTL); + if (ixgbe_led_on(hw, hw->mac.led_link_act) == IXGBE_SUCCESS) + sc->led_active = true; +} + +static void +ixgbe_led_restore(struct ixgbe_softc *sc) +{ + struct ixgbe_hw *hw; + + if (!sc->led_active) + return; + + hw = &sc->hw; + if (hw->mac.type == ixgbe_mac_E610) { + (void)ixgbe_aci_set_port_id_led(hw, true); + } else { + /* Clear any PHY manual override before restoring LEDCTL. */ + (void)ixgbe_led_off(hw, hw->mac.led_link_act); + IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, sc->ledctl_default); + IXGBE_WRITE_FLUSH(hw); + } + sc->led_active = false; +} + /************************************************************************ * ixgbe_link_speed_to_str - Convert link speed to string * diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 9eb2813e85f0..6dfba9fda736 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -441,9 +441,11 @@ struct ixgbe_softc { u32 link_speed; bool link_up; bool link_enabled; + bool led_active; u32 vector; u16 dmac; u32 phy_layer; + u32 ledctl_default; /* Power management-related */ bool wol_support;