From nobody Mon Nov 16 21:00:39 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 4jT0d34Hkfz70wbx for ; Mon, 16 Nov 2026 21:00:39 +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 4jT0d334hMz4CN8 for ; Mon, 16 Nov 2026 21:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794862839; 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=Y1B1LBGrcwEVKwkMf5Mjt8eaT8ccp2ZKAMJjTfgxKdE=; b=LMOc6nIJjJUa6vQfP/XZCVkXabsf/qadXYNO9j5iqKhbZx3chvAnp0eX/xIFfnf8PT6sGh qNi26qrp8XU4bv7rJLvvV85uTDnRcujBfJxhMsbs5uHSs8uR7TLKxShNrN/OmjzIRuZJwN bWD7pPXpqS3JiCbhh+vpcKHY6i7i8v11LGA1D/2+FpwS6nmmh+UTgcBVzS3Ohg4nL0ohCU F6GfwHq6wmDaW+Ufz7t0ycvxacHmUpmBQVIWPSFOTgZZJBGe2roBeK/81OoDQ0sH9xAQNc ElqSuf3y876mWWU1IEzmkuBWHJOZFxluqW+Zk68X53OG1f8bcOXos5Jx2JfFuw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794862839; b=l0f2BZEB86rMNd9snHq6vC972xjfTrGdcj4yZliQ0q7+Dyxob5Hv/zWA2siqgTqVHmrmhP tJD/tLlgBKTWLQt2rLXcNuNduHKj13RKm0V+JvOOEZl52bh1WuHkUfZUv4HoQtiN4JE6h+ Z/x/Sr8qviqPrSYwUjTTwvvoUw1FGC9qOVeacjFlKFx0u/KUwjPFKV73yMNWW7dFYeYzrw G72+gbofm9i4EN0/lb+ulObLzFroLxn1SchFfLOnvEntrrE+AkK28UmTUeoc7tvhom5HuM cQ9X9SLgp4+61k/ANv1tUnyCunBwDH4fqdd+PELbUp0qWH2UOq9wqsBn47vPxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794862839; 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=Y1B1LBGrcwEVKwkMf5Mjt8eaT8ccp2ZKAMJjTfgxKdE=; b=QXs9xMyqBd+DMUmKGTPkxG8goUWxNLQ1CribDteRDQ0KkGT9FDwChvGhld07QI1pWLQH0o g/jCzJcENeXKqW0bJ3+DRJ8opS4KV4SgdNqEB/uA5UumbSS8wy6cZRXgSWaw3wxbc9ytjD iaLX5lz9qenBJK/aA0VYmR+LZOaqUbsO4SX5hNlguZfZPtGFddYF4s6UJrfS+5VtXiI3/3 0cHGon1nndX7PIAyHDYFqx5OleRlTSlVX7fnfOXGRk/ee7yNeQC/LLDfkOp/ZtAj/ZfYYF snQZ/J2Dm+MD+jcxK1tmDCBaj7ytwwri9IKDRx55k+gJRWsJJZmtA9bv293Amw== 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 4jT0d32ZQLz19Yr for ; Mon, 16 Nov 2026 21:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 95fa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Nov 2026 21:00:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kenneth D. Merry Subject: git: ffc15b5c86fc - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: ffc15b5c86fce773b484d016be493e6f495081c6 Auto-Submitted: auto-generated Date: Mon, 16 Nov 2026 21:00:39 +0000 Message-Id: <6afb6ef7.95fa.c13955c@gitrepo.freebsd.org> The branch stable/15 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=ffc15b5c86fce773b484d016be493e6f495081c6 commit ffc15b5c86fce773b484d016be493e6f495081c6 Author: Kenneth D. Merry AuthorDate: 2026-11-09 18:46:57 +0000 Commit: Kenneth D. Merry CommitDate: 2026-11-16 16:12:33 +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 34135075bdda..b5f2815eeff3 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -2254,7 +2254,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); @@ -2267,7 +2267,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);