From nobody Mon Aug 31 23:19:00 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 4hYlLF2zqlz6qNwC for ; Mon, 31 Aug 2026 23:19:01 +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 4hYlLF2C6kz3GGM for ; Mon, 31 Aug 2026 23:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788218341; 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=o0js4TFlT3j6Cp32/o6vCcslQ+Ak4doaeiEH6odAdts=; b=ZpAUQbhTHuLJw8jOubIfKDIe7t3q98Vk26Fo6uXaGdNfz9+/aE+2IHnEs5n2nuP7JhU5Vz J+l5WzaFI3PdgU762mSwUWt+WaTSL41R/7JhJDqzcZ6UcP6/NXykE/eHwxMS0hnbI48NoP VSsyCUrPz98/B7w2qIlU5467zFiPbug+yffyF1Yk4X74xeYzeSOAsvzG8EfRWwuIElmEvI mUhZvozcg4l5IP24kJ4c4mv/7yAd09nIavtXxXMUD0WMv7sg3qZqX/06DiGFUtusipjTfl KTr3jmD6pKBUrca9OamxzpTN3LwDTPtRtmacgpZ9AoQ3g2WTErJYda/cQVwVCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1788218341; a=rsa-sha256; cv=none; b=Wdq4BM/KFE0TQR036Dx8OW8LEoCLs2Jcb+Os8JuABFjRCKp0Lty3v9mQ+O7tnp2mvYMAFw 0J5ZU/4Ym2vJMUYpyAzX5svu6+Uaa5a9MrJQ0AaFpP/AVI16dj1AdzJ+nRFkwFQllbMUZL Ba3bt9TsJNKRMhFUwkVAVAhrmHJrWnT7elZbpS+T6X78rICqk9puXox3e33k4qGc566KDf TGo+pNYB8RwrlOgqe0zEth28WmIrGsLipIcIpw3modATZUf6wTJlVgnEij/UYGx3A7GvBq QVFf1zCVqGQB7289itgwe/O8D8k9yvDpSFusW929id9kZFIR52W5DOPLC7Yytg== 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=1788218341; 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=o0js4TFlT3j6Cp32/o6vCcslQ+Ak4doaeiEH6odAdts=; b=k+gU7sVF0DtZB2UvqsC8LxIEoB7IlxMdKZyNNYSL/zP7kOQqd37vPfzetMvPlRteLoy+OX pw7zKSZ6KGqcvNjTRvmHjbMQYaDKi0aWb77tUeMjihM9pbQ2zZ2qzm2uI7N4NzaA/E7P6a 34PSAttPKx/DPqY9GOjoY509gB5wz7+2SQZwJJPspsqws4QDbocaPyJanGI5UFjRGHW6EJ 0UbEnY8CxgNTclbSYDiVqranoAQcitpFgoZFrPfY9iWU6y0bWEU73cXCOyA1IyUVeFQ3PQ ob0XdF5P26lzM7zpNmqvLwPMj2kEqLAKbQZkp9Dzy9lhThnJnW1tv9RmzrSdKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hYlLF0dcMzZ12 for ; Mon, 31 Aug 2026 23:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36c06 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 31 Aug 2026 23:19:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Nick Price Subject: git: 742c5498aca9 - main - bxe(4): don't feed a zero page size to ilog2 during ILT init 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: nprice X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 742c5498aca9a9a31a68eb9d5888edf36b7034dd Auto-Submitted: auto-generated Date: Mon, 31 Aug 2026 23:19:00 +0000 Message-Id: <6a960be4.36c06.7a211123@gitrepo.freebsd.org> The branch main has been updated by nprice: URL: https://cgit.FreeBSD.org/src/commit/?id=742c5498aca9a9a31a68eb9d5888edf36b7034dd commit 742c5498aca9a9a31a68eb9d5888edf36b7034dd Author: Nick Price AuthorDate: 2026-08-31 23:16:12 +0000 Commit: Nick Price CommitDate: 2026-08-31 23:18:42 +0000 bxe(4): don't feed a zero page size to ilog2 during ILT init FreeBSD's bxe hardwires CNIC_SUPPORT() to 0, so bxe_ilt_set_info() never enters the block that initializes the SRC and TM ILT clients. Those two clients are left zeroed (page_size 0, flags 0), yet ecore_ilt_init_page_size() calls ecore_ilt_init_client_psz() for all four clients unconditionally. For SRC and TM that evaluates ILOG2(page_size >> 12), i.e. ilog2(0). On an INVARIANTS kernel ilog2() asserts "ilog argument must be nonzero" and panics the machine the first time the interface is brought up (bxe_init -> bxe_nic_load -> bxe_init_hw -> ecore_ilt_init_page_size). On a non-INVARIANTS kernel it silently programs a bogus page-size register instead. Restore the else branch that upstream Linux bnx2x carries: when CNIC is not supported, mark the SRC and TM clients with ILT_CLIENT_SKIP_INIT and ILT_CLIENT_SKIP_MEM so ecore_ilt_init_client_psz() skips them. Root-caused from a crash dump on a BCM57810 (device 0x168e): the ILT clients showed CDU and QM populated and SRC and TM zeroed with no skip flag set. Reviewed by: adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D58587 Signed-off-by: Nick Price --- sys/dev/bxe/bxe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 3e7120a42a90..b6364c3909bb 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -5899,6 +5899,11 @@ bxe_ilt_set_info(struct bxe_softc *sc) ilt_client->start, ilt_client->end, ilt_client->page_size, ilt_client->flags, ilog2(ilt_client->page_size >> 12)); + } else { + ilt->clients[ILT_CLIENT_SRC].flags = + (ILT_CLIENT_SKIP_INIT | ILT_CLIENT_SKIP_MEM); + ilt->clients[ILT_CLIENT_TM].flags = + (ILT_CLIENT_SKIP_INIT | ILT_CLIENT_SKIP_MEM); } KASSERT((line <= ILT_MAX_LINES), ("Invalid number of ILT lines!"));