From nobody Mon Aug 31 23:19:00 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 4hYlLL1wKMz6qPG0 for ; Mon, 31 Aug 2026 23:19:06 +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 4hYlLL1Fctz3GNV for ; Mon, 31 Aug 2026 23:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788218346; 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=QK0L1irAyP2soj9wGfzotGw57nE/6/QKR9tx5VYhdAtvh8lzlTCtA7YHrhRsR8/Jypbnyg 9u4IZGw0HEVnbRfqCBR5Nf7b4cYMPUIkr+2axNBxQ6KkgIEo2UTW2r0I9VaX7rUy8RQD5M jA9C5M+KtiwH5zxl5tIjwus9IUBWcQm+zEc7urlckFN1nf//9F2ZgTwAQ6SZOItaTluNLE oMi3VWw3q3QbP0ggDX4zQMY85qI+KPOlTSB3fzFuVLm9oRGCxyjmAkkBAgzz292ue0IWFf ijwcSoX46vpVZdgELpXzB7T7eysrEUwtOFgOZuMoVKOnaNq1JkdS0SNlS7P+gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1788218346; a=rsa-sha256; cv=none; b=IyBCkAhuPL9VK4C1QPBPMIlJ/r8NfBtmWe/TQgS/REj2VAbFWhXJn+D/nQ4rxuYksmEg8b C3RkMxwnpMzS7huM49n71AjJL7kNRQfx8MAACZt6ISmUNMi5fzotlY8lPDUGAgvaBfE+Rw vwJXXRazdUx6F0bdrfXjp2dcz4tzc//ea1JHF72D0iN3PRph3UlyMhf5fgkKkzLz3dAyN+ 8TW1oacVla83F62g1LiSzUhNog0bVSc/WR7p5iP69MCQE8bnSasSpOJMK+6vAxjhzHeQst lq9Je7hapSCwjFF1xUUSRccPLiK9OQLXNdBjm/OdsPNZ/Xl0mLxqKWvRzeE6Xw== 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=1788218346; 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=f95L8NhqlGTXe7WI6AsqntIIq1X5iUb5BKs8SQ4xQl30wiG3pelFxj5uR+WbJo+jMBoZzv kHZj3iWo1r7aP+xUpE7MGnKkf2/TgI+Taoxf6W1apTQXkFuoZPao/i5aT8tEff0fgmqIzo n5OhqnGwrDaAYy9y5eYAsGCIMG4ehGetdtVLR3y+bmm3TAYEdY1CnRp9zhGk5n6cG/mf0P NwQbsxsNwbx7XSpdaIFL/3IYaMV+kfZx25K9AVC+UuU8RpnIH0qYBAg6csN0ooHMwxOQpD tKOZrppCo7fq8sayIEOwkhqN9MANKvaRvBZ8LXwjN/2UYe8Fbr0Bccgj4c2VTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hYlLL0CZgzZ13 for ; Mon, 31 Aug 2026 23:19:06 +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 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: 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!"));