From nobody Fri May 29 13:06:04 2026 X-Original-To: dev-commits-src-main@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 4gRkBN5H4Pz6f1Rh for ; Fri, 29 May 2026 13:06:04 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gRkBN4c0jz3hxP for ; Fri, 29 May 2026 13:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780059964; 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=X1vvz02igSCm7plPELW/3iPtAIuC5X87Sar/pn6OPfI=; b=DTB2vn6QfBIBAMrx1SLlNngN3RVDTH6yHl23+fjRA9c6EF6NXY0ZlbJaOpevfIPXHG3LU/ 74XrS1H24guwdKQ43dgLlUsZBsUCTrC7l7TcCbY6lCNocfBU+W3dSUPA4kDkjxcsfhrdNw hj8so4A3g5JO165+vZS0d41+L36hS6EdUjZbanOx4zPrSJer1SAAWJOHpvFI6MjgIHXC8c 4IE8mIpfG24WamSq9x3eCwMGMm1qit+M0PeQAyq4W8FxylUjARKiEr7WxAUff1pT+zzbr4 19W/OOFqb99Rkuo5aL2cJRt9ldyBLBA5oqaElWb2TMKZq3Ryaz4og3IzkD3gyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780059964; a=rsa-sha256; cv=none; b=lyArFF4o61zcuwUVKV+AYO3V5LtpXGlxsJF1T//WucmygZUd7CFQFvME2YB1poeMBFcfsp NqrCC43n6S1dyBblKdFEvDSpEYH21mNbfFO2lfB8Hmv8SoZWE8kto9sAmB2XZ20ePcOyY2 mzfpEJsqKiHBrz4fYA8dCVghIUxYaOyB3tC4ql2rbVYu7g4qvPkORVI+x6IrF+4+V1zs1D 2OHSeieJsvsLMj7xuWosrG2oJTDu43PTvaW0gVZGKrOayto5r34zZpLkDeBWjmKiC+GXM6 bFTTg5dSXk5oNhCg6z/BCJyTRC0OjheTQOcqHD5hFgq1DINTlsN6X9EAhMhkkw== 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=1780059964; 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=X1vvz02igSCm7plPELW/3iPtAIuC5X87Sar/pn6OPfI=; b=nbi5RpjONEDS+4m8P5fiZJxxaagBBnCjP8himF+MiZR2xlUbEVUOeRUSoQO7+n2bENr3cz 7r+g23RBLWxxf00/2Rg1PRQ2j3gpobQgcgbfNPXgDGdYk3TQIFBLWizlv97b65V+8vfmgq Zm66h9k/ADhwq6sPYpTCil9HvZHGBwBhgWzmsNgryLKbQZjwQ/Eiig02a+URIOnnBpe0aa qYY73EajUoGerDmLgReaDB0ViTpVEbSQzrZEki6S4Go1aQFp4UYiuEaR8ikqfo4NFaf9Q1 xUoIgc/11X2tqPFIE1rKt7LFJHkGU9XluJ9DbMgbU7EVIZfmG0hw4csspZi3eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gRkBN3yPnzZH8 for ; Fri, 29 May 2026 13:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18959 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 29 May 2026 13:06:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 3118f1b99f23 - main - bnxt: Fix build / load error for bnxt(4) in kernels without PCI_IOV List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3118f1b99f23431235c202d9aadbe3d183bcc259 Auto-Submitted: auto-generated Date: Fri, 29 May 2026 13:06:04 +0000 Message-Id: <6a198f3c.18959.5a9a2104@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=3118f1b99f23431235c202d9aadbe3d183bcc259 commit 3118f1b99f23431235c202d9aadbe3d183bcc259 Author: Andrew Gallatin AuthorDate: 2026-05-29 12:52:44 +0000 Commit: Andrew Gallatin CommitDate: 2026-05-29 13:05:25 +0000 bnxt: Fix build / load error for bnxt(4) in kernels without PCI_IOV This change removes the hard-forcing of PCI_IOV and adds shims to allow the driver to compile and work when the kernel is missing PCI_IOV support. Fixes: 7c450d1127c7 Reviewed by: sumit.saxena_broadcom.com Differential Revision: https://reviews.freebsd.org/D57300 Sponsored by: Netflix --- sys/dev/bnxt/bnxt_en/bnxt_sriov.c | 39 +++++++++++++++++++++++++++++++++++++++ sys/dev/bnxt/bnxt_en/bnxt_sriov.h | 4 ---- sys/dev/bnxt/bnxt_en/if_bnxt.c | 2 -- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_sriov.c b/sys/dev/bnxt/bnxt_en/bnxt_sriov.c index 270c18165fb7..071feffbadfd 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_sriov.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_sriov.c @@ -7,6 +7,8 @@ #include "bnxt_hwrm.h" #include "bnxt_sriov.h" +#ifdef PCI_IOV + static int bnxt_set_vf_admin_mac(struct bnxt_softc *softc, struct bnxt_vf_info *vf, const uint8_t *mac) @@ -973,6 +975,43 @@ void bnxt_sriov_attach(struct bnxt_softc *softc) device_printf(dev, "Failed to initialize SR-IOV (error=%d)\n", rc); } +#else + +void +bnxt_sriov_attach(struct bnxt_softc *softc __unused) +{ +} + +int +bnxt_cfg_hw_sriov(struct bnxt_softc *softc __unused, + uint16_t *num_vfs __unused, bool reset __unused) +{ + return (0); +} + +int +bnxt_approve_mac(struct bnxt_softc *sc __unused) +{ + return (0); +} + +void +bnxt_hwrm_exec_fwd_req(struct bnxt_softc *softc __unused) +{ +} + +bool +bnxt_promisc_ok(struct bnxt_softc *softc __unused) +{ + return (true); +} + +void +bnxt_update_vf_mac(struct bnxt_softc *sc __unused) +{ +} +#endif + void bnxt_reenable_sriov(struct bnxt_softc *bp) { if (BNXT_PF(bp)) { diff --git a/sys/dev/bnxt/bnxt_en/bnxt_sriov.h b/sys/dev/bnxt/bnxt_en/bnxt_sriov.h index 176f54af0aa8..24ea11f29b83 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_sriov.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_sriov.h @@ -8,10 +8,6 @@ #include "opt_global.h" #include "bnxt.h" -#ifndef PCI_IOV -#define PCI_IOV 1 -#endif - /* macro definations */ #define BNXT_MAX_VFS 4 diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 6618016f3932..6d82302615e1 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -2875,11 +2875,9 @@ bnxt_attach_post(if_ctx_t ctx) bnxt_dcb_init(softc); bnxt_rdma_aux_device_init(softc); -#if PCI_IOV /* SR-IOV attach */ if (BNXT_PF(softc) && BNXT_CHIP_P5_PLUS(softc)) bnxt_sriov_attach(softc); -#endif failed: return rc;