From nobody Thu Oct 29 04:59:08 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 4jFX7x2YKBz6xmNx for ; Thu, 29 Oct 2026 04:59:09 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jFX7x011yz4cKW for ; Thu, 29 Oct 2026 04:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793249949; 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=mbGfTcnkCGZFtkLE9MKCLiOz5RdFaP9AeIR68WwgctM=; b=xMOVzgMsMs3wIdvOspfpLYRWZXPlxpOU4FXS5w4qWpVQGILALENTuxDrPRosFoO+mX89ot zWlohIbVmzW75TgOoitqcGoqvAYTLJKuSLfb013zNaisOUN8UsjZbYioKqRqF8jIrF0ZbV 8K95S1dgDPR/mfsMxZnar2UNcb0sEEUiJMyKzRnaQaYmvM4ktKSTY/GbvCVl/whbZAWiM/ Ss10J3ZwWCyoOJzM937o5yq2PEqtlK4t8qngKM9XJ80Q/NUMdllmNxbHiCfdlOU+N5KgnD rekaJVnuiLMqQM5linGvmMXADZZmI14hZgDeQmIO0w/Wlrd2oDAm2AuAjL+Kbw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793249949; b=Hmsn05pxoTVvnNFozNcemKKIdzpivu3GIvnNDrQV6TE8yoOpI85tBwajJpP22Okkh+tAUo 7k4UOKzLDHAlssG0zCw4Aym0etNKiEXcxWbun3+dTOYQwmnPxH6OpDs7wVUJjYnw5vTXwY b07zSN79MNwGXg3NAPXQoyIrF/lH4/VT55g9Sy/DdE9/+uIokQL+kWPIRVJ/JzYfReTDCY gTWqxJpPjSuNuhb4WOMlZLDeJ45jYzlxSVPWtp0q+0T0+DQpNOW/fdXwxNxJzJkU7yByhv +4HgozPOHi6igESzar/l6QatvR1ki6PsxsvU7r6uyhPVwxnB1NfZOd+R6pHPFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793249949; 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=mbGfTcnkCGZFtkLE9MKCLiOz5RdFaP9AeIR68WwgctM=; b=eu2MnNsfUkSF6x8anLeIyw6t2hxtykvBg5JIFeGKcfBjR/TJ7l0lklfVwfxRZqif97Sa5m 5p6pMqge9RAk58l9i25yv2yJ2zCoem02PzAJLETgujKZAFpDcv9Ke3NaNkCwU8Jh+LyRnv plLF4iMjoBNXbuUqRtxIwKxrhaHUhBQ6fmJlW+z9uMmO0OMz93dXYB2ygV3UfF5wQOflYo Ujpdc4ZQ/MMaM2KFZy9g7OMgugd9IMWyBSOmTlWiChcd77LePQfxTqSlIuLW9ENjh7kZeX 2NESBAkRiszc18R66l78xn92yU6GFOFU5exAosFricxZLttj94StPp8MvuhMrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jFX7w6n8YzP9K for ; Thu, 29 Oct 2026 04:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31271 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 04:59:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 43185e3be403 - stable/15 - ixgbe: Pause firmware recovery polling in low power List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository 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: 43185e3be403861c446f8b61c3da742f6a5cf97a Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 04:59:08 +0000 Message-Id: <6ae2d29c.31271.3914088c@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=43185e3be403861c446f8b61c3da742f6a5cf97a commit 43185e3be403861c446f8b61c3da742f6a5cf97a Author: Kevin Bowling AuthorDate: 2026-09-04 06:37:25 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 04:58:59 +0000 ixgbe: Pause firmware recovery polling in low power The firmware recovery callout continues polling controller registers after a power transition. An inaccessible E610 GL_MNG_FWSM register reads as all ones in D3, which looks like firmware recovery mode and queues an iflib reset while the device is suspended. A later D0 poll then reports recovery complete and queues another reset. Pause and drain the callout before terminal stop policy is applied, prevent an in-flight callback from rearming it, and restart polling only after resume has cleared the wake state. Track callout initialization so partial attach cleanup does not drain an uninitialized callout. The false transition was reproduced on a dual-port E610 with direct D3 and system S3. Validate the guard with wake-disabled and wake-armed D3, three repeated D3 cycles per port, and an S3 magic-packet wake. Both ports returned to D0 without a false recovery transition. Sponsored by: BBOX.io (cherry picked from commit 45dc4a13654c5e90bcf5f757e46f1353b30848ee) --- sys/dev/ixgbe/if_ix.c | 38 +++++++++++++++++++++++++++++++++----- sys/dev/ixgbe/ixgbe.h | 2 ++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 77152b90a987..0f6604693432 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -250,6 +250,8 @@ static void ixgbe_update_stats_counters(struct ixgbe_softc *); static void ixgbe_config_link(if_ctx_t); static void ixgbe_get_slot_info(struct ixgbe_softc *); static void ixgbe_fw_mode_timer(void *); +static void ixgbe_fw_mode_timer_pause(struct ixgbe_softc *); +static void ixgbe_fw_mode_timer_resume(struct ixgbe_softc *); static void ixgbe_configure_wakeup(if_ctx_t); static void ixgbe_configure_wakeup_mta(if_ctx_t); static void ixgbe_prepare_wakeup(if_ctx_t, bool); @@ -1394,6 +1396,7 @@ ixgbe_if_attach_post(if_ctx_t ctx) /* Set up the timer callout */ callout_init(&sc->fw_mode_timer, true); + sc->fw_mode_timer_initialized = true; /* Start the task */ callout_reset(&sc->fw_mode_timer, hz, ixgbe_fw_mode_timer, sc); @@ -3906,6 +3909,7 @@ ixgbe_if_detach(if_ctx_t ctx) INIT_DEBUGOUT("ixgbe_detach: begin"); sc->iov_recovery_stop = true; + ixgbe_fw_mode_timer_pause(sc); ixgbe_setup_low_power_mode(ctx); @@ -3914,8 +3918,6 @@ ixgbe_if_detach(if_ctx_t ctx) ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD; IXGBE_WRITE_REG(&sc->hw, IXGBE_CTRL_EXT, ctrl_ext); - callout_drain(&sc->fw_mode_timer); - if (sc->hw.mac.type == ixgbe_mac_E610) { ixgbe_disable_lse(sc); ixgbe_shutdown_aci(&sc->hw); @@ -3994,7 +3996,9 @@ ixgbe_configure_wakeup_mta(if_ctx_t ctx) static int ixgbe_if_power_prepare(if_ctx_t ctx, enum iflib_power_event event) { + struct ixgbe_softc *sc = iflib_get_softc(ctx); + ixgbe_fw_mode_timer_pause(sc); ixgbe_prepare_wakeup(ctx, event != IFLIB_POWER_DETACH); return (0); } @@ -4144,6 +4148,7 @@ ixgbe_if_resume(if_ctx_t ctx) pci_clear_pme(dev); hw->wol_enabled = false; sc->wol_filters = 0; + ixgbe_fw_mode_timer_resume(sc); return (0); } /* ixgbe_if_resume */ @@ -4786,6 +4791,9 @@ ixgbe_fw_mode_timer(void *arg) struct ixgbe_softc *sc = arg; struct ixgbe_hw *hw = &sc->hw; + if (atomic_load_acq_int(&sc->fw_mode_timer_paused) != 0) + return; + if (ixgbe_fw_recovery_mode(hw)) { if (atomic_cmpset_acq_int(&sc->recovery_mode, 0, 1)) { /* Firmware error detected, entering recovery mode */ @@ -4805,11 +4813,31 @@ ixgbe_fw_mode_timer(void *arg) iflib_admin_intr_deferred(sc->ctx); } - - callout_reset(&sc->fw_mode_timer, hz, - ixgbe_fw_mode_timer, sc); + if (atomic_load_acq_int(&sc->fw_mode_timer_paused) == 0) + callout_reset(&sc->fw_mode_timer, hz, + ixgbe_fw_mode_timer, sc); } /* ixgbe_fw_mode_timer */ +static void +ixgbe_fw_mode_timer_pause(struct ixgbe_softc *sc) +{ + + if (!sc->fw_mode_timer_initialized || + atomic_swap_int(&sc->fw_mode_timer_paused, 1) != 0) + return; + callout_drain(&sc->fw_mode_timer); +} + +static void +ixgbe_fw_mode_timer_resume(struct ixgbe_softc *sc) +{ + + if (!sc->fw_mode_timer_initialized || + atomic_swap_int(&sc->fw_mode_timer_paused, 0) == 0) + return; + callout_reset(&sc->fw_mode_timer, hz, ixgbe_fw_mode_timer, sc); +} + /************************************************************************ * ixgbe_sfp_probe * diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index c91f829e5b5f..28010526d235 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -504,6 +504,8 @@ struct ixgbe_softc { /* Firmware error check */ int recovery_mode; + u_int fw_mode_timer_paused; + bool fw_mode_timer_initialized; bool overtemp_shutdown_pending; struct callout fw_mode_timer;