git: 1dc515bfe52f - stable/15 - ixgbe: Defer E610 thermal shutdown to iflib

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Wed, 26 Aug 2026 00:57:08 UTC
The branch stable/15 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=1dc515bfe52f130552ce0a9e3c805d1cc9a84363

commit 1dc515bfe52f130552ce0a9e3c805d1cc9a84363
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-12 03:57:29 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-26 00:56:52 +0000

    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.
    
    (cherry picked from commit 3aac283613bd3fd0228a06d6c854ca0bf190ecfb)
---
 sys/dev/ixgbe/if_ix.c | 19 ++++++++++++++-----
 sys/dev/ixgbe/ixgbe.h |  1 +
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index df3435434525..40a21bfefef8 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -4030,6 +4030,12 @@ ixgbe_if_init(if_ctx_t ctx)
 		iflib_init_failed(ctx);
 		return;
 	}
+	/* Leave an overheated adapter stopped until an operator retries. */
+	if (sc->overtemp_shutdown_pending) {
+		sc->overtemp_shutdown_pending = false;
+		iflib_init_failed(ctx);
+		return;
+	}
 
 	/* Preserve the largest frame requested by the PF or an active VF. */
 	sc->max_frame_size = if_getmtu(ifp) + IXGBE_MTU_HDR;
@@ -4804,11 +4810,14 @@ ixgbe_handle_fw_event(void *context)
 			break;
 
 		case ixgbe_aci_opc_temp_tca_event:
-			if (hw->adapter_stopped == FALSE)
-				ixgbe_if_stop(ctx);
-			device_printf(sc->dev,
-			    "CRITICAL: OVER TEMP!! PHY IS SHUT DOWN!!\n");
-			device_printf(sc->dev, "System shutdown required!\n");
+			if (!sc->overtemp_shutdown_pending) {
+				sc->overtemp_shutdown_pending = true;
+				requests |= IXGBE_REQUEST_TASK_RESET;
+				device_printf(sc->dev,
+				    "CRITICAL: OVER TEMP!! PHY IS SHUT DOWN!!\n");
+				device_printf(sc->dev,
+				    "System shutdown required!\n");
+			}
 			break;
 
 		default:
diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h
index d8f383dfc867..43610e863c6d 100644
--- a/sys/dev/ixgbe/ixgbe.h
+++ b/sys/dev/ixgbe/ixgbe.h
@@ -502,6 +502,7 @@ struct ixgbe_softc {
 
 	/* Firmware error check */
 	int			recovery_mode;
+	bool			overtemp_shutdown_pending;
 	struct callout		fw_mode_timer;
 
 	/* Misc stats maintained by the driver */