From nobody Mon Nov 09 19:14:10 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 4jNfbR0mbCz70LCm for ; Mon, 09 Nov 2026 19:14:11 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jNfbQ5Syrz4TC2 for ; Mon, 09 Nov 2026 19:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794251650; 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=QcYEHYLuzg9iUPMxwwTckQkgxMVkLp5iifcJtPUTjnM=; b=eBQ2UjIdfg0GS1v4QsvmJV47ihB3Gv0Qj4rmysV3wfjzj393Ln9rauRgz0J+1iy48PbcuC Oxt7sz1DwbqQw05kxRLo694yrza4Vtev1gaDRAGfD5GIUCrFjH25y3UbG/tMuAiC84SUn/ TBhTFD0ZFdsItn/TriquG7Tgv0lJiLRcJQ39jgs772Hq55fr1YdZ5g8VuJy6MYL35zpAch xlrUasgov+lHOK49J2prN5OVqbJvSsMTsGtst8Y2ceydbtXBGLkZyIylZpXTqEqoROvW/6 haU+3eMnu01NzmnySKrhY7QjRNbS5uSZpOTla4/0X17thdqjgMG6t2pI0CwGWg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794251650; b=sCxg8+3rBY28nvIUusCZeh1xW+JzRJLytDDOiRU3aYrGS6GizhStvrswybiZGnrskFp41J cMUQqFLlyB6C6B8lzHKuHh6ODPBAMObJr+QVE6Xct598ciV/REEqo1Cl3ARkG8do3iG9ie /Dt0HIaR7S5sIJ58ZEOPIVFczbb8nUOGeS3fJBLXqPyCgOIuWSBoJWIMgHoYkB5ORv2P1M knoveFreCiKydlv0Y8e+vJmyZEq2tV5+SRxZ7p33Kfkxay+8P/9jGiiOuhaCYrSY2igauU NxWFmIE9wUhpgQfPvdDwF+MFRc4EIwp3QNcREND4oz8sxC0Uufc6rNenoFDSNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794251650; 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=QcYEHYLuzg9iUPMxwwTckQkgxMVkLp5iifcJtPUTjnM=; b=h/GomXKI31s8HbSTy0u37vyyImCDnH57tMsuOOxyWJtkCCBVx73Y9eMPedsYdeUN1GBnn+ ui2YkpUoh7aU+4FclpW3zGMwhecEmyGrjqjPo2n9WO0BWR2xXkxltgxLaMGuLDN4G+g03v LYiNnza51KS8FDdzn5L65wyr80oL69s81bLqvY+QsZihJ2xSp6nj3f1e6nNY3f9KPDXx/f 4SLsAg5uT8bUMt8bJ0t8uOJVbpyanm809Qx0XS7eFeNWuFwB97GdKmU/wCwKHLM25UbXcG oDpdJDP+mdxUauV7Nqb9VtPxsmFkA0YS3N76OtiTlMa3xQYYbfcLQeiFkzXkAg== 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 4jNfbQ4P2lzvHt for ; Mon, 09 Nov 2026 19:14:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id fb47 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 09 Nov 2026 19:14:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kenneth D. Merry Subject: git: f262bdcf24f1 - main - nvme: Restore the host memory buffer size calculation List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository 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: ken X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f262bdcf24f1f946edcd01f5eb5dfa2910da9e7b Auto-Submitted: auto-generated Date: Mon, 09 Nov 2026 19:14:10 +0000 Message-Id: <6af21b82.fb47.519d9f82@gitrepo.freebsd.org> The branch main has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=f262bdcf24f1f946edcd01f5eb5dfa2910da9e7b commit f262bdcf24f1f946edcd01f5eb5dfa2910da9e7b Author: Kenneth D. Merry AuthorDate: 2026-11-09 18:46:59 +0000 Commit: Kenneth D. Merry CommitDate: 2026-11-09 18:59:13 +0000 nvme: Restore the host memory buffer size calculation When the nvme_ctrlr_cmd_set_feature() call in nvme_ctrlr_hmb_enable() was rewritten for the widened Set Features API, the HSIZE calculation reverted to dividing by a hard coded 4096 instead of the controller page size, undoing commit 3740a8db13ba. The Host Memory Buffer Size field is in units of the current memory page size (CC.MPS), so the wrong size would be programmed on controllers configured with a page size other than 4KB. Reported by: llm-postcr Fixes: 7a9e4375316b MFC after: 1 week Sponsored by: Spectra Logic Co-authored-by: Claude Fable 5 --- sys/dev/nvme/nvme_ctrlr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 6eff9af77aac..11c09efc684f 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1180,7 +1180,7 @@ nvme_ctrlr_hmb_enable(struct nvme_controller *ctrlr, bool enable, bool memret) cdw11 |= 2; status.done = 0; nvme_ctrlr_cmd_set_feature(ctrlr, 0, 0, NVME_FEAT_HOST_MEMORY_BUFFER, - cdw11, ctrlr->hmb_nchunks * ctrlr->hmb_chunk / 4096, + cdw11, ctrlr->hmb_nchunks * ctrlr->hmb_chunk / ctrlr->page_size, ctrlr->hmb_desc_paddr, ctrlr->hmb_desc_paddr >> 32, ctrlr->hmb_nchunks, NULL, 0, nvme_completion_poll_cb, &status); nvme_completion_poll(&status);