From nobody Mon Nov 09 19:14:07 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 4jNfbM4DqDz70LBH for ; Mon, 09 Nov 2026 19:14: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 4jNfbM3bCnz4T90 for ; Mon, 09 Nov 2026 19:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794251647; 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=9EHb/9y7hDf7q5R+1195IPrGRktKDf7RFXKWjxxX3+Q=; b=O6zhVJ/a0TprCWdwRXM6AzxQY3PtBQLr3FvAACI6ZUU6fncy4b+ylbgGmYantp6VHols1A Lzpd4FZntAtAWcPMKukfsQbERGtYucduQOv3Ra5mDyKyMO/nhrNaSWjzcCqbcwdrl41bMx FGaKtBHqgZKHLc8rP6WZbdgyW1oXPU4u/aw6E1AbxagdbdYVaGfW7MJa/wdsOLERYBekXX JlO/lZqzLMUDAbJebrc/p22OpGidDaxzJGjVtfhTX6wYln0XcUliq8CBry7ogM7Wnkylm6 QsHJ2Z2tjYoHUdHRejvxOdwLtmeFmfQ3Dn3zhBbttrOoLLhhvxHOgiokvfcRPQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794251647; b=Hl5TT5oR0yh2XvAGI5yecpBmnF2H0rqU5Fc+1FsoY9XJiUp9dJCwbN9q3SeIq4hR7/Luit x0cwvT+sT4YMc+EmUfdWYRZLbE7feiCDy7RGZmuFkAfSqTOAnr86Lfz4L8V7hj2aFdLyUc 285Yp9AjiYRQlpeKGLa2WDHGSxHvX7l53r9fRlXFih0HJXqfoWtTwRLAk6tdc6oZS4GN+p MpCfJRQXyOesQ80NurDuiyxfDQOljfi0WYDMFkj5eWNy+cM6M1S91JSam7EdvO5+WXvw6f JROjgjJXGJ9mqi4puCoYchlu0bMWjmfSq9d9S/V/99OiZE+Fv81T3Zky7muf8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794251647; 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=9EHb/9y7hDf7q5R+1195IPrGRktKDf7RFXKWjxxX3+Q=; b=EX/pJ7vpdg5iTeBqBrHHwhMAhhBFOitbQmdtVGMBHBTmjrECZTKkSiXiGWKe7gmWvHWeAU 7sXCSXJqmNXj7jkM1/uYpfAFMWWWvaB1I9lvVhBSIbRPCVGRc4Tdp/MsvjFrwuPNoVsFVQ JU5Pt9IyadDuYjAEXduaR+Vds6Bo9hukdxp0obAGyBwQ94zk6qdxp5feboNLeQrLffC/SL Iif1EFkNqB8U4rK/+NoUYHcjfKENRoNsySzF3PUahQAPhxxi0Uz82gKOshFIg9FH39sYdz w79w8Bg7n7bU04YcihU42+mGal++cE4JPDKLMlUTvjiLhptq2SShlb5TcLDB7A== 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 4jNfbM3Fm4zvHs for ; Mon, 09 Nov 2026 19:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id fbb2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 09 Nov 2026 19:14:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kenneth D. Merry Subject: git: 3a6dbe77c39d - main - 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 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: 3a6dbe77c39d3a88b6092cfcaa820fc727d1e61d Auto-Submitted: auto-generated Date: Mon, 09 Nov 2026 19:14:07 +0000 Message-Id: <6af21b7f.fbb2.14161ae6@gitrepo.freebsd.org> The branch main has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=3a6dbe77c39d3a88b6092cfcaa820fc727d1e61d commit 3a6dbe77c39d3a88b6092cfcaa820fc727d1e61d Author: Kenneth D. Merry AuthorDate: 2026-11-09 18:46:57 +0000 Commit: Kenneth D. Merry CommitDate: 2026-11-09 18:59:12 +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 --- 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 ca87cdd25abe..e3b8f1f9ced4 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -2323,7 +2323,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); @@ -2336,7 +2336,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);