git: 3aac283613bd - main - ixgbe: Defer E610 thermal shutdown to iflib

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Wed, 12 Aug 2026 04:07:48 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=3aac283613bd3fd0228a06d6c854ca0bf190ecfb

commit 3aac283613bd3fd0228a06d6c854ca0bf190ecfb
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-12 03:57:29 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-12 04:07:20 +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.
    
    MFC after:      2 weeks
---
 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 0ec9dd584b60..7bc7a2fc831b 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -4039,6 +4039,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;
@@ -4813,11 +4819,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 3f06d1ab8120..8ded6fa41c65 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 */