From nobody Sat Mar 23 00:25:34 2024 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 4V1g2k6606z5Fkdy; Sat, 23 Mar 2024 00:25:34 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V1g2k5LWwz4YfG; Sat, 23 Mar 2024 00:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711153534; 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=xZZPOL1uoSKlHtsgnuivjWuVZcn1ufkJuNxgaFl1pME=; b=ZQW7FOLf3XrL0eoHBWxEe9ouejLmoMcjIRYeRYqqI3HwDG4DfauWLdngSg3KoOiRgoYNjH qI8GWijhNZp5PeWTa7JmVR+Qb8tT7u5TFRUM0t+v32zknzQ6ocn9sfxtplps8HfpyFytTB D+tdCUJgiDA9377HPEzJl4LpQGqMnb+JG6TNEBJS3An4b+y9Bc3uDN3E1q0BEu1TCTpjNF PmvUQSwYO2pxuCMAHr+mA3CrkwUaPpQljsdMJ5XXKhQZ4y64QznaAcC8P+/+qqiXASKY94 ppo/Fk1AQGrSac4NV8WK39V2r1CgQcdq0+u6Wws18fBtF9MBeIe2Fu9s9O4mLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711153534; a=rsa-sha256; cv=none; b=NDm7B4MMVvphwMUHwIeNpvC2CRiVOhwPr5x3ycBymT/k7gHNnROcYoq9uQg1Od8zFw2P+H I+Y+2ODgS+sNojXO9FIPVi/1masgp0SuOBRePJSIUEl1f0tdmhxZNdMsTp096/9aqdrSyb GUALlEzW4YCxHLOfcnsyv7dtWmakqw3aXIl2XghZ1D4G+U65Nmt4bCI9otmGDl4ExF6jUf XceJYkpPpl/y+dKUBmN8zUW44AXXYBPbPMvyMsvJ1EVC8TH2Ic8M9t2AT6Ehv2omLBZcLp tu0hNlwddyrwgC0PEMEqv4bYXMODDwG0YIZyuMzcslguD20VSynOXpDeEQnZig== 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=1711153534; 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=xZZPOL1uoSKlHtsgnuivjWuVZcn1ufkJuNxgaFl1pME=; b=G0YyCnn/VnrEJ/HIkBvj3q0M71rD1gRBmij4oz4PoNivRKaF92UvJ+pEoYeT/fTlRaLu0Y s3XwSTsVmBA67sABijOyG/nxP0p3m/55DCYUqlvSjmhoyWjClqPZDm+pXbDF6arZm96eza 4EbTLvwO9r7LSGU8c1Po67hvtlWmd6b/6bRDYvaXyNHzsE/S/HIZ6+A0FYk2kqSyPDafw7 dx0cgKhOs+OAU+ngh9yZKp+M76POke0jcskMnLj56y/sYGHAl5frh9glg+pDJHqYr6kkOc 8bVJFh+TN8D1ScbsUR48KFNSjoA0jlcjLQIGVySEqqlIZ4JdzBMyDDkwB2D20w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V1g2k4z20zQtg; Sat, 23 Mar 2024 00:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42N0PYpl005750; Sat, 23 Mar 2024 00:25:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42N0PYSu005747; Sat, 23 Mar 2024 00:25:34 GMT (envelope-from git) Date: Sat, 23 Mar 2024 00:25:34 GMT Message-Id: <202403230025.42N0PYSu005747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b8cb8dd3625d - main - nvme: Add constants for the PSDT field in cdw0 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8cb8dd3625d7396ea98152d89e1e64b16e77bc6 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b8cb8dd3625d7396ea98152d89e1e64b16e77bc6 commit b8cb8dd3625d7396ea98152d89e1e64b16e77bc6 Author: John Baldwin AuthorDate: 2024-03-23 00:23:24 +0000 Commit: John Baldwin CommitDate: 2024-03-23 00:23:24 +0000 nvme: Add constants for the PSDT field in cdw0 This is not used in nvme(4) but is used in NVMe over Fabrics transports which use SGLs to describe buffers instead of PRPs. While here, adjust the shift value for the FUSE field to be relative to the 'fuse' member of 'struct nvme_command'. Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44443 --- sys/dev/nvme/nvme.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 5d3e60ece329..6eb9ef69b33b 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -211,9 +211,18 @@ /* Command field definitions */ -#define NVME_CMD_FUSE_SHIFT (8) +#define NVME_CMD_FUSE_SHIFT (0) #define NVME_CMD_FUSE_MASK (0x3) +enum nvme_psdt { + NVME_PSDT_PRP = 0x0, + NVME_PSDT_SGL = 0x1, + NVME_PSDT_SGL_MPTR = 0x2 +}; +#define NVME_CMD_PSDT_SHIFT (6) +#define NVME_CMD_PSDT_MASK (0x3) + + #define NVME_STATUS_P_SHIFT (0) #define NVME_STATUS_P_MASK (0x1) #define NVME_STATUS_SC_SHIFT (1)