git: ac8c866fda40 - main - nvme: Add more NVME Base Spec 2.0 and NVME Command Set Spec 1.0a
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Aug 2023 22:45:41 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=ac8c866fda40d55d6a602da76b665748738d1c79
commit ac8c866fda40d55d6a602da76b665748738d1c79
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-08-07 22:35:38 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-08-07 22:44:31 +0000
nvme: Add more NVME Base Spec 2.0 and NVME Command Set Spec 1.0a
Add admin commands capacity management, lockdown and fabrics commands.
Add I/O copy command.
Sponsored by: Netflix
Reviewed by: chuck, mav, jhb
Differential Revision: https://reviews.freebsd.org/D41311
---
sys/dev/nvme/nvme.h | 10 +++++++++-
sys/dev/nvme/nvme_qpair.c | 4 ++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h
index b8e2813e977b..b63a7d0bf270 100644
--- a/sys/dev/nvme/nvme.h
+++ b/sys/dev/nvme/nvme.h
@@ -851,8 +851,14 @@ enum nvme_admin_opcode {
NVME_OPC_VIRTUALIZATION_MANAGEMENT = 0x1c,
NVME_OPC_NVME_MI_SEND = 0x1d,
NVME_OPC_NVME_MI_RECEIVE = 0x1e,
- /* 0x1f-0x7b - reserved */
+ /* 0x1f - reserved */
+ NVME_OPC_CAPACITY_MANAGEMENT = 0x20,
+ /* 0x21-0x23 - reserved */
+ NVME_OPC_LOCKDOWN = 0x24,
+ /* 0x15-0x7b - reserved */
NVME_OPC_DOORBELL_BUFFER_CONFIG = 0x7c,
+ /* 0x7d-0x7e - reserved */
+ NVME_OPC_FABRICS_COMMANDS = 0x7f,
NVME_OPC_FORMAT_NVM = 0x80,
NVME_OPC_SECURITY_SEND = 0x81,
@@ -882,6 +888,8 @@ enum nvme_nvm_opcode {
NVME_OPC_RESERVATION_ACQUIRE = 0x11,
/* 0x12-0x14 - reserved */
NVME_OPC_RESERVATION_RELEASE = 0x15,
+ /* 0x16-0x18 - reserved */
+ NVME_OPC_COPY = 0x19,
};
enum nvme_feature {
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
index 988c82741592..34a3633fdb2e 100644
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -73,7 +73,10 @@ static struct nvme_opcode_string admin_opcode[] = {
{ NVME_OPC_VIRTUALIZATION_MANAGEMENT, "VIRTUALIZATION MANAGEMENT" },
{ NVME_OPC_NVME_MI_SEND, "NVME-MI SEND" },
{ NVME_OPC_NVME_MI_RECEIVE, "NVME-MI RECEIVE" },
+ { NVME_OPC_CAPACITY_MANAGEMENT, "CAPACITY MANAGEMENT" },
+ { NVME_OPC_LOCKDOWN, "LOCKDOWN" },
{ NVME_OPC_DOORBELL_BUFFER_CONFIG, "DOORBELL BUFFER CONFIG" },
+ { NVME_OPC_FABRICS_COMMANDS, "FABRICS COMMANDS" },
{ NVME_OPC_FORMAT_NVM, "FORMAT NVM" },
{ NVME_OPC_SECURITY_SEND, "SECURITY SEND" },
{ NVME_OPC_SECURITY_RECEIVE, "SECURITY RECEIVE" },
@@ -95,6 +98,7 @@ static struct nvme_opcode_string io_opcode[] = {
{ NVME_OPC_RESERVATION_REPORT, "RESERVATION REPORT" },
{ NVME_OPC_RESERVATION_ACQUIRE, "RESERVATION ACQUIRE" },
{ NVME_OPC_RESERVATION_RELEASE, "RESERVATION RELEASE" },
+ { NVME_OPC_COPY, "COPY" },
{ 0xFFFF, "IO COMMAND" }
};