From nobody Mon Aug 24 00:58:36 2026 X-Original-To: dev-commits-src-branches@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 4hSsws23r6z6q2YJ for ; Mon, 24 Aug 2026 00:58:37 +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 4hSsws0Rclz45jR for ; Mon, 24 Aug 2026 00:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787533117; 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=5VVxEtdUWa9PYAq4Ti/aU+k6n8e2+Q/lD6UC4FCT5ic=; b=Di+WPtfvUVUSZcgRJTQtz0Weu1+q6qQ7U9hHEIGUhGLLlV5vbBkD0PUTJ3gC75ZXPJGRO8 iBHk9qQU4JGN5gEHGiaHItuiYSE7AwyH8I6LHuZzb++dZmTZZb/FTcG0zmeWmMs69Ho1gC PFZPyOaCYl42DC/srz5GxXzzy8uyVid0Ik0+NJPUNF76uVvM+iCVwVESof6089fnmzicD7 YlAahR/rZMFOu0p2binvfWlt2kgBBoI4dMAT7Lq21ID1I2bFz0MLebUh52K2RyXHsgZw0d AO3nMpjiFdsJswS3FlECXwBgfDoYoJRjBDimNNeIqiyf9o3WvI52+D6byA8daA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787533117; a=rsa-sha256; cv=none; b=qLA4axDdZTakg24G5hzfij7HffRtAOUb9s/ktMzEV62UcAwV0Hf/xSwAQueSp3dvhVdHtv PsIN7cI4qprtJIKl8eSGAaQJ2n5HI+Lyo7UnLnmybUa8MgKsrSOJI8dmJ3Dw00D+w2qa+D LK2NFjALDb0rPiiT/2f5dC2WMA9rRVa1v/OlHnXACI/9BOc6QsLHuGmgk73e2KdUtZSSOu 1nyYCRBwRrXvBuV8uU7VJlxFJvK7VAnwjnE/bslnKFXFPnA8Bw8mcOG+vIbB6qTl9wmWpZ 5DjCipQi5dxPjGatFPANL09vTPVDki9eQdfrK71fuWE40g9a22rdioFWTTA0CA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787533117; 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=5VVxEtdUWa9PYAq4Ti/aU+k6n8e2+Q/lD6UC4FCT5ic=; b=YEY5o3uWw9I11aOOEZxmq5TgQ3qToILQrtsrcoJ1Xbmf5cv4m5/HYNBP+c+p3X9p64zjmk DQJzLszh+924psXyLJ+V9ViFQzGh1eb4C4dW7pWtd/6Lpc4Gc00c88gBxf7mNMcLnYu03z 4so8cwkkUGemVqhKgKvM3bH9yfwc4iYHwS0uaxcP+QCLShYCw5E/fiXSu/sjTeDklh4T3F eQnCDGXJdaYe4eFPW8a9SkUcEqHa9Xv8znYoSNm4Ts7w9jvmo9arCRXYBV62njnQzHxU2S VGOUDPVw0yz9L2z3iW2VKjNPpQM31ARdOA8yakOPDkXD7fTTsm2cPBpcWtz+Jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hSswr5x3Lzj3v for ; Mon, 24 Aug 2026 00:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32e1f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Aug 2026 00:58:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: b50cef613c7d - stable/14 - bnxt: Report initialization failures to iflib List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b50cef613c7dc993b94af06d4e3e1955fb51a741 Auto-Submitted: auto-generated Date: Mon, 24 Aug 2026 00:58:36 +0000 Message-Id: <6a8b973c.32e1f.2cafd19a@gitrepo.freebsd.org> The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=b50cef613c7dc993b94af06d4e3e1955fb51a741 commit b50cef613c7dc993b94af06d4e3e1955fb51a741 Author: Kevin Bowling AuthorDate: 2026-08-09 09:37:20 +0000 Commit: Kevin Bowling CommitDate: 2026-08-24 00:55:39 +0000 bnxt: Report initialization failures to iflib HWRM failures currently return from the void ifdi_init callback. iflib then marks the interface running and enables interrupts despite an incomplete ring or VNIC setup. Move the hardware setup into an error-returning helper. The ifdi_init wrapper can report failure through iflib_init_failed(), while firmware recovery can propagate the same error through bnxt_open(). Also clear the initialized state after partial setup is torn down. (cherry picked from commit cb0e8f5fb6de03428137c096b1c8b62710829029) --- sys/dev/bnxt/bnxt_en/if_bnxt.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index a8c353e1c406..54d79ea39459 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -199,6 +199,7 @@ static int bnxt_detach(if_ctx_t ctx); /* Device configuration */ static void bnxt_init(if_ctx_t ctx); +static int bnxt_init_hw(if_ctx_t ctx); static void bnxt_stop(if_ctx_t ctx); static void bnxt_multi_set(if_ctx_t ctx); static int bnxt_mtu_set(if_ctx_t ctx, uint32_t mtu); @@ -2069,7 +2070,9 @@ static int bnxt_open(struct bnxt_softc *bp) } bnxt_msix_intr_assign(bp->ctx, 0); - bnxt_init(bp->ctx); + rc = bnxt_init_hw(bp->ctx); + if (rc != 0) + return (rc); bnxt_intr_enable(bp->ctx); if (test_and_clear_bit(BNXT_STATE_FW_RESET_DET, &bp->state)) { @@ -3011,6 +3014,14 @@ skip_aux_init: /* Device configuration */ static void bnxt_init(if_ctx_t ctx) +{ + + if (bnxt_init_hw(ctx) != 0) + iflib_init_failed(ctx); +} + +static int +bnxt_init_hw(if_ctx_t ctx) { struct bnxt_softc *softc = iflib_get_softc(ctx); struct ifmediareq ifmr; @@ -3020,7 +3031,7 @@ bnxt_init(if_ctx_t ctx) if (!BNXT_CHIP_P5_PLUS(softc)) { rc = bnxt_hwrm_func_reset(softc); if (rc) - return; + return (rc); } else if (softc->is_dev_init) { bnxt_stop(ctx); } @@ -3191,12 +3202,13 @@ skip_def_cp_ring: bnxt_get_port_module_status(softc); bnxt_media_status(softc->ctx, &ifmr); bnxt_hwrm_cfa_l2_set_rx_mask(softc, &softc->vnic_info); - return; + return (0); fail: bnxt_func_reset(softc); bnxt_clear_ids(softc); - return; + softc->is_dev_init = false; + return (rc); } static void