git: 6a903d983764 - main - ixgbe: Report hardware initialization failures to iflib
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Sep 2026 06:05:17 UTC
The branch main has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=6a903d9837645a9dbf990b699f50c67ad984c043
commit 6a903d9837645a9dbf990b699f50c67ad984c043
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-07 11:30:52 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-09-17 06:04:37 +0000
ixgbe: Report hardware initialization failures to iflib
Check the result of ixgbe_init_hw() before configuring queues. Report
failure through iflib_init_failed() instead of publishing a working
datapath after shared-code initialization failed.
MFC after: 2 weeks
Sponsored by: BBOX.io
---
sys/dev/ixgbe/if_ix.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index f2841bc04e2e..9aca44c6d8fa 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -4254,6 +4254,7 @@ ixgbe_if_init(if_ctx_t ctx)
u32 ctrl_ext;
int i, j, err;
+ s32 status;
INIT_DEBUGOUT("ixgbe_if_init: begin");
if (atomic_load_acq_int(&sc->recovery_mode)) {
@@ -4282,7 +4283,13 @@ ixgbe_if_init(if_ctx_t ctx)
ixgbe_set_rar(hw, 0, hw->mac.addr, sc->pool, 1);
hw->addr_ctrl.rar_used_count = 1;
- ixgbe_init_hw(hw);
+ status = ixgbe_init_hw(hw);
+ if (status != IXGBE_SUCCESS) {
+ device_printf(dev, "Hardware initialization failed: %d\n",
+ status);
+ iflib_init_failed(ctx);
+ return;
+ }
sc->iov_mta_valid = false;
sc->iov_vfta_valid = false;