From nobody Wed Sep 30 10:41:29 2026 X-Original-To: dev-commits-src-all@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 4hvs6L0RtZz6vDPl for ; Wed, 30 Sep 2026 10:41:30 +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 4hvs6K3wPkz4N8v for ; Wed, 30 Sep 2026 10:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790764889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=smBZrIeb8dr5GMbV0/bPDYiwqrThPmk+KG1MBqRU9gU=; b=EYbnNRHhYyJTGfhp7YS4S3UVXolb7f5m8TW03wQ63x7PHq6TvpCVlpVGUPJ637gLUD6uvT 22wxPzec0lXCBHl0WjozKKJXIWBlckgEFoszI/FLqnHmimz6bt/8rs73ZRTnAKTbDJ3tGd qBWeLjwAAeC35HEdExcTqgQHrM0XUunRfo/P9QFEdW7NQZiAMel9HWOl6iZpbTO5NILQ1s aaOBKhyLUzyGMsu2mImJtG0MLs9ar1GxMV/K2qqeqzuRsZ4dkDkXIsVDstCDBIEI1ojxJP wu+uX65IfUAyv2APo/YuYhbx5nTPG46aVzAUXC/9U2wkX1+U+lxt8zj/X4dmbg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790764889; b=MuBebdPjtDnUH7M/IbKt3uqh636JHmvZRR76zya2bQjmrUU4cy9+uDpRzEqpFeF51It7dE i5RjDtyy2n3wdxweCoX6lUqSOHkVZSmKjBkOHrBZ8ikBrWXINfY9iATQ99Jcd5T39tPylo ugKwmjvIntKSONgmGGRn1WXYNZFSf7q7kzVQzO02aXk6xaW1cpX6zMdMxsm+Kcd7FSJcbF 7M2z2hRLCcLkRdaihUDu6L/eR82QERYMEqhy2GBlfn6Q2TxMjRkWb9J3GsyvJM1b0xpBlZ XP6iXu6zFY5MH2ZyHUyU1wYNq/OJfE3G2GTOgiwMzjfjXCUICzPjCR+0wVUoXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790764889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=smBZrIeb8dr5GMbV0/bPDYiwqrThPmk+KG1MBqRU9gU=; b=Ovyaf552bUnTcz9I3TLLSa5Q1nOaZCX7/x5VfsOwejwpJoULOuUdTXHsEuPLTIUMItptBg Z/wx8XGu1By0eiSdBSgeKzLIjeH9EQ9YIpytWKt9mfDQWMPKfZIjHrwtiKVhzM54sq0LuW HxYJIvyYCFTJYxK7Ui7CT9sT/RrTWjri2bdEUi+6mPp+yOHxtrFD1AOYfGHz2K6Cs/LvkR UFZDuISbhLAoDMzABOhl2Jf4b3EVO/hREeAFrh8bfJLLbsbMt4P02TbV0sHzgz2VYa77XJ NwLdexRPRrCGhPUPyQc3PnQKDotvXMT/8fVipgCpTAfDNg4asdvE9EVSjewbcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hvs6K2y1DzjNc for ; Wed, 30 Sep 2026 10:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a54a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 30 Sep 2026 10:41:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Chandrakanth Patil From: Sumit Saxena Subject: git: ae84473dece1 - stable/15 - bnxt_en: Re-enable SR-IOV after firmware reset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ae84473dece1233c7dba3cd4a351d769b25d7084 Auto-Submitted: auto-generated Date: Wed, 30 Sep 2026 10:41:29 +0000 Message-Id: <6abce759.3a54a.795f6022@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=ae84473dece1233c7dba3cd4a351d769b25d7084 commit ae84473dece1233c7dba3cd4a351d769b25d7084 Author: Chandrakanth Patil AuthorDate: 2026-03-31 16:59:02 +0000 Commit: Sumit Saxena CommitDate: 2026-09-30 10:39:30 +0000 bnxt_en: Re-enable SR-IOV after firmware reset When the firmware undergoes a hot-reset and the driver re-opens the device, previously active Virtual Functions lose their resource configuration. bnxt_reenable_sriov() restores that configuration by replaying bnxt_cfg_hw_sriov() with the saved resource parameters. The function is called from bnxt_fw_reset_task() in the BNXT_FW_RESET_STATE_OPENING state, guarded by #ifdef PCI_IOV. Because bnxt_cfg_hw_sriov() is a no-op when active_vfs is zero the call is safe on any PF regardless of whether VFs were ever created. MFC after: 1 month Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D56201 (cherry picked from commit 8743209350cb4b7db6d367df99da0a7ae3bc5d39) --- sys/dev/bnxt/bnxt_en/bnxt_sriov.c | 10 ++++++++++ sys/dev/bnxt/bnxt_en/if_bnxt.c | 3 +++ 2 files changed, 13 insertions(+) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_sriov.c b/sys/dev/bnxt/bnxt_en/bnxt_sriov.c index 2d9b43728c2d..2aeefd9308fb 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_sriov.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_sriov.c @@ -972,3 +972,13 @@ void bnxt_sriov_attach(struct bnxt_softc *softc) device_printf(dev, "Failed to initialize SR-IOV (error=%d)\n", rc); } +void bnxt_reenable_sriov(struct bnxt_softc *bp) +{ + if (BNXT_PF(bp)) { + struct bnxt_pf_info *pf = &bp->pf; + uint16_t n = pf->active_vfs; + + if (n) + bnxt_cfg_hw_sriov(bp, &n, true); + } +} diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 7897e39ffe24..817a33083d81 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -2338,6 +2338,9 @@ static void bnxt_fw_reset_task(struct work_struct *work) bnxt_ulp_start(bp, 0); clear_bit(BNXT_STATE_FW_ACTIVATE, &bp->state); set_bit(BNXT_STATE_OPEN, &bp->state); +#ifdef PCI_IOV + bnxt_reenable_sriov(bp); +#endif rtnl_unlock(); } return;