From nobody Mon Nov 16 21:01:06 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 4jT0db0vM6z70wXN for ; Mon, 16 Nov 2026 21:01:07 +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 4jT0dZ5k2Sz4DBy for ; Mon, 16 Nov 2026 21:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794862866; 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=LvZbhG5NaCfTl3Uvlt0ci27Uad8ebx9b5X/0wOuHrBI=; b=M00nbg27+UhQ1+j8aiXCkQslvNComBN4KQl9tUuzVOIdEBsCYIsVhmo2OKkA629zQaflyr 1xwAsJY/pp++sMUJw6z0pO2I/OSQGcBLwlbod7r+23qQ0T8WQhiazEgNPVEv0QYYyNqRnO oDrNfum9fnXvkzqFIN3y9HL3xlfhELBDRBexPTges3Pge6LVbjcOUHop+Mx3zh2np8FRgo Os4D5kpZVoV6b9sIzANoHlEciG9mEE6341RIWtr1nfD2DOST+mm6xJv/kMyp/y66REyX47 819NQYo0VM8eop+RN663YhXYO7Z3KXib1NFM0EBCr2Rl7jek1BJOZzSs3CQyIw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794862866; b=lAMm4aAiCJG5Xh0P1mI5rvur7LHb/Krk4VcCTDIRv84SQxkhPh5MG3P4TmaKlwIYWhvy4B NxpZF1JdMbsJ8Ts7NM2HQM2le/rDEoTznrJcCs4JWhWazhonhyh3iI7hooQkRdTE+OBbcr 7lewacW7HH0xhUMA7rAEiZYKRPlFYIJ6y+glMSsEVfvQWrCRiYAEvCct3d4QK2noJUjdEd tUTAHfw7FjMfoGavGqs5jcAoRzBdksc7kHLx9NZBdWP0wK3d1sqZmeTj4yg2A8tn64NPy9 CFqwC+GmZsNdHmazQx14Tn/u4w0zLXsY4Y0lNuP5afYj9zRpy3rnESwFM4Q3pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794862866; 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=LvZbhG5NaCfTl3Uvlt0ci27Uad8ebx9b5X/0wOuHrBI=; b=vLeoqDxm0+Tpy7+Ug9nBWy3yes7hNSGdKORGtnoW6EjcACYd9A7QY1/yDTd/mcFj1UZLG/ RKWl019rlkhodLxjaJMS9jHLMiu62sh9eeUr0AnHMeDaLWqavYNbVl5cIwNtccVAVHpQwN DQeUlc8KKwMxQXDernOovZqVqE3uyzhEZMv/Cn02IShqdmtc0KEOGLHkdHcfAKLPiIQTJ3 lTDDwANrIGqhL/pCeozOkoVpMZbw5eskghlLjnBNJKovHMrnk5BsG583XIQ3TozzdFaDlZ 64oONnfoc2fJ0bUVnwBu2vUseLNivtXrVHjnIfMo9KDQ1uS749OCH96dFU2ITQ== 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 4jT0dZ5NcYz19Qf for ; Mon, 16 Nov 2026 21:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9685 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Nov 2026 21:01:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kenneth D. Merry Subject: git: 85a683205fb1 - stable/14 - nvme: Byte-swap the nsid in the Get/Set Features command builders List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 85a683205fb1bc694101bc1a2713a2951379f9bb Auto-Submitted: auto-generated Date: Mon, 16 Nov 2026 21:01:06 +0000 Message-Id: <6afb6f12.9685.28b46ff0@gitrepo.freebsd.org> The branch stable/14 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=85a683205fb1bc694101bc1a2713a2951379f9bb commit 85a683205fb1bc694101bc1a2713a2951379f9bb Author: Kenneth D. Merry AuthorDate: 2026-11-09 18:46:57 +0000 Commit: Kenneth D. Merry CommitDate: 2026-11-16 21:00:06 +0000 nvme: Byte-swap the nsid in the Get/Set Features command builders nvme_admin_get_feature_cmd() and nvme_admin_set_feature_cmd() stored the namespace ID in the command without converting it to little endian, unlike the other command building functions. Any caller passing a non-zero namespace ID would send the wrong namespace ID on big endian machines. Reported by: llm-postcr Fixes: 7a9e4375316b MFC after: 1 week Sponsored by: Spectra Logic Co-authored-by: Claude Fable 5 (cherry picked from commit 3a6dbe77c39d3a88b6092cfcaa820fc727d1e61d) --- sys/dev/nvme/nvme.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index b052da3cd374..8a37822f841e 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -2170,7 +2170,7 @@ static inline void nvme_admin_get_feature_cmd(struct nvme_command *cmd, uint32_t nsid, int sel, uint8_t feature, uint32_t cdw11, int uuid_idx) { cmd->opc = NVME_OPC_GET_FEATURES; - cmd->nsid = nsid; + cmd->nsid = htole32(nsid); cmd->cdw10 = htole32(((sel & 0x7) << 8) | feature); cmd->cdw11 = htole32(cdw11); cmd->cdw14 = htole32(uuid_idx & 0x7f); @@ -2183,7 +2183,7 @@ void nvme_admin_set_feature_cmd(struct nvme_command *cmd, uint32_t nsid, uint32_t cdw13, uint32_t cdw14, uint32_t cdw15) { cmd->opc = NVME_OPC_SET_FEATURES; - cmd->nsid = nsid; + cmd->nsid = htole32(nsid); cmd->cdw10 = htole32(((sv & 0x1) << 31) | feature); cmd->cdw11 = htole32(cdw11); cmd->cdw12 = htole32(cdw12);