From nobody Fri Sep 11 20:16:18 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 4hhQmS1g12z6rD8R for ; Fri, 11 Sep 2026 20:16:24 +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 4hhQmR6zfbz4Jsn for ; Fri, 11 Sep 2026 20:16:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789157784; 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=G9mpoUP7eKkJ8VzRe2Wxl8fjJalA8dWOOBGZ7JjSDes=; b=nmbwz2GGidQCZw3FD/oejhKAvkMXcKt+YiRhEjRh3ct/LkTK9RyaFHr7uNvM1n13qqrHN/ 1pjQPKjgD0sS+saMI8xcokXDVw8XyYKZ/JW9k69tn4vXhCQV4kE/NGrZ/KSuHTmUU+pnrw 9LuWuPCyDd+MIhcRKQY4s5+jyWl0zbJbl8ABt9gs7FyPpUFETiKd/7GUKcLDDvuwYqVvzA Cad0mC4vAPVUulL9pfB7h6IcjaSKvDyg3CCPn5uwZqb9AZRHgNE7vx3FKLPDD4SkLX4KSw pTQ3jkucvWLeRVu/K/gUHskN0yqPgJT5jGJ00Jf1/T0qyjGwuh3dgcEJTjHHZA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789157784; b=WXCJnyKQEVoBAyT2DrhBFDCaZYYNxhVEOo7D+I3ritDr27bTZ8X0dh0VSSJNU99ZzV2U+W YurtpNtlXoBR58iH26f7KYqYTEiRPFXXJ94IytMoSZdGZX3Wnlsm28INRLjDW/AFm3SYTR W4UBD4vK8Rg7UbgMmjLvk6ZWL36b0GyZL7WzK6QeEe0GPh1AroarrL5aen0qjF0DaOaxTy J8kYKj6J63Oh4NhjntOoxDqX32TM4eFmiOqEq9Wgmjh0PdgxIP2HNmrMFj5CxKeDG7sIJE V2OWB3VP5PtvxejDoXh1AEXBGsBEJSrXnp+OFxP4xU4+yp66mJcDbP10K4aQ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789157784; 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=G9mpoUP7eKkJ8VzRe2Wxl8fjJalA8dWOOBGZ7JjSDes=; b=NNiglUGI9sHd/WZ0h/XsS38dPCdvtkH23WyBUFVkF/PTpTh8wlEjMrnEZiyNIjjh7XTCbL 5b08+UMqYB4J6EOSLAFea0zDunAZdkPrOnMRyiN5efSsZW23nMaaTYFhHx3qXJpgEDgYf1 jFHSiQFpERD6uivQVrybmwScrjToqLFf26ErLDmZ5gUqKD6dg1MXUhkWuIrQUEhrJJB0gQ xl7a6VuboyHynk5NSqf9ts9y7XPt5IrRLJyc4qrQix49HCStbR+3IX1ChfM+X5z8GZR3ba fKDX873up0/cFwdhHJdQNObORcxhDaI6YgAlJMSrAT4xumB8imhNyTh9REu5oQ== 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 4hhQmR64dlzSdj for ; Fri, 11 Sep 2026 20:16:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2515e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 11 Sep 2026 20:16:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 45dc4a13654c - main - ixgbe: Pause firmware recovery polling in low power 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/main X-Git-Reftype: branch X-Git-Commit: 45dc4a13654c5e90bcf5f757e46f1353b30848ee Auto-Submitted: auto-generated Date: Fri, 11 Sep 2026 20:16:18 +0000 Message-Id: <6aa46192.2515e.23f50619@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=45dc4a13654c5e90bcf5f757e46f1353b30848ee commit 45dc4a13654c5e90bcf5f757e46f1353b30848ee Author: Kevin Bowling AuthorDate: 2026-09-04 06:37:25 +0000 Commit: Kevin Bowling CommitDate: 2026-09-11 20:15:55 +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. MFC after: 2 weeks Sponsored by: BBOX.io --- 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 f734db0f79f0..b2a133c80b55 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -254,6 +254,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); @@ -1408,6 +1410,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); @@ -3916,6 +3919,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); @@ -3924,8 +3928,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); @@ -4004,7 +4006,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); } @@ -4154,6 +4158,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 */ @@ -4796,6 +4801,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 */ @@ -4815,11 +4823,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 ba8cfb94915a..fb0ac15f5008 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -505,6 +505,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;